Version Description
Download this release
Release Info
Developer | moon0326 |
Plugin | WooCommerce Admin |
Version | 2.6.4 |
Comparing to | |
See all releases |
Code changes from version trunk to 2.6.4
- changelog.txt +16 -325
- dist/activity-panels-help/style-rtl.css +0 -1
- dist/activity-panels-inbox/style-rtl.css +0 -1
- dist/analytics-report-categories/style-rtl.css +0 -1
- dist/analytics-report-customers/style-rtl.css +0 -1
- dist/analytics-report-orders/style-rtl.css +0 -1
- dist/analytics-report-products/style-rtl.css +0 -1
- dist/analytics-report-stock/style-rtl.css +0 -1
- dist/analytics-report/style-rtl.css +0 -1
- dist/analytics-settings/style-rtl.css +0 -1
- dist/app/index.js +8139 -10004
- dist/app/index.min.asset.php +1 -1
- dist/app/index.min.js +1 -1
changelog.txt
CHANGED
@@ -1,295 +1,17 @@
|
|
1 |
-
==
|
2 |
-
|
3 |
-
- Fix: Fix PHP warning when default param is missing in payments spec. #8519
|
4 |
-
- Update: Update country support list for WooCommerce Payments Task. #8517
|
5 |
-
|
6 |
-
== 3.3.1 03/31/2022 ==
|
7 |
-
|
8 |
-
- Fix: WCPayments task is not visible after installing the plugin #8514
|
9 |
-
|
10 |
-
== 3.3.0 03/29/2022 ==
|
11 |
-
|
12 |
-
- Fix: Fix handling of paid themes in purchase task. #8493
|
13 |
-
- Fix: Added random IDs to SVG checkmarks in stepper component #8222
|
14 |
-
- Fix: Fix Google Listings plugin is always shown in free features despite already activated. #8330
|
15 |
-
- Fix: Fix hidden notes in `admin/notes` endpoint when the user is not in the tasklist experiment. #8328
|
16 |
-
- Fix: Fix missing product name in variation analytic page for the deleted products. #8255
|
17 |
-
- Fix: Fix payments extensions displayed below the offline payments options. #8232
|
18 |
-
- Fix: Fix setup wizard title and flash of content #8201
|
19 |
-
- Fix: Fix too many pending run_remote_notifications actions. #8285
|
20 |
-
- Fix: Fix view logic for Setup additional payment providers task. #8391
|
21 |
-
- Fix: OBW: fix copy on Business Details when "WooCommerce Shipping" is not listed #8324
|
22 |
-
- Fix: Only add product data on REST requests and task list #8235
|
23 |
-
- Fix: Stop showing actioned inbox items #8394
|
24 |
-
- Add: Add asynchronous plugin install and activation endpoints #8079
|
25 |
-
- Update: Adjust time range and add an image for the Jetpack Backup note. #8293
|
26 |
-
- Update: Implement MailChimp API request threshold for MailchimpScheduler. #8342
|
27 |
-
- Update: Reintroduce CES on product add, product update, and order update. #8238
|
28 |
-
- Update: Replace mysql image with mariadb #8220
|
29 |
-
- Dev: Added a test for tracks event recording for PaymentGatewaySuggestions #8306
|
30 |
-
- Dev: Add README to hook reference generation script #8004
|
31 |
-
- Dev: Add reset WooCommerce functionality to E2E tests, so tests have a fresh state. #8219
|
32 |
-
- Dev: Enabled optional typescript checking on ./client subfolder #8372
|
33 |
-
- Dev: Fix formatting and add filter param for changelog types for the testing instructions script. #8256
|
34 |
-
- Dev: Refactor MerchantEmailNotifications #8304
|
35 |
-
- Dev: Remove preloaded countries from data endpoints and use data store instead. #8380
|
36 |
-
- Dev: Remove unused pre loaded setting data displaying all the routes. #8379
|
37 |
-
- Dev: Remove unused task styling classes #8234
|
38 |
-
- Dev: Update dependencies to support react 17 and drop support for IE11. #8305
|
39 |
-
- Dev: Update task list data structure to better handle new designs. #8332
|
40 |
-
- Tweak: OBW: Override Country/Region label line-height style to avoid truncated descenders. #8186
|
41 |
-
- Tweak: Show single success message for theme install and activation #8236
|
42 |
-
- Tweak: Use WC_VERSION as cache buster for assets #8308
|
43 |
-
- Performance: Avoid expensive get_notes() queries in CouponPageMoved admin_init actions by using new Notes::get_note_by_name() helper method. #8202
|
44 |
-
- Enhancement: Add chart color filter for overriding default chart colors. #8258
|
45 |
-
- Enhancement: Added Typescript type declarations to build for @woocommerce/components #8282
|
46 |
-
- Enhancement: Increase color selection limit to ten and add additional colors. #8258
|
47 |
-
- Enhancement: Made @woocommerce/components/Stepper a Typescript file #8286
|
48 |
-
- Enhancement: Prompts a modal to save any unsaved changes when the users try to move to a different step #8278
|
49 |
-
- Fix: Make sure the paid extension task is also shown for themes. #8412
|
50 |
-
- Fix: Reintroduce emphasis on inbox note action button. #8411
|
51 |
-
- Fix: Remove class ExtendedPayments. #8461
|
52 |
-
|
53 |
-
== 3.2.0 02/22/2022 ==
|
54 |
-
|
55 |
-
- Fix: Adjusted task list logic to fix conflict between current and experimental task list. #8321
|
56 |
-
- Fix: changed email validation in Store Details onboarding task to more closely match PHP backend validation. #8197
|
57 |
-
- Fix: Disallow whitespace as the platform name input. #8090
|
58 |
-
- Fix: Ensure setup-wizard redirection on homescreen is stable. #8114
|
59 |
-
- Fix: Fix category report query returns invalid net sales. #8153
|
60 |
-
- Fix: Fix clicking the error message opens the dropdown. #8094
|
61 |
-
- Fix: Fix country/region selection not preserved in store details task. #8228
|
62 |
-
- Fix: Fixed email address not being optional in OBW #8263
|
63 |
-
- Fix: Fix get_automated_tax_supported_countries doesn't include UK. #8180
|
64 |
-
- Fix: Fix incorrect date options when the "Default Date Range" is set from Analytics settings. #8189
|
65 |
-
- Fix: Fix incorrectly displayed note created date. #8179
|
66 |
-
- Fix: Fix incorrect screen reader text generated for data points on charts table. #8181
|
67 |
-
- Fix: Fix incorrect total count of downloads on the analytics download report. #8182
|
68 |
-
- Fix: Fix misaligned status column on order report. #8121
|
69 |
-
- Fix: Fix shipping rate error message overlaps with the 'Proceed' button. #8165
|
70 |
-
- Fix: Fix Shipping task sometimes skipping the set shipping costs step. #8260
|
71 |
-
- Fix: Fix Uncaught TypeError count(NULL) for php8+ in Marketing.php. #8213
|
72 |
-
- Fix: Fix undefined derived_currency value for the track 'wcadmin_storeprofiler_store_details_continue'. #8193
|
73 |
-
- Fix: Fix variations table product filter query. #8120
|
74 |
-
- Fix: Make sure free subscriptions does not show when cbd industry is selected. #8323
|
75 |
-
- Fix: Make sure WooCommerce Payments tasklist_payment_setup is triggered again. #8146
|
76 |
-
- Fix: Preserve HTML markup in server-side error messages received from sample product import request. #8173
|
77 |
-
- Fix: Remove border between email input and newsletter checkbox in OBW store details. #8148
|
78 |
-
- Fix: Reset "install_timestamp" if it's not numeric to avoid TypeError. #8100
|
79 |
-
- Fix: Truncate the long site title with an ellipses on the second line. #8112
|
80 |
-
- Add: Add additional store profiler track for the business details tab. #8265
|
81 |
-
- Add: Add countries data store #8119
|
82 |
-
- Add: Add extra tracking for plugin installation performance during onboarding. #8042
|
83 |
-
- Add: Adding tooltip to describe the lack of refund deductions from revenue summaries. #8187
|
84 |
-
- Add: Add localized validation to store address #8123
|
85 |
-
- Add: Add Magento migration note #8145
|
86 |
-
- Add: Add REST endpoint to retrieve address locales #8116
|
87 |
-
- Add: Add Spain to Square country suggestion list. #8210
|
88 |
-
- Add: Add wc_version property to the store profile onboarding tracks for view and complete steps. #8290
|
89 |
-
- Add: Change the reviews empty state panels logic #8147
|
90 |
-
- Update: Add custom error for store details email and allow continue #8110
|
91 |
-
- Update: Adding "allow-plugins" property for composer configuration. #8139
|
92 |
-
- Dev: Remove wc-admin-settings package and rename getSetting to getAdminSetting. #8057
|
93 |
-
- Tweak: Fix WCPay in core texts and promo slug #8296
|
94 |
-
- Tweak: Grow and center buttons in all WooCommerce ellipsis menu popover containers. #8168
|
95 |
-
- Tweak: Hide store address fields in regions that specify hidden #8172
|
96 |
-
- Tweak: Make activity panel badges margin consistent. #8152
|
97 |
-
- Tweak: Padding tweak for marketing tools plugin list headings. #8171
|
98 |
-
- Performance: Speed up customer syncing action. #8021
|
99 |
-
- Enhancement: Enhance report chart i18n support. #8129
|
100 |
-
- Enhancement: Make ExPlat request URL args filterable. Added woocommerce_explat_request_args filter. #8231
|
101 |
-
- Enhancement: Show MailPoet in Installed marketing extensions. #8091
|
102 |
-
- Enhancement: Update headercard to use filter to add ExPlat parameter #8233
|
103 |
-
|
104 |
-
== 3.1.0 01/25/2022 ==
|
105 |
-
|
106 |
-
- Fix: Fix Onboarding flow where extensions might not be selected and installed. #7979
|
107 |
-
- Fix: Fix pagination issue with Analytics Coupons page. #8001
|
108 |
-
- Fix: Fix select-control component label/value alignment. #8045
|
109 |
-
- Fix: Fix unexpected analytics report table filter results. #8072
|
110 |
-
- Fix: Prevent coupon move notice for new installs. #7995
|
111 |
-
- Fix: Remove calls to read_meta_data in the Note DataStore. #7988
|
112 |
-
- Fix: Fix free extensions list isn't updated after store location or industry is changed. #8099
|
113 |
-
- Fix: Fix misaligned "Rows per page" dropdown. #8113
|
114 |
-
- Fix: Hide the extensions header when no available plugins in the category. #8089
|
115 |
-
- Fix: Replace all docs.woocommerce.com links with woocommerce.com/document. #8105
|
116 |
-
- Fix: Fixing marketing task not displaying on Atomic sites #8150
|
117 |
-
- Fix: Fix setup wizard free features checkbox re-check itself. #8169
|
118 |
-
- Add: Add featured pill for MailPoet and Google Listings in marketing task #8009
|
119 |
-
- Add: Add inbox_action_click track when a note gets clicked #8086
|
120 |
-
- Add: Activate promo note after WC Pay is activated. #8104
|
121 |
-
- Add: Add payment remind me later note. #8085
|
122 |
-
- Add: Add WC Pay welcome page #8083
|
123 |
-
- Update: Allow content data note props to be passed from remote sources #8047
|
124 |
-
- Update: Update @woocommerce/e2e-environment package to latest. #8000
|
125 |
-
- Dev: Add payment gateway suggestion docs and example extensions #7966
|
126 |
-
- Dev: Remove low performing inbox notes. #8054
|
127 |
-
- Dev: Remove navigation feedback note. #8055
|
128 |
-
- Dev: Fix task ID class check and add tests around tracking #8185
|
129 |
-
- Tweak: OBW Update WC Pay label on recommended extensions list #8038
|
130 |
-
- Enhancement: Add SlotFill areas to header #7805
|
131 |
-
|
132 |
-
== 3.0.3 01/06/2022 ==
|
133 |
-
|
134 |
-
- Fix: Fix blank payment gateway method in table when WooCommerce Payments is not supported. #8122
|
135 |
-
- Add: Add woocommerce_allow_marketplace_suggestions filter to WooCommerce Payments payment method promotion. #8117
|
136 |
-
|
137 |
-
== 3.0.2 01/05/2022 ==
|
138 |
-
|
139 |
-
- Render the activity panel when the experimental tasklist is hidden. #8111
|
140 |
-
|
141 |
-
== 3.0.1 12/30/2021 ==
|
142 |
-
|
143 |
-
- Do not initialize WC Pay promotion if spec is empty. #8087
|
144 |
-
|
145 |
-
== 3.0.0 12/28/2021 ==
|
146 |
-
|
147 |
-
- Fix: Fix an issue with the code that makes use of an invalid parameter with a PHP function. The use of this invalid parameter causes PHP 8 to throw a Fatal Error. #7855
|
148 |
-
- Fix: Fix TaskList UI experiment enablement logic. #7930
|
149 |
-
- Fix: Navigation nudge note and navigation feedback notes will delete themselves if the navigation feature is not available. #7914
|
150 |
-
- Fix: Replace old task list option calls with data store selectors. #7820
|
151 |
-
- Fix: Self-delete NavigationFeedbackFollowUp note when navigation feature is not present. #7939
|
152 |
-
- Fix: Fix PHP Warning on 'Add new product' page. #7989
|
153 |
-
- Fix: Fix usage of Wordpress DatePicker component. #7982
|
154 |
-
- Fix: Fix shipping task completion status. #8031
|
155 |
-
- Add: Add option to dismiss promotional payment gateway. #7965
|
156 |
-
- Add: OBW - Add number of employees field. #7963
|
157 |
-
- Update: Ending wcpay promotion experiment and always displaying in payment methods table.
|
158 |
-
- Update: Hide InboxPanel header when it is rendered in the sidebar. #7952
|
159 |
-
- Update: Introduce a 320 character limit for inbox note contents. #7958
|
160 |
-
- Update: Move payments task to extended task list when WC Pay task is shown. #7980
|
161 |
-
- Update: Rename Inbox to Activity from the activity header. #7879
|
162 |
-
- Update: Load both actioned and unactioned notes. #7983
|
163 |
-
- Dev: Explicitly sets the Node version to 14 in .nvmrc to prevent incompatible versions of Node from being used with nvm. #7932
|
164 |
-
- Dev: Remove unused npm package @woocommerce/settings. #7949
|
165 |
-
- Dev: Update payment method recommendation to new woocommerce.com endpoint. #7913
|
166 |
-
- Dev: Use abstraction to add and retrieve task data. #7918
|
167 |
-
- Tweak: Added dismiss all button for inbox notes.
|
168 |
-
- Tweak: Implement note read state. #7896
|
169 |
-
- Tweak: Add inbox_panel_view tracks event. #8002
|
170 |
-
- Enhancement: Add tests to Subscriptions inclusion. #7804
|
171 |
-
|
172 |
-
== 2.9.3 12/15/2021 ==
|
173 |
-
|
174 |
-
- Fix: Correctly match payment gateways by id #7994
|
175 |
-
|
176 |
-
== 2.9.2 12/13/2021 ==
|
177 |
-
|
178 |
-
- Fix: Fix shipping task completion status #8031
|
179 |
-
|
180 |
-
== 2.9.1 12/07/2021 ==
|
181 |
-
|
182 |
-
- Fix: Fix shipping task not offering step 3. #7985
|
183 |
-
|
184 |
-
== 2.9.0 11/30/2021 ==
|
185 |
-
|
186 |
-
- Fix: Do not clear `current` class from the entire page when updating wp-admin's menu. #7773
|
187 |
-
- Fix: Fix calendar not being dismissed when clicking outside. #7714
|
188 |
-
- Fix: fixed warnings when using AdvancedFilters component. #7704
|
189 |
-
- Fix: Fix Tasklist UI illustrations styling #7858
|
190 |
-
- Fix: Revert experiment task titles back to original #7853
|
191 |
-
- Fix: Fix ordering and styling issue with WooCommerce Payments payment method promotion. #7943
|
192 |
-
- Fix: Fix ExPlat PHP client #7926
|
193 |
-
- Fix: Fix marketing extensions tracks #7908
|
194 |
-
- Fix: Ensure homescreen defaults to single column layout. #7969
|
195 |
-
- Add: Add 2col expirement. #7872
|
196 |
-
- Add: Add Avalara to tax task #7874
|
197 |
-
- Add: Added two column experimental task list #7669
|
198 |
-
- Add: Add header cards for all tasks in Tasklist UI experiment #7838
|
199 |
-
- Add: Add onboarding task docs #7762
|
200 |
-
- Update: Add marketing extensions back to onboarding wizard #7831
|
201 |
-
- Update: Add profile notes. #7861
|
202 |
-
- Update: Change CTA text for personalize store task after completion #7852
|
203 |
-
- Update: Increased number of possible items in Recommended Extensions list from 6 to 9 #7887
|
204 |
-
- Update: Refactor data source poller for re-usability. #7671
|
205 |
-
- Update: Reverts addition of Marketplace and My Subscriptions pages to the Marketplace menu. #7902
|
206 |
-
- Update: Update the inbox panel with the new design #7864
|
207 |
-
- Update: Update WC Pay card to include in-person information #7830
|
208 |
-
- Update: Updating navigation link colors #7833
|
209 |
-
- Dev: Add method to check for install status #7808
|
210 |
-
- Dev: Refactor tax task into separate components
|
211 |
-
- Dev: Update the task list to use the new task list REST API #7736
|
212 |
-
- Dev: Remove task status endpoint #7841
|
213 |
-
- Tweak: Add route and layout for unmatched path #7503
|
214 |
-
- Tweak: Avoid caching extended info #7819
|
215 |
-
- Tweak: Minor design update for Marketing task. #7732
|
216 |
-
- Tweak: Remove the Spinner component to prevent undesired page flickering. #7886
|
217 |
-
- Tweak: Use page title Extensions for Marketplace and My Subscriptions pages. #7901
|
218 |
-
- Performance: Only load default tasks during REST requests #7904
|
219 |
-
|
220 |
-
== 2.8.0 11/02/2021 ==
|
221 |
-
|
222 |
-
- Add: Store Profiler and Product task - include Subscriptions #7734
|
223 |
-
- Fix: Fix issue where stock activity panel was not rendering correctly. #7817
|
224 |
-
- Fix: Increase CSS specificity to avoid conflicts and broken panel styling. #7813
|
225 |
-
- Fix: Updated link to WooCommerce Developers Blog in readme.txt #7824
|
226 |
-
- Fix: Fixed navigation menu text color after Gutenberg 11.6.0 #7771
|
227 |
-
- Fix: Add status param to notes/delete/all REST endpoint, to correctly delete all notes. #7743
|
228 |
-
- Fix: Allow already installed marketing extensions to be activated #7740
|
229 |
-
- Fix: Add missing title text for marketing task. #7640
|
230 |
-
- Fix: Assign parent order status as children order status if refund order #7253
|
231 |
-
- Fix: Fix category lookup logic to update children correctly. #7709
|
232 |
-
- Fix: Fixing an unwanted page refresh when using Woo Navigation. #7615
|
233 |
-
- Fix: Fix naming of event names and properties. #7677
|
234 |
-
- Fix: Fix white screen for variation analytic data without a name. #7686
|
235 |
-
- Update: Update back up copy of free extension for Google Listing & Ads plugin. #7798
|
236 |
-
- Update: Update Eway payment gateway capitalization (was eWAY). #7678
|
237 |
-
- Update: Enable Square in France. #7679
|
238 |
-
- Update: Update WC pay supported country list for the default free extensions. #7873
|
239 |
-
- Enhancement: Add experiment for promoting WooCommerce Payments in payment methods table. #7666
|
240 |
-
- Performance: Only load tasks during rest api requests #7856
|
241 |
-
|
242 |
-
== 2.7.2 10/11/2021 ==
|
243 |
-
|
244 |
-
- Fix: Fix analytics crashing on daylight saving #7763
|
245 |
-
|
246 |
-
== 2.7.1 10/01/2021 ==
|
247 |
-
|
248 |
-
- Fix: Allow super admins all capabilities within WooCommerce Admin #7489
|
249 |
-
- Fix: Fix end date for last periods #6584
|
250 |
-
- Fix: Fix up onboarding profiler not working when opted out of tracking #7490
|
251 |
-
- Fix: Making Business Details sticky in onboarding wizard #7426
|
252 |
-
- Fix: Missing RTL for onboarding styles. #7531
|
253 |
-
- Fix: Skip scheduling action if Action Scheduler tables have not been set up #7521
|
254 |
-
- Fix: Update country region typeahead for better autofill support. #7497
|
255 |
-
- Fix: Use installable extensions for local state versus free extensions. #7585
|
256 |
-
- Fix: Fix fatal error and unrelated results in analytics. #7682
|
257 |
-
- Fix: Harden the reports directory #7691
|
258 |
-
- Fix: Update task-item logic to only display content when expanded is true. #7611
|
259 |
-
- Add: Show Pinterest in installed marketing extensions (if installed) #7417
|
260 |
-
- Add: Added MailchimpScheduler that runs daily to subscribe store_email in the profile data #7579
|
261 |
-
- Add: Added shipping plugin recommendations to settings page (#7446).
|
262 |
-
- Add: Adding endpoint to snooze onboarding task #7539
|
263 |
-
- Add: Adding undo snooze task endpoint #7560
|
264 |
-
- Add: Add task dismissal endpoints #7538
|
265 |
-
- Update: Add HK and SG countries to WC Pay intl support. #7558
|
266 |
-
- Update: Create task list REST API endpoint #7512
|
267 |
-
- Update: Deleted OnboardingEmailMarketing note class #7595
|
268 |
-
- Update: Removes the use of the depreciated woocommerce_shared_settings hook. #7480
|
269 |
-
- Update: Removes non WooCommerce Admin specific settings from the `wc_admin` namespace in the `wc/data` settings store (ex countries). #7480
|
270 |
-
- Update: Updating eway logo in payment suggestions defaults #7562
|
271 |
-
- Update: Update marketing task completion logic. #7586
|
272 |
-
- Dev: Add email address field to OBW #7552
|
273 |
-
- Tweak: Add navigation items for the Marketplace menu. #7529
|
274 |
-
- Tweak: Change all analytics strings and labels to sentence case. #6501
|
275 |
-
- Tweak: Delete unneeded double spaces in text strings. #7502
|
276 |
-
- Tweak: Remove the preloaded onboarding options #7338
|
277 |
-
- Tweak: Update analytics card header text styles #6506
|
278 |
-
- Enhancement: Align Table fields with the fallback on isNumeric. #7431
|
279 |
-
|
280 |
-
== 2.6.5 09/22/2021 ==
|
281 |
-
|
282 |
-
- Fix: Add filters to get new hidden options #7698
|
283 |
-
|
284 |
-
== 2.6.4 09/21/2021 ==
|
285 |
|
286 |
- Fix: Use installable extensions for local state versus free extensions. #7585
|
287 |
|
288 |
== 2.6.3 09/21/2021 ==
|
289 |
|
|
|
|
|
|
|
290 |
== 2.6.2 09/14/2021 ==
|
291 |
|
292 |
-
|
|
|
|
|
293 |
|
294 |
- Update: Update marketing task completion logic. #7586
|
295 |
|
@@ -307,8 +29,6 @@
|
|
307 |
- Fix: Fix all links with hash to behind query parameters #7483
|
308 |
- Fix: Fix Stats module CSS issue introduced by Gutenberg #7488
|
309 |
- Fix: Fix marketing task visibility #7580
|
310 |
-
- Fix: Fix stats-overview card padding issue #7594
|
311 |
-
- Fix: Fix layout issue on marketing task #7598
|
312 |
- Add: Add boolean isReverseTrend prop to SummaryNumber to show "positive" delta for negative numbers. #7357
|
313 |
- Add: Adding links to help panel for marketing task #7384
|
314 |
- Add: Add installed marketing extensions card to extensions task #7419
|
@@ -316,7 +36,7 @@
|
|
316 |
- Add: Add tracks to marketing manage button click #7467
|
317 |
- Add: Add default marketing extensions as fallbacks #7466
|
318 |
- Add: Add marketing task completion check and tests #7451
|
319 |
-
- Add
|
320 |
- Update: Add locale param as part of free extensions request #7391
|
321 |
- Update: Increase per_page value for search results on the Analytics pages. #7385
|
322 |
- Update: Removing grow section from local free extensions in OBW #7386
|
@@ -329,25 +49,16 @@
|
|
329 |
- Tweak: Refactor on payment settings recommendations eligibility component for reuse. #7447
|
330 |
- Tweak: Register wc-admin page for all users and handle authorization in client #7285
|
331 |
|
332 |
-
== 2.5.
|
333 |
-
|
334 |
-
- Fix: Fix blank screen by setting a default value #7506
|
335 |
-
|
336 |
-
== 2.5.0 08/09/2021 ==
|
337 |
|
338 |
- Add: Add a delete option to completed tasks #7300
|
339 |
- Add: Add unit tests around extended payment gateway controller #7133
|
340 |
- Add: Add payment gateway suggestion unit tests #7142
|
341 |
-
- Add: Add TableSummaryPlaceholder to support skeleton loading #7294
|
342 |
- Add: Feature toggle to disable Analytics UI #7168
|
343 |
- Add: Hook reference slotFill support #6833
|
344 |
- Add: Adding tests for PaymentGatewaySuggestions > List component #7201
|
345 |
-
- Add: Remote Inbox feature setting toggle #7298
|
346 |
- Dev: Add `woocommerce_admin_export_id` filter for customizing the export file name #7178
|
347 |
-
- Dev: Allow packages to be build independently, fix commonjs module builds. #7286
|
348 |
-
- Dev: Point the changelog linter to updated changelog entry location #7318
|
349 |
- Dev: Remove old payment gateway task components #7224
|
350 |
-
- Fix: Attribute filter bug with "any X" variations. #7046
|
351 |
- Fix: Currency display on Orders activity card on homescreen #7181
|
352 |
- Fix: Fix obsolete key property in gateway defaults #7229
|
353 |
- Fix: Fixing button state logic for remote payment gateways #7200
|
@@ -355,7 +66,7 @@
|
|
355 |
- Fix: Include onboarding settings on the analytic pages #7109
|
356 |
- Fix: Load Analytics API only when feature is turned on #7193
|
357 |
- Fix: Localize string for description #7219
|
358 |
-
- Fix: Filters
|
359 |
- Fix: Use saved form values if available when switching tabs #7226
|
360 |
- Fix: Skip schedule customer data deletion on site deletion #7214
|
361 |
- Fix: WCPay not working in local payments task #7151
|
@@ -370,43 +81,23 @@
|
|
370 |
- Fix: Fix missing translation strings for CES #7270
|
371 |
- Fix: Add missing translation strings in the business features section #7268
|
372 |
- Fix: Fix inbox note dismiss dropdown not closing on Safari #7278
|
373 |
-
- Fix: Fixed OBW Business details style #7353
|
374 |
-
- Fix: Fix links on the dismiss dropdown are not clickable #7342
|
375 |
-
- Fix: Fix undefined method error when setting up WC Tax #7344
|
376 |
-
- Fix: Invalidate task status when enabling a payment gateway #7330
|
377 |
-
- Fix: Redirect to homescreen after payment gateway setup #7332
|
378 |
- Fix: Create workable defaults for Reports that don’t have AdvancedFilters #7186
|
379 |
-
-
|
380 |
-
- Fix: Set default value for performanceIndicators variable #7343
|
381 |
-
- Fix: Add limit clause to coupons data store query #7399
|
382 |
-
- Fix: Fix analytics filter Gutenberg CSS conflict #7410
|
383 |
-
- Fix: Fix Gutenberg CardBody styles for task card #7411
|
384 |
-
- Fix: Fix orders panel not displaying any orders when analytics is disabled #7395
|
385 |
-
- Fix: Fix recommended card Gutenberg CSS conflict #7409
|
386 |
-
- Fix: Update tooltip styling to fix new Gutenberg updates. #7414
|
387 |
-
- Fix: Allow super admins all capabilities within WooCommerce Admin #7489
|
388 |
-
- Fix: Fix analytics overview re-arrangement on initial load. #7475
|
389 |
-
- Fix: Fixes action button mis-alignment within card footer. #7412
|
390 |
-
- Fix: Fix up onboarding profiler not working when opted out of tracking #7490
|
391 |
- Tweak: Remove performance indicators when Analytics Flag disabled #7234
|
392 |
- Tweak: Change event name when installing Google Listings and Ads. #7276
|
393 |
- Tweak: Removed unused feature flags #7233 and #7273
|
394 |
-
- Tweak: Render a spinner while woocommerce_setup_jetpack_opted_in is being loaded #7269
|
395 |
- Tweak: Repurpose disable wc-admin filter to remove optional features #7232
|
396 |
-
- Update: Add additional countries to WCPay for business features and payment task fallback #7436
|
397 |
- Update: Notes to use a date range. #7222
|
398 |
-
- Update: Remove facebook extension from onboarding extensions fallback list #7287
|
399 |
-
- Performance: Add lazy loading by checking panel open status #7379
|
400 |
|
401 |
-
== 2.4.4
|
402 |
|
403 |
- Fix: Fix homepage stock panel regression in 2.4.3. #7389
|
404 |
|
405 |
-
== 2.4.3
|
406 |
|
407 |
- Fix: Add a new low stock products endpoint to improve the performance. #7377
|
408 |
|
409 |
-
== 2.4.2
|
410 |
|
411 |
- Fix: Add lazy loading by checking panel open status #7376
|
412 |
- Fix: Add cache-control header to low stock REST API response #7364
|
@@ -485,8 +176,8 @@
|
|
485 |
- Fix: Multiple preload tag output bug. #6998
|
486 |
- Fix: Call existing filters for leaderboards in analytics. #6626
|
487 |
- Fix: Set target to blank for the external links #6999
|
488 |
-
- Fix
|
489 |
-
- Fix
|
490 |
- Fix: Deprecated warnings from select control @wordpress/data-controls. #7007
|
491 |
- Fix: Bug with Orders Report coupon exclusion filter. #7021
|
492 |
- Fix: Show Google Listing and Ads in installed marketing extensions section. #7029
|
1 |
+
== 2.6.4 09/21/2021 ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
- Fix: Use installable extensions for local state versus free extensions. #7585
|
4 |
|
5 |
== 2.6.3 09/21/2021 ==
|
6 |
|
7 |
+
- Fix unsecured reports
|
8 |
+
- Fix fatal error and unrelated results in analytics. #7682
|
9 |
+
|
10 |
== 2.6.2 09/14/2021 ==
|
11 |
|
12 |
+
- Fix Update task-item logic to only display content when expanded is true. #7611
|
13 |
+
|
14 |
+
== 2.6.1 09/01/2021 ==
|
15 |
|
16 |
- Update: Update marketing task completion logic. #7586
|
17 |
|
29 |
- Fix: Fix all links with hash to behind query parameters #7483
|
30 |
- Fix: Fix Stats module CSS issue introduced by Gutenberg #7488
|
31 |
- Fix: Fix marketing task visibility #7580
|
|
|
|
|
32 |
- Add: Add boolean isReverseTrend prop to SummaryNumber to show "positive" delta for negative numbers. #7357
|
33 |
- Add: Adding links to help panel for marketing task #7384
|
34 |
- Add: Add installed marketing extensions card to extensions task #7419
|
36 |
- Add: Add tracks to marketing manage button click #7467
|
37 |
- Add: Add default marketing extensions as fallbacks #7466
|
38 |
- Add: Add marketing task completion check and tests #7451
|
39 |
+
- Add navigation items for the Marketplace menu. #7529
|
40 |
- Update: Add locale param as part of free extensions request #7391
|
41 |
- Update: Increase per_page value for search results on the Analytics pages. #7385
|
42 |
- Update: Removing grow section from local free extensions in OBW #7386
|
49 |
- Tweak: Refactor on payment settings recommendations eligibility component for reuse. #7447
|
50 |
- Tweak: Register wc-admin page for all users and handle authorization in client #7285
|
51 |
|
52 |
+
== 2.5.0 07/08/2021 ==
|
|
|
|
|
|
|
|
|
53 |
|
54 |
- Add: Add a delete option to completed tasks #7300
|
55 |
- Add: Add unit tests around extended payment gateway controller #7133
|
56 |
- Add: Add payment gateway suggestion unit tests #7142
|
|
|
57 |
- Add: Feature toggle to disable Analytics UI #7168
|
58 |
- Add: Hook reference slotFill support #6833
|
59 |
- Add: Adding tests for PaymentGatewaySuggestions > List component #7201
|
|
|
60 |
- Dev: Add `woocommerce_admin_export_id` filter for customizing the export file name #7178
|
|
|
|
|
61 |
- Dev: Remove old payment gateway task components #7224
|
|
|
62 |
- Fix: Currency display on Orders activity card on homescreen #7181
|
63 |
- Fix: Fix obsolete key property in gateway defaults #7229
|
64 |
- Fix: Fixing button state logic for remote payment gateways #7200
|
66 |
- Fix: Include onboarding settings on the analytic pages #7109
|
67 |
- Fix: Load Analytics API only when feature is turned on #7193
|
68 |
- Fix: Localize string for description #7219
|
69 |
+
- Fix: Filters: On update respect all other queries, not just persistedQueries #7155
|
70 |
- Fix: Use saved form values if available when switching tabs #7226
|
71 |
- Fix: Skip schedule customer data deletion on site deletion #7214
|
72 |
- Fix: WCPay not working in local payments task #7151
|
81 |
- Fix: Fix missing translation strings for CES #7270
|
82 |
- Fix: Add missing translation strings in the business features section #7268
|
83 |
- Fix: Fix inbox note dismiss dropdown not closing on Safari #7278
|
|
|
|
|
|
|
|
|
|
|
84 |
- Fix: Create workable defaults for Reports that don’t have AdvancedFilters #7186
|
85 |
+
- Sync the category lookup table when a new category gets created #7290
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
- Tweak: Remove performance indicators when Analytics Flag disabled #7234
|
87 |
- Tweak: Change event name when installing Google Listings and Ads. #7276
|
88 |
- Tweak: Removed unused feature flags #7233 and #7273
|
|
|
89 |
- Tweak: Repurpose disable wc-admin filter to remove optional features #7232
|
|
|
90 |
- Update: Notes to use a date range. #7222
|
|
|
|
|
91 |
|
92 |
+
== 2.4.4 7/21/2021 ==
|
93 |
|
94 |
- Fix: Fix homepage stock panel regression in 2.4.3. #7389
|
95 |
|
96 |
+
== 2.4.3 7/21/2021 ==
|
97 |
|
98 |
- Fix: Add a new low stock products endpoint to improve the performance. #7377
|
99 |
|
100 |
+
== 2.4.2 7/19/2021 ==
|
101 |
|
102 |
- Fix: Add lazy loading by checking panel open status #7376
|
103 |
- Fix: Add cache-control header to low stock REST API response #7364
|
176 |
- Fix: Multiple preload tag output bug. #6998
|
177 |
- Fix: Call existing filters for leaderboards in analytics. #6626
|
178 |
- Fix: Set target to blank for the external links #6999
|
179 |
+
- Fix style regression with the Chart header. #7002
|
180 |
+
- Fix styling of the advanced filter operator selection. #7005
|
181 |
- Fix: Deprecated warnings from select control @wordpress/data-controls. #7007
|
182 |
- Fix: Bug with Orders Report coupon exclusion filter. #7021
|
183 |
- Fix: Show Google Listing and Ads in installed marketing extensions section. #7029
|
dist/activity-panels-help/style-rtl.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-layout__activity-panel-header{height:50px;background:#e0e0e0;padding:16px;display:flex;justify-content:space-between;align-items:center}@media(min-width:783px){.woocommerce-layout__activity-panel-header{padding:16px 24px}}.woocommerce-layout__activity-panel-header h3{font-size:13px;font-weight:600;line-height:16px;margin:0;padding:0}.woocommerce-layout__activity-panel-header .woocommerce-ellipsis-menu__toggle.components-button:not(:disabled):not([aria-disabled=true]):focus,.woocommerce-layout__activity-panel-header .woocommerce-ellipsis-menu__toggle.components-button:not(:disabled):not([aria-disabled=true]):hover{box-shadow:none;border-radius:10px;background:#ccc}.woocommerce-layout__inbox-title{color:#1e1e1e;display:flex;align-items:center}.woocommerce-layout__inbox-subtitle{color:#757575}.woocommerce-layout__inbox-badge{margin-right:6px;background-color:#757575;border-radius:13px;padding:0 6px;color:#fff;display:inline-block;text-align:center;vertical-align:top}
|
|
dist/activity-panels-inbox/style-rtl.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-layout__activity-panel-content .woocommerce-abbreviated-notifications{border-top:1px solid #e0e0e0}.woocommerce-layout__activity-panel-content .woocommerce-abbreviated-notifications>div{border:none;margin-bottom:0}.woocommerce-layout__activity-panel-content .woocommerce-abbreviated-notifications .woocommerce-abbreviated-notification h3{color:#007cba;color:var(--wp-admin-theme-color);font-weight:700;font-size:14px}.woocommerce-layout__activity-panel-content .woocommerce-abbreviated-notifications .woocommerce-abbreviated-notification div,.woocommerce-layout__activity-panel-content .woocommerce-abbreviated-notifications .woocommerce-abbreviated-notification p{color:#757575}.woocommerce-layout__activity-panel-content .woocommerce-abbreviated-notifications .woocommerce-abbreviated-notification .woocommerce-abbreviated-card__content{padding:12px 0 12px 24px}.woocommerce-layout__activity-panel-content .woocommerce-abbreviated-notifications .woocommerce-abbreviated-notification .woocommerce-abbreviated-card__content>:not(:first-child){margin-top:4px}
|
|
dist/analytics-report-categories/style-rtl.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-table__product-categories>.woocommerce-table__breadcrumbs{display:inline-block;margin-left:12px}.woocommerce-table__product-categories .components-popover__content{padding:0 16px;text-align:right}.woocommerce-table__product-categories .components-popover__content .woocommerce-table__breadcrumbs{margin-top:12px;margin-bottom:12px}
|
|
dist/analytics-report-customers/style-rtl.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-report-table__scroll-point{position:relative;top:-48px}@media(max-width:782px){.woocommerce-report-table__scroll-point{top:-62px}}.woocommerce-feature-enabled-activity-panels .woocommerce-report-table__scroll-point{top:-108px}@media(max-width:782px){.woocommerce-feature-enabled-activity-panels .woocommerce-report-table__scroll-point{top:-122px}}.woocommerce-report-table .woocommerce-search{flex-grow:1}.woocommerce-report-table .components-card__header{display:grid;grid-gap:12px;grid-template-columns:min-content 1fr min-content}.woocommerce-report-table .woocommerce-table__compare.components-button{padding:8px}.woocommerce-report-table .woocommerce-ellipsis-menu{justify-self:flex-end}button.woocommerce-table__download-button{padding:6px 12px;color:#000;text-decoration:none;align-items:center}button.woocommerce-table__download-button svg{margin-left:8px;height:24px;width:24px}@media(max-width:782px){button.woocommerce-table__download-button svg{margin-left:0}button.woocommerce-table__download-button .woocommerce-table__download-button__label{display:none}}
|
|
dist/analytics-report-orders/style-rtl.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-orders-table__status{flex-direction:row-reverse}.woocommerce-orders-table__status .woocommerce-order-status__indicator{margin-left:0;margin-right:8px}
|
|
dist/analytics-report-products/style-rtl.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-table__product-categories>.woocommerce-table__breadcrumbs{display:inline-block;margin-left:12px}.woocommerce-table__product-categories .components-popover__content{padding:0 16px;text-align:right}.woocommerce-table__product-categories .components-popover__content .woocommerce-table__breadcrumbs{margin-top:12px;margin-bottom:12px}
|
|
dist/analytics-report-stock/style-rtl.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-report-table__scroll-point{position:relative;top:-48px}@media(max-width:782px){.woocommerce-report-table__scroll-point{top:-62px}}.woocommerce-feature-enabled-activity-panels .woocommerce-report-table__scroll-point{top:-108px}@media(max-width:782px){.woocommerce-feature-enabled-activity-panels .woocommerce-report-table__scroll-point{top:-122px}}.woocommerce-report-table .woocommerce-search{flex-grow:1}.woocommerce-report-table .components-card__header{display:grid;grid-gap:12px;grid-template-columns:min-content 1fr min-content}.woocommerce-report-table .woocommerce-table__compare.components-button{padding:8px}.woocommerce-report-table .woocommerce-ellipsis-menu{justify-self:flex-end}button.woocommerce-table__download-button{padding:6px 12px;color:#000;text-decoration:none;align-items:center}button.woocommerce-table__download-button svg{margin-left:8px;height:24px;width:24px}@media(max-width:782px){button.woocommerce-table__download-button svg{margin-left:0}button.woocommerce-table__download-button .woocommerce-table__download-button__label{display:none}}
|
|
dist/analytics-report/style-rtl.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-analytics__table-placeholder .woocommerce-card__body{padding:0}.woocommerce-analytics__table-placeholder .woocommerce-table__table{margin-bottom:0}.woocommerce-analytics__table-placeholder .woocommerce-table__table tr:last-child{border-bottom-style:none}
|
|
dist/analytics-settings/style-rtl.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
@media(min-width:783px){.woocommerce-settings__wrapper{padding:0 13px}}.woocommerce-settings__actions{margin-bottom:40px}@media(min-width:1281px){.woocommerce-settings__actions{margin-right:15%}}.woocommerce-settings__actions button{margin-left:16px}.woocommerce-setting{display:flex;margin-bottom:24px}@media(max-width:1280px){.woocommerce-setting{flex-direction:column}}.woocommerce-setting__label{font-size:16px;font-size:1rem;margin-bottom:16px;padding-left:16px;font-weight:700}@media(min-width:1281px){.woocommerce-setting__label{width:15%}}.woocommerce-setting__input{display:flex;flex-direction:column}@media(min-width:1281px){.woocommerce-setting__input{width:35%}.woocommerce-setting__input .woocommerce-filters-filter{width:100%}}.woocommerce-setting__input label{width:100%;display:block;margin-bottom:12px;color:#757575}.woocommerce-setting__input .woocommerce-filters-filter label{margin-bottom:0}.woocommerce-setting__input button:not(.components-tab-panel__tabs-item){margin-bottom:12px;align-self:flex-start}.woocommerce-setting__input .components-base-control__field{display:flex}.woocommerce-setting__input .woocommerce-filters-date__content-controls{padding-bottom:0}.woocommerce-setting__options-group-label{display:block;font-weight:700;margin-bottom:12px}.woocommerce-setting__help{font-style:italic;color:#757575}:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922}.woocommerce-settings-historical-data__columns{display:grid;grid-column-gap:24px;grid-template-columns:calc(50% - 12px) calc(50% - 12px)}.woocommerce-settings-historical-data__columns .woocommerce-settings-historical-data__column{align-self:end;margin-top:12px}.woocommerce-settings-historical-data__columns .woocommerce-settings-historical-data__column:first-child{grid-column-start:1;grid-column-end:2;grid-row-start:1;grid-row-end:2}.woocommerce-settings-historical-data__columns .woocommerce-settings-historical-data__column:nth-child(2){grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:2}@media(max-width:960px){.woocommerce-settings-historical-data__columns{grid-template-columns:100%}.woocommerce-settings-historical-data__columns .woocommerce-settings-historical-data__column:first-child{grid-column-start:1;grid-column-end:2;grid-row-start:1;grid-row-end:2}.woocommerce-settings-historical-data__columns .woocommerce-settings-historical-data__column:nth-child(2){grid-column-start:1;grid-column-end:2;grid-row-start:2;grid-row-end:3}}.woocommerce-settings-historical-data__columns .components-base-control__label,.woocommerce-settings-historical-data__columns .woocommerce-settings-historical-data__column-label{margin-bottom:12px}.woocommerce-settings-historical-data__columns .components-select-control__input{height:38px;padding:8px 2px}.woocommerce-settings-historical-data__columns .components-base-control__field{margin-bottom:0}.woocommerce-settings-historical-data__skip-checkbox{margin-top:24px}.woocommerce-settings-historical-data__skip-checkbox>.components-base-control__field{margin-bottom:0}.woocommerce-settings-historical-data__skip-checkbox>.components-base-control__field>.components-checkbox-control__label{display:inline-block;margin-bottom:0;width:auto}.woocommerce-settings-historical-data__progress-label{display:inline-block;font-weight:700;margin-bottom:12px;margin-top:24px}.woocommerce-settings-historical-data__progress-label+.woocommerce-settings-historical-data__progress-label{margin-right:.25em}.woocommerce-settings-historical-data__progress-bar{-webkit-appearance:none;appearance:none;border:0;height:8px;width:100%;background-color:#c4c4c4}.woocommerce-settings-historical-data__progress-bar::-moz-progress-bar{background-color:#0085ba}.woocommerce-settings-historical-data__progress-bar::-webkit-progress-bar{background-color:#c4c4c4}.woocommerce-settings-historical-data__progress-bar::-webkit-progress-value{background-color:#0085ba}.woocommerce-settings-historical-data__status{display:block;font-weight:700;margin-top:24px}.woocommerce-settings-historical-data__status>.components-spinner{float:none;height:12px;margin-right:6px;margin-left:6px;width:12px}.woocommerce-settings-historical-data__status>.components-spinner:before{right:2px;height:3px;top:2px;transform-origin:4px 4px;width:3px}.woocommerce-settings-historical-data__actions{align-items:center;display:flex}
|
|
dist/app/index.js
CHANGED
@@ -52,7 +52,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
52 |
/******/
|
53 |
/******/ // script path function
|
54 |
/******/ function webpackJsonpScriptSrc(chunkId) {
|
55 |
-
/******/ return __webpack_require__.p + "chunks/" + ({"4":"activity-panels-help","5":"activity-panels-inbox","6":"analytics-report","7":"analytics-report-categories","8":"analytics-report-coupons","9":"analytics-report-customers","10":"analytics-report-downloads","11":"analytics-report-orders","12":"analytics-report-products","13":"analytics-report-revenue","14":"analytics-report-stock","15":"analytics-report-taxes","16":"analytics-report-variations","17":"analytics-settings","24":"customizable-dashboard","25":"dashboard","26":"dashboard-charts","31":"homescreen","32":"leaderboards","34":"marketing-overview","
|
56 |
/******/ }
|
57 |
/******/
|
58 |
/******/ function jsonpScriptSrc(chunkId) {
|
@@ -95,11 +95,11 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
95 |
/******/
|
96 |
/******/
|
97 |
/******/ // mini-css-extract-plugin CSS loading
|
98 |
-
/******/ var cssChunks = {"0":1,"
|
99 |
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
|
100 |
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
|
101 |
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
|
102 |
-
/******/ var href =
|
103 |
/******/ var fullhref = __webpack_require__.p + href;
|
104 |
/******/ var existingLinkTags = document.getElementsByTagName("link");
|
105 |
/******/ for(var i = 0; i < existingLinkTags.length; i++) {
|
@@ -259,7 +259,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
259 |
/******/
|
260 |
/******/
|
261 |
/******/ // Load entry module and return exports
|
262 |
-
/******/ return __webpack_require__(__webpack_require__.s =
|
263 |
/******/ })
|
264 |
/************************************************************************/
|
265 |
/******/ ({
|
@@ -284,7 +284,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
284 |
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
285 |
// By explicitly using `prop-types` you are opting into new production behavior.
|
286 |
// http://fb.me/prop-types-in-prod
|
287 |
-
module.exports = __webpack_require__(
|
288 |
}
|
289 |
|
290 |
|
@@ -297,14 +297,23 @@ if (false) { var throwOnDirectAccess, ReactIs; } else {
|
|
297 |
|
298 |
/***/ }),
|
299 |
|
300 |
-
/***/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
302 |
|
303 |
"use strict";
|
304 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return REVIEW_PAGE_LIMIT; });
|
305 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return unapprovedReviewsQuery; });
|
306 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getUnapprovedReviews; });
|
307 |
-
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
308 |
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_0__);
|
309 |
/**
|
310 |
* External dependencies
|
@@ -338,12 +347,80 @@ function getUnapprovedReviews(select) {
|
|
338 |
|
339 |
/***/ }),
|
340 |
|
341 |
-
/***/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
343 |
|
344 |
"use strict";
|
345 |
-
|
346 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
/**
|
348 |
* WordPress dependencies
|
349 |
*/
|
@@ -361,77 +438,63 @@ function getUnapprovedReviews(select) {
|
|
361 |
*/
|
362 |
|
363 |
function Icon(_ref) {
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
return Object(
|
370 |
width: size,
|
371 |
-
height: size
|
372 |
-
|
373 |
-
});
|
374 |
}
|
375 |
|
376 |
-
/* harmony default export */ __webpack_exports__["a"] = (Icon);
|
377 |
//# sourceMappingURL=index.js.map
|
378 |
|
379 |
/***/ }),
|
380 |
|
381 |
-
/***/
|
382 |
-
/***/ (function(module, exports, __webpack_require__) {
|
383 |
-
|
384 |
-
"use strict";
|
385 |
-
|
386 |
-
|
387 |
-
if (true) {
|
388 |
-
module.exports = __webpack_require__(131);
|
389 |
-
} else {}
|
390 |
-
|
391 |
-
|
392 |
-
/***/ }),
|
393 |
-
|
394 |
-
/***/ 11:
|
395 |
/***/ (function(module, exports) {
|
396 |
|
397 |
-
(function() { module.exports = window["
|
398 |
|
399 |
/***/ }),
|
400 |
|
401 |
-
/***/
|
402 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
403 |
|
404 |
"use strict";
|
405 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
406 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
407 |
-
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
408 |
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);
|
409 |
-
/* harmony import */ var
|
410 |
-
/* harmony import */ var
|
411 |
-
/* harmony import */ var
|
412 |
/**
|
413 |
* External dependencies
|
414 |
*/
|
415 |
|
416 |
|
417 |
|
|
|
|
|
|
|
418 |
/**
|
419 |
* Internal dependencies
|
420 |
*/
|
421 |
|
422 |
-
|
423 |
-
const
|
424 |
-
const
|
425 |
-
const
|
426 |
-
const
|
427 |
-
const
|
428 |
-
const
|
429 |
-
const
|
430 |
-
const
|
431 |
-
const
|
432 |
-
const CustomersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(() => __webpack_require__.e(/* import() | analytics-report-customers */ 9).then(__webpack_require__.bind(null, 504)));
|
433 |
-
const manageStock = Object(_utils_admin_settings__WEBPACK_IMPORTED_MODULE_3__[/* getAdminSetting */ "d"])('manageStock', 'no');
|
434 |
-
const REPORTS_FILTER = 'woocommerce_admin_reports_list';
|
435 |
/* harmony default export */ __webpack_exports__["a"] = (() => {
|
436 |
const reports = [{
|
437 |
report: 'revenue',
|
@@ -501,3860 +564,3193 @@ const REPORTS_FILTER = 'woocommerce_admin_reports_list';
|
|
501 |
id: 'woocommerce-analytics-downloads'
|
502 |
}
|
503 |
}].filter(Boolean);
|
504 |
-
/**
|
505 |
-
* An object defining a report page.
|
506 |
-
*
|
507 |
-
* @typedef {Object} report
|
508 |
-
* @property {string} report Report slug.
|
509 |
-
* @property {string} title Report title.
|
510 |
-
* @property {Node} component React Component to render.
|
511 |
-
* @property {Object} navArgs Arguments supplied to WooCommerce Navigation.
|
512 |
-
*/
|
513 |
-
|
514 |
-
/**
|
515 |
-
* Filter Report pages list.
|
516 |
-
*
|
517 |
-
* @filter woocommerce_admin_reports_list
|
518 |
-
* @param {Array.<report>} reports Report pages list.
|
519 |
-
*/
|
520 |
-
|
521 |
return Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__["applyFilters"])(REPORTS_FILTER, reports);
|
522 |
});
|
523 |
|
524 |
/***/ }),
|
525 |
|
526 |
-
/***/
|
527 |
-
/***/ (function(module,
|
528 |
|
529 |
"use strict";
|
530 |
-
/* unused harmony export BailSignal */
|
531 |
-
/* unused harmony export Controller */
|
532 |
-
/* unused harmony export FrameValue */
|
533 |
-
/* unused harmony export Interpolation */
|
534 |
-
/* unused harmony export Spring */
|
535 |
-
/* unused harmony export SpringContext */
|
536 |
-
/* unused harmony export SpringRef */
|
537 |
-
/* unused harmony export SpringValue */
|
538 |
-
/* unused harmony export Trail */
|
539 |
-
/* unused harmony export Transition */
|
540 |
-
/* unused harmony export config */
|
541 |
-
/* unused harmony export easings */
|
542 |
-
/* unused harmony export inferTo */
|
543 |
-
/* unused harmony export interpolate */
|
544 |
-
/* unused harmony export to */
|
545 |
-
/* unused harmony export update */
|
546 |
-
/* unused harmony export useChain */
|
547 |
-
/* unused harmony export useSpring */
|
548 |
-
/* unused harmony export useSpringRef */
|
549 |
-
/* unused harmony export useSprings */
|
550 |
-
/* unused harmony export useTrail */
|
551 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useTransition", function() { return useTransition; });
|
552 |
-
/* harmony import */ var _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
553 |
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Globals", function() { return _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__["b"]; });
|
554 |
-
|
555 |
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
|
556 |
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
557 |
-
/* harmony import */ var _react_spring_animated__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33);
|
558 |
-
/* harmony import */ var _react_spring_types_animated__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(174);
|
559 |
-
/* harmony import */ var _react_spring_types_animated__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_react_spring_types_animated__WEBPACK_IMPORTED_MODULE_3__);
|
560 |
-
/* harmony import */ var _react_spring_types_interpolation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(175);
|
561 |
-
/* harmony import */ var _react_spring_types_interpolation__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_react_spring_types_interpolation__WEBPACK_IMPORTED_MODULE_4__);
|
562 |
-
|
563 |
|
564 |
|
|
|
565 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
566 |
|
|
|
|
|
|
|
|
|
|
|
567 |
|
568 |
|
|
|
|
|
569 |
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
574 |
|
575 |
-
|
576 |
-
|
577 |
-
target[key] = source[key];
|
578 |
-
}
|
579 |
}
|
580 |
}
|
581 |
|
582 |
-
|
583 |
-
};
|
584 |
|
585 |
-
|
586 |
-
|
|
|
587 |
|
588 |
-
|
589 |
-
|
590 |
-
}
|
591 |
-
const matchProp = (value, key) => value === true || !!(key && value && (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].fun(value) ? value(key) : Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* toArray */ "y"])(value).includes(key)));
|
592 |
-
const resolveProp = (prop, key) => _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].obj(prop) ? key && prop[key] : prop;
|
593 |
-
const getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : undefined;
|
594 |
|
595 |
-
|
|
|
596 |
|
597 |
-
|
598 |
-
|
599 |
|
600 |
-
|
601 |
-
|
602 |
-
|
|
|
|
|
|
|
603 |
}
|
604 |
|
605 |
-
|
|
|
606 |
|
607 |
-
|
608 |
-
const value = transform(props[key], key);
|
609 |
|
610 |
-
if (!_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(value)) {
|
611 |
-
defaults[key] = value;
|
612 |
-
}
|
613 |
-
}
|
614 |
|
615 |
-
|
616 |
-
};
|
617 |
-
const DEFAULT_PROPS = ['config', 'onProps', 'onStart', 'onChange', 'onPause', 'onResume', 'onRest'];
|
618 |
-
const RESERVED_PROPS = {
|
619 |
-
config: 1,
|
620 |
-
from: 1,
|
621 |
-
to: 1,
|
622 |
-
ref: 1,
|
623 |
-
loop: 1,
|
624 |
-
reset: 1,
|
625 |
-
pause: 1,
|
626 |
-
cancel: 1,
|
627 |
-
reverse: 1,
|
628 |
-
immediate: 1,
|
629 |
-
default: 1,
|
630 |
-
delay: 1,
|
631 |
-
onProps: 1,
|
632 |
-
onStart: 1,
|
633 |
-
onChange: 1,
|
634 |
-
onPause: 1,
|
635 |
-
onResume: 1,
|
636 |
-
onRest: 1,
|
637 |
-
onResolve: 1,
|
638 |
-
items: 1,
|
639 |
-
trail: 1,
|
640 |
-
sort: 1,
|
641 |
-
expires: 1,
|
642 |
-
initial: 1,
|
643 |
-
enter: 1,
|
644 |
-
update: 1,
|
645 |
-
leave: 1,
|
646 |
-
children: 1,
|
647 |
-
onDestroyed: 1,
|
648 |
-
keys: 1,
|
649 |
-
callId: 1,
|
650 |
-
parentId: 1
|
651 |
-
};
|
652 |
|
653 |
-
|
654 |
-
|
655 |
-
let count = 0;
|
656 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* eachProp */ "l"])(props, (value, prop) => {
|
657 |
-
if (!RESERVED_PROPS[prop]) {
|
658 |
-
forward[prop] = value;
|
659 |
-
count++;
|
660 |
-
}
|
661 |
-
});
|
662 |
|
663 |
-
|
664 |
-
return forward;
|
665 |
-
}
|
666 |
-
}
|
667 |
|
668 |
-
|
669 |
-
|
|
|
|
|
670 |
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
};
|
675 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* eachProp */ "l"])(props, (val, key) => key in to || (out[key] = val));
|
676 |
-
return out;
|
677 |
-
}
|
678 |
|
679 |
-
|
680 |
-
|
681 |
-
function computeGoal(value) {
|
682 |
-
value = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* getFluidValue */ "q"])(value);
|
683 |
-
return _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].arr(value) ? value.map(computeGoal) : Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* isAnimatedString */ "t"])(value) ? _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* Globals */ "b"].createStringInterpolator({
|
684 |
-
range: [0, 1],
|
685 |
-
output: [value, value]
|
686 |
-
})(1) : value;
|
687 |
-
}
|
688 |
-
function hasProps(props) {
|
689 |
-
for (const _ in props) return true;
|
690 |
|
691 |
-
|
692 |
-
|
693 |
-
function isAsyncTo(to) {
|
694 |
-
return _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].fun(to) || _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].arr(to) && _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].obj(to[0]);
|
695 |
-
}
|
696 |
-
function detachRefs(ctrl, ref) {
|
697 |
-
var _ctrl$ref;
|
698 |
|
699 |
-
|
700 |
-
|
701 |
-
}
|
702 |
-
function replaceRef(ctrl, ref) {
|
703 |
-
if (ref && ctrl.ref !== ref) {
|
704 |
-
var _ctrl$ref2;
|
705 |
|
706 |
-
|
707 |
-
|
708 |
-
ctrl.ref = ref;
|
709 |
-
}
|
710 |
-
}
|
711 |
|
712 |
-
|
713 |
-
|
714 |
-
if (timeSteps) {
|
715 |
-
let prevDelay = 0;
|
716 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(refs, (ref, i) => {
|
717 |
-
const controllers = ref.current;
|
718 |
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(controllers, ctrl => {
|
723 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(ctrl.queue, props => {
|
724 |
-
const memoizedDelayProp = props.delay;
|
725 |
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
ref.start();
|
730 |
-
}
|
731 |
-
});
|
732 |
-
} else {
|
733 |
-
let p = Promise.resolve();
|
734 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(refs, ref => {
|
735 |
-
const controllers = ref.current;
|
736 |
-
|
737 |
-
if (controllers.length) {
|
738 |
-
const queues = controllers.map(ctrl => {
|
739 |
-
const q = ctrl.queue;
|
740 |
-
ctrl.queue = [];
|
741 |
-
return q;
|
742 |
-
});
|
743 |
-
p = p.then(() => {
|
744 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(controllers, (ctrl, i) => Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(queues[i] || [], update => ctrl.queue.push(update)));
|
745 |
-
return Promise.all(ref.start());
|
746 |
-
});
|
747 |
-
}
|
748 |
-
});
|
749 |
-
}
|
750 |
-
});
|
751 |
-
}
|
752 |
|
753 |
-
|
754 |
-
|
755 |
-
tension: 170,
|
756 |
-
friction: 26
|
757 |
-
},
|
758 |
-
gentle: {
|
759 |
-
tension: 120,
|
760 |
-
friction: 14
|
761 |
-
},
|
762 |
-
wobbly: {
|
763 |
-
tension: 180,
|
764 |
-
friction: 12
|
765 |
-
},
|
766 |
-
stiff: {
|
767 |
-
tension: 210,
|
768 |
-
friction: 20
|
769 |
-
},
|
770 |
-
slow: {
|
771 |
-
tension: 280,
|
772 |
-
friction: 60
|
773 |
-
},
|
774 |
-
molasses: {
|
775 |
-
tension: 280,
|
776 |
-
friction: 120
|
777 |
-
}
|
778 |
-
};
|
779 |
-
const c1 = 1.70158;
|
780 |
-
const c2 = c1 * 1.525;
|
781 |
-
const c3 = c1 + 1;
|
782 |
-
const c4 = 2 * Math.PI / 3;
|
783 |
-
const c5 = 2 * Math.PI / 4.5;
|
784 |
-
|
785 |
-
const bounceOut = x => {
|
786 |
-
const n1 = 7.5625;
|
787 |
-
const d1 = 2.75;
|
788 |
-
|
789 |
-
if (x < 1 / d1) {
|
790 |
-
return n1 * x * x;
|
791 |
-
} else if (x < 2 / d1) {
|
792 |
-
return n1 * (x -= 1.5 / d1) * x + 0.75;
|
793 |
-
} else if (x < 2.5 / d1) {
|
794 |
-
return n1 * (x -= 2.25 / d1) * x + 0.9375;
|
795 |
-
} else {
|
796 |
-
return n1 * (x -= 2.625 / d1) * x + 0.984375;
|
797 |
-
}
|
798 |
-
};
|
799 |
-
|
800 |
-
const easings = {
|
801 |
-
linear: x => x,
|
802 |
-
easeInQuad: x => x * x,
|
803 |
-
easeOutQuad: x => 1 - (1 - x) * (1 - x),
|
804 |
-
easeInOutQuad: x => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
|
805 |
-
easeInCubic: x => x * x * x,
|
806 |
-
easeOutCubic: x => 1 - Math.pow(1 - x, 3),
|
807 |
-
easeInOutCubic: x => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
|
808 |
-
easeInQuart: x => x * x * x * x,
|
809 |
-
easeOutQuart: x => 1 - Math.pow(1 - x, 4),
|
810 |
-
easeInOutQuart: x => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
|
811 |
-
easeInQuint: x => x * x * x * x * x,
|
812 |
-
easeOutQuint: x => 1 - Math.pow(1 - x, 5),
|
813 |
-
easeInOutQuint: x => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
|
814 |
-
easeInSine: x => 1 - Math.cos(x * Math.PI / 2),
|
815 |
-
easeOutSine: x => Math.sin(x * Math.PI / 2),
|
816 |
-
easeInOutSine: x => -(Math.cos(Math.PI * x) - 1) / 2,
|
817 |
-
easeInExpo: x => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
|
818 |
-
easeOutExpo: x => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
|
819 |
-
easeInOutExpo: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,
|
820 |
-
easeInCirc: x => 1 - Math.sqrt(1 - Math.pow(x, 2)),
|
821 |
-
easeOutCirc: x => Math.sqrt(1 - Math.pow(x - 1, 2)),
|
822 |
-
easeInOutCirc: x => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,
|
823 |
-
easeInBack: x => c3 * x * x * x - c1 * x * x,
|
824 |
-
easeOutBack: x => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
|
825 |
-
easeInOutBack: x => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
|
826 |
-
easeInElastic: x => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
|
827 |
-
easeOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
|
828 |
-
easeInOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,
|
829 |
-
easeInBounce: x => 1 - bounceOut(1 - x),
|
830 |
-
easeOutBounce: bounceOut,
|
831 |
-
easeInOutBounce: x => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2
|
832 |
-
};
|
833 |
-
|
834 |
-
const defaults = _extends({}, config.default, {
|
835 |
-
mass: 1,
|
836 |
-
damping: 1,
|
837 |
-
easing: easings.linear,
|
838 |
-
clamp: false
|
839 |
-
});
|
840 |
-
|
841 |
-
class AnimationConfig {
|
842 |
-
constructor() {
|
843 |
-
this.tension = void 0;
|
844 |
-
this.friction = void 0;
|
845 |
-
this.frequency = void 0;
|
846 |
-
this.damping = void 0;
|
847 |
-
this.mass = void 0;
|
848 |
-
this.velocity = 0;
|
849 |
-
this.restVelocity = void 0;
|
850 |
-
this.precision = void 0;
|
851 |
-
this.progress = void 0;
|
852 |
-
this.duration = void 0;
|
853 |
-
this.easing = void 0;
|
854 |
-
this.clamp = void 0;
|
855 |
-
this.bounce = void 0;
|
856 |
-
this.decay = void 0;
|
857 |
-
this.round = void 0;
|
858 |
-
Object.assign(this, defaults);
|
859 |
-
}
|
860 |
-
|
861 |
-
}
|
862 |
-
function mergeConfig(config, newConfig, defaultConfig) {
|
863 |
-
if (defaultConfig) {
|
864 |
-
defaultConfig = _extends({}, defaultConfig);
|
865 |
-
sanitizeConfig(defaultConfig, newConfig);
|
866 |
-
newConfig = _extends({}, defaultConfig, newConfig);
|
867 |
-
}
|
868 |
-
|
869 |
-
sanitizeConfig(config, newConfig);
|
870 |
-
Object.assign(config, newConfig);
|
871 |
-
|
872 |
-
for (const key in defaults) {
|
873 |
-
if (config[key] == null) {
|
874 |
-
config[key] = defaults[key];
|
875 |
-
}
|
876 |
-
}
|
877 |
-
|
878 |
-
let {
|
879 |
-
mass,
|
880 |
-
frequency,
|
881 |
-
damping
|
882 |
-
} = config;
|
883 |
-
|
884 |
-
if (!_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(frequency)) {
|
885 |
-
if (frequency < 0.01) frequency = 0.01;
|
886 |
-
if (damping < 0) damping = 0;
|
887 |
-
config.tension = Math.pow(2 * Math.PI / frequency, 2) * mass;
|
888 |
-
config.friction = 4 * Math.PI * damping * mass / frequency;
|
889 |
-
}
|
890 |
|
891 |
-
|
892 |
-
|
893 |
|
894 |
-
|
895 |
-
|
896 |
-
config.duration = undefined;
|
897 |
-
} else {
|
898 |
-
const isTensionConfig = !_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(props.tension) || !_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(props.friction);
|
899 |
|
900 |
-
|
901 |
-
|
902 |
-
config.decay = undefined;
|
903 |
-
}
|
904 |
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
}
|
909 |
-
}
|
910 |
|
911 |
-
|
912 |
-
|
913 |
-
constructor() {
|
914 |
-
this.changed = false;
|
915 |
-
this.values = emptyArray;
|
916 |
-
this.toValues = null;
|
917 |
-
this.fromValues = emptyArray;
|
918 |
-
this.to = void 0;
|
919 |
-
this.from = void 0;
|
920 |
-
this.config = new AnimationConfig();
|
921 |
-
this.immediate = false;
|
922 |
-
}
|
923 |
|
924 |
-
|
|
|
925 |
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
defaultProps,
|
930 |
-
state,
|
931 |
-
actions
|
932 |
-
}) {
|
933 |
-
return new Promise((resolve, reject) => {
|
934 |
-
var _props$cancel;
|
935 |
|
936 |
-
|
937 |
-
let timeout;
|
938 |
-
let cancel = matchProp((_props$cancel = props.cancel) != null ? _props$cancel : defaultProps == null ? void 0 : defaultProps.cancel, key);
|
939 |
|
940 |
-
if (cancel) {
|
941 |
-
onStart();
|
942 |
-
} else {
|
943 |
-
if (!_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(props.pause)) {
|
944 |
-
state.paused = matchProp(props.pause, key);
|
945 |
-
}
|
946 |
|
947 |
-
let pause = defaultProps == null ? void 0 : defaultProps.pause;
|
948 |
|
949 |
-
if (pause !== true) {
|
950 |
-
pause = state.paused || matchProp(pause, key);
|
951 |
-
}
|
952 |
|
953 |
-
delay = callProp(props.delay || 0, key);
|
954 |
|
955 |
-
if (pause) {
|
956 |
-
state.resumeQueue.add(onResume);
|
957 |
-
actions.pause();
|
958 |
-
} else {
|
959 |
-
actions.resume();
|
960 |
-
onResume();
|
961 |
-
}
|
962 |
-
}
|
963 |
|
964 |
-
function onPause() {
|
965 |
-
state.resumeQueue.add(onResume);
|
966 |
-
state.timeouts.delete(timeout);
|
967 |
-
timeout.cancel();
|
968 |
-
delay = timeout.time - _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* raf */ "w"].now();
|
969 |
-
}
|
970 |
|
971 |
-
function onResume() {
|
972 |
-
if (delay > 0 && !_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* Globals */ "b"].skipAnimation) {
|
973 |
-
state.delayed = true;
|
974 |
-
timeout = _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* raf */ "w"].setTimeout(onStart, delay);
|
975 |
-
state.pauseQueue.add(onPause);
|
976 |
-
state.timeouts.add(timeout);
|
977 |
-
} else {
|
978 |
-
onStart();
|
979 |
-
}
|
980 |
-
}
|
981 |
|
982 |
-
function onStart() {
|
983 |
-
if (state.delayed) {
|
984 |
-
state.delayed = false;
|
985 |
-
}
|
986 |
|
987 |
-
state.pauseQueue.delete(onPause);
|
988 |
-
state.timeouts.delete(timeout);
|
989 |
|
990 |
-
if (callId <= (state.cancelId || 0)) {
|
991 |
-
cancel = true;
|
992 |
-
}
|
993 |
|
994 |
-
try {
|
995 |
-
actions.start(_extends({}, props, {
|
996 |
-
callId,
|
997 |
-
cancel
|
998 |
-
}), resolve);
|
999 |
-
} catch (err) {
|
1000 |
-
reject(err);
|
1001 |
-
}
|
1002 |
-
}
|
1003 |
-
});
|
1004 |
-
}
|
1005 |
|
1006 |
-
const getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some(result => result.cancelled) ? getCancelledResult(target.get()) : results.every(result => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every(result => result.finished));
|
1007 |
-
const getNoopResult = value => ({
|
1008 |
-
value,
|
1009 |
-
noop: true,
|
1010 |
-
finished: true,
|
1011 |
-
cancelled: false
|
1012 |
-
});
|
1013 |
-
const getFinishedResult = (value, finished, cancelled = false) => ({
|
1014 |
-
value,
|
1015 |
-
finished,
|
1016 |
-
cancelled
|
1017 |
-
});
|
1018 |
-
const getCancelledResult = value => ({
|
1019 |
-
value,
|
1020 |
-
cancelled: true,
|
1021 |
-
finished: false
|
1022 |
-
});
|
1023 |
|
1024 |
-
|
1025 |
-
const {
|
1026 |
-
callId,
|
1027 |
-
parentId,
|
1028 |
-
onRest
|
1029 |
-
} = props;
|
1030 |
-
const {
|
1031 |
-
asyncTo: prevTo,
|
1032 |
-
promise: prevPromise
|
1033 |
-
} = state;
|
1034 |
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
|
|
|
|
1038 |
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
const defaultProps = getDefaultProps(props, (value, key) => key === 'onRest' ? undefined : value);
|
1043 |
-
let preventBail;
|
1044 |
-
let bail;
|
1045 |
-
const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject));
|
1046 |
|
1047 |
-
|
1048 |
-
const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false);
|
1049 |
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
};
|
1056 |
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
return (async () => {
|
1061 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* Globals */ "b"].skipAnimation) {
|
1062 |
-
stopAsync(state);
|
1063 |
-
skipAnimationSignal.result = getFinishedResult(target, false);
|
1064 |
-
bail(skipAnimationSignal);
|
1065 |
-
throw skipAnimationSignal;
|
1066 |
-
}
|
1067 |
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
});
|
1072 |
-
props.parentId = callId;
|
1073 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* eachProp */ "l"])(defaultProps, (value, key) => {
|
1074 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(props[key])) {
|
1075 |
-
props[key] = value;
|
1076 |
-
}
|
1077 |
-
});
|
1078 |
-
const result = await target.start(props);
|
1079 |
-
bailIfEnded(bailSignal);
|
1080 |
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
}
|
1086 |
|
1087 |
-
|
1088 |
-
|
|
|
|
|
|
|
|
|
1089 |
};
|
|
|
1090 |
|
1091 |
-
|
|
|
1092 |
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
}
|
|
|
|
|
|
|
|
|
1097 |
|
1098 |
-
|
1099 |
-
|
1100 |
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
}
|
1110 |
-
|
1111 |
-
await Promise.all([animating.then(preventBail), bailPromise]);
|
1112 |
-
result = getFinishedResult(target.get(), true, false);
|
1113 |
-
} catch (err) {
|
1114 |
-
if (err instanceof BailSignal) {
|
1115 |
-
result = err.result;
|
1116 |
-
} else if (err instanceof SkipAniamtionSignal) {
|
1117 |
-
result = err.result;
|
1118 |
-
} else {
|
1119 |
-
throw err;
|
1120 |
-
}
|
1121 |
-
} finally {
|
1122 |
-
if (callId == state.asyncId) {
|
1123 |
-
state.asyncId = parentId;
|
1124 |
-
state.asyncTo = parentId ? prevTo : undefined;
|
1125 |
-
state.promise = parentId ? prevPromise : undefined;
|
1126 |
-
}
|
1127 |
-
}
|
1128 |
-
|
1129 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].fun(onRest)) {
|
1130 |
-
_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* raf */ "w"].batchedUpdates(() => {
|
1131 |
-
onRest(result, target, target.item);
|
1132 |
});
|
1133 |
}
|
1134 |
|
1135 |
-
return
|
1136 |
-
})();
|
1137 |
-
}
|
1138 |
-
function stopAsync(state, cancelId) {
|
1139 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* flush */ "m"])(state.timeouts, t => t.cancel());
|
1140 |
-
state.pauseQueue.clear();
|
1141 |
-
state.resumeQueue.clear();
|
1142 |
-
state.asyncId = state.asyncTo = state.promise = undefined;
|
1143 |
-
if (cancelId) state.cancelId = cancelId;
|
1144 |
-
}
|
1145 |
-
class BailSignal extends Error {
|
1146 |
-
constructor() {
|
1147 |
-
super('An async animation has been interrupted. You see this error because you ' + 'forgot to use `await` or `.catch(...)` on its returned promise.');
|
1148 |
-
this.result = void 0;
|
1149 |
-
}
|
1150 |
-
|
1151 |
-
}
|
1152 |
-
class SkipAniamtionSignal extends Error {
|
1153 |
-
constructor() {
|
1154 |
-
super('SkipAnimationSignal');
|
1155 |
-
this.result = void 0;
|
1156 |
-
}
|
1157 |
-
|
1158 |
-
}
|
1159 |
-
|
1160 |
-
const isFrameValue = value => value instanceof FrameValue;
|
1161 |
-
let nextId$1 = 1;
|
1162 |
-
class FrameValue extends _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* FluidValue */ "a"] {
|
1163 |
-
constructor(...args) {
|
1164 |
-
super(...args);
|
1165 |
-
this.id = nextId$1++;
|
1166 |
-
this.key = void 0;
|
1167 |
-
this._priority = 0;
|
1168 |
}
|
1169 |
|
1170 |
-
|
1171 |
-
return this._priority;
|
1172 |
-
}
|
1173 |
|
1174 |
-
|
1175 |
-
|
1176 |
-
this._priority = priority;
|
1177 |
|
1178 |
-
|
|
|
|
|
|
|
1179 |
}
|
1180 |
-
}
|
1181 |
-
|
1182 |
-
get() {
|
1183 |
-
const node = Object(_react_spring_animated__WEBPACK_IMPORTED_MODULE_2__[/* getAnimated */ "e"])(this);
|
1184 |
-
return node && node.getValue();
|
1185 |
-
}
|
1186 |
-
|
1187 |
-
to(...args) {
|
1188 |
-
return _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* Globals */ "b"].to(this, args);
|
1189 |
-
}
|
1190 |
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
}
|
1195 |
|
1196 |
-
|
1197 |
-
return
|
1198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1199 |
|
1200 |
-
|
1201 |
-
|
1202 |
-
}
|
1203 |
|
1204 |
-
|
1205 |
-
if (count == 0) this._detach();
|
1206 |
-
}
|
1207 |
|
1208 |
-
|
|
|
|
|
1209 |
|
1210 |
-
|
|
|
|
|
|
|
1211 |
|
1212 |
-
|
1213 |
-
|
1214 |
-
type: 'change',
|
1215 |
-
parent: this,
|
1216 |
-
value,
|
1217 |
-
idle
|
1218 |
-
});
|
1219 |
-
}
|
1220 |
|
1221 |
-
|
1222 |
-
|
1223 |
-
_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* frameLoop */ "o"].sort(this);
|
1224 |
}
|
1225 |
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
priority
|
1230 |
-
});
|
1231 |
}
|
1232 |
|
1233 |
-
|
1234 |
-
|
1235 |
-
const $P = Symbol.for('SpringPhase');
|
1236 |
-
const HAS_ANIMATED = 1;
|
1237 |
-
const IS_ANIMATING = 2;
|
1238 |
-
const IS_PAUSED = 4;
|
1239 |
-
const hasAnimated = target => (target[$P] & HAS_ANIMATED) > 0;
|
1240 |
-
const isAnimating = target => (target[$P] & IS_ANIMATING) > 0;
|
1241 |
-
const isPaused = target => (target[$P] & IS_PAUSED) > 0;
|
1242 |
-
const setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING;
|
1243 |
-
const setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED;
|
1244 |
-
|
1245 |
-
class SpringValue extends FrameValue {
|
1246 |
-
constructor(arg1, arg2) {
|
1247 |
-
super();
|
1248 |
-
this.key = void 0;
|
1249 |
-
this.animation = new Animation();
|
1250 |
-
this.queue = void 0;
|
1251 |
-
this.defaultProps = {};
|
1252 |
-
this._state = {
|
1253 |
-
paused: false,
|
1254 |
-
delayed: false,
|
1255 |
-
pauseQueue: new Set(),
|
1256 |
-
resumeQueue: new Set(),
|
1257 |
-
timeouts: new Set()
|
1258 |
-
};
|
1259 |
-
this._pendingCalls = new Set();
|
1260 |
-
this._lastCallId = 0;
|
1261 |
-
this._lastToId = 0;
|
1262 |
-
this._memoizedDuration = 0;
|
1263 |
-
|
1264 |
-
if (!_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(arg1) || !_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(arg2)) {
|
1265 |
-
const props = _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].obj(arg1) ? _extends({}, arg1) : _extends({}, arg2, {
|
1266 |
-
from: arg1
|
1267 |
-
});
|
1268 |
-
|
1269 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(props.default)) {
|
1270 |
-
props.default = true;
|
1271 |
-
}
|
1272 |
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
|
|
|
|
|
|
1276 |
|
1277 |
-
|
1278 |
-
|
1279 |
-
}
|
1280 |
|
1281 |
-
|
1282 |
-
return Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* getFluidValue */ "q"])(this.animation.to);
|
1283 |
-
}
|
1284 |
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
|
1290 |
-
|
1291 |
-
return
|
1292 |
}
|
1293 |
|
1294 |
-
|
1295 |
-
return isAnimating(this);
|
1296 |
-
}
|
1297 |
|
1298 |
-
|
1299 |
-
|
1300 |
-
}
|
1301 |
|
1302 |
-
|
1303 |
-
|
1304 |
-
}
|
1305 |
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
const anim = this.animation;
|
1310 |
-
let {
|
1311 |
-
config,
|
1312 |
-
toValues
|
1313 |
-
} = anim;
|
1314 |
-
const payload = Object(_react_spring_animated__WEBPACK_IMPORTED_MODULE_2__[/* getPayload */ "g"])(anim.to);
|
1315 |
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
|
1320 |
-
|
1321 |
-
|
1322 |
-
const to = node.constructor == _react_spring_animated__WEBPACK_IMPORTED_MODULE_2__[/* AnimatedString */ "b"] ? 1 : payload ? payload[i].lastPosition : toValues[i];
|
1323 |
-
let finished = anim.immediate;
|
1324 |
-
let position = to;
|
1325 |
|
1326 |
-
|
1327 |
-
|
|
|
1328 |
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1332 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1333 |
|
1334 |
-
|
1335 |
-
const from = anim.fromValues[i];
|
1336 |
-
const v0 = node.v0 != null ? node.v0 : node.v0 = _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].arr(config.velocity) ? config.velocity[i] : config.velocity;
|
1337 |
-
let velocity;
|
1338 |
|
1339 |
-
|
1340 |
-
|
|
|
1341 |
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
}
|
1351 |
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
|
|
1356 |
|
1357 |
-
position = from + config.easing(p) * (to - from);
|
1358 |
-
velocity = (position - node.lastPosition) / dt;
|
1359 |
-
finished = p == 1;
|
1360 |
-
} else if (config.decay) {
|
1361 |
-
const decay = config.decay === true ? 0.998 : config.decay;
|
1362 |
-
const e = Math.exp(-(1 - decay) * elapsed);
|
1363 |
-
position = from + v0 / (1 - decay) * (1 - e);
|
1364 |
-
finished = Math.abs(node.lastPosition - position) < 0.1;
|
1365 |
-
velocity = v0 * e;
|
1366 |
-
} else {
|
1367 |
-
velocity = node.lastVelocity == null ? v0 : node.lastVelocity;
|
1368 |
-
const precision = config.precision || (from == to ? 0.005 : Math.min(1, Math.abs(to - from) * 0.001));
|
1369 |
-
const restVelocity = config.restVelocity || precision / 10;
|
1370 |
-
const bounceFactor = config.clamp ? 0 : config.bounce;
|
1371 |
-
const canBounce = !_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(bounceFactor);
|
1372 |
-
const isGrowing = from == to ? node.v0 > 0 : from < to;
|
1373 |
-
let isMoving;
|
1374 |
-
let isBouncing = false;
|
1375 |
-
const step = 1;
|
1376 |
-
const numSteps = Math.ceil(dt / step);
|
1377 |
-
|
1378 |
-
for (let n = 0; n < numSteps; ++n) {
|
1379 |
-
isMoving = Math.abs(velocity) > restVelocity;
|
1380 |
-
|
1381 |
-
if (!isMoving) {
|
1382 |
-
finished = Math.abs(to - position) <= precision;
|
1383 |
-
|
1384 |
-
if (finished) {
|
1385 |
-
break;
|
1386 |
-
}
|
1387 |
-
}
|
1388 |
|
1389 |
-
|
1390 |
-
|
|
|
|
|
1391 |
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
}
|
1396 |
-
}
|
1397 |
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
position = position + velocity * step;
|
1403 |
-
}
|
1404 |
-
}
|
1405 |
|
1406 |
-
|
|
|
|
|
1407 |
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1413 |
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
|
|
1417 |
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
|
|
1423 |
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
|
|
|
|
|
|
|
|
1427 |
});
|
1428 |
-
|
1429 |
-
|
1430 |
|
1431 |
-
|
1432 |
-
const finalVal = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* getFluidValue */ "q"])(anim.to);
|
1433 |
|
1434 |
-
|
1435 |
-
|
|
|
1436 |
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1441 |
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
}
|
1446 |
}
|
1447 |
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
|
1454 |
-
this._set(value);
|
1455 |
-
});
|
1456 |
-
return this;
|
1457 |
-
}
|
1458 |
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
});
|
1463 |
}
|
1464 |
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
}
|
1469 |
}
|
1470 |
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
|
|
|
|
|
|
|
|
1487 |
|
1488 |
-
|
1489 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1490 |
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
return this;
|
1495 |
-
}
|
1496 |
|
1497 |
-
|
1498 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1499 |
|
1500 |
-
if (!_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(to)) {
|
1501 |
-
queue = [_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].obj(to) ? to : _extends({}, arg2, {
|
1502 |
-
to
|
1503 |
-
})];
|
1504 |
-
} else {
|
1505 |
-
queue = this.queue || [];
|
1506 |
-
this.queue = [];
|
1507 |
-
}
|
1508 |
|
1509 |
-
|
1510 |
-
|
|
|
|
|
1511 |
|
1512 |
-
|
1513 |
-
|
1514 |
}
|
1515 |
|
1516 |
-
|
1517 |
-
const {
|
1518 |
-
to
|
1519 |
-
} = this.animation;
|
1520 |
-
|
1521 |
-
this._focus(this.get());
|
1522 |
|
1523 |
-
|
1524 |
-
|
1525 |
-
return this;
|
1526 |
-
}
|
1527 |
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
this.priority = event.priority + 1;
|
1539 |
-
}
|
1540 |
-
}
|
1541 |
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
} = props;
|
1548 |
-
to = _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].obj(to) ? to[key] : to;
|
1549 |
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
|
1554 |
-
|
|
|
|
|
|
|
|
|
1555 |
|
1556 |
-
|
1557 |
-
|
1558 |
-
}
|
1559 |
|
1560 |
-
|
1561 |
-
to,
|
1562 |
-
from
|
1563 |
-
};
|
1564 |
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
|
1576 |
-
|
1577 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1578 |
|
1579 |
-
|
1580 |
-
|
|
|
1581 |
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1589 |
|
1590 |
-
|
|
|
1591 |
|
1592 |
-
|
1593 |
-
|
1594 |
}
|
1595 |
|
1596 |
-
|
1597 |
-
return scheduleProps(++this._lastCallId, {
|
1598 |
-
key,
|
1599 |
-
props,
|
1600 |
-
defaultProps,
|
1601 |
-
state,
|
1602 |
-
actions: {
|
1603 |
-
pause: () => {
|
1604 |
-
if (!isPaused(this)) {
|
1605 |
-
setPausedBit(this, true);
|
1606 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* flushCalls */ "n"])(state.pauseQueue);
|
1607 |
-
sendEvent(this, 'onPause', getFinishedResult(this, checkFinished(this, this.animation.to)), this);
|
1608 |
-
}
|
1609 |
-
},
|
1610 |
-
resume: () => {
|
1611 |
-
if (isPaused(this)) {
|
1612 |
-
setPausedBit(this, false);
|
1613 |
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
},
|
1622 |
-
start: this._merge.bind(this, range)
|
1623 |
-
}
|
1624 |
-
}).then(result => {
|
1625 |
-
if (props.loop && result.finished && !(isLoop && result.noop)) {
|
1626 |
-
const nextProps = createLoopUpdate(props);
|
1627 |
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
}
|
1632 |
|
1633 |
-
|
1634 |
-
|
|
|
|
|
|
|
1635 |
}
|
1636 |
|
1637 |
-
|
1638 |
-
if (props.cancel) {
|
1639 |
-
this.stop(true);
|
1640 |
-
return resolve(getCancelledResult(this));
|
1641 |
-
}
|
1642 |
|
1643 |
-
|
1644 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1645 |
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
|
|
|
|
1653 |
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1667 |
|
1668 |
-
|
1669 |
-
|
1670 |
-
}
|
1671 |
|
1672 |
-
|
1673 |
-
const hasFromChanged = !Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* isEqual */ "u"])(from, prevFrom);
|
1674 |
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
|
1679 |
-
|
1680 |
-
|
|
|
|
|
1681 |
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
|
1686 |
-
|
1687 |
-
const {
|
1688 |
-
config
|
1689 |
-
} = anim;
|
1690 |
-
const {
|
1691 |
-
decay,
|
1692 |
-
velocity
|
1693 |
-
} = config;
|
1694 |
|
1695 |
-
|
1696 |
-
|
1697 |
-
}
|
1698 |
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
|
|
|
|
|
|
|
|
1702 |
|
1703 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1704 |
|
1705 |
-
|
1706 |
-
|
1707 |
-
}
|
1708 |
|
1709 |
-
|
1710 |
-
const value = reset ? from : this.get();
|
1711 |
-
const goal = computeGoal(to);
|
1712 |
-
const isAnimatable = _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].num(goal) || _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].arr(goal) || Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* isAnimatedString */ "t"])(goal);
|
1713 |
-
const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key));
|
1714 |
|
1715 |
-
|
1716 |
-
|
|
|
1717 |
|
1718 |
-
|
1719 |
-
|
1720 |
-
node = this._set(goal);
|
1721 |
-
} else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests`);
|
1722 |
-
}
|
1723 |
-
}
|
1724 |
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
|
1729 |
-
|
1730 |
-
|
|
|
|
|
|
|
|
|
|
|
1731 |
|
1732 |
-
|
1733 |
-
|
1734 |
-
started = !finished;
|
1735 |
-
}
|
1736 |
|
1737 |
-
|
1738 |
-
started = true;
|
1739 |
-
}
|
1740 |
-
}
|
1741 |
|
1742 |
-
|
1743 |
-
|
1744 |
-
started = true;
|
1745 |
-
} else if (!started) {
|
1746 |
-
this._stop(prevTo);
|
1747 |
-
}
|
1748 |
-
}
|
1749 |
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
anim.toValues = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* hasFluidValue */ "r"])(to) ? null : goalType == _react_spring_animated__WEBPACK_IMPORTED_MODULE_2__[/* AnimatedString */ "b"] ? [1] : Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* toArray */ "y"])(goal);
|
1754 |
-
}
|
1755 |
|
1756 |
-
|
1757 |
-
|
|
|
|
|
1758 |
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
const result = getFinishedResult(this, checkFinished(this, prevTo));
|
1770 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* flushCalls */ "n"])(this._pendingCalls, result);
|
1771 |
|
1772 |
-
|
|
|
|
|
|
|
1773 |
|
1774 |
-
|
1775 |
-
anim.changed = !reset;
|
1776 |
-
onRest == null ? void 0 : onRest(result, this);
|
1777 |
|
1778 |
-
if (reset) {
|
1779 |
-
callProp(defaultProps.onRest, result);
|
1780 |
-
} else {
|
1781 |
-
anim.onStart == null ? void 0 : anim.onStart(result, this);
|
1782 |
-
}
|
1783 |
-
});
|
1784 |
-
}
|
1785 |
-
}
|
1786 |
|
1787 |
-
|
1788 |
-
this._set(value);
|
1789 |
-
}
|
1790 |
|
1791 |
-
|
1792 |
-
|
1793 |
-
} else if (started) {
|
1794 |
-
this._start();
|
1795 |
-
} else if (isAnimating(this) && !hasToChanged) {
|
1796 |
-
this._pendingCalls.add(resolve);
|
1797 |
-
} else {
|
1798 |
-
resolve(getNoopResult(value));
|
1799 |
-
}
|
1800 |
-
}
|
1801 |
|
1802 |
-
|
1803 |
-
|
1804 |
|
1805 |
-
|
1806 |
-
|
1807 |
-
this._detach();
|
1808 |
-
}
|
1809 |
|
1810 |
-
|
|
|
1811 |
|
1812 |
-
|
1813 |
-
|
1814 |
-
}
|
1815 |
-
}
|
1816 |
-
}
|
1817 |
|
1818 |
-
|
1819 |
-
|
1820 |
-
const {
|
1821 |
-
to
|
1822 |
-
} = this.animation;
|
1823 |
|
1824 |
-
|
1825 |
-
|
1826 |
|
1827 |
-
|
1828 |
-
|
1829 |
-
}
|
1830 |
-
}
|
1831 |
|
1832 |
-
|
1833 |
-
|
1834 |
|
1835 |
-
|
1836 |
-
|
1837 |
-
to
|
1838 |
-
} = this.animation;
|
1839 |
|
1840 |
-
|
1841 |
-
|
1842 |
-
}
|
1843 |
-
}
|
1844 |
|
1845 |
-
|
1846 |
-
|
1847 |
|
1848 |
-
|
1849 |
-
|
1850 |
|
1851 |
-
|
1852 |
-
|
1853 |
|
1854 |
-
|
1855 |
-
Object(_react_spring_animated__WEBPACK_IMPORTED_MODULE_2__[/* setAnimated */ "h"])(this, nodeType.create(value));
|
1856 |
-
} else {
|
1857 |
-
oldNode.setValue(value);
|
1858 |
-
}
|
1859 |
|
1860 |
-
if (oldNode) {
|
1861 |
-
_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* raf */ "w"].batchedUpdates(() => {
|
1862 |
-
this._onChange(value, idle);
|
1863 |
-
});
|
1864 |
-
}
|
1865 |
-
}
|
1866 |
-
}
|
1867 |
|
1868 |
-
|
1869 |
-
|
|
|
1870 |
|
1871 |
-
_onStart() {
|
1872 |
-
const anim = this.animation;
|
1873 |
|
1874 |
-
if (!anim.changed) {
|
1875 |
-
anim.changed = true;
|
1876 |
-
sendEvent(this, 'onStart', getFinishedResult(this, checkFinished(this, anim.to)), this);
|
1877 |
-
}
|
1878 |
-
}
|
1879 |
|
1880 |
-
_onChange(value, idle) {
|
1881 |
-
if (!idle) {
|
1882 |
-
this._onStart();
|
1883 |
|
1884 |
-
callProp(this.animation.onChange, value, this);
|
1885 |
-
}
|
1886 |
|
1887 |
-
callProp(this.defaultProps.onChange, value, this);
|
1888 |
|
1889 |
-
super._onChange(value, idle);
|
1890 |
-
}
|
1891 |
-
|
1892 |
-
_start() {
|
1893 |
-
const anim = this.animation;
|
1894 |
-
Object(_react_spring_animated__WEBPACK_IMPORTED_MODULE_2__[/* getAnimated */ "e"])(this).reset(Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* getFluidValue */ "q"])(anim.to));
|
1895 |
|
1896 |
-
if (!anim.immediate) {
|
1897 |
-
anim.fromValues = anim.values.map(node => node.lastPosition);
|
1898 |
-
}
|
1899 |
|
1900 |
-
|
1901 |
-
|
|
|
1902 |
|
1903 |
-
if (!isPaused(this)) {
|
1904 |
-
this._resume();
|
1905 |
-
}
|
1906 |
-
}
|
1907 |
-
}
|
1908 |
|
1909 |
-
_resume() {
|
1910 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* Globals */ "b"].skipAnimation) {
|
1911 |
-
this.finish();
|
1912 |
-
} else {
|
1913 |
-
_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* frameLoop */ "o"].start(this);
|
1914 |
-
}
|
1915 |
-
}
|
1916 |
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1924 |
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1928 |
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
});
|
1933 |
-
const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal != null ? goal : anim.to));
|
1934 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* flushCalls */ "n"])(this._pendingCalls, result);
|
1935 |
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
}
|
1941 |
}
|
1942 |
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
if (loopRet) {
|
1955 |
-
const overrides = loopRet !== true && inferTo(loopRet);
|
1956 |
-
const reverse = (overrides || props).reverse;
|
1957 |
-
const reset = !overrides || overrides.reset;
|
1958 |
-
return createUpdate(_extends({}, props, {
|
1959 |
-
loop,
|
1960 |
-
default: false,
|
1961 |
-
pause: undefined,
|
1962 |
-
to: !reverse || isAsyncTo(to) ? to : undefined,
|
1963 |
-
from: reset ? props.from : undefined,
|
1964 |
-
reset
|
1965 |
-
}, overrides));
|
1966 |
}
|
1967 |
-
}
|
1968 |
-
function createUpdate(props) {
|
1969 |
-
const {
|
1970 |
-
to,
|
1971 |
-
from
|
1972 |
-
} = props = inferTo(props);
|
1973 |
-
const keys = new Set();
|
1974 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].obj(to)) findDefined(to, keys);
|
1975 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].obj(from)) findDefined(from, keys);
|
1976 |
-
props.keys = keys.size ? Array.from(keys) : null;
|
1977 |
-
return props;
|
1978 |
-
}
|
1979 |
-
function declareUpdate(props) {
|
1980 |
-
const update = createUpdate(props);
|
1981 |
|
1982 |
-
if (
|
1983 |
-
|
|
|
|
|
|
|
|
|
|
|
1984 |
}
|
1985 |
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
|
|
|
|
1994 |
|
1995 |
-
|
1996 |
-
|
1997 |
-
}
|
1998 |
|
1999 |
-
|
2000 |
-
|
|
|
|
|
|
|
|
|
2001 |
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
|
|
|
|
|
|
|
|
2005 |
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
constructor(props, flush) {
|
2010 |
-
this.id = nextId++;
|
2011 |
-
this.springs = {};
|
2012 |
-
this.queue = [];
|
2013 |
-
this.ref = void 0;
|
2014 |
-
this._flush = void 0;
|
2015 |
-
this._initialProps = void 0;
|
2016 |
-
this._lastAsyncId = 0;
|
2017 |
-
this._active = new Set();
|
2018 |
-
this._changed = new Set();
|
2019 |
-
this._started = false;
|
2020 |
-
this._item = void 0;
|
2021 |
-
this._state = {
|
2022 |
-
paused: false,
|
2023 |
-
pauseQueue: new Set(),
|
2024 |
-
resumeQueue: new Set(),
|
2025 |
-
timeouts: new Set()
|
2026 |
-
};
|
2027 |
-
this._events = {
|
2028 |
-
onStart: new Map(),
|
2029 |
-
onChange: new Map(),
|
2030 |
-
onRest: new Map()
|
2031 |
-
};
|
2032 |
-
this._onFrame = this._onFrame.bind(this);
|
2033 |
|
2034 |
-
if (
|
2035 |
-
|
|
|
|
|
2036 |
}
|
2037 |
|
2038 |
-
if (props) {
|
2039 |
-
|
2040 |
-
default: true
|
2041 |
-
}, props));
|
2042 |
}
|
2043 |
}
|
2044 |
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2053 |
}
|
2054 |
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2058 |
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
|
|
|
|
|
|
2064 |
|
2065 |
-
|
2066 |
-
for (const key in values) {
|
2067 |
-
const value = values[key];
|
2068 |
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
}
|
2073 |
}
|
|
|
2074 |
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
|
|
2079 |
|
2080 |
-
return this;
|
2081 |
-
}
|
2082 |
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2087 |
|
2088 |
-
|
2089 |
-
|
2090 |
-
} else {
|
2091 |
-
this.queue = [];
|
2092 |
-
}
|
2093 |
|
2094 |
-
if (
|
2095 |
-
|
|
|
|
|
|
|
2096 |
}
|
2097 |
-
|
2098 |
-
prepareKeys(this, queue);
|
2099 |
-
return flushUpdateQueue(this, queue);
|
2100 |
}
|
2101 |
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
|
|
|
|
2106 |
|
2107 |
-
|
2108 |
-
|
2109 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* toArray */ "y"])(keys), key => springs[key].stop(!!arg));
|
2110 |
-
} else {
|
2111 |
-
stopAsync(this._state, this._lastAsyncId);
|
2112 |
-
this.each(spring => spring.stop(!!arg));
|
2113 |
-
}
|
2114 |
|
2115 |
-
|
2116 |
-
|
2117 |
|
2118 |
-
|
2119 |
-
|
2120 |
-
this.start({
|
2121 |
-
pause: true
|
2122 |
-
});
|
2123 |
-
} else {
|
2124 |
-
const springs = this.springs;
|
2125 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* toArray */ "y"])(keys), key => springs[key].pause());
|
2126 |
-
}
|
2127 |
|
2128 |
-
|
2129 |
-
|
2130 |
|
2131 |
-
|
2132 |
-
|
2133 |
-
this.start({
|
2134 |
-
pause: false
|
2135 |
-
});
|
2136 |
-
} else {
|
2137 |
-
const springs = this.springs;
|
2138 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* toArray */ "y"])(keys), key => springs[key].resume());
|
2139 |
-
}
|
2140 |
|
2141 |
-
|
2142 |
-
|
2143 |
|
2144 |
-
|
2145 |
-
|
2146 |
-
}
|
2147 |
|
2148 |
-
|
2149 |
-
const {
|
2150 |
-
onStart,
|
2151 |
-
onChange,
|
2152 |
-
onRest
|
2153 |
-
} = this._events;
|
2154 |
-
const active = this._active.size > 0;
|
2155 |
-
const changed = this._changed.size > 0;
|
2156 |
-
|
2157 |
-
if (active && !this._started || changed && !this._started) {
|
2158 |
-
this._started = true;
|
2159 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* flush */ "m"])(onStart, ([onStart, result]) => {
|
2160 |
-
result.value = this.get();
|
2161 |
-
onStart(result, this, this._item);
|
2162 |
-
});
|
2163 |
-
}
|
2164 |
|
2165 |
-
const idle = !active && this._started;
|
2166 |
-
const values = changed || idle && onRest.size ? this.get() : null;
|
2167 |
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
onChange(result, this, this._item);
|
2172 |
-
});
|
2173 |
-
}
|
2174 |
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
|
|
|
|
|
|
2183 |
|
2184 |
-
eventObserved(event) {
|
2185 |
-
if (event.type == 'change') {
|
2186 |
-
this._changed.add(event.parent);
|
2187 |
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
} else if (event.type == 'idle') {
|
2192 |
-
this._active.delete(event.parent);
|
2193 |
-
} else return;
|
2194 |
|
2195 |
-
|
2196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2197 |
|
2198 |
-
|
2199 |
-
|
2200 |
-
return Promise.all(queue.map(props => flushUpdate(ctrl, props))).then(results => getCombinedResult(ctrl, results));
|
2201 |
-
}
|
2202 |
-
async function flushUpdate(ctrl, props, isLoop) {
|
2203 |
-
const {
|
2204 |
-
keys,
|
2205 |
-
to,
|
2206 |
-
from,
|
2207 |
-
loop,
|
2208 |
-
onRest,
|
2209 |
-
onResolve
|
2210 |
-
} = props;
|
2211 |
-
const defaults = _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].obj(props.default) && props.default;
|
2212 |
|
2213 |
-
|
2214 |
-
|
2215 |
-
}
|
2216 |
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
|
|
2220 |
|
2221 |
-
if (asyncTo) {
|
2222 |
-
props.to = undefined;
|
2223 |
-
props.onRest = undefined;
|
2224 |
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
} else {
|
2229 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(BATCHED_EVENTS, key => {
|
2230 |
-
const handler = props[key];
|
2231 |
|
2232 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].fun(handler)) {
|
2233 |
-
const queue = ctrl['_events'][key];
|
2234 |
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2240 |
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
} else {
|
2245 |
-
queue.set(handler, {
|
2246 |
-
value: null,
|
2247 |
-
finished: finished || false,
|
2248 |
-
cancelled: cancelled || false
|
2249 |
-
});
|
2250 |
-
}
|
2251 |
-
};
|
2252 |
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
}
|
2257 |
-
});
|
2258 |
-
}
|
2259 |
|
2260 |
-
|
|
|
|
|
2261 |
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
|
|
|
|
2268 |
|
2269 |
-
const promises = (keys || Object.keys(ctrl.springs)).map(key => ctrl.springs[key].start(props));
|
2270 |
-
const cancel = props.cancel === true || getDefaultProp(props, 'cancel') === true;
|
2271 |
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
state,
|
2276 |
-
actions: {
|
2277 |
-
pause: _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* noop */ "v"],
|
2278 |
-
resume: _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* noop */ "v"],
|
2279 |
|
2280 |
-
start(props, resolve) {
|
2281 |
-
if (cancel) {
|
2282 |
-
stopAsync(state, ctrl['_lastAsyncId']);
|
2283 |
-
resolve(getCancelledResult(ctrl));
|
2284 |
-
} else {
|
2285 |
-
props.onRest = onRest;
|
2286 |
-
resolve(runAsync(asyncTo, props, state, ctrl));
|
2287 |
-
}
|
2288 |
-
}
|
2289 |
|
2290 |
-
}
|
2291 |
-
}));
|
2292 |
-
}
|
2293 |
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2299 |
|
2300 |
-
const result = getCombinedResult(ctrl, await Promise.all(promises));
|
2301 |
|
2302 |
-
if (loop && result.finished && !(isLoop && result.noop)) {
|
2303 |
-
const nextProps = createLoopUpdate(props, loop, to);
|
2304 |
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
}
|
2309 |
-
}
|
2310 |
|
2311 |
-
if (onResolve) {
|
2312 |
-
_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* raf */ "w"].batchedUpdates(() => onResolve(result, ctrl, ctrl.item));
|
2313 |
-
}
|
2314 |
|
2315 |
-
return result;
|
2316 |
-
}
|
2317 |
-
function getSprings(ctrl, props) {
|
2318 |
-
const springs = _extends({}, ctrl.springs);
|
2319 |
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
props = createUpdate(props);
|
2324 |
-
}
|
2325 |
|
2326 |
-
if (!_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].obj(props.to)) {
|
2327 |
-
props = _extends({}, props, {
|
2328 |
-
to: undefined
|
2329 |
-
});
|
2330 |
-
}
|
2331 |
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2337 |
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2346 |
}
|
2347 |
-
});
|
2348 |
-
}
|
2349 |
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
|
|
|
|
|
|
|
|
|
|
2353 |
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
|
|
|
|
2357 |
|
2358 |
-
|
2359 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2360 |
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2369 |
|
2370 |
-
|
2371 |
-
|
2372 |
-
prepareSprings(ctrl.springs, props, key => {
|
2373 |
-
return createSpring(key, ctrl);
|
2374 |
-
});
|
2375 |
-
});
|
2376 |
-
}
|
2377 |
|
2378 |
-
|
2379 |
-
|
2380 |
-
var target = {};
|
2381 |
-
var sourceKeys = Object.keys(source);
|
2382 |
-
var key, i;
|
2383 |
|
2384 |
-
|
2385 |
-
key = sourceKeys[i];
|
2386 |
-
if (excluded.indexOf(key) >= 0) continue;
|
2387 |
-
target[key] = source[key];
|
2388 |
-
}
|
2389 |
|
2390 |
-
return target;
|
2391 |
-
}
|
2392 |
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
children
|
2397 |
-
} = _ref,
|
2398 |
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
2399 |
-
|
2400 |
-
const inherited = Object(react__WEBPACK_IMPORTED_MODULE_1__["useContext"])(ctx);
|
2401 |
-
const pause = props.pause || !!inherited.pause,
|
2402 |
-
immediate = props.immediate || !!inherited.immediate;
|
2403 |
-
props = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useMemoOne */ "B"])(() => ({
|
2404 |
-
pause,
|
2405 |
-
immediate
|
2406 |
-
}), [pause, immediate]);
|
2407 |
-
const {
|
2408 |
-
Provider
|
2409 |
-
} = ctx;
|
2410 |
-
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](Provider, {
|
2411 |
-
value: props
|
2412 |
-
}, children);
|
2413 |
-
};
|
2414 |
-
const ctx = makeContext(SpringContext, {});
|
2415 |
-
SpringContext.Provider = ctx.Provider;
|
2416 |
-
SpringContext.Consumer = ctx.Consumer;
|
2417 |
-
|
2418 |
-
function makeContext(target, init) {
|
2419 |
-
Object.assign(target, react__WEBPACK_IMPORTED_MODULE_1__["createContext"](init));
|
2420 |
-
target.Provider._context = target;
|
2421 |
-
target.Consumer._context = target;
|
2422 |
-
return target;
|
2423 |
-
}
|
2424 |
|
2425 |
-
const SpringRef = () => {
|
2426 |
-
const current = [];
|
2427 |
|
2428 |
-
const SpringRef = function SpringRef(props) {
|
2429 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* deprecateDirectCall */ "i"])();
|
2430 |
-
const results = [];
|
2431 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(current, (ctrl, i) => {
|
2432 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(props)) {
|
2433 |
-
results.push(ctrl.start());
|
2434 |
-
} else {
|
2435 |
-
const update = _getProps(props, ctrl, i);
|
2436 |
|
2437 |
-
if (update) {
|
2438 |
-
results.push(ctrl.start(update));
|
2439 |
-
}
|
2440 |
-
}
|
2441 |
-
});
|
2442 |
-
return results;
|
2443 |
-
};
|
2444 |
|
2445 |
-
SpringRef.current = current;
|
2446 |
|
2447 |
-
SpringRef.add = function (ctrl) {
|
2448 |
-
if (!current.includes(ctrl)) {
|
2449 |
-
current.push(ctrl);
|
2450 |
-
}
|
2451 |
-
};
|
2452 |
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
};
|
2457 |
|
2458 |
-
SpringRef.pause = function () {
|
2459 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(current, ctrl => ctrl.pause(...arguments));
|
2460 |
-
return this;
|
2461 |
-
};
|
2462 |
|
2463 |
-
|
2464 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(current, ctrl => ctrl.resume(...arguments));
|
2465 |
-
return this;
|
2466 |
-
};
|
2467 |
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2471 |
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
results.push(ctrl.start());
|
2477 |
} else {
|
2478 |
-
|
2479 |
-
|
2480 |
-
if (update) {
|
2481 |
-
results.push(ctrl.start(update));
|
2482 |
-
}
|
2483 |
}
|
2484 |
-
});
|
2485 |
-
return results;
|
2486 |
-
};
|
2487 |
-
|
2488 |
-
SpringRef.stop = function () {
|
2489 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(current, ctrl => ctrl.stop(...arguments));
|
2490 |
-
return this;
|
2491 |
-
};
|
2492 |
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
|
|
2497 |
|
2498 |
-
|
2499 |
-
return
|
2500 |
-
|
|
|
|
|
2501 |
|
2502 |
-
|
2503 |
-
|
2504 |
-
}
|
|
|
2505 |
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
queue: [],
|
2515 |
-
|
2516 |
-
flush(ctrl, updates) {
|
2517 |
-
const springs = getSprings(ctrl, updates);
|
2518 |
-
const canFlushSync = layoutId.current > 0 && !state.queue.length && !Object.keys(springs).some(key => !ctrl.springs[key]);
|
2519 |
-
return canFlushSync ? flushUpdateQueue(ctrl, updates) : new Promise(resolve => {
|
2520 |
-
setSprings(ctrl, springs);
|
2521 |
-
state.queue.push(() => {
|
2522 |
-
resolve(flushUpdateQueue(ctrl, updates));
|
2523 |
-
});
|
2524 |
-
forceUpdate();
|
2525 |
-
});
|
2526 |
}
|
|
|
|
|
|
|
|
|
2527 |
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
Object(react__WEBPACK_IMPORTED_MODULE_1__["useMemo"])(() => {
|
2533 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(ctrls.current.slice(length, prevLength), ctrl => {
|
2534 |
-
detachRefs(ctrl, ref);
|
2535 |
-
ctrl.stop(true);
|
2536 |
-
});
|
2537 |
-
ctrls.current.length = length;
|
2538 |
-
declareUpdates(prevLength, length);
|
2539 |
-
}, [length]);
|
2540 |
-
Object(react__WEBPACK_IMPORTED_MODULE_1__["useMemo"])(() => {
|
2541 |
-
declareUpdates(0, Math.min(prevLength, length));
|
2542 |
-
}, deps);
|
2543 |
-
|
2544 |
-
function declareUpdates(startIndex, endIndex) {
|
2545 |
-
for (let i = startIndex; i < endIndex; i++) {
|
2546 |
-
const ctrl = ctrls.current[i] || (ctrls.current[i] = new Controller(null, state.flush));
|
2547 |
-
const update = propsFn ? propsFn(i, ctrl) : props[i];
|
2548 |
-
|
2549 |
-
if (update) {
|
2550 |
-
updates[i] = declareUpdate(update);
|
2551 |
}
|
2552 |
}
|
2553 |
-
}
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
const hasContext = context !== prevContext && hasProps(context);
|
2559 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useLayoutEffect */ "A"])(() => {
|
2560 |
-
layoutId.current++;
|
2561 |
-
state.ctrls = ctrls.current;
|
2562 |
-
const {
|
2563 |
-
queue
|
2564 |
-
} = state;
|
2565 |
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
|
|
2569 |
}
|
|
|
2570 |
|
2571 |
-
|
2572 |
-
|
2573 |
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
}
|
|
|
|
|
|
|
2579 |
|
2580 |
-
|
|
|
2581 |
|
2582 |
-
|
2583 |
-
|
2584 |
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
ctrl.start(update);
|
2589 |
-
}
|
2590 |
-
}
|
2591 |
-
});
|
2592 |
-
});
|
2593 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useOnce */ "C"])(() => () => {
|
2594 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(state.ctrls, ctrl => ctrl.stop(true));
|
2595 |
-
});
|
2596 |
-
const values = springs.map(x => _extends({}, x));
|
2597 |
-
return ref ? [values, ref] : values;
|
2598 |
-
}
|
2599 |
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
return isFn || arguments.length == 2 ? [values, ref] : values;
|
2604 |
-
}
|
2605 |
|
2606 |
-
|
|
|
|
|
2607 |
|
2608 |
-
const
|
|
|
2609 |
|
2610 |
-
|
2611 |
-
|
|
|
|
|
2612 |
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
let passedRef = undefined;
|
2617 |
-
const result = useSprings(length, (i, ctrl) => {
|
2618 |
-
const props = propsFn ? propsFn(i, ctrl) : propsArg;
|
2619 |
-
passedRef = props.ref;
|
2620 |
-
reverse = reverse && props.reverse;
|
2621 |
-
return props;
|
2622 |
-
}, deps || [{}]);
|
2623 |
-
const ref = (_passedRef = passedRef) != null ? _passedRef : result[1];
|
2624 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useLayoutEffect */ "A"])(() => {
|
2625 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(ref.current, (ctrl, i) => {
|
2626 |
-
const parent = ref.current[i + (reverse ? 1 : -1)];
|
2627 |
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2637 |
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
|
|
|
|
2641 |
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
}
|
2647 |
-
};
|
2648 |
|
2649 |
-
|
2650 |
-
|
|
|
|
|
2651 |
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
const parent = ref.current[i + (reverse ? 1 : -1)];
|
2657 |
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
} else {
|
2663 |
-
results.push(ctrl.start(_extends({}, props)));
|
2664 |
-
}
|
2665 |
-
});
|
2666 |
-
return results;
|
2667 |
-
};
|
2668 |
|
2669 |
-
|
2670 |
-
|
|
|
|
|
2671 |
|
2672 |
-
|
|
|
|
|
|
|
2673 |
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
TransitionPhase["LEAVE"] = "leave";
|
2679 |
-
})(TransitionPhase || (TransitionPhase = {}));
|
2680 |
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
expires = true,
|
2688 |
-
exitBeforeEnter = false,
|
2689 |
-
onDestroyed,
|
2690 |
-
ref: propsRef,
|
2691 |
-
config: propsConfig
|
2692 |
-
} = propsFn ? propsFn() : props;
|
2693 |
-
const ref = Object(react__WEBPACK_IMPORTED_MODULE_1__["useMemo"])(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);
|
2694 |
-
const items = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* toArray */ "y"])(data);
|
2695 |
-
const transitions = [];
|
2696 |
-
const usedTransitions = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(null);
|
2697 |
-
const prevTransitions = reset ? null : usedTransitions.current;
|
2698 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useLayoutEffect */ "A"])(() => {
|
2699 |
-
usedTransitions.current = transitions;
|
2700 |
-
});
|
2701 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useOnce */ "C"])(() => () => {
|
2702 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(usedTransitions.current, t => {
|
2703 |
-
if (t.expired) {
|
2704 |
-
clearTimeout(t.expirationId);
|
2705 |
-
}
|
2706 |
|
2707 |
-
|
2708 |
-
|
2709 |
-
});
|
2710 |
-
});
|
2711 |
-
const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions);
|
2712 |
-
const expired = reset && usedTransitions.current || [];
|
2713 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useLayoutEffect */ "A"])(() => Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(expired, ({
|
2714 |
-
ctrl,
|
2715 |
-
item,
|
2716 |
-
key
|
2717 |
-
}) => {
|
2718 |
-
detachRefs(ctrl, ref);
|
2719 |
-
callProp(onDestroyed, item, key);
|
2720 |
-
}));
|
2721 |
-
const reused = [];
|
2722 |
-
if (prevTransitions) Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(prevTransitions, (t, i) => {
|
2723 |
-
if (t.expired) {
|
2724 |
-
clearTimeout(t.expirationId);
|
2725 |
-
expired.push(t);
|
2726 |
-
} else {
|
2727 |
-
i = reused[i] = keys.indexOf(t.key);
|
2728 |
-
if (~i) transitions[i] = t;
|
2729 |
-
}
|
2730 |
-
});
|
2731 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(items, (item, i) => {
|
2732 |
-
if (!transitions[i]) {
|
2733 |
-
transitions[i] = {
|
2734 |
-
key: keys[i],
|
2735 |
-
item,
|
2736 |
-
phase: TransitionPhase.MOUNT,
|
2737 |
-
ctrl: new Controller()
|
2738 |
-
};
|
2739 |
-
transitions[i].ctrl.item = item;
|
2740 |
-
}
|
2741 |
-
});
|
2742 |
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
if (~keyIndex) {
|
2752 |
-
i = transitions.indexOf(t);
|
2753 |
-
transitions[i] = _extends({}, t, {
|
2754 |
-
item: items[keyIndex]
|
2755 |
-
});
|
2756 |
-
} else if (leave) {
|
2757 |
-
transitions.splice(++i, 0, t);
|
2758 |
-
}
|
2759 |
-
});
|
2760 |
-
}
|
2761 |
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
|
2766 |
-
let delay = -trail;
|
2767 |
-
const forceUpdate = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useForceUpdate */ "z"])();
|
2768 |
-
const defaultProps = getDefaultProps(props);
|
2769 |
-
const changes = new Map();
|
2770 |
-
const exitingTransitions = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(new Map());
|
2771 |
-
const forceChange = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(false);
|
2772 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(transitions, (t, i) => {
|
2773 |
-
const key = t.key;
|
2774 |
-
const prevPhase = t.phase;
|
2775 |
-
const p = propsFn ? propsFn() : props;
|
2776 |
-
let to;
|
2777 |
-
let phase;
|
2778 |
-
let propsDelay = callProp(p.delay || 0, key);
|
2779 |
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
to
|
2802 |
-
};
|
2803 |
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
|
|
|
|
|
|
|
|
|
|
2807 |
}
|
2808 |
|
2809 |
-
|
2810 |
-
|
2811 |
-
const payload = _extends({}, defaultProps, {
|
2812 |
-
delay: propsDelay + delay,
|
2813 |
-
ref: propsRef,
|
2814 |
-
immediate: p.immediate,
|
2815 |
-
reset: false
|
2816 |
-
}, to);
|
2817 |
-
|
2818 |
-
if (phase == TransitionPhase.ENTER && _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(payload.from)) {
|
2819 |
-
const _p = propsFn ? propsFn() : props;
|
2820 |
-
|
2821 |
-
const from = _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].und(_p.initial) || prevTransitions ? _p.from : _p.initial;
|
2822 |
-
payload.from = callProp(from, t.item, i);
|
2823 |
}
|
2824 |
|
2825 |
-
|
2826 |
-
onResolve
|
2827 |
-
} = payload;
|
2828 |
|
2829 |
-
|
2830 |
-
|
2831 |
-
const transitions = usedTransitions.current;
|
2832 |
-
const t = transitions.find(t => t.key === key);
|
2833 |
-
if (!t) return;
|
2834 |
|
2835 |
-
if (
|
2836 |
-
|
2837 |
}
|
|
|
2838 |
|
2839 |
-
|
2840 |
-
|
|
|
|
|
|
|
|
|
|
|
2841 |
|
2842 |
-
if (t.phase == TransitionPhase.LEAVE) {
|
2843 |
-
const expiry = callProp(expires, t.item);
|
2844 |
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
|
|
|
|
|
|
2848 |
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
}
|
2855 |
-
|
2856 |
-
if (idle && transitions.some(t => t.expired)) {
|
2857 |
-
exitingTransitions.current.delete(t);
|
2858 |
-
|
2859 |
-
if (exitBeforeEnter) {
|
2860 |
-
forceChange.current = true;
|
2861 |
-
}
|
2862 |
-
|
2863 |
-
forceUpdate();
|
2864 |
-
}
|
2865 |
-
}
|
2866 |
-
};
|
2867 |
-
|
2868 |
-
const springs = getSprings(t.ctrl, payload);
|
2869 |
-
|
2870 |
-
if (phase === TransitionPhase.LEAVE && exitBeforeEnter) {
|
2871 |
-
exitingTransitions.current.set(t, {
|
2872 |
-
phase,
|
2873 |
-
springs,
|
2874 |
-
payload
|
2875 |
-
});
|
2876 |
-
} else {
|
2877 |
-
changes.set(t, {
|
2878 |
-
phase,
|
2879 |
-
springs,
|
2880 |
-
payload
|
2881 |
-
});
|
2882 |
-
}
|
2883 |
-
});
|
2884 |
-
const context = Object(react__WEBPACK_IMPORTED_MODULE_1__["useContext"])(SpringContext);
|
2885 |
-
const prevContext = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* usePrev */ "D"])(context);
|
2886 |
-
const hasContext = context !== prevContext && hasProps(context);
|
2887 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useLayoutEffect */ "A"])(() => {
|
2888 |
-
if (hasContext) {
|
2889 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(transitions, t => {
|
2890 |
-
t.ctrl.start({
|
2891 |
-
default: context
|
2892 |
-
});
|
2893 |
-
});
|
2894 |
-
}
|
2895 |
-
}, [context]);
|
2896 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(changes, (_, t) => {
|
2897 |
-
if (exitingTransitions.current.size) {
|
2898 |
-
const ind = transitions.findIndex(state => state.key === t.key);
|
2899 |
-
transitions.splice(ind, 1);
|
2900 |
-
}
|
2901 |
-
});
|
2902 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useLayoutEffect */ "A"])(() => {
|
2903 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(exitingTransitions.current.size ? exitingTransitions.current : changes, ({
|
2904 |
-
phase,
|
2905 |
-
payload
|
2906 |
-
}, t) => {
|
2907 |
-
const {
|
2908 |
-
ctrl
|
2909 |
-
} = t;
|
2910 |
-
t.phase = phase;
|
2911 |
-
ref == null ? void 0 : ref.add(ctrl);
|
2912 |
-
|
2913 |
-
if (hasContext && phase == TransitionPhase.ENTER) {
|
2914 |
-
ctrl.start({
|
2915 |
-
default: context
|
2916 |
-
});
|
2917 |
-
}
|
2918 |
-
|
2919 |
-
if (payload) {
|
2920 |
-
replaceRef(ctrl, payload.ref);
|
2921 |
-
|
2922 |
-
if (ctrl.ref && !forceChange.current) {
|
2923 |
-
ctrl.update(payload);
|
2924 |
-
} else {
|
2925 |
-
ctrl.start(payload);
|
2926 |
-
|
2927 |
-
if (forceChange.current) {
|
2928 |
-
forceChange.current = false;
|
2929 |
-
}
|
2930 |
-
}
|
2931 |
-
}
|
2932 |
-
});
|
2933 |
-
}, reset ? void 0 : deps);
|
2934 |
|
2935 |
-
|
2936 |
-
const {
|
2937 |
-
springs
|
2938 |
-
} = changes.get(t) || t.ctrl;
|
2939 |
-
const elem = render(_extends({}, springs), t.item, t, i);
|
2940 |
-
return elem && elem.type ? react__WEBPACK_IMPORTED_MODULE_1__["createElement"](elem.type, _extends({}, elem.props, {
|
2941 |
-
key: _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].str(t.key) || _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].num(t.key) ? t.key : t.ctrl.id,
|
2942 |
-
ref: elem.ref
|
2943 |
-
})) : elem;
|
2944 |
-
}));
|
2945 |
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2949 |
|
2950 |
-
function
|
2951 |
-
|
2952 |
-
|
2953 |
-
}
|
2954 |
-
if (keys === null) {
|
2955 |
-
const reused = new Set();
|
2956 |
-
return items.map(item => {
|
2957 |
-
const t = prevTransitions && prevTransitions.find(t => t.item === item && t.phase !== TransitionPhase.LEAVE && !reused.has(t));
|
2958 |
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
|
2964 |
-
|
2965 |
-
|
|
|
|
|
2966 |
}
|
2967 |
|
2968 |
-
return
|
2969 |
}
|
|
|
2970 |
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
children
|
2975 |
-
} = _ref,
|
2976 |
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
2977 |
|
2978 |
-
|
2979 |
-
|
|
|
|
|
2980 |
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
children
|
2986 |
-
} = _ref,
|
2987 |
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
2988 |
-
|
2989 |
-
const trails = useTrail(items.length, props);
|
2990 |
-
return items.map((item, index) => {
|
2991 |
-
const result = children(item, index);
|
2992 |
-
return _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].fun(result) ? result(trails[index]) : result;
|
2993 |
-
});
|
2994 |
-
}
|
2995 |
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
items,
|
3000 |
-
children
|
3001 |
-
} = _ref,
|
3002 |
-
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
3003 |
|
3004 |
-
|
3005 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3006 |
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
|
|
|
|
3016 |
|
3017 |
-
const value = this._get();
|
3018 |
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3022 |
|
3023 |
-
|
3024 |
-
|
|
|
|
|
3025 |
|
3026 |
-
|
|
|
|
|
3027 |
|
3028 |
-
|
3029 |
-
|
|
|
3030 |
|
3031 |
-
|
|
|
|
|
3032 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3033 |
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
|
|
|
|
3038 |
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3043 |
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
node.done = false;
|
3049 |
-
});
|
3050 |
|
3051 |
-
|
3052 |
-
|
3053 |
-
becomeIdle(this);
|
3054 |
-
} else {
|
3055 |
-
_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* frameLoop */ "o"].start(this);
|
3056 |
-
}
|
3057 |
}
|
3058 |
-
}
|
3059 |
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
|
|
|
|
|
|
3065 |
}
|
3066 |
|
3067 |
-
if (
|
3068 |
-
|
3069 |
-
this._active.add(source);
|
3070 |
-
}
|
3071 |
-
|
3072 |
-
priority = Math.max(priority, source.priority + 1);
|
3073 |
}
|
3074 |
-
});
|
3075 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3076 |
|
3077 |
-
this._start();
|
3078 |
-
}
|
3079 |
|
3080 |
-
_detach() {
|
3081 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* toArray */ "y"])(this.source), source => {
|
3082 |
-
if (Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* hasFluidValue */ "r"])(source)) {
|
3083 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* removeFluidObserver */ "x"])(source, this);
|
3084 |
-
}
|
3085 |
-
});
|
3086 |
|
3087 |
-
|
|
|
|
|
3088 |
|
3089 |
-
becomeIdle(this);
|
3090 |
-
}
|
3091 |
|
3092 |
-
eventObserved(event) {
|
3093 |
-
if (event.type == 'change') {
|
3094 |
-
if (event.idle) {
|
3095 |
-
this.advance();
|
3096 |
-
} else {
|
3097 |
-
this._active.add(event.parent);
|
3098 |
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
this._active.delete(event.parent);
|
3103 |
-
} else if (event.type == 'priority') {
|
3104 |
-
this.priority = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* toArray */ "y"])(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);
|
3105 |
-
}
|
3106 |
-
}
|
3107 |
|
3108 |
-
}
|
3109 |
|
3110 |
-
function isIdle(source) {
|
3111 |
-
return source.idle !== false;
|
3112 |
-
}
|
3113 |
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3117 |
|
3118 |
-
|
3119 |
-
|
3120 |
-
self.idle = true;
|
3121 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(Object(_react_spring_animated__WEBPACK_IMPORTED_MODULE_2__[/* getPayload */ "g"])(self), node => {
|
3122 |
-
node.done = true;
|
3123 |
-
});
|
3124 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* callFluidObservers */ "d"])(self, {
|
3125 |
-
type: 'idle',
|
3126 |
-
parent: self
|
3127 |
-
});
|
3128 |
-
}
|
3129 |
-
}
|
3130 |
|
3131 |
-
|
3132 |
-
|
|
|
|
|
3133 |
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
}
|
3138 |
-
const update = _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* frameLoop */ "o"].advance;
|
3139 |
|
|
|
|
|
3140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3142 |
|
3143 |
-
|
|
|
|
|
|
|
|
|
3144 |
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
(function() { module.exports = window["wc"]["data"]; }());
|
3149 |
|
3150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3151 |
|
3152 |
-
|
3153 |
-
|
3154 |
|
3155 |
-
|
|
|
3156 |
|
|
|
3157 |
|
3158 |
-
var reactIs = __webpack_require__(106);
|
3159 |
|
3160 |
/**
|
3161 |
-
*
|
3162 |
-
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
3163 |
*/
|
3164 |
-
var REACT_STATICS = {
|
3165 |
-
childContextTypes: true,
|
3166 |
-
contextType: true,
|
3167 |
-
contextTypes: true,
|
3168 |
-
defaultProps: true,
|
3169 |
-
displayName: true,
|
3170 |
-
getDefaultProps: true,
|
3171 |
-
getDerivedStateFromError: true,
|
3172 |
-
getDerivedStateFromProps: true,
|
3173 |
-
mixins: true,
|
3174 |
-
propTypes: true,
|
3175 |
-
type: true
|
3176 |
-
};
|
3177 |
-
var KNOWN_STATICS = {
|
3178 |
-
name: true,
|
3179 |
-
length: true,
|
3180 |
-
prototype: true,
|
3181 |
-
caller: true,
|
3182 |
-
callee: true,
|
3183 |
-
arguments: true,
|
3184 |
-
arity: true
|
3185 |
-
};
|
3186 |
-
var FORWARD_REF_STATICS = {
|
3187 |
-
'$$typeof': true,
|
3188 |
-
render: true,
|
3189 |
-
defaultProps: true,
|
3190 |
-
displayName: true,
|
3191 |
-
propTypes: true
|
3192 |
-
};
|
3193 |
-
var MEMO_STATICS = {
|
3194 |
-
'$$typeof': true,
|
3195 |
-
compare: true,
|
3196 |
-
defaultProps: true,
|
3197 |
-
displayName: true,
|
3198 |
-
propTypes: true,
|
3199 |
-
type: true
|
3200 |
-
};
|
3201 |
-
var TYPE_STATICS = {};
|
3202 |
-
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
3203 |
-
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
3204 |
-
|
3205 |
-
function getStatics(component) {
|
3206 |
-
// React v16.11 and below
|
3207 |
-
if (reactIs.isMemo(component)) {
|
3208 |
-
return MEMO_STATICS;
|
3209 |
-
} // React v16.12 and above
|
3210 |
-
|
3211 |
-
|
3212 |
-
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
3213 |
-
}
|
3214 |
-
|
3215 |
-
var defineProperty = Object.defineProperty;
|
3216 |
-
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
3217 |
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
3218 |
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
3219 |
-
var getPrototypeOf = Object.getPrototypeOf;
|
3220 |
-
var objectPrototype = Object.prototype;
|
3221 |
-
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
3222 |
-
if (typeof sourceComponent !== 'string') {
|
3223 |
-
// don't hoist over string (html) components
|
3224 |
-
if (objectPrototype) {
|
3225 |
-
var inheritedComponent = getPrototypeOf(sourceComponent);
|
3226 |
-
|
3227 |
-
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
3228 |
-
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
3229 |
-
}
|
3230 |
-
}
|
3231 |
|
3232 |
-
var keys = getOwnPropertyNames(sourceComponent);
|
3233 |
|
3234 |
-
if (getOwnPropertySymbols) {
|
3235 |
-
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
3236 |
-
}
|
3237 |
|
3238 |
-
var targetStatics = getStatics(targetComponent);
|
3239 |
-
var sourceStatics = getStatics(sourceComponent);
|
3240 |
|
3241 |
-
for (var i = 0; i < keys.length; ++i) {
|
3242 |
-
var key = keys[i];
|
3243 |
|
3244 |
-
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
3245 |
-
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
3246 |
|
3247 |
-
try {
|
3248 |
-
// Avoid failures from read-only properties
|
3249 |
-
defineProperty(targetComponent, key, descriptor);
|
3250 |
-
} catch (e) {}
|
3251 |
-
}
|
3252 |
-
}
|
3253 |
-
}
|
3254 |
|
3255 |
-
return targetComponent;
|
3256 |
-
}
|
3257 |
|
3258 |
-
module.exports = hoistNonReactStatics;
|
3259 |
|
3260 |
|
3261 |
-
/***/ }),
|
3262 |
|
3263 |
-
/***/ 121:
|
3264 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3265 |
|
3266 |
-
|
|
|
|
|
3267 |
|
3268 |
-
// EXPORTS
|
3269 |
-
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ layout_PrimaryLayout; });
|
3270 |
-
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ PageLayout; });
|
3271 |
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ EmbedLayout; });
|
3272 |
|
3273 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
|
3274 |
-
var helpers_extends = __webpack_require__(40);
|
3275 |
-
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
|
3276 |
|
3277 |
-
// EXTERNAL MODULE: external ["wp","element"]
|
3278 |
-
var external_wp_element_ = __webpack_require__(0);
|
3279 |
|
3280 |
-
// EXTERNAL MODULE: external ["wp","components"]
|
3281 |
-
var external_wp_components_ = __webpack_require__(4);
|
3282 |
|
3283 |
-
// EXTERNAL MODULE: external ["wp","compose"]
|
3284 |
-
var external_wp_compose_ = __webpack_require__(14);
|
3285 |
|
3286 |
-
// EXTERNAL MODULE: external ["wp","data"]
|
3287 |
-
var external_wp_data_ = __webpack_require__(8);
|
3288 |
|
3289 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules
|
3290 |
-
var inheritsLoose = __webpack_require__(27);
|
3291 |
|
3292 |
-
// EXTERNAL MODULE: external "React"
|
3293 |
-
var external_React_ = __webpack_require__(6);
|
3294 |
-
var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
|
3295 |
|
3296 |
-
// EXTERNAL MODULE: ./node_modules/history/esm/history.js + 2 modules
|
3297 |
-
var esm_history = __webpack_require__(55);
|
3298 |
|
3299 |
-
// EXTERNAL MODULE: ./node_modules/mini-create-react-context/dist/esm/index.js
|
3300 |
-
var esm = __webpack_require__(162);
|
3301 |
|
3302 |
-
// EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js
|
3303 |
-
var tiny_invariant_esm = __webpack_require__(47);
|
3304 |
|
3305 |
-
|
3306 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3307 |
|
3308 |
-
|
3309 |
-
|
3310 |
-
var path_to_regexp_default = /*#__PURE__*/__webpack_require__.n(path_to_regexp);
|
3311 |
|
3312 |
-
|
3313 |
-
var
|
3314 |
|
3315 |
-
|
3316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3317 |
|
3318 |
-
|
3319 |
-
|
3320 |
-
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
|
3321 |
|
3322 |
-
|
|
|
|
|
|
|
3323 |
|
|
|
|
|
3324 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3325 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3326 |
|
|
|
|
|
|
|
|
|
3327 |
|
|
|
|
|
|
|
3328 |
|
|
|
|
|
|
|
|
|
3329 |
|
|
|
|
|
|
|
|
|
3330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3331 |
|
|
|
|
|
|
|
3332 |
|
|
|
|
|
|
|
3333 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3334 |
|
3335 |
|
3336 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3337 |
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3343 |
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3347 |
|
3348 |
-
|
|
|
|
|
|
|
3349 |
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
|
|
3355 |
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
|
|
3359 |
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
|
|
3363 |
|
3364 |
-
|
3365 |
-
|
3366 |
-
function (_React$Component) {
|
3367 |
-
Object(inheritsLoose["a" /* default */])(Router, _React$Component);
|
3368 |
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
isExact: pathname === "/"
|
3375 |
-
};
|
3376 |
};
|
3377 |
|
3378 |
-
|
3379 |
-
|
|
|
|
|
|
|
|
|
3380 |
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
}; // This is a bit of a hack. We have to start listening for location
|
3385 |
-
// changes here in the constructor in case there are any <Redirect>s
|
3386 |
-
// on the initial render. If there are, they will replace/push when
|
3387 |
-
// they mount and since cDM fires in children before parents, we may
|
3388 |
-
// get a new location before the <Router> is mounted.
|
3389 |
|
3390 |
-
|
3391 |
-
|
3392 |
|
3393 |
-
|
3394 |
-
|
3395 |
-
|
3396 |
-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3403 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3404 |
|
3405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3406 |
}
|
3407 |
|
3408 |
-
|
|
|
|
|
3409 |
|
3410 |
-
|
3411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3412 |
|
3413 |
-
if (this._pendingLocation) {
|
3414 |
-
this.setState({
|
3415 |
-
location: this._pendingLocation
|
3416 |
-
});
|
3417 |
-
}
|
3418 |
-
};
|
3419 |
|
3420 |
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
3421 |
-
if (this.unlisten) this.unlisten();
|
3422 |
-
};
|
3423 |
|
3424 |
-
_proto.render = function render() {
|
3425 |
-
return external_React_default.a.createElement(react_router_context.Provider, {
|
3426 |
-
value: {
|
3427 |
-
history: this.props.history,
|
3428 |
-
location: this.state.location,
|
3429 |
-
match: Router.computeRootMatch(this.state.location.pathname),
|
3430 |
-
staticContext: this.props.staticContext
|
3431 |
-
}
|
3432 |
-
}, external_React_default.a.createElement(historyContext.Provider, {
|
3433 |
-
children: this.props.children || null,
|
3434 |
-
value: this.props.history
|
3435 |
-
}));
|
3436 |
-
};
|
3437 |
|
3438 |
-
return Router;
|
3439 |
-
}(external_React_default.a.Component);
|
3440 |
|
3441 |
-
if (false) {}
|
3442 |
|
3443 |
/**
|
3444 |
-
*
|
3445 |
*/
|
3446 |
|
3447 |
-
var react_router_MemoryRouter =
|
3448 |
-
/*#__PURE__*/
|
3449 |
-
function (_React$Component) {
|
3450 |
-
Object(inheritsLoose["a" /* default */])(MemoryRouter, _React$Component);
|
3451 |
|
3452 |
-
function MemoryRouter() {
|
3453 |
-
var _this;
|
3454 |
|
3455 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
3456 |
-
args[_key] = arguments[_key];
|
3457 |
-
}
|
3458 |
|
3459 |
-
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
3460 |
-
_this.history = Object(esm_history["c" /* createMemoryHistory */])(_this.props);
|
3461 |
-
return _this;
|
3462 |
-
}
|
3463 |
-
|
3464 |
-
var _proto = MemoryRouter.prototype;
|
3465 |
-
|
3466 |
-
_proto.render = function render() {
|
3467 |
-
return external_React_default.a.createElement(react_router_Router, {
|
3468 |
-
history: this.history,
|
3469 |
-
children: this.props.children
|
3470 |
-
});
|
3471 |
-
};
|
3472 |
|
3473 |
-
|
3474 |
-
|
|
|
|
|
|
|
|
|
|
|
3475 |
|
3476 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3477 |
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
|
|
|
|
|
|
3482 |
|
3483 |
-
|
3484 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3485 |
}
|
3486 |
|
3487 |
-
|
3488 |
-
|
3489 |
-
|
3490 |
-
|
3491 |
-
|
3492 |
-
|
3493 |
-
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
3494 |
-
if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
|
3495 |
-
};
|
3496 |
|
3497 |
-
|
3498 |
-
|
3499 |
-
|
|
|
|
|
|
|
|
|
3500 |
|
3501 |
-
|
3502 |
-
|
3503 |
-
|
3504 |
|
3505 |
-
|
3506 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3507 |
|
|
|
3508 |
/**
|
3509 |
-
*
|
3510 |
*/
|
3511 |
|
3512 |
-
function Prompt(_ref) {
|
3513 |
-
var message = _ref.message,
|
3514 |
-
_ref$when = _ref.when,
|
3515 |
-
when = _ref$when === void 0 ? true : _ref$when;
|
3516 |
-
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
3517 |
-
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
3518 |
-
if (!when || context.staticContext) return null;
|
3519 |
-
var method = context.history.block;
|
3520 |
-
return external_React_default.a.createElement(react_router_Lifecycle, {
|
3521 |
-
onMount: function onMount(self) {
|
3522 |
-
self.release = method(message);
|
3523 |
-
},
|
3524 |
-
onUpdate: function onUpdate(self, prevProps) {
|
3525 |
-
if (prevProps.message !== message) {
|
3526 |
-
self.release();
|
3527 |
-
self.release = method(message);
|
3528 |
-
}
|
3529 |
-
},
|
3530 |
-
onUnmount: function onUnmount(self) {
|
3531 |
-
self.release();
|
3532 |
-
},
|
3533 |
-
message: message
|
3534 |
-
});
|
3535 |
-
});
|
3536 |
-
}
|
3537 |
-
|
3538 |
-
if (false) { var messageType; }
|
3539 |
-
|
3540 |
-
var cache = {};
|
3541 |
-
var cacheLimit = 10000;
|
3542 |
-
var cacheCount = 0;
|
3543 |
-
|
3544 |
-
function compilePath(path) {
|
3545 |
-
if (cache[path]) return cache[path];
|
3546 |
-
var generator = path_to_regexp_default.a.compile(path);
|
3547 |
|
3548 |
-
|
3549 |
-
|
3550 |
-
|
|
|
|
|
|
|
3551 |
}
|
3552 |
|
3553 |
-
return
|
3554 |
-
}
|
3555 |
/**
|
3556 |
-
*
|
3557 |
*/
|
3558 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3559 |
|
3560 |
-
|
3561 |
-
if (
|
3562 |
-
|
3563 |
}
|
3564 |
|
3565 |
-
|
3566 |
-
|
|
|
|
|
|
|
|
|
|
|
3567 |
}
|
3568 |
|
3569 |
-
|
3570 |
-
|
3571 |
-
|
3572 |
-
}
|
3573 |
|
3574 |
/**
|
3575 |
-
*
|
|
|
|
|
3576 |
*/
|
|
|
|
|
|
|
|
|
|
|
3577 |
|
3578 |
-
|
3579 |
-
|
3580 |
-
|
3581 |
-
_ref$push = _ref.push,
|
3582 |
-
push = _ref$push === void 0 ? false : _ref$push;
|
3583 |
-
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
3584 |
-
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
3585 |
-
var history = context.history,
|
3586 |
-
staticContext = context.staticContext;
|
3587 |
-
var method = push ? history.push : history.replace;
|
3588 |
-
var location = Object(esm_history["b" /* createLocation */])(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : Object(esm_extends["a" /* default */])({}, to, {
|
3589 |
-
pathname: generatePath(to.pathname, computedMatch.params)
|
3590 |
-
}) : to); // When rendering in a static context,
|
3591 |
-
// set the new location immediately.
|
3592 |
-
|
3593 |
-
if (staticContext) {
|
3594 |
-
method(location);
|
3595 |
-
return null;
|
3596 |
}
|
3597 |
-
|
3598 |
-
return external_React_default.a.createElement(react_router_Lifecycle, {
|
3599 |
-
onMount: function onMount() {
|
3600 |
-
method(location);
|
3601 |
-
},
|
3602 |
-
onUpdate: function onUpdate(self, prevProps) {
|
3603 |
-
var prevLocation = Object(esm_history["b" /* createLocation */])(prevProps.to);
|
3604 |
-
|
3605 |
-
if (!Object(esm_history["e" /* locationsAreEqual */])(prevLocation, Object(esm_extends["a" /* default */])({}, location, {
|
3606 |
-
key: prevLocation.key
|
3607 |
-
}))) {
|
3608 |
-
method(location);
|
3609 |
-
}
|
3610 |
-
},
|
3611 |
-
to: to
|
3612 |
-
});
|
3613 |
});
|
3614 |
-
|
3615 |
-
|
3616 |
-
if (false) {}
|
3617 |
-
|
3618 |
-
var cache$1 = {};
|
3619 |
-
var cacheLimit$1 = 10000;
|
3620 |
-
var cacheCount$1 = 0;
|
3621 |
-
|
3622 |
-
function compilePath$1(path, options) {
|
3623 |
-
var cacheKey = "" + options.end + options.strict + options.sensitive;
|
3624 |
-
var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
|
3625 |
-
if (pathCache[path]) return pathCache[path];
|
3626 |
-
var keys = [];
|
3627 |
-
var regexp = path_to_regexp_default()(path, keys, options);
|
3628 |
-
var result = {
|
3629 |
-
regexp: regexp,
|
3630 |
-
keys: keys
|
3631 |
-
};
|
3632 |
-
|
3633 |
-
if (cacheCount$1 < cacheLimit$1) {
|
3634 |
-
pathCache[path] = result;
|
3635 |
-
cacheCount$1++;
|
3636 |
-
}
|
3637 |
-
|
3638 |
-
return result;
|
3639 |
-
}
|
3640 |
/**
|
3641 |
-
*
|
3642 |
*/
|
3643 |
|
|
|
3644 |
|
3645 |
-
|
3646 |
-
|
3647 |
-
|
3648 |
-
|
3649 |
-
|
3650 |
-
|
3651 |
-
|
3652 |
-
|
3653 |
-
|
3654 |
-
|
3655 |
-
|
3656 |
-
|
3657 |
-
|
3658 |
-
|
3659 |
-
|
3660 |
-
|
3661 |
-
|
3662 |
-
|
3663 |
-
|
3664 |
-
|
3665 |
-
return paths.reduce(function (matched, path) {
|
3666 |
-
if (!path && path !== "") return null;
|
3667 |
-
if (matched) return matched;
|
3668 |
-
|
3669 |
-
var _compilePath = compilePath$1(path, {
|
3670 |
-
end: exact,
|
3671 |
-
strict: strict,
|
3672 |
-
sensitive: sensitive
|
3673 |
-
}),
|
3674 |
-
regexp = _compilePath.regexp,
|
3675 |
-
keys = _compilePath.keys;
|
3676 |
-
|
3677 |
-
var match = regexp.exec(pathname);
|
3678 |
-
if (!match) return null;
|
3679 |
-
var url = match[0],
|
3680 |
-
values = match.slice(1);
|
3681 |
-
var isExact = pathname === url;
|
3682 |
-
if (exact && !isExact) return null;
|
3683 |
-
return {
|
3684 |
-
path: path,
|
3685 |
-
// the path used to match
|
3686 |
-
url: path === "/" && url === "" ? "/" : url,
|
3687 |
-
// the matched portion of the URL
|
3688 |
-
isExact: isExact,
|
3689 |
-
// whether or not we matched exactly
|
3690 |
-
params: keys.reduce(function (memo, key, index) {
|
3691 |
-
memo[key.name] = values[index];
|
3692 |
-
return memo;
|
3693 |
-
}, {})
|
3694 |
-
};
|
3695 |
-
}, null);
|
3696 |
-
}
|
3697 |
|
3698 |
-
|
3699 |
-
return
|
3700 |
-
|
|
|
|
|
3701 |
|
3702 |
-
|
3703 |
-
|
3704 |
-
|
3705 |
-
return value || null;
|
3706 |
-
}
|
3707 |
/**
|
3708 |
-
*
|
|
|
|
|
|
|
|
|
3709 |
*/
|
3710 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3711 |
|
3712 |
-
var react_router_Route =
|
3713 |
-
/*#__PURE__*/
|
3714 |
-
function (_React$Component) {
|
3715 |
-
Object(inheritsLoose["a" /* default */])(Route, _React$Component);
|
3716 |
|
3717 |
-
|
3718 |
-
|
3719 |
-
|
3720 |
|
3721 |
-
var _proto = Route.prototype;
|
3722 |
|
3723 |
-
|
3724 |
-
|
|
|
3725 |
|
3726 |
-
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context$1) {
|
3727 |
-
!context$1 ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
3728 |
-
var location = _this.props.location || context$1.location;
|
3729 |
-
var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
|
3730 |
-
: _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
3731 |
|
3732 |
-
|
3733 |
-
|
3734 |
-
|
3735 |
-
});
|
3736 |
|
3737 |
-
|
3738 |
-
children = _this$props.children,
|
3739 |
-
component = _this$props.component,
|
3740 |
-
render = _this$props.render; // Preact uses an empty array as children by
|
3741 |
-
// default, so use null if that's the case.
|
3742 |
|
3743 |
-
|
3744 |
-
|
3745 |
-
|
3746 |
|
3747 |
-
|
3748 |
-
|
3749 |
-
|
3750 |
-
|
|
|
3751 |
};
|
|
|
|
|
3752 |
|
3753 |
-
return Route;
|
3754 |
-
}(external_React_default.a.Component);
|
3755 |
-
|
3756 |
-
if (false) {}
|
3757 |
-
|
3758 |
-
function addLeadingSlash(path) {
|
3759 |
-
return path.charAt(0) === "/" ? path : "/" + path;
|
3760 |
-
}
|
3761 |
-
|
3762 |
-
function addBasename(basename, location) {
|
3763 |
-
if (!basename) return location;
|
3764 |
-
return Object(esm_extends["a" /* default */])({}, location, {
|
3765 |
-
pathname: addLeadingSlash(basename) + location.pathname
|
3766 |
-
});
|
3767 |
-
}
|
3768 |
|
3769 |
-
|
3770 |
-
|
3771 |
-
|
3772 |
-
if (location.pathname.indexOf(base) !== 0) return location;
|
3773 |
-
return Object(esm_extends["a" /* default */])({}, location, {
|
3774 |
-
pathname: location.pathname.substr(base.length)
|
3775 |
-
});
|
3776 |
-
}
|
3777 |
|
3778 |
-
|
3779 |
-
|
3780 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3781 |
|
3782 |
-
function staticHandler(methodName) {
|
3783 |
-
return function () {
|
3784 |
-
false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) ;
|
3785 |
-
};
|
3786 |
-
}
|
3787 |
|
3788 |
-
function noop() {}
|
3789 |
/**
|
3790 |
-
*
|
3791 |
-
* can't actually change the current location. Instead, it just records
|
3792 |
-
* location changes in a context object. Useful mainly in testing and
|
3793 |
-
* server-rendering scenarios.
|
3794 |
*/
|
3795 |
|
3796 |
|
3797 |
-
var react_router_StaticRouter =
|
3798 |
-
/*#__PURE__*/
|
3799 |
-
function (_React$Component) {
|
3800 |
-
Object(inheritsLoose["a" /* default */])(StaticRouter, _React$Component);
|
3801 |
|
3802 |
-
function StaticRouter() {
|
3803 |
-
var _this;
|
3804 |
|
3805 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
3806 |
-
args[_key] = arguments[_key];
|
3807 |
-
}
|
3808 |
|
3809 |
-
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
3810 |
|
3811 |
-
_this.handlePush = function (location) {
|
3812 |
-
return _this.navigateTo(location, "PUSH");
|
3813 |
-
};
|
3814 |
|
3815 |
-
_this.handleReplace = function (location) {
|
3816 |
-
return _this.navigateTo(location, "REPLACE");
|
3817 |
-
};
|
3818 |
|
3819 |
-
_this.handleListen = function () {
|
3820 |
-
return noop;
|
3821 |
-
};
|
3822 |
|
3823 |
-
_this.handleBlock = function () {
|
3824 |
-
return noop;
|
3825 |
-
};
|
3826 |
|
3827 |
-
|
3828 |
-
|
|
|
3829 |
|
3830 |
-
var _proto = StaticRouter.prototype;
|
3831 |
|
3832 |
-
|
3833 |
-
|
3834 |
-
|
3835 |
-
|
3836 |
-
|
3837 |
-
|
3838 |
-
|
3839 |
-
|
3840 |
-
|
3841 |
};
|
3842 |
|
3843 |
-
|
3844 |
-
|
3845 |
-
|
3846 |
-
|
3847 |
-
|
3848 |
-
context = _this$props2$context === void 0 ? {} : _this$props2$context,
|
3849 |
-
_this$props2$location = _this$props2.location,
|
3850 |
-
location = _this$props2$location === void 0 ? "/" : _this$props2$location,
|
3851 |
-
rest = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props2, ["basename", "context", "location"]);
|
3852 |
|
3853 |
-
|
3854 |
-
|
3855 |
-
|
3856 |
-
|
3857 |
-
action: "POP",
|
3858 |
-
location: stripBasename(basename, Object(esm_history["b" /* createLocation */])(location)),
|
3859 |
-
push: this.handlePush,
|
3860 |
-
replace: this.handleReplace,
|
3861 |
-
go: staticHandler("go"),
|
3862 |
-
goBack: staticHandler("goBack"),
|
3863 |
-
goForward: staticHandler("goForward"),
|
3864 |
-
listen: this.handleListen,
|
3865 |
-
block: this.handleBlock
|
3866 |
-
};
|
3867 |
-
return external_React_default.a.createElement(react_router_Router, Object(esm_extends["a" /* default */])({}, rest, {
|
3868 |
-
history: history,
|
3869 |
-
staticContext: context
|
3870 |
-
}));
|
3871 |
};
|
3872 |
|
3873 |
-
|
3874 |
-
|
3875 |
-
|
3876 |
-
|
|
|
|
|
|
|
3877 |
|
3878 |
-
|
3879 |
-
|
3880 |
-
|
|
|
|
|
|
|
|
|
3881 |
|
3882 |
-
|
3883 |
-
|
3884 |
-
|
3885 |
-
|
|
|
|
|
|
|
|
|
|
|
3886 |
|
3887 |
-
|
3888 |
-
|
3889 |
-
|
|
|
|
|
|
|
3890 |
|
3891 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3892 |
|
3893 |
-
|
3894 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3895 |
|
3896 |
-
|
3897 |
-
|
3898 |
-
|
3899 |
-
|
3900 |
-
|
3901 |
-
|
3902 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3903 |
|
3904 |
-
|
3905 |
-
|
3906 |
-
|
3907 |
-
var path = child.props.path || child.props.from;
|
3908 |
-
match = path ? matchPath(location.pathname, Object(esm_extends["a" /* default */])({}, child.props, {
|
3909 |
-
path: path
|
3910 |
-
})) : context.match;
|
3911 |
-
}
|
3912 |
-
});
|
3913 |
-
return match ? external_React_default.a.cloneElement(element, {
|
3914 |
-
location: location,
|
3915 |
-
computedMatch: match
|
3916 |
-
}) : null;
|
3917 |
-
});
|
3918 |
-
};
|
3919 |
|
3920 |
-
|
3921 |
-
}(external_React_default.a.Component);
|
3922 |
|
3923 |
-
if (false) {}
|
3924 |
|
3925 |
/**
|
3926 |
-
*
|
3927 |
*/
|
3928 |
|
3929 |
-
|
3930 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3931 |
|
3932 |
-
var C = function C(props) {
|
3933 |
-
var wrappedComponentRef = props.wrappedComponentRef,
|
3934 |
-
remainingProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, ["wrappedComponentRef"]);
|
3935 |
|
3936 |
-
|
3937 |
-
|
3938 |
-
|
3939 |
-
ref: wrappedComponentRef
|
3940 |
-
}));
|
3941 |
-
});
|
3942 |
-
};
|
3943 |
|
3944 |
-
|
3945 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3946 |
|
3947 |
-
|
3948 |
|
3949 |
-
return hoist_non_react_statics_cjs_default()(C, Component);
|
3950 |
-
}
|
3951 |
|
3952 |
-
|
3953 |
-
|
3954 |
-
|
3955 |
|
3956 |
-
return useContext(historyContext);
|
3957 |
-
}
|
3958 |
-
function useLocation() {
|
3959 |
-
if (false) {}
|
3960 |
|
3961 |
-
return useContext(react_router_context).location;
|
3962 |
-
}
|
3963 |
-
function useParams() {
|
3964 |
-
if (false) {}
|
3965 |
|
3966 |
-
var match = useContext(react_router_context).match;
|
3967 |
-
return match ? match.params : {};
|
3968 |
-
}
|
3969 |
-
function useRouteMatch(path) {
|
3970 |
-
if (false) {}
|
3971 |
|
3972 |
-
var location = useLocation();
|
3973 |
-
var match = useContext(react_router_context).match;
|
3974 |
-
return path ? matchPath(location.pathname, path) : match;
|
3975 |
-
}
|
3976 |
|
3977 |
-
if (false) { var secondaryBuildName, initialBuildName, buildNames, key, global; }
|
3978 |
|
|
|
|
|
|
|
3979 |
|
3980 |
-
//# sourceMappingURL=react-router.js.map
|
3981 |
|
3982 |
-
|
3983 |
-
|
3984 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3985 |
|
3986 |
-
|
3987 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3988 |
|
3989 |
-
|
3990 |
-
|
|
|
3991 |
|
3992 |
-
|
3993 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3994 |
|
3995 |
-
// EXTERNAL MODULE: external ["wc","data"]
|
3996 |
-
var external_wc_data_ = __webpack_require__(12);
|
3997 |
|
3998 |
-
|
3999 |
-
|
|
|
4000 |
|
4001 |
-
// EXTERNAL MODULE: external ["wc","notices"]
|
4002 |
-
var external_wc_notices_ = __webpack_require__(294);
|
4003 |
|
4004 |
-
// EXTERNAL MODULE: external ["wp","plugins"]
|
4005 |
-
var external_wp_plugins_ = __webpack_require__(56);
|
4006 |
|
4007 |
-
|
4008 |
-
|
4009 |
-
|
4010 |
-
// EXTERNAL MODULE: external ["wp","hooks"]
|
4011 |
-
var external_wp_hooks_ = __webpack_require__(28);
|
4012 |
-
|
4013 |
-
// EXTERNAL MODULE: external ["wp","i18n"]
|
4014 |
-
var external_wp_i18n_ = __webpack_require__(2);
|
4015 |
-
|
4016 |
-
// EXTERNAL MODULE: external ["wc","components"]
|
4017 |
-
var external_wc_components_ = __webpack_require__(22);
|
4018 |
|
4019 |
-
// EXTERNAL MODULE: ./client/analytics/report/get-reports.js
|
4020 |
-
var get_reports = __webpack_require__(118);
|
4021 |
|
4022 |
-
|
4023 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4024 |
|
4025 |
-
|
4026 |
-
|
|
|
4027 |
|
4028 |
-
|
4029 |
-
|
|
|
4030 |
|
4031 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4032 |
|
4033 |
|
4034 |
/**
|
4035 |
-
*
|
4036 |
*/
|
4037 |
|
4038 |
|
4039 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4040 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4041 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4042 |
|
4043 |
|
4044 |
/**
|
4045 |
-
*
|
4046 |
*/
|
4047 |
|
4048 |
|
4049 |
|
4050 |
|
|
|
|
|
|
|
|
|
4051 |
|
4052 |
-
const
|
4053 |
-
const
|
4054 |
-
const Dashboard = Object(external_wp_element_["lazy"])(() => __webpack_require__.e(/* import() | dashboard */ 25).then(__webpack_require__.bind(null, 644)));
|
4055 |
-
const Homescreen = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | homescreen */[__webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(3), __webpack_require__.e(31)]).then(__webpack_require__.bind(null, 650)));
|
4056 |
-
const MarketingOverview = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | marketing-overview */[__webpack_require__.e(2), __webpack_require__.e(34)]).then(__webpack_require__.bind(null, 655)));
|
4057 |
-
const ProfileWizard = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | profile-wizard */[__webpack_require__.e(1), __webpack_require__.e(47)]).then(__webpack_require__.bind(null, 651)));
|
4058 |
-
const SettingsGroup = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | profile-wizard */[__webpack_require__.e(1), __webpack_require__.e(47)]).then(__webpack_require__.bind(null, 645)));
|
4059 |
-
const WCPaymentsWelcomePage = Object(external_wp_element_["lazy"])(() => __webpack_require__.e(/* import() | wcpay-payment-welcome-page */ 54).then(__webpack_require__.bind(null, 653)));
|
4060 |
-
const PAGES_FILTER = 'woocommerce_admin_pages_list';
|
4061 |
-
const getPages = () => {
|
4062 |
-
const pages = [];
|
4063 |
-
const initialBreadcrumbs = [['', Object(admin_settings["d" /* getAdminSetting */])('woocommerceTranslation')]];
|
4064 |
-
pages.push({
|
4065 |
-
container: Homescreen,
|
4066 |
-
path: '/',
|
4067 |
-
breadcrumbs: [...initialBreadcrumbs, Object(external_wp_i18n_["__"])('Home', 'woocommerce-admin')],
|
4068 |
-
wpOpenMenu: 'toplevel_page_woocommerce',
|
4069 |
-
navArgs: {
|
4070 |
-
id: 'woocommerce-home'
|
4071 |
-
},
|
4072 |
-
capability: 'manage_woocommerce'
|
4073 |
-
});
|
4074 |
|
4075 |
-
|
4076 |
-
|
4077 |
-
|
4078 |
-
path: '/analytics/overview',
|
4079 |
-
breadcrumbs: [...initialBreadcrumbs, ['/analytics/overview', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Overview', 'woocommerce-admin')],
|
4080 |
-
wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
|
4081 |
-
navArgs: {
|
4082 |
-
id: 'woocommerce-analytics-overview'
|
4083 |
-
},
|
4084 |
-
capability: 'view_woocommerce_reports'
|
4085 |
-
});
|
4086 |
-
pages.push({
|
4087 |
-
container: AnalyticsSettings,
|
4088 |
-
path: '/analytics/settings',
|
4089 |
-
breadcrumbs: [...initialBreadcrumbs, ['/analytics/revenue', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Settings', 'woocommerce-admin')],
|
4090 |
-
wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
|
4091 |
-
navArgs: {
|
4092 |
-
id: 'woocommerce-analytics-settings'
|
4093 |
-
},
|
4094 |
-
capability: 'view_woocommerce_reports'
|
4095 |
-
});
|
4096 |
-
pages.push({
|
4097 |
-
container: AnalyticsReport,
|
4098 |
-
path: '/customers',
|
4099 |
-
breadcrumbs: [...initialBreadcrumbs, Object(external_wp_i18n_["__"])('Customers', 'woocommerce-admin')],
|
4100 |
-
wpOpenMenu: 'toplevel_page_woocommerce',
|
4101 |
-
navArgs: {
|
4102 |
-
id: 'woocommerce-analytics-customers'
|
4103 |
-
},
|
4104 |
-
capability: 'view_woocommerce_reports'
|
4105 |
});
|
4106 |
-
|
4107 |
-
|
4108 |
-
path: '/analytics/:report',
|
4109 |
-
breadcrumbs: _ref => {
|
4110 |
-
let {
|
4111 |
-
match
|
4112 |
-
} = _ref;
|
4113 |
-
const report = Object(external_lodash_["find"])(Object(get_reports["a" /* default */])(), {
|
4114 |
-
report: match.params.report
|
4115 |
-
});
|
4116 |
|
4117 |
-
|
4118 |
-
|
4119 |
-
}
|
4120 |
|
4121 |
-
return [...initialBreadcrumbs, ['/analytics/revenue', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], report.title];
|
4122 |
-
},
|
4123 |
-
wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
|
4124 |
-
capability: 'view_woocommerce_reports'
|
4125 |
-
});
|
4126 |
-
}
|
4127 |
|
4128 |
-
if (
|
4129 |
-
|
4130 |
-
|
4131 |
-
|
4132 |
-
|
4133 |
-
|
4134 |
-
|
4135 |
-
|
4136 |
-
|
4137 |
-
capability: 'view_woocommerce_reports'
|
4138 |
-
});
|
4139 |
}
|
4140 |
|
4141 |
-
|
4142 |
-
|
4143 |
-
|
4144 |
-
|
4145 |
-
|
4146 |
-
|
4147 |
-
|
4148 |
-
|
|
|
|
|
|
|
4149 |
|
4150 |
-
|
4151 |
-
|
4152 |
-
container: SettingsGroup,
|
4153 |
-
path: '/settings/:page',
|
4154 |
-
breadcrumbs: _ref2 => {
|
4155 |
-
let {
|
4156 |
-
match
|
4157 |
-
} = _ref2;
|
4158 |
-
// @todo This might need to be refactored to retreive groups via data store.
|
4159 |
-
const settingsPages = Object(admin_settings["d" /* getAdminSetting */])('settingsPages');
|
4160 |
-
const page = settingsPages[match.params.page];
|
4161 |
|
4162 |
-
if (!page) {
|
4163 |
-
return [];
|
4164 |
-
}
|
4165 |
|
4166 |
-
|
4167 |
-
|
4168 |
-
|
4169 |
-
capability: 'manage_woocommerce'
|
4170 |
-
});
|
4171 |
-
}
|
4172 |
|
4173 |
-
if (window.wcAdminFeatures['wc-pay-welcome-page']) {
|
4174 |
-
pages.push({
|
4175 |
-
container: WCPaymentsWelcomePage,
|
4176 |
-
path: '/wc-pay-welcome-page',
|
4177 |
-
breadcrumbs: [['/wc-pay-welcome-page', Object(external_wp_i18n_["__"])('WooCommerce Payments', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('WooCommerce Payments', 'woocommerce-admin')],
|
4178 |
-
navArgs: {
|
4179 |
-
id: 'woocommerce-wc-pay-welcome-page'
|
4180 |
-
},
|
4181 |
-
wpOpenMenu: 'toplevel_page_woocommerce-wc-pay-welcome-page',
|
4182 |
-
capability: 'manage_woocommerce'
|
4183 |
-
});
|
4184 |
-
}
|
4185 |
-
/**
|
4186 |
-
* List of WooCommerce Admin pages.
|
4187 |
-
*
|
4188 |
-
* @filter woocommerce_admin_pages_list
|
4189 |
-
* @param {Array.<Object>} pages Array page objects.
|
4190 |
-
*/
|
4191 |
|
4192 |
|
4193 |
-
|
4194 |
-
|
4195 |
-
|
4196 |
-
path: '*',
|
4197 |
-
breadcrumbs: [...initialBreadcrumbs, Object(external_wp_i18n_["__"])('Not allowed', 'woocommerce-admin')],
|
4198 |
-
wpOpenMenu: 'toplevel_page_woocommerce'
|
4199 |
-
});
|
4200 |
-
return filteredPages;
|
4201 |
-
};
|
4202 |
-
class controller_Controller extends external_wp_element_["Component"] {
|
4203 |
-
componentDidMount() {
|
4204 |
-
window.document.documentElement.scrollTop = 0;
|
4205 |
-
window.document.body.classList.remove('woocommerce-admin-is-loading');
|
4206 |
-
}
|
4207 |
|
4208 |
-
componentDidUpdate(prevProps) {
|
4209 |
-
const prevBaseQuery = Object(external_lodash_["omit"])(prevProps.query, 'chartType', 'filter', 'paged');
|
4210 |
-
const baseQuery = Object(external_lodash_["omit"])(this.props.query, 'chartType', 'filter', 'paged');
|
4211 |
|
4212 |
-
if (prevProps.query.paged > 1 && !Object(external_lodash_["isEqual"])(prevBaseQuery, baseQuery)) {
|
4213 |
-
Object(external_wc_navigation_["getHistory"])().replace(Object(external_wc_navigation_["getNewPath"])({
|
4214 |
-
paged: 1
|
4215 |
-
}));
|
4216 |
-
}
|
4217 |
|
4218 |
-
|
4219 |
-
|
4220 |
-
|
|
|
|
|
|
|
|
|
|
|
4221 |
}
|
4222 |
|
4223 |
-
|
4224 |
-
|
4225 |
-
|
4226 |
-
|
4227 |
-
|
4228 |
-
|
4229 |
-
|
4230 |
-
|
4231 |
-
|
4232 |
-
|
4233 |
-
|
4234 |
-
|
4235 |
-
|
4236 |
-
|
4237 |
-
|
4238 |
-
|
4239 |
-
|
4240 |
-
|
4241 |
-
|
4242 |
-
|
4243 |
-
|
|
|
|
|
|
|
|
|
|
|
4244 |
|
4245 |
-
}
|
4246 |
/**
|
4247 |
-
*
|
4248 |
-
* as is.
|
4249 |
-
*
|
4250 |
-
* @param {HTMLElement} item - Sidebar anchor link.
|
4251 |
-
* @param {Object} nextQuery - A query object to be added to updated hrefs.
|
4252 |
-
* @param {Array} excludedScreens - wc-admin screens to avoid updating.
|
4253 |
*/
|
4254 |
|
4255 |
-
|
4256 |
-
|
4257 |
-
|
4258 |
-
const query = Object(lib["parse"])(search);
|
4259 |
-
const path = query.path || 'homescreen';
|
4260 |
-
const screen = Object(external_wc_navigation_["getScreenFromPath"])(path);
|
4261 |
-
const isExcludedScreen = excludedScreens.includes(screen);
|
4262 |
-
const href = 'admin.php?' + Object(lib["stringify"])(Object.assign(query, isExcludedScreen ? {} : nextQuery)); // Replace the href so you can see the url on hover.
|
4263 |
|
4264 |
-
item.href = href;
|
4265 |
|
4266 |
-
|
4267 |
-
|
4268 |
-
|
4269 |
-
|
|
|
|
|
|
|
|
|
4270 |
}
|
4271 |
-
} // Update's wc-admin links in wp-admin menu
|
4272 |
|
4273 |
-
|
4274 |
-
|
4275 |
-
|
4276 |
-
|
4277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4278 |
|
4279 |
|
4280 |
-
|
4281 |
-
|
4282 |
-
|
4283 |
-
|
4284 |
-
|
4285 |
-
|
4286 |
-
|
4287 |
-
|
4288 |
-
|
4289 |
-
|
4290 |
-
|
4291 |
-
|
4292 |
-
|
4293 |
-
|
4294 |
-
|
4295 |
-
|
4296 |
-
|
4297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4298 |
});
|
|
|
|
|
|
|
|
|
|
|
4299 |
|
4300 |
-
|
4301 |
-
|
|
|
4302 |
|
4303 |
-
|
4304 |
-
|
4305 |
-
|
4306 |
-
|
4307 |
-
|
|
|
|
|
|
|
|
|
|
|
4308 |
}
|
4309 |
-
}
|
4310 |
|
4311 |
-
|
4312 |
-
|
4313 |
-
|
4314 |
-
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
4315 |
-
var classnames = __webpack_require__(7);
|
4316 |
-
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
4317 |
|
4318 |
-
|
4319 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4320 |
|
4321 |
-
|
4322 |
-
|
|
|
|
|
|
|
4323 |
|
4324 |
-
|
4325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4326 |
|
4327 |
-
|
4328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4329 |
|
4330 |
-
|
|
|
4331 |
/**
|
4332 |
* External dependencies
|
4333 |
*/
|
4334 |
|
4335 |
-
|
4336 |
-
|
4337 |
-
|
4338 |
-
Object(external_wp_element_["useEffect"])(() => {
|
4339 |
-
const updateIsScrolled = () => {
|
4340 |
-
setIsScrolled(window.pageYOffset > 20);
|
4341 |
-
};
|
4342 |
|
4343 |
-
const scrollListener = () => {
|
4344 |
-
rafHandle.current = window.requestAnimationFrame(updateIsScrolled);
|
4345 |
-
};
|
4346 |
|
4347 |
-
window.addEventListener('scroll', scrollListener);
|
4348 |
-
return () => {
|
4349 |
-
window.removeEventListener('scroll', scrollListener);
|
4350 |
-
window.cancelAnimationFrame(rafHandle.current);
|
4351 |
-
};
|
4352 |
-
}, []);
|
4353 |
-
return isScrolled;
|
4354 |
-
}
|
4355 |
-
// EXTERNAL MODULE: ./client/header/utils.js
|
4356 |
-
var header_utils = __webpack_require__(54);
|
4357 |
|
|
|
|
|
4358 |
// CONCATENATED MODULE: ./client/header/index.js
|
4359 |
|
4360 |
|
@@ -4367,6 +3763,12 @@ var header_utils = __webpack_require__(54);
|
|
4367 |
|
4368 |
|
4369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4370 |
/**
|
4371 |
* Internal dependencies
|
4372 |
*/
|
@@ -4374,41 +3776,92 @@ var header_utils = __webpack_require__(54);
|
|
4374 |
|
4375 |
|
4376 |
|
4377 |
-
const PAGE_TITLE_FILTER = 'woocommerce_admin_header_page_title';
|
4378 |
-
const Header = _ref => {
|
4379 |
-
var _pageTitleSlot$fills;
|
4380 |
|
4381 |
-
let {
|
4382 |
-
sections,
|
4383 |
-
isEmbedded = false,
|
4384 |
-
query
|
4385 |
-
} = _ref;
|
4386 |
-
const headerElement = Object(external_wp_element_["useRef"])(null);
|
4387 |
-
const siteTitle = Object(external_wc_wcSettings_["getSetting"])('siteTitle', '');
|
4388 |
-
const pageTitle = sections.slice(-1)[0];
|
4389 |
-
const isScrolled = useIsScrolled();
|
4390 |
-
let debounceTimer = null;
|
4391 |
-
const className = classnames_default()('woocommerce-layout__header', {
|
4392 |
-
'is-scrolled': isScrolled
|
4393 |
-
});
|
4394 |
-
const pageTitleSlot = Object(external_wc_experimental_["useSlot"])('woocommerce_header_page_title');
|
4395 |
-
const hasPageTitleFills = Boolean(pageTitleSlot === null || pageTitleSlot === void 0 ? void 0 : (_pageTitleSlot$fills = pageTitleSlot.fills) === null || _pageTitleSlot$fills === void 0 ? void 0 : _pageTitleSlot$fills.length);
|
4396 |
-
const headerItemSlot = Object(external_wc_experimental_["useSlot"])('woocommerce_header_item');
|
4397 |
-
const headerItemSlotFills = headerItemSlot === null || headerItemSlot === void 0 ? void 0 : headerItemSlot.fills;
|
4398 |
-
Object(external_wp_element_["useLayoutEffect"])(() => {
|
4399 |
-
updateBodyMargin();
|
4400 |
-
window.addEventListener('resize', updateBodyMargin);
|
4401 |
-
return () => {
|
4402 |
-
window.removeEventListener('resize', updateBodyMargin);
|
4403 |
-
const wpBody = document.querySelector('#wpbody');
|
4404 |
|
4405 |
-
|
4406 |
-
|
4407 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4408 |
|
4409 |
wpBody.style.marginTop = null;
|
4410 |
};
|
4411 |
-
}, [
|
4412 |
|
4413 |
const updateBodyMargin = () => {
|
4414 |
clearTimeout(debounceTimer);
|
@@ -4437,28 +3890,31 @@ const Header = _ref => {
|
|
4437 |
}
|
4438 |
}
|
4439 |
}, [isEmbedded, sections, siteTitle]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4440 |
return Object(external_wp_element_["createElement"])("div", {
|
4441 |
className: className,
|
4442 |
ref: headerElement
|
4443 |
-
}, Object(external_wp_element_["createElement"])(
|
|
|
|
|
|
|
4444 |
className: "woocommerce-layout__header-wrapper"
|
4445 |
-
}, Object(external_wp_element_["createElement"])(
|
4446 |
-
|
4447 |
-
isEmbedded,
|
4448 |
-
query
|
4449 |
-
}
|
4450 |
-
}), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
4451 |
-
className: `woocommerce-layout__header-heading`,
|
4452 |
as: "h1"
|
4453 |
-
}, Object(external_wp_htmlEntities_["decodeEntities"])(
|
4454 |
-
|
4455 |
-
|
4456 |
-
|
4457 |
-
|
4458 |
-
}) : pageTitle)), Object(external_wp_element_["createElement"])(header_utils["a" /* WooHeaderItem */].Slot, {
|
4459 |
-
fillProps: {
|
4460 |
-
isEmbedded,
|
4461 |
-
query
|
4462 |
}
|
4463 |
})));
|
4464 |
};
|
@@ -4481,11 +3937,11 @@ class notices_Notices extends external_wp_element_["Component"] {
|
|
4481 |
}
|
4482 |
|
4483 |
/* harmony default export */ var layout_notices = (notices_Notices);
|
4484 |
-
// EXTERNAL MODULE: ./node_modules
|
4485 |
-
var
|
4486 |
|
4487 |
// EXTERNAL MODULE: ./client/layout/transient-notices/snackbar/index.js
|
4488 |
-
var snackbar = __webpack_require__(
|
4489 |
|
4490 |
// CONCATENATED MODULE: ./client/layout/transient-notices/snackbar/list.js
|
4491 |
|
@@ -4516,18 +3972,16 @@ var snackbar = __webpack_require__(259);
|
|
4516 |
* @return {Object} The rendered notices list.
|
4517 |
*/
|
4518 |
|
4519 |
-
function SnackbarList(
|
4520 |
-
|
4521 |
-
|
4522 |
-
|
4523 |
-
|
4524 |
-
|
4525 |
-
|
4526 |
-
} = _ref;
|
4527 |
const isReducedMotion = Object(external_wp_compose_["useReducedMotion"])();
|
4528 |
const [refMap] = Object(external_wp_element_["useState"])(() => new WeakMap());
|
4529 |
-
const transitions = Object(
|
4530 |
-
keys: notice => notice.id,
|
4531 |
from: {
|
4532 |
opacity: 0,
|
4533 |
height: 0
|
@@ -4556,7 +4010,12 @@ function SnackbarList(_ref) {
|
|
4556 |
|
4557 |
return Object(external_wp_element_["createElement"])("div", {
|
4558 |
className: className
|
4559 |
-
}, children, transitions((
|
|
|
|
|
|
|
|
|
|
|
4560 |
style: style
|
4561 |
}, Object(external_wp_element_["createElement"])("div", {
|
4562 |
className: "components-snackbar-list__notice-container",
|
@@ -4568,7 +4027,7 @@ function SnackbarList(_ref) {
|
|
4568 |
|
4569 |
/* harmony default export */ var list = (SnackbarList);
|
4570 |
// EXTERNAL MODULE: ./client/layout/transient-notices/style.scss
|
4571 |
-
var transient_notices_style = __webpack_require__(
|
4572 |
|
4573 |
// CONCATENATED MODULE: ./client/layout/transient-notices/index.js
|
4574 |
|
@@ -4633,12 +4092,6 @@ function TransientNotices(props) {
|
|
4633 |
|
4634 |
Object(external_wp_element_["useEffect"])(() => {
|
4635 |
getCurrentUserNotices().forEach(queuedNotice => {
|
4636 |
-
/**
|
4637 |
-
* Filter each transient notice.
|
4638 |
-
*
|
4639 |
-
* @filter woocommerce_admin_queued_notice_filter
|
4640 |
-
* @param {Object} notice A transient notice.
|
4641 |
-
*/
|
4642 |
const notice = Object(external_wp_hooks_["applyFilters"])(QUEUED_NOTICE_FILTER, queuedNotice);
|
4643 |
createNotice2(notice.status, notice.content, {
|
4644 |
onDismiss: () => {
|
@@ -4682,52 +4135,17 @@ TransientNotices.propTypes = {
|
|
4682 |
notices: prop_types_default.a.array
|
4683 |
};
|
4684 |
/* harmony default export */ var transient_notices = (TransientNotices);
|
4685 |
-
//
|
4686 |
-
var build_module_icon = __webpack_require__(105);
|
4687 |
|
4688 |
-
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/help.js
|
4689 |
-
var library_help = __webpack_require__(525);
|
4690 |
|
4691 |
-
|
4692 |
-
|
|
|
|
|
4693 |
|
4694 |
-
// EXTERNAL MODULE: ./client/activity-panel/style.scss
|
4695 |
-
var activity_panel_style = __webpack_require__(298);
|
4696 |
|
4697 |
-
// CONCATENATED MODULE: ./client/activity-panel/icon-flag.js
|
4698 |
|
4699 |
-
const IconFlag = () => Object(external_wp_element_["createElement"])("svg", {
|
4700 |
-
width: "24",
|
4701 |
-
height: "24",
|
4702 |
-
viewBox: "0 0 24 24",
|
4703 |
-
fill: "none",
|
4704 |
-
xmlns: "http://www.w3.org/2000/svg"
|
4705 |
-
}, Object(external_wp_element_["createElement"])("mask", {
|
4706 |
-
id: "mask0_2915:6733",
|
4707 |
-
maskUnits: "userSpaceOnUse",
|
4708 |
-
x: "4",
|
4709 |
-
y: "3",
|
4710 |
-
width: "16",
|
4711 |
-
height: "18"
|
4712 |
-
}, Object(external_wp_element_["createElement"])("path", {
|
4713 |
-
fillRule: "evenodd",
|
4714 |
-
clipRule: "evenodd",
|
4715 |
-
d: "M4.5 3.5H13.5L13.9 5.5H19.5V15.5H12.5L12.1 13.5H6.5V20.5H4.5V3.5ZM12.26 7.5L11.86 5.5H6.5V11.5H13.74L14.14 13.5H17.5V7.5H12.26Z",
|
4716 |
-
fill: "white"
|
4717 |
-
})), Object(external_wp_element_["createElement"])("g", {
|
4718 |
-
mask: "url(#mask0_2915:6733)"
|
4719 |
-
}, Object(external_wp_element_["createElement"])("rect", {
|
4720 |
-
width: "24",
|
4721 |
-
height: "24",
|
4722 |
-
fill: "#50575E"
|
4723 |
-
})));
|
4724 |
-
// EXTERNAL MODULE: ./client/inbox-panel/utils.js
|
4725 |
-
var inbox_panel_utils = __webpack_require__(176);
|
4726 |
|
4727 |
-
// CONCATENATED MODULE: ./client/activity-panel/unread-indicators.js
|
4728 |
-
/**
|
4729 |
-
* External dependencies
|
4730 |
-
*/
|
4731 |
|
4732 |
/**
|
4733 |
* Internal dependencies
|
@@ -4735,84 +4153,57 @@ var inbox_panel_utils = __webpack_require__(176);
|
|
4735 |
|
4736 |
|
4737 |
|
4738 |
-
const UNREAD_NOTES_QUERY = {
|
4739 |
-
page: 1,
|
4740 |
-
per_page: external_wc_data_["QUERY_DEFAULTS"].pageSize,
|
4741 |
-
status: 'unactioned',
|
4742 |
-
type: external_wc_data_["QUERY_DEFAULTS"].noteTypes,
|
4743 |
-
orderby: 'date',
|
4744 |
-
order: 'desc'
|
4745 |
-
};
|
4746 |
-
function isNotesPanelVisible(select) {
|
4747 |
-
const {
|
4748 |
-
getNotes,
|
4749 |
-
getNotesError,
|
4750 |
-
isResolving
|
4751 |
-
} = select(external_wc_data_["NOTES_STORE_NAME"]);
|
4752 |
-
const {
|
4753 |
-
getCurrentUser
|
4754 |
-
} = select(external_wc_data_["USER_STORE_NAME"]);
|
4755 |
-
const userData = getCurrentUser();
|
4756 |
-
const lastRead = parseInt(userData && userData.woocommerce_meta && userData.woocommerce_meta.activity_panel_inbox_last_read, 10);
|
4757 |
|
4758 |
-
if (!lastRead) {
|
4759 |
-
return null;
|
4760 |
-
}
|
4761 |
|
4762 |
-
|
4763 |
-
const
|
4764 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4765 |
|
4766 |
-
if (
|
4767 |
return null;
|
4768 |
}
|
4769 |
|
4770 |
-
const
|
4771 |
-
const
|
4772 |
-
|
4773 |
-
|
4774 |
-
|
4775 |
-
|
4776 |
-
}
|
4777 |
-
// CONCATENATED MODULE: ./client/activity-panel/tab/index.js
|
4778 |
-
|
4779 |
-
|
4780 |
-
/**
|
4781 |
-
* External dependencies
|
4782 |
-
*/
|
4783 |
-
|
4784 |
-
|
4785 |
|
4786 |
-
|
4787 |
-
let {
|
4788 |
-
icon,
|
4789 |
-
title,
|
4790 |
-
name,
|
4791 |
-
unread,
|
4792 |
-
selected,
|
4793 |
-
isPanelOpen,
|
4794 |
-
onTabClick
|
4795 |
-
} = _ref;
|
4796 |
-
const className = classnames_default()('woocommerce-layout__activity-panel-tab', {
|
4797 |
-
'is-active': isPanelOpen && selected,
|
4798 |
-
'has-unread': unread
|
4799 |
});
|
4800 |
-
|
4801 |
-
|
4802 |
-
|
4803 |
-
|
4804 |
-
"
|
4805 |
-
"
|
4806 |
-
|
4807 |
-
|
4808 |
-
|
4809 |
-
|
4810 |
-
|
4811 |
-
|
4812 |
-
|
4813 |
-
|
|
|
4814 |
};
|
4815 |
-
|
|
|
|
|
|
|
|
|
4816 |
|
4817 |
|
4818 |
|
@@ -4822,103 +4213,20 @@ const Tab = _ref => {
|
|
4822 |
|
4823 |
|
4824 |
|
4825 |
-
/**
|
4826 |
-
* Internal dependencies
|
4827 |
-
*/
|
4828 |
|
4829 |
|
4830 |
-
const Tabs = _ref => {
|
4831 |
-
let {
|
4832 |
-
tabs,
|
4833 |
-
onTabClick,
|
4834 |
-
selectedTab: selectedTabName,
|
4835 |
-
tabOpen = false
|
4836 |
-
} = _ref;
|
4837 |
-
const [{
|
4838 |
-
tabOpen: tabIsOpenState,
|
4839 |
-
currentTab
|
4840 |
-
}, setTabState] = Object(external_wp_element_["useState"])({
|
4841 |
-
tabOpen,
|
4842 |
-
currentTab: selectedTabName
|
4843 |
-
}); // Keep state synced with props
|
4844 |
|
4845 |
-
Object(external_wp_element_["useEffect"])(() => {
|
4846 |
-
setTabState({
|
4847 |
-
tabOpen,
|
4848 |
-
currentTab: selectedTabName
|
4849 |
-
});
|
4850 |
-
}, [tabOpen, selectedTabName]);
|
4851 |
-
return Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], {
|
4852 |
-
role: "tablist",
|
4853 |
-
orientation: "horizontal",
|
4854 |
-
className: "woocommerce-layout__activity-panel-tabs"
|
4855 |
-
}, tabs && tabs.map((tab, i) => {
|
4856 |
-
if (tab.component) {
|
4857 |
-
const {
|
4858 |
-
component: Comp,
|
4859 |
-
options
|
4860 |
-
} = tab;
|
4861 |
-
return Object(external_wp_element_["createElement"])(Comp, extends_default()({
|
4862 |
-
key: i
|
4863 |
-
}, options));
|
4864 |
-
}
|
4865 |
|
4866 |
-
return Object(external_wp_element_["createElement"])(Tab, extends_default()({
|
4867 |
-
key: i,
|
4868 |
-
index: i,
|
4869 |
-
isPanelOpen: tabIsOpenState,
|
4870 |
-
selected: currentTab === tab.name
|
4871 |
-
}, tab, {
|
4872 |
-
onTabClick: () => {
|
4873 |
-
const isTabOpen = currentTab === tab.name || currentTab === '' ? !tabIsOpenState : true; // If a panel is being opened, or if an existing panel is already open and a different one is being opened, record a track.
|
4874 |
|
4875 |
-
if (!isTabOpen || currentTab !== tab.name) {
|
4876 |
-
Object(external_wc_tracks_["recordEvent"])('activity_panel_open', {
|
4877 |
-
tab: tab.name
|
4878 |
-
});
|
4879 |
-
}
|
4880 |
|
4881 |
-
setTabState({
|
4882 |
-
tabOpen: isTabOpen,
|
4883 |
-
currentTab: tab.name
|
4884 |
-
});
|
4885 |
-
onTabClick(tab, isTabOpen);
|
4886 |
-
}
|
4887 |
-
}));
|
4888 |
-
}));
|
4889 |
-
};
|
4890 |
-
// CONCATENATED MODULE: ./client/activity-panel/setup-progress.js
|
4891 |
|
4892 |
-
const SetupProgress = () => Object(external_wp_element_["createElement"])("svg", {
|
4893 |
-
className: "woocommerce-layout__activity-panel-tab-icon setup-progress",
|
4894 |
-
width: "18",
|
4895 |
-
height: "18",
|
4896 |
-
viewBox: "0 0 24 24",
|
4897 |
-
fill: "none",
|
4898 |
-
xmlns: "http://www.w3.org/2000/svg"
|
4899 |
-
}, Object(external_wp_element_["createElement"])("path", {
|
4900 |
-
d: "M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",
|
4901 |
-
stroke: "#DCDCDE",
|
4902 |
-
strokeWidth: "2"
|
4903 |
-
}), Object(external_wp_element_["createElement"])("path", {
|
4904 |
-
d: "M4 12V12C4 16.4183 7.58172 20 12 20V20C16.4183 20 20 16.4183 20 12V12C20 7.58172 16.4183 4 12 4V4",
|
4905 |
-
strokeWidth: "2",
|
4906 |
-
strokeLinecap: "round"
|
4907 |
-
}));
|
4908 |
-
// EXTERNAL MODULE: ./client/activity-panel/display-options/index.js + 3 modules
|
4909 |
-
var display_options = __webpack_require__(168);
|
4910 |
|
4911 |
-
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
|
4912 |
-
var library_close = __webpack_require__(522);
|
4913 |
|
4914 |
-
// EXTERNAL MODULE: ./client/activity-panel/highlight-tooltip/style.scss
|
4915 |
-
var highlight_tooltip_style = __webpack_require__(299);
|
4916 |
|
4917 |
-
// CONCATENATED MODULE: ./client/activity-panel/highlight-tooltip/index.js
|
4918 |
|
4919 |
|
4920 |
/**
|
4921 |
-
*
|
4922 |
*/
|
4923 |
|
4924 |
|
@@ -4926,3370 +4234,3897 @@ var highlight_tooltip_style = __webpack_require__(299);
|
|
4926 |
|
4927 |
|
4928 |
|
4929 |
-
/**
|
4930 |
-
* Internal dependencies
|
4931 |
-
*/
|
4932 |
-
|
4933 |
-
|
4934 |
-
const SHOW_CLASS = 'highlight-tooltip__show';
|
4935 |
|
4936 |
-
|
4937 |
-
|
4938 |
-
|
4939 |
-
|
4940 |
-
|
4941 |
-
|
4942 |
-
|
4943 |
-
|
4944 |
-
|
4945 |
-
|
4946 |
-
|
4947 |
-
|
4948 |
-
|
4949 |
-
|
4950 |
-
const [anchorRect, setAnchorRect] = Object(external_wp_element_["useState"])(null);
|
4951 |
-
Object(external_wp_element_["useEffect"])(() => {
|
4952 |
-
const element = document.getElementById(id);
|
4953 |
-
let container, parent;
|
4954 |
-
|
4955 |
-
if (element && !node) {
|
4956 |
-
// Add tooltip container
|
4957 |
-
if (!useAnchor) {
|
4958 |
-
parent = element.parentElement;
|
4959 |
-
} else {
|
4960 |
-
parent = document.createElement('div');
|
4961 |
-
document.body.appendChild(parent);
|
4962 |
-
}
|
4963 |
-
|
4964 |
-
container = document.createElement('div');
|
4965 |
-
container.classList.add('highlight-tooltip__container');
|
4966 |
-
parent.appendChild(container);
|
4967 |
-
setNode(container);
|
4968 |
-
}
|
4969 |
|
4970 |
-
|
4971 |
-
return () => {
|
4972 |
-
if (container) {
|
4973 |
-
const parentElement = container.parentElement;
|
4974 |
-
parentElement.removeChild(container);
|
4975 |
|
4976 |
-
|
4977 |
-
|
4978 |
-
|
4979 |
-
|
4980 |
|
4981 |
-
|
4982 |
-
|
4983 |
-
|
4984 |
-
};
|
4985 |
-
}, []);
|
4986 |
-
Object(external_wp_element_["useEffect"])(() => {
|
4987 |
-
if (!showHighlight && node) {
|
4988 |
-
node.classList.remove(SHOW_CLASS);
|
4989 |
-
}
|
4990 |
-
}, [showHighlight]);
|
4991 |
-
Object(external_wp_element_["useEffect"])(() => {
|
4992 |
-
if (show !== showHighlight && showHighlight !== null && node) {
|
4993 |
-
setShowHighlight(show);
|
4994 |
|
4995 |
-
|
4996 |
-
|
4997 |
-
} else if (node) {
|
4998 |
-
triggerShowTooltip(node);
|
4999 |
-
}
|
5000 |
}
|
5001 |
-
}, [show]);
|
5002 |
-
Object(external_wp_element_["useLayoutEffect"])(() => {
|
5003 |
-
window.addEventListener('resize', updateSize);
|
5004 |
-
return () => window.removeEventListener('resize', updateSize);
|
5005 |
-
}, []);
|
5006 |
|
5007 |
-
|
5008 |
-
|
5009 |
-
const element = document.getElementById(id);
|
5010 |
-
setAnchorRect(element.getBoundingClientRect());
|
5011 |
}
|
5012 |
}
|
5013 |
|
5014 |
-
|
5015 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5016 |
|
5017 |
-
if (
|
5018 |
-
|
5019 |
-
|
5020 |
-
|
5021 |
-
|
5022 |
-
|
5023 |
-
|
5024 |
}
|
5025 |
|
5026 |
-
|
5027 |
-
};
|
5028 |
-
|
5029 |
-
const showTooltip = container => {
|
5030 |
-
const element = document.getElementById(id);
|
5031 |
-
|
5032 |
-
if (element && useAnchor) {
|
5033 |
-
setAnchorRect(element.getBoundingClientRect());
|
5034 |
-
}
|
5035 |
|
5036 |
-
if (
|
5037 |
-
|
5038 |
-
}
|
5039 |
|
5040 |
-
setShowHighlight(true);
|
5041 |
-
onShow();
|
5042 |
-
};
|
5043 |
|
5044 |
-
|
5045 |
-
setShowHighlight(false);
|
5046 |
|
5047 |
-
if (
|
5048 |
-
|
5049 |
}
|
5050 |
-
};
|
5051 |
|
5052 |
-
|
5053 |
-
|
|
|
|
|
|
|
|
|
5054 |
}
|
5055 |
|
5056 |
-
|
5057 |
-
|
5058 |
-
|
5059 |
-
|
5060 |
-
}), Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
|
5061 |
-
className: "highlight-tooltip__popover",
|
5062 |
-
noArrow: false,
|
5063 |
-
anchorRect: anchorRect,
|
5064 |
-
focusOnMount: "container"
|
5065 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["Card"], {
|
5066 |
-
size: "medium"
|
5067 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["CardHeader"], null, title, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
5068 |
-
isSmall: true,
|
5069 |
-
onClick: triggerClose,
|
5070 |
-
icon: library_close["a" /* default */]
|
5071 |
-
})), Object(external_wp_element_["createElement"])(external_wp_components_["CardBody"], null, content || null), Object(external_wp_element_["createElement"])(external_wp_components_["CardFooter"], {
|
5072 |
-
isBorderless: true
|
5073 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
5074 |
-
size: "small",
|
5075 |
-
isPrimary: true,
|
5076 |
-
onClick: triggerClose
|
5077 |
-
}, closeButtonText || Object(external_wp_i18n_["__"])('Close', 'woocommerce-admin')))))) : null), node);
|
5078 |
-
}
|
5079 |
|
5080 |
-
|
5081 |
-
|
5082 |
-
|
5083 |
-
*/
|
5084 |
-
id: prop_types_default.a.string.isRequired,
|
5085 |
|
5086 |
-
|
5087 |
-
|
5088 |
-
|
5089 |
-
|
|
|
|
|
|
|
|
|
5090 |
|
5091 |
-
|
5092 |
-
|
5093 |
-
|
5094 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5095 |
|
5096 |
-
|
5097 |
-
* Content of the popup, can be either text or react element.
|
5098 |
-
*/
|
5099 |
-
content: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
|
5100 |
|
5101 |
-
|
5102 |
-
|
5103 |
-
|
5104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5105 |
|
5106 |
-
|
5107 |
-
|
5108 |
-
|
5109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5110 |
|
5111 |
-
|
5112 |
-
|
5113 |
-
|
5114 |
-
|
5115 |
-
|
5116 |
-
|
5117 |
-
|
5118 |
-
|
5119 |
-
|
5120 |
-
|
5121 |
-
|
5122 |
-
|
5123 |
-
|
5124 |
-
|
5125 |
-
|
|
|
5126 |
};
|
5127 |
|
5128 |
-
|
5129 |
-
|
5130 |
|
5131 |
-
|
5132 |
-
|
5133 |
-
|
5134 |
-
|
5135 |
-
|
5136 |
-
|
5137 |
-
*/
|
5138 |
|
5139 |
-
|
5140 |
-
|
5141 |
-
*/
|
5142 |
|
|
|
5143 |
|
5144 |
-
|
5145 |
-
|
5146 |
-
*
|
5147 |
-
* @param {boolean|string} focusOnMount Focus on mount mode.
|
5148 |
-
* @return {Function} Ref callback.
|
5149 |
-
*
|
5150 |
-
* @example
|
5151 |
-
* ```js
|
5152 |
-
* import { useFocusOnMount } from '@wordpress/compose';
|
5153 |
-
*
|
5154 |
-
* const WithFocusOnMount = () => {
|
5155 |
-
* const ref = useFocusOnMount()
|
5156 |
-
* return (
|
5157 |
-
* <div ref={ ref }>
|
5158 |
-
* <Button />
|
5159 |
-
* <Button />
|
5160 |
-
* </div>
|
5161 |
-
* );
|
5162 |
-
* }
|
5163 |
-
* ```
|
5164 |
-
*/
|
5165 |
|
5166 |
-
function
|
5167 |
-
let focusOnMount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'firstElement';
|
5168 |
-
const focusOnMountRef = Object(external_wp_element_["useRef"])(focusOnMount);
|
5169 |
-
Object(external_wp_element_["useEffect"])(() => {
|
5170 |
-
focusOnMountRef.current = focusOnMount;
|
5171 |
-
}, [focusOnMount]);
|
5172 |
-
return Object(external_wp_element_["useCallback"])(node => {
|
5173 |
-
if (!node || focusOnMountRef.current === false) {
|
5174 |
-
return;
|
5175 |
-
}
|
5176 |
|
5177 |
-
|
5178 |
-
return;
|
5179 |
-
}
|
5180 |
|
5181 |
-
|
|
|
5182 |
|
5183 |
-
|
5184 |
-
const firstTabbable = external_wp_dom_["focus"].tabbable.find(node)[0];
|
5185 |
|
5186 |
-
|
5187 |
-
target = firstTabbable;
|
5188 |
-
}
|
5189 |
-
}
|
5190 |
|
5191 |
-
|
5192 |
-
|
5193 |
-
}
|
5194 |
-
// CONCATENATED MODULE: ./client/hooks/useFocusOutside.js
|
5195 |
-
/**
|
5196 |
-
* External dependencies
|
5197 |
-
*/
|
5198 |
|
|
|
5199 |
|
5200 |
-
|
5201 |
-
* Input types which are classified as button types, for use in considering
|
5202 |
-
* whether element is a (focus-normalized) button.
|
5203 |
-
*
|
5204 |
-
* @type {string[]}
|
5205 |
-
*/
|
5206 |
|
5207 |
-
|
5208 |
-
|
5209 |
-
* @typedef {HTMLButtonElement | HTMLLinkElement | HTMLInputElement} FocusNormalizedButton
|
5210 |
-
*/
|
5211 |
-
// Disable reason: Rule doesn't support predicate return types
|
5212 |
|
5213 |
-
|
5214 |
|
5215 |
-
|
5216 |
-
* Returns true if the given element is a button element subject to focus
|
5217 |
-
* normalization, or false otherwise.
|
5218 |
-
*
|
5219 |
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
|
5220 |
-
*
|
5221 |
-
* @param {EventTarget} eventTarget The target from a mouse or touch event.
|
5222 |
-
*
|
5223 |
-
* @return {eventTarget is FocusNormalizedButton} Whether element is a button.
|
5224 |
-
*/
|
5225 |
|
5226 |
-
|
5227 |
-
|
5228 |
-
return false;
|
5229 |
-
}
|
5230 |
|
5231 |
-
|
5232 |
-
|
5233 |
-
case 'BUTTON':
|
5234 |
-
return true;
|
5235 |
|
5236 |
-
|
5237 |
-
|
5238 |
-
|
5239 |
-
|
5240 |
-
}
|
5241 |
|
5242 |
-
|
5243 |
-
|
5244 |
-
/* eslint-enable jsdoc/valid-types */
|
5245 |
|
5246 |
-
|
5247 |
-
|
5248 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5249 |
|
5250 |
-
/**
|
5251 |
-
* @callback EventCallback
|
5252 |
-
* @param {SyntheticEvent} event input related event.
|
5253 |
-
*/
|
5254 |
|
5255 |
-
|
5256 |
-
|
5257 |
-
|
5258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5259 |
|
5260 |
-
/**
|
5261 |
-
* @typedef {import('react').MutableRefObject<FocusOutsideReactElement | undefined>} FocusOutsideRef
|
5262 |
-
*/
|
5263 |
|
5264 |
-
/**
|
5265 |
-
* @typedef {Object} FocusOutsideReturnValue
|
5266 |
-
* @property {EventCallback} onFocus An event handler for focus events.
|
5267 |
-
* @property {EventCallback} onBlur An event handler for blur events.
|
5268 |
-
* @property {EventCallback} onMouseDown An event handler for mouse down events.
|
5269 |
-
* @property {EventCallback} onMouseUp An event handler for mouse up events.
|
5270 |
-
* @property {EventCallback} onTouchStart An event handler for touch start events.
|
5271 |
-
* @property {EventCallback} onTouchEnd An event handler for touch end events.
|
5272 |
-
*/
|
5273 |
|
5274 |
-
|
5275 |
-
|
5276 |
-
|
5277 |
-
|
5278 |
-
|
5279 |
-
* the element the event handlers are bound to.
|
5280 |
-
*
|
5281 |
-
* @return {FocusOutsideReturnValue} An object containing event handlers. Bind the event handlers
|
5282 |
-
* to a wrapping element element to capture when focus moves
|
5283 |
-
* outside that element.
|
5284 |
-
*/
|
5285 |
-
|
5286 |
-
|
5287 |
-
function useFocusOutside(onFocusOutside) {
|
5288 |
-
const currentOnFocusOutside = Object(external_wp_element_["useRef"])(onFocusOutside);
|
5289 |
-
Object(external_wp_element_["useEffect"])(() => {
|
5290 |
-
currentOnFocusOutside.current = onFocusOutside;
|
5291 |
-
}, [onFocusOutside]);
|
5292 |
-
const preventBlurCheck = Object(external_wp_element_["useRef"])(false);
|
5293 |
-
/**
|
5294 |
-
* @type {import('react').MutableRefObject<number | undefined>}
|
5295 |
-
*/
|
5296 |
-
|
5297 |
-
const blurCheckTimeoutId = Object(external_wp_element_["useRef"])();
|
5298 |
-
/**
|
5299 |
-
* Cancel a blur check timeout.
|
5300 |
-
*/
|
5301 |
-
|
5302 |
-
const cancelBlurCheck = Object(external_wp_element_["useCallback"])(() => {
|
5303 |
-
clearTimeout(blurCheckTimeoutId.current);
|
5304 |
-
}, []); // Cancel blur checks on unmount.
|
5305 |
|
5306 |
-
|
5307 |
-
|
5308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5309 |
|
5310 |
-
|
5311 |
-
if (
|
5312 |
-
|
5313 |
}
|
5314 |
-
|
5315 |
-
|
5316 |
-
* Handles a mousedown or mouseup event to respectively assign and
|
5317 |
-
* unassign a flag for preventing blur check on button elements. Some
|
5318 |
-
* browsers, namely Firefox and Safari, do not emit a focus event on
|
5319 |
-
* button elements when clicked, while others do. The logic here
|
5320 |
-
* intends to normalize this as treating click on buttons as focus.
|
5321 |
-
*
|
5322 |
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
|
5323 |
-
*
|
5324 |
-
* @param {SyntheticEvent} event Event for mousedown or mouseup.
|
5325 |
-
*/
|
5326 |
|
5327 |
-
|
5328 |
-
|
5329 |
-
|
5330 |
-
|
5331 |
-
|
5332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5333 |
|
5334 |
-
|
5335 |
-
|
5336 |
-
|
5337 |
-
|
|
|
|
|
5338 |
}
|
5339 |
-
|
5340 |
-
|
5341 |
-
|
5342 |
-
|
5343 |
-
|
5344 |
-
* Calls the `onFocusOutside` callback in an immediate timeout if focus has
|
5345 |
-
* move outside the bound element and is still within the document.
|
5346 |
-
*
|
5347 |
-
* @param {SyntheticEvent} event Blur event.
|
5348 |
-
*/
|
5349 |
|
5350 |
-
|
5351 |
-
|
5352 |
-
|
5353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5354 |
|
5355 |
-
|
5356 |
-
return;
|
5357 |
-
}
|
5358 |
|
5359 |
-
|
5360 |
-
|
5361 |
-
|
5362 |
-
|
5363 |
-
|
5364 |
-
|
5365 |
-
|
5366 |
-
|
5367 |
-
|
5368 |
|
5369 |
-
|
5370 |
-
currentOnFocusOutside.current(event);
|
5371 |
-
}
|
5372 |
-
}, 0);
|
5373 |
-
}, []);
|
5374 |
-
return {
|
5375 |
-
onFocus: cancelBlurCheck,
|
5376 |
-
onMouseDown: normalizeButtonFocus,
|
5377 |
-
onMouseUp: normalizeButtonFocus,
|
5378 |
-
onTouchStart: normalizeButtonFocus,
|
5379 |
-
onTouchEnd: normalizeButtonFocus,
|
5380 |
-
onBlur: queueBlurCheck
|
5381 |
-
};
|
5382 |
-
}
|
5383 |
-
// CONCATENATED MODULE: ./client/activity-panel/panel.js
|
5384 |
|
|
|
|
|
|
|
5385 |
|
|
|
|
|
|
|
|
|
|
|
5386 |
|
5387 |
-
/**
|
5388 |
-
* External dependencies
|
5389 |
-
*/
|
5390 |
|
|
|
5391 |
|
|
|
|
|
5392 |
|
5393 |
-
|
5394 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5395 |
*/
|
5396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5397 |
|
5398 |
|
5399 |
-
|
5400 |
-
let {
|
5401 |
-
content,
|
5402 |
-
isPanelOpen,
|
5403 |
-
isPanelSwitching,
|
5404 |
-
currentTab,
|
5405 |
-
tab,
|
5406 |
-
closePanel,
|
5407 |
-
clearPanel
|
5408 |
-
} = _ref;
|
5409 |
-
const panelClass = 'woocommerce-layout__activity-panel-wrapper';
|
5410 |
-
|
5411 |
-
const handleFocusOutside = event => {
|
5412 |
-
const isClickOnModalOrSnackbar = event.relatedTarget && (event.relatedTarget.closest('.woocommerce-inbox-dismiss-confirmation_modal') || event.relatedTarget.closest('.components-snackbar__action'));
|
5413 |
|
5414 |
-
|
5415 |
-
|
5416 |
-
}
|
5417 |
-
};
|
5418 |
|
5419 |
-
|
5420 |
-
if (!containerRef.current || !isPanelOpen || !tab) {
|
5421 |
-
return;
|
5422 |
-
}
|
5423 |
|
5424 |
-
|
5425 |
-
};
|
5426 |
|
5427 |
-
|
5428 |
-
|
5429 |
-
clearPanel();
|
5430 |
-
possibleFocusPanel();
|
5431 |
-
}
|
5432 |
-
};
|
5433 |
|
5434 |
-
|
5435 |
-
const useFocusOutsideProps = useFocusOutside(handleFocusOutside);
|
5436 |
-
const containerRef = Object(external_wp_element_["useRef"])(null);
|
5437 |
-
const mergedContainerRef = Object(external_wp_element_["useCallback"])(node => {
|
5438 |
-
containerRef.current = node;
|
5439 |
-
focusOnMountRef(node);
|
5440 |
-
}, []);
|
5441 |
|
5442 |
-
|
5443 |
-
return Object(external_wp_element_["createElement"])("div", {
|
5444 |
-
className: panelClass
|
5445 |
-
});
|
5446 |
-
}
|
5447 |
|
5448 |
-
|
5449 |
-
|
5450 |
-
}
|
5451 |
|
5452 |
-
|
5453 |
-
|
5454 |
-
|
5455 |
-
|
5456 |
-
|
5457 |
-
|
5458 |
-
|
5459 |
-
|
5460 |
-
|
5461 |
-
|
5462 |
-
|
5463 |
-
|
5464 |
-
|
5465 |
-
|
5466 |
-
|
5467 |
-
|
5468 |
-
|
5469 |
-
|
5470 |
-
}, content)));
|
5471 |
-
};
|
5472 |
-
/* harmony default export */ var panel = (Panel);
|
5473 |
-
// EXTERNAL MODULE: ./client/homescreen/activity-panel/orders/utils.js
|
5474 |
-
var orders_utils = __webpack_require__(74);
|
5475 |
|
5476 |
-
|
5477 |
-
|
|
|
|
|
|
|
|
|
5478 |
|
5479 |
-
|
5480 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5481 |
|
5482 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5483 |
|
|
|
|
|
|
|
|
|
5484 |
|
|
|
|
|
5485 |
/**
|
5486 |
-
*
|
|
|
|
|
|
|
5487 |
*/
|
5488 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5489 |
|
|
|
|
|
|
|
|
|
|
|
5490 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5491 |
|
|
|
5492 |
|
|
|
|
|
5493 |
|
|
|
5494 |
|
5495 |
|
|
|
5496 |
|
|
|
5497 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5498 |
|
5499 |
-
|
5500 |
-
|
5501 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5502 |
|
|
|
|
|
|
|
5503 |
|
|
|
|
|
|
|
5504 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5506 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5507 |
|
|
|
|
|
5508 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5509 |
|
|
|
|
|
5510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5511 |
|
|
|
5512 |
|
|
|
|
|
|
|
5513 |
|
|
|
|
|
|
|
5514 |
|
5515 |
-
|
5516 |
-
const InboxPanel = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(2), __webpack_require__.e(3), __webpack_require__.e(5)]).then(__webpack_require__.bind(null, 646)));
|
5517 |
-
const ActivityPanel = _ref => {
|
5518 |
-
let {
|
5519 |
-
isEmbedded,
|
5520 |
-
query
|
5521 |
-
} = _ref;
|
5522 |
-
const [currentTab, setCurrentTab] = Object(external_wp_element_["useState"])('');
|
5523 |
-
const [isPanelClosing, setIsPanelClosing] = Object(external_wp_element_["useState"])(false);
|
5524 |
-
const [isPanelOpen, setIsPanelOpen] = Object(external_wp_element_["useState"])(false);
|
5525 |
-
const [isPanelSwitching, setIsPanelSwitching] = Object(external_wp_element_["useState"])(false);
|
5526 |
-
const {
|
5527 |
-
fills
|
5528 |
-
} = Object(external_wc_experimental_["useSlot"])(abbreviated_notifications_panel["a" /* ABBREVIATED_NOTIFICATION_SLOT_NAME */]);
|
5529 |
-
const hasExtendedNotifications = Boolean(fills === null || fills === void 0 ? void 0 : fills.length);
|
5530 |
-
const {
|
5531 |
-
updateUserPreferences,
|
5532 |
-
...userData
|
5533 |
-
} = Object(external_wc_data_["useUserPreferences"])();
|
5534 |
|
5535 |
-
|
5536 |
-
let trackData = {};
|
5537 |
|
5538 |
-
|
5539 |
-
|
|
|
5540 |
|
5541 |
-
|
5542 |
-
|
5543 |
-
|
5544 |
-
|
5545 |
-
const tasks = taskLists.reduce((acc, taskList) => [...acc, ...taskList.tasks], []);
|
5546 |
-
const task = tasks.find(t => t.id === 'appearance');
|
5547 |
-
const demoNotice = getOption('woocommerce_demo_store_notice');
|
5548 |
-
trackData = {
|
5549 |
-
set_notice: demoNotice ? 'Y' : 'N',
|
5550 |
-
create_homepage: (task === null || task === void 0 ? void 0 : (_task$additionalData = task.additionalData) === null || _task$additionalData === void 0 ? void 0 : _task$additionalData.hasHomepage) === true ? 'Y' : 'N',
|
5551 |
-
upload_logo: task !== null && task !== void 0 && (_task$additionalData2 = task.additionalData) !== null && _task$additionalData2 !== void 0 && (_task$additionalData3 = _task$additionalData2.themeMods) !== null && _task$additionalData3 !== void 0 && _task$additionalData3.custom_logo ? 'Y' : 'N'
|
5552 |
-
};
|
5553 |
-
}
|
5554 |
|
5555 |
-
|
|
|
|
|
|
|
5556 |
};
|
5557 |
|
5558 |
-
|
5559 |
-
|
5560 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5561 |
}
|
5562 |
|
5563 |
-
|
5564 |
-
|
5565 |
|
5566 |
-
|
5567 |
-
|
5568 |
-
|
5569 |
-
|
5570 |
-
|
5571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5572 |
}
|
5573 |
|
5574 |
-
|
5575 |
-
|
5576 |
-
|
5577 |
-
|
5578 |
-
|
5579 |
-
|
5580 |
-
setupTaskListComplete,
|
5581 |
-
setupTaskListHidden,
|
5582 |
-
previewSiteBtnTrackData
|
5583 |
-
} = Object(external_wp_data_["useSelect"])(select => {
|
5584 |
-
var _getTaskList, _getTaskList2, _getTask;
|
5585 |
|
5586 |
-
|
5587 |
-
|
5588 |
-
|
5589 |
-
|
5590 |
-
|
5591 |
-
|
5592 |
-
|
5593 |
-
|
5594 |
-
|
5595 |
-
|
5596 |
-
|
5597 |
-
|
5598 |
-
|
5599 |
-
|
5600 |
-
thingsToDoNextCount: thingsToDoCount,
|
5601 |
-
requestingTaskListOptions: !hasFinishedResolution('getTaskLists'),
|
5602 |
-
setupTaskListComplete: (_getTaskList2 = getTaskList('setup')) === null || _getTaskList2 === void 0 ? void 0 : _getTaskList2.isComplete,
|
5603 |
-
setupTaskListHidden: isSetupTaskListHidden,
|
5604 |
-
isCompletedTask: Boolean(query.task && ((_getTask = getTask(query.task)) === null || _getTask === void 0 ? void 0 : _getTask.isComplete)),
|
5605 |
-
previewSiteBtnTrackData: getPreviewSiteBtnTrackData(select, getOption)
|
5606 |
};
|
5607 |
-
});
|
5608 |
-
const {
|
5609 |
-
unhideTaskList
|
5610 |
-
} = Object(external_wp_data_["useDispatch"])(external_wc_data_["ONBOARDING_STORE_NAME"]);
|
5611 |
-
const {
|
5612 |
-
currentUserCan
|
5613 |
-
} = Object(external_wc_data_["useUser"])();
|
5614 |
|
5615 |
-
|
5616 |
-
|
5617 |
-
|
5618 |
-
|
5619 |
-
|
5620 |
|
5621 |
-
|
5622 |
-
|
5623 |
-
}
|
5624 |
|
5625 |
-
|
5626 |
-
setIsPanelOpen(isTabOpen);
|
5627 |
-
setIsPanelSwitching(panelSwitching);
|
5628 |
-
};
|
5629 |
|
5630 |
-
|
5631 |
-
|
5632 |
-
|
5633 |
-
|
5634 |
|
5635 |
-
|
5636 |
-
|
5637 |
-
|
5638 |
-
|
5639 |
-
|
|
|
5640 |
}
|
|
|
|
|
5641 |
};
|
5642 |
|
5643 |
-
|
5644 |
-
return
|
5645 |
};
|
5646 |
|
5647 |
-
|
5648 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5649 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5650 |
|
5651 |
-
|
5652 |
-
|
5653 |
-
|
5654 |
-
} else {
|
5655 |
-
window.location.href = Object(external_wc_wcSettings_["getAdminLink"])('admin.php?page=wc-admin');
|
5656 |
-
}
|
5657 |
-
}; // @todo Pull in dynamic unread status/count
|
5658 |
|
|
|
|
|
|
|
|
|
5659 |
|
5660 |
-
|
5661 |
-
|
5662 |
-
name: 'activity',
|
5663 |
-
title: Object(external_wp_i18n_["__"])('Activity', 'woocommerce-admin'),
|
5664 |
-
icon: Object(external_wp_element_["createElement"])(IconFlag, null),
|
5665 |
-
unread: hasUnreadNotes || hasAbbreviatedNotifications,
|
5666 |
-
visible: (isEmbedded || !isHomescreen()) && !isPerformingSetupTask()
|
5667 |
-
};
|
5668 |
-
const setup = {
|
5669 |
-
name: 'setup',
|
5670 |
-
title: Object(external_wp_i18n_["__"])('Finish setup', 'woocommerce-admin'),
|
5671 |
-
icon: Object(external_wp_element_["createElement"])(SetupProgress, null),
|
5672 |
-
onClick: () => {
|
5673 |
-
const currentLocation = window.location.href;
|
5674 |
-
const homescreenLocation = Object(external_wc_wcSettings_["getAdminLink"])('admin.php?page=wc-admin'); // Don't navigate if we're already on the homescreen, this will cause an infinite loop
|
5675 |
|
5676 |
-
|
5677 |
-
|
5678 |
-
|
5679 |
-
|
5680 |
-
|
5681 |
-
|
5682 |
-
unhideTaskList('setup').then(redirectToHomeScreen);
|
5683 |
-
}
|
5684 |
-
}
|
5685 |
|
5686 |
-
|
5687 |
-
},
|
5688 |
-
visible: currentUserCan('manage_woocommerce') && !requestingTaskListOptions && !setupTaskListComplete && !setupTaskListHidden && !isPerformingSetupTask() && (!isHomescreen() || isEmbedded)
|
5689 |
-
};
|
5690 |
-
const help = {
|
5691 |
-
name: 'help',
|
5692 |
-
title: Object(external_wp_i18n_["__"])('Help', 'woocommerce-admin'),
|
5693 |
-
icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
5694 |
-
icon: library_help["a" /* default */]
|
5695 |
-
}),
|
5696 |
-
visible: currentUserCan('manage_woocommerce') && (isHomescreen() && !isEmbedded || isPerformingSetupTask())
|
5697 |
-
};
|
5698 |
-
const displayOptions = {
|
5699 |
-
component: display_options["b" /* DisplayOptions */],
|
5700 |
-
visible: currentUserCan('manage_woocommerce') && !isEmbedded && isHomescreen() && !isPerformingSetupTask()
|
5701 |
-
};
|
5702 |
-
const previewSite = {
|
5703 |
-
name: 'previewSite',
|
5704 |
-
title: Object(external_wp_i18n_["__"])('Preview site', 'woocommerce-admin'),
|
5705 |
-
icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
5706 |
-
icon: external["a" /* default */]
|
5707 |
-
}),
|
5708 |
-
visible: query.page === 'wc-admin' && query.task === 'appearance',
|
5709 |
-
onClick: () => {
|
5710 |
-
window.open(Object(external_wc_wcSettings_["getSetting"])('siteUrl'));
|
5711 |
-
Object(external_wc_tracks_["recordEvent"])('wcadmin_tasklist_previewsite', previewSiteBtnTrackData);
|
5712 |
-
return null;
|
5713 |
-
}
|
5714 |
-
};
|
5715 |
-
return [activity, setup, previewSite, displayOptions, help].filter(tab => tab.visible);
|
5716 |
-
};
|
5717 |
|
5718 |
-
|
5719 |
-
|
5720 |
-
task
|
5721 |
-
} = query;
|
5722 |
|
5723 |
-
|
5724 |
-
|
5725 |
-
return Object(external_wp_element_["createElement"])(InboxPanel, {
|
5726 |
-
hasAbbreviatedNotifications: hasAbbreviatedNotifications,
|
5727 |
-
thingsToDoNextCount: thingsToDoNextCount
|
5728 |
-
});
|
5729 |
|
5730 |
-
|
5731 |
-
|
5732 |
-
|
5733 |
-
});
|
5734 |
|
5735 |
-
|
5736 |
-
|
5737 |
-
|
5738 |
-
|
|
|
|
|
|
|
|
|
5739 |
|
5740 |
-
|
5741 |
-
|
5742 |
|
5743 |
-
|
5744 |
-
|
5745 |
-
|
5746 |
-
});
|
5747 |
-
}
|
5748 |
-
};
|
5749 |
|
5750 |
-
|
5751 |
-
|
5752 |
-
|
5753 |
-
|
5754 |
-
|
5755 |
-
|
5756 |
|
5757 |
-
|
5758 |
-
|
5759 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5760 |
|
5761 |
-
|
5762 |
-
|
|
|
|
|
|
|
5763 |
|
5764 |
-
const tabs = getTabs();
|
5765 |
-
const headerId = Object(external_lodash_["uniqueId"])('activity-panel-header_');
|
5766 |
-
const showHelpHighlightTooltip = shouldShowHelpTooltip();
|
5767 |
-
return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wc_components_["H"], {
|
5768 |
-
id: headerId,
|
5769 |
-
className: "screen-reader-text"
|
5770 |
-
}, Object(external_wp_i18n_["__"])('Store Activity', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_components_["Section"], {
|
5771 |
-
component: "aside",
|
5772 |
-
id: "woocommerce-activity-panel",
|
5773 |
-
className: "woocommerce-layout__activity-panel",
|
5774 |
-
"aria-labelledby": headerId
|
5775 |
-
}, Object(external_wp_element_["createElement"])(Tabs, {
|
5776 |
-
tabs: tabs,
|
5777 |
-
tabOpen: isPanelOpen,
|
5778 |
-
selectedTab: currentTab,
|
5779 |
-
onTabClick: (tab, tabOpen) => {
|
5780 |
-
if (tab.onClick) {
|
5781 |
-
tab.onClick();
|
5782 |
-
return;
|
5783 |
-
}
|
5784 |
|
5785 |
-
|
5786 |
-
|
5787 |
-
|
5788 |
-
|
5789 |
-
|
5790 |
-
|
5791 |
-
|
5792 |
-
|
5793 |
-
}),
|
5794 |
-
content: getPanelContent(currentTab),
|
5795 |
-
closePanel: () => closePanel(),
|
5796 |
-
clearPanel: () => clearPanel()
|
5797 |
-
})), showHelpHighlightTooltip ? Object(external_wp_element_["createElement"])(HighlightTooltip, {
|
5798 |
-
delay: 1000,
|
5799 |
-
useAnchor: true,
|
5800 |
-
title: Object(external_wp_i18n_["__"])("We're here for help", 'woocommerce-admin'),
|
5801 |
-
content: Object(external_wp_i18n_["__"])('If you have any questions, feel free to explore the WooCommerce docs listed here.', 'woocommerce-admin'),
|
5802 |
-
closeButtonText: Object(external_wp_i18n_["__"])('Got it', 'woocommerce-admin'),
|
5803 |
-
id: "activity-panel-tab-help",
|
5804 |
-
onClose: () => closedHelpPanelHighlight(),
|
5805 |
-
onShow: () => Object(external_wc_tracks_["recordEvent"])('help_tooltip_view')
|
5806 |
-
}) : null);
|
5807 |
-
};
|
5808 |
-
ActivityPanel.defaultProps = {
|
5809 |
-
getHistory: external_wc_navigation_["getHistory"]
|
5810 |
};
|
5811 |
-
/* harmony default export */ var activity_panel = (ActivityPanel);
|
5812 |
-
// CONCATENATED MODULE: ./client/activity-panel/index.js
|
5813 |
-
|
5814 |
-
|
5815 |
-
/**
|
5816 |
-
* External dependencies
|
5817 |
-
*/
|
5818 |
-
|
5819 |
-
/**
|
5820 |
-
* Internal dependencies
|
5821 |
-
*/
|
5822 |
|
|
|
|
|
5823 |
|
|
|
|
|
|
|
5824 |
|
|
|
|
|
5825 |
|
5826 |
-
|
5827 |
-
|
5828 |
-
|
5829 |
-
|
5830 |
-
|
5831 |
-
|
5832 |
-
|
|
|
5833 |
|
5834 |
-
|
5835 |
-
|
5836 |
-
}
|
5837 |
|
5838 |
-
|
5839 |
-
|
5840 |
-
|
5841 |
-
|
5842 |
-
});
|
5843 |
|
5844 |
-
|
5845 |
-
|
5846 |
-
scope: 'woocommerce-admin'
|
5847 |
-
});
|
5848 |
-
// EXTERNAL MODULE: ./node_modules/gridicons/dist/cross-small.js
|
5849 |
-
var cross_small = __webpack_require__(262);
|
5850 |
-
var cross_small_default = /*#__PURE__*/__webpack_require__.n(cross_small);
|
5851 |
|
5852 |
-
|
5853 |
-
|
5854 |
-
|
5855 |
-
|
5856 |
-
|
5857 |
-
|
5858 |
-
|
5859 |
-
* this for non-critical display logic.
|
5860 |
-
*/
|
5861 |
|
5862 |
-
|
5863 |
-
|
5864 |
-
|
5865 |
-
|
5866 |
-
|
5867 |
-
}
|
5868 |
|
5869 |
-
return UNKNOWN_PLATFORM;
|
5870 |
-
};
|
5871 |
-
// CONCATENATED MODULE: ./client/mobile-banner/app-icon.js
|
5872 |
|
5873 |
-
|
5874 |
-
|
5875 |
-
|
5876 |
-
|
5877 |
-
|
5878 |
-
fill: "none",
|
5879 |
-
xmlns: "http://www.w3.org/2000/svg"
|
5880 |
-
}, Object(external_wp_element_["createElement"])("rect", {
|
5881 |
-
width: "92",
|
5882 |
-
height: "92",
|
5883 |
-
rx: "21.3953",
|
5884 |
-
fill: "#7F54B3"
|
5885 |
-
}), Object(external_wp_element_["createElement"])("path", {
|
5886 |
-
fillRule: "evenodd",
|
5887 |
-
clipRule: "evenodd",
|
5888 |
-
d: "M72.5937 28.043H19.8094C16.4781 28.0459 13.7783 30.7705 13.7754 34.1324V54.4501C13.7783 57.812 16.4781 60.5366 19.8094 60.5395H44.8229L56.2573 66.9607L53.6672 60.5395H72.599C74.2009 60.5402 75.7374 59.8983 76.8702 58.7552C78.0029 57.612 78.639 56.0614 78.6383 54.4447V34.1324C78.6376 32.5157 78.0002 30.9657 76.8664 29.8235C75.7327 28.6814 74.1956 28.0408 72.5937 28.043ZM19.1057 32.4208C18.4658 32.4324 17.8646 32.7359 17.467 33.2482C17.0888 33.7635 16.9404 34.4175 17.058 35.0502C18.5962 45.0986 20.0338 51.8757 21.371 55.3816C21.8779 56.658 22.4896 57.2703 23.2063 57.2185C24.3075 57.1489 25.6263 55.5968 27.1627 52.5621C27.9964 50.8412 29.2602 48.2662 30.9539 44.837C32.3785 49.88 34.309 53.6787 36.7456 56.2331C37.4291 56.9436 38.1204 57.2748 38.8195 57.2266C39.4185 57.1931 39.953 56.8315 40.217 56.2813C40.4753 55.7358 40.5806 55.1278 40.5211 54.5248C40.3516 52.0703 40.5919 48.667 41.2421 44.3149C41.9081 39.8057 42.7523 36.5818 43.7749 34.6432C43.9822 34.2526 44.0733 33.8087 44.037 33.366C44.0039 32.7587 43.7116 32.1969 43.2374 31.829C42.7745 31.4367 42.1799 31.2446 41.5803 31.2935C40.8334 31.3325 40.1682 31.7885 39.8499 32.4797C38.2331 35.5019 37.0812 40.4109 36.3943 47.2068C35.2823 44.2394 34.4509 41.1703 33.9114 38.0412C33.623 36.4613 32.9037 35.7125 31.7536 35.7946C30.9592 35.8589 30.3063 36.3944 29.7819 37.4012L24.0348 48.5643C23.0997 44.6692 22.2205 39.9289 21.3972 34.3433C21.1997 32.9652 20.4358 32.3244 19.1057 32.4208ZM69.9089 34.6877C71.6969 35.0381 73.2407 36.2 74.1186 37.8559C74.9693 39.3247 75.3946 41.1161 75.3946 43.23C75.4148 45.9567 74.7062 48.6357 73.3477 50.9687C71.7778 53.7023 69.7195 55.0691 67.1727 55.0691C66.6933 55.0668 66.2153 55.0128 65.7467 54.9078C63.9584 54.5581 62.4143 53.396 61.5371 51.7396C60.6864 50.2452 60.261 48.4411 60.261 46.3272C60.2357 43.6127 60.945 40.9454 62.3079 38.6295C63.9023 35.8959 65.9607 34.5291 68.4829 34.5291C68.9623 34.5304 69.4402 34.5836 69.9089 34.6877ZM68.7937 49.4848C69.7707 48.5773 70.4399 47.2269 70.8012 45.4337V45.4419C70.9315 44.7826 70.9959 44.1112 70.9933 43.4382C70.986 42.5849 70.8291 41.74 70.5302 40.9452C70.1443 39.901 69.6304 39.3124 68.9884 39.1793C68.0378 38.9643 67.1239 39.5256 66.2469 40.8632C65.5812 41.8393 65.109 42.9432 64.8577 44.1106C64.7276 44.7708 64.6632 45.4432 64.6657 46.1171C64.6739 46.9677 64.8308 47.8096 65.1287 48.6019C65.5146 49.6388 66.0294 50.2274 66.6731 50.3678C67.3169 50.5081 68.0237 50.2138 68.7937 49.4848ZM57.9079 37.8559C57.0291 36.2008 55.4854 35.0392 53.6976 34.6877C53.2279 34.5837 52.749 34.5306 52.2687 34.5291C49.7443 34.5291 47.6856 35.8959 46.0927 38.6295C44.7295 40.9454 44.0201 43.6127 44.0454 46.3272C44.0454 48.4411 44.4699 50.2452 45.319 51.7396C46.1976 53.3949 47.7414 54.5566 49.5294 54.9078C49.999 55.0126 50.4779 55.0667 50.9582 55.0691C53.5055 55.0691 55.5642 53.7023 57.1343 50.9687C58.4922 48.6355 59.2001 45.9565 59.1789 43.23C59.1789 41.1161 58.7544 39.3247 57.9053 37.8559H57.9079ZM54.5903 45.4337C54.2307 47.2269 53.5614 48.5773 52.5825 49.4848C51.8115 50.2065 51.101 50.5017 50.4589 50.3678C49.8169 50.2338 49.3011 49.6461 48.9169 48.6019C48.6181 47.8097 48.4603 46.9678 48.4511 46.1171C48.4495 45.4431 48.5148 44.7707 48.6459 44.1106C48.8971 42.9432 49.3694 41.8393 50.0353 40.8632C50.9124 39.5256 51.8264 38.9643 52.7773 39.1793C53.4193 39.3124 53.9333 39.901 54.3193 40.9452C54.617 41.7404 54.7739 42.585 54.7824 43.4382C54.785 44.1112 54.7207 44.7826 54.5903 45.4419V45.4337Z",
|
5889 |
-
fill: "white"
|
5890 |
-
}));
|
5891 |
-
};
|
5892 |
-
// CONCATENATED MODULE: ./client/mobile-banner/constants.js
|
5893 |
-
// The Play Store link is defined as an exported constant mainly for the sake of testing the Mobile App Banner.
|
5894 |
-
// It is nearly impossible to fake navigation in JSDOM 16, so exposing this link for mocking allows us to
|
5895 |
-
// avoid triggering a navigation.
|
5896 |
-
const PLAY_STORE_LINK = 'https://play.google.com/store/apps/details?id=com.woocommerce.android';
|
5897 |
-
const TRACKING_EVENT_NAME = 'wcadmin_mobile_android_banner_click';
|
5898 |
-
// EXTERNAL MODULE: ./client/mobile-banner/banner.scss
|
5899 |
-
var banner = __webpack_require__(300);
|
5900 |
|
5901 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5902 |
|
|
|
5903 |
|
5904 |
-
|
5905 |
-
* External dependencies
|
5906 |
-
*/
|
5907 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5908 |
|
5909 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5910 |
|
5911 |
|
|
|
5912 |
|
5913 |
-
|
5914 |
-
|
5915 |
-
|
|
|
|
|
5916 |
|
|
|
|
|
|
|
5917 |
|
5918 |
|
|
|
|
|
5919 |
|
5920 |
|
5921 |
-
|
5922 |
-
const Banner = _ref => {
|
5923 |
-
let {
|
5924 |
-
onInstall,
|
5925 |
-
onDismiss
|
5926 |
-
} = _ref;
|
5927 |
-
const [isActioned, setIsActioned] = Object(external_wp_element_["useState"])(false);
|
5928 |
-
const isVisible = platform() === ANDROID_PLATFORM && !isActioned;
|
5929 |
-
Object(external_wp_element_["useEffect"])(() => {
|
5930 |
-
const layout = document.getElementsByClassName('woocommerce-layout')[0];
|
5931 |
|
5932 |
-
if (
|
5933 |
-
|
5934 |
-
|
5935 |
-
// in future.
|
5936 |
-
layout.classList.add(SHOW_APP_BANNER_MODIFIER_CLASS);
|
5937 |
}
|
|
|
5938 |
|
5939 |
-
return () => {
|
5940 |
-
if (layout) {
|
5941 |
-
layout.classList.remove(SHOW_APP_BANNER_MODIFIER_CLASS);
|
5942 |
-
}
|
5943 |
-
};
|
5944 |
-
}, [isVisible]);
|
5945 |
|
5946 |
-
if (
|
5947 |
-
|
|
|
|
|
5948 |
}
|
5949 |
|
5950 |
-
return
|
5951 |
-
className: "woocommerce-mobile-app-banner"
|
5952 |
-
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
5953 |
-
icon: Object(external_wp_element_["createElement"])(cross_small_default.a, {
|
5954 |
-
"data-testid": "dismiss-btn"
|
5955 |
-
}),
|
5956 |
-
onClick: () => {
|
5957 |
-
onDismiss();
|
5958 |
-
setIsActioned(true);
|
5959 |
-
Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, {
|
5960 |
-
action: 'dismiss'
|
5961 |
-
});
|
5962 |
-
}
|
5963 |
-
}), Object(external_wp_element_["createElement"])(AppIcon, null), Object(external_wp_element_["createElement"])("div", {
|
5964 |
-
className: "woocommerce-mobile-app-banner__description"
|
5965 |
-
}, Object(external_wp_element_["createElement"])("p", {
|
5966 |
-
className: "woocommerce-mobile-app-banner__description__text"
|
5967 |
-
}, Object(external_wp_i18n_["__"])('Run your store from anywhere', 'woocommerce-admin')), Object(external_wp_element_["createElement"])("p", {
|
5968 |
-
className: "woocommerce-mobile-app-banner__description__text"
|
5969 |
-
}, Object(external_wp_i18n_["__"])('Download the WooCommerce app', 'woocommerce-admin'))), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
5970 |
-
href: PLAY_STORE_LINK,
|
5971 |
-
isSecondary: true,
|
5972 |
-
onClick: () => {
|
5973 |
-
onInstall();
|
5974 |
-
setIsActioned(true);
|
5975 |
-
Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, {
|
5976 |
-
action: 'install'
|
5977 |
-
});
|
5978 |
-
}
|
5979 |
-
}, Object(external_wp_i18n_["__"])('Install', 'woocommerce-admin')));
|
5980 |
};
|
5981 |
-
// CONCATENATED MODULE: ./client/mobile-banner/index.js
|
5982 |
|
|
|
|
|
5983 |
|
5984 |
-
|
5985 |
-
|
5986 |
-
|
|
|
|
|
5987 |
|
|
|
|
|
|
|
5988 |
|
5989 |
-
|
5990 |
-
|
5991 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5992 |
|
|
|
|
|
|
|
5993 |
|
|
|
|
|
|
|
|
|
|
|
5994 |
|
5995 |
-
|
5996 |
-
|
5997 |
-
|
5998 |
-
...userData
|
5999 |
-
} = Object(external_wc_data_["useUserPreferences"])();
|
6000 |
-
const isDismissed = userData.android_app_banner_dismissed === 'yes';
|
6001 |
|
6002 |
-
|
6003 |
-
|
6004 |
-
|
6005 |
-
});
|
6006 |
};
|
|
|
6007 |
|
6008 |
-
|
6009 |
-
|
|
|
|
|
|
|
6010 |
}
|
6011 |
|
6012 |
-
|
6013 |
-
|
6014 |
-
|
6015 |
-
}));
|
6016 |
-
};
|
6017 |
-
Object(external_wp_plugins_["registerPlugin"])('mobile-banner-header-item', {
|
6018 |
-
render: MobileAppBanner,
|
6019 |
-
scope: 'woocommerce-admin'
|
6020 |
-
});
|
6021 |
-
// EXTERNAL MODULE: ./client/navigation/style.scss
|
6022 |
-
var navigation_style = __webpack_require__(301);
|
6023 |
|
6024 |
-
|
6025 |
-
|
6026 |
-
* External dependencies
|
6027 |
-
*/
|
6028 |
|
|
|
6029 |
|
6030 |
-
|
6031 |
-
|
6032 |
-
|
6033 |
-
|
6034 |
-
|
6035 |
-
|
|
|
|
|
|
|
6036 |
}
|
6037 |
|
6038 |
-
return
|
6039 |
-
}
|
6040 |
-
/**
|
6041 |
-
* Get a default regex expression to match the path and provided params.
|
6042 |
-
*/
|
6043 |
|
6044 |
-
|
6045 |
-
|
6046 |
-
|
6047 |
-
|
6048 |
-
const argsExpression = args ? args.split('&').reduce((acc, param) => {
|
6049 |
-
return `${acc}(?=.*[?|&]${param}(&|$|#))`;
|
6050 |
-
}, '') : '';
|
6051 |
-
return '^' + path + argsExpression + hashExpression;
|
6052 |
-
};
|
6053 |
-
/**
|
6054 |
-
* Get a match score for a menu item given a location.
|
6055 |
-
*/
|
6056 |
|
6057 |
-
|
6058 |
-
|
6059 |
|
6060 |
-
|
6061 |
-
|
|
|
|
|
|
|
6062 |
}
|
6063 |
|
6064 |
-
|
6065 |
-
const {
|
6066 |
-
href
|
6067 |
-
} = location; // Return highest possible score for exact match.
|
6068 |
|
6069 |
-
|
6070 |
-
return
|
6071 |
-
|
|
|
|
|
6072 |
|
6073 |
-
|
6074 |
-
|
6075 |
-
|
6076 |
-
};
|
6077 |
|
6078 |
-
|
6079 |
-
|
6080 |
-
|
6081 |
-
* @param {Array} items An array of items to match against.
|
6082 |
-
*/
|
6083 |
-
const getMatchingItem = items => {
|
6084 |
-
let matchedItem = null;
|
6085 |
-
let highestMatchScore = 0;
|
6086 |
-
items.forEach(item => {
|
6087 |
-
const score = getMatchScore(window.location, item.url, item.matchExpression);
|
6088 |
|
6089 |
-
|
6090 |
-
|
6091 |
-
matchedItem = item;
|
6092 |
-
}
|
6093 |
-
});
|
6094 |
-
return matchedItem || null;
|
6095 |
-
};
|
6096 |
-
/**
|
6097 |
-
* Available menu IDs.
|
6098 |
-
*/
|
6099 |
|
6100 |
-
|
|
|
|
|
6101 |
|
6102 |
-
|
6103 |
-
|
6104 |
-
|
6105 |
-
|
6106 |
-
|
6107 |
-
|
6108 |
-
|
6109 |
-
|
6110 |
-
|
6111 |
-
|
6112 |
-
|
6113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6114 |
}
|
6115 |
};
|
6116 |
-
|
6117 |
-
|
6118 |
-
*
|
6119 |
-
* @param {Array} menuItems Array of menu items.
|
6120 |
-
* @return {Array} Sorted menu items.
|
6121 |
*/
|
6122 |
|
6123 |
-
|
6124 |
-
|
6125 |
-
|
6126 |
-
|
6127 |
-
}
|
6128 |
|
6129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6130 |
});
|
6131 |
-
}
|
|
|
6132 |
/**
|
6133 |
-
*
|
|
|
6134 |
*
|
6135 |
-
*
|
6136 |
-
*
|
6137 |
-
*
|
6138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6139 |
|
6140 |
-
|
6141 |
-
|
6142 |
-
|
6143 |
-
|
6144 |
-
// Set up the category if it doesn't yet exist.
|
6145 |
-
if (!acc[item.parent]) {
|
6146 |
-
acc[item.parent] = {};
|
6147 |
-
menuIds.forEach(menuId => {
|
6148 |
-
acc[item.parent][menuId] = [];
|
6149 |
-
});
|
6150 |
-
} // Incorrect menu ID.
|
6151 |
|
|
|
|
|
6152 |
|
6153 |
-
|
6154 |
-
|
6155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6156 |
|
|
|
|
|
|
|
6157 |
|
6158 |
-
|
6159 |
-
|
6160 |
-
|
|
|
|
|
6161 |
|
|
|
6162 |
|
6163 |
-
|
6164 |
-
|
|
|
6165 |
}
|
6166 |
|
6167 |
-
|
|
|
|
|
|
|
6168 |
|
6169 |
-
|
6170 |
-
|
6171 |
-
|
6172 |
|
6173 |
-
|
6174 |
-
|
6175 |
-
return {
|
6176 |
-
items,
|
6177 |
-
categories
|
6178 |
};
|
6179 |
-
};
|
6180 |
-
// EXTERNAL MODULE: external ["wp","primitives"]
|
6181 |
-
var external_wp_primitives_ = __webpack_require__(9);
|
6182 |
|
6183 |
-
|
|
|
|
|
6184 |
|
|
|
|
|
6185 |
|
6186 |
-
|
6187 |
-
|
6188 |
-
|
|
|
6189 |
|
6190 |
-
|
6191 |
-
|
6192 |
-
viewBox: "-2 -2 24 24"
|
6193 |
-
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
6194 |
-
d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
|
6195 |
-
}));
|
6196 |
-
/* harmony default export */ var library_wordpress = (wordpress);
|
6197 |
-
//# sourceMappingURL=wordpress.js.map
|
6198 |
-
// CONCATENATED MODULE: ./client/navigation/components/header/index.js
|
6199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6200 |
|
6201 |
-
|
6202 |
-
* External dependencies
|
6203 |
-
*/
|
6204 |
|
|
|
|
|
6205 |
|
|
|
|
|
|
|
6206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6207 |
|
|
|
|
|
|
|
|
|
|
|
6208 |
|
|
|
|
|
|
|
6209 |
|
|
|
|
|
6210 |
|
|
|
6211 |
|
|
|
|
|
|
|
|
|
|
|
6212 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6213 |
|
6214 |
-
|
6215 |
-
|
6216 |
-
|
6217 |
|
|
|
|
|
|
|
|
|
|
|
6218 |
|
6219 |
|
6220 |
-
|
6221 |
-
const siteTitle = Object(external_wc_wcSettings_["getSetting"])('siteTitle', '');
|
6222 |
-
const homeUrl = Object(external_wc_wcSettings_["getSetting"])('homeUrl', '');
|
6223 |
-
const isScrolled = useIsScrolled();
|
6224 |
-
const [isFolded, setIsFolded] = Object(external_wp_element_["useState"])(document.body.classList.contains(false));
|
6225 |
-
const navClasses = {
|
6226 |
-
folded: 'is-wc-nav-folded',
|
6227 |
-
expanded: 'is-wc-nav-expanded'
|
6228 |
-
};
|
6229 |
|
6230 |
-
|
6231 |
-
|
6232 |
-
|
6233 |
-
setIsFolded(true);
|
6234 |
-
};
|
6235 |
|
6236 |
-
|
6237 |
-
|
6238 |
-
|
6239 |
-
|
6240 |
-
|
6241 |
|
6242 |
-
|
6243 |
-
|
6244 |
-
|
6245 |
-
|
6246 |
-
|
6247 |
-
|
6248 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6249 |
|
6250 |
-
const foldOnMobile = function () {
|
6251 |
-
let screenWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body.clientWidth;
|
6252 |
|
6253 |
-
|
6254 |
-
|
6255 |
-
}
|
6256 |
-
expandNav();
|
6257 |
-
}
|
6258 |
-
};
|
6259 |
|
6260 |
-
|
6261 |
-
|
6262 |
-
|
6263 |
-
|
6264 |
-
|
6265 |
-
|
6266 |
-
|
6267 |
-
|
6268 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6269 |
|
6270 |
-
for (const {
|
6271 |
-
eventName,
|
6272 |
-
handler
|
6273 |
-
} of foldEvents) {
|
6274 |
-
window.addEventListener(eventName, handler, false);
|
6275 |
-
}
|
6276 |
|
6277 |
-
|
6278 |
-
|
6279 |
-
|
6280 |
-
size: "36px",
|
6281 |
-
icon: library_wordpress
|
6282 |
-
});
|
6283 |
-
const {
|
6284 |
-
isRequestingSiteIcon,
|
6285 |
-
siteIconUrl
|
6286 |
-
} = Object(external_wp_data_["useSelect"])(select => {
|
6287 |
-
const {
|
6288 |
-
isResolving
|
6289 |
-
} = select('core/data');
|
6290 |
-
const {
|
6291 |
-
getEntityRecord
|
6292 |
-
} = select('core');
|
6293 |
-
const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
|
6294 |
-
return {
|
6295 |
-
isRequestingSiteIcon: isResolving('core', 'getEntityRecord', ['root', '__unstableBase', undefined]),
|
6296 |
-
siteIconUrl: siteData.siteIconUrl
|
6297 |
-
};
|
6298 |
-
});
|
6299 |
|
6300 |
-
|
6301 |
-
|
6302 |
-
|
6303 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6304 |
});
|
6305 |
-
|
6306 |
-
|
6307 |
}
|
|
|
|
|
6308 |
|
6309 |
-
|
6310 |
-
|
6311 |
-
|
6312 |
-
|
6313 |
-
|
6314 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
6315 |
-
onClick: () => toggleFolded(),
|
6316 |
-
className: "woocommerce-navigation-header__site-icon",
|
6317 |
-
"aria-label": "Fold navigation",
|
6318 |
-
role: "switch",
|
6319 |
-
"aria-checked": isFolded ? 'true' : 'false'
|
6320 |
-
}, buttonIcon), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
6321 |
-
title: siteTitle,
|
6322 |
-
href: homeUrl,
|
6323 |
-
className: "woocommerce-navigation-header__site-title",
|
6324 |
-
as: "span"
|
6325 |
-
}, Object(external_wp_htmlEntities_["decodeEntities"])(siteTitle)));
|
6326 |
-
};
|
6327 |
-
|
6328 |
-
/* harmony default export */ var header = (header_Header);
|
6329 |
-
// EXTERNAL MODULE: ./client/navigation/components/category-title/style.scss
|
6330 |
-
var category_title_style = __webpack_require__(302);
|
6331 |
|
6332 |
-
|
|
|
6333 |
|
|
|
|
|
6334 |
|
6335 |
-
|
6336 |
-
|
6337 |
-
*/
|
6338 |
|
6339 |
-
|
6340 |
-
xmlns: "http://www.w3.org/2000/svg",
|
6341 |
-
viewBox: "0 0 24 24"
|
6342 |
-
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
6343 |
-
d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
|
6344 |
-
}));
|
6345 |
-
/* harmony default export */ var star_filled = (starFilled);
|
6346 |
-
//# sourceMappingURL=star-filled.js.map
|
6347 |
-
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
|
6348 |
|
|
|
|
|
|
|
6349 |
|
6350 |
-
|
6351 |
-
* WordPress dependencies
|
6352 |
-
*/
|
6353 |
|
6354 |
-
|
6355 |
-
|
6356 |
-
|
6357 |
-
|
6358 |
-
|
6359 |
-
|
6360 |
-
|
6361 |
-
}
|
6362 |
-
/* harmony default export */ var star_empty = (starEmpty);
|
6363 |
-
//# sourceMappingURL=star-empty.js.map
|
6364 |
-
// EXTERNAL MODULE: ./client/navigation/components/favorite-button/style.scss
|
6365 |
-
var favorite_button_style = __webpack_require__(303);
|
6366 |
|
6367 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6369 |
|
6370 |
-
|
6371 |
-
|
6372 |
-
*/
|
6373 |
|
|
|
|
|
6374 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6377 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6378 |
|
6379 |
-
|
6380 |
-
|
6381 |
-
|
6382 |
|
|
|
|
|
|
|
|
|
|
|
6383 |
|
6384 |
-
|
6385 |
-
|
6386 |
-
|
6387 |
-
|
6388 |
-
|
6389 |
-
favorites,
|
6390 |
-
isResolving
|
6391 |
-
} = Object(external_wp_data_["useSelect"])(select => {
|
6392 |
-
return {
|
6393 |
-
favorites: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getFavorites(),
|
6394 |
-
isResolving: select(external_wc_data_["NAVIGATION_STORE_NAME"]).isResolving('getFavorites')
|
6395 |
-
};
|
6396 |
-
});
|
6397 |
-
const {
|
6398 |
-
addFavorite,
|
6399 |
-
removeFavorite
|
6400 |
-
} = Object(external_wp_data_["useDispatch"])(external_wc_data_["NAVIGATION_STORE_NAME"]);
|
6401 |
-
const isFavorited = favorites.includes(id);
|
6402 |
|
6403 |
-
|
6404 |
-
const toggle = isFavorited ? removeFavorite : addFavorite;
|
6405 |
-
toggle(id);
|
6406 |
-
Object(external_wc_tracks_["recordEvent"])('navigation_favorite', {
|
6407 |
-
id,
|
6408 |
-
action: isFavorited ? 'unfavorite' : 'favorite'
|
6409 |
-
});
|
6410 |
};
|
6411 |
|
6412 |
-
|
6413 |
-
|
6414 |
-
|
6415 |
-
|
6416 |
-
|
6417 |
-
|
6418 |
-
|
6419 |
-
|
6420 |
-
|
6421 |
-
|
6422 |
-
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
6423 |
-
icon: isFavorited ? star_filled : star_empty,
|
6424 |
-
className: `star-${isFavorited ? 'filled' : 'empty'}-icon`
|
6425 |
-
}));
|
6426 |
-
};
|
6427 |
-
/* harmony default export */ var favorite_button = (FavoriteButton);
|
6428 |
-
// CONCATENATED MODULE: ./client/navigation/components/favorites-tooltip/index.js
|
6429 |
|
|
|
|
|
6430 |
|
6431 |
-
/**
|
6432 |
-
*
|
|
|
6433 |
*/
|
6434 |
|
|
|
|
|
|
|
|
|
6435 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6436 |
|
6437 |
-
|
6438 |
-
|
6439 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6440 |
|
|
|
6441 |
|
6442 |
-
|
6443 |
-
const FavoritesTooltip = () => {
|
6444 |
-
const {
|
6445 |
-
isFavoritesResolving,
|
6446 |
-
isOptionResolving,
|
6447 |
-
isTooltipHidden
|
6448 |
-
} = Object(external_wp_data_["useSelect"])(select => {
|
6449 |
-
const {
|
6450 |
-
getOption,
|
6451 |
-
isResolving
|
6452 |
-
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
6453 |
return {
|
6454 |
-
|
6455 |
-
|
6456 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6457 |
};
|
6458 |
-
});
|
6459 |
-
const {
|
6460 |
-
updateOptions
|
6461 |
-
} = Object(external_wp_data_["useDispatch"])(external_wc_data_["OPTIONS_STORE_NAME"]);
|
6462 |
|
6463 |
-
|
6464 |
-
return
|
6465 |
-
|
|
|
|
|
|
|
|
|
|
|
6466 |
|
6467 |
-
|
6468 |
-
|
6469 |
-
|
|
|
|
|
|
|
|
|
6470 |
|
6471 |
-
|
6472 |
-
|
6473 |
-
|
6474 |
-
|
6475 |
-
|
6476 |
-
|
6477 |
-
|
6478 |
-
|
6479 |
-
|
6480 |
-
|
6481 |
});
|
|
|
|
|
|
|
|
|
|
|
6482 |
};
|
6483 |
-
/* harmony default export */ var favorites_tooltip = (FavoritesTooltip);
|
6484 |
-
// CONCATENATED MODULE: ./client/navigation/components/category-title/index.js
|
6485 |
-
|
6486 |
|
6487 |
-
/**
|
6488 |
-
*
|
|
|
6489 |
*/
|
6490 |
|
|
|
|
|
6491 |
|
|
|
|
|
|
|
|
|
6492 |
|
6493 |
-
|
6494 |
-
|
6495 |
-
category
|
6496 |
-
} = _ref;
|
6497 |
-
const {
|
6498 |
-
id,
|
6499 |
-
menuId,
|
6500 |
-
title
|
6501 |
-
} = category;
|
6502 |
-
const className = 'woocommerce-navigation-category-title';
|
6503 |
|
6504 |
-
|
6505 |
-
|
6506 |
-
|
6507 |
-
}, Object(external_wp_element_["createElement"])("span", {
|
6508 |
-
className: `${className}__text`
|
6509 |
-
}, title), Object(external_wp_element_["createElement"])(FavoriteButton, {
|
6510 |
-
id: id
|
6511 |
-
}), Object(external_wp_element_["createElement"])(FavoritesTooltip, null));
|
6512 |
-
}
|
6513 |
-
|
6514 |
-
return Object(external_wp_element_["createElement"])("span", {
|
6515 |
-
className: className
|
6516 |
-
}, title);
|
6517 |
-
};
|
6518 |
-
/* harmony default export */ var category_title = (CategoryTitle);
|
6519 |
-
// CONCATENATED MODULE: ./client/navigation/components/Item/index.js
|
6520 |
-
|
6521 |
-
|
6522 |
-
/**
|
6523 |
-
* External dependencies
|
6524 |
*/
|
6525 |
|
|
|
|
|
|
|
|
|
|
|
6526 |
|
6527 |
-
|
6528 |
-
|
6529 |
-
|
6530 |
-
|
6531 |
-
|
6532 |
-
|
6533 |
-
|
6534 |
-
|
6535 |
-
const slot = Object(external_wc_experimental_["useSlot"])('woocommerce_navigation_' + item.id);
|
6536 |
-
const hasFills = Boolean(slot === null || slot === void 0 ? void 0 : (_slot$fills = slot.fills) === null || _slot$fills === void 0 ? void 0 : _slot$fills.length);
|
6537 |
-
|
6538 |
-
const trackClick = id => {
|
6539 |
-
Object(external_wc_tracks_["recordEvent"])('navigation_click', {
|
6540 |
-
menu_item: id
|
6541 |
});
|
6542 |
-
}
|
6543 |
-
|
6544 |
-
|
6545 |
-
|
6546 |
-
|
6547 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6548 |
|
6549 |
-
|
6550 |
-
return
|
6551 |
-
|
6552 |
-
item: item.id
|
6553 |
-
}, Object(external_wp_element_["createElement"])("div", {
|
6554 |
-
onClick: () => trackClick(item.id)
|
6555 |
-
}, Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"].Slot, {
|
6556 |
-
name: item.id
|
6557 |
-
})));
|
6558 |
-
}
|
6559 |
|
6560 |
-
|
6561 |
-
|
6562 |
-
|
6563 |
-
|
6564 |
-
badge: item.badge ? item.badge : null,
|
6565 |
-
href: item.url,
|
6566 |
-
navigateToMenu: !item.url && item.id,
|
6567 |
-
onClick: () => trackClick(item.id),
|
6568 |
-
hideIfTargetMenuEmpty: true
|
6569 |
-
});
|
6570 |
-
/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
|
6571 |
};
|
6572 |
|
6573 |
-
|
6574 |
-
|
6575 |
-
|
6576 |
-
|
6577 |
-
/**
|
6578 |
-
* External dependencies
|
6579 |
*/
|
6580 |
|
|
|
|
|
|
|
|
|
6581 |
|
|
|
|
|
|
|
6582 |
|
6583 |
-
|
6584 |
-
|
6585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6586 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6587 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6588 |
|
6589 |
-
|
6590 |
-
let {
|
6591 |
-
category,
|
6592 |
-
onBackClick,
|
6593 |
-
pluginItems,
|
6594 |
-
primaryItems
|
6595 |
-
} = _ref;
|
6596 |
|
6597 |
-
|
6598 |
-
|
|
|
6599 |
}
|
6600 |
-
/**
|
6601 |
-
* Navigation's exit button WooCommerce label.
|
6602 |
-
*
|
6603 |
-
* @filter woocommerce_navigation_root_back_label
|
6604 |
-
* @param {string} label Back button label.
|
6605 |
-
*/
|
6606 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6607 |
|
6608 |
-
|
6609 |
-
|
6610 |
-
* Navigation's exit button url.
|
6611 |
-
*
|
6612 |
-
* @filter woocommerce_navigation_root_back_url
|
6613 |
-
* @param {string} url Back button url.
|
6614 |
-
*/
|
6615 |
-
|
6616 |
-
const rootBackUrl = Object(external_wp_hooks_["applyFilters"])('woocommerce_navigation_root_back_url', window.wcNavigation.rootBackUrl);
|
6617 |
-
const isRootBackVisible = category.id === 'woocommerce' && rootBackUrl;
|
6618 |
-
return Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationMenu"], {
|
6619 |
-
title: Object(external_wp_element_["createElement"])(category_title, {
|
6620 |
-
category: category
|
6621 |
-
}),
|
6622 |
-
menu: category.id,
|
6623 |
-
parentMenu: category.parent,
|
6624 |
-
backButtonLabel: isRootBackVisible ? rootBackLabel : category.backButtonLabel || null,
|
6625 |
-
onBackButtonClick: isRootBackVisible ? () => {
|
6626 |
-
onBackClick('woocommerce');
|
6627 |
-
window.location = rootBackUrl;
|
6628 |
-
} : () => onBackClick(category.id)
|
6629 |
-
}, !!primaryItems.length && Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationGroup"], null, primaryItems.map(item => Object(external_wp_element_["createElement"])(components_Item, {
|
6630 |
-
key: item.id,
|
6631 |
-
item: item
|
6632 |
-
}))), !!pluginItems.length && Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationGroup"], {
|
6633 |
-
title: category.id === 'woocommerce' ? Object(external_wp_i18n_["__"])('Extensions', 'woocommerce-admin') : null
|
6634 |
-
}, pluginItems.map(item => Object(external_wp_element_["createElement"])(components_Item, {
|
6635 |
-
key: item.id,
|
6636 |
-
item: item
|
6637 |
-
}))));
|
6638 |
-
};
|
6639 |
-
// CONCATENATED MODULE: ./client/navigation/components/container/secondary-menu.js
|
6640 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6641 |
|
6642 |
-
|
6643 |
-
|
6644 |
-
*/
|
6645 |
|
6646 |
-
|
6647 |
-
|
6648 |
-
|
6649 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6650 |
|
|
|
|
|
6651 |
|
6652 |
-
|
6653 |
-
let {
|
6654 |
-
category,
|
6655 |
-
items,
|
6656 |
-
onBackClick
|
6657 |
-
} = _ref;
|
6658 |
|
6659 |
-
|
6660 |
-
return null;
|
6661 |
}
|
6662 |
|
6663 |
-
|
6664 |
-
|
6665 |
-
className: "components-navigation__menu-secondary",
|
6666 |
-
title: !isRoot && Object(external_wp_element_["createElement"])(category_title, {
|
6667 |
-
category: category
|
6668 |
-
}),
|
6669 |
-
menu: category.id,
|
6670 |
-
parentMenu: category.parent,
|
6671 |
-
backButtonLabel: category.backButtonLabel || null,
|
6672 |
-
onBackButtonClick: isRoot ? null : () => onBackClick(category.id)
|
6673 |
-
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationGroup"], {
|
6674 |
-
onBackButtonClick: () => onBackClick(category.id)
|
6675 |
-
}, items.map(item => Object(external_wp_element_["createElement"])(components_Item, {
|
6676 |
-
key: item.id,
|
6677 |
-
item: item
|
6678 |
-
}))));
|
6679 |
-
};
|
6680 |
-
// CONCATENATED MODULE: ./client/navigation/components/container/index.js
|
6681 |
|
|
|
|
|
|
|
|
|
6682 |
|
6683 |
-
|
6684 |
-
|
6685 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6686 |
|
|
|
|
|
|
|
6687 |
|
|
|
6688 |
|
|
|
6689 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6690 |
|
|
|
|
|
6691 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6692 |
|
6693 |
-
|
6694 |
-
|
6695 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6696 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6697 |
|
|
|
|
|
|
|
|
|
6698 |
|
|
|
|
|
|
|
|
|
6699 |
|
|
|
6700 |
|
|
|
|
|
|
|
6701 |
|
6702 |
-
|
6703 |
-
|
6704 |
-
menuItems
|
6705 |
-
} = Object(external_wp_data_["useSelect"])(select => {
|
6706 |
-
return {
|
6707 |
-
menuItems: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getMenuItems()
|
6708 |
-
};
|
6709 |
});
|
6710 |
-
|
6711 |
-
|
6712 |
-
|
6713 |
-
|
6714 |
-
|
|
|
|
|
|
|
|
|
6715 |
|
6716 |
-
|
6717 |
-
|
6718 |
-
|
|
|
6719 |
|
6720 |
-
|
6721 |
-
|
6722 |
-
const [activeItem, setActiveItem] = Object(external_wp_element_["useState"])('woocommerce-home');
|
6723 |
-
const [activeLevel, setActiveLevel] = Object(external_wp_element_["useState"])('woocommerce');
|
6724 |
-
Object(external_wp_element_["useEffect"])(() => {
|
6725 |
-
const initialMatchedItem = getMatchingItem(menuItems);
|
6726 |
|
6727 |
-
if (
|
6728 |
-
|
6729 |
-
setActiveLevel(initialMatchedItem.parent);
|
6730 |
}
|
6731 |
|
6732 |
-
|
6733 |
-
setTimeout(() => {
|
6734 |
-
const matchedItem = getMatchingItem(menuItems);
|
6735 |
|
6736 |
-
|
6737 |
-
|
6738 |
-
|
6739 |
-
}
|
6740 |
-
}, 0);
|
6741 |
-
});
|
6742 |
-
return removeListener;
|
6743 |
-
}, [menuItems]);
|
6744 |
-
const {
|
6745 |
-
currentUserCan
|
6746 |
-
} = Object(external_wc_data_["useUser"])();
|
6747 |
-
const {
|
6748 |
-
categories,
|
6749 |
-
items
|
6750 |
-
} = Object(external_wp_element_["useMemo"])(() => getMappedItemsCategories(menuItems, currentUserCan), [menuItems, currentUserCan]);
|
6751 |
-
const navDomRef = Object(external_wp_element_["useRef"])(null);
|
6752 |
|
6753 |
-
|
6754 |
-
|
6755 |
-
|
6756 |
-
});
|
6757 |
-
};
|
6758 |
|
6759 |
-
|
6760 |
-
|
6761 |
-
'is-root': isRoot
|
6762 |
-
});
|
6763 |
-
return Object(external_wp_element_["createElement"])("div", {
|
6764 |
-
className: classes
|
6765 |
-
}, Object(external_wp_element_["createElement"])(header, null), Object(external_wp_element_["createElement"])("div", {
|
6766 |
-
className: "woocommerce-navigation__wrapper",
|
6767 |
-
ref: navDomRef
|
6768 |
-
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Navigation"], {
|
6769 |
-
activeItem: activeItem ? activeItem.id : null,
|
6770 |
-
activeMenu: activeLevel,
|
6771 |
-
onActivateMenu: function () {
|
6772 |
-
if (navDomRef && navDomRef.current) {
|
6773 |
-
navDomRef.current.scrollTop = 0;
|
6774 |
-
}
|
6775 |
|
6776 |
-
|
6777 |
-
|
6778 |
-
|
6779 |
-
|
6780 |
-
|
6781 |
-
|
6782 |
-
|
6783 |
-
|
6784 |
-
|
6785 |
-
|
6786 |
-
|
6787 |
-
|
6788 |
-
|
6789 |
-
|
6790 |
-
|
6791 |
-
|
6792 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6793 |
};
|
6794 |
|
6795 |
-
|
6796 |
-
|
6797 |
-
|
6798 |
-
* External dependencies
|
6799 |
-
*/
|
6800 |
|
6801 |
-
|
6802 |
-
|
6803 |
-
|
|
|
6804 |
|
|
|
|
|
6805 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6806 |
|
6807 |
-
|
6808 |
-
|
6809 |
-
// CONCATENATED MODULE: ./client/layout/navigation.js
|
6810 |
|
|
|
6811 |
|
6812 |
-
|
6813 |
-
|
6814 |
-
*/
|
6815 |
|
|
|
|
|
6816 |
|
|
|
|
|
6817 |
|
|
|
|
|
|
|
6818 |
|
|
|
|
|
|
|
6819 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6820 |
|
6821 |
-
|
6822 |
-
|
6823 |
-
|
6824 |
|
6825 |
|
|
|
|
|
6826 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6827 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6828 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6829 |
|
6830 |
|
6831 |
-
|
6832 |
-
const {
|
6833 |
-
persistedQuery
|
6834 |
-
} = Object(external_wp_data_["useSelect"])(select => {
|
6835 |
-
return {
|
6836 |
-
persistedQuery: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getPersistedQuery()
|
6837 |
-
};
|
6838 |
-
});
|
6839 |
|
6840 |
-
if (
|
6841 |
-
return
|
|
|
|
|
|
|
|
|
6842 |
}
|
6843 |
-
/**
|
6844 |
-
* If the current page is embedded, stay with the default urls
|
6845 |
-
* provided by Navigation because the router isn't present to
|
6846 |
-
* respond to <Link /> component's manipulation of the url.
|
6847 |
-
*/
|
6848 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6849 |
|
6850 |
-
if (
|
6851 |
-
return
|
6852 |
-
|
6853 |
-
|
|
|
|
|
6854 |
}
|
6855 |
|
6856 |
-
|
6857 |
-
|
6858 |
-
if (page.path === '/analytics/settings') {
|
6859 |
-
return { ...page,
|
6860 |
-
breadcrumbs: [Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')]
|
6861 |
-
};
|
6862 |
-
}
|
6863 |
|
6864 |
-
|
6865 |
-
|
6866 |
-
|
6867 |
-
|
6868 |
-
|
6869 |
-
|
6870 |
-
|
6871 |
-
|
6872 |
-
className: "components-button",
|
6873 |
-
href: Object(external_wc_navigation_["getNewPath"])(Object(external_wc_navigation_["pathIsExcluded"])(page.path) ? {} : persistedQuery, page.path, {}),
|
6874 |
-
type: "wc-admin"
|
6875 |
-
}, page.breadcrumbs[page.breadcrumbs.length - 1]))), reports.map(item => Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"], {
|
6876 |
-
item: item.navArgs.id,
|
6877 |
-
key: item.navArgs.id
|
6878 |
-
}, Object(external_wp_element_["createElement"])(external_wc_components_["Link"], {
|
6879 |
-
className: "components-button",
|
6880 |
-
href: Object(external_wc_navigation_["getNewPath"])(Object(external_wc_navigation_["pathIsExcluded"])(item.report) ? {} : persistedQuery, `/analytics/${item.report}`, {}),
|
6881 |
-
type: "wc-admin"
|
6882 |
-
}, item.title))));
|
6883 |
-
};
|
6884 |
|
6885 |
-
|
6886 |
-
|
6887 |
-
|
6888 |
-
|
6889 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6890 |
|
6891 |
|
|
|
|
|
6892 |
|
|
|
|
|
|
|
6893 |
/**
|
6894 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
6895 |
*/
|
6896 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6897 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6898 |
|
|
|
|
|
|
|
6899 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6900 |
|
|
|
|
|
|
|
6901 |
|
|
|
|
|
6902 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6903 |
|
|
|
|
|
|
|
|
|
|
|
6904 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6905 |
|
6906 |
|
|
|
6907 |
|
|
|
|
|
6908 |
|
6909 |
-
|
6910 |
-
* Internal dependencies
|
6911 |
-
*/
|
6912 |
|
|
|
6913 |
|
|
|
|
|
6914 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6915 |
|
6916 |
|
6917 |
|
6918 |
|
6919 |
|
|
|
|
|
6920 |
|
|
|
|
|
|
|
|
|
6921 |
|
6922 |
-
|
6923 |
-
|
6924 |
-
|
6925 |
-
|
6926 |
-
|
6927 |
-
children
|
6928 |
-
} = this.props;
|
6929 |
-
return Object(external_wp_element_["createElement"])("div", {
|
6930 |
-
className: "woocommerce-layout__primary",
|
6931 |
-
id: "woocommerce-layout__primary"
|
6932 |
-
}, window.wcAdminFeatures['store-alerts'] && Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
6933 |
-
fallback: null
|
6934 |
-
}, Object(external_wp_element_["createElement"])(StoreAlerts, null)), Object(external_wp_element_["createElement"])(layout_notices, null), children);
|
6935 |
}
|
|
|
6936 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6937 |
}
|
6938 |
|
6939 |
-
|
6940 |
-
|
6941 |
-
|
6942 |
-
}
|
6943 |
|
6944 |
-
|
6945 |
-
|
6946 |
-
const currentPath = Object(external_lodash_["get"])(this.props, 'location.pathname');
|
6947 |
|
6948 |
-
|
6949 |
-
return;
|
6950 |
-
}
|
6951 |
|
6952 |
-
|
6953 |
-
|
6954 |
-
}
|
6955 |
-
}
|
6956 |
|
6957 |
-
|
6958 |
-
|
6959 |
-
activePlugins,
|
6960 |
-
installedPlugins,
|
6961 |
-
isEmbedded,
|
6962 |
-
isJetpackConnected
|
6963 |
-
} = this.props;
|
6964 |
-
const navigationFlag = {
|
6965 |
-
has_navigation: !!window.wcNavigation
|
6966 |
-
};
|
6967 |
|
6968 |
-
|
6969 |
-
|
6970 |
-
|
6971 |
-
is_embedded: true,
|
6972 |
-
...navigationFlag
|
6973 |
-
});
|
6974 |
-
return;
|
6975 |
}
|
6976 |
|
6977 |
-
|
6978 |
|
6979 |
-
|
6980 |
-
|
6981 |
-
} // Remove leading slash, and camel case remaining pathname
|
6982 |
|
|
|
|
|
6983 |
|
6984 |
-
|
|
|
|
|
|
|
|
|
6985 |
|
6986 |
-
|
6987 |
-
|
6988 |
-
|
|
|
6989 |
|
6990 |
-
|
6991 |
-
jetpack_installed: installedPlugins.includes('jetpack'),
|
6992 |
-
jetpack_active: activePlugins.includes('jetpack'),
|
6993 |
-
jetpack_connected: isJetpackConnected,
|
6994 |
-
...navigationFlag
|
6995 |
-
});
|
6996 |
-
}
|
6997 |
|
6998 |
-
|
6999 |
-
if (!searchString) {
|
7000 |
-
return {};
|
7001 |
-
}
|
7002 |
|
7003 |
-
|
7004 |
-
|
7005 |
-
|
|
|
|
|
|
|
7006 |
|
7007 |
-
|
7008 |
-
|
7009 |
-
|
7010 |
-
section,
|
7011 |
-
tab
|
7012 |
-
} = Object(external_wc_navigation_["getQuery"])();
|
7013 |
-
return page === 'wc-settings' && tab === 'checkout' && section === 'woocommerce_payments';
|
7014 |
-
}
|
7015 |
|
7016 |
-
|
7017 |
-
|
7018 |
-
isEmbedded,
|
7019 |
-
...restProps
|
7020 |
-
} = this.props;
|
7021 |
-
const {
|
7022 |
-
location,
|
7023 |
-
page
|
7024 |
-
} = this.props;
|
7025 |
-
const {
|
7026 |
-
breadcrumbs
|
7027 |
-
} = page;
|
7028 |
-
const query = this.getQuery(location && location.search);
|
7029 |
-
return Object(external_wp_element_["createElement"])(external_wp_components_["SlotFillProvider"], null, Object(external_wp_element_["createElement"])("div", {
|
7030 |
-
className: "woocommerce-layout"
|
7031 |
-
}, Object(external_wp_element_["createElement"])(Header, {
|
7032 |
-
sections: Object(external_lodash_["isFunction"])(breadcrumbs) ? breadcrumbs(this.props) : breadcrumbs,
|
7033 |
-
isEmbedded: isEmbedded,
|
7034 |
-
query: query
|
7035 |
-
}), Object(external_wp_element_["createElement"])(transient_notices, null), !isEmbedded && Object(external_wp_element_["createElement"])(layout_PrimaryLayout, null, Object(external_wp_element_["createElement"])("div", {
|
7036 |
-
className: "woocommerce-layout__main"
|
7037 |
-
}, Object(external_wp_element_["createElement"])(controller_Controller, extends_default()({}, restProps, {
|
7038 |
-
query: query
|
7039 |
-
})))), isEmbedded && this.isWCPaySettingsPage() && Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
7040 |
-
fallback: null
|
7041 |
-
}, Object(external_wp_element_["createElement"])(WCPayUsageModal, null))), Object(external_wp_element_["createElement"])(external_wp_plugins_["PluginArea"], {
|
7042 |
-
scope: "woocommerce-admin"
|
7043 |
-
}), window.wcAdminFeatures.navigation && Object(external_wp_element_["createElement"])(external_wp_plugins_["PluginArea"], {
|
7044 |
-
scope: "woocommerce-navigation"
|
7045 |
-
}), Object(external_wp_element_["createElement"])(external_wp_plugins_["PluginArea"], {
|
7046 |
-
scope: "woocommerce-tasks"
|
7047 |
-
}));
|
7048 |
-
}
|
7049 |
-
|
7050 |
-
}
|
7051 |
|
7052 |
-
|
7053 |
-
isEmbedded: prop_types_default.a.bool,
|
7054 |
-
page: prop_types_default.a.shape({
|
7055 |
-
container: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.object // Support React.lazy
|
7056 |
-
]),
|
7057 |
-
path: prop_types_default.a.string,
|
7058 |
-
breadcrumbs: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(prop_types_default.a.string), prop_types_default.a.string]))]).isRequired,
|
7059 |
-
wpOpenMenu: prop_types_default.a.string
|
7060 |
-
}).isRequired
|
7061 |
-
};
|
7062 |
-
const dataEndpoints = Object(admin_settings["d" /* getAdminSetting */])('dataEndpoints');
|
7063 |
-
const Layout = Object(external_wp_compose_["compose"])(Object(external_wc_data_["withPluginsHydration"])({ ...Object(admin_settings["d" /* getAdminSetting */])('plugins', {}),
|
7064 |
-
jetpackStatus: dataEndpoints && dataEndpoints.jetpackStatus || false
|
7065 |
-
}), Object(external_wp_data_["withSelect"])((select, _ref) => {
|
7066 |
-
let {
|
7067 |
-
isEmbedded
|
7068 |
-
} = _ref;
|
7069 |
|
7070 |
-
|
7071 |
-
|
7072 |
-
return;
|
7073 |
-
}
|
7074 |
|
7075 |
-
|
7076 |
-
|
7077 |
-
getInstalledPlugins,
|
7078 |
-
isJetpackConnected
|
7079 |
-
} = select(external_wc_data_["PLUGINS_STORE_NAME"]);
|
7080 |
-
return {
|
7081 |
-
activePlugins: getActivePlugins(),
|
7082 |
-
isJetpackConnected: isJetpackConnected(),
|
7083 |
-
installedPlugins: getInstalledPlugins()
|
7084 |
-
};
|
7085 |
-
}))(layout_Layout);
|
7086 |
|
7087 |
-
|
7088 |
-
|
7089 |
-
|
7090 |
-
|
7091 |
-
return Object(external_wp_element_["createElement"])(react_router_Router, {
|
7092 |
-
history: Object(external_wc_navigation_["getHistory"])()
|
7093 |
-
}, Object(external_wp_element_["createElement"])(react_router_Switch, null, getPages().filter(page => !page.capability || currentUserCan(page.capability)).map(page => {
|
7094 |
-
return Object(external_wp_element_["createElement"])(react_router_Route, {
|
7095 |
-
key: page.path,
|
7096 |
-
path: page.path,
|
7097 |
-
exact: true,
|
7098 |
-
render: props => Object(external_wp_element_["createElement"])(Layout, extends_default()({
|
7099 |
-
page: page
|
7100 |
-
}, props))
|
7101 |
-
});
|
7102 |
-
})));
|
7103 |
-
};
|
7104 |
|
7105 |
-
|
7106 |
-
|
7107 |
|
7108 |
-
|
7109 |
-
|
7110 |
-
|
7111 |
-
|
7112 |
-
|
7113 |
-
}
|
7114 |
|
7115 |
-
|
7116 |
-
}
|
7117 |
|
7118 |
-
|
7119 |
|
7120 |
-
|
7121 |
-
|
|
|
|
|
7122 |
|
7123 |
-
|
|
|
|
|
|
|
7124 |
|
7125 |
-
|
|
|
|
|
7126 |
|
7127 |
-
|
7128 |
-
|
|
|
|
|
|
|
7129 |
|
7130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7131 |
|
7132 |
-
|
|
|
|
|
7133 |
|
7134 |
-
|
7135 |
-
|
7136 |
|
7137 |
-
|
|
|
|
|
|
|
|
|
|
|
7138 |
|
7139 |
-
|
7140 |
|
7141 |
-
|
7142 |
-
/***/ (function(module, exports) {
|
7143 |
|
7144 |
-
|
7145 |
|
7146 |
/***/ }),
|
7147 |
|
7148 |
-
/***/
|
7149 |
-
/***/ (function(module, exports) {
|
7150 |
|
7151 |
-
|
7152 |
-
var process = module.exports = {};
|
7153 |
|
7154 |
-
|
7155 |
-
|
7156 |
-
|
7157 |
-
|
|
|
|
|
|
|
|
|
7158 |
|
7159 |
-
|
7160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7161 |
|
7162 |
-
|
7163 |
-
|
7164 |
-
|
7165 |
-
|
7166 |
-
|
7167 |
-
}
|
7168 |
-
|
7169 |
-
|
7170 |
-
|
7171 |
-
|
7172 |
-
|
7173 |
-
|
7174 |
-
|
7175 |
-
|
7176 |
-
cachedSetTimeout = defaultSetTimout;
|
7177 |
-
}
|
7178 |
-
try {
|
7179 |
-
if (typeof clearTimeout === 'function') {
|
7180 |
-
cachedClearTimeout = clearTimeout;
|
7181 |
-
} else {
|
7182 |
-
cachedClearTimeout = defaultClearTimeout;
|
7183 |
-
}
|
7184 |
-
} catch (e) {
|
7185 |
-
cachedClearTimeout = defaultClearTimeout;
|
7186 |
-
}
|
7187 |
-
} ())
|
7188 |
-
function runTimeout(fun) {
|
7189 |
-
if (cachedSetTimeout === setTimeout) {
|
7190 |
-
//normal enviroments in sane situations
|
7191 |
-
return setTimeout(fun, 0);
|
7192 |
-
}
|
7193 |
-
// if setTimeout wasn't available but was latter defined
|
7194 |
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
7195 |
-
cachedSetTimeout = setTimeout;
|
7196 |
-
return setTimeout(fun, 0);
|
7197 |
-
}
|
7198 |
-
try {
|
7199 |
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
7200 |
-
return cachedSetTimeout(fun, 0);
|
7201 |
-
} catch(e){
|
7202 |
-
try {
|
7203 |
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
7204 |
-
return cachedSetTimeout.call(null, fun, 0);
|
7205 |
-
} catch(e){
|
7206 |
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
7207 |
-
return cachedSetTimeout.call(this, fun, 0);
|
7208 |
-
}
|
7209 |
-
}
|
7210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7211 |
|
7212 |
-
|
7213 |
-
|
7214 |
-
|
7215 |
-
|
7216 |
-
return clearTimeout(marker);
|
7217 |
-
}
|
7218 |
-
// if clearTimeout wasn't available but was latter defined
|
7219 |
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
7220 |
-
cachedClearTimeout = clearTimeout;
|
7221 |
-
return clearTimeout(marker);
|
7222 |
}
|
7223 |
-
|
7224 |
-
|
7225 |
-
|
7226 |
-
|
7227 |
-
|
7228 |
-
|
7229 |
-
|
7230 |
-
|
7231 |
-
|
7232 |
-
|
7233 |
-
|
7234 |
-
|
|
|
7235 |
}
|
7236 |
|
|
|
|
|
|
|
|
|
|
|
7237 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7238 |
|
7239 |
-
|
7240 |
-
|
7241 |
-
|
7242 |
-
|
7243 |
-
var queueIndex = -1;
|
7244 |
|
7245 |
-
|
7246 |
-
|
7247 |
-
|
7248 |
-
|
7249 |
-
draining = false;
|
7250 |
-
if (currentQueue.length) {
|
7251 |
-
queue = currentQueue.concat(queue);
|
7252 |
-
} else {
|
7253 |
-
queueIndex = -1;
|
7254 |
-
}
|
7255 |
-
if (queue.length) {
|
7256 |
-
drainQueue();
|
7257 |
-
}
|
7258 |
-
}
|
7259 |
|
7260 |
-
|
7261 |
-
|
7262 |
-
return;
|
7263 |
-
}
|
7264 |
-
var timeout = runTimeout(cleanUpNextTick);
|
7265 |
-
draining = true;
|
7266 |
|
7267 |
-
|
7268 |
-
|
7269 |
-
|
7270 |
-
|
7271 |
-
|
7272 |
-
|
7273 |
-
|
7274 |
-
|
7275 |
-
|
7276 |
-
queueIndex = -1;
|
7277 |
-
len = queue.length;
|
7278 |
-
}
|
7279 |
-
currentQueue = null;
|
7280 |
-
draining = false;
|
7281 |
-
runClearTimeout(timeout);
|
7282 |
}
|
7283 |
|
7284 |
-
|
7285 |
-
|
7286 |
-
|
7287 |
-
|
7288 |
-
|
7289 |
-
|
7290 |
-
|
7291 |
-
|
7292 |
-
|
7293 |
-
|
7294 |
-
|
7295 |
-
};
|
7296 |
|
7297 |
-
|
7298 |
-
|
7299 |
-
|
7300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7301 |
}
|
7302 |
-
Item.prototype.run = function () {
|
7303 |
-
this.fun.apply(null, this.array);
|
7304 |
-
};
|
7305 |
-
process.title = 'browser';
|
7306 |
-
process.browser = true;
|
7307 |
-
process.env = {};
|
7308 |
-
process.argv = [];
|
7309 |
-
process.version = ''; // empty string to avoid regexp issues
|
7310 |
-
process.versions = {};
|
7311 |
|
7312 |
-
|
|
|
|
|
|
|
|
|
|
|
7313 |
|
7314 |
-
|
7315 |
-
|
7316 |
-
|
7317 |
-
|
7318 |
-
|
7319 |
-
|
7320 |
-
process.emit = noop;
|
7321 |
-
process.prependListener = noop;
|
7322 |
-
process.prependOnceListener = noop;
|
7323 |
|
7324 |
-
|
|
|
|
|
|
|
|
|
7325 |
|
7326 |
-
|
7327 |
-
|
7328 |
-
};
|
7329 |
|
7330 |
-
|
7331 |
-
|
7332 |
-
throw new Error('process.chdir is not supported');
|
7333 |
-
};
|
7334 |
-
process.umask = function() { return 0; };
|
7335 |
|
|
|
|
|
7336 |
|
7337 |
-
|
|
|
7338 |
|
7339 |
-
|
7340 |
-
|
|
|
|
|
|
|
|
|
7341 |
|
7342 |
-
|
7343 |
-
|
7344 |
-
|
7345 |
-
|
7346 |
-
|
7347 |
-
*
|
7348 |
-
* This source code is licensed under the MIT license found in the
|
7349 |
-
* LICENSE file in the root directory of this source tree.
|
7350 |
-
*/
|
7351 |
|
7352 |
-
|
7353 |
-
|
7354 |
-
|
7355 |
-
|
7356 |
-
exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
|
7357 |
-
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
|
7358 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7359 |
|
7360 |
-
|
|
|
7361 |
|
7362 |
-
|
7363 |
-
|
|
|
7364 |
|
7365 |
-
(
|
|
|
7366 |
|
7367 |
-
|
|
|
7368 |
|
7369 |
-
|
7370 |
-
/***/ (function(module, exports) {
|
7371 |
|
7372 |
-
(
|
|
|
|
|
7373 |
|
7374 |
-
|
7375 |
-
|
7376 |
-
/***/ 16:
|
7377 |
-
/***/ (function(module, exports) {
|
7378 |
-
|
7379 |
-
(function() { module.exports = window["wp"]["url"]; }());
|
7380 |
-
|
7381 |
-
/***/ }),
|
7382 |
|
7383 |
-
|
7384 |
-
|
|
|
7385 |
|
7386 |
-
|
7387 |
-
|
7388 |
-
|
7389 |
-
|
7390 |
-
|
|
|
|
|
|
|
|
|
7391 |
|
7392 |
-
|
7393 |
-
|
7394 |
-
|
7395 |
-
|
|
|
|
|
|
|
|
|
|
|
7396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7399 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7400 |
|
|
|
|
|
7401 |
|
7402 |
-
|
7403 |
-
|
7404 |
-
|
7405 |
-
|
7406 |
-
|
|
|
|
|
|
|
|
|
|
|
7407 |
|
7408 |
-
for (i = 0; i <
|
7409 |
-
|
7410 |
-
if (excluded.indexOf(key) >= 0) continue;
|
7411 |
-
target[key] = source[key];
|
7412 |
}
|
7413 |
|
7414 |
-
|
7415 |
-
}
|
7416 |
|
7417 |
-
|
7418 |
-
|
7419 |
|
7420 |
-
|
7421 |
-
|
7422 |
-
|
7423 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7424 |
}
|
7425 |
|
7426 |
-
|
7427 |
-
function
|
7428 |
-
|
7429 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7430 |
}
|
7431 |
|
7432 |
-
|
7433 |
|
7434 |
-
|
7435 |
-
|
7436 |
-
|
7437 |
-
children,
|
7438 |
-
scrollTop,
|
7439 |
-
scrollLeft
|
7440 |
-
} = _ref,
|
7441 |
-
attributes = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
7442 |
|
7443 |
-
|
7444 |
-
|
|
|
7445 |
|
7446 |
-
|
7447 |
-
|
7448 |
-
|
|
|
|
|
|
|
|
|
7449 |
|
7450 |
-
|
7451 |
-
|
7452 |
-
|
7453 |
|
7454 |
-
if (
|
7455 |
-
|
|
|
|
|
|
|
|
|
7456 |
} else {
|
7457 |
-
|
7458 |
}
|
|
|
|
|
7459 |
}
|
7460 |
}
|
7461 |
|
7462 |
-
|
7463 |
-
|
7464 |
-
});
|
7465 |
-
|
7466 |
-
if (scrollTop !== void 0) {
|
7467 |
-
instance.scrollTop = scrollTop;
|
7468 |
-
}
|
7469 |
|
7470 |
-
|
7471 |
-
|
|
|
|
|
|
|
|
|
7472 |
}
|
7473 |
-
}
|
7474 |
-
let isUnitlessNumber = {
|
7475 |
-
animationIterationCount: true,
|
7476 |
-
borderImageOutset: true,
|
7477 |
-
borderImageSlice: true,
|
7478 |
-
borderImageWidth: true,
|
7479 |
-
boxFlex: true,
|
7480 |
-
boxFlexGroup: true,
|
7481 |
-
boxOrdinalGroup: true,
|
7482 |
-
columnCount: true,
|
7483 |
-
columns: true,
|
7484 |
-
flex: true,
|
7485 |
-
flexGrow: true,
|
7486 |
-
flexPositive: true,
|
7487 |
-
flexShrink: true,
|
7488 |
-
flexNegative: true,
|
7489 |
-
flexOrder: true,
|
7490 |
-
gridRow: true,
|
7491 |
-
gridRowEnd: true,
|
7492 |
-
gridRowSpan: true,
|
7493 |
-
gridRowStart: true,
|
7494 |
-
gridColumn: true,
|
7495 |
-
gridColumnEnd: true,
|
7496 |
-
gridColumnSpan: true,
|
7497 |
-
gridColumnStart: true,
|
7498 |
-
fontWeight: true,
|
7499 |
-
lineClamp: true,
|
7500 |
-
lineHeight: true,
|
7501 |
-
opacity: true,
|
7502 |
-
order: true,
|
7503 |
-
orphans: true,
|
7504 |
-
tabSize: true,
|
7505 |
-
widows: true,
|
7506 |
-
zIndex: true,
|
7507 |
-
zoom: true,
|
7508 |
-
fillOpacity: true,
|
7509 |
-
floodOpacity: true,
|
7510 |
-
stopOpacity: true,
|
7511 |
-
strokeDasharray: true,
|
7512 |
-
strokeDashoffset: true,
|
7513 |
-
strokeMiterlimit: true,
|
7514 |
-
strokeOpacity: true,
|
7515 |
-
strokeWidth: true
|
7516 |
-
};
|
7517 |
-
|
7518 |
-
const prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
7519 |
-
|
7520 |
-
const prefixes = ['Webkit', 'Ms', 'Moz', 'O'];
|
7521 |
-
isUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => {
|
7522 |
-
prefixes.forEach(prefix => acc[prefixKey(prefix, prop)] = acc[prop]);
|
7523 |
-
return acc;
|
7524 |
-
}, isUnitlessNumber);
|
7525 |
-
|
7526 |
-
const _excluded$1 = ["x", "y", "z"];
|
7527 |
-
const domTransforms = /^(matrix|translate|scale|rotate|skew)/;
|
7528 |
-
const pxTransforms = /^(translate)/;
|
7529 |
-
const degTransforms = /^(rotate|skew)/;
|
7530 |
-
|
7531 |
-
const addUnit = (value, unit) => _react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* is */ "s"].num(value) && value !== 0 ? value + unit : value;
|
7532 |
-
|
7533 |
-
const isValueIdentity = (value, id) => _react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* is */ "s"].arr(value) ? value.every(v => isValueIdentity(v, id)) : _react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* is */ "s"].num(value) ? value === id : parseFloat(value) === id;
|
7534 |
-
|
7535 |
-
class AnimatedStyle extends _react_spring_animated__WEBPACK_IMPORTED_MODULE_3__[/* AnimatedObject */ "a"] {
|
7536 |
-
constructor(_ref) {
|
7537 |
-
let {
|
7538 |
-
x,
|
7539 |
-
y,
|
7540 |
-
z
|
7541 |
-
} = _ref,
|
7542 |
-
style = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
7543 |
-
|
7544 |
-
const inputs = [];
|
7545 |
-
const transforms = [];
|
7546 |
-
|
7547 |
-
if (x || y || z) {
|
7548 |
-
inputs.push([x || 0, y || 0, z || 0]);
|
7549 |
-
transforms.push(xyz => [`translate3d(${xyz.map(v => addUnit(v, 'px')).join(',')})`, isValueIdentity(xyz, 0)]);
|
7550 |
-
}
|
7551 |
-
|
7552 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* eachProp */ "l"])(style, (value, key) => {
|
7553 |
-
if (key === 'transform') {
|
7554 |
-
inputs.push([value || '']);
|
7555 |
-
transforms.push(transform => [transform, transform === '']);
|
7556 |
-
} else if (domTransforms.test(key)) {
|
7557 |
-
delete style[key];
|
7558 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* is */ "s"].und(value)) return;
|
7559 |
-
const unit = pxTransforms.test(key) ? 'px' : degTransforms.test(key) ? 'deg' : '';
|
7560 |
-
inputs.push(Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* toArray */ "y"])(value));
|
7561 |
-
transforms.push(key === 'rotate3d' ? ([x, y, z, deg]) => [`rotate3d(${x},${y},${z},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : input => [`${key}(${input.map(v => addUnit(v, unit)).join(',')})`, isValueIdentity(input, key.startsWith('scale') ? 1 : 0)]);
|
7562 |
-
}
|
7563 |
-
});
|
7564 |
|
7565 |
-
|
7566 |
-
|
7567 |
-
|
7568 |
-
|
7569 |
-
|
|
|
7570 |
}
|
7571 |
|
|
|
7572 |
}
|
7573 |
|
7574 |
-
|
7575 |
-
|
7576 |
-
|
7577 |
-
|
7578 |
-
|
7579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7580 |
}
|
7581 |
|
7582 |
-
|
7583 |
-
return this._value || (this._value = this._get());
|
7584 |
-
}
|
7585 |
|
7586 |
-
|
7587 |
-
|
7588 |
-
let identity = true;
|
7589 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* each */ "k"])(this.inputs, (input, i) => {
|
7590 |
-
const arg1 = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* getFluidValue */ "q"])(input[0]);
|
7591 |
-
const [t, id] = this.transforms[i](_react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* is */ "s"].arr(arg1) ? arg1 : input.map(_react_spring_shared__WEBPACK_IMPORTED_MODULE_2__[/* getFluidValue */ "q"]));
|
7592 |
-
transform += ' ' + t;
|
7593 |
-
identity = identity && id;
|
7594 |
-
});
|
7595 |
-
return identity ? 'none' : transform;
|
7596 |
}
|
7597 |
|
7598 |
-
|
7599 |
-
|
7600 |
}
|
7601 |
|
7602 |
-
|
7603 |
-
|
7604 |
-
}
|
7605 |
|
7606 |
-
eventObserved(event) {
|
7607 |
-
if (event.type == 'change') {
|
7608 |
-
this._value = null;
|
7609 |
-
}
|
7610 |
|
7611 |
-
|
7612 |
-
}
|
7613 |
|
7614 |
-
|
|
|
7615 |
|
7616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7617 |
|
7618 |
-
|
7619 |
-
|
7620 |
-
|
7621 |
-
|
7622 |
-
|
7623 |
-
}
|
7624 |
-
|
7625 |
-
applyAnimatedValues,
|
7626 |
-
createAnimatedStyle: style => new AnimatedStyle(style),
|
7627 |
-
getComponentProps: _ref => {
|
7628 |
-
let props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
7629 |
|
7630 |
-
|
7631 |
-
|
7632 |
-
|
7633 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7634 |
|
|
|
7635 |
|
|
|
|
|
7636 |
|
|
|
7637 |
|
7638 |
/***/ }),
|
7639 |
|
7640 |
-
/***/
|
7641 |
-
/***/ (function(module,
|
7642 |
|
7643 |
"use strict";
|
7644 |
-
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
|
7645 |
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
7646 |
-
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27);
|
7647 |
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
7648 |
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
|
7649 |
-
|
7650 |
|
7651 |
|
|
|
|
|
|
|
7652 |
|
|
|
|
|
|
|
7653 |
|
7654 |
-
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
7655 |
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
|
7656 |
|
7657 |
-
|
7658 |
-
|
7659 |
-
|
7660 |
-
}
|
7661 |
|
7662 |
-
function objectIs(x, y) {
|
7663 |
-
if (x === y) {
|
7664 |
-
return x !== 0 || 1 / x === 1 / y;
|
7665 |
-
} else {
|
7666 |
-
return x !== x && y !== y;
|
7667 |
-
}
|
7668 |
-
}
|
7669 |
|
7670 |
-
|
7671 |
-
var handlers = [];
|
7672 |
-
return {
|
7673 |
-
on: function on(handler) {
|
7674 |
-
handlers.push(handler);
|
7675 |
-
},
|
7676 |
-
off: function off(handler) {
|
7677 |
-
handlers = handlers.filter(function (h) {
|
7678 |
-
return h !== handler;
|
7679 |
-
});
|
7680 |
-
},
|
7681 |
-
get: function get() {
|
7682 |
-
return value;
|
7683 |
-
},
|
7684 |
-
set: function set(newValue, changedBits) {
|
7685 |
-
value = newValue;
|
7686 |
-
handlers.forEach(function (handler) {
|
7687 |
-
return handler(value, changedBits);
|
7688 |
-
});
|
7689 |
-
}
|
7690 |
-
};
|
7691 |
-
}
|
7692 |
|
7693 |
-
|
7694 |
-
return Array.isArray(children) ? children[0] : children;
|
7695 |
-
}
|
7696 |
|
7697 |
-
|
7698 |
-
var _Provider$childContex, _Consumer$contextType;
|
7699 |
|
7700 |
-
|
7701 |
|
7702 |
-
|
7703 |
-
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Provider, _Component);
|
7704 |
|
7705 |
-
|
7706 |
-
var _this;
|
7707 |
|
7708 |
-
|
7709 |
-
_this.emitter = createEventEmitter(_this.props.value);
|
7710 |
-
return _this;
|
7711 |
-
}
|
7712 |
|
7713 |
-
|
7714 |
|
7715 |
-
|
7716 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7717 |
|
7718 |
-
|
7719 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7720 |
|
7721 |
-
|
7722 |
-
|
7723 |
-
|
7724 |
-
|
7725 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7726 |
|
7727 |
-
|
7728 |
-
|
7729 |
-
|
7730 |
-
changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
7731 |
|
7732 |
-
|
|
|
|
|
|
|
|
|
7733 |
|
7734 |
-
|
|
|
7735 |
|
7736 |
-
|
7737 |
-
|
7738 |
-
|
7739 |
-
|
7740 |
-
}
|
7741 |
-
};
|
7742 |
|
7743 |
-
_proto.render = function render() {
|
7744 |
-
return this.props.children;
|
7745 |
-
};
|
7746 |
|
7747 |
-
|
7748 |
-
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
|
7749 |
|
7750 |
-
|
|
|
|
|
7751 |
|
7752 |
-
|
7753 |
-
|
|
|
|
|
7754 |
|
7755 |
-
|
7756 |
-
|
7757 |
|
7758 |
-
|
7759 |
-
_this2.state = {
|
7760 |
-
value: _this2.getValue()
|
7761 |
-
};
|
7762 |
|
7763 |
-
|
7764 |
-
|
|
|
|
|
|
|
|
|
7765 |
|
7766 |
-
|
7767 |
-
|
7768 |
-
|
7769 |
-
});
|
7770 |
-
}
|
7771 |
-
};
|
7772 |
|
7773 |
-
|
7774 |
-
|
7775 |
|
7776 |
-
|
7777 |
|
7778 |
-
|
7779 |
-
|
7780 |
-
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
7781 |
-
};
|
7782 |
|
7783 |
-
|
7784 |
-
if (this.context[contextProp]) {
|
7785 |
-
this.context[contextProp].on(this.onUpdate);
|
7786 |
-
}
|
7787 |
|
7788 |
-
|
7789 |
-
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
7790 |
-
};
|
7791 |
|
7792 |
-
|
7793 |
-
|
7794 |
-
this.context[contextProp].off(this.onUpdate);
|
7795 |
-
}
|
7796 |
-
};
|
7797 |
|
7798 |
-
|
7799 |
-
if (this.context[contextProp]) {
|
7800 |
-
return this.context[contextProp].get();
|
7801 |
-
} else {
|
7802 |
-
return defaultValue;
|
7803 |
-
}
|
7804 |
-
};
|
7805 |
|
7806 |
-
|
7807 |
-
return onlyChild(this.props.children)(this.state.value);
|
7808 |
-
};
|
7809 |
|
7810 |
-
|
7811 |
-
|
7812 |
|
7813 |
-
|
7814 |
-
return {
|
7815 |
-
Provider: Provider,
|
7816 |
-
Consumer: Consumer
|
7817 |
-
};
|
7818 |
-
}
|
7819 |
|
7820 |
-
|
7821 |
|
7822 |
-
|
|
|
7823 |
|
7824 |
-
|
7825 |
|
7826 |
/***/ }),
|
7827 |
|
7828 |
-
/***/
|
7829 |
-
/***/ (function(module,
|
7830 |
|
7831 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7832 |
|
7833 |
-
|
7834 |
-
|
7835 |
-
|
7836 |
-
|
7837 |
-
|
7838 |
-
module.exports.compile = compile
|
7839 |
-
module.exports.tokensToFunction = tokensToFunction
|
7840 |
-
module.exports.tokensToRegExp = tokensToRegExp
|
7841 |
-
|
7842 |
-
/**
|
7843 |
-
* The main path matching regexp utility.
|
7844 |
-
*
|
7845 |
-
* @type {RegExp}
|
7846 |
-
*/
|
7847 |
-
var PATH_REGEXP = new RegExp([
|
7848 |
-
// Match escaped characters that would otherwise appear in future matches.
|
7849 |
-
// This allows the user to escape special characters that won't transform.
|
7850 |
-
'(\\\\.)',
|
7851 |
-
// Match Express-style parameters and un-named parameters with a prefix
|
7852 |
-
// and optional suffixes. Matches appear as:
|
7853 |
-
//
|
7854 |
-
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
|
7855 |
-
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
|
7856 |
-
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
|
7857 |
-
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
|
7858 |
-
].join('|'), 'g')
|
7859 |
|
7860 |
-
|
7861 |
-
|
7862 |
-
*
|
7863 |
-
* @param {string} str
|
7864 |
-
* @param {Object=} options
|
7865 |
-
* @return {!Array}
|
7866 |
-
*/
|
7867 |
-
function parse (str, options) {
|
7868 |
-
var tokens = []
|
7869 |
-
var key = 0
|
7870 |
-
var index = 0
|
7871 |
-
var path = ''
|
7872 |
-
var defaultDelimiter = options && options.delimiter || '/'
|
7873 |
-
var res
|
7874 |
|
7875 |
-
|
7876 |
-
var m = res[0]
|
7877 |
-
var escaped = res[1]
|
7878 |
-
var offset = res.index
|
7879 |
-
path += str.slice(index, offset)
|
7880 |
-
index = offset + m.length
|
7881 |
|
7882 |
-
|
7883 |
-
|
7884 |
-
path += escaped[1]
|
7885 |
-
continue
|
7886 |
-
}
|
7887 |
|
7888 |
-
|
7889 |
-
|
7890 |
-
|
7891 |
-
|
7892 |
-
var
|
7893 |
-
|
7894 |
-
var asterisk = res[7]
|
7895 |
|
7896 |
-
|
7897 |
-
|
7898 |
-
|
7899 |
-
|
|
|
7900 |
}
|
7901 |
|
7902 |
-
|
7903 |
-
|
7904 |
-
var optional = modifier === '?' || modifier === '*'
|
7905 |
-
var delimiter = res[2] || defaultDelimiter
|
7906 |
-
var pattern = capture || group
|
7907 |
-
|
7908 |
-
tokens.push({
|
7909 |
-
name: name || key++,
|
7910 |
-
prefix: prefix || '',
|
7911 |
-
delimiter: delimiter,
|
7912 |
-
optional: optional,
|
7913 |
-
repeat: repeat,
|
7914 |
-
partial: partial,
|
7915 |
-
asterisk: !!asterisk,
|
7916 |
-
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
|
7917 |
-
})
|
7918 |
-
}
|
7919 |
-
|
7920 |
-
// Match any characters still remaining.
|
7921 |
-
if (index < str.length) {
|
7922 |
-
path += str.substr(index)
|
7923 |
-
}
|
7924 |
-
|
7925 |
-
// If the path exists, push it onto the end.
|
7926 |
-
if (path) {
|
7927 |
-
tokens.push(path)
|
7928 |
-
}
|
7929 |
-
|
7930 |
-
return tokens
|
7931 |
-
}
|
7932 |
-
|
7933 |
-
/**
|
7934 |
-
* Compile a string to a template function for the path.
|
7935 |
-
*
|
7936 |
-
* @param {string} str
|
7937 |
-
* @param {Object=} options
|
7938 |
-
* @return {!function(Object=, Object=)}
|
7939 |
-
*/
|
7940 |
-
function compile (str, options) {
|
7941 |
-
return tokensToFunction(parse(str, options), options)
|
7942 |
-
}
|
7943 |
-
|
7944 |
-
/**
|
7945 |
-
* Prettier encoding of URI path segments.
|
7946 |
-
*
|
7947 |
-
* @param {string}
|
7948 |
-
* @return {string}
|
7949 |
-
*/
|
7950 |
-
function encodeURIComponentPretty (str) {
|
7951 |
-
return encodeURI(str).replace(/[\/?#]/g, function (c) {
|
7952 |
-
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
7953 |
-
})
|
7954 |
-
}
|
7955 |
|
7956 |
-
|
7957 |
-
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
|
7958 |
-
*
|
7959 |
-
* @param {string}
|
7960 |
-
* @return {string}
|
7961 |
-
*/
|
7962 |
-
function encodeAsterisk (str) {
|
7963 |
-
return encodeURI(str).replace(/[?#]/g, function (c) {
|
7964 |
-
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
7965 |
-
})
|
7966 |
}
|
7967 |
|
7968 |
-
|
7969 |
-
* Expose a method for transforming tokens into the path function.
|
7970 |
-
*/
|
7971 |
-
function tokensToFunction (tokens, options) {
|
7972 |
-
// Compile all the tokens into regexps.
|
7973 |
-
var matches = new Array(tokens.length)
|
7974 |
|
7975 |
-
|
7976 |
-
|
7977 |
-
if (typeof tokens[i] === 'object') {
|
7978 |
-
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
|
7979 |
-
}
|
7980 |
-
}
|
7981 |
|
7982 |
-
|
7983 |
-
var path = ''
|
7984 |
-
var data = obj || {}
|
7985 |
-
var options = opts || {}
|
7986 |
-
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
|
7987 |
|
7988 |
-
|
7989 |
-
|
7990 |
|
7991 |
-
|
7992 |
-
|
|
|
|
|
|
|
|
|
7993 |
|
7994 |
-
|
7995 |
-
|
|
|
7996 |
|
7997 |
-
|
7998 |
-
|
|
|
|
|
|
|
7999 |
|
8000 |
-
|
8001 |
-
if (token.optional) {
|
8002 |
-
// Prepend partial segment prefixes.
|
8003 |
-
if (token.partial) {
|
8004 |
-
path += token.prefix
|
8005 |
-
}
|
8006 |
|
8007 |
-
|
8008 |
-
|
8009 |
-
throw new TypeError('Expected "' + token.name + '" to be defined')
|
8010 |
-
}
|
8011 |
-
}
|
8012 |
|
8013 |
-
|
8014 |
-
if (!token.repeat) {
|
8015 |
-
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
|
8016 |
-
}
|
8017 |
|
8018 |
-
|
8019 |
-
|
8020 |
-
|
8021 |
-
} else {
|
8022 |
-
throw new TypeError('Expected "' + token.name + '" to not be empty')
|
8023 |
-
}
|
8024 |
-
}
|
8025 |
|
8026 |
-
|
8027 |
-
|
8028 |
|
8029 |
-
|
8030 |
-
|
8031 |
-
}
|
8032 |
|
8033 |
-
|
8034 |
-
|
8035 |
|
8036 |
-
|
8037 |
-
|
8038 |
|
8039 |
-
|
|
|
8040 |
|
8041 |
-
|
8042 |
-
|
8043 |
-
}
|
8044 |
|
8045 |
-
|
8046 |
-
}
|
8047 |
|
8048 |
-
return path
|
8049 |
-
}
|
8050 |
-
}
|
8051 |
|
8052 |
/**
|
8053 |
-
*
|
8054 |
-
*
|
8055 |
-
* @param {string} str
|
8056 |
-
* @return {string}
|
8057 |
-
*/
|
8058 |
-
function escapeString (str) {
|
8059 |
-
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
|
8060 |
-
}
|
8061 |
-
|
8062 |
-
/**
|
8063 |
-
* Escape the capturing group by escaping special characters and meaning.
|
8064 |
-
*
|
8065 |
-
* @param {string} group
|
8066 |
-
* @return {string}
|
8067 |
-
*/
|
8068 |
-
function escapeGroup (group) {
|
8069 |
-
return group.replace(/([=!:$\/()])/g, '\\$1')
|
8070 |
-
}
|
8071 |
-
|
8072 |
-
/**
|
8073 |
-
* Attach the keys as a property of the regexp.
|
8074 |
-
*
|
8075 |
-
* @param {!RegExp} re
|
8076 |
-
* @param {Array} keys
|
8077 |
-
* @return {!RegExp}
|
8078 |
-
*/
|
8079 |
-
function attachKeys (re, keys) {
|
8080 |
-
re.keys = keys
|
8081 |
-
return re
|
8082 |
-
}
|
8083 |
-
|
8084 |
-
/**
|
8085 |
-
* Get the flags for a regexp from the options.
|
8086 |
-
*
|
8087 |
-
* @param {Object} options
|
8088 |
-
* @return {string}
|
8089 |
-
*/
|
8090 |
-
function flags (options) {
|
8091 |
-
return options && options.sensitive ? '' : 'i'
|
8092 |
-
}
|
8093 |
-
|
8094 |
-
/**
|
8095 |
-
* Pull out keys from a regexp.
|
8096 |
-
*
|
8097 |
-
* @param {!RegExp} path
|
8098 |
-
* @param {!Array} keys
|
8099 |
-
* @return {!RegExp}
|
8100 |
-
*/
|
8101 |
-
function regexpToRegexp (path, keys) {
|
8102 |
-
// Use a negative lookahead to match only capturing groups.
|
8103 |
-
var groups = path.source.match(/\((?!\?)/g)
|
8104 |
-
|
8105 |
-
if (groups) {
|
8106 |
-
for (var i = 0; i < groups.length; i++) {
|
8107 |
-
keys.push({
|
8108 |
-
name: i,
|
8109 |
-
prefix: null,
|
8110 |
-
delimiter: null,
|
8111 |
-
optional: false,
|
8112 |
-
repeat: false,
|
8113 |
-
partial: false,
|
8114 |
-
asterisk: false,
|
8115 |
-
pattern: null
|
8116 |
-
})
|
8117 |
-
}
|
8118 |
-
}
|
8119 |
-
|
8120 |
-
return attachKeys(path, keys)
|
8121 |
-
}
|
8122 |
-
|
8123 |
-
/**
|
8124 |
-
* Transform an array into a regexp.
|
8125 |
-
*
|
8126 |
-
* @param {!Array} path
|
8127 |
-
* @param {Array} keys
|
8128 |
-
* @param {!Object} options
|
8129 |
-
* @return {!RegExp}
|
8130 |
-
*/
|
8131 |
-
function arrayToRegexp (path, keys, options) {
|
8132 |
-
var parts = []
|
8133 |
-
|
8134 |
-
for (var i = 0; i < path.length; i++) {
|
8135 |
-
parts.push(pathToRegexp(path[i], keys, options).source)
|
8136 |
-
}
|
8137 |
-
|
8138 |
-
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
|
8139 |
-
|
8140 |
-
return attachKeys(regexp, keys)
|
8141 |
-
}
|
8142 |
-
|
8143 |
-
/**
|
8144 |
-
* Create a path regexp from string input.
|
8145 |
-
*
|
8146 |
-
* @param {string} path
|
8147 |
-
* @param {!Array} keys
|
8148 |
-
* @param {!Object} options
|
8149 |
-
* @return {!RegExp}
|
8150 |
-
*/
|
8151 |
-
function stringToRegexp (path, keys, options) {
|
8152 |
-
return tokensToRegExp(parse(path, options), keys, options)
|
8153 |
-
}
|
8154 |
-
|
8155 |
-
/**
|
8156 |
-
* Expose a function for taking tokens and returning a RegExp.
|
8157 |
-
*
|
8158 |
-
* @param {!Array} tokens
|
8159 |
-
* @param {(Array|Object)=} keys
|
8160 |
-
* @param {Object=} options
|
8161 |
-
* @return {!RegExp}
|
8162 |
-
*/
|
8163 |
-
function tokensToRegExp (tokens, keys, options) {
|
8164 |
-
if (!isarray(keys)) {
|
8165 |
-
options = /** @type {!Object} */ (keys || options)
|
8166 |
-
keys = []
|
8167 |
-
}
|
8168 |
-
|
8169 |
-
options = options || {}
|
8170 |
-
|
8171 |
-
var strict = options.strict
|
8172 |
-
var end = options.end !== false
|
8173 |
-
var route = ''
|
8174 |
-
|
8175 |
-
// Iterate over the tokens and create our regexp string.
|
8176 |
-
for (var i = 0; i < tokens.length; i++) {
|
8177 |
-
var token = tokens[i]
|
8178 |
-
|
8179 |
-
if (typeof token === 'string') {
|
8180 |
-
route += escapeString(token)
|
8181 |
-
} else {
|
8182 |
-
var prefix = escapeString(token.prefix)
|
8183 |
-
var capture = '(?:' + token.pattern + ')'
|
8184 |
-
|
8185 |
-
keys.push(token)
|
8186 |
-
|
8187 |
-
if (token.repeat) {
|
8188 |
-
capture += '(?:' + prefix + capture + ')*'
|
8189 |
-
}
|
8190 |
-
|
8191 |
-
if (token.optional) {
|
8192 |
-
if (!token.partial) {
|
8193 |
-
capture = '(?:' + prefix + '(' + capture + '))?'
|
8194 |
-
} else {
|
8195 |
-
capture = prefix + '(' + capture + ')?'
|
8196 |
-
}
|
8197 |
-
} else {
|
8198 |
-
capture = prefix + '(' + capture + ')'
|
8199 |
-
}
|
8200 |
-
|
8201 |
-
route += capture
|
8202 |
-
}
|
8203 |
-
}
|
8204 |
-
|
8205 |
-
var delimiter = escapeString(options.delimiter || '/')
|
8206 |
-
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
|
8207 |
-
|
8208 |
-
// In non-strict mode we allow a slash at the end of match. If the path to
|
8209 |
-
// match already ends with a slash, we remove it for consistency. The slash
|
8210 |
-
// is valid at the end of a path match, not in the middle. This is important
|
8211 |
-
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
8212 |
-
if (!strict) {
|
8213 |
-
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
|
8214 |
-
}
|
8215 |
-
|
8216 |
-
if (end) {
|
8217 |
-
route += '$'
|
8218 |
-
} else {
|
8219 |
-
// In non-ending mode, we need the capturing groups to match as much as
|
8220 |
-
// possible by using a positive lookahead to the end or next path segment.
|
8221 |
-
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
|
8222 |
-
}
|
8223 |
-
|
8224 |
-
return attachKeys(new RegExp('^' + route, flags(options)), keys)
|
8225 |
-
}
|
8226 |
-
|
8227 |
-
/**
|
8228 |
-
* Normalize the given path string, returning a regular expression.
|
8229 |
-
*
|
8230 |
-
* An empty array can be passed in for the keys, which will hold the
|
8231 |
-
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
8232 |
-
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
8233 |
-
*
|
8234 |
-
* @param {(string|RegExp|Array)} path
|
8235 |
-
* @param {(Array|Object)=} keys
|
8236 |
-
* @param {Object=} options
|
8237 |
-
* @return {!RegExp}
|
8238 |
-
*/
|
8239 |
-
function pathToRegexp (path, keys, options) {
|
8240 |
-
if (!isarray(keys)) {
|
8241 |
-
options = /** @type {!Object} */ (keys || options)
|
8242 |
-
keys = []
|
8243 |
-
}
|
8244 |
-
|
8245 |
-
options = options || {}
|
8246 |
-
|
8247 |
-
if (path instanceof RegExp) {
|
8248 |
-
return regexpToRegexp(path, /** @type {!Array} */ (keys))
|
8249 |
-
}
|
8250 |
-
|
8251 |
-
if (isarray(path)) {
|
8252 |
-
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
|
8253 |
-
}
|
8254 |
-
|
8255 |
-
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
|
8256 |
-
}
|
8257 |
-
|
8258 |
-
|
8259 |
-
/***/ }),
|
8260 |
-
|
8261 |
-
/***/ 168:
|
8262 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8263 |
-
|
8264 |
-
"use strict";
|
8265 |
-
|
8266 |
-
// EXPORTS
|
8267 |
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ Fill; });
|
8268 |
-
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ DisplayOptions; });
|
8269 |
-
|
8270 |
-
// EXTERNAL MODULE: external ["wp","element"]
|
8271 |
-
var external_wp_element_ = __webpack_require__(0);
|
8272 |
-
|
8273 |
-
// EXTERNAL MODULE: external ["wp","components"]
|
8274 |
-
var external_wp_components_ = __webpack_require__(4);
|
8275 |
-
|
8276 |
-
// EXTERNAL MODULE: external ["wp","data"]
|
8277 |
-
var external_wp_data_ = __webpack_require__(8);
|
8278 |
-
|
8279 |
-
// EXTERNAL MODULE: external ["wp","i18n"]
|
8280 |
-
var external_wp_i18n_ = __webpack_require__(2);
|
8281 |
-
|
8282 |
-
// EXTERNAL MODULE: external ["wc","data"]
|
8283 |
-
var external_wc_data_ = __webpack_require__(12);
|
8284 |
-
|
8285 |
-
// EXTERNAL MODULE: external ["wc","tracks"]
|
8286 |
-
var external_wc_tracks_ = __webpack_require__(17);
|
8287 |
-
|
8288 |
-
// CONCATENATED MODULE: ./client/activity-panel/display-options/icons/display.js
|
8289 |
-
|
8290 |
-
|
8291 |
-
/**
|
8292 |
-
* External dependencies
|
8293 |
*/
|
8294 |
|
8295 |
const DisplayIcon = () => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("svg", {
|
@@ -8320,7 +8155,7 @@ const DisplayIcon = () => Object(external_wp_element_["createElement"])(external
|
|
8320 |
strokeLinecap: "round",
|
8321 |
strokeLinejoin: "round"
|
8322 |
})), Object(external_wp_i18n_["__"])('Display', 'woocommerce-admin'));
|
8323 |
-
// CONCATENATED MODULE: ./client/activity-panel/display-options/icons/single-column.js
|
8324 |
|
8325 |
const SingleColumnIcon = () => Object(external_wp_element_["createElement"])("svg", {
|
8326 |
className: "woocommerce-layout__activity-panel-tab-icon",
|
@@ -8336,7 +8171,7 @@ const SingleColumnIcon = () => Object(external_wp_element_["createElement"])("sv
|
|
8336 |
height: "13",
|
8337 |
strokeWidth: "1"
|
8338 |
}));
|
8339 |
-
// CONCATENATED MODULE: ./client/activity-panel/display-options/icons/two-columns.js
|
8340 |
|
8341 |
const TwoColumnsIcon = () => Object(external_wp_element_["createElement"])("svg", {
|
8342 |
className: "woocommerce-layout__activity-panel-tab-icon",
|
@@ -8358,7 +8193,7 @@ const TwoColumnsIcon = () => Object(external_wp_element_["createElement"])("svg"
|
|
8358 |
height: "13",
|
8359 |
strokeWidth: "1"
|
8360 |
}));
|
8361 |
-
// CONCATENATED MODULE: ./client/activity-panel/display-options/index.js
|
8362 |
|
8363 |
|
8364 |
/**
|
@@ -8398,14 +8233,10 @@ const DisplayOptions = () => {
|
|
8398 |
const {
|
8399 |
getOption
|
8400 |
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
8401 |
-
const {
|
8402 |
-
getTaskList
|
8403 |
-
} = select(external_wc_data_["ONBOARDING_STORE_NAME"]);
|
8404 |
-
const taskList = getTaskList('setup');
|
8405 |
return {
|
8406 |
defaultHomescreenLayout: getOption('woocommerce_default_homepage_layout') || 'single_column',
|
8407 |
-
taskListComplete:
|
8408 |
-
isTaskListHidden:
|
8409 |
};
|
8410 |
});
|
8411 |
const {
|
@@ -8432,1181 +8263,999 @@ const DisplayOptions = () => {
|
|
8432 |
popoverProps: {
|
8433 |
className: 'woocommerce-layout__activity-panel-popover'
|
8434 |
}
|
8435 |
-
},
|
8436 |
-
|
8437 |
-
|
8438 |
-
|
8439 |
-
|
8440 |
-
|
8441 |
-
|
8442 |
-
|
8443 |
-
|
8444 |
-
|
8445 |
-
|
8446 |
-
|
8447 |
-
|
8448 |
-
|
8449 |
-
|
8450 |
-
|
8451 |
-
|
8452 |
-
|
8453 |
-
value: layout || defaultHomescreenLayout
|
8454 |
-
})) : null);
|
8455 |
-
});
|
8456 |
});
|
8457 |
};
|
8458 |
|
8459 |
/***/ }),
|
8460 |
|
8461 |
-
/***/
|
8462 |
-
/***/ (function(module, exports) {
|
8463 |
-
|
8464 |
-
(function() { module.exports = window["wc"]["tracks"]; }());
|
8465 |
-
|
8466 |
-
/***/ }),
|
8467 |
-
|
8468 |
-
/***/ 173:
|
8469 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8470 |
|
8471 |
"use strict";
|
8472 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NoMatch; });
|
8473 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
8474 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
8475 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
8476 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
|
8477 |
-
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
|
8478 |
-
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
|
8479 |
-
/* harmony import */ var _woocommerce_experimental__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
|
8480 |
-
/* harmony import */ var _woocommerce_experimental__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_experimental__WEBPACK_IMPORTED_MODULE_3__);
|
8481 |
|
|
|
|
|
|
|
8482 |
|
8483 |
-
|
8484 |
-
|
8485 |
-
*/
|
8486 |
|
|
|
|
|
8487 |
|
|
|
|
|
8488 |
|
|
|
|
|
8489 |
|
8490 |
-
|
8491 |
-
|
8492 |
-
className: "woocommerce-layout__no-match"
|
8493 |
-
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Card"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["CardBody"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_woocommerce_experimental__WEBPACK_IMPORTED_MODULE_3__["Text"], null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Sorry, you are not allowed to access this page.', 'woocommerce-admin')))));
|
8494 |
-
};
|
8495 |
|
|
|
|
|
8496 |
|
|
|
|
|
8497 |
|
8498 |
-
|
8499 |
-
|
8500 |
-
/***/ 174:
|
8501 |
-
/***/ (function(module, exports) {
|
8502 |
-
|
8503 |
-
|
8504 |
-
|
8505 |
-
/***/ }),
|
8506 |
-
|
8507 |
-
/***/ 175:
|
8508 |
-
/***/ (function(module, exports) {
|
8509 |
-
|
8510 |
-
|
8511 |
|
8512 |
-
|
|
|
8513 |
|
8514 |
-
|
8515 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8516 |
|
8517 |
-
"use strict";
|
8518 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getUnreadNotesCount; });
|
8519 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return hasValidNotes; });
|
8520 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return truncateRenderableHTML; });
|
8521 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
8522 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
|
8523 |
-
/**
|
8524 |
-
* External dependencies
|
8525 |
-
*/
|
8526 |
|
8527 |
/**
|
8528 |
-
*
|
8529 |
-
*
|
8530 |
-
* @param {Array} notes - List of notes, contains read and unread notes.
|
8531 |
-
* @param {number} lastRead - The timestamp that the user read a note.
|
8532 |
-
* @return {number} - Unread notes count.
|
8533 |
*/
|
8534 |
|
8535 |
-
|
8536 |
-
|
8537 |
-
|
8538 |
-
|
8539 |
-
|
8540 |
-
|
8541 |
-
|
|
|
|
|
|
|
8542 |
|
8543 |
-
|
8544 |
-
|
8545 |
-
return unread && status === 'unactioned';
|
8546 |
-
}
|
8547 |
-
});
|
8548 |
-
return unreadNotes.length;
|
8549 |
-
}
|
8550 |
-
/**
|
8551 |
-
* Verifies if there are any valid notes in the list.
|
8552 |
-
*
|
8553 |
-
* @param {Array} notes - List of notes, contains read and unread notes.
|
8554 |
-
* @return {boolean} - Whether there are valid notes or not.
|
8555 |
-
*/
|
8556 |
|
8557 |
-
|
8558 |
-
|
8559 |
-
const {
|
8560 |
-
is_deleted: isDeleted
|
8561 |
-
} = note;
|
8562 |
-
return !isDeleted;
|
8563 |
-
});
|
8564 |
-
return validNotes.length > 0;
|
8565 |
-
}
|
8566 |
-
/**
|
8567 |
-
* Truncates characters inside of an element.
|
8568 |
-
* Currently does not count <br> as a character even though it should.
|
8569 |
-
*
|
8570 |
-
* @param {HTMLElement} element HTML element
|
8571 |
-
* @param {number} limit number of characters to limit to
|
8572 |
-
*/
|
8573 |
|
8574 |
-
|
8575 |
-
|
8576 |
-
const childNodes = Array.from(element.childNodes);
|
8577 |
|
8578 |
-
|
8579 |
-
|
8580 |
-
let clone = childNodes[i].cloneNode(true);
|
8581 |
|
8582 |
-
|
8583 |
-
// No problem including a whole child node, no need to consider truncating at all.
|
8584 |
-
truncatedNode.appendChild(clone);
|
8585 |
-
} else {
|
8586 |
-
const charactersRemaining = limit - truncatedNode.textContent.length;
|
8587 |
-
|
8588 |
-
if (!clone.innerHTML || clone.textContent.slice(0, charactersRemaining) === clone.innerHTML.slice(0, charactersRemaining)) {
|
8589 |
-
// If text until the limit doesn't contain any markup, we're all good to truncate.
|
8590 |
-
clone.textContent = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["truncate"])(clone.textContent, {
|
8591 |
-
length: charactersRemaining,
|
8592 |
-
separator: ' ',
|
8593 |
-
omission: ''
|
8594 |
-
});
|
8595 |
-
} else {
|
8596 |
-
// If it does, then we'd need to recursively run this with balance of characters remaining.
|
8597 |
-
clone = truncateElement(clone, charactersRemaining);
|
8598 |
-
}
|
8599 |
|
8600 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8601 |
|
8602 |
-
break;
|
8603 |
-
}
|
8604 |
-
}
|
8605 |
|
8606 |
-
return truncatedNode;
|
8607 |
-
};
|
8608 |
/**
|
8609 |
-
*
|
8610 |
-
*
|
8611 |
-
* @param {string} originalHTML HTML string
|
8612 |
-
* @param {number} limit number of characters to limit to
|
8613 |
*/
|
8614 |
|
8615 |
|
8616 |
-
const truncateRenderableHTML = (originalHTML, limit) => {
|
8617 |
-
const tempNode = document.createElement('div');
|
8618 |
-
tempNode.innerHTML = originalHTML;
|
8619 |
-
|
8620 |
-
if (tempNode.textContent.length > limit) {
|
8621 |
-
return truncateElement(tempNode, limit).innerHTML + '...';
|
8622 |
-
}
|
8623 |
-
|
8624 |
-
return originalHTML;
|
8625 |
-
};
|
8626 |
-
|
8627 |
-
/***/ }),
|
8628 |
-
|
8629 |
-
/***/ 18:
|
8630 |
-
/***/ (function(module, exports) {
|
8631 |
-
|
8632 |
-
(function() { module.exports = window["wc"]["experimental"]; }());
|
8633 |
-
|
8634 |
-
/***/ }),
|
8635 |
-
|
8636 |
-
/***/ 19:
|
8637 |
-
/***/ (function(module, exports) {
|
8638 |
-
|
8639 |
-
(function() { module.exports = window["wp"]["apiFetch"]; }());
|
8640 |
-
|
8641 |
-
/***/ }),
|
8642 |
-
|
8643 |
-
/***/ 2:
|
8644 |
-
/***/ (function(module, exports) {
|
8645 |
|
8646 |
-
(function() { module.exports = window["wp"]["i18n"]; }());
|
8647 |
|
8648 |
-
/***/ }),
|
8649 |
|
8650 |
-
/***/ 20:
|
8651 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8652 |
|
8653 |
-
"use strict";
|
8654 |
|
8655 |
-
// EXPORTS
|
8656 |
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ interpolate; });
|
8657 |
|
8658 |
-
|
8659 |
-
|
|
|
8660 |
|
8661 |
-
// CONCATENATED MODULE: ./node_modules/@automattic/interpolate-components/dist/esm/tokenize.js
|
8662 |
-
function identifyToken(item) {
|
8663 |
-
// {{/example}}
|
8664 |
-
if (item.startsWith('{{/')) {
|
8665 |
-
return {
|
8666 |
-
type: 'componentClose',
|
8667 |
-
value: item.replace(/\W/g, '')
|
8668 |
-
};
|
8669 |
-
} // {{example /}}
|
8670 |
|
8671 |
|
8672 |
-
if (item.endsWith('/}}')) {
|
8673 |
-
return {
|
8674 |
-
type: 'componentSelfClosing',
|
8675 |
-
value: item.replace(/\W/g, '')
|
8676 |
-
};
|
8677 |
-
} // {{example}}
|
8678 |
|
8679 |
|
8680 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8681 |
return {
|
8682 |
-
|
8683 |
-
|
|
|
|
|
|
|
8684 |
};
|
8685 |
-
}
|
8686 |
|
8687 |
-
|
8688 |
-
|
8689 |
-
|
|
|
8690 |
};
|
8691 |
-
}
|
8692 |
|
8693 |
-
|
8694 |
-
|
8695 |
-
|
8696 |
-
|
8697 |
-
|
8698 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8699 |
|
|
|
8700 |
|
|
|
|
|
8701 |
|
8702 |
-
|
8703 |
-
const openToken = tokens[openIndex];
|
8704 |
-
let nestLevel = 0;
|
8705 |
|
8706 |
-
|
8707 |
-
|
|
|
8708 |
|
8709 |
-
|
8710 |
-
if (token.type === 'componentOpen') {
|
8711 |
-
nestLevel++;
|
8712 |
-
continue;
|
8713 |
-
}
|
8714 |
|
8715 |
-
|
8716 |
-
|
8717 |
-
return i;
|
8718 |
-
}
|
8719 |
|
8720 |
-
|
8721 |
-
|
8722 |
-
}
|
8723 |
-
} // if we get this far, there was no matching close token
|
8724 |
|
|
|
|
|
8725 |
|
8726 |
-
|
8727 |
-
|
|
|
8728 |
|
8729 |
-
|
8730 |
-
|
8731 |
-
let openComponent;
|
8732 |
-
let openIndex;
|
8733 |
|
8734 |
-
|
8735 |
-
|
8736 |
|
8737 |
-
|
8738 |
-
|
8739 |
-
continue;
|
8740 |
-
} // component node should at least be set
|
8741 |
|
|
|
|
|
8742 |
|
8743 |
-
|
8744 |
-
|
8745 |
-
} // should be either ReactElement or null (both type "object"), all other types deprecated
|
8746 |
|
|
|
8747 |
|
8748 |
-
if (typeof components[token.value] !== 'object') {
|
8749 |
-
throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${token.value}\``);
|
8750 |
-
} // we should never see a componentClose token in this loop
|
8751 |
|
|
|
|
|
|
|
8752 |
|
8753 |
-
if (token.type === 'componentClose') {
|
8754 |
-
throw new Error(`Missing opening component token: \`${token.value}\``);
|
8755 |
-
}
|
8756 |
|
8757 |
-
if (token.type === 'componentOpen') {
|
8758 |
-
openComponent = components[token.value];
|
8759 |
-
openIndex = i;
|
8760 |
-
break;
|
8761 |
-
} // componentSelfClosing token
|
8762 |
|
8763 |
|
8764 |
-
children.push(components[token.value]);
|
8765 |
-
continue;
|
8766 |
-
}
|
8767 |
|
8768 |
-
|
8769 |
-
|
8770 |
-
|
8771 |
-
|
8772 |
-
|
8773 |
-
|
|
|
|
|
|
|
|
|
8774 |
|
8775 |
-
|
8776 |
-
|
8777 |
-
|
8778 |
-
|
8779 |
-
|
8780 |
-
|
|
|
|
|
8781 |
|
8782 |
-
|
8783 |
-
|
8784 |
-
if (children.length === 0) {
|
8785 |
-
return null;
|
8786 |
-
}
|
8787 |
-
|
8788 |
-
if (children.length === 1) {
|
8789 |
-
return children[0];
|
8790 |
-
}
|
8791 |
-
|
8792 |
-
return /*#__PURE__*/Object(external_React_["createElement"])(external_React_["Fragment"], null, ...children);
|
8793 |
-
}
|
8794 |
-
|
8795 |
-
function interpolate(options) {
|
8796 |
const {
|
8797 |
-
|
8798 |
-
|
8799 |
-
|
8800 |
-
|
8801 |
-
|
8802 |
-
|
8803 |
-
|
8804 |
-
|
8805 |
-
|
8806 |
-
|
8807 |
-
|
8808 |
-
|
8809 |
-
|
8810 |
-
|
8811 |
-
|
8812 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8813 |
|
8814 |
-
|
|
|
8815 |
|
8816 |
-
try {
|
8817 |
-
return buildChildren(tokens, components);
|
8818 |
-
} catch (error) {
|
8819 |
-
if (throwErrors) {
|
8820 |
-
throw new Error(`Interpolation Error: unable to process \`${mixedString}\` because of error \`${error.message}\``);
|
8821 |
-
}
|
8822 |
|
8823 |
-
|
8824 |
-
|
8825 |
-
|
8826 |
|
8827 |
-
/***/ }),
|
8828 |
|
8829 |
-
/***/ 21:
|
8830 |
-
/***/ (function(module, exports) {
|
8831 |
|
8832 |
-
(function() { module.exports = window["wc"]["date"]; }());
|
8833 |
|
8834 |
-
|
|
|
|
|
8835 |
|
8836 |
-
/***/ 22:
|
8837 |
-
/***/ (function(module, exports) {
|
8838 |
|
8839 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8840 |
|
8841 |
/***/ }),
|
8842 |
|
8843 |
-
/***/
|
8844 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8845 |
|
8846 |
"use strict";
|
8847 |
-
/*
|
8848 |
-
/*
|
8849 |
-
/*
|
8850 |
-
/* harmony
|
8851 |
-
/* harmony
|
8852 |
-
/*
|
8853 |
-
/*
|
8854 |
-
/* harmony
|
8855 |
-
/* harmony
|
8856 |
-
/* harmony import */ var
|
8857 |
-
/* harmony import */ var
|
8858 |
-
/* harmony import */ var
|
8859 |
-
/* harmony import */ var
|
|
|
|
|
|
|
8860 |
/**
|
8861 |
* External dependencies
|
8862 |
*/
|
8863 |
|
8864 |
-
// Remove mutable data from settings object to prevent access. Data stores should be used instead.
|
8865 |
|
8866 |
-
const mutableSources = ['wcAdminSettings', 'preloadSettings'];
|
8867 |
-
const adminSettings = Object(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_1__["getSetting"])('admin', {});
|
8868 |
-
const ADMIN_SETTINGS_SOURCE = Object.keys(adminSettings).reduce((source, key) => {
|
8869 |
-
if (!mutableSources.includes(key)) {
|
8870 |
-
source[key] = adminSettings[key];
|
8871 |
-
}
|
8872 |
|
8873 |
-
return source;
|
8874 |
-
}, {});
|
8875 |
-
/**
|
8876 |
-
* Retrieves a setting value from the setting state.
|
8877 |
-
*
|
8878 |
-
* @param {string} name The identifier for the setting.
|
8879 |
-
* @param {*} [fallback=false] The value to use as a fallback
|
8880 |
-
* if the setting is not in the
|
8881 |
-
* state.
|
8882 |
-
* @param {Function} [filter=( val ) => val] A callback for filtering the
|
8883 |
-
* value before it's returned.
|
8884 |
-
* Receives both the found value
|
8885 |
-
* (if it exists for the key) and
|
8886 |
-
* the provided fallback arg.
|
8887 |
-
*
|
8888 |
-
* @return {*} The value present in the settings state for the given
|
8889 |
-
* name.
|
8890 |
-
*/
|
8891 |
|
8892 |
-
function getAdminSetting(name) {
|
8893 |
-
let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
8894 |
-
let filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : val => val;
|
8895 |
|
8896 |
-
if (mutableSources.includes(name)) {
|
8897 |
-
throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Mutable settings should be accessed via data store.'));
|
8898 |
-
}
|
8899 |
|
8900 |
-
|
8901 |
-
|
8902 |
-
}
|
8903 |
-
|
8904 |
-
const COUNTRIES = Object(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_1__["getSetting"])('countries');
|
8905 |
-
const CURRENCY = Object(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_1__["getSetting"])('currency');
|
8906 |
-
const LOCALE = Object(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_1__["getSetting"])('locale');
|
8907 |
-
const SITE_TITLE = Object(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_1__["getSetting"])('siteTitle');
|
8908 |
-
const WC_ASSET_URL = Object(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_1__["getSetting"])('wcAssetUrl');
|
8909 |
-
const ORDER_STATUSES = getAdminSetting('orderStatuses');
|
8910 |
/**
|
8911 |
-
*
|
8912 |
-
*
|
8913 |
-
* NOTE: This feature is to be removed in favour of data stores when a full migration
|
8914 |
-
* is complete.
|
8915 |
-
*
|
8916 |
-
* @deprecated
|
8917 |
*
|
8918 |
-
* @param {string}
|
8919 |
-
*
|
8920 |
-
* @param {*} value The value to set.
|
8921 |
-
* @param {Function} [filter=( val ) => val] Allows for providing a callback
|
8922 |
-
* to sanitize the setting (eg.
|
8923 |
-
* ensure it's a number)
|
8924 |
*/
|
8925 |
|
8926 |
-
function
|
8927 |
-
|
8928 |
-
|
8929 |
-
|
8930 |
-
|
8931 |
-
|
8932 |
-
|
8933 |
-
ADMIN_SETTINGS_SOURCE[name] = filter(value);
|
8934 |
}
|
8935 |
|
8936 |
-
|
8937 |
-
|
8938 |
-
|
8939 |
-
|
8940 |
-
|
8941 |
-
|
8942 |
-
|
8943 |
-
|
8944 |
-
|
8945 |
-
|
8946 |
-
|
|
|
|
|
|
|
|
|
8947 |
|
8948 |
-
|
8949 |
-
|
8950 |
-
|
8951 |
-
}
|
8952 |
-
}
|
8953 |
}
|
8954 |
|
8955 |
-
|
8956 |
-
|
8957 |
-
|
8958 |
-
return _extends.apply(this, arguments);
|
8959 |
-
}
|
8960 |
-
|
8961 |
-
/***/ }),
|
8962 |
|
8963 |
-
|
8964 |
-
|
|
|
8965 |
|
8966 |
-
|
|
|
|
|
|
|
8967 |
|
8968 |
-
//
|
8969 |
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ ABBREVIATED_NOTIFICATION_SLOT_NAME; });
|
8970 |
-
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ AbbreviatedNotificationsPanel; });
|
8971 |
|
8972 |
-
|
8973 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8974 |
|
8975 |
-
|
8976 |
-
|
|
|
8977 |
|
8978 |
-
|
8979 |
-
|
8980 |
|
8981 |
-
|
8982 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8983 |
|
8984 |
-
|
8985 |
-
|
8986 |
|
8987 |
-
|
8988 |
-
var external_wp_data_ = __webpack_require__(8);
|
8989 |
|
8990 |
-
|
8991 |
-
|
8992 |
|
8993 |
-
|
8994 |
-
var page = __webpack_require__(523);
|
8995 |
|
8996 |
-
|
8997 |
-
var external_wp_primitives_ = __webpack_require__(9);
|
8998 |
|
8999 |
-
|
|
|
9000 |
|
|
|
9001 |
|
9002 |
-
|
9003 |
-
* WordPress dependencies
|
9004 |
-
*/
|
9005 |
|
9006 |
-
|
9007 |
-
|
9008 |
-
xmlns: "http://www.w3.org/2000/svg"
|
9009 |
-
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
9010 |
-
d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"
|
9011 |
-
}));
|
9012 |
-
/* harmony default export */ var library_comment = (comment);
|
9013 |
-
//# sourceMappingURL=comment.js.map
|
9014 |
-
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/box.js
|
9015 |
-
var box = __webpack_require__(524);
|
9016 |
|
9017 |
-
|
9018 |
-
var external_wp_components_ = __webpack_require__(4);
|
9019 |
|
9020 |
-
|
9021 |
-
var utils = __webpack_require__(74);
|
9022 |
|
9023 |
-
|
9024 |
-
|
9025 |
|
9026 |
-
|
9027 |
-
var dashboard_utils = __webpack_require__(69);
|
9028 |
|
9029 |
-
//
|
|
|
9030 |
|
9031 |
-
|
9032 |
-
width: "24",
|
9033 |
-
height: "24",
|
9034 |
-
viewBox: "0 0 24 24",
|
9035 |
-
xmlns: "http://www.w3.org/2000/svg"
|
9036 |
-
}, Object(external_wp_element_["createElement"])("path", {
|
9037 |
-
d: "M0 0h24v24H0z",
|
9038 |
-
fill: "none"
|
9039 |
-
}), Object(external_wp_element_["createElement"])("path", {
|
9040 |
-
d: "M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"
|
9041 |
-
}));
|
9042 |
-
// CONCATENATED MODULE: ./client/activity-panel/panels/inbox/abbreviated-notifications-panel.js
|
9043 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9044 |
|
9045 |
-
|
9046 |
-
|
9047 |
-
|
|
|
9048 |
|
|
|
|
|
|
|
|
|
9049 |
|
|
|
|
|
9050 |
|
|
|
|
|
|
|
9051 |
|
|
|
|
|
9052 |
|
|
|
|
|
|
|
9053 |
|
|
|
|
|
9054 |
|
|
|
|
|
9055 |
|
9056 |
-
|
9057 |
-
|
9058 |
-
*/
|
9059 |
|
|
|
|
|
9060 |
|
|
|
9061 |
|
9062 |
|
|
|
|
|
|
|
9063 |
|
9064 |
-
const EXTENDED_TASK_LIST_ID = 'extended_task_list';
|
9065 |
-
const ORDER_PANEL_ID = 'orders-panel';
|
9066 |
-
const REVIEWS_PANEL_ID = 'reviews-panel';
|
9067 |
-
const STOCK_PANEL_ID = 'stock-panel';
|
9068 |
-
const ABBREVIATED_NOTIFICATION_SLOT_NAME = 'AbbreviatedNotification';
|
9069 |
-
const AbbreviatedNotificationsPanel = _ref => {
|
9070 |
-
let {
|
9071 |
-
thingsToDoNextCount
|
9072 |
-
} = _ref;
|
9073 |
-
const {
|
9074 |
-
ordersToProcessCount,
|
9075 |
-
reviewsToModerateCount,
|
9076 |
-
stockNoticesCount,
|
9077 |
-
isSetupTaskListHidden,
|
9078 |
-
isExtendedTaskListHidden
|
9079 |
-
} = Object(external_wp_data_["useSelect"])(select => {
|
9080 |
-
var _getTaskList, _getTaskList2;
|
9081 |
|
9082 |
-
const {
|
9083 |
-
getTaskList
|
9084 |
-
} = select(external_wc_data_["ONBOARDING_STORE_NAME"]);
|
9085 |
-
const orderStatuses = Object(utils["c" /* getOrderStatuses */])(select);
|
9086 |
-
return {
|
9087 |
-
ordersToProcessCount: Object(utils["d" /* getUnreadOrders */])(select, orderStatuses),
|
9088 |
-
reviewsToModerateCount: Object(reviews_utils["b" /* getUnapprovedReviews */])(select),
|
9089 |
-
stockNoticesCount: Object(utils["a" /* getLowStockCount */])(select),
|
9090 |
-
isSetupTaskListHidden: (_getTaskList = getTaskList('setup')) === null || _getTaskList === void 0 ? void 0 : _getTaskList.isHidden,
|
9091 |
-
isExtendedTaskListHidden: (_getTaskList2 = getTaskList('extended')) === null || _getTaskList2 === void 0 ? void 0 : _getTaskList2.isHidden
|
9092 |
-
};
|
9093 |
-
});
|
9094 |
|
9095 |
-
const trackAbbreviatedCardClick = name => {
|
9096 |
-
Object(external_wc_tracks_["recordEvent"])('activity_panel_click', {
|
9097 |
-
task: name
|
9098 |
-
});
|
9099 |
-
};
|
9100 |
|
9101 |
-
const {
|
9102 |
-
Slot
|
9103 |
-
} = Object(external_wp_components_["createSlotFill"])(ABBREVIATED_NOTIFICATION_SLOT_NAME);
|
9104 |
-
const isWCAdminPage = Object(dashboard_utils["f" /* isWCAdmin */])(window.location.href);
|
9105 |
-
return Object(external_wp_element_["createElement"])("div", {
|
9106 |
-
className: "woocommerce-abbreviated-notifications"
|
9107 |
-
}, thingsToDoNextCount > 0 && !isExtendedTaskListHidden && Object(external_wp_element_["createElement"])(external_wc_components_["AbbreviatedCard"], {
|
9108 |
-
className: "woocommerce-abbreviated-notification",
|
9109 |
-
icon: Object(external_wp_element_["createElement"])(Bell, null),
|
9110 |
-
href: `admin.php?page=wc-admin#${EXTENDED_TASK_LIST_ID}`,
|
9111 |
-
onClick: () => trackAbbreviatedCardClick('thingsToDoNext'),
|
9112 |
-
type: isWCAdminPage ? 'wc-admin' : 'wp-admin'
|
9113 |
-
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
9114 |
-
as: "h3"
|
9115 |
-
}, Object(external_wp_i18n_["__"])('Things to do next', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
9116 |
-
as: "p"
|
9117 |
-
}, Object(external_wp_i18n_["sprintf"])(
|
9118 |
-
/* translators: Things the user has to do */
|
9119 |
-
Object(external_wp_i18n_["_n"])('You have %d new thing to do', 'You have %d new things to do', thingsToDoNextCount, 'woocommerce-admin'), thingsToDoNextCount))), ordersToProcessCount > 0 && isSetupTaskListHidden && Object(external_wp_element_["createElement"])(external_wc_components_["AbbreviatedCard"], {
|
9120 |
-
className: "woocommerce-abbreviated-notification",
|
9121 |
-
icon: page["a" /* default */],
|
9122 |
-
href: `admin.php?page=wc-admin&opened_panel=${ORDER_PANEL_ID}`,
|
9123 |
-
onClick: () => trackAbbreviatedCardClick('ordersToProcess'),
|
9124 |
-
type: isWCAdminPage ? 'wc-admin' : 'wp-admin'
|
9125 |
-
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
9126 |
-
as: "h3"
|
9127 |
-
}, Object(external_wp_i18n_["__"])('Orders to fulfill', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], null, Object(external_wp_i18n_["sprintf"])(
|
9128 |
-
/* translators: Number of orders the user has to fulfill */
|
9129 |
-
Object(external_wp_i18n_["_n"])('You have %d order to fulfill', 'You have %d orders to fulfill', ordersToProcessCount, 'woocommerce-admin'), ordersToProcessCount))), reviewsToModerateCount > 0 && isSetupTaskListHidden && Object(external_wp_element_["createElement"])(external_wc_components_["AbbreviatedCard"], {
|
9130 |
-
className: "woocommerce-abbreviated-notification",
|
9131 |
-
icon: library_comment,
|
9132 |
-
href: `admin.php?page=wc-admin&opened_panel=${REVIEWS_PANEL_ID}`,
|
9133 |
-
onClick: () => trackAbbreviatedCardClick('reviewsToModerate'),
|
9134 |
-
type: isWCAdminPage ? 'wc-admin' : 'wp-admin'
|
9135 |
-
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
9136 |
-
as: "h3"
|
9137 |
-
}, Object(external_wp_i18n_["__"])('Reviews to moderate', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], null, Object(external_wp_i18n_["sprintf"])(
|
9138 |
-
/* translators: Number of reviews the user has to moderate */
|
9139 |
-
Object(external_wp_i18n_["_n"])('You have %d review to moderate', 'You have %d reviews to moderate', reviewsToModerateCount, 'woocommerce-admin'), reviewsToModerateCount))), stockNoticesCount > 0 && isSetupTaskListHidden && Object(external_wp_element_["createElement"])(external_wc_components_["AbbreviatedCard"], {
|
9140 |
-
className: "woocommerce-abbreviated-notification",
|
9141 |
-
icon: box["a" /* default */],
|
9142 |
-
href: `admin.php?page=wc-admin&opened_panel=${STOCK_PANEL_ID}`,
|
9143 |
-
onClick: () => trackAbbreviatedCardClick('stockNotices'),
|
9144 |
-
type: isWCAdminPage ? 'wc-admin' : 'wp-admin'
|
9145 |
-
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
9146 |
-
as: "h3"
|
9147 |
-
}, Object(external_wp_i18n_["__"])('Inventory to review', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], null, Object(external_wp_i18n_["__"])('You have inventory to review and update', 'woocommerce-admin'))), !isExtendedTaskListHidden && Object(external_wp_element_["createElement"])(Slot, null));
|
9148 |
-
};
|
9149 |
-
/* harmony default export */ var abbreviated_notifications_panel = (AbbreviatedNotificationsPanel);
|
9150 |
|
9151 |
-
/***/ }),
|
9152 |
|
9153 |
-
/***/ 258:
|
9154 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9155 |
|
9156 |
-
"use strict";
|
9157 |
|
9158 |
-
|
9159 |
-
|
9160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9161 |
|
9162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9163 |
|
9164 |
-
|
9165 |
-
|
|
|
9166 |
|
9167 |
-
// EXTERNAL MODULE: external ["wp","i18n"]
|
9168 |
-
var external_wp_i18n_ = __webpack_require__(2);
|
9169 |
|
9170 |
-
|
9171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9172 |
|
9173 |
-
// EXTERNAL MODULE: ./node_modules/@automattic/interpolate-components/dist/esm/index.js + 1 modules
|
9174 |
-
var esm = __webpack_require__(20);
|
9175 |
|
9176 |
-
|
9177 |
-
|
|
|
9178 |
|
9179 |
-
|
9180 |
-
|
|
|
|
|
|
|
|
|
|
|
9181 |
|
9182 |
-
|
9183 |
-
|
|
|
|
|
|
|
9184 |
|
9185 |
-
|
9186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9187 |
|
9188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9189 |
|
|
|
|
|
|
|
|
|
|
|
9190 |
|
9191 |
-
/**
|
9192 |
-
|
9193 |
-
|
|
|
9194 |
|
|
|
|
|
|
|
|
|
9195 |
|
|
|
|
|
|
|
|
|
9196 |
|
|
|
|
|
|
|
|
|
9197 |
|
|
|
|
|
|
|
|
|
9198 |
|
9199 |
-
|
9200 |
-
|
9201 |
-
|
9202 |
-
|
9203 |
-
} = _ref;
|
9204 |
-
const {
|
9205 |
-
wcAdminSettings
|
9206 |
-
} = Object(external_wc_data_["useSettings"])('wc_admin', ['wcAdminSettings']);
|
9207 |
-
const {
|
9208 |
-
woocommerce_default_date_range: defaultDateRange
|
9209 |
-
} = wcAdminSettings;
|
9210 |
|
9211 |
-
|
9212 |
-
|
9213 |
-
|
9214 |
-
|
9215 |
-
value: Object(lib["stringify"])(query)
|
9216 |
-
}
|
9217 |
-
});
|
9218 |
-
};
|
9219 |
|
9220 |
-
|
9221 |
-
|
9222 |
-
|
9223 |
-
|
9224 |
-
|
9225 |
-
|
9226 |
-
|
9227 |
-
|
9228 |
-
|
9229 |
-
secondary: secondaryDate
|
9230 |
-
} = Object(external_wc_date_["getCurrentDates"])(query, defaultDateRange);
|
9231 |
-
const dateQuery = {
|
9232 |
-
period,
|
9233 |
-
compare,
|
9234 |
-
before,
|
9235 |
-
after,
|
9236 |
-
primaryDate,
|
9237 |
-
secondaryDate
|
9238 |
-
};
|
9239 |
-
return Object(external_wp_element_["createElement"])(external_wc_components_["DateRangeFilterPicker"], {
|
9240 |
-
query: query,
|
9241 |
-
onRangeSelect: change,
|
9242 |
-
dateQuery: dateQuery,
|
9243 |
-
isoDateFormat: external_wc_date_["isoDateFormat"]
|
9244 |
-
});
|
9245 |
};
|
9246 |
|
9247 |
-
|
9248 |
-
|
9249 |
-
|
|
|
|
|
9250 |
|
9251 |
-
// CONCATENATED MODULE: ./client/analytics/settings/config.js
|
9252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9254 |
/**
|
9255 |
* External dependencies
|
9256 |
*/
|
9257 |
|
9258 |
-
|
9259 |
-
|
9260 |
/**
|
9261 |
* Internal dependencies
|
9262 |
*/
|
9263 |
|
9264 |
|
|
|
|
|
|
|
|
|
|
|
9265 |
|
9266 |
-
|
9267 |
-
const DEFAULT_ACTIONABLE_STATUSES = ['processing', 'on-hold'];
|
9268 |
-
const DEFAULT_ORDER_STATUSES = ['completed', 'processing', 'refunded', 'cancelled', 'failed', 'pending', 'on-hold'];
|
9269 |
-
const DEFAULT_DATE_RANGE = 'period=month&compare=previous_year';
|
9270 |
-
const filteredOrderStatuses = Object.keys(admin_settings["c" /* ORDER_STATUSES */]).filter(status => status !== 'refunded').map(key => {
|
9271 |
return {
|
9272 |
-
|
9273 |
-
|
9274 |
-
description: Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Exclude the %s status from reports', 'woocommerce-admin'), admin_settings["c" /* ORDER_STATUSES */][key])
|
9275 |
};
|
9276 |
-
}
|
9277 |
-
const unregisteredOrderStatuses = Object(admin_settings["d" /* getAdminSetting */])('unregisteredOrderStatuses', {});
|
9278 |
-
const orderStatusOptions = [{
|
9279 |
-
key: 'defaultStatuses',
|
9280 |
-
options: filteredOrderStatuses.filter(status => DEFAULT_ORDER_STATUSES.includes(status.value))
|
9281 |
-
}, {
|
9282 |
-
key: 'customStatuses',
|
9283 |
-
label: Object(external_wp_i18n_["__"])('Custom Statuses', 'woocommerce-admin'),
|
9284 |
-
options: filteredOrderStatuses.filter(status => !DEFAULT_ORDER_STATUSES.includes(status.value))
|
9285 |
-
}, {
|
9286 |
-
key: 'unregisteredStatuses',
|
9287 |
-
label: Object(external_wp_i18n_["__"])('Unregistered Statuses', 'woocommerce-admin'),
|
9288 |
-
options: Object.keys(unregisteredOrderStatuses).map(key => {
|
9289 |
-
return {
|
9290 |
-
value: key,
|
9291 |
-
label: key,
|
9292 |
-
description: Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Exclude the %s status from reports', 'woocommerce-admin'), key)
|
9293 |
-
};
|
9294 |
-
})
|
9295 |
-
}];
|
9296 |
/**
|
9297 |
-
*
|
9298 |
*
|
9299 |
-
* @
|
9300 |
-
* @param {
|
|
|
|
|
|
|
|
|
9301 |
*/
|
9302 |
|
9303 |
-
|
9304 |
-
|
9305 |
-
|
9306 |
-
|
9307 |
-
|
9308 |
-
|
9309 |
-
|
9310 |
-
|
9311 |
-
|
9312 |
-
|
9313 |
-
|
9314 |
-
defaultValue: ['pending', 'cancelled', 'failed']
|
9315 |
-
},
|
9316 |
-
woocommerce_actionable_order_statuses: {
|
9317 |
-
label: Object(external_wp_i18n_["__"])('Actionable statuses:', 'woocommerce-admin'),
|
9318 |
-
inputType: 'checkboxGroup',
|
9319 |
-
options: orderStatusOptions,
|
9320 |
-
helpText: Object(external_wp_i18n_["__"])('Orders with these statuses require action on behalf of the store admin. ' + 'These orders will show up in the Home Screen - Orders task.', 'woocommerce-admin'),
|
9321 |
-
defaultValue: DEFAULT_ACTIONABLE_STATUSES
|
9322 |
-
},
|
9323 |
-
woocommerce_default_date_range: {
|
9324 |
-
name: 'woocommerce_default_date_range',
|
9325 |
-
label: Object(external_wp_i18n_["__"])('Default date range:', 'woocommerce-admin'),
|
9326 |
-
inputType: 'component',
|
9327 |
-
component: default_date,
|
9328 |
-
helpText: Object(external_wp_i18n_["__"])('Select a default date range. When no range is selected, reports will be viewed by ' + 'the default date range.', 'woocommerce-admin'),
|
9329 |
-
defaultValue: DEFAULT_DATE_RANGE
|
9330 |
-
}
|
9331 |
-
});
|
9332 |
-
|
9333 |
-
/***/ }),
|
9334 |
-
|
9335 |
-
/***/ 259:
|
9336 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9337 |
-
|
9338 |
-
"use strict";
|
9339 |
-
/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
9340 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
9341 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
|
9342 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
9343 |
-
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
9344 |
-
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
|
9345 |
-
/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(260);
|
9346 |
-
/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_a11y__WEBPACK_IMPORTED_MODULE_3__);
|
9347 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
|
9348 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
|
9349 |
-
/* harmony import */ var _wordpress_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(261);
|
9350 |
-
/* harmony import */ var _wordpress_warning__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_warning__WEBPACK_IMPORTED_MODULE_5__);
|
9351 |
-
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4);
|
9352 |
-
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__);
|
9353 |
-
|
9354 |
-
|
9355 |
/**
|
9356 |
-
*
|
9357 |
*/
|
9358 |
|
9359 |
-
|
9360 |
-
|
9361 |
-
|
9362 |
-
|
9363 |
-
|
9364 |
-
|
9365 |
-
const NOTICE_TIMEOUT = 10000;
|
9366 |
-
/** @typedef {import('@wordpress/element').WPElement} WPElement */
|
9367 |
-
|
9368 |
/**
|
9369 |
-
*
|
9370 |
-
* valid message is provided.
|
9371 |
-
*
|
9372 |
-
* @param {string|WPElement} [message] Message to announce.
|
9373 |
-
* @param {'polite'|'assertive'} politeness Politeness to announce.
|
9374 |
*/
|
9375 |
|
9376 |
-
function
|
9377 |
-
|
9378 |
-
|
9379 |
-
|
9380 |
-
Object(_wordpress_a11y__WEBPACK_IMPORTED_MODULE_3__["speak"])(spokenMessage, politeness);
|
9381 |
-
}
|
9382 |
-
}, [spokenMessage, politeness]);
|
9383 |
}
|
|
|
|
|
|
|
|
|
9384 |
|
9385 |
-
|
9386 |
-
|
9387 |
-
|
9388 |
-
children,
|
9389 |
-
spokenMessage = children,
|
9390 |
-
politeness = 'polite',
|
9391 |
-
actions = [],
|
9392 |
-
onRemove = lodash__WEBPACK_IMPORTED_MODULE_1__["noop"],
|
9393 |
-
icon = null,
|
9394 |
-
explicitDismiss = false,
|
9395 |
-
// onDismiss is a callback executed when the snackbar is dismissed.
|
9396 |
-
// It is distinct from onRemove, which _looks_ like a callback but is
|
9397 |
-
// actually the function to call to remove the snackbar from the UI.
|
9398 |
-
onDismiss = null,
|
9399 |
-
__unstableHTML = false
|
9400 |
-
} = _ref;
|
9401 |
-
onDismiss = onDismiss || lodash__WEBPACK_IMPORTED_MODULE_1__["noop"];
|
9402 |
-
|
9403 |
-
function dismissMe(event) {
|
9404 |
-
if (event && event.preventDefault) {
|
9405 |
-
event.preventDefault();
|
9406 |
-
}
|
9407 |
-
|
9408 |
-
onDismiss();
|
9409 |
-
onRemove();
|
9410 |
-
}
|
9411 |
-
|
9412 |
-
function onActionClick(event, onClick) {
|
9413 |
-
event.stopPropagation();
|
9414 |
-
onRemove();
|
9415 |
-
|
9416 |
-
if (onClick) {
|
9417 |
-
onClick(event);
|
9418 |
-
}
|
9419 |
-
}
|
9420 |
-
|
9421 |
-
useSpokenMessage(spokenMessage, politeness); // Only set up the timeout dismiss if we're not explicitly dismissing.
|
9422 |
-
|
9423 |
-
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(() => {
|
9424 |
-
const timeoutHandle = setTimeout(() => {
|
9425 |
-
if (!explicitDismiss) {
|
9426 |
-
onDismiss();
|
9427 |
-
onRemove();
|
9428 |
-
}
|
9429 |
-
}, NOTICE_TIMEOUT);
|
9430 |
-
return () => clearTimeout(timeoutHandle);
|
9431 |
-
}, [explicitDismiss, onDismiss, onRemove]);
|
9432 |
-
const classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, 'components-snackbar', {
|
9433 |
-
'components-snackbar-explicit-dismiss': !!explicitDismiss
|
9434 |
-
});
|
9435 |
|
9436 |
-
if (actions && actions.length > 1) {
|
9437 |
-
// we need to inform developers that snackbar only accepts 1 action
|
9438 |
-
typeof process !== "undefined" && process.env && "production" !== "production" ? _wordpress_warning__WEBPACK_IMPORTED_MODULE_5___default()('Snackbar can only have 1 action, use Notice if your message require many messages') : void 0; // return first element only while keeping it inside an array
|
9439 |
|
9440 |
-
actions = [actions[0]];
|
9441 |
-
}
|
9442 |
|
9443 |
-
|
9444 |
-
|
|
|
9445 |
});
|
9446 |
|
9447 |
-
if (
|
9448 |
-
|
|
|
|
|
9449 |
}
|
9450 |
-
|
9451 |
-
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
9452 |
-
ref: ref,
|
9453 |
-
className: classes,
|
9454 |
-
onClick: !explicitDismiss ? dismissMe : lodash__WEBPACK_IMPORTED_MODULE_1__["noop"],
|
9455 |
-
tabIndex: "0",
|
9456 |
-
role: !explicitDismiss ? 'button' : '',
|
9457 |
-
onKeyPress: !explicitDismiss ? dismissMe : lodash__WEBPACK_IMPORTED_MODULE_1__["noop"],
|
9458 |
-
"aria-label": !explicitDismiss ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Dismiss this notice') : ''
|
9459 |
-
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
9460 |
-
className: snackbarContentClassnames
|
9461 |
-
}, icon && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
9462 |
-
className: "components-snackbar__icon"
|
9463 |
-
}, icon), children, actions.map((_ref2, index) => {
|
9464 |
-
let {
|
9465 |
-
label,
|
9466 |
-
onClick,
|
9467 |
-
url
|
9468 |
-
} = _ref2;
|
9469 |
-
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__["Button"], {
|
9470 |
-
key: index,
|
9471 |
-
href: url,
|
9472 |
-
isTertiary: true,
|
9473 |
-
onClick: event => onActionClick(event, onClick),
|
9474 |
-
className: "components-snackbar__action"
|
9475 |
-
}, label);
|
9476 |
-
}), explicitDismiss && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", {
|
9477 |
-
role: "button",
|
9478 |
-
"aria-label": "Dismiss this notice",
|
9479 |
-
tabIndex: "0",
|
9480 |
-
className: "components-snackbar__dismiss-button",
|
9481 |
-
onClick: dismissMe,
|
9482 |
-
onKeyPress: dismissMe
|
9483 |
-
}, "\u2715")));
|
9484 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9485 |
|
9486 |
-
|
9487 |
-
|
9488 |
-
|
9489 |
-
/***/ }),
|
9490 |
-
|
9491 |
-
/***/ 260:
|
9492 |
-
/***/ (function(module, exports) {
|
9493 |
-
|
9494 |
-
(function() { module.exports = window["wp"]["a11y"]; }());
|
9495 |
-
|
9496 |
-
/***/ }),
|
9497 |
-
|
9498 |
-
/***/ 261:
|
9499 |
-
/***/ (function(module, exports) {
|
9500 |
-
|
9501 |
-
(function() { module.exports = window["wp"]["warning"]; }());
|
9502 |
-
|
9503 |
-
/***/ }),
|
9504 |
-
|
9505 |
-
/***/ 262:
|
9506 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9507 |
-
|
9508 |
-
"use strict";
|
9509 |
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=_default;var _react=_interopRequireDefault(__webpack_require__(6)),_excluded=["size","onClick","icon","className"];function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||Object.prototype.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}function _default(a){var b=a.size,c=void 0===b?24:b,d=a.onClick,e=a.icon,f=a.className,g=_objectWithoutProperties(a,_excluded),h=["gridicon","gridicons-cross-small",f,!1,!1,!1].filter(Boolean).join(" ");return _react["default"].createElement("svg",_extends({className:h,height:c,width:c,onClick:d},g,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),_react["default"].createElement("g",null,_react["default"].createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})))}
|
9510 |
-
|
9511 |
-
|
9512 |
-
/***/ }),
|
9513 |
-
|
9514 |
-
/***/ 263:
|
9515 |
-
/***/ (function(module, exports) {
|
9516 |
-
|
9517 |
-
(function() { module.exports = window["wc"]["customerEffortScore"]; }());
|
9518 |
|
9519 |
-
|
|
|
|
|
|
|
|
|
|
|
9520 |
|
9521 |
-
|
9522 |
-
|
|
|
9523 |
|
9524 |
-
|
|
|
|
|
9525 |
|
9526 |
-
|
9527 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9528 |
|
9529 |
-
|
9530 |
-
|
9531 |
-
|
9532 |
-
|
9533 |
-
return o;
|
9534 |
-
};
|
9535 |
|
9536 |
-
|
9537 |
-
|
9538 |
-
|
|
|
|
|
9539 |
|
9540 |
-
function _inheritsLoose(subClass, superClass) {
|
9541 |
-
subClass.prototype = Object.create(superClass.prototype);
|
9542 |
-
subClass.prototype.constructor = subClass;
|
9543 |
-
_setPrototypeOf(subClass, superClass);
|
9544 |
-
}
|
9545 |
|
9546 |
-
|
|
|
|
|
9547 |
|
9548 |
-
/***/ 28:
|
9549 |
-
/***/ (function(module, exports) {
|
9550 |
|
9551 |
-
(function() { module.exports = window["wp"]["hooks"]; }());
|
9552 |
|
9553 |
-
/***/ }),
|
9554 |
|
9555 |
-
/***/ 281:
|
9556 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9557 |
|
9558 |
-
"use strict";
|
9559 |
|
9560 |
-
|
9561 |
-
|
9562 |
-
|
9563 |
-
|
9564 |
-
|
9565 |
-
|
9566 |
-
|
9567 |
-
|
9568 |
-
__webpack_require__.d(actions_namespaceObject, "setCesSurveyQueue", function() { return setCesSurveyQueue; });
|
9569 |
-
__webpack_require__.d(actions_namespaceObject, "addCesSurvey", function() { return addCesSurvey; });
|
9570 |
-
__webpack_require__.d(actions_namespaceObject, "addCesSurveyForAnalytics", function() { return addCesSurveyForAnalytics; });
|
9571 |
-
__webpack_require__.d(actions_namespaceObject, "addCesSurveyForCustomerSearch", function() { return addCesSurveyForCustomerSearch; });
|
9572 |
-
|
9573 |
-
// NAMESPACE OBJECT: ./client/customer-effort-score-tracks/data/resolvers.js
|
9574 |
-
var resolvers_namespaceObject = {};
|
9575 |
-
__webpack_require__.r(resolvers_namespaceObject);
|
9576 |
-
__webpack_require__.d(resolvers_namespaceObject, "getCesSurveyQueue", function() { return resolvers_getCesSurveyQueue; });
|
9577 |
-
|
9578 |
-
// NAMESPACE OBJECT: ./client/customer-effort-score-tracks/data/selectors.js
|
9579 |
-
var selectors_namespaceObject = {};
|
9580 |
-
__webpack_require__.r(selectors_namespaceObject);
|
9581 |
-
__webpack_require__.d(selectors_namespaceObject, "getCesSurveyQueue", function() { return selectors_getCesSurveyQueue; });
|
9582 |
-
|
9583 |
-
// EXTERNAL MODULE: external ["wp","element"]
|
9584 |
-
var external_wp_element_ = __webpack_require__(0);
|
9585 |
-
|
9586 |
-
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
9587 |
-
var prop_types = __webpack_require__(1);
|
9588 |
-
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
9589 |
-
|
9590 |
-
// EXTERNAL MODULE: external ["wc","tracks"]
|
9591 |
-
var external_wc_tracks_ = __webpack_require__(17);
|
9592 |
-
|
9593 |
-
// EXTERNAL MODULE: external ["wc","customerEffortScore"]
|
9594 |
-
var external_wc_customerEffortScore_ = __webpack_require__(263);
|
9595 |
-
var external_wc_customerEffortScore_default = /*#__PURE__*/__webpack_require__.n(external_wc_customerEffortScore_);
|
9596 |
-
|
9597 |
-
// EXTERNAL MODULE: external ["wp","compose"]
|
9598 |
-
var external_wp_compose_ = __webpack_require__(14);
|
9599 |
-
|
9600 |
-
// EXTERNAL MODULE: external ["wp","data"]
|
9601 |
-
var external_wp_data_ = __webpack_require__(8);
|
9602 |
-
|
9603 |
-
// EXTERNAL MODULE: external ["wc","data"]
|
9604 |
-
var external_wc_data_ = __webpack_require__(12);
|
9605 |
-
|
9606 |
-
// EXTERNAL MODULE: external ["wp","i18n"]
|
9607 |
-
var external_wp_i18n_ = __webpack_require__(2);
|
9608 |
-
|
9609 |
-
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/customer-effort-score-tracks.js
|
9610 |
|
9611 |
|
9612 |
/**
|
@@ -9616,2382 +9265,611 @@ var external_wp_i18n_ = __webpack_require__(2);
|
|
9616 |
|
9617 |
|
9618 |
|
|
|
|
|
|
|
9619 |
|
9620 |
|
9621 |
|
9622 |
|
9623 |
-
|
9624 |
-
|
9625 |
-
|
9626 |
-
|
9627 |
-
*
|
9628 |
-
*
|
9629 |
-
*
|
9630 |
-
* @param {
|
9631 |
-
* @param {
|
9632 |
-
* @param {
|
9633 |
-
|
9634 |
-
* @param {string} props.onSubmitLabel The label displayed upon survey submission.
|
9635 |
-
* @param {Array} props.cesShownForActions The array of actions that the CES modal has been shown for.
|
9636 |
-
* @param {boolean} props.allowTracking Whether tracking is allowed or not.
|
9637 |
-
* @param {boolean} props.resolving Are values still being resolved.
|
9638 |
-
* @param {number} props.storeAgeInWeeks The age of the store in weeks.
|
9639 |
-
* @param {Function} props.updateOptions Function to update options.
|
9640 |
-
* @param {Function} props.createNotice Function to create a snackbar.
|
9641 |
-
*/
|
9642 |
-
|
9643 |
-
function CustomerEffortScoreTracks(_ref) {
|
9644 |
-
let {
|
9645 |
-
action,
|
9646 |
-
trackProps,
|
9647 |
-
label,
|
9648 |
-
onSubmitLabel = Object(external_wp_i18n_["__"])('Thank you for your feedback!', 'woocommerce-admin'),
|
9649 |
-
cesShownForActions,
|
9650 |
-
allowTracking,
|
9651 |
-
resolving,
|
9652 |
-
storeAgeInWeeks,
|
9653 |
-
updateOptions,
|
9654 |
-
createNotice
|
9655 |
-
} = _ref;
|
9656 |
-
const [modalShown, setModalShown] = Object(external_wp_element_["useState"])(false);
|
9657 |
-
|
9658 |
-
if (resolving) {
|
9659 |
-
return null;
|
9660 |
-
} // Don't show if tracking is disallowed.
|
9661 |
-
|
9662 |
-
|
9663 |
-
if (!allowTracking) {
|
9664 |
-
return null;
|
9665 |
-
} // We only want to return null early if the modal was already shown
|
9666 |
-
// for this action *before* this component was initially instantiated.
|
9667 |
-
//
|
9668 |
-
// We want to make sure we still render CustomerEffortScore below
|
9669 |
-
// (we don't want to return null early), if the modal was shown for this
|
9670 |
-
// instantiation, so that the component doesn't go away while we are
|
9671 |
-
// still showing it.
|
9672 |
-
|
9673 |
-
|
9674 |
-
if (cesShownForActions.indexOf(action) !== -1 && !modalShown) {
|
9675 |
-
return null;
|
9676 |
-
}
|
9677 |
-
|
9678 |
-
const onNoticeShown = () => {
|
9679 |
-
Object(external_wc_tracks_["recordEvent"])('ces_snackbar_view', {
|
9680 |
-
action,
|
9681 |
-
store_age: storeAgeInWeeks,
|
9682 |
-
...trackProps
|
9683 |
-
});
|
9684 |
-
};
|
9685 |
-
|
9686 |
-
const addActionToShownOption = () => {
|
9687 |
-
updateOptions({
|
9688 |
-
[SHOWN_FOR_ACTIONS_OPTION_NAME]: [action, ...cesShownForActions]
|
9689 |
-
});
|
9690 |
-
};
|
9691 |
-
|
9692 |
-
const onNoticeDismissed = () => {
|
9693 |
-
Object(external_wc_tracks_["recordEvent"])('ces_snackbar_dismiss', {
|
9694 |
-
action,
|
9695 |
-
store_age: storeAgeInWeeks,
|
9696 |
-
...trackProps
|
9697 |
-
});
|
9698 |
-
addActionToShownOption();
|
9699 |
-
};
|
9700 |
-
|
9701 |
-
const onModalShown = () => {
|
9702 |
-
setModalShown(true);
|
9703 |
-
Object(external_wc_tracks_["recordEvent"])('ces_view', {
|
9704 |
-
action,
|
9705 |
-
store_age: storeAgeInWeeks,
|
9706 |
-
...trackProps
|
9707 |
-
});
|
9708 |
-
addActionToShownOption();
|
9709 |
-
};
|
9710 |
-
|
9711 |
-
const recordScore = (score, comments) => {
|
9712 |
-
Object(external_wc_tracks_["recordEvent"])('ces_feedback', {
|
9713 |
-
action,
|
9714 |
-
score,
|
9715 |
-
comments: comments || '',
|
9716 |
-
store_age: storeAgeInWeeks,
|
9717 |
-
...trackProps
|
9718 |
-
});
|
9719 |
-
createNotice('success', onSubmitLabel);
|
9720 |
-
};
|
9721 |
-
|
9722 |
-
return Object(external_wp_element_["createElement"])(external_wc_customerEffortScore_default.a, {
|
9723 |
-
recordScoreCallback: recordScore,
|
9724 |
-
label: label,
|
9725 |
-
onNoticeShownCallback: onNoticeShown,
|
9726 |
-
onNoticeDismissedCallback: onNoticeDismissed,
|
9727 |
-
onModalShownCallback: onModalShown,
|
9728 |
-
icon: Object(external_wp_element_["createElement"])("span", {
|
9729 |
-
style: {
|
9730 |
-
height: 21,
|
9731 |
-
width: 21
|
9732 |
-
},
|
9733 |
-
role: "img",
|
9734 |
-
"aria-label": Object(external_wp_i18n_["__"])('Pencil icon', 'woocommerce-admin')
|
9735 |
-
}, "\u270F\uFE0F")
|
9736 |
-
});
|
9737 |
-
}
|
9738 |
-
|
9739 |
-
CustomerEffortScoreTracks.propTypes = {
|
9740 |
-
/**
|
9741 |
-
* The action name sent to Tracks.
|
9742 |
-
*/
|
9743 |
-
action: prop_types_default.a.string.isRequired,
|
9744 |
-
|
9745 |
-
/**
|
9746 |
-
* Additional props sent to Tracks.
|
9747 |
-
*/
|
9748 |
-
trackProps: prop_types_default.a.object,
|
9749 |
-
|
9750 |
-
/**
|
9751 |
-
* The label displayed in the modal.
|
9752 |
-
*/
|
9753 |
-
label: prop_types_default.a.string.isRequired,
|
9754 |
-
|
9755 |
-
/**
|
9756 |
-
* The label for the snackbar that appears upon survey submission.
|
9757 |
-
*/
|
9758 |
-
onSubmitLabel: prop_types_default.a.string,
|
9759 |
-
|
9760 |
-
/**
|
9761 |
-
* The array of actions that the CES modal has been shown for.
|
9762 |
-
*/
|
9763 |
-
cesShownForActions: prop_types_default.a.arrayOf(prop_types_default.a.string).isRequired,
|
9764 |
-
|
9765 |
-
/**
|
9766 |
-
* Whether tracking is allowed or not.
|
9767 |
-
*/
|
9768 |
-
allowTracking: prop_types_default.a.bool,
|
9769 |
-
|
9770 |
-
/**
|
9771 |
-
* Whether props are still being resolved.
|
9772 |
-
*/
|
9773 |
-
resolving: prop_types_default.a.bool.isRequired,
|
9774 |
-
|
9775 |
-
/**
|
9776 |
-
* The age of the store in weeks.
|
9777 |
-
*/
|
9778 |
-
storeAgeInWeeks: prop_types_default.a.number,
|
9779 |
-
|
9780 |
-
/**
|
9781 |
-
* Function to update options.
|
9782 |
-
*/
|
9783 |
-
updateOptions: prop_types_default.a.func,
|
9784 |
-
|
9785 |
-
/**
|
9786 |
-
* Function to create a snackbar
|
9787 |
-
*/
|
9788 |
-
createNotice: prop_types_default.a.func
|
9789 |
-
};
|
9790 |
-
|
9791 |
-
function getStoreAgeInWeeks(adminInstallTimestamp) {
|
9792 |
-
if (adminInstallTimestamp === 0) {
|
9793 |
-
return null;
|
9794 |
-
} // Date.now() is ms since Unix epoch, adminInstallTimestamp is in
|
9795 |
-
// seconds since Unix epoch.
|
9796 |
-
|
9797 |
-
|
9798 |
-
const storeAgeInMs = Date.now() - adminInstallTimestamp * 1000;
|
9799 |
-
const storeAgeInWeeks = Math.round(storeAgeInMs / external_wc_data_["WEEK"]);
|
9800 |
-
return storeAgeInWeeks;
|
9801 |
-
}
|
9802 |
-
|
9803 |
-
/* harmony default export */ var customer_effort_score_tracks = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => {
|
9804 |
-
const {
|
9805 |
-
getOption,
|
9806 |
-
isResolving
|
9807 |
-
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
9808 |
-
const cesShownForActions = getOption(SHOWN_FOR_ACTIONS_OPTION_NAME) || [];
|
9809 |
-
const adminInstallTimestamp = getOption(ADMIN_INSTALL_TIMESTAMP_OPTION_NAME) || 0;
|
9810 |
-
const storeAgeInWeeks = getStoreAgeInWeeks(adminInstallTimestamp);
|
9811 |
-
const allowTrackingOption = getOption(ALLOW_TRACKING_OPTION_NAME) || 'no';
|
9812 |
-
const allowTracking = allowTrackingOption === 'yes';
|
9813 |
-
const resolving = isResolving('getOption', [SHOWN_FOR_ACTIONS_OPTION_NAME]) || storeAgeInWeeks === null || isResolving('getOption', [ADMIN_INSTALL_TIMESTAMP_OPTION_NAME]) || isResolving('getOption', [ALLOW_TRACKING_OPTION_NAME]);
|
9814 |
-
return {
|
9815 |
-
cesShownForActions,
|
9816 |
-
allowTracking,
|
9817 |
-
storeAgeInWeeks,
|
9818 |
-
resolving
|
9819 |
-
};
|
9820 |
-
}), Object(external_wp_data_["withDispatch"])(dispatch => {
|
9821 |
-
const {
|
9822 |
-
updateOptions
|
9823 |
-
} = dispatch(external_wc_data_["OPTIONS_STORE_NAME"]);
|
9824 |
-
const {
|
9825 |
-
createNotice
|
9826 |
-
} = dispatch('core/notices');
|
9827 |
-
return {
|
9828 |
-
updateOptions,
|
9829 |
-
createNotice
|
9830 |
-
};
|
9831 |
-
}))(CustomerEffortScoreTracks));
|
9832 |
-
// EXTERNAL MODULE: ./client/customer-effort-score-tracks/data/constants.js
|
9833 |
-
var constants = __webpack_require__(59);
|
9834 |
-
|
9835 |
-
// EXTERNAL MODULE: external ["wp","dataControls"]
|
9836 |
-
var external_wp_dataControls_ = __webpack_require__(10);
|
9837 |
-
|
9838 |
-
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/action-types.js
|
9839 |
-
const TYPES = {
|
9840 |
-
SET_CES_SURVEY_QUEUE: 'SET_CES_SURVEY_QUEUE',
|
9841 |
-
ADD_CES_SURVEY: 'ADD_CES_SURVEY'
|
9842 |
-
};
|
9843 |
-
/* harmony default export */ var action_types = (TYPES);
|
9844 |
-
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/actions.js
|
9845 |
-
/**
|
9846 |
-
* External dependencies
|
9847 |
-
*/
|
9848 |
-
|
9849 |
-
/**
|
9850 |
-
* Internal dependencies
|
9851 |
-
*/
|
9852 |
-
|
9853 |
-
|
9854 |
-
/**
|
9855 |
-
* Initialize the state
|
9856 |
-
*
|
9857 |
-
* @param {Object} queue initial queue
|
9858 |
-
*/
|
9859 |
-
|
9860 |
-
function setCesSurveyQueue(queue) {
|
9861 |
-
return {
|
9862 |
-
type: action_types.SET_CES_SURVEY_QUEUE,
|
9863 |
-
queue
|
9864 |
-
};
|
9865 |
-
}
|
9866 |
-
/**
|
9867 |
-
* Add a new CES track to the state.
|
9868 |
-
*
|
9869 |
-
* @param {string} action action name for the survey
|
9870 |
-
* @param {string} label label for the snackback
|
9871 |
-
* @param {string} pageNow value of window.pagenow
|
9872 |
-
* @param {string} adminPage value of window.adminpage
|
9873 |
-
* @param {string} onsubmit_label label for the snackback onsubmit
|
9874 |
-
* @param {Object} props object for optional props
|
9875 |
-
*/
|
9876 |
-
|
9877 |
-
function addCesSurvey(action, label) {
|
9878 |
-
let pageNow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : window.pagenow;
|
9879 |
-
let adminPage = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : window.adminpage;
|
9880 |
-
let onsubmit_label = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
|
9881 |
-
let props = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
9882 |
-
return {
|
9883 |
-
type: action_types.ADD_CES_SURVEY,
|
9884 |
-
action,
|
9885 |
-
label,
|
9886 |
-
pageNow,
|
9887 |
-
adminPage,
|
9888 |
-
onsubmit_label,
|
9889 |
-
props
|
9890 |
-
};
|
9891 |
-
}
|
9892 |
-
/**
|
9893 |
-
* Add a new CES survey track for the pages in Analytics menu
|
9894 |
-
*/
|
9895 |
-
|
9896 |
-
function addCesSurveyForAnalytics() {
|
9897 |
-
return addCesSurvey('analytics_filtered', Object(external_wp_i18n_["__"])('How easy was it to filter your store analytics?', 'woocommerce-admin'), 'woocommerce_page_wc-admin', 'woocommerce_page_wc-admin');
|
9898 |
-
}
|
9899 |
-
/**
|
9900 |
-
* Add a new CES survey track on searching customers.
|
9901 |
-
*/
|
9902 |
-
|
9903 |
-
function addCesSurveyForCustomerSearch() {
|
9904 |
-
return addCesSurvey('ces_search', Object(external_wp_i18n_["__"])('How easy was it to use search?', 'woocommerce-admin'), 'woocommerce_page_wc-admin', 'woocommerce_page_wc-admin', undefined, {
|
9905 |
-
search_area: 'customer'
|
9906 |
-
});
|
9907 |
-
}
|
9908 |
-
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/resolvers.js
|
9909 |
-
/**
|
9910 |
-
* External dependencies
|
9911 |
-
*/
|
9912 |
-
|
9913 |
-
/**
|
9914 |
-
* Internal dependencies
|
9915 |
-
*/
|
9916 |
-
|
9917 |
-
|
9918 |
-
|
9919 |
-
function* resolvers_getCesSurveyQueue() {
|
9920 |
-
const response = yield Object(external_wp_dataControls_["apiFetch"])({
|
9921 |
-
path: `${constants["a" /* API_NAMESPACE */]}/options?options=${constants["b" /* QUEUE_OPTION_NAME */]}`
|
9922 |
-
});
|
9923 |
-
|
9924 |
-
if (response) {
|
9925 |
-
yield setCesSurveyQueue(response[constants["b" /* QUEUE_OPTION_NAME */]] || []);
|
9926 |
-
} else {
|
9927 |
-
throw new Error();
|
9928 |
-
}
|
9929 |
-
}
|
9930 |
-
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/selectors.js
|
9931 |
-
function selectors_getCesSurveyQueue(state) {
|
9932 |
-
return state.queue;
|
9933 |
-
}
|
9934 |
-
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/reducer.js
|
9935 |
-
/**
|
9936 |
-
* Internal dependencies
|
9937 |
-
*/
|
9938 |
-
|
9939 |
-
const DEFAULT_STATE = {
|
9940 |
-
queue: []
|
9941 |
-
};
|
9942 |
-
|
9943 |
-
const reducer = function () {
|
9944 |
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE;
|
9945 |
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
9946 |
-
|
9947 |
-
switch (action.type) {
|
9948 |
-
case action_types.SET_CES_SURVEY_QUEUE:
|
9949 |
-
return { ...state,
|
9950 |
-
queue: action.queue
|
9951 |
-
};
|
9952 |
-
|
9953 |
-
case action_types.ADD_CES_SURVEY:
|
9954 |
-
// Prevent duplicate
|
9955 |
-
const hasDuplicate = state.queue.filter(track => track.action === action.action);
|
9956 |
-
|
9957 |
-
if (hasDuplicate.length) {
|
9958 |
-
return state;
|
9959 |
-
}
|
9960 |
-
|
9961 |
-
const newTrack = {
|
9962 |
-
action: action.action,
|
9963 |
-
label: action.label,
|
9964 |
-
pagenow: action.pageNow,
|
9965 |
-
adminpage: action.adminPage,
|
9966 |
-
onSubmitLabel: action.onSubmitLabel,
|
9967 |
-
props: action.props
|
9968 |
-
};
|
9969 |
-
return { ...state,
|
9970 |
-
queue: [...state.queue, newTrack]
|
9971 |
-
};
|
9972 |
-
|
9973 |
-
default:
|
9974 |
-
return state;
|
9975 |
-
}
|
9976 |
-
};
|
9977 |
-
|
9978 |
-
/* harmony default export */ var data_reducer = (reducer);
|
9979 |
-
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/index.js
|
9980 |
-
/**
|
9981 |
-
* External dependencies
|
9982 |
-
*/
|
9983 |
-
|
9984 |
-
|
9985 |
-
/**
|
9986 |
-
* Internal dependencies
|
9987 |
-
*/
|
9988 |
-
|
9989 |
-
|
9990 |
-
|
9991 |
-
|
9992 |
-
|
9993 |
-
|
9994 |
-
/* harmony default export */ var data = (Object(external_wp_data_["registerStore"])(constants["c" /* STORE_KEY */], {
|
9995 |
-
actions: actions_namespaceObject,
|
9996 |
-
selectors: selectors_namespaceObject,
|
9997 |
-
resolvers: resolvers_namespaceObject,
|
9998 |
-
controls: external_wp_dataControls_["controls"],
|
9999 |
-
reducer: data_reducer
|
10000 |
-
}));
|
10001 |
-
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/customer-effort-score-tracks-container.js
|
10002 |
-
|
10003 |
-
|
10004 |
-
/**
|
10005 |
-
* External dependencies
|
10006 |
-
*/
|
10007 |
-
|
10008 |
-
|
10009 |
-
|
10010 |
-
|
10011 |
-
/**
|
10012 |
-
* Internal dependencies
|
10013 |
-
*/
|
10014 |
-
|
10015 |
-
|
10016 |
-
|
10017 |
-
|
10018 |
-
/**
|
10019 |
-
* Maps the queue of CES tracks surveys to CustomerEffortScoreTracks
|
10020 |
-
* components. Note that generally there will only be a single survey per page
|
10021 |
-
* however this is designed to be flexible if multiple surveys per page are
|
10022 |
-
* added in the future.
|
10023 |
-
*
|
10024 |
-
* @param {Object} props Component props.
|
10025 |
-
* @param {Array} props.queue The queue of surveys.
|
10026 |
-
* @param {boolean} props.resolving Whether the queue is resolving.
|
10027 |
-
* @param {Function} props.clearQueue Sets up clearing of the queue on the next page load.
|
10028 |
-
*/
|
10029 |
-
|
10030 |
-
function CustomerEffortScoreTracksContainer(_ref) {
|
10031 |
-
let {
|
10032 |
-
queue,
|
10033 |
-
resolving,
|
10034 |
-
clearQueue
|
10035 |
-
} = _ref;
|
10036 |
-
|
10037 |
-
if (resolving) {
|
10038 |
-
return null;
|
10039 |
-
}
|
10040 |
-
|
10041 |
-
const queueForPage = queue.filter(item => item.pagenow === window.pagenow && item.adminpage === window.adminpage);
|
10042 |
-
|
10043 |
-
if (queueForPage.length) {
|
10044 |
-
clearQueue();
|
10045 |
-
}
|
10046 |
-
|
10047 |
-
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, queueForPage.map((item, index) => Object(external_wp_element_["createElement"])(customer_effort_score_tracks, {
|
10048 |
-
key: index,
|
10049 |
-
action: item.action,
|
10050 |
-
label: item.label,
|
10051 |
-
onSubmitLabel: item.onsubmit_label,
|
10052 |
-
trackProps: item.props || {}
|
10053 |
-
})));
|
10054 |
-
}
|
10055 |
-
|
10056 |
-
CustomerEffortScoreTracksContainer.propTypes = {
|
10057 |
-
/**
|
10058 |
-
* The queue of CES tracks surveys to display.
|
10059 |
-
*/
|
10060 |
-
queue: prop_types_default.a.arrayOf(prop_types_default.a.object),
|
10061 |
-
|
10062 |
-
/**
|
10063 |
-
* If the queue option is being resolved.
|
10064 |
-
*/
|
10065 |
-
resolving: prop_types_default.a.bool,
|
10066 |
-
|
10067 |
-
/**
|
10068 |
-
* Set up clearing the queue on the next page load.
|
10069 |
-
*/
|
10070 |
-
clearQueue: prop_types_default.a.func
|
10071 |
-
};
|
10072 |
-
/* harmony default export */ var customer_effort_score_tracks_container = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => {
|
10073 |
-
const {
|
10074 |
-
getCesSurveyQueue,
|
10075 |
-
isResolving
|
10076 |
-
} = select(constants["c" /* STORE_KEY */]);
|
10077 |
-
const queue = getCesSurveyQueue();
|
10078 |
-
const resolving = isResolving('getOption', [constants["b" /* QUEUE_OPTION_NAME */]]);
|
10079 |
-
return {
|
10080 |
-
queue,
|
10081 |
-
resolving
|
10082 |
-
};
|
10083 |
-
}), Object(external_wp_data_["withDispatch"])(dispatch => {
|
10084 |
-
const {
|
10085 |
-
updateOptions
|
10086 |
-
} = dispatch(external_wc_data_["OPTIONS_STORE_NAME"]);
|
10087 |
-
return {
|
10088 |
-
clearQueue: () => {
|
10089 |
-
// This sets an option that should be used on the next page
|
10090 |
-
// load to clear the CES tracks queue for the current page (see
|
10091 |
-
// CustomerEffortScoreTracks.php) - clearing the queue
|
10092 |
-
// directly puts this into an infinite loop which is picked
|
10093 |
-
// up by React.
|
10094 |
-
updateOptions({
|
10095 |
-
woocommerce_clear_ces_tracks_queue_for_page: {
|
10096 |
-
pagenow: window.pagenow,
|
10097 |
-
adminpage: window.adminpage
|
10098 |
-
}
|
10099 |
-
});
|
10100 |
-
}
|
10101 |
-
};
|
10102 |
-
}))(CustomerEffortScoreTracksContainer));
|
10103 |
-
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/index.js
|
10104 |
-
|
10105 |
-
|
10106 |
-
|
10107 |
-
/***/ }),
|
10108 |
-
|
10109 |
-
/***/ 282:
|
10110 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10111 |
-
|
10112 |
-
"use strict";
|
10113 |
-
|
10114 |
-
// EXPORTS
|
10115 |
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ EmbeddedBodyLayout; });
|
10116 |
-
|
10117 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
|
10118 |
-
var helpers_extends = __webpack_require__(40);
|
10119 |
-
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
|
10120 |
-
|
10121 |
-
// EXTERNAL MODULE: external ["wp","element"]
|
10122 |
-
var external_wp_element_ = __webpack_require__(0);
|
10123 |
-
|
10124 |
-
// EXTERNAL MODULE: external ["wp","hooks"]
|
10125 |
-
var external_wp_hooks_ = __webpack_require__(28);
|
10126 |
-
|
10127 |
-
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
10128 |
-
var lib = __webpack_require__(32);
|
10129 |
-
|
10130 |
-
// EXTERNAL MODULE: external ["wp","data"]
|
10131 |
-
var external_wp_data_ = __webpack_require__(8);
|
10132 |
-
|
10133 |
-
// EXTERNAL MODULE: external ["wc","data"]
|
10134 |
-
var external_wc_data_ = __webpack_require__(12);
|
10135 |
-
|
10136 |
-
// CONCATENATED MODULE: ./client/settings-recommendations/recommendations-eligibility-wrapper.tsx
|
10137 |
-
|
10138 |
-
|
10139 |
-
/**
|
10140 |
-
* External dependencies
|
10141 |
-
*/
|
10142 |
-
|
10143 |
-
|
10144 |
-
const SHOW_MARKETPLACE_SUGGESTION_OPTION = 'woocommerce_show_marketplace_suggestions';
|
10145 |
-
|
10146 |
-
const RecommendationsEligibilityWrapper = _ref => {
|
10147 |
-
let {
|
10148 |
-
children
|
10149 |
-
} = _ref;
|
10150 |
-
const {
|
10151 |
-
currentUserCan
|
10152 |
-
} = Object(external_wc_data_["useUser"])();
|
10153 |
-
const isMarketplaceSuggestionsEnabled = Object(external_wp_data_["useSelect"])(select => {
|
10154 |
-
const {
|
10155 |
-
getOption,
|
10156 |
-
hasFinishedResolution
|
10157 |
-
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
10158 |
-
const hasFinishedResolving = hasFinishedResolution('getOption', [SHOW_MARKETPLACE_SUGGESTION_OPTION]);
|
10159 |
-
const canShowMarketplaceSuggestions = getOption(SHOW_MARKETPLACE_SUGGESTION_OPTION) !== 'no';
|
10160 |
-
return hasFinishedResolving && canShowMarketplaceSuggestions;
|
10161 |
-
});
|
10162 |
-
|
10163 |
-
if (!currentUserCan('install_plugins')) {
|
10164 |
-
return null;
|
10165 |
-
}
|
10166 |
-
|
10167 |
-
if (!isMarketplaceSuggestionsEnabled) {
|
10168 |
-
return null;
|
10169 |
-
}
|
10170 |
-
|
10171 |
-
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, children);
|
10172 |
-
};
|
10173 |
-
|
10174 |
-
/* harmony default export */ var recommendations_eligibility_wrapper = (RecommendationsEligibilityWrapper);
|
10175 |
-
// CONCATENATED MODULE: ./client/payments/payment-recommendations-wrapper.tsx
|
10176 |
-
|
10177 |
-
|
10178 |
-
/**
|
10179 |
-
* External dependencies
|
10180 |
-
*/
|
10181 |
-
|
10182 |
-
/**
|
10183 |
-
* Internal dependencies
|
10184 |
-
*/
|
10185 |
-
|
10186 |
-
|
10187 |
-
const PaymentRecommendationsChunk = Object(external_wp_element_["lazy"])(() => __webpack_require__.e(/* import() | payment-recommendations */ 45).then(__webpack_require__.bind(null, 647)));
|
10188 |
-
const PaymentRecommendations = _ref => {
|
10189 |
-
let {
|
10190 |
-
page,
|
10191 |
-
tab,
|
10192 |
-
section
|
10193 |
-
} = _ref;
|
10194 |
-
|
10195 |
-
if (page === 'wc-settings' && tab === 'checkout' && !section) {
|
10196 |
-
return Object(external_wp_element_["createElement"])(recommendations_eligibility_wrapper, null, Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
10197 |
-
fallback: null
|
10198 |
-
}, Object(external_wp_element_["createElement"])(PaymentRecommendationsChunk, null)));
|
10199 |
-
}
|
10200 |
-
|
10201 |
-
return null;
|
10202 |
-
};
|
10203 |
-
// CONCATENATED MODULE: ./client/payments/index.ts
|
10204 |
-
|
10205 |
-
// CONCATENATED MODULE: ./client/shipping/shipping-recommendations-wrapper.tsx
|
10206 |
-
|
10207 |
-
|
10208 |
-
/**
|
10209 |
-
* External dependencies
|
10210 |
-
*/
|
10211 |
-
|
10212 |
-
/**
|
10213 |
-
* Internal dependencies
|
10214 |
-
*/
|
10215 |
-
|
10216 |
-
|
10217 |
-
const ShippingRecommendationsLoader = Object(external_wp_element_["lazy"])(() => __webpack_require__.e(/* import() | shipping-recommendations */ 48).then(__webpack_require__.bind(null, 657)));
|
10218 |
-
const ShippingRecommendations = _ref => {
|
10219 |
-
let {
|
10220 |
-
page,
|
10221 |
-
tab,
|
10222 |
-
section,
|
10223 |
-
zone_id
|
10224 |
-
} = _ref;
|
10225 |
-
|
10226 |
-
if (page !== 'wc-settings') {
|
10227 |
-
return null;
|
10228 |
-
}
|
10229 |
-
|
10230 |
-
if (tab !== 'shipping') {
|
10231 |
-
return null;
|
10232 |
-
}
|
10233 |
-
|
10234 |
-
if (Boolean(section)) {
|
10235 |
-
return null;
|
10236 |
-
}
|
10237 |
-
|
10238 |
-
if (Boolean(zone_id)) {
|
10239 |
-
return null;
|
10240 |
-
}
|
10241 |
-
|
10242 |
-
return Object(external_wp_element_["createElement"])(recommendations_eligibility_wrapper, null, Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
10243 |
-
fallback: null
|
10244 |
-
}, Object(external_wp_element_["createElement"])(ShippingRecommendationsLoader, null)));
|
10245 |
-
};
|
10246 |
-
// CONCATENATED MODULE: ./client/shipping/index.ts
|
10247 |
-
|
10248 |
-
// EXTERNAL MODULE: ./client/embedded-body-layout/style.scss
|
10249 |
-
var style = __webpack_require__(305);
|
10250 |
-
|
10251 |
-
// CONCATENATED MODULE: ./client/embedded-body-layout/embedded-body-layout.tsx
|
10252 |
-
|
10253 |
-
|
10254 |
-
|
10255 |
-
/**
|
10256 |
-
* External dependencies
|
10257 |
-
*/
|
10258 |
-
|
10259 |
-
|
10260 |
-
/**
|
10261 |
-
* Internal dependencies
|
10262 |
-
*/
|
10263 |
-
|
10264 |
-
|
10265 |
-
|
10266 |
-
|
10267 |
-
|
10268 |
-
function isWPPage(params) {
|
10269 |
-
return params.page !== undefined;
|
10270 |
-
}
|
10271 |
-
|
10272 |
-
const EMBEDDED_BODY_COMPONENT_LIST = [PaymentRecommendations, ShippingRecommendations];
|
10273 |
-
/**
|
10274 |
-
* This component is appended to the bottom of the WooCommerce non-react pages (like settings).
|
10275 |
-
* You can add a component by writing a Fill component from slot-fill with the `embedded-body-layout` name.
|
10276 |
-
*
|
10277 |
-
* Each Fill component receives QueryParams, consisting of a page, tab, and section string.
|
10278 |
-
*/
|
10279 |
-
|
10280 |
-
const EmbeddedBodyLayout = () => {
|
10281 |
-
const query = Object(lib["parse"])(location.search.substring(1));
|
10282 |
-
let queryParams = {
|
10283 |
-
page: '',
|
10284 |
-
tab: ''
|
10285 |
-
};
|
10286 |
-
|
10287 |
-
if (isWPPage(query)) {
|
10288 |
-
queryParams = query;
|
10289 |
-
}
|
10290 |
-
/**
|
10291 |
-
* Filter an array of body components for WooCommerce non-react pages.
|
10292 |
-
*
|
10293 |
-
* @filter woocommerce_admin_embedded_layout_components
|
10294 |
-
* @param {Array.<Node>} embeddedBodyComponentList Array of body components.
|
10295 |
-
* @param {Object} query url query parameters.
|
10296 |
-
*/
|
10297 |
-
|
10298 |
-
|
10299 |
-
const componentList = Object(external_wp_hooks_["applyFilters"])('woocommerce_admin_embedded_layout_components', EMBEDDED_BODY_COMPONENT_LIST, queryParams);
|
10300 |
-
return Object(external_wp_element_["createElement"])("div", {
|
10301 |
-
className: "woocommerce-embedded-layout__primary",
|
10302 |
-
id: "woocommerce-embedded-layout__primary"
|
10303 |
-
}, componentList.map((Comp, index) => {
|
10304 |
-
return Object(external_wp_element_["createElement"])(Comp, extends_default()({
|
10305 |
-
key: index
|
10306 |
-
}, queryParams));
|
10307 |
-
}));
|
10308 |
-
};
|
10309 |
-
// CONCATENATED MODULE: ./client/embedded-body-layout/index.ts
|
10310 |
-
|
10311 |
-
|
10312 |
-
/***/ }),
|
10313 |
-
|
10314 |
-
/***/ 291:
|
10315 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10316 |
-
|
10317 |
-
"use strict";
|
10318 |
-
__webpack_require__.r(__webpack_exports__);
|
10319 |
-
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
10320 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
10321 |
-
/* harmony import */ var _wordpress_notices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(129);
|
10322 |
-
/* harmony import */ var _wordpress_notices__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_notices__WEBPACK_IMPORTED_MODULE_1__);
|
10323 |
-
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
|
10324 |
-
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__);
|
10325 |
-
/* harmony import */ var _stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(293);
|
10326 |
-
/* harmony import */ var _stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_3__);
|
10327 |
-
/* harmony import */ var _utils_admin_settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23);
|
10328 |
-
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(121);
|
10329 |
-
/* harmony import */ var _customer_effort_score_tracks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(281);
|
10330 |
-
/* harmony import */ var _embedded_body_layout__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(282);
|
10331 |
-
|
10332 |
-
|
10333 |
-
/**
|
10334 |
-
* External dependencies
|
10335 |
-
*/
|
10336 |
-
|
10337 |
-
|
10338 |
-
|
10339 |
-
/**
|
10340 |
-
* Internal dependencies
|
10341 |
-
*/
|
10342 |
-
|
10343 |
-
|
10344 |
-
|
10345 |
-
|
10346 |
-
|
10347 |
-
// Modify webpack pubilcPath at runtime based on location of WordPress Plugin.
|
10348 |
-
// eslint-disable-next-line no-undef,camelcase
|
10349 |
-
|
10350 |
-
__webpack_require__.p = global.wcAdminAssets.path;
|
10351 |
-
const appRoot = document.getElementById('root');
|
10352 |
-
const embeddedRoot = document.getElementById('woocommerce-embedded-root');
|
10353 |
-
const settingsGroup = 'wc_admin';
|
10354 |
-
const hydrateUser = Object(_utils_admin_settings__WEBPACK_IMPORTED_MODULE_4__[/* getAdminSetting */ "d"])('currentUserData');
|
10355 |
-
|
10356 |
-
if (appRoot) {
|
10357 |
-
let HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withSettingsHydration"])(settingsGroup, window.wcSettings.admin)(_layout__WEBPACK_IMPORTED_MODULE_5__[/* PageLayout */ "b"]);
|
10358 |
-
const preloadSettings = window.wcSettings.admin ? window.wcSettings.admin.preloadSettings : false;
|
10359 |
-
const hydrateSettings = preloadSettings && preloadSettings.general;
|
10360 |
-
|
10361 |
-
if (hydrateSettings) {
|
10362 |
-
HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withSettingsHydration"])('general', {
|
10363 |
-
general: preloadSettings.general
|
10364 |
-
})(HydratedPageLayout);
|
10365 |
-
}
|
10366 |
-
|
10367 |
-
if (hydrateUser) {
|
10368 |
-
HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withCurrentUserHydration"])(hydrateUser)(HydratedPageLayout);
|
10369 |
-
}
|
10370 |
-
|
10371 |
-
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedPageLayout, null), appRoot);
|
10372 |
-
} else if (embeddedRoot) {
|
10373 |
-
let HydratedEmbedLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withSettingsHydration"])(settingsGroup, window.wcSettings.admin)(_layout__WEBPACK_IMPORTED_MODULE_5__[/* EmbedLayout */ "a"]);
|
10374 |
-
|
10375 |
-
if (hydrateUser) {
|
10376 |
-
HydratedEmbedLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withCurrentUserHydration"])(hydrateUser)(HydratedEmbedLayout);
|
10377 |
-
} // Render the header.
|
10378 |
-
|
10379 |
-
|
10380 |
-
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedEmbedLayout, null), embeddedRoot);
|
10381 |
-
embeddedRoot.classList.remove('is-embed-loading'); // Render notices just above the WP content div.
|
10382 |
-
|
10383 |
-
const wpBody = document.getElementById('wpbody-content');
|
10384 |
-
const wrap = wpBody.querySelector('.wrap.woocommerce') || wpBody.querySelector('.wrap');
|
10385 |
-
const noticeContainer = document.createElement('div');
|
10386 |
-
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
10387 |
-
className: "woocommerce-layout"
|
10388 |
-
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_layout__WEBPACK_IMPORTED_MODULE_5__[/* PrimaryLayout */ "c"], null)), wpBody.insertBefore(noticeContainer, wrap));
|
10389 |
-
const embeddedBodyContainer = document.createElement('div');
|
10390 |
-
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_embedded_body_layout__WEBPACK_IMPORTED_MODULE_7__[/* EmbeddedBodyLayout */ "a"], null), wpBody.insertBefore(embeddedBodyContainer, wrap.nextSibling));
|
10391 |
-
} // Render the CustomerEffortScoreTracksContainer only if
|
10392 |
-
// the feature flag is enabled.
|
10393 |
-
|
10394 |
-
|
10395 |
-
if (window.wcAdminFeatures && window.wcAdminFeatures['customer-effort-score-tracks'] === true) {
|
10396 |
-
// Set up customer effort score survey.
|
10397 |
-
(function () {
|
10398 |
-
const root = appRoot || embeddedRoot;
|
10399 |
-
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_customer_effort_score_tracks__WEBPACK_IMPORTED_MODULE_6__[/* CustomerEffortScoreTracksContainer */ "a"], null), root.insertBefore(document.createElement('div'), null));
|
10400 |
-
})();
|
10401 |
-
}
|
10402 |
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(81)))
|
10403 |
-
|
10404 |
-
/***/ }),
|
10405 |
-
|
10406 |
-
/***/ 293:
|
10407 |
-
/***/ (function(module, exports, __webpack_require__) {
|
10408 |
-
|
10409 |
-
// extracted by mini-css-extract-plugin
|
10410 |
-
|
10411 |
-
/***/ }),
|
10412 |
-
|
10413 |
-
/***/ 294:
|
10414 |
-
/***/ (function(module, exports) {
|
10415 |
-
|
10416 |
-
(function() { module.exports = window["wc"]["notices"]; }());
|
10417 |
-
|
10418 |
-
/***/ }),
|
10419 |
-
|
10420 |
-
/***/ 295:
|
10421 |
-
/***/ (function(module, exports, __webpack_require__) {
|
10422 |
-
|
10423 |
-
// extracted by mini-css-extract-plugin
|
10424 |
-
|
10425 |
-
/***/ }),
|
10426 |
-
|
10427 |
-
/***/ 296:
|
10428 |
-
/***/ (function(module, exports, __webpack_require__) {
|
10429 |
-
|
10430 |
-
// extracted by mini-css-extract-plugin
|
10431 |
-
|
10432 |
-
/***/ }),
|
10433 |
-
|
10434 |
-
/***/ 297:
|
10435 |
-
/***/ (function(module, exports, __webpack_require__) {
|
10436 |
-
|
10437 |
-
// extracted by mini-css-extract-plugin
|
10438 |
-
|
10439 |
-
/***/ }),
|
10440 |
-
|
10441 |
-
/***/ 298:
|
10442 |
-
/***/ (function(module, exports, __webpack_require__) {
|
10443 |
-
|
10444 |
-
// extracted by mini-css-extract-plugin
|
10445 |
-
|
10446 |
-
/***/ }),
|
10447 |
-
|
10448 |
-
/***/ 299:
|
10449 |
-
/***/ (function(module, exports, __webpack_require__) {
|
10450 |
-
|
10451 |
-
// extracted by mini-css-extract-plugin
|
10452 |
-
|
10453 |
-
/***/ }),
|
10454 |
-
|
10455 |
-
/***/ 3:
|
10456 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10457 |
-
|
10458 |
-
"use strict";
|
10459 |
-
|
10460 |
-
// EXPORTS
|
10461 |
-
__webpack_require__.d(__webpack_exports__, "w", function() { return /* reexport */ raf; });
|
10462 |
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ FluidValue; });
|
10463 |
-
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ react_spring_shared_esm_globals; });
|
10464 |
-
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ addFluidObserver; });
|
10465 |
-
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ callFluidObservers; });
|
10466 |
-
__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ colors; });
|
10467 |
-
__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ createInterpolator; });
|
10468 |
-
__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ createStringInterpolator; });
|
10469 |
-
__webpack_require__.d(__webpack_exports__, "h", function() { return /* binding */ defineHidden; });
|
10470 |
-
__webpack_require__.d(__webpack_exports__, "i", function() { return /* binding */ deprecateDirectCall; });
|
10471 |
-
__webpack_require__.d(__webpack_exports__, "j", function() { return /* binding */ deprecateInterpolate; });
|
10472 |
-
__webpack_require__.d(__webpack_exports__, "k", function() { return /* binding */ each; });
|
10473 |
-
__webpack_require__.d(__webpack_exports__, "l", function() { return /* binding */ eachProp; });
|
10474 |
-
__webpack_require__.d(__webpack_exports__, "m", function() { return /* binding */ flush; });
|
10475 |
-
__webpack_require__.d(__webpack_exports__, "n", function() { return /* binding */ flushCalls; });
|
10476 |
-
__webpack_require__.d(__webpack_exports__, "o", function() { return /* binding */ frameLoop; });
|
10477 |
-
__webpack_require__.d(__webpack_exports__, "p", function() { return /* binding */ getFluidObservers; });
|
10478 |
-
__webpack_require__.d(__webpack_exports__, "q", function() { return /* binding */ getFluidValue; });
|
10479 |
-
__webpack_require__.d(__webpack_exports__, "r", function() { return /* binding */ hasFluidValue; });
|
10480 |
-
__webpack_require__.d(__webpack_exports__, "s", function() { return /* binding */ is; });
|
10481 |
-
__webpack_require__.d(__webpack_exports__, "t", function() { return /* binding */ isAnimatedString; });
|
10482 |
-
__webpack_require__.d(__webpack_exports__, "u", function() { return /* binding */ isEqual; });
|
10483 |
-
__webpack_require__.d(__webpack_exports__, "v", function() { return /* binding */ noop; });
|
10484 |
-
__webpack_require__.d(__webpack_exports__, "x", function() { return /* binding */ removeFluidObserver; });
|
10485 |
-
__webpack_require__.d(__webpack_exports__, "y", function() { return /* binding */ toArray; });
|
10486 |
-
__webpack_require__.d(__webpack_exports__, "z", function() { return /* binding */ useForceUpdate; });
|
10487 |
-
__webpack_require__.d(__webpack_exports__, "A", function() { return /* binding */ useLayoutEffect; });
|
10488 |
-
__webpack_require__.d(__webpack_exports__, "B", function() { return /* binding */ useMemoOne; });
|
10489 |
-
__webpack_require__.d(__webpack_exports__, "C", function() { return /* binding */ useOnce; });
|
10490 |
-
__webpack_require__.d(__webpack_exports__, "D", function() { return /* binding */ usePrev; });
|
10491 |
-
|
10492 |
-
// UNUSED EXPORTS: callFluidObserver, colorToRgba, hex3, hex4, hex6, hex8, hsl, hsla, isSSR, rgb, rgba, setFluidGetter
|
10493 |
-
|
10494 |
-
// CONCATENATED MODULE: ./node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.js
|
10495 |
-
let updateQueue = makeQueue();
|
10496 |
-
const raf = fn => schedule(fn, updateQueue);
|
10497 |
-
let writeQueue = makeQueue();
|
10498 |
-
|
10499 |
-
raf.write = fn => schedule(fn, writeQueue);
|
10500 |
-
|
10501 |
-
let onStartQueue = makeQueue();
|
10502 |
-
|
10503 |
-
raf.onStart = fn => schedule(fn, onStartQueue);
|
10504 |
-
|
10505 |
-
let onFrameQueue = makeQueue();
|
10506 |
-
|
10507 |
-
raf.onFrame = fn => schedule(fn, onFrameQueue);
|
10508 |
-
|
10509 |
-
let onFinishQueue = makeQueue();
|
10510 |
-
|
10511 |
-
raf.onFinish = fn => schedule(fn, onFinishQueue);
|
10512 |
-
|
10513 |
-
let timeouts = [];
|
10514 |
-
|
10515 |
-
raf.setTimeout = (handler, ms) => {
|
10516 |
-
let time = raf.now() + ms;
|
10517 |
-
|
10518 |
-
let cancel = () => {
|
10519 |
-
let i = timeouts.findIndex(t => t.cancel == cancel);
|
10520 |
-
if (~i) timeouts.splice(i, 1);
|
10521 |
-
pendingCount -= ~i ? 1 : 0;
|
10522 |
-
};
|
10523 |
-
|
10524 |
-
let timeout = {
|
10525 |
-
time,
|
10526 |
-
handler,
|
10527 |
-
cancel
|
10528 |
-
};
|
10529 |
-
timeouts.splice(findTimeout(time), 0, timeout);
|
10530 |
-
pendingCount += 1;
|
10531 |
-
start();
|
10532 |
-
return timeout;
|
10533 |
-
};
|
10534 |
-
|
10535 |
-
let findTimeout = time => ~(~timeouts.findIndex(t => t.time > time) || ~timeouts.length);
|
10536 |
-
|
10537 |
-
raf.cancel = fn => {
|
10538 |
-
onStartQueue.delete(fn);
|
10539 |
-
onFrameQueue.delete(fn);
|
10540 |
-
updateQueue.delete(fn);
|
10541 |
-
writeQueue.delete(fn);
|
10542 |
-
onFinishQueue.delete(fn);
|
10543 |
-
};
|
10544 |
-
|
10545 |
-
raf.sync = fn => {
|
10546 |
-
sync = true;
|
10547 |
-
raf.batchedUpdates(fn);
|
10548 |
-
sync = false;
|
10549 |
-
};
|
10550 |
-
|
10551 |
-
raf.throttle = fn => {
|
10552 |
-
let lastArgs;
|
10553 |
-
|
10554 |
-
function queuedFn() {
|
10555 |
-
try {
|
10556 |
-
fn(...lastArgs);
|
10557 |
-
} finally {
|
10558 |
-
lastArgs = null;
|
10559 |
-
}
|
10560 |
-
}
|
10561 |
-
|
10562 |
-
function throttled(...args) {
|
10563 |
-
lastArgs = args;
|
10564 |
-
raf.onStart(queuedFn);
|
10565 |
-
}
|
10566 |
-
|
10567 |
-
throttled.handler = fn;
|
10568 |
-
|
10569 |
-
throttled.cancel = () => {
|
10570 |
-
onStartQueue.delete(queuedFn);
|
10571 |
-
lastArgs = null;
|
10572 |
-
};
|
10573 |
-
|
10574 |
-
return throttled;
|
10575 |
-
};
|
10576 |
-
|
10577 |
-
let nativeRaf = typeof window != 'undefined' ? window.requestAnimationFrame : () => {};
|
10578 |
-
|
10579 |
-
raf.use = impl => nativeRaf = impl;
|
10580 |
-
|
10581 |
-
raf.now = typeof performance != 'undefined' ? () => performance.now() : Date.now;
|
10582 |
-
|
10583 |
-
raf.batchedUpdates = fn => fn();
|
10584 |
-
|
10585 |
-
raf.catch = console.error;
|
10586 |
-
raf.frameLoop = 'always';
|
10587 |
-
|
10588 |
-
raf.advance = () => {
|
10589 |
-
if (raf.frameLoop !== 'demand') {
|
10590 |
-
console.warn('Cannot call the manual advancement of rafz whilst frameLoop is not set as demand');
|
10591 |
-
} else {
|
10592 |
-
react_spring_rafz_esm_update();
|
10593 |
-
}
|
10594 |
-
};
|
10595 |
-
|
10596 |
-
let ts = -1;
|
10597 |
-
let pendingCount = 0;
|
10598 |
-
let sync = false;
|
10599 |
-
|
10600 |
-
function schedule(fn, queue) {
|
10601 |
-
if (sync) {
|
10602 |
-
queue.delete(fn);
|
10603 |
-
fn(0);
|
10604 |
-
} else {
|
10605 |
-
queue.add(fn);
|
10606 |
-
start();
|
10607 |
-
}
|
10608 |
-
}
|
10609 |
-
|
10610 |
-
function start() {
|
10611 |
-
if (ts < 0) {
|
10612 |
-
ts = 0;
|
10613 |
-
|
10614 |
-
if (raf.frameLoop !== 'demand') {
|
10615 |
-
nativeRaf(loop);
|
10616 |
-
}
|
10617 |
-
}
|
10618 |
-
}
|
10619 |
-
|
10620 |
-
function stop() {
|
10621 |
-
ts = -1;
|
10622 |
-
}
|
10623 |
-
|
10624 |
-
function loop() {
|
10625 |
-
if (~ts) {
|
10626 |
-
nativeRaf(loop);
|
10627 |
-
raf.batchedUpdates(react_spring_rafz_esm_update);
|
10628 |
-
}
|
10629 |
-
}
|
10630 |
-
|
10631 |
-
function react_spring_rafz_esm_update() {
|
10632 |
-
let prevTs = ts;
|
10633 |
-
ts = raf.now();
|
10634 |
-
let count = findTimeout(ts);
|
10635 |
-
|
10636 |
-
if (count) {
|
10637 |
-
eachSafely(timeouts.splice(0, count), t => t.handler());
|
10638 |
-
pendingCount -= count;
|
10639 |
-
}
|
10640 |
-
|
10641 |
-
onStartQueue.flush();
|
10642 |
-
updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
|
10643 |
-
onFrameQueue.flush();
|
10644 |
-
writeQueue.flush();
|
10645 |
-
onFinishQueue.flush();
|
10646 |
-
|
10647 |
-
if (!pendingCount) {
|
10648 |
-
stop();
|
10649 |
-
}
|
10650 |
-
}
|
10651 |
-
|
10652 |
-
function makeQueue() {
|
10653 |
-
let next = new Set();
|
10654 |
-
let current = next;
|
10655 |
-
return {
|
10656 |
-
add(fn) {
|
10657 |
-
pendingCount += current == next && !next.has(fn) ? 1 : 0;
|
10658 |
-
next.add(fn);
|
10659 |
-
},
|
10660 |
-
|
10661 |
-
delete(fn) {
|
10662 |
-
pendingCount -= current == next && next.has(fn) ? 1 : 0;
|
10663 |
-
return next.delete(fn);
|
10664 |
-
},
|
10665 |
-
|
10666 |
-
flush(arg) {
|
10667 |
-
if (current.size) {
|
10668 |
-
next = new Set();
|
10669 |
-
pendingCount -= current.size;
|
10670 |
-
eachSafely(current, fn => fn(arg) && next.add(fn));
|
10671 |
-
pendingCount += next.size;
|
10672 |
-
current = next;
|
10673 |
-
}
|
10674 |
-
}
|
10675 |
-
|
10676 |
-
};
|
10677 |
-
}
|
10678 |
-
|
10679 |
-
function eachSafely(values, each) {
|
10680 |
-
values.forEach(value => {
|
10681 |
-
try {
|
10682 |
-
each(value);
|
10683 |
-
} catch (e) {
|
10684 |
-
raf.catch(e);
|
10685 |
-
}
|
10686 |
-
});
|
10687 |
-
}
|
10688 |
-
|
10689 |
-
const __raf = {
|
10690 |
-
count() {
|
10691 |
-
return pendingCount;
|
10692 |
-
},
|
10693 |
-
|
10694 |
-
isRunning() {
|
10695 |
-
return ts >= 0;
|
10696 |
-
},
|
10697 |
-
|
10698 |
-
clear() {
|
10699 |
-
ts = -1;
|
10700 |
-
timeouts = [];
|
10701 |
-
onStartQueue = makeQueue();
|
10702 |
-
updateQueue = makeQueue();
|
10703 |
-
onFrameQueue = makeQueue();
|
10704 |
-
writeQueue = makeQueue();
|
10705 |
-
onFinishQueue = makeQueue();
|
10706 |
-
pendingCount = 0;
|
10707 |
-
}
|
10708 |
-
|
10709 |
-
};
|
10710 |
-
|
10711 |
-
|
10712 |
-
|
10713 |
-
// EXTERNAL MODULE: external "React"
|
10714 |
-
var external_React_ = __webpack_require__(6);
|
10715 |
-
|
10716 |
-
// CONCATENATED MODULE: ./node_modules/@react-spring/shared/dist/react-spring-shared.esm.js
|
10717 |
-
|
10718 |
-
|
10719 |
-
|
10720 |
-
|
10721 |
-
|
10722 |
-
function noop() {}
|
10723 |
-
const defineHidden = (obj, key, value) => Object.defineProperty(obj, key, {
|
10724 |
-
value,
|
10725 |
-
writable: true,
|
10726 |
-
configurable: true
|
10727 |
-
});
|
10728 |
-
const is = {
|
10729 |
-
arr: Array.isArray,
|
10730 |
-
obj: a => !!a && a.constructor.name === 'Object',
|
10731 |
-
fun: a => typeof a === 'function',
|
10732 |
-
str: a => typeof a === 'string',
|
10733 |
-
num: a => typeof a === 'number',
|
10734 |
-
und: a => a === undefined
|
10735 |
-
};
|
10736 |
-
function isEqual(a, b) {
|
10737 |
-
if (is.arr(a)) {
|
10738 |
-
if (!is.arr(b) || a.length !== b.length) return false;
|
10739 |
-
|
10740 |
-
for (let i = 0; i < a.length; i++) {
|
10741 |
-
if (a[i] !== b[i]) return false;
|
10742 |
-
}
|
10743 |
-
|
10744 |
-
return true;
|
10745 |
-
}
|
10746 |
-
|
10747 |
-
return a === b;
|
10748 |
-
}
|
10749 |
-
const each = (obj, fn) => obj.forEach(fn);
|
10750 |
-
function eachProp(obj, fn, ctx) {
|
10751 |
-
if (is.arr(obj)) {
|
10752 |
-
for (let i = 0; i < obj.length; i++) {
|
10753 |
-
fn.call(ctx, obj[i], `${i}`);
|
10754 |
-
}
|
10755 |
-
|
10756 |
-
return;
|
10757 |
-
}
|
10758 |
-
|
10759 |
-
for (const key in obj) {
|
10760 |
-
if (obj.hasOwnProperty(key)) {
|
10761 |
-
fn.call(ctx, obj[key], key);
|
10762 |
-
}
|
10763 |
-
}
|
10764 |
-
}
|
10765 |
-
const toArray = a => is.und(a) ? [] : is.arr(a) ? a : [a];
|
10766 |
-
function flush(queue, iterator) {
|
10767 |
-
if (queue.size) {
|
10768 |
-
const items = Array.from(queue);
|
10769 |
-
queue.clear();
|
10770 |
-
each(items, iterator);
|
10771 |
-
}
|
10772 |
-
}
|
10773 |
-
const flushCalls = (queue, ...args) => flush(queue, fn => fn(...args));
|
10774 |
-
const isSSR = () => typeof window === 'undefined' || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
|
10775 |
-
|
10776 |
-
let createStringInterpolator$1;
|
10777 |
-
let to;
|
10778 |
-
let colors$1 = null;
|
10779 |
-
let skipAnimation = false;
|
10780 |
-
let willAdvance = noop;
|
10781 |
-
const react_spring_shared_esm_assign = globals => {
|
10782 |
-
if (globals.to) to = globals.to;
|
10783 |
-
if (globals.now) raf.now = globals.now;
|
10784 |
-
if (globals.colors !== undefined) colors$1 = globals.colors;
|
10785 |
-
if (globals.skipAnimation != null) skipAnimation = globals.skipAnimation;
|
10786 |
-
if (globals.createStringInterpolator) createStringInterpolator$1 = globals.createStringInterpolator;
|
10787 |
-
if (globals.requestAnimationFrame) raf.use(globals.requestAnimationFrame);
|
10788 |
-
if (globals.batchedUpdates) raf.batchedUpdates = globals.batchedUpdates;
|
10789 |
-
if (globals.willAdvance) willAdvance = globals.willAdvance;
|
10790 |
-
if (globals.frameLoop) raf.frameLoop = globals.frameLoop;
|
10791 |
-
};
|
10792 |
-
|
10793 |
-
var react_spring_shared_esm_globals = /*#__PURE__*/Object.freeze({
|
10794 |
-
__proto__: null,
|
10795 |
-
get createStringInterpolator () { return createStringInterpolator$1; },
|
10796 |
-
get to () { return to; },
|
10797 |
-
get colors () { return colors$1; },
|
10798 |
-
get skipAnimation () { return skipAnimation; },
|
10799 |
-
get willAdvance () { return willAdvance; },
|
10800 |
-
assign: react_spring_shared_esm_assign
|
10801 |
-
});
|
10802 |
-
|
10803 |
-
const startQueue = new Set();
|
10804 |
-
let currentFrame = [];
|
10805 |
-
let prevFrame = [];
|
10806 |
-
let priority = 0;
|
10807 |
-
const frameLoop = {
|
10808 |
-
get idle() {
|
10809 |
-
return !startQueue.size && !currentFrame.length;
|
10810 |
-
},
|
10811 |
-
|
10812 |
-
start(animation) {
|
10813 |
-
if (priority > animation.priority) {
|
10814 |
-
startQueue.add(animation);
|
10815 |
-
raf.onStart(flushStartQueue);
|
10816 |
-
} else {
|
10817 |
-
startSafely(animation);
|
10818 |
-
raf(advance);
|
10819 |
-
}
|
10820 |
-
},
|
10821 |
-
|
10822 |
-
advance,
|
10823 |
-
|
10824 |
-
sort(animation) {
|
10825 |
-
if (priority) {
|
10826 |
-
raf.onFrame(() => frameLoop.sort(animation));
|
10827 |
-
} else {
|
10828 |
-
const prevIndex = currentFrame.indexOf(animation);
|
10829 |
-
|
10830 |
-
if (~prevIndex) {
|
10831 |
-
currentFrame.splice(prevIndex, 1);
|
10832 |
-
startUnsafely(animation);
|
10833 |
-
}
|
10834 |
-
}
|
10835 |
-
},
|
10836 |
-
|
10837 |
-
clear() {
|
10838 |
-
currentFrame = [];
|
10839 |
-
startQueue.clear();
|
10840 |
-
}
|
10841 |
-
|
10842 |
-
};
|
10843 |
-
|
10844 |
-
function flushStartQueue() {
|
10845 |
-
startQueue.forEach(startSafely);
|
10846 |
-
startQueue.clear();
|
10847 |
-
raf(advance);
|
10848 |
-
}
|
10849 |
-
|
10850 |
-
function startSafely(animation) {
|
10851 |
-
if (!currentFrame.includes(animation)) startUnsafely(animation);
|
10852 |
-
}
|
10853 |
-
|
10854 |
-
function startUnsafely(animation) {
|
10855 |
-
currentFrame.splice(findIndex(currentFrame, other => other.priority > animation.priority), 0, animation);
|
10856 |
-
}
|
10857 |
-
|
10858 |
-
function advance(dt) {
|
10859 |
-
const nextFrame = prevFrame;
|
10860 |
-
|
10861 |
-
for (let i = 0; i < currentFrame.length; i++) {
|
10862 |
-
const animation = currentFrame[i];
|
10863 |
-
priority = animation.priority;
|
10864 |
-
|
10865 |
-
if (!animation.idle) {
|
10866 |
-
willAdvance(animation);
|
10867 |
-
animation.advance(dt);
|
10868 |
-
|
10869 |
-
if (!animation.idle) {
|
10870 |
-
nextFrame.push(animation);
|
10871 |
-
}
|
10872 |
-
}
|
10873 |
-
}
|
10874 |
-
|
10875 |
-
priority = 0;
|
10876 |
-
prevFrame = currentFrame;
|
10877 |
-
prevFrame.length = 0;
|
10878 |
-
currentFrame = nextFrame;
|
10879 |
-
return currentFrame.length > 0;
|
10880 |
-
}
|
10881 |
-
|
10882 |
-
function findIndex(arr, test) {
|
10883 |
-
const index = arr.findIndex(test);
|
10884 |
-
return index < 0 ? arr.length : index;
|
10885 |
-
}
|
10886 |
-
|
10887 |
-
const colors = {
|
10888 |
-
transparent: 0x00000000,
|
10889 |
-
aliceblue: 0xf0f8ffff,
|
10890 |
-
antiquewhite: 0xfaebd7ff,
|
10891 |
-
aqua: 0x00ffffff,
|
10892 |
-
aquamarine: 0x7fffd4ff,
|
10893 |
-
azure: 0xf0ffffff,
|
10894 |
-
beige: 0xf5f5dcff,
|
10895 |
-
bisque: 0xffe4c4ff,
|
10896 |
-
black: 0x000000ff,
|
10897 |
-
blanchedalmond: 0xffebcdff,
|
10898 |
-
blue: 0x0000ffff,
|
10899 |
-
blueviolet: 0x8a2be2ff,
|
10900 |
-
brown: 0xa52a2aff,
|
10901 |
-
burlywood: 0xdeb887ff,
|
10902 |
-
burntsienna: 0xea7e5dff,
|
10903 |
-
cadetblue: 0x5f9ea0ff,
|
10904 |
-
chartreuse: 0x7fff00ff,
|
10905 |
-
chocolate: 0xd2691eff,
|
10906 |
-
coral: 0xff7f50ff,
|
10907 |
-
cornflowerblue: 0x6495edff,
|
10908 |
-
cornsilk: 0xfff8dcff,
|
10909 |
-
crimson: 0xdc143cff,
|
10910 |
-
cyan: 0x00ffffff,
|
10911 |
-
darkblue: 0x00008bff,
|
10912 |
-
darkcyan: 0x008b8bff,
|
10913 |
-
darkgoldenrod: 0xb8860bff,
|
10914 |
-
darkgray: 0xa9a9a9ff,
|
10915 |
-
darkgreen: 0x006400ff,
|
10916 |
-
darkgrey: 0xa9a9a9ff,
|
10917 |
-
darkkhaki: 0xbdb76bff,
|
10918 |
-
darkmagenta: 0x8b008bff,
|
10919 |
-
darkolivegreen: 0x556b2fff,
|
10920 |
-
darkorange: 0xff8c00ff,
|
10921 |
-
darkorchid: 0x9932ccff,
|
10922 |
-
darkred: 0x8b0000ff,
|
10923 |
-
darksalmon: 0xe9967aff,
|
10924 |
-
darkseagreen: 0x8fbc8fff,
|
10925 |
-
darkslateblue: 0x483d8bff,
|
10926 |
-
darkslategray: 0x2f4f4fff,
|
10927 |
-
darkslategrey: 0x2f4f4fff,
|
10928 |
-
darkturquoise: 0x00ced1ff,
|
10929 |
-
darkviolet: 0x9400d3ff,
|
10930 |
-
deeppink: 0xff1493ff,
|
10931 |
-
deepskyblue: 0x00bfffff,
|
10932 |
-
dimgray: 0x696969ff,
|
10933 |
-
dimgrey: 0x696969ff,
|
10934 |
-
dodgerblue: 0x1e90ffff,
|
10935 |
-
firebrick: 0xb22222ff,
|
10936 |
-
floralwhite: 0xfffaf0ff,
|
10937 |
-
forestgreen: 0x228b22ff,
|
10938 |
-
fuchsia: 0xff00ffff,
|
10939 |
-
gainsboro: 0xdcdcdcff,
|
10940 |
-
ghostwhite: 0xf8f8ffff,
|
10941 |
-
gold: 0xffd700ff,
|
10942 |
-
goldenrod: 0xdaa520ff,
|
10943 |
-
gray: 0x808080ff,
|
10944 |
-
green: 0x008000ff,
|
10945 |
-
greenyellow: 0xadff2fff,
|
10946 |
-
grey: 0x808080ff,
|
10947 |
-
honeydew: 0xf0fff0ff,
|
10948 |
-
hotpink: 0xff69b4ff,
|
10949 |
-
indianred: 0xcd5c5cff,
|
10950 |
-
indigo: 0x4b0082ff,
|
10951 |
-
ivory: 0xfffff0ff,
|
10952 |
-
khaki: 0xf0e68cff,
|
10953 |
-
lavender: 0xe6e6faff,
|
10954 |
-
lavenderblush: 0xfff0f5ff,
|
10955 |
-
lawngreen: 0x7cfc00ff,
|
10956 |
-
lemonchiffon: 0xfffacdff,
|
10957 |
-
lightblue: 0xadd8e6ff,
|
10958 |
-
lightcoral: 0xf08080ff,
|
10959 |
-
lightcyan: 0xe0ffffff,
|
10960 |
-
lightgoldenrodyellow: 0xfafad2ff,
|
10961 |
-
lightgray: 0xd3d3d3ff,
|
10962 |
-
lightgreen: 0x90ee90ff,
|
10963 |
-
lightgrey: 0xd3d3d3ff,
|
10964 |
-
lightpink: 0xffb6c1ff,
|
10965 |
-
lightsalmon: 0xffa07aff,
|
10966 |
-
lightseagreen: 0x20b2aaff,
|
10967 |
-
lightskyblue: 0x87cefaff,
|
10968 |
-
lightslategray: 0x778899ff,
|
10969 |
-
lightslategrey: 0x778899ff,
|
10970 |
-
lightsteelblue: 0xb0c4deff,
|
10971 |
-
lightyellow: 0xffffe0ff,
|
10972 |
-
lime: 0x00ff00ff,
|
10973 |
-
limegreen: 0x32cd32ff,
|
10974 |
-
linen: 0xfaf0e6ff,
|
10975 |
-
magenta: 0xff00ffff,
|
10976 |
-
maroon: 0x800000ff,
|
10977 |
-
mediumaquamarine: 0x66cdaaff,
|
10978 |
-
mediumblue: 0x0000cdff,
|
10979 |
-
mediumorchid: 0xba55d3ff,
|
10980 |
-
mediumpurple: 0x9370dbff,
|
10981 |
-
mediumseagreen: 0x3cb371ff,
|
10982 |
-
mediumslateblue: 0x7b68eeff,
|
10983 |
-
mediumspringgreen: 0x00fa9aff,
|
10984 |
-
mediumturquoise: 0x48d1ccff,
|
10985 |
-
mediumvioletred: 0xc71585ff,
|
10986 |
-
midnightblue: 0x191970ff,
|
10987 |
-
mintcream: 0xf5fffaff,
|
10988 |
-
mistyrose: 0xffe4e1ff,
|
10989 |
-
moccasin: 0xffe4b5ff,
|
10990 |
-
navajowhite: 0xffdeadff,
|
10991 |
-
navy: 0x000080ff,
|
10992 |
-
oldlace: 0xfdf5e6ff,
|
10993 |
-
olive: 0x808000ff,
|
10994 |
-
olivedrab: 0x6b8e23ff,
|
10995 |
-
orange: 0xffa500ff,
|
10996 |
-
orangered: 0xff4500ff,
|
10997 |
-
orchid: 0xda70d6ff,
|
10998 |
-
palegoldenrod: 0xeee8aaff,
|
10999 |
-
palegreen: 0x98fb98ff,
|
11000 |
-
paleturquoise: 0xafeeeeff,
|
11001 |
-
palevioletred: 0xdb7093ff,
|
11002 |
-
papayawhip: 0xffefd5ff,
|
11003 |
-
peachpuff: 0xffdab9ff,
|
11004 |
-
peru: 0xcd853fff,
|
11005 |
-
pink: 0xffc0cbff,
|
11006 |
-
plum: 0xdda0ddff,
|
11007 |
-
powderblue: 0xb0e0e6ff,
|
11008 |
-
purple: 0x800080ff,
|
11009 |
-
rebeccapurple: 0x663399ff,
|
11010 |
-
red: 0xff0000ff,
|
11011 |
-
rosybrown: 0xbc8f8fff,
|
11012 |
-
royalblue: 0x4169e1ff,
|
11013 |
-
saddlebrown: 0x8b4513ff,
|
11014 |
-
salmon: 0xfa8072ff,
|
11015 |
-
sandybrown: 0xf4a460ff,
|
11016 |
-
seagreen: 0x2e8b57ff,
|
11017 |
-
seashell: 0xfff5eeff,
|
11018 |
-
sienna: 0xa0522dff,
|
11019 |
-
silver: 0xc0c0c0ff,
|
11020 |
-
skyblue: 0x87ceebff,
|
11021 |
-
slateblue: 0x6a5acdff,
|
11022 |
-
slategray: 0x708090ff,
|
11023 |
-
slategrey: 0x708090ff,
|
11024 |
-
snow: 0xfffafaff,
|
11025 |
-
springgreen: 0x00ff7fff,
|
11026 |
-
steelblue: 0x4682b4ff,
|
11027 |
-
tan: 0xd2b48cff,
|
11028 |
-
teal: 0x008080ff,
|
11029 |
-
thistle: 0xd8bfd8ff,
|
11030 |
-
tomato: 0xff6347ff,
|
11031 |
-
turquoise: 0x40e0d0ff,
|
11032 |
-
violet: 0xee82eeff,
|
11033 |
-
wheat: 0xf5deb3ff,
|
11034 |
-
white: 0xffffffff,
|
11035 |
-
whitesmoke: 0xf5f5f5ff,
|
11036 |
-
yellow: 0xffff00ff,
|
11037 |
-
yellowgreen: 0x9acd32ff
|
11038 |
-
};
|
11039 |
-
|
11040 |
-
const NUMBER = '[-+]?\\d*\\.?\\d+';
|
11041 |
-
const PERCENTAGE = NUMBER + '%';
|
11042 |
-
|
11043 |
-
function call(...parts) {
|
11044 |
-
return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)';
|
11045 |
-
}
|
11046 |
-
|
11047 |
-
const rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER));
|
11048 |
-
const rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
11049 |
-
const hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE));
|
11050 |
-
const hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
|
11051 |
-
const hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
11052 |
-
const hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
11053 |
-
const hex6 = /^#([0-9a-fA-F]{6})$/;
|
11054 |
-
const hex8 = /^#([0-9a-fA-F]{8})$/;
|
11055 |
-
|
11056 |
-
function normalizeColor(color) {
|
11057 |
-
let match;
|
11058 |
-
|
11059 |
-
if (typeof color === 'number') {
|
11060 |
-
return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;
|
11061 |
-
}
|
11062 |
-
|
11063 |
-
if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;
|
11064 |
-
|
11065 |
-
if (colors$1 && colors$1[color] !== undefined) {
|
11066 |
-
return colors$1[color];
|
11067 |
-
}
|
11068 |
-
|
11069 |
-
if (match = rgb.exec(color)) {
|
11070 |
-
return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 0x000000ff) >>> 0;
|
11071 |
-
}
|
11072 |
-
|
11073 |
-
if (match = rgba.exec(color)) {
|
11074 |
-
return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;
|
11075 |
-
}
|
11076 |
-
|
11077 |
-
if (match = hex3.exec(color)) {
|
11078 |
-
return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + 'ff', 16) >>> 0;
|
11079 |
-
}
|
11080 |
-
|
11081 |
-
if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;
|
11082 |
-
|
11083 |
-
if (match = hex4.exec(color)) {
|
11084 |
-
return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;
|
11085 |
-
}
|
11086 |
-
|
11087 |
-
if (match = hsl.exec(color)) {
|
11088 |
-
return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 0x000000ff) >>> 0;
|
11089 |
-
}
|
11090 |
-
|
11091 |
-
if (match = hsla.exec(color)) {
|
11092 |
-
return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
|
11093 |
-
}
|
11094 |
-
|
11095 |
-
return null;
|
11096 |
-
}
|
11097 |
-
|
11098 |
-
function hue2rgb(p, q, t) {
|
11099 |
-
if (t < 0) t += 1;
|
11100 |
-
if (t > 1) t -= 1;
|
11101 |
-
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
11102 |
-
if (t < 1 / 2) return q;
|
11103 |
-
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
11104 |
-
return p;
|
11105 |
-
}
|
11106 |
-
|
11107 |
-
function hslToRgb(h, s, l) {
|
11108 |
-
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
11109 |
-
const p = 2 * l - q;
|
11110 |
-
const r = hue2rgb(p, q, h + 1 / 3);
|
11111 |
-
const g = hue2rgb(p, q, h);
|
11112 |
-
const b = hue2rgb(p, q, h - 1 / 3);
|
11113 |
-
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
|
11114 |
-
}
|
11115 |
-
|
11116 |
-
function parse255(str) {
|
11117 |
-
const int = parseInt(str, 10);
|
11118 |
-
if (int < 0) return 0;
|
11119 |
-
if (int > 255) return 255;
|
11120 |
-
return int;
|
11121 |
-
}
|
11122 |
-
|
11123 |
-
function parse360(str) {
|
11124 |
-
const int = parseFloat(str);
|
11125 |
-
return (int % 360 + 360) % 360 / 360;
|
11126 |
-
}
|
11127 |
-
|
11128 |
-
function parse1(str) {
|
11129 |
-
const num = parseFloat(str);
|
11130 |
-
if (num < 0) return 0;
|
11131 |
-
if (num > 1) return 255;
|
11132 |
-
return Math.round(num * 255);
|
11133 |
-
}
|
11134 |
-
|
11135 |
-
function parsePercentage(str) {
|
11136 |
-
const int = parseFloat(str);
|
11137 |
-
if (int < 0) return 0;
|
11138 |
-
if (int > 100) return 1;
|
11139 |
-
return int / 100;
|
11140 |
-
}
|
11141 |
-
|
11142 |
-
function colorToRgba(input) {
|
11143 |
-
let int32Color = normalizeColor(input);
|
11144 |
-
if (int32Color === null) return input;
|
11145 |
-
int32Color = int32Color || 0;
|
11146 |
-
let r = (int32Color & 0xff000000) >>> 24;
|
11147 |
-
let g = (int32Color & 0x00ff0000) >>> 16;
|
11148 |
-
let b = (int32Color & 0x0000ff00) >>> 8;
|
11149 |
-
let a = (int32Color & 0x000000ff) / 255;
|
11150 |
-
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
11151 |
-
}
|
11152 |
-
|
11153 |
-
const createInterpolator = (range, output, extrapolate) => {
|
11154 |
-
if (is.fun(range)) {
|
11155 |
-
return range;
|
11156 |
-
}
|
11157 |
-
|
11158 |
-
if (is.arr(range)) {
|
11159 |
-
return createInterpolator({
|
11160 |
-
range,
|
11161 |
-
output: output,
|
11162 |
-
extrapolate
|
11163 |
-
});
|
11164 |
-
}
|
11165 |
-
|
11166 |
-
if (is.str(range.output[0])) {
|
11167 |
-
return createStringInterpolator$1(range);
|
11168 |
-
}
|
11169 |
-
|
11170 |
-
const config = range;
|
11171 |
-
const outputRange = config.output;
|
11172 |
-
const inputRange = config.range || [0, 1];
|
11173 |
-
const extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
|
11174 |
-
const extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
|
11175 |
-
|
11176 |
-
const easing = config.easing || (t => t);
|
11177 |
-
|
11178 |
-
return input => {
|
11179 |
-
const range = findRange(input, inputRange);
|
11180 |
-
return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
|
11181 |
-
};
|
11182 |
-
};
|
11183 |
-
|
11184 |
-
function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
|
11185 |
-
let result = map ? map(input) : input;
|
11186 |
-
|
11187 |
-
if (result < inputMin) {
|
11188 |
-
if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
|
11189 |
-
}
|
11190 |
|
11191 |
-
|
11192 |
-
|
|
|
|
|
|
|
|
|
|
|
11193 |
}
|
11194 |
|
11195 |
-
|
11196 |
-
if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax;
|
11197 |
-
if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin);
|
11198 |
-
result = easing(result);
|
11199 |
-
if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
|
11200 |
-
return result;
|
11201 |
-
}
|
11202 |
|
11203 |
-
|
11204 |
-
|
|
|
11205 |
|
11206 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
11207 |
}
|
11208 |
|
11209 |
-
|
11210 |
-
|
11211 |
-
|
11212 |
-
|
|
|
11213 |
|
11214 |
-
|
11215 |
-
|
11216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11217 |
}
|
11218 |
-
}
|
11219 |
}
|
11220 |
-
|
11221 |
-
return target;
|
11222 |
};
|
|
|
|
|
11223 |
|
11224 |
-
return _extends.apply(this, arguments);
|
11225 |
-
}
|
11226 |
|
11227 |
-
const $get = Symbol.for('FluidValue.get');
|
11228 |
-
const $observers = Symbol.for('FluidValue.observers');
|
11229 |
|
11230 |
-
|
11231 |
|
11232 |
-
|
|
|
11233 |
|
11234 |
-
|
11235 |
|
11236 |
-
|
11237 |
-
|
11238 |
-
observer.eventObserved(event);
|
11239 |
-
} else {
|
11240 |
-
observer(event);
|
11241 |
-
}
|
11242 |
-
}
|
11243 |
|
11244 |
-
|
11245 |
-
|
|
|
11246 |
|
11247 |
-
|
11248 |
-
|
11249 |
-
callFluidObserver(observer, event);
|
11250 |
-
});
|
11251 |
-
}
|
11252 |
-
}
|
11253 |
|
11254 |
-
|
11255 |
-
|
11256 |
-
this[$get] = void 0;
|
11257 |
-
this[$observers] = void 0;
|
11258 |
|
11259 |
-
|
11260 |
-
|
11261 |
-
}
|
11262 |
|
11263 |
-
|
11264 |
-
|
11265 |
|
11266 |
-
|
|
|
11267 |
|
11268 |
-
|
11269 |
|
11270 |
-
function addFluidObserver(target, observer) {
|
11271 |
-
if (target[$get]) {
|
11272 |
-
let observers = target[$observers];
|
11273 |
|
11274 |
-
|
11275 |
-
|
11276 |
-
|
11277 |
|
11278 |
-
if (!observers.has(observer)) {
|
11279 |
-
observers.add(observer);
|
11280 |
|
11281 |
-
|
11282 |
-
|
11283 |
-
|
11284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11285 |
}
|
11286 |
|
11287 |
-
|
11288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11289 |
|
11290 |
-
function removeFluidObserver(target, observer) {
|
11291 |
-
let observers = target[$observers];
|
11292 |
|
11293 |
-
|
11294 |
-
|
|
|
11295 |
|
11296 |
-
|
11297 |
-
|
11298 |
-
|
11299 |
-
target[$observers] = null;
|
11300 |
-
}
|
11301 |
|
11302 |
-
|
11303 |
-
|
11304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11305 |
}
|
11306 |
-
}
|
11307 |
|
11308 |
-
|
11309 |
-
|
11310 |
-
|
11311 |
-
configurable: true
|
11312 |
-
});
|
11313 |
|
11314 |
-
|
11315 |
-
|
11316 |
-
const unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, 'i');
|
11317 |
-
const rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi;
|
11318 |
-
const cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
|
11319 |
|
11320 |
-
|
11321 |
-
const [token, fallback] = parseCSSVariable(input);
|
11322 |
|
11323 |
-
if (!token || isSSR()) {
|
11324 |
-
return input;
|
11325 |
-
}
|
11326 |
|
11327 |
-
const value = window.getComputedStyle(document.documentElement).getPropertyValue(token);
|
11328 |
|
11329 |
-
|
11330 |
-
|
11331 |
-
|
11332 |
-
const _value = window.getComputedStyle(document.documentElement).getPropertyValue(fallback);
|
11333 |
|
11334 |
-
if (_value) {
|
11335 |
-
return _value;
|
11336 |
-
} else {
|
11337 |
-
return input;
|
11338 |
-
}
|
11339 |
-
} else if (fallback && cssVariableRegex.test(fallback)) {
|
11340 |
-
return variableToRgba(fallback);
|
11341 |
-
} else if (fallback) {
|
11342 |
-
return fallback;
|
11343 |
-
}
|
11344 |
|
11345 |
-
|
11346 |
-
|
|
|
11347 |
|
11348 |
-
const parseCSSVariable = current => {
|
11349 |
-
const match = cssVariableRegex.exec(current);
|
11350 |
-
if (!match) return [,];
|
11351 |
-
const [, token, fallback] = match;
|
11352 |
-
return [token, fallback];
|
11353 |
-
};
|
11354 |
|
11355 |
-
let namedColorRegex;
|
11356 |
|
11357 |
-
const rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`;
|
11358 |
|
11359 |
-
|
11360 |
-
|
11361 |
-
|
11362 |
-
return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba);
|
11363 |
-
});
|
11364 |
-
const keyframes = output.map(value => value.match(numberRegex).map(Number));
|
11365 |
-
const outputRanges = keyframes[0].map((_, i) => keyframes.map(values => {
|
11366 |
-
if (!(i in values)) {
|
11367 |
-
throw Error('The arity of each "output" value must be equal');
|
11368 |
-
}
|
11369 |
|
11370 |
-
|
11371 |
-
|
11372 |
-
|
11373 |
-
|
11374 |
-
|
11375 |
-
|
11376 |
-
|
11377 |
|
11378 |
-
|
11379 |
-
|
11380 |
-
|
|
|
|
|
11381 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11382 |
};
|
|
|
11383 |
|
11384 |
-
const prefix = 'react-spring: ';
|
11385 |
|
11386 |
-
|
11387 |
-
const func = fn;
|
11388 |
-
let called = false;
|
11389 |
|
11390 |
-
|
11391 |
-
|
11392 |
-
}
|
11393 |
|
11394 |
-
|
11395 |
-
if (!called) {
|
11396 |
-
func(...args);
|
11397 |
-
called = true;
|
11398 |
-
}
|
11399 |
-
};
|
11400 |
-
};
|
11401 |
|
11402 |
-
|
11403 |
-
|
11404 |
-
|
11405 |
-
|
11406 |
-
|
11407 |
-
|
11408 |
-
|
11409 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11410 |
|
11411 |
-
function isAnimatedString(value) {
|
11412 |
-
return is.str(value) && (value[0] == '#' || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
|
11413 |
-
}
|
11414 |
|
11415 |
-
const useOnce = effect => Object(external_React_["useEffect"])(effect, emptyDeps);
|
11416 |
-
const emptyDeps = [];
|
11417 |
|
11418 |
-
|
11419 |
-
|
11420 |
-
|
11421 |
-
useOnce(mounted.unmount);
|
11422 |
-
return () => {
|
11423 |
-
if (mounted.current) {
|
11424 |
-
update({});
|
11425 |
-
}
|
11426 |
-
};
|
11427 |
-
}
|
11428 |
|
11429 |
-
function makeMountedRef() {
|
11430 |
-
const mounted = {
|
11431 |
-
current: true,
|
11432 |
-
unmount: () => () => {
|
11433 |
-
mounted.current = false;
|
11434 |
-
}
|
11435 |
-
};
|
11436 |
-
return mounted;
|
11437 |
-
}
|
11438 |
|
11439 |
-
function useMemoOne(getResult, inputs) {
|
11440 |
-
const [initial] = Object(external_React_["useState"])(() => ({
|
11441 |
-
inputs,
|
11442 |
-
result: getResult()
|
11443 |
-
}));
|
11444 |
-
const committed = Object(external_React_["useRef"])();
|
11445 |
-
const prevCache = committed.current;
|
11446 |
-
let cache = prevCache;
|
11447 |
|
11448 |
-
if (cache) {
|
11449 |
-
const useCache = Boolean(inputs && cache.inputs && areInputsEqual(inputs, cache.inputs));
|
11450 |
|
11451 |
-
|
11452 |
-
|
11453 |
-
inputs,
|
11454 |
-
result: getResult()
|
11455 |
-
};
|
11456 |
-
}
|
11457 |
-
} else {
|
11458 |
-
cache = initial;
|
11459 |
-
}
|
11460 |
|
11461 |
-
|
11462 |
-
|
|
|
|
|
|
|
11463 |
|
11464 |
-
|
11465 |
-
|
11466 |
-
|
11467 |
-
}, [cache]);
|
11468 |
-
return cache.result;
|
11469 |
-
}
|
11470 |
|
11471 |
-
|
11472 |
-
|
11473 |
-
|
|
|
11474 |
}
|
11475 |
|
11476 |
-
|
11477 |
-
|
11478 |
-
return false;
|
11479 |
-
}
|
11480 |
}
|
11481 |
|
11482 |
-
|
11483 |
-
}
|
|
|
11484 |
|
11485 |
-
|
11486 |
-
|
11487 |
-
|
11488 |
-
prevRef.current = value;
|
11489 |
-
});
|
11490 |
-
return prevRef.current;
|
11491 |
-
}
|
11492 |
|
11493 |
-
const useLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? external_React_["useLayoutEffect"] : external_React_["useEffect"];
|
11494 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11495 |
|
11496 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11497 |
|
11498 |
/***/ }),
|
11499 |
|
11500 |
-
/***/
|
11501 |
/***/ (function(module, exports) {
|
11502 |
|
11503 |
-
(function() { module.exports = window["
|
11504 |
|
11505 |
/***/ }),
|
11506 |
|
11507 |
-
/***/
|
11508 |
/***/ (function(module, exports, __webpack_require__) {
|
11509 |
|
11510 |
// extracted by mini-css-extract-plugin
|
11511 |
|
11512 |
/***/ }),
|
11513 |
|
11514 |
-
/***/
|
11515 |
-
/***/ (function(module, exports
|
11516 |
|
11517 |
-
|
11518 |
|
11519 |
/***/ }),
|
11520 |
|
11521 |
-
/***/
|
11522 |
/***/ (function(module, exports, __webpack_require__) {
|
11523 |
|
11524 |
// extracted by mini-css-extract-plugin
|
11525 |
|
11526 |
/***/ }),
|
11527 |
|
11528 |
-
/***/
|
11529 |
/***/ (function(module, exports, __webpack_require__) {
|
11530 |
|
11531 |
// extracted by mini-css-extract-plugin
|
11532 |
|
11533 |
/***/ }),
|
11534 |
|
11535 |
-
/***/
|
11536 |
-
/***/ (function(module, exports) {
|
11537 |
-
|
11538 |
-
module.exports = Array.isArray || function (arr) {
|
11539 |
-
return Object.prototype.toString.call(arr) == '[object Array]';
|
11540 |
-
};
|
11541 |
|
|
|
11542 |
|
11543 |
/***/ }),
|
11544 |
|
11545 |
-
/***/
|
11546 |
/***/ (function(module, exports, __webpack_require__) {
|
11547 |
|
11548 |
// extracted by mini-css-extract-plugin
|
11549 |
|
11550 |
/***/ }),
|
11551 |
|
11552 |
-
/***/
|
11553 |
-
/***/ (function(module,
|
11554 |
-
|
11555 |
-
"use strict";
|
11556 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
|
11557 |
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
11558 |
-
if (source == null) return {};
|
11559 |
-
var target = {};
|
11560 |
-
var sourceKeys = Object.keys(source);
|
11561 |
-
var key, i;
|
11562 |
-
|
11563 |
-
for (i = 0; i < sourceKeys.length; i++) {
|
11564 |
-
key = sourceKeys[i];
|
11565 |
-
if (excluded.indexOf(key) >= 0) continue;
|
11566 |
-
target[key] = source[key];
|
11567 |
-
}
|
11568 |
|
11569 |
-
|
11570 |
-
}
|
11571 |
|
11572 |
/***/ }),
|
11573 |
|
11574 |
-
/***/
|
11575 |
/***/ (function(module, exports, __webpack_require__) {
|
11576 |
|
11577 |
-
|
11578 |
-
|
11579 |
|
11580 |
-
|
11581 |
-
var parse = __webpack_require__(63);
|
11582 |
-
var formats = __webpack_require__(39);
|
11583 |
|
11584 |
-
|
11585 |
-
|
11586 |
-
parse: parse,
|
11587 |
-
stringify: stringify
|
11588 |
-
};
|
11589 |
|
|
|
11590 |
|
11591 |
/***/ }),
|
11592 |
|
11593 |
-
/***/
|
11594 |
-
/***/ (function(module,
|
11595 |
-
|
11596 |
-
"use strict";
|
11597 |
-
/* unused harmony export Animated */
|
11598 |
-
/* unused harmony export AnimatedArray */
|
11599 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AnimatedObject; });
|
11600 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return AnimatedString; });
|
11601 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return AnimatedValue; });
|
11602 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return createHost; });
|
11603 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getAnimated; });
|
11604 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getAnimatedType; });
|
11605 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getPayload; });
|
11606 |
-
/* unused harmony export isAnimated */
|
11607 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setAnimated; });
|
11608 |
-
/* harmony import */ var _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
11609 |
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
|
11610 |
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
11611 |
-
|
11612 |
-
|
11613 |
-
|
11614 |
-
|
11615 |
-
const $node = Symbol.for('Animated:node');
|
11616 |
-
const isAnimated = value => !!value && value[$node] === value;
|
11617 |
-
const getAnimated = owner => owner && owner[$node];
|
11618 |
-
const setAnimated = (owner, node) => Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* defineHidden */ "h"])(owner, $node, node);
|
11619 |
-
const getPayload = owner => owner && owner[$node] && owner[$node].getPayload();
|
11620 |
-
class Animated {
|
11621 |
-
constructor() {
|
11622 |
-
this.payload = void 0;
|
11623 |
-
setAnimated(this, this);
|
11624 |
-
}
|
11625 |
|
11626 |
-
|
11627 |
-
return this.payload || [];
|
11628 |
-
}
|
11629 |
|
11630 |
-
}
|
11631 |
|
11632 |
-
|
11633 |
-
|
11634 |
-
super();
|
11635 |
-
this.done = true;
|
11636 |
-
this.elapsedTime = void 0;
|
11637 |
-
this.lastPosition = void 0;
|
11638 |
-
this.lastVelocity = void 0;
|
11639 |
-
this.v0 = void 0;
|
11640 |
-
this.durationProgress = 0;
|
11641 |
-
this._value = _value;
|
11642 |
|
11643 |
-
|
11644 |
-
this.lastPosition = this._value;
|
11645 |
-
}
|
11646 |
-
}
|
11647 |
|
11648 |
-
|
11649 |
-
return new AnimatedValue(value);
|
11650 |
-
}
|
11651 |
|
11652 |
-
|
11653 |
-
|
11654 |
-
}
|
11655 |
|
11656 |
-
|
11657 |
-
|
11658 |
-
|
|
|
|
|
11659 |
|
11660 |
-
setValue(value, step) {
|
11661 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].num(value)) {
|
11662 |
-
this.lastPosition = value;
|
11663 |
|
11664 |
-
|
11665 |
-
|
|
|
11666 |
|
11667 |
-
|
11668 |
-
|
11669 |
-
|
11670 |
-
|
11671 |
-
|
|
|
|
|
|
|
11672 |
|
11673 |
-
|
11674 |
-
return false;
|
11675 |
-
}
|
11676 |
|
11677 |
-
|
11678 |
-
|
11679 |
-
}
|
11680 |
|
11681 |
-
|
11682 |
-
|
11683 |
-
|
11684 |
-
|
11685 |
-
|
11686 |
|
11687 |
-
|
11688 |
-
|
11689 |
-
|
11690 |
-
|
11691 |
-
if (done) this.lastVelocity = null;
|
11692 |
-
this.v0 = null;
|
11693 |
-
}
|
11694 |
}
|
11695 |
|
|
|
11696 |
}
|
11697 |
|
11698 |
-
|
11699 |
-
|
11700 |
-
super(0);
|
11701 |
-
this._string = null;
|
11702 |
-
this._toString = void 0;
|
11703 |
-
this._toString = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* createInterpolator */ "f"])({
|
11704 |
-
output: [value, value]
|
11705 |
-
});
|
11706 |
-
}
|
11707 |
-
|
11708 |
-
static create(value) {
|
11709 |
-
return new AnimatedString(value);
|
11710 |
-
}
|
11711 |
-
|
11712 |
-
getValue() {
|
11713 |
-
let value = this._string;
|
11714 |
-
return value == null ? this._string = this._toString(this._value) : value;
|
11715 |
-
}
|
11716 |
-
|
11717 |
-
setValue(value) {
|
11718 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].str(value)) {
|
11719 |
-
if (value == this._string) {
|
11720 |
-
return false;
|
11721 |
-
}
|
11722 |
-
|
11723 |
-
this._string = value;
|
11724 |
-
this._value = 1;
|
11725 |
-
} else if (super.setValue(value)) {
|
11726 |
-
this._string = null;
|
11727 |
-
} else {
|
11728 |
-
return false;
|
11729 |
-
}
|
11730 |
|
11731 |
-
|
11732 |
-
}
|
11733 |
|
11734 |
-
|
11735 |
-
|
11736 |
-
this._toString = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* createInterpolator */ "f"])({
|
11737 |
-
output: [this.getValue(), goal]
|
11738 |
-
});
|
11739 |
-
}
|
11740 |
|
11741 |
-
|
11742 |
-
super.reset();
|
11743 |
-
}
|
11744 |
|
|
|
|
|
|
|
|
|
11745 |
}
|
11746 |
|
11747 |
-
|
11748 |
-
|
11749 |
-
};
|
11750 |
-
|
11751 |
-
class AnimatedObject extends Animated {
|
11752 |
-
constructor(source) {
|
11753 |
-
super();
|
11754 |
-
this.source = source;
|
11755 |
-
this.setValue(source);
|
11756 |
-
}
|
11757 |
-
|
11758 |
-
getValue(animated) {
|
11759 |
-
const values = {};
|
11760 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* eachProp */ "l"])(this.source, (source, key) => {
|
11761 |
-
if (isAnimated(source)) {
|
11762 |
-
values[key] = source.getValue(animated);
|
11763 |
-
} else if (Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* hasFluidValue */ "r"])(source)) {
|
11764 |
-
values[key] = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* getFluidValue */ "q"])(source);
|
11765 |
-
} else if (!animated) {
|
11766 |
-
values[key] = source;
|
11767 |
-
}
|
11768 |
-
});
|
11769 |
-
return values;
|
11770 |
-
}
|
11771 |
-
|
11772 |
-
setValue(source) {
|
11773 |
-
this.source = source;
|
11774 |
-
this.payload = this._makePayload(source);
|
11775 |
-
}
|
11776 |
-
|
11777 |
-
reset() {
|
11778 |
-
if (this.payload) {
|
11779 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(this.payload, node => node.reset());
|
11780 |
-
}
|
11781 |
-
}
|
11782 |
|
11783 |
-
|
11784 |
-
if (source) {
|
11785 |
-
const payload = new Set();
|
11786 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* eachProp */ "l"])(source, this._addToPayload, payload);
|
11787 |
-
return Array.from(payload);
|
11788 |
-
}
|
11789 |
-
}
|
11790 |
-
|
11791 |
-
_addToPayload(source) {
|
11792 |
-
if (TreeContext.dependencies && Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* hasFluidValue */ "r"])(source)) {
|
11793 |
-
TreeContext.dependencies.add(source);
|
11794 |
-
}
|
11795 |
|
11796 |
-
|
|
|
11797 |
|
11798 |
-
|
11799 |
-
|
11800 |
-
|
11801 |
-
|
|
|
11802 |
|
|
|
|
|
11803 |
}
|
11804 |
|
11805 |
-
|
11806 |
-
|
11807 |
-
super(source);
|
11808 |
-
}
|
11809 |
-
|
11810 |
-
static create(source) {
|
11811 |
-
return new AnimatedArray(source);
|
11812 |
-
}
|
11813 |
-
|
11814 |
-
getValue() {
|
11815 |
-
return this.source.map(node => node.getValue());
|
11816 |
-
}
|
11817 |
|
11818 |
-
|
11819 |
-
const payload = this.getPayload();
|
11820 |
|
11821 |
-
|
11822 |
-
|
11823 |
-
}
|
11824 |
|
11825 |
-
|
11826 |
-
|
|
|
11827 |
}
|
11828 |
|
|
|
11829 |
}
|
11830 |
|
11831 |
-
|
11832 |
-
|
11833 |
-
return nodeType.create(value);
|
11834 |
-
}
|
11835 |
-
|
11836 |
-
function getAnimatedType(value) {
|
11837 |
-
const parentNode = getAnimated(value);
|
11838 |
-
return parentNode ? parentNode.constructor : _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].arr(value) ? AnimatedArray : Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* isAnimatedString */ "t"])(value) ? AnimatedString : AnimatedValue;
|
11839 |
-
}
|
11840 |
-
|
11841 |
-
function _extends() {
|
11842 |
-
_extends = Object.assign || function (target) {
|
11843 |
-
for (var i = 1; i < arguments.length; i++) {
|
11844 |
-
var source = arguments[i];
|
11845 |
-
|
11846 |
-
for (var key in source) {
|
11847 |
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
11848 |
-
target[key] = source[key];
|
11849 |
-
}
|
11850 |
-
}
|
11851 |
-
}
|
11852 |
-
|
11853 |
-
return target;
|
11854 |
-
};
|
11855 |
-
|
11856 |
-
return _extends.apply(this, arguments);
|
11857 |
-
}
|
11858 |
-
|
11859 |
-
const withAnimated = (Component, host) => {
|
11860 |
-
const hasInstance = !_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].fun(Component) || Component.prototype && Component.prototype.isReactComponent;
|
11861 |
-
return Object(react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])((givenProps, givenRef) => {
|
11862 |
-
const instanceRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(null);
|
11863 |
-
const ref = hasInstance && Object(react__WEBPACK_IMPORTED_MODULE_1__["useCallback"])(value => {
|
11864 |
-
instanceRef.current = updateRef(givenRef, value);
|
11865 |
-
}, [givenRef]);
|
11866 |
-
const [props, deps] = getAnimatedState(givenProps, host);
|
11867 |
-
const forceUpdate = Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useForceUpdate */ "z"])();
|
11868 |
|
11869 |
-
|
11870 |
-
const instance = instanceRef.current;
|
11871 |
|
11872 |
-
|
11873 |
-
|
11874 |
-
}
|
11875 |
|
11876 |
-
|
11877 |
|
11878 |
-
|
11879 |
-
forceUpdate();
|
11880 |
-
}
|
11881 |
-
};
|
11882 |
|
11883 |
-
|
11884 |
-
|
11885 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useLayoutEffect */ "A"])(() => {
|
11886 |
-
const lastObserver = observerRef.current;
|
11887 |
-
observerRef.current = observer;
|
11888 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(deps, dep => Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* addFluidObserver */ "c"])(dep, observer));
|
11889 |
|
11890 |
-
|
11891 |
-
|
11892 |
-
_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* raf */ "w"].cancel(lastObserver.update);
|
11893 |
-
}
|
11894 |
-
});
|
11895 |
-
Object(react__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(callback, []);
|
11896 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* useOnce */ "C"])(() => () => {
|
11897 |
-
const observer = observerRef.current;
|
11898 |
-
Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* each */ "k"])(observer.deps, dep => Object(_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* removeFluidObserver */ "x"])(dep, observer));
|
11899 |
-
});
|
11900 |
-
const usedProps = host.getComponentProps(props.getValue());
|
11901 |
-
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](Component, _extends({}, usedProps, {
|
11902 |
-
ref: ref
|
11903 |
-
}));
|
11904 |
-
});
|
11905 |
};
|
11906 |
|
11907 |
-
class PropsObserver {
|
11908 |
-
constructor(update, deps) {
|
11909 |
-
this.update = update;
|
11910 |
-
this.deps = deps;
|
11911 |
-
}
|
11912 |
|
11913 |
-
|
11914 |
-
|
11915 |
-
|
11916 |
-
|
11917 |
-
}
|
11918 |
|
11919 |
-
|
11920 |
|
11921 |
-
|
11922 |
-
const dependencies = new Set();
|
11923 |
-
TreeContext.dependencies = dependencies;
|
11924 |
-
if (props.style) props = _extends({}, props, {
|
11925 |
-
style: host.createAnimatedStyle(props.style)
|
11926 |
-
});
|
11927 |
-
props = new AnimatedObject(props);
|
11928 |
-
TreeContext.dependencies = null;
|
11929 |
-
return [props, dependencies];
|
11930 |
-
}
|
11931 |
|
11932 |
-
|
11933 |
-
|
11934 |
-
if (_react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].fun(ref)) ref(value);else ref.current = value;
|
11935 |
-
}
|
11936 |
|
11937 |
-
|
11938 |
-
}
|
11939 |
|
11940 |
-
|
11941 |
-
const createHost = (components, {
|
11942 |
-
applyAnimatedValues: _applyAnimatedValues = () => false,
|
11943 |
-
createAnimatedStyle: _createAnimatedStyle = style => new AnimatedObject(style),
|
11944 |
-
getComponentProps: _getComponentProps = props => props
|
11945 |
-
} = {}) => {
|
11946 |
-
const hostConfig = {
|
11947 |
-
applyAnimatedValues: _applyAnimatedValues,
|
11948 |
-
createAnimatedStyle: _createAnimatedStyle,
|
11949 |
-
getComponentProps: _getComponentProps
|
11950 |
-
};
|
11951 |
|
11952 |
-
|
11953 |
-
|
11954 |
|
11955 |
-
|
11956 |
-
Component = animated[Component] || (animated[Component] = withAnimated(Component, hostConfig));
|
11957 |
-
} else {
|
11958 |
-
Component = Component[cacheKey] || (Component[cacheKey] = withAnimated(Component, hostConfig));
|
11959 |
-
}
|
11960 |
|
11961 |
-
|
11962 |
-
return Component;
|
11963 |
-
};
|
11964 |
|
11965 |
-
|
11966 |
-
|
11967 |
-
key = getDisplayName(Component);
|
11968 |
-
}
|
11969 |
|
11970 |
-
|
11971 |
-
});
|
11972 |
-
return {
|
11973 |
-
animated
|
11974 |
-
};
|
11975 |
-
};
|
11976 |
|
11977 |
-
const getDisplayName = arg => _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].str(arg) ? arg : arg && _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].str(arg.displayName) ? arg.displayName : _react_spring_shared__WEBPACK_IMPORTED_MODULE_0__[/* is */ "s"].fun(arg) && arg.name || null;
|
11978 |
|
|
|
|
|
|
|
11979 |
|
|
|
|
|
|
|
|
|
|
|
11980 |
|
11981 |
|
11982 |
/***/ }),
|
11983 |
|
11984 |
-
/***/
|
11985 |
/***/ (function(module, exports) {
|
11986 |
|
11987 |
-
|
|
|
|
|
|
|
11988 |
|
11989 |
-
|
|
|
|
|
|
|
|
|
|
|
11990 |
|
11991 |
-
|
11992 |
-
|
11993 |
|
11994 |
-
|
|
|
|
|
|
|
|
|
|
|
11995 |
|
11996 |
/***/ }),
|
11997 |
|
@@ -12033,31 +9911,127 @@ module.exports = {
|
|
12033 |
|
12034 |
/***/ }),
|
12035 |
|
12036 |
-
/***/
|
12037 |
-
/***/ (function(module,
|
12038 |
|
12039 |
-
|
12040 |
-
|
12041 |
-
|
12042 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12043 |
|
12044 |
-
|
12045 |
-
|
12046 |
-
|
12047 |
-
|
12048 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12049 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12050 |
|
12051 |
-
|
12052 |
-
|
12053 |
-
|
12054 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12055 |
|
12056 |
-
|
|
|
|
|
|
|
12057 |
|
12058 |
/***/ }),
|
12059 |
|
12060 |
-
/***/
|
12061 |
/***/ (function(module, exports, __webpack_require__) {
|
12062 |
|
12063 |
"use strict";
|
@@ -12316,101 +10290,56 @@ module.exports = {
|
|
12316 |
|
12317 |
/***/ }),
|
12318 |
|
12319 |
-
/***/
|
12320 |
-
/***/ (function(module,
|
12321 |
-
|
12322 |
-
"use strict";
|
12323 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return invariant; });
|
12324 |
-
var isProduction = "production" === 'production';
|
12325 |
-
var prefix = 'Invariant failed';
|
12326 |
-
function invariant(condition, message) {
|
12327 |
-
if (condition) {
|
12328 |
-
return;
|
12329 |
-
}
|
12330 |
-
if (isProduction) {
|
12331 |
-
throw new Error(prefix);
|
12332 |
-
}
|
12333 |
-
var provided = typeof message === 'function' ? message() : message;
|
12334 |
-
var value = provided ? prefix + ": " + provided : prefix;
|
12335 |
-
throw new Error(value);
|
12336 |
-
}
|
12337 |
-
|
12338 |
-
|
12339 |
-
|
12340 |
-
|
12341 |
-
/***/ }),
|
12342 |
-
|
12343 |
-
/***/ 497:
|
12344 |
-
/***/ (function(module, exports) {
|
12345 |
-
|
12346 |
-
(function() { module.exports = window["wc"]["csvExport"]; }());
|
12347 |
-
|
12348 |
-
/***/ }),
|
12349 |
-
|
12350 |
-
/***/ 5:
|
12351 |
-
/***/ (function(module, exports) {
|
12352 |
-
|
12353 |
-
(function() { module.exports = window["lodash"]; }());
|
12354 |
-
|
12355 |
-
/***/ }),
|
12356 |
-
|
12357 |
-
/***/ 522:
|
12358 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12359 |
|
12360 |
"use strict";
|
12361 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
12362 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
12363 |
-
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
12364 |
-
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
12365 |
|
12366 |
|
12367 |
/**
|
12368 |
-
*
|
|
|
|
|
|
|
|
|
|
|
12369 |
*/
|
12370 |
|
12371 |
-
|
12372 |
-
|
12373 |
-
|
12374 |
-
}
|
12375 |
-
|
12376 |
-
}));
|
12377 |
-
/* harmony default export */ __webpack_exports__["a"] = (close);
|
12378 |
-
//# sourceMappingURL=close.js.map
|
12379 |
-
|
12380 |
-
/***/ }),
|
12381 |
-
|
12382 |
-
/***/ 523:
|
12383 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12384 |
-
|
12385 |
-
"use strict";
|
12386 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
12387 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
12388 |
-
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
12389 |
-
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
12390 |
-
|
12391 |
|
12392 |
/**
|
12393 |
-
*
|
|
|
|
|
12394 |
*/
|
|
|
12395 |
|
12396 |
-
|
12397 |
-
|
12398 |
-
|
12399 |
-
|
12400 |
-
|
12401 |
-
|
12402 |
-
|
12403 |
-
|
|
|
|
|
|
|
|
|
12404 |
|
12405 |
/***/ }),
|
12406 |
|
12407 |
-
/***/
|
12408 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12409 |
|
12410 |
"use strict";
|
12411 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
12412 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
12413 |
-
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
12414 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
12415 |
|
12416 |
|
@@ -12418,26 +10347,24 @@ const page = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createEleme
|
|
12418 |
* WordPress dependencies
|
12419 |
*/
|
12420 |
|
12421 |
-
|
12422 |
xmlns: "http://www.w3.org/2000/svg",
|
12423 |
viewBox: "0 0 24 24"
|
12424 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
|
12425 |
-
|
12426 |
-
d: "M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z",
|
12427 |
-
clipRule: "evenodd"
|
12428 |
}));
|
12429 |
-
/* harmony default export */ __webpack_exports__["a"] = (
|
12430 |
-
//# sourceMappingURL=
|
12431 |
|
12432 |
/***/ }),
|
12433 |
|
12434 |
-
/***/
|
12435 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12436 |
|
12437 |
"use strict";
|
12438 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
12439 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
12440 |
-
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
12441 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
12442 |
|
12443 |
|
@@ -12445,24 +10372,24 @@ const box = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElemen
|
|
12445 |
* WordPress dependencies
|
12446 |
*/
|
12447 |
|
12448 |
-
|
12449 |
xmlns: "http://www.w3.org/2000/svg",
|
12450 |
viewBox: "0 0 24 24"
|
12451 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
|
12452 |
-
d: "
|
12453 |
}));
|
12454 |
-
/* harmony default export */ __webpack_exports__["a"] = (
|
12455 |
-
//# sourceMappingURL=
|
12456 |
|
12457 |
/***/ }),
|
12458 |
|
12459 |
-
/***/
|
12460 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12461 |
|
12462 |
"use strict";
|
12463 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
12464 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
12465 |
-
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
12466 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
12467 |
|
12468 |
|
@@ -12470,186 +10397,52 @@ const help = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createEleme
|
|
12470 |
* WordPress dependencies
|
12471 |
*/
|
12472 |
|
12473 |
-
|
12474 |
xmlns: "http://www.w3.org/2000/svg",
|
12475 |
viewBox: "0 0 24 24"
|
12476 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
|
12477 |
-
|
|
|
|
|
12478 |
}));
|
12479 |
-
/* harmony default export */ __webpack_exports__["a"] = (
|
12480 |
-
//# sourceMappingURL=
|
12481 |
|
12482 |
/***/ }),
|
12483 |
|
12484 |
-
/***/
|
12485 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12486 |
|
12487 |
"use strict";
|
12488 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WooHeaderItem; });
|
12489 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return WooHeaderNavigationItem; });
|
12490 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return WooHeaderPageTitle; });
|
12491 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
12492 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
12493 |
-
/* harmony import */ var
|
12494 |
-
/* harmony import */ var
|
12495 |
-
|
12496 |
-
|
12497 |
-
/**
|
12498 |
-
* External dependencies
|
12499 |
-
*/
|
12500 |
|
12501 |
|
12502 |
/**
|
12503 |
-
*
|
12504 |
-
*
|
12505 |
-
* @param {Node} children - Node children.
|
12506 |
-
* @param {number} order - Node order.
|
12507 |
-
* @param {Array} props - Fill props.
|
12508 |
-
* @return {Node} Node.
|
12509 |
*/
|
12510 |
|
12511 |
-
|
12512 |
-
|
12513 |
-
|
12514 |
-
|
12515 |
-
|
12516 |
-
|
12517 |
-
|
12518 |
-
|
12519 |
-
* Create a Fill for extensions to add items to the WooCommerce Admin header.
|
12520 |
-
*
|
12521 |
-
* @slotFill WooHeaderItem
|
12522 |
-
* @scope woocommerce-admin
|
12523 |
-
* @example
|
12524 |
-
* const MyHeaderItem = () => (
|
12525 |
-
* <WooHeaderItem>My header item</WooHeaderItem>
|
12526 |
-
* );
|
12527 |
-
*
|
12528 |
-
* registerPlugin( 'my-extension', {
|
12529 |
-
* render: MyHeaderItem,
|
12530 |
-
* scope: 'woocommerce-admin',
|
12531 |
-
* } );
|
12532 |
-
* @param {Object} param0
|
12533 |
-
* @param {Array} param0.children - Node children.
|
12534 |
-
* @param {Array} param0.order - Node order.
|
12535 |
-
*/
|
12536 |
-
|
12537 |
-
|
12538 |
-
const WooHeaderItem = _ref => {
|
12539 |
-
let {
|
12540 |
-
children,
|
12541 |
-
order = 1
|
12542 |
-
} = _ref;
|
12543 |
-
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Fill"], {
|
12544 |
-
name: 'woocommerce_header_item'
|
12545 |
-
}, fillProps => {
|
12546 |
-
return createOrderedChildren(children, order, fillProps);
|
12547 |
-
});
|
12548 |
-
};
|
12549 |
|
12550 |
-
|
12551 |
-
let {
|
12552 |
-
fillProps
|
12553 |
-
} = _ref2;
|
12554 |
-
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Slot"], {
|
12555 |
-
name: 'woocommerce_header_item',
|
12556 |
-
fillProps: fillProps
|
12557 |
-
}, fills => {
|
12558 |
-
return fills.sort((a, b) => {
|
12559 |
-
return a[0].props.order - b[0].props.order;
|
12560 |
-
});
|
12561 |
-
});
|
12562 |
-
};
|
12563 |
-
/**
|
12564 |
-
* Create a Fill for extensions to add items to the WooCommerce Admin
|
12565 |
-
* navigation area left of the page title.
|
12566 |
-
*
|
12567 |
-
* @slotFill WooHeaderNavigationItem
|
12568 |
-
* @scope woocommerce-admin
|
12569 |
-
* @example
|
12570 |
-
* const MyNavigationItem = () => (
|
12571 |
-
* <WooHeaderNavigationItem>My nav item</WooHeaderNavigationItem>
|
12572 |
-
* );
|
12573 |
-
*
|
12574 |
-
* registerPlugin( 'my-extension', {
|
12575 |
-
* render: MyNavigationItem,
|
12576 |
-
* scope: 'woocommerce-admin',
|
12577 |
-
* } );
|
12578 |
-
* @param {Object} param0
|
12579 |
-
* @param {Array} param0.children - Node children.
|
12580 |
-
* @param {Array} param0.order - Node order.
|
12581 |
-
*/
|
12582 |
-
|
12583 |
-
|
12584 |
-
const WooHeaderNavigationItem = _ref3 => {
|
12585 |
-
let {
|
12586 |
-
children,
|
12587 |
-
order = 1
|
12588 |
-
} = _ref3;
|
12589 |
-
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Fill"], {
|
12590 |
-
name: 'woocommerce_header_navigation_item'
|
12591 |
-
}, fillProps => {
|
12592 |
-
return createOrderedChildren(children, order, fillProps);
|
12593 |
-
});
|
12594 |
-
};
|
12595 |
|
12596 |
-
|
12597 |
-
|
12598 |
-
fillProps
|
12599 |
-
} = _ref4;
|
12600 |
-
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Slot"], {
|
12601 |
-
name: 'woocommerce_header_navigation_item',
|
12602 |
-
fillProps: fillProps
|
12603 |
-
}, fills => {
|
12604 |
-
return fills.sort((a, b) => {
|
12605 |
-
return a[0].props.order - b[0].props.order;
|
12606 |
-
});
|
12607 |
-
});
|
12608 |
-
};
|
12609 |
-
/**
|
12610 |
-
* Create a Fill for extensions to add custom page titles.
|
12611 |
-
*
|
12612 |
-
* @slotFill WooHeaderPageTitle
|
12613 |
-
* @scope woocommerce-admin
|
12614 |
-
* @example
|
12615 |
-
* const MyPageTitle = () => (
|
12616 |
-
* <WooHeaderPageTitle>My page title</WooHeaderPageTitle>
|
12617 |
-
* );
|
12618 |
-
*
|
12619 |
-
* registerPlugin( 'my-page-title', {
|
12620 |
-
* render: MyPageTitle,
|
12621 |
-
* scope: 'woocommerce-admin',
|
12622 |
-
* } );
|
12623 |
-
* @param {Object} param0
|
12624 |
-
* @param {Array} param0.children - Node children.
|
12625 |
-
*/
|
12626 |
-
|
12627 |
-
|
12628 |
-
const WooHeaderPageTitle = _ref5 => {
|
12629 |
-
let {
|
12630 |
-
children
|
12631 |
-
} = _ref5;
|
12632 |
-
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Fill"], {
|
12633 |
-
name: 'woocommerce_header_page_title'
|
12634 |
-
}, children);
|
12635 |
-
};
|
12636 |
|
12637 |
-
|
12638 |
-
let {
|
12639 |
-
fillProps
|
12640 |
-
} = _ref6;
|
12641 |
-
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__["Slot"], {
|
12642 |
-
name: 'woocommerce_header_page_title',
|
12643 |
-
fillProps: fillProps
|
12644 |
-
}, fills => {
|
12645 |
-
const last = fills.pop();
|
12646 |
-
return [last];
|
12647 |
-
});
|
12648 |
-
};
|
12649 |
|
12650 |
/***/ }),
|
12651 |
|
12652 |
-
/***/
|
12653 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12654 |
|
12655 |
"use strict";
|
@@ -12664,7 +10457,7 @@ __webpack_require__.d(__webpack_exports__, "d", function() { return /* binding *
|
|
12664 |
// UNUSED EXPORTS: createHashHistory, parsePath
|
12665 |
|
12666 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
12667 |
-
var esm_extends = __webpack_require__(
|
12668 |
|
12669 |
// CONCATENATED MODULE: ./node_modules/resolve-pathname/esm/resolve-pathname.js
|
12670 |
function isAbsolute(pathname) {
|
@@ -12782,7 +10575,7 @@ function valueEqual(a, b) {
|
|
12782 |
/* harmony default export */ var value_equal = (valueEqual);
|
12783 |
|
12784 |
// EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js
|
12785 |
-
var tiny_invariant_esm = __webpack_require__(
|
12786 |
|
12787 |
// CONCATENATED MODULE: ./node_modules/history/esm/history.js
|
12788 |
|
@@ -13706,134 +11499,340 @@ function createMemoryHistory(props) {
|
|
13706 |
|
13707 |
|
13708 |
|
13709 |
-
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13710 |
|
13711 |
-
|
13712 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13713 |
|
13714 |
-
(function() { module.exports = window["wp"]["plugins"]; }());
|
13715 |
|
13716 |
/***/ }),
|
13717 |
|
13718 |
-
/***/
|
13719 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
13720 |
|
13721 |
"use strict";
|
13722 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
13723 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
13724 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return
|
13725 |
-
|
13726 |
-
|
13727 |
-
|
13728 |
-
|
13729 |
-
/***/ }),
|
13730 |
-
|
13731 |
-
/***/ 6:
|
13732 |
-
/***/ (function(module, exports) {
|
13733 |
-
|
13734 |
-
(function() { module.exports = window["React"]; }());
|
13735 |
-
|
13736 |
-
/***/ }),
|
13737 |
-
|
13738 |
-
/***/ 60:
|
13739 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13740 |
-
|
13741 |
-
"use strict";
|
13742 |
/**
|
13743 |
-
*
|
13744 |
-
*
|
13745 |
-
* This source code is licensed under the MIT license found in the
|
13746 |
-
* LICENSE file in the root directory of this source tree.
|
13747 |
*/
|
13748 |
|
|
|
|
|
|
|
13749 |
|
13750 |
|
13751 |
-
|
|
|
|
|
|
|
|
|
|
|
13752 |
|
13753 |
-
|
13754 |
-
|
13755 |
-
|
13756 |
|
13757 |
-
|
13758 |
-
|
13759 |
-
|
13760 |
-
|
13761 |
-
|
13762 |
-
|
13763 |
-
var err = new Error(
|
13764 |
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
13765 |
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
13766 |
-
'Read more at http://fb.me/use-check-prop-types'
|
13767 |
-
);
|
13768 |
-
err.name = 'Invariant Violation';
|
13769 |
-
throw err;
|
13770 |
-
};
|
13771 |
-
shim.isRequired = shim;
|
13772 |
-
function getShim() {
|
13773 |
-
return shim;
|
13774 |
};
|
13775 |
-
//
|
13776 |
-
//
|
13777 |
-
|
13778 |
-
array: shim,
|
13779 |
-
bool: shim,
|
13780 |
-
func: shim,
|
13781 |
-
number: shim,
|
13782 |
-
object: shim,
|
13783 |
-
string: shim,
|
13784 |
-
symbol: shim,
|
13785 |
-
|
13786 |
-
any: shim,
|
13787 |
-
arrayOf: getShim,
|
13788 |
-
element: shim,
|
13789 |
-
elementType: shim,
|
13790 |
-
instanceOf: getShim,
|
13791 |
-
node: shim,
|
13792 |
-
objectOf: getShim,
|
13793 |
-
oneOf: getShim,
|
13794 |
-
oneOfType: getShim,
|
13795 |
-
shape: getShim,
|
13796 |
-
exact: getShim,
|
13797 |
|
13798 |
-
|
13799 |
-
|
13800 |
-
|
13801 |
|
13802 |
-
|
|
|
|
|
13803 |
|
13804 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13805 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13806 |
|
|
|
|
|
|
|
13807 |
|
13808 |
-
|
13809 |
-
|
13810 |
-
|
13811 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13812 |
-
|
13813 |
-
"use strict";
|
13814 |
-
/**
|
13815 |
-
* Copyright (c) 2013-present, Facebook, Inc.
|
13816 |
-
*
|
13817 |
-
* This source code is licensed under the MIT license found in the
|
13818 |
-
* LICENSE file in the root directory of this source tree.
|
13819 |
-
*/
|
13820 |
-
|
13821 |
-
|
13822 |
-
|
13823 |
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
13824 |
-
|
13825 |
-
module.exports = ReactPropTypesSecret;
|
13826 |
|
|
|
|
|
13827 |
|
13828 |
/***/ }),
|
13829 |
|
13830 |
-
/***/
|
13831 |
/***/ (function(module, exports, __webpack_require__) {
|
13832 |
|
13833 |
"use strict";
|
13834 |
|
13835 |
|
13836 |
-
var utils = __webpack_require__(
|
13837 |
var formats = __webpack_require__(39);
|
13838 |
var has = Object.prototype.hasOwnProperty;
|
13839 |
|
@@ -14113,13 +12112,13 @@ module.exports = function (object, opts) {
|
|
14113 |
|
14114 |
/***/ }),
|
14115 |
|
14116 |
-
/***/
|
14117 |
/***/ (function(module, exports, __webpack_require__) {
|
14118 |
|
14119 |
"use strict";
|
14120 |
|
14121 |
|
14122 |
-
var utils = __webpack_require__(
|
14123 |
|
14124 |
var has = Object.prototype.hasOwnProperty;
|
14125 |
var isArray = Array.isArray;
|
@@ -14376,343 +12375,472 @@ module.exports = function (str, opts) {
|
|
14376 |
};
|
14377 |
|
14378 |
|
14379 |
-
/***/ }),
|
14380 |
-
|
14381 |
-
/***/ 65:
|
14382 |
-
/***/ (function(module, exports) {
|
14383 |
-
|
14384 |
-
(function() { module.exports = window["wp"]["date"]; }());
|
14385 |
-
|
14386 |
/***/ }),
|
14387 |
|
14388 |
/***/ 69:
|
14389 |
-
/***/ (function(module,
|
14390 |
|
14391 |
"use strict";
|
14392 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getCountryCode; });
|
14393 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getCurrencyRegion; });
|
14394 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getProductIdsForCart; });
|
14395 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getCategorizedOnboardingProducts; });
|
14396 |
-
/* unused harmony export getProductList */
|
14397 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getPriceValue; });
|
14398 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isWCAdmin; });
|
14399 |
-
/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
|
14400 |
-
/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_0__);
|
14401 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
|
14402 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
14403 |
-
/* harmony import */ var _utils_admin_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
|
14404 |
/**
|
14405 |
-
*
|
14406 |
-
*/
|
14407 |
-
|
14408 |
-
|
14409 |
-
/**
|
14410 |
-
* Internal dependencies
|
14411 |
-
*/
|
14412 |
-
|
14413 |
-
|
14414 |
-
/**
|
14415 |
-
* Gets the country code from a country:state value string.
|
14416 |
*
|
14417 |
-
*
|
14418 |
-
*
|
14419 |
*/
|
14420 |
|
14421 |
-
function getCountryCode(countryState) {
|
14422 |
-
if (!countryState) {
|
14423 |
-
return null;
|
14424 |
-
}
|
14425 |
-
|
14426 |
-
return countryState.split(':')[0];
|
14427 |
-
}
|
14428 |
-
function getCurrencyRegion(countryState) {
|
14429 |
-
let region = getCountryCode(countryState);
|
14430 |
-
const euCountries = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["without"])(Object(_utils_admin_settings__WEBPACK_IMPORTED_MODULE_2__[/* getAdminSetting */ "d"])('onboarding', {
|
14431 |
-
euCountries: []
|
14432 |
-
}).euCountries, 'GB');
|
14433 |
|
14434 |
-
if (euCountries.includes(region)) {
|
14435 |
-
region = 'EU';
|
14436 |
-
}
|
14437 |
|
14438 |
-
|
14439 |
-
}
|
14440 |
-
/**
|
14441 |
-
* Gets the product IDs for items based on the product types and theme selected in the onboarding profiler.
|
14442 |
-
*
|
14443 |
-
* @param {Object} productTypes Product Types.
|
14444 |
-
* @param {Object} profileItems Onboarding profile.
|
14445 |
-
* @param {boolean} includeInstalledItems Include installed items in returned product IDs.
|
14446 |
-
* @param {Array} installedPlugins Installed plugins.
|
14447 |
-
* @return {Array} Product Ids.
|
14448 |
-
*/
|
14449 |
|
14450 |
-
|
14451 |
-
|
14452 |
-
|
14453 |
-
const productList = getProductList(profileItems, includeInstalledItems, installedPlugins, productTypes);
|
14454 |
-
const productIds = productList.map(product => product.id || product.product);
|
14455 |
-
return productIds;
|
14456 |
-
}
|
14457 |
-
/**
|
14458 |
-
* Gets the labeled/categorized product names and types for items based on the product types and theme selected in the onboarding profiler.
|
14459 |
-
*
|
14460 |
-
* @param {Object} productTypes Product Types.
|
14461 |
-
* @param {Object} profileItems Onboarding profile.
|
14462 |
-
* @param {Array} installedPlugins Installed plugins.
|
14463 |
-
* @return {Array} Objects with labeled/categorized product names and types.
|
14464 |
-
*/
|
14465 |
|
14466 |
-
|
14467 |
-
|
14468 |
-
|
14469 |
-
productList.remainingProducts = getProductList(profileItems, false, installedPlugins, productTypes);
|
14470 |
-
const uniqueItemsList = [...new Set([...productList.products, ...productList.remainingProducts])];
|
14471 |
-
productList.uniqueItemsList = uniqueItemsList.map(product => {
|
14472 |
-
let cleanedProduct;
|
14473 |
|
14474 |
-
|
14475 |
-
|
14476 |
-
type: 'extension',
|
14477 |
-
name: product.label
|
14478 |
-
};
|
14479 |
-
} else {
|
14480 |
-
cleanedProduct = {
|
14481 |
-
type: 'theme',
|
14482 |
-
name: product.title
|
14483 |
-
};
|
14484 |
-
}
|
14485 |
|
14486 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14487 |
});
|
14488 |
-
|
|
|
14489 |
}
|
14490 |
-
/**
|
14491 |
-
* Gets a product list for items based on the product types and theme selected in the onboarding profiler.
|
14492 |
-
*
|
14493 |
-
* @param {Object} profileItems Onboarding profile.
|
14494 |
-
* @param {boolean} includeInstalledItems Include installed items in returned product list.
|
14495 |
-
* @param {Array} installedPlugins Installed plugins.
|
14496 |
-
* @param {Object} productTypes Product Types.
|
14497 |
-
* @return {Array} Products.
|
14498 |
-
*/
|
14499 |
|
14500 |
-
function
|
14501 |
-
|
14502 |
-
|
14503 |
-
|
14504 |
-
|
|
|
|
|
|
|
|
|
|
|
14505 |
|
14506 |
-
|
14507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14508 |
}
|
14509 |
|
14510 |
-
|
14511 |
-
|
14512 |
-
|
14513 |
-
|
14514 |
-
|
14515 |
-
|
14516 |
-
|
14517 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14518 |
|
14519 |
-
if (
|
14520 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14521 |
}
|
14522 |
|
14523 |
-
|
14524 |
-
|
|
|
|
|
|
|
|
|
14525 |
}
|
14526 |
|
14527 |
-
return
|
14528 |
}
|
14529 |
-
/**
|
14530 |
-
* Get the value of a price from a string, removing any non-numeric characters.
|
14531 |
-
*
|
14532 |
-
* @param {string} string Price string.
|
14533 |
-
* @return {number} Number value.
|
14534 |
-
*/
|
14535 |
|
14536 |
-
|
14537 |
-
|
|
|
14538 |
}
|
14539 |
-
/**
|
14540 |
-
* Determines if a URL is a WC admin url.
|
14541 |
-
*
|
14542 |
-
* @param {*} url - the url to test
|
14543 |
-
* @return {boolean} true if the url is a wc-admin URL
|
14544 |
-
*/
|
14545 |
|
14546 |
-
function
|
14547 |
-
return
|
|
|
|
|
|
|
|
|
14548 |
}
|
14549 |
|
14550 |
-
|
|
|
14551 |
|
14552 |
-
|
14553 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14554 |
|
14555 |
-
|
14556 |
-
|
14557 |
-
|
14558 |
-
|
14559 |
-
|
14560 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
14561 |
|
14562 |
-
|
14563 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14564 |
|
14565 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14566 |
|
14567 |
-
|
14568 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14569 |
|
14570 |
-
|
14571 |
-
|
14572 |
-
|
|
|
|
|
14573 |
|
14574 |
-
|
14575 |
|
14576 |
-
|
14577 |
-
|
14578 |
-
|
14579 |
-
|
14580 |
-
|
14581 |
-
|
14582 |
-
|
14583 |
-
|
14584 |
-
|
14585 |
-
} else if (argType === 'object') {
|
14586 |
-
if (arg.toString === Object.prototype.toString) {
|
14587 |
-
for (var key in arg) {
|
14588 |
-
if (hasOwn.call(arg, key) && arg[key]) {
|
14589 |
-
classes.push(key);
|
14590 |
-
}
|
14591 |
-
}
|
14592 |
-
} else {
|
14593 |
-
classes.push(arg.toString());
|
14594 |
-
}
|
14595 |
-
}
|
14596 |
-
}
|
14597 |
|
14598 |
-
|
14599 |
-
|
14600 |
|
14601 |
-
|
14602 |
-
classNames.default = classNames;
|
14603 |
-
module.exports = classNames;
|
14604 |
-
} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
|
14605 |
-
// register as 'classnames', consistent with npm package name
|
14606 |
-
define('classnames', [], function () {
|
14607 |
-
return classNames;
|
14608 |
-
});
|
14609 |
-
} else {
|
14610 |
-
window.classNames = classNames;
|
14611 |
-
}
|
14612 |
-
}());
|
14613 |
|
14614 |
|
14615 |
/***/ }),
|
14616 |
|
14617 |
-
/***/
|
14618 |
-
/***/ (function(module,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14619 |
|
14620 |
"use strict";
|
14621 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getUnreadOrders; });
|
14622 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getOrderStatuses; });
|
14623 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getLowStockCountQuery; });
|
14624 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getLowStockCount; });
|
14625 |
-
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
|
14626 |
-
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_0__);
|
14627 |
-
/* harmony import */ var _analytics_settings_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(258);
|
14628 |
/**
|
14629 |
-
*
|
|
|
|
|
|
|
|
|
14630 |
*/
|
14631 |
|
|
|
|
|
14632 |
/**
|
14633 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14634 |
*/
|
14635 |
|
|
|
14636 |
|
14637 |
-
|
14638 |
-
const {
|
14639 |
-
getItemsTotalCount,
|
14640 |
-
getItemsError,
|
14641 |
-
isResolving
|
14642 |
-
} = select(_woocommerce_data__WEBPACK_IMPORTED_MODULE_0__["ITEMS_STORE_NAME"]);
|
14643 |
|
14644 |
-
|
14645 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14646 |
}
|
|
|
14647 |
|
14648 |
-
|
14649 |
-
page: 1,
|
14650 |
-
per_page: 1,
|
14651 |
-
// Core endpoint requires per_page > 0.
|
14652 |
-
status: orderStatuses,
|
14653 |
-
_fields: ['id']
|
14654 |
-
};
|
14655 |
-
const defaultValue = null; // Disable eslint rule requiring `totalOrders` to be defined below because the next two statements
|
14656 |
-
// depend on `getItemsTotalCount` to have been called.
|
14657 |
-
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
|
14658 |
|
14659 |
-
|
14660 |
-
const isError = Boolean(getItemsError('orders', ordersQuery));
|
14661 |
-
const isRequesting = isResolving('getItemsTotalCount', ['orders', ordersQuery, defaultValue]);
|
14662 |
|
14663 |
-
|
14664 |
-
|
14665 |
-
}
|
14666 |
|
14667 |
-
|
14668 |
-
|
14669 |
-
|
14670 |
-
|
14671 |
-
|
14672 |
-
|
14673 |
-
|
14674 |
-
|
14675 |
-
} = getMutableSetting('wc_admin', 'wcAdminSettings', {});
|
14676 |
-
return orderStatuses;
|
14677 |
-
}
|
14678 |
-
const getLowStockCountQuery = {
|
14679 |
-
page: 1,
|
14680 |
-
per_page: 1,
|
14681 |
-
low_in_stock: true,
|
14682 |
-
status: 'publish',
|
14683 |
-
_fields: ['id']
|
14684 |
-
};
|
14685 |
-
function getLowStockCount(select) {
|
14686 |
-
const {
|
14687 |
-
getItemsTotalCount,
|
14688 |
-
getItemsError,
|
14689 |
-
isResolving
|
14690 |
-
} = select(_woocommerce_data__WEBPACK_IMPORTED_MODULE_0__["ITEMS_STORE_NAME"]);
|
14691 |
-
const defaultValue = null; // Disable eslint rule requiring `totalLowStockProducts` to be defined below because the next two statements
|
14692 |
-
// depend on `getItemsTotalCount` to have been called.
|
14693 |
-
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
|
14694 |
|
14695 |
-
const totalLowStockProducts = getItemsTotalCount('products/low-in-stock', getLowStockCountQuery, defaultValue);
|
14696 |
-
const isError = Boolean(getItemsError('products/low-in-stock', getLowStockCountQuery));
|
14697 |
-
const isRequesting = isResolving('getItemsTotalCount', ['products/low-in-stock', getLowStockCountQuery, defaultValue]);
|
14698 |
|
14699 |
-
if (isError || isRequesting && totalLowStockProducts === defaultValue) {
|
14700 |
-
return null;
|
14701 |
-
}
|
14702 |
|
14703 |
-
|
14704 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14705 |
|
14706 |
/***/ }),
|
14707 |
|
14708 |
-
/***/
|
14709 |
-
/***/ (function(module, exports) {
|
14710 |
|
14711 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14712 |
|
14713 |
/***/ }),
|
14714 |
|
14715 |
-
/***/
|
14716 |
/***/ (function(module, exports) {
|
14717 |
|
14718 |
var g;
|
@@ -14739,21 +12867,28 @@ module.exports = g;
|
|
14739 |
|
14740 |
/***/ }),
|
14741 |
|
14742 |
-
/***/
|
14743 |
/***/ (function(module, exports) {
|
14744 |
|
14745 |
(function() { module.exports = window["wp"]["primitives"]; }());
|
14746 |
|
14747 |
/***/ }),
|
14748 |
|
14749 |
-
/***/
|
14750 |
/***/ (function(module, exports) {
|
14751 |
|
14752 |
(function() { module.exports = window["wc"]["currency"]; }());
|
14753 |
|
14754 |
/***/ }),
|
14755 |
|
14756 |
-
/***/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14757 |
/***/ (function(module, exports) {
|
14758 |
|
14759 |
(function() { module.exports = window["wp"]["dom"]; }());
|
52 |
/******/
|
53 |
/******/ // script path function
|
54 |
/******/ function webpackJsonpScriptSrc(chunkId) {
|
55 |
+
/******/ return __webpack_require__.p + "chunks/" + ({"4":"activity-panels-help","5":"activity-panels-inbox","6":"analytics-report","7":"analytics-report-categories","8":"analytics-report-coupons","9":"analytics-report-customers","10":"analytics-report-downloads","11":"analytics-report-orders","12":"analytics-report-products","13":"analytics-report-revenue","14":"analytics-report-stock","15":"analytics-report-taxes","16":"analytics-report-variations","17":"analytics-settings","24":"customizable-dashboard","25":"dashboard","26":"dashboard-charts","31":"homescreen","32":"leaderboards","34":"marketing-overview","44":"payment-recommendations","46":"profile-wizard","47":"store-alerts","48":"store-performance","49":"task-list","51":"wcpay-usage-modal"}[chunkId]||chunkId) + ".js"
|
56 |
/******/ }
|
57 |
/******/
|
58 |
/******/ function jsonpScriptSrc(chunkId) {
|
95 |
/******/
|
96 |
/******/
|
97 |
/******/ // mini-css-extract-plugin CSS loading
|
98 |
+
/******/ var cssChunks = {"0":1,"4":1,"5":1,"6":1,"7":1,"9":1,"11":1,"12":1,"14":1,"17":1,"25":1,"26":1,"31":1,"32":1,"34":1,"44":1,"46":1,"47":1,"48":1,"49":1};
|
99 |
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
|
100 |
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
|
101 |
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
|
102 |
+
/******/ var href = true && isCssRtlEnabled() ? "./chunks/" + chunkId + ".style.rtl.css" : "./chunks/" + chunkId + ".style.css";
|
103 |
/******/ var fullhref = __webpack_require__.p + href;
|
104 |
/******/ var existingLinkTags = document.getElementsByTagName("link");
|
105 |
/******/ for(var i = 0; i < existingLinkTags.length; i++) {
|
259 |
/******/
|
260 |
/******/
|
261 |
/******/ // Load entry module and return exports
|
262 |
+
/******/ return __webpack_require__(__webpack_require__.s = 278);
|
263 |
/******/ })
|
264 |
/************************************************************************/
|
265 |
/******/ ({
|
284 |
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
285 |
// By explicitly using `prop-types` you are opting into new production behavior.
|
286 |
// http://fb.me/prop-types-in-prod
|
287 |
+
module.exports = __webpack_require__(46)();
|
288 |
}
|
289 |
|
290 |
|
297 |
|
298 |
/***/ }),
|
299 |
|
300 |
+
/***/ 100:
|
301 |
+
/***/ (function(module, exports, __webpack_require__) {
|
302 |
+
|
303 |
+
"use strict";
|
304 |
+
var _extends=Object.assign||function(a){for(var c,b=1;b<arguments.length;b++)for(var d in c=arguments[b],c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d]);return a};Object.defineProperty(exports,'__esModule',{value:!0});exports.default=function(a){var b=a.size,c=b===void 0?24:b,d=a.onClick,e=a.icon,f=a.className,g=_objectWithoutProperties(a,['size','onClick','icon','className']),j=['gridicon','gridicons-cross-small',f,!1,!1,!1].filter(Boolean).join(' ');return _react2.default.createElement('svg',_extends({className:j,height:c,width:c,onClick:d},g,{xmlns:'http://www.w3.org/2000/svg',viewBox:'0 0 24 24'}),_react2.default.createElement('g',null,_react2.default.createElement('path',{d:'M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z'})))};var _react=__webpack_require__(5),_react2=_interopRequireDefault(_react);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _objectWithoutProperties(a,b){var d={};for(var c in a)0<=b.indexOf(c)||Object.prototype.hasOwnProperty.call(a,c)&&(d[c]=a[c]);return d}module.exports=exports['default'];
|
305 |
+
|
306 |
+
|
307 |
+
/***/ }),
|
308 |
+
|
309 |
+
/***/ 102:
|
310 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
311 |
|
312 |
"use strict";
|
313 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return REVIEW_PAGE_LIMIT; });
|
314 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return unapprovedReviewsQuery; });
|
315 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getUnapprovedReviews; });
|
316 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
317 |
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_0__);
|
318 |
/**
|
319 |
* External dependencies
|
347 |
|
348 |
/***/ }),
|
349 |
|
350 |
+
/***/ 103:
|
351 |
+
/***/ (function(module, exports, __webpack_require__) {
|
352 |
+
|
353 |
+
"use strict";
|
354 |
+
|
355 |
+
|
356 |
+
if (true) {
|
357 |
+
module.exports = __webpack_require__(129);
|
358 |
+
} else {}
|
359 |
+
|
360 |
+
|
361 |
+
/***/ }),
|
362 |
+
|
363 |
+
/***/ 11:
|
364 |
+
/***/ (function(module, exports) {
|
365 |
+
|
366 |
+
(function() { module.exports = window["wc"]["data"]; }());
|
367 |
+
|
368 |
+
/***/ }),
|
369 |
+
|
370 |
+
/***/ 115:
|
371 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
372 |
|
373 |
"use strict";
|
374 |
+
|
375 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
376 |
+
function _defineProperty(obj, key, value) {
|
377 |
+
if (key in obj) {
|
378 |
+
Object.defineProperty(obj, key, {
|
379 |
+
value: value,
|
380 |
+
enumerable: true,
|
381 |
+
configurable: true,
|
382 |
+
writable: true
|
383 |
+
});
|
384 |
+
} else {
|
385 |
+
obj[key] = value;
|
386 |
+
}
|
387 |
+
|
388 |
+
return obj;
|
389 |
+
}
|
390 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
391 |
+
var objectWithoutPropertiesLoose = __webpack_require__(22);
|
392 |
+
|
393 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
394 |
+
|
395 |
+
function _objectWithoutProperties(source, excluded) {
|
396 |
+
if (source == null) return {};
|
397 |
+
var target = Object(objectWithoutPropertiesLoose["a" /* default */])(source, excluded);
|
398 |
+
var key, i;
|
399 |
+
|
400 |
+
if (Object.getOwnPropertySymbols) {
|
401 |
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
402 |
+
|
403 |
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
404 |
+
key = sourceSymbolKeys[i];
|
405 |
+
if (excluded.indexOf(key) >= 0) continue;
|
406 |
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
407 |
+
target[key] = source[key];
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
return target;
|
412 |
+
}
|
413 |
+
// EXTERNAL MODULE: external ["wp","element"]
|
414 |
+
var external_wp_element_ = __webpack_require__(0);
|
415 |
+
|
416 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
|
417 |
+
|
418 |
+
|
419 |
+
|
420 |
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
421 |
+
|
422 |
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
423 |
+
|
424 |
/**
|
425 |
* WordPress dependencies
|
426 |
*/
|
438 |
*/
|
439 |
|
440 |
function Icon(_ref) {
|
441 |
+
var icon = _ref.icon,
|
442 |
+
_ref$size = _ref.size,
|
443 |
+
size = _ref$size === void 0 ? 24 : _ref$size,
|
444 |
+
props = _objectWithoutProperties(_ref, ["icon", "size"]);
|
445 |
+
|
446 |
+
return Object(external_wp_element_["cloneElement"])(icon, _objectSpread({
|
447 |
width: size,
|
448 |
+
height: size
|
449 |
+
}, props));
|
|
|
450 |
}
|
451 |
|
452 |
+
/* harmony default export */ var build_module_icon = __webpack_exports__["a"] = (Icon);
|
453 |
//# sourceMappingURL=index.js.map
|
454 |
|
455 |
/***/ }),
|
456 |
|
457 |
+
/***/ 116:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
/***/ (function(module, exports) {
|
459 |
|
460 |
+
(function() { module.exports = window["wp"]["plugins"]; }());
|
461 |
|
462 |
/***/ }),
|
463 |
|
464 |
+
/***/ 117:
|
465 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
466 |
|
467 |
"use strict";
|
468 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
469 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
470 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30);
|
471 |
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);
|
472 |
+
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
|
473 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
|
474 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
|
475 |
/**
|
476 |
* External dependencies
|
477 |
*/
|
478 |
|
479 |
|
480 |
|
481 |
+
|
482 |
+
const manageStock = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__[/* getSetting */ "f"])('manageStock', 'no');
|
483 |
+
const REPORTS_FILTER = 'woocommerce_admin_reports_list';
|
484 |
/**
|
485 |
* Internal dependencies
|
486 |
*/
|
487 |
|
488 |
+
const RevenueReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => Promise.all(/* import() | analytics-report-revenue */[__webpack_require__.e(0), __webpack_require__.e(13)]).then(__webpack_require__.bind(null, 477)));
|
489 |
+
const ProductsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => Promise.all(/* import() | analytics-report-products */[__webpack_require__.e(0), __webpack_require__.e(12)]).then(__webpack_require__.bind(null, 473)));
|
490 |
+
const VariationsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => Promise.all(/* import() | analytics-report-variations */[__webpack_require__.e(0), __webpack_require__.e(16)]).then(__webpack_require__.bind(null, 478)));
|
491 |
+
const OrdersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => Promise.all(/* import() | analytics-report-orders */[__webpack_require__.e(0), __webpack_require__.e(11)]).then(__webpack_require__.bind(null, 479)));
|
492 |
+
const CategoriesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => Promise.all(/* import() | analytics-report-categories */[__webpack_require__.e(0), __webpack_require__.e(7)]).then(__webpack_require__.bind(null, 475)));
|
493 |
+
const CouponsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => Promise.all(/* import() | analytics-report-coupons */[__webpack_require__.e(0), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, 480)));
|
494 |
+
const TaxesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => Promise.all(/* import() | analytics-report-taxes */[__webpack_require__.e(0), __webpack_require__.e(15)]).then(__webpack_require__.bind(null, 481)));
|
495 |
+
const DownloadsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => Promise.all(/* import() | analytics-report-downloads */[__webpack_require__.e(0), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, 482)));
|
496 |
+
const StockReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => __webpack_require__.e(/* import() | analytics-report-stock */ 14).then(__webpack_require__.bind(null, 474)));
|
497 |
+
const CustomersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(() => __webpack_require__.e(/* import() | analytics-report-customers */ 9).then(__webpack_require__.bind(null, 476)));
|
|
|
|
|
|
|
498 |
/* harmony default export */ __webpack_exports__["a"] = (() => {
|
499 |
const reports = [{
|
500 |
report: 'revenue',
|
564 |
id: 'woocommerce-analytics-downloads'
|
565 |
}
|
566 |
}].filter(Boolean);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
567 |
return Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__["applyFilters"])(REPORTS_FILTER, reports);
|
568 |
});
|
569 |
|
570 |
/***/ }),
|
571 |
|
572 |
+
/***/ 118:
|
573 |
+
/***/ (function(module, exports, __webpack_require__) {
|
574 |
|
575 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
|
577 |
|
578 |
+
var reactIs = __webpack_require__(103);
|
579 |
|
580 |
+
/**
|
581 |
+
* Copyright 2015, Yahoo! Inc.
|
582 |
+
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
583 |
+
*/
|
584 |
+
var REACT_STATICS = {
|
585 |
+
childContextTypes: true,
|
586 |
+
contextType: true,
|
587 |
+
contextTypes: true,
|
588 |
+
defaultProps: true,
|
589 |
+
displayName: true,
|
590 |
+
getDefaultProps: true,
|
591 |
+
getDerivedStateFromError: true,
|
592 |
+
getDerivedStateFromProps: true,
|
593 |
+
mixins: true,
|
594 |
+
propTypes: true,
|
595 |
+
type: true
|
596 |
+
};
|
597 |
+
var KNOWN_STATICS = {
|
598 |
+
name: true,
|
599 |
+
length: true,
|
600 |
+
prototype: true,
|
601 |
+
caller: true,
|
602 |
+
callee: true,
|
603 |
+
arguments: true,
|
604 |
+
arity: true
|
605 |
+
};
|
606 |
+
var FORWARD_REF_STATICS = {
|
607 |
+
'$$typeof': true,
|
608 |
+
render: true,
|
609 |
+
defaultProps: true,
|
610 |
+
displayName: true,
|
611 |
+
propTypes: true
|
612 |
+
};
|
613 |
+
var MEMO_STATICS = {
|
614 |
+
'$$typeof': true,
|
615 |
+
compare: true,
|
616 |
+
defaultProps: true,
|
617 |
+
displayName: true,
|
618 |
+
propTypes: true,
|
619 |
+
type: true
|
620 |
+
};
|
621 |
+
var TYPE_STATICS = {};
|
622 |
+
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
623 |
+
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
624 |
|
625 |
+
function getStatics(component) {
|
626 |
+
// React v16.11 and below
|
627 |
+
if (reactIs.isMemo(component)) {
|
628 |
+
return MEMO_STATICS;
|
629 |
+
} // React v16.12 and above
|
630 |
|
631 |
|
632 |
+
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
633 |
+
}
|
634 |
|
635 |
+
var defineProperty = Object.defineProperty;
|
636 |
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
637 |
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
638 |
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
639 |
+
var getPrototypeOf = Object.getPrototypeOf;
|
640 |
+
var objectPrototype = Object.prototype;
|
641 |
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
642 |
+
if (typeof sourceComponent !== 'string') {
|
643 |
+
// don't hoist over string (html) components
|
644 |
+
if (objectPrototype) {
|
645 |
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
646 |
|
647 |
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
648 |
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
|
|
|
649 |
}
|
650 |
}
|
651 |
|
652 |
+
var keys = getOwnPropertyNames(sourceComponent);
|
|
|
653 |
|
654 |
+
if (getOwnPropertySymbols) {
|
655 |
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
656 |
+
}
|
657 |
|
658 |
+
var targetStatics = getStatics(targetComponent);
|
659 |
+
var sourceStatics = getStatics(sourceComponent);
|
|
|
|
|
|
|
|
|
660 |
|
661 |
+
for (var i = 0; i < keys.length; ++i) {
|
662 |
+
var key = keys[i];
|
663 |
|
664 |
+
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
665 |
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
666 |
|
667 |
+
try {
|
668 |
+
// Avoid failures from read-only properties
|
669 |
+
defineProperty(targetComponent, key, descriptor);
|
670 |
+
} catch (e) {}
|
671 |
+
}
|
672 |
+
}
|
673 |
}
|
674 |
|
675 |
+
return targetComponent;
|
676 |
+
}
|
677 |
|
678 |
+
module.exports = hoistNonReactStatics;
|
|
|
679 |
|
|
|
|
|
|
|
|
|
680 |
|
681 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
682 |
|
683 |
+
/***/ 119:
|
684 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
|
686 |
+
"use strict";
|
|
|
|
|
|
|
687 |
|
688 |
+
// EXPORTS
|
689 |
+
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ layout_PrimaryLayout; });
|
690 |
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ PageLayout; });
|
691 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ EmbedLayout; });
|
692 |
|
693 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
|
694 |
+
var helpers_extends = __webpack_require__(35);
|
695 |
+
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
|
|
|
|
|
|
|
|
|
696 |
|
697 |
+
// EXTERNAL MODULE: external ["wp","element"]
|
698 |
+
var external_wp_element_ = __webpack_require__(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
699 |
|
700 |
+
// EXTERNAL MODULE: external ["wp","components"]
|
701 |
+
var external_wp_components_ = __webpack_require__(4);
|
|
|
|
|
|
|
|
|
|
|
702 |
|
703 |
+
// EXTERNAL MODULE: external ["wp","compose"]
|
704 |
+
var external_wp_compose_ = __webpack_require__(13);
|
|
|
|
|
|
|
|
|
705 |
|
706 |
+
// EXTERNAL MODULE: external ["wp","data"]
|
707 |
+
var external_wp_data_ = __webpack_require__(7);
|
|
|
|
|
|
|
708 |
|
709 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules
|
710 |
+
var inheritsLoose = __webpack_require__(25);
|
|
|
|
|
|
|
|
|
711 |
|
712 |
+
// EXTERNAL MODULE: external "React"
|
713 |
+
var external_React_ = __webpack_require__(5);
|
714 |
+
var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
|
|
|
|
|
|
|
715 |
|
716 |
+
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
717 |
+
var prop_types = __webpack_require__(1);
|
718 |
+
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
|
720 |
+
// EXTERNAL MODULE: ./node_modules/history/esm/history.js + 2 modules
|
721 |
+
var esm_history = __webpack_require__(51);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
722 |
|
723 |
+
// EXTERNAL MODULE: ./node_modules/mini-create-react-context/dist/esm/index.js
|
724 |
+
var esm = __webpack_require__(160);
|
725 |
|
726 |
+
// EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js
|
727 |
+
var tiny_invariant_esm = __webpack_require__(41);
|
|
|
|
|
|
|
728 |
|
729 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
730 |
+
var esm_extends = __webpack_require__(23);
|
|
|
|
|
731 |
|
732 |
+
// EXTERNAL MODULE: ./node_modules/path-to-regexp/index.js
|
733 |
+
var path_to_regexp = __webpack_require__(161);
|
734 |
+
var path_to_regexp_default = /*#__PURE__*/__webpack_require__.n(path_to_regexp);
|
|
|
|
|
735 |
|
736 |
+
// EXTERNAL MODULE: ./node_modules/react-is/index.js
|
737 |
+
var react_is = __webpack_require__(103);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
738 |
|
739 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
740 |
+
var objectWithoutPropertiesLoose = __webpack_require__(22);
|
741 |
|
742 |
+
// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
743 |
+
var hoist_non_react_statics_cjs = __webpack_require__(118);
|
744 |
+
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
|
746 |
+
// CONCATENATED MODULE: ./node_modules/react-router/esm/react-router.js
|
|
|
|
|
747 |
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
|
|
|
749 |
|
|
|
|
|
|
|
750 |
|
|
|
751 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
752 |
|
|
|
|
|
|
|
|
|
|
|
|
|
753 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
754 |
|
|
|
|
|
|
|
|
|
755 |
|
|
|
|
|
756 |
|
|
|
|
|
|
|
757 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
758 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
759 |
|
760 |
+
// TODO: Replace with React.createContext once we can assume React 16+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
|
762 |
+
var react_router_createNamedContext = function createNamedContext(name) {
|
763 |
+
var context = Object(esm["a" /* default */])();
|
764 |
+
context.displayName = name;
|
765 |
+
return context;
|
766 |
+
};
|
767 |
|
768 |
+
var historyContext =
|
769 |
+
/*#__PURE__*/
|
770 |
+
react_router_createNamedContext("Router-History");
|
|
|
|
|
|
|
|
|
771 |
|
772 |
+
// TODO: Replace with React.createContext once we can assume React 16+
|
|
|
773 |
|
774 |
+
var createNamedContext$1 = function createNamedContext(name) {
|
775 |
+
var context = Object(esm["a" /* default */])();
|
776 |
+
context.displayName = name;
|
777 |
+
return context;
|
778 |
+
};
|
|
|
779 |
|
780 |
+
var react_router_context =
|
781 |
+
/*#__PURE__*/
|
782 |
+
createNamedContext$1("Router");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
783 |
|
784 |
+
/**
|
785 |
+
* The public API for putting history on context.
|
786 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
787 |
|
788 |
+
var react_router_Router =
|
789 |
+
/*#__PURE__*/
|
790 |
+
function (_React$Component) {
|
791 |
+
Object(inheritsLoose["a" /* default */])(Router, _React$Component);
|
|
|
792 |
|
793 |
+
Router.computeRootMatch = function computeRootMatch(pathname) {
|
794 |
+
return {
|
795 |
+
path: "/",
|
796 |
+
url: "/",
|
797 |
+
params: {},
|
798 |
+
isExact: pathname === "/"
|
799 |
};
|
800 |
+
};
|
801 |
|
802 |
+
function Router(props) {
|
803 |
+
var _this;
|
804 |
|
805 |
+
_this = _React$Component.call(this, props) || this;
|
806 |
+
_this.state = {
|
807 |
+
location: props.history.location
|
808 |
+
}; // This is a bit of a hack. We have to start listening for location
|
809 |
+
// changes here in the constructor in case there are any <Redirect>s
|
810 |
+
// on the initial render. If there are, they will replace/push when
|
811 |
+
// they mount and since cDM fires in children before parents, we may
|
812 |
+
// get a new location before the <Router> is mounted.
|
813 |
|
814 |
+
_this._isMounted = false;
|
815 |
+
_this._pendingLocation = null;
|
816 |
|
817 |
+
if (!props.staticContext) {
|
818 |
+
_this.unlisten = props.history.listen(function (location) {
|
819 |
+
if (_this._isMounted) {
|
820 |
+
_this.setState({
|
821 |
+
location: location
|
822 |
+
});
|
823 |
+
} else {
|
824 |
+
_this._pendingLocation = location;
|
825 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
826 |
});
|
827 |
}
|
828 |
|
829 |
+
return _this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
830 |
}
|
831 |
|
832 |
+
var _proto = Router.prototype;
|
|
|
|
|
833 |
|
834 |
+
_proto.componentDidMount = function componentDidMount() {
|
835 |
+
this._isMounted = true;
|
|
|
836 |
|
837 |
+
if (this._pendingLocation) {
|
838 |
+
this.setState({
|
839 |
+
location: this._pendingLocation
|
840 |
+
});
|
841 |
}
|
842 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
843 |
|
844 |
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
845 |
+
if (this.unlisten) this.unlisten();
|
846 |
+
};
|
|
|
847 |
|
848 |
+
_proto.render = function render() {
|
849 |
+
return external_React_default.a.createElement(react_router_context.Provider, {
|
850 |
+
value: {
|
851 |
+
history: this.props.history,
|
852 |
+
location: this.state.location,
|
853 |
+
match: Router.computeRootMatch(this.state.location.pathname),
|
854 |
+
staticContext: this.props.staticContext
|
855 |
+
}
|
856 |
+
}, external_React_default.a.createElement(historyContext.Provider, {
|
857 |
+
children: this.props.children || null,
|
858 |
+
value: this.props.history
|
859 |
+
}));
|
860 |
+
};
|
861 |
|
862 |
+
return Router;
|
863 |
+
}(external_React_default.a.Component);
|
|
|
864 |
|
865 |
+
if (false) {}
|
|
|
|
|
866 |
|
867 |
+
/**
|
868 |
+
* The public API for a <Router> that stores location in memory.
|
869 |
+
*/
|
870 |
|
871 |
+
var react_router_MemoryRouter =
|
872 |
+
/*#__PURE__*/
|
873 |
+
function (_React$Component) {
|
874 |
+
Object(inheritsLoose["a" /* default */])(MemoryRouter, _React$Component);
|
875 |
|
876 |
+
function MemoryRouter() {
|
877 |
+
var _this;
|
|
|
|
|
|
|
|
|
|
|
|
|
878 |
|
879 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
880 |
+
args[_key] = arguments[_key];
|
|
|
881 |
}
|
882 |
|
883 |
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
884 |
+
_this.history = Object(esm_history["c" /* createMemoryHistory */])(_this.props);
|
885 |
+
return _this;
|
|
|
|
|
886 |
}
|
887 |
|
888 |
+
var _proto = MemoryRouter.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
|
890 |
+
_proto.render = function render() {
|
891 |
+
return external_React_default.a.createElement(react_router_Router, {
|
892 |
+
history: this.history,
|
893 |
+
children: this.props.children
|
894 |
+
});
|
895 |
+
};
|
896 |
|
897 |
+
return MemoryRouter;
|
898 |
+
}(external_React_default.a.Component);
|
|
|
899 |
|
900 |
+
if (false) {}
|
|
|
|
|
901 |
|
902 |
+
var react_router_Lifecycle =
|
903 |
+
/*#__PURE__*/
|
904 |
+
function (_React$Component) {
|
905 |
+
Object(inheritsLoose["a" /* default */])(Lifecycle, _React$Component);
|
906 |
|
907 |
+
function Lifecycle() {
|
908 |
+
return _React$Component.apply(this, arguments) || this;
|
909 |
}
|
910 |
|
911 |
+
var _proto = Lifecycle.prototype;
|
|
|
|
|
912 |
|
913 |
+
_proto.componentDidMount = function componentDidMount() {
|
914 |
+
if (this.props.onMount) this.props.onMount.call(this, this);
|
915 |
+
};
|
916 |
|
917 |
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
918 |
+
if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
|
919 |
+
};
|
920 |
|
921 |
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
922 |
+
if (this.props.onUnmount) this.props.onUnmount.call(this, this);
|
923 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
924 |
|
925 |
+
_proto.render = function render() {
|
926 |
+
return null;
|
927 |
+
};
|
928 |
|
929 |
+
return Lifecycle;
|
930 |
+
}(external_React_default.a.Component);
|
|
|
|
|
|
|
931 |
|
932 |
+
/**
|
933 |
+
* The public API for prompting the user before navigating away from a screen.
|
934 |
+
*/
|
935 |
|
936 |
+
function Prompt(_ref) {
|
937 |
+
var message = _ref.message,
|
938 |
+
_ref$when = _ref.when,
|
939 |
+
when = _ref$when === void 0 ? true : _ref$when;
|
940 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
941 |
+
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
942 |
+
if (!when || context.staticContext) return null;
|
943 |
+
var method = context.history.block;
|
944 |
+
return external_React_default.a.createElement(react_router_Lifecycle, {
|
945 |
+
onMount: function onMount(self) {
|
946 |
+
self.release = method(message);
|
947 |
+
},
|
948 |
+
onUpdate: function onUpdate(self, prevProps) {
|
949 |
+
if (prevProps.message !== message) {
|
950 |
+
self.release();
|
951 |
+
self.release = method(message);
|
952 |
}
|
953 |
+
},
|
954 |
+
onUnmount: function onUnmount(self) {
|
955 |
+
self.release();
|
956 |
+
},
|
957 |
+
message: message
|
958 |
+
});
|
959 |
+
});
|
960 |
+
}
|
961 |
|
962 |
+
if (false) { var messageType; }
|
|
|
|
|
|
|
963 |
|
964 |
+
var cache = {};
|
965 |
+
var cacheLimit = 10000;
|
966 |
+
var cacheCount = 0;
|
967 |
|
968 |
+
function compilePath(path) {
|
969 |
+
if (cache[path]) return cache[path];
|
970 |
+
var generator = path_to_regexp_default.a.compile(path);
|
971 |
|
972 |
+
if (cacheCount < cacheLimit) {
|
973 |
+
cache[path] = generator;
|
974 |
+
cacheCount++;
|
975 |
+
}
|
|
|
976 |
|
977 |
+
return generator;
|
978 |
+
}
|
979 |
+
/**
|
980 |
+
* Public API for generating a URL pathname from a path and parameters.
|
981 |
+
*/
|
982 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
983 |
|
984 |
+
function generatePath(path, params) {
|
985 |
+
if (path === void 0) {
|
986 |
+
path = "/";
|
987 |
+
}
|
988 |
|
989 |
+
if (params === void 0) {
|
990 |
+
params = {};
|
991 |
+
}
|
|
|
|
|
992 |
|
993 |
+
return path === "/" ? path : compilePath(path)(params, {
|
994 |
+
pretty: true
|
995 |
+
});
|
996 |
+
}
|
|
|
|
|
|
|
997 |
|
998 |
+
/**
|
999 |
+
* The public API for navigating programmatically with a component.
|
1000 |
+
*/
|
1001 |
|
1002 |
+
function Redirect(_ref) {
|
1003 |
+
var computedMatch = _ref.computedMatch,
|
1004 |
+
to = _ref.to,
|
1005 |
+
_ref$push = _ref.push,
|
1006 |
+
push = _ref$push === void 0 ? false : _ref$push;
|
1007 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
1008 |
+
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
1009 |
+
var history = context.history,
|
1010 |
+
staticContext = context.staticContext;
|
1011 |
+
var method = push ? history.push : history.replace;
|
1012 |
+
var location = Object(esm_history["b" /* createLocation */])(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : Object(esm_extends["a" /* default */])({}, to, {
|
1013 |
+
pathname: generatePath(to.pathname, computedMatch.params)
|
1014 |
+
}) : to); // When rendering in a static context,
|
1015 |
+
// set the new location immediately.
|
1016 |
|
1017 |
+
if (staticContext) {
|
1018 |
+
method(location);
|
1019 |
+
return null;
|
1020 |
+
}
|
1021 |
|
1022 |
+
return external_React_default.a.createElement(react_router_Lifecycle, {
|
1023 |
+
onMount: function onMount() {
|
1024 |
+
method(location);
|
1025 |
+
},
|
1026 |
+
onUpdate: function onUpdate(self, prevProps) {
|
1027 |
+
var prevLocation = Object(esm_history["b" /* createLocation */])(prevProps.to);
|
1028 |
|
1029 |
+
if (!Object(esm_history["e" /* locationsAreEqual */])(prevLocation, Object(esm_extends["a" /* default */])({}, location, {
|
1030 |
+
key: prevLocation.key
|
1031 |
+
}))) {
|
1032 |
+
method(location);
|
1033 |
+
}
|
1034 |
+
},
|
1035 |
+
to: to
|
1036 |
});
|
1037 |
+
});
|
1038 |
+
}
|
1039 |
|
1040 |
+
if (false) {}
|
|
|
1041 |
|
1042 |
+
var cache$1 = {};
|
1043 |
+
var cacheLimit$1 = 10000;
|
1044 |
+
var cacheCount$1 = 0;
|
1045 |
|
1046 |
+
function compilePath$1(path, options) {
|
1047 |
+
var cacheKey = "" + options.end + options.strict + options.sensitive;
|
1048 |
+
var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
|
1049 |
+
if (pathCache[path]) return pathCache[path];
|
1050 |
+
var keys = [];
|
1051 |
+
var regexp = path_to_regexp_default()(path, keys, options);
|
1052 |
+
var result = {
|
1053 |
+
regexp: regexp,
|
1054 |
+
keys: keys
|
1055 |
+
};
|
1056 |
|
1057 |
+
if (cacheCount$1 < cacheLimit$1) {
|
1058 |
+
pathCache[path] = result;
|
1059 |
+
cacheCount$1++;
|
|
|
1060 |
}
|
1061 |
|
1062 |
+
return result;
|
1063 |
+
}
|
1064 |
+
/**
|
1065 |
+
* Public API for matching a URL pathname to a path.
|
1066 |
+
*/
|
1067 |
|
|
|
|
|
|
|
|
|
1068 |
|
1069 |
+
function matchPath(pathname, options) {
|
1070 |
+
if (options === void 0) {
|
1071 |
+
options = {};
|
|
|
1072 |
}
|
1073 |
|
1074 |
+
if (typeof options === "string" || Array.isArray(options)) {
|
1075 |
+
options = {
|
1076 |
+
path: options
|
1077 |
+
};
|
1078 |
}
|
1079 |
|
1080 |
+
var _options = options,
|
1081 |
+
path = _options.path,
|
1082 |
+
_options$exact = _options.exact,
|
1083 |
+
exact = _options$exact === void 0 ? false : _options$exact,
|
1084 |
+
_options$strict = _options.strict,
|
1085 |
+
strict = _options$strict === void 0 ? false : _options$strict,
|
1086 |
+
_options$sensitive = _options.sensitive,
|
1087 |
+
sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
|
1088 |
+
var paths = [].concat(path);
|
1089 |
+
return paths.reduce(function (matched, path) {
|
1090 |
+
if (!path && path !== "") return null;
|
1091 |
+
if (matched) return matched;
|
1092 |
|
1093 |
+
var _compilePath = compilePath$1(path, {
|
1094 |
+
end: exact,
|
1095 |
+
strict: strict,
|
1096 |
+
sensitive: sensitive
|
1097 |
+
}),
|
1098 |
+
regexp = _compilePath.regexp,
|
1099 |
+
keys = _compilePath.keys;
|
1100 |
|
1101 |
+
var match = regexp.exec(pathname);
|
1102 |
+
if (!match) return null;
|
1103 |
+
var url = match[0],
|
1104 |
+
values = match.slice(1);
|
1105 |
+
var isExact = pathname === url;
|
1106 |
+
if (exact && !isExact) return null;
|
1107 |
+
return {
|
1108 |
+
path: path,
|
1109 |
+
// the path used to match
|
1110 |
+
url: path === "/" && url === "" ? "/" : url,
|
1111 |
+
// the matched portion of the URL
|
1112 |
+
isExact: isExact,
|
1113 |
+
// whether or not we matched exactly
|
1114 |
+
params: keys.reduce(function (memo, key, index) {
|
1115 |
+
memo[key.name] = values[index];
|
1116 |
+
return memo;
|
1117 |
+
}, {})
|
1118 |
+
};
|
1119 |
+
}, null);
|
1120 |
+
}
|
1121 |
|
1122 |
+
function isEmptyChildren(children) {
|
1123 |
+
return external_React_default.a.Children.count(children) === 0;
|
1124 |
+
}
|
|
|
|
|
1125 |
|
1126 |
+
function evalChildrenDev(children, props, path) {
|
1127 |
+
var value = children(props);
|
1128 |
+
false ? undefined : void 0;
|
1129 |
+
return value || null;
|
1130 |
+
}
|
1131 |
+
/**
|
1132 |
+
* The public API for matching a single path and rendering.
|
1133 |
+
*/
|
1134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1135 |
|
1136 |
+
var react_router_Route =
|
1137 |
+
/*#__PURE__*/
|
1138 |
+
function (_React$Component) {
|
1139 |
+
Object(inheritsLoose["a" /* default */])(Route, _React$Component);
|
1140 |
|
1141 |
+
function Route() {
|
1142 |
+
return _React$Component.apply(this, arguments) || this;
|
1143 |
}
|
1144 |
|
1145 |
+
var _proto = Route.prototype;
|
|
|
|
|
|
|
|
|
|
|
1146 |
|
1147 |
+
_proto.render = function render() {
|
1148 |
+
var _this = this;
|
|
|
|
|
1149 |
|
1150 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context$1) {
|
1151 |
+
!context$1 ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
1152 |
+
var location = _this.props.location || context$1.location;
|
1153 |
+
var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
|
1154 |
+
: _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
1155 |
|
1156 |
+
var props = Object(esm_extends["a" /* default */])({}, context$1, {
|
1157 |
+
location: location,
|
1158 |
+
match: match
|
1159 |
+
});
|
|
|
|
|
|
|
1160 |
|
1161 |
+
var _this$props = _this.props,
|
1162 |
+
children = _this$props.children,
|
1163 |
+
component = _this$props.component,
|
1164 |
+
render = _this$props.render; // Preact uses an empty array as children by
|
1165 |
+
// default, so use null if that's the case.
|
|
|
|
|
1166 |
|
1167 |
+
if (Array.isArray(children) && children.length === 0) {
|
1168 |
+
children = null;
|
1169 |
+
}
|
1170 |
|
1171 |
+
return external_React_default.a.createElement(react_router_context.Provider, {
|
1172 |
+
value: props
|
1173 |
+
}, props.match ? children ? typeof children === "function" ? false ? undefined : children(props) : children : component ? external_React_default.a.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? false ? undefined : children(props) : null);
|
1174 |
+
});
|
1175 |
+
};
|
1176 |
|
1177 |
+
return Route;
|
1178 |
+
}(external_React_default.a.Component);
|
|
|
1179 |
|
1180 |
+
if (false) {}
|
|
|
|
|
|
|
1181 |
|
1182 |
+
function addLeadingSlash(path) {
|
1183 |
+
return path.charAt(0) === "/" ? path : "/" + path;
|
1184 |
+
}
|
1185 |
|
1186 |
+
function addBasename(basename, location) {
|
1187 |
+
if (!basename) return location;
|
1188 |
+
return Object(esm_extends["a" /* default */])({}, location, {
|
1189 |
+
pathname: addLeadingSlash(basename) + location.pathname
|
1190 |
+
});
|
1191 |
+
}
|
1192 |
|
1193 |
+
function stripBasename(basename, location) {
|
1194 |
+
if (!basename) return location;
|
1195 |
+
var base = addLeadingSlash(basename);
|
1196 |
+
if (location.pathname.indexOf(base) !== 0) return location;
|
1197 |
+
return Object(esm_extends["a" /* default */])({}, location, {
|
1198 |
+
pathname: location.pathname.substr(base.length)
|
1199 |
+
});
|
1200 |
+
}
|
1201 |
|
1202 |
+
function createURL(location) {
|
1203 |
+
return typeof location === "string" ? location : Object(esm_history["d" /* createPath */])(location);
|
1204 |
+
}
|
1205 |
|
1206 |
+
function staticHandler(methodName) {
|
1207 |
+
return function () {
|
1208 |
+
false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) ;
|
1209 |
+
};
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
function noop() {}
|
1213 |
+
/**
|
1214 |
+
* The public top-level API for a "static" <Router>, so-called because it
|
1215 |
+
* can't actually change the current location. Instead, it just records
|
1216 |
+
* location changes in a context object. Useful mainly in testing and
|
1217 |
+
* server-rendering scenarios.
|
1218 |
+
*/
|
1219 |
+
|
1220 |
+
|
1221 |
+
var react_router_StaticRouter =
|
1222 |
+
/*#__PURE__*/
|
1223 |
+
function (_React$Component) {
|
1224 |
+
Object(inheritsLoose["a" /* default */])(StaticRouter, _React$Component);
|
1225 |
|
1226 |
+
function StaticRouter() {
|
1227 |
+
var _this;
|
1228 |
|
1229 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1230 |
+
args[_key] = arguments[_key];
|
1231 |
}
|
1232 |
|
1233 |
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1234 |
|
1235 |
+
_this.handlePush = function (location) {
|
1236 |
+
return _this.navigateTo(location, "PUSH");
|
1237 |
+
};
|
1238 |
|
1239 |
+
_this.handleReplace = function (location) {
|
1240 |
+
return _this.navigateTo(location, "REPLACE");
|
1241 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
1242 |
|
1243 |
+
_this.handleListen = function () {
|
1244 |
+
return noop;
|
1245 |
+
};
|
|
|
1246 |
|
1247 |
+
_this.handleBlock = function () {
|
1248 |
+
return noop;
|
1249 |
+
};
|
1250 |
+
|
1251 |
+
return _this;
|
1252 |
}
|
1253 |
|
1254 |
+
var _proto = StaticRouter.prototype;
|
|
|
|
|
|
|
|
|
1255 |
|
1256 |
+
_proto.navigateTo = function navigateTo(location, action) {
|
1257 |
+
var _this$props = this.props,
|
1258 |
+
_this$props$basename = _this$props.basename,
|
1259 |
+
basename = _this$props$basename === void 0 ? "" : _this$props$basename,
|
1260 |
+
_this$props$context = _this$props.context,
|
1261 |
+
context = _this$props$context === void 0 ? {} : _this$props$context;
|
1262 |
+
context.action = action;
|
1263 |
+
context.location = addBasename(basename, Object(esm_history["b" /* createLocation */])(location));
|
1264 |
+
context.url = createURL(context.location);
|
1265 |
+
};
|
1266 |
|
1267 |
+
_proto.render = function render() {
|
1268 |
+
var _this$props2 = this.props,
|
1269 |
+
_this$props2$basename = _this$props2.basename,
|
1270 |
+
basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
|
1271 |
+
_this$props2$context = _this$props2.context,
|
1272 |
+
context = _this$props2$context === void 0 ? {} : _this$props2$context,
|
1273 |
+
_this$props2$location = _this$props2.location,
|
1274 |
+
location = _this$props2$location === void 0 ? "/" : _this$props2$location,
|
1275 |
+
rest = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props2, ["basename", "context", "location"]);
|
1276 |
|
1277 |
+
var history = {
|
1278 |
+
createHref: function createHref(path) {
|
1279 |
+
return addLeadingSlash(basename + createURL(path));
|
1280 |
+
},
|
1281 |
+
action: "POP",
|
1282 |
+
location: stripBasename(basename, Object(esm_history["b" /* createLocation */])(location)),
|
1283 |
+
push: this.handlePush,
|
1284 |
+
replace: this.handleReplace,
|
1285 |
+
go: staticHandler("go"),
|
1286 |
+
goBack: staticHandler("goBack"),
|
1287 |
+
goForward: staticHandler("goForward"),
|
1288 |
+
listen: this.handleListen,
|
1289 |
+
block: this.handleBlock
|
1290 |
+
};
|
1291 |
+
return external_React_default.a.createElement(react_router_Router, Object(esm_extends["a" /* default */])({}, rest, {
|
1292 |
+
history: history,
|
1293 |
+
staticContext: context
|
1294 |
+
}));
|
1295 |
+
};
|
1296 |
|
1297 |
+
return StaticRouter;
|
1298 |
+
}(external_React_default.a.Component);
|
|
|
1299 |
|
1300 |
+
if (false) {}
|
|
|
1301 |
|
1302 |
+
/**
|
1303 |
+
* The public API for rendering the first <Route> that matches.
|
1304 |
+
*/
|
1305 |
|
1306 |
+
var react_router_Switch =
|
1307 |
+
/*#__PURE__*/
|
1308 |
+
function (_React$Component) {
|
1309 |
+
Object(inheritsLoose["a" /* default */])(Switch, _React$Component);
|
1310 |
|
1311 |
+
function Switch() {
|
1312 |
+
return _React$Component.apply(this, arguments) || this;
|
1313 |
+
}
|
1314 |
|
1315 |
+
var _proto = Switch.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1316 |
|
1317 |
+
_proto.render = function render() {
|
1318 |
+
var _this = this;
|
|
|
1319 |
|
1320 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
1321 |
+
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
1322 |
+
var location = _this.props.location || context.location;
|
1323 |
+
var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
|
1324 |
+
// here because toArray adds keys to all child elements and we do not want
|
1325 |
+
// to trigger an unmount/remount for two <Route>s that render the same
|
1326 |
+
// component at different URLs.
|
1327 |
|
1328 |
+
external_React_default.a.Children.forEach(_this.props.children, function (child) {
|
1329 |
+
if (match == null && external_React_default.a.isValidElement(child)) {
|
1330 |
+
element = child;
|
1331 |
+
var path = child.props.path || child.props.from;
|
1332 |
+
match = path ? matchPath(location.pathname, Object(esm_extends["a" /* default */])({}, child.props, {
|
1333 |
+
path: path
|
1334 |
+
})) : context.match;
|
1335 |
+
}
|
1336 |
+
});
|
1337 |
+
return match ? external_React_default.a.cloneElement(element, {
|
1338 |
+
location: location,
|
1339 |
+
computedMatch: match
|
1340 |
+
}) : null;
|
1341 |
+
});
|
1342 |
+
};
|
1343 |
|
1344 |
+
return Switch;
|
1345 |
+
}(external_React_default.a.Component);
|
|
|
1346 |
|
1347 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
1348 |
|
1349 |
+
/**
|
1350 |
+
* A public higher-order component to access the imperative API
|
1351 |
+
*/
|
1352 |
|
1353 |
+
function withRouter(Component) {
|
1354 |
+
var displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
|
|
|
|
|
|
|
|
|
1355 |
|
1356 |
+
var C = function C(props) {
|
1357 |
+
var wrappedComponentRef = props.wrappedComponentRef,
|
1358 |
+
remainingProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, ["wrappedComponentRef"]);
|
1359 |
|
1360 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
1361 |
+
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
1362 |
+
return external_React_default.a.createElement(Component, Object(esm_extends["a" /* default */])({}, remainingProps, context, {
|
1363 |
+
ref: wrappedComponentRef
|
1364 |
+
}));
|
1365 |
+
});
|
1366 |
+
};
|
1367 |
|
1368 |
+
C.displayName = displayName;
|
1369 |
+
C.WrappedComponent = Component;
|
|
|
|
|
1370 |
|
1371 |
+
if (false) {}
|
|
|
|
|
|
|
1372 |
|
1373 |
+
return hoist_non_react_statics_cjs_default()(C, Component);
|
1374 |
+
}
|
|
|
|
|
|
|
|
|
|
|
1375 |
|
1376 |
+
var useContext = external_React_default.a.useContext;
|
1377 |
+
function useHistory() {
|
1378 |
+
if (false) {}
|
|
|
|
|
1379 |
|
1380 |
+
return useContext(historyContext);
|
1381 |
+
}
|
1382 |
+
function useLocation() {
|
1383 |
+
if (false) {}
|
1384 |
|
1385 |
+
return useContext(react_router_context).location;
|
1386 |
+
}
|
1387 |
+
function useParams() {
|
1388 |
+
if (false) {}
|
1389 |
|
1390 |
+
var match = useContext(react_router_context).match;
|
1391 |
+
return match ? match.params : {};
|
1392 |
+
}
|
1393 |
+
function useRouteMatch(path) {
|
1394 |
+
if (false) {}
|
|
|
|
|
1395 |
|
1396 |
+
var location = useLocation();
|
1397 |
+
var match = useContext(react_router_context).match;
|
1398 |
+
return path ? matchPath(location.pathname, path) : match;
|
1399 |
+
}
|
1400 |
|
1401 |
+
if (false) { var secondaryBuildName, initialBuildName, buildNames, react_router_key, global; }
|
|
|
|
|
1402 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1403 |
|
1404 |
+
//# sourceMappingURL=react-router.js.map
|
|
|
|
|
1405 |
|
1406 |
+
// EXTERNAL MODULE: external "lodash"
|
1407 |
+
var external_lodash_ = __webpack_require__(3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1408 |
|
1409 |
+
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
1410 |
+
var lib = __webpack_require__(32);
|
1411 |
|
1412 |
+
// EXTERNAL MODULE: external ["wc","components"]
|
1413 |
+
var external_wc_components_ = __webpack_require__(21);
|
|
|
|
|
1414 |
|
1415 |
+
// EXTERNAL MODULE: external ["wc","navigation"]
|
1416 |
+
var external_wc_navigation_ = __webpack_require__(12);
|
1417 |
|
1418 |
+
// EXTERNAL MODULE: ./packages/wc-admin-settings/build-module/index.js
|
1419 |
+
var build_module = __webpack_require__(15);
|
|
|
|
|
|
|
1420 |
|
1421 |
+
// EXTERNAL MODULE: external ["wc","data"]
|
1422 |
+
var external_wc_data_ = __webpack_require__(11);
|
|
|
|
|
|
|
1423 |
|
1424 |
+
// EXTERNAL MODULE: external ["wc","tracks"]
|
1425 |
+
var external_wc_tracks_ = __webpack_require__(16);
|
1426 |
|
1427 |
+
// EXTERNAL MODULE: external ["wc","notices"]
|
1428 |
+
var external_wc_notices_ = __webpack_require__(281);
|
|
|
|
|
1429 |
|
1430 |
+
// EXTERNAL MODULE: external ["wp","plugins"]
|
1431 |
+
var external_wp_plugins_ = __webpack_require__(116);
|
1432 |
|
1433 |
+
// EXTERNAL MODULE: ./client/layout/style.scss
|
1434 |
+
var layout_style = __webpack_require__(282);
|
|
|
|
|
1435 |
|
1436 |
+
// EXTERNAL MODULE: external ["wp","hooks"]
|
1437 |
+
var external_wp_hooks_ = __webpack_require__(30);
|
|
|
|
|
1438 |
|
1439 |
+
// EXTERNAL MODULE: external ["wp","i18n"]
|
1440 |
+
var external_wp_i18n_ = __webpack_require__(2);
|
1441 |
|
1442 |
+
// EXTERNAL MODULE: ./client/analytics/report/get-reports.js
|
1443 |
+
var get_reports = __webpack_require__(117);
|
1444 |
|
1445 |
+
// EXTERNAL MODULE: ./client/dashboard/utils.js
|
1446 |
+
var utils = __webpack_require__(59);
|
1447 |
|
1448 |
+
// CONCATENATED MODULE: ./client/layout/controller.js
|
|
|
|
|
|
|
|
|
1449 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1450 |
|
1451 |
+
/**
|
1452 |
+
* External dependencies
|
1453 |
+
*/
|
1454 |
|
|
|
|
|
1455 |
|
|
|
|
|
|
|
|
|
|
|
1456 |
|
|
|
|
|
|
|
1457 |
|
|
|
|
|
1458 |
|
|
|
1459 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1460 |
|
|
|
|
|
|
|
1461 |
|
1462 |
+
/**
|
1463 |
+
* Internal dependencies
|
1464 |
+
*/
|
1465 |
|
|
|
|
|
|
|
|
|
|
|
1466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1467 |
|
1468 |
+
const AnalyticsReport = Object(external_wp_element_["lazy"])(() => __webpack_require__.e(/* import() | analytics-report */ 6).then(__webpack_require__.bind(null, 597)));
|
1469 |
+
const AnalyticsSettings = Object(external_wp_element_["lazy"])(() => __webpack_require__.e(/* import() | analytics-settings */ 17).then(__webpack_require__.bind(null, 606)));
|
1470 |
+
const Dashboard = Object(external_wp_element_["lazy"])(() => __webpack_require__.e(/* import() | dashboard */ 25).then(__webpack_require__.bind(null, 598)));
|
1471 |
+
const Homescreen = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | homescreen */[__webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(31)]).then(__webpack_require__.bind(null, 604)));
|
1472 |
+
const MarketingOverview = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | marketing-overview */[__webpack_require__.e(2), __webpack_require__.e(34)]).then(__webpack_require__.bind(null, 607)));
|
1473 |
+
const ProfileWizard = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | profile-wizard */[__webpack_require__.e(1), __webpack_require__.e(46)]).then(__webpack_require__.bind(null, 605)));
|
1474 |
+
const SettingsGroup = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | profile-wizard */[__webpack_require__.e(1), __webpack_require__.e(46)]).then(__webpack_require__.bind(null, 599)));
|
1475 |
+
const PAGES_FILTER = 'woocommerce_admin_pages_list';
|
1476 |
+
const getPages = () => {
|
1477 |
+
const pages = [];
|
1478 |
+
const initialBreadcrumbs = [['', wcSettings.woocommerceTranslation]];
|
1479 |
+
pages.push({
|
1480 |
+
container: Homescreen,
|
1481 |
+
path: '/',
|
1482 |
+
breadcrumbs: [...initialBreadcrumbs, Object(external_wp_i18n_["__"])('Home', 'woocommerce-admin')],
|
1483 |
+
wpOpenMenu: 'toplevel_page_woocommerce',
|
1484 |
+
navArgs: {
|
1485 |
+
id: 'woocommerce-home'
|
1486 |
+
},
|
1487 |
+
capability: 'manage_woocommerce'
|
1488 |
+
});
|
1489 |
|
1490 |
+
if (window.wcAdminFeatures.analytics) {
|
1491 |
+
pages.push({
|
1492 |
+
container: Dashboard,
|
1493 |
+
path: '/analytics/overview',
|
1494 |
+
breadcrumbs: [...initialBreadcrumbs, ['/analytics/overview', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Overview', 'woocommerce-admin')],
|
1495 |
+
wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
|
1496 |
+
navArgs: {
|
1497 |
+
id: 'woocommerce-analytics-overview'
|
1498 |
+
},
|
1499 |
+
capability: 'view_woocommerce_reports'
|
1500 |
+
});
|
1501 |
+
pages.push({
|
1502 |
+
container: AnalyticsSettings,
|
1503 |
+
path: '/analytics/settings',
|
1504 |
+
breadcrumbs: [...initialBreadcrumbs, ['/analytics/revenue', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Settings', 'woocommerce-admin')],
|
1505 |
+
wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
|
1506 |
+
navArgs: {
|
1507 |
+
id: 'woocommerce-analytics-settings'
|
1508 |
+
},
|
1509 |
+
capability: 'view_woocommerce_reports'
|
1510 |
+
});
|
1511 |
+
pages.push({
|
1512 |
+
container: AnalyticsReport,
|
1513 |
+
path: '/customers',
|
1514 |
+
breadcrumbs: [...initialBreadcrumbs, Object(external_wp_i18n_["__"])('Customers', 'woocommerce-admin')],
|
1515 |
+
wpOpenMenu: 'toplevel_page_woocommerce',
|
1516 |
+
navArgs: {
|
1517 |
+
id: 'woocommerce-analytics-customers'
|
1518 |
+
},
|
1519 |
+
capability: 'view_woocommerce_reports'
|
1520 |
+
});
|
1521 |
+
pages.push({
|
1522 |
+
container: AnalyticsReport,
|
1523 |
+
path: '/analytics/:report',
|
1524 |
+
breadcrumbs: ({
|
1525 |
+
match
|
1526 |
+
}) => {
|
1527 |
+
const report = Object(external_lodash_["find"])(Object(get_reports["a" /* default */])(), {
|
1528 |
+
report: match.params.report
|
1529 |
+
});
|
1530 |
|
1531 |
+
if (!report) {
|
1532 |
+
return [];
|
1533 |
+
}
|
|
|
|
|
|
|
1534 |
|
1535 |
+
return [...initialBreadcrumbs, ['/analytics/revenue', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], report.title];
|
1536 |
+
},
|
1537 |
+
wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
|
1538 |
+
capability: 'view_woocommerce_reports'
|
1539 |
+
});
|
1540 |
}
|
1541 |
|
1542 |
+
if (window.wcAdminFeatures.marketing) {
|
1543 |
+
pages.push({
|
1544 |
+
container: MarketingOverview,
|
1545 |
+
path: '/marketing',
|
1546 |
+
breadcrumbs: [...initialBreadcrumbs, ['/marketing', Object(external_wp_i18n_["__"])('Marketing', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Overview', 'woocommerce-admin')],
|
1547 |
+
wpOpenMenu: 'toplevel_page_woocommerce-marketing',
|
1548 |
+
navArgs: {
|
1549 |
+
id: 'woocommerce-marketing-overview'
|
1550 |
+
},
|
1551 |
+
capability: 'view_woocommerce_reports'
|
1552 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1553 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1554 |
|
1555 |
+
if (window.wcAdminFeatures.onboarding) {
|
1556 |
+
pages.push({
|
1557 |
+
container: ProfileWizard,
|
1558 |
+
path: '/setup-wizard',
|
1559 |
+
breadcrumbs: [...initialBreadcrumbs, ['/setup-wizard', Object(external_wp_i18n_["__"])('Setup Wizard', 'woocommerce-admin')]],
|
1560 |
+
capability: 'manage_woocommerce'
|
1561 |
+
});
|
1562 |
}
|
1563 |
|
1564 |
+
if (window.wcAdminFeatures.settings) {
|
1565 |
+
pages.push({
|
1566 |
+
container: SettingsGroup,
|
1567 |
+
path: '/settings/:page',
|
1568 |
+
breadcrumbs: ({
|
1569 |
+
match
|
1570 |
+
}) => {
|
1571 |
+
// @todo This might need to be refactored to retreive groups via data store.
|
1572 |
+
const settingsPages = Object(build_module["f" /* getSetting */])('settingsPages');
|
1573 |
+
const page = settingsPages[match.params.page];
|
1574 |
|
1575 |
+
if (!page) {
|
1576 |
+
return [];
|
1577 |
+
}
|
1578 |
|
1579 |
+
return [...initialBreadcrumbs, [settingsPages.general ? '/settings/general' : `/settings/${Object.keys(settingsPages)[0]}`, Object(external_wp_i18n_["__"])('Settings', 'woocommerce-admin')], page];
|
1580 |
+
},
|
1581 |
+
wpOpenMenu: 'toplevel_page_woocommerce',
|
1582 |
+
capability: 'manage_woocommerce'
|
1583 |
+
});
|
1584 |
+
}
|
1585 |
|
1586 |
+
return Object(external_wp_hooks_["applyFilters"])(PAGES_FILTER, pages);
|
1587 |
+
};
|
1588 |
+
class controller_Controller extends external_wp_element_["Component"] {
|
1589 |
+
componentDidMount() {
|
1590 |
+
window.document.documentElement.scrollTop = 0;
|
1591 |
+
window.document.body.classList.remove('woocommerce-admin-is-loading');
|
1592 |
+
}
|
1593 |
|
1594 |
+
componentDidUpdate(prevProps) {
|
1595 |
+
const prevBaseQuery = Object(external_lodash_["omit"])(prevProps.query, 'chartType', 'filter', 'paged');
|
1596 |
+
const baseQuery = Object(external_lodash_["omit"])(this.props.query, 'chartType', 'filter', 'paged');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1597 |
|
1598 |
+
if (prevProps.query.paged > 1 && !Object(external_lodash_["isEqual"])(prevBaseQuery, baseQuery)) {
|
1599 |
+
Object(external_wc_navigation_["getHistory"])().replace(Object(external_wc_navigation_["getNewPath"])({
|
1600 |
+
paged: 1
|
1601 |
+
}));
|
1602 |
}
|
1603 |
|
1604 |
+
if (prevProps.match.url !== this.props.match.url) {
|
1605 |
+
window.document.documentElement.scrollTop = 0;
|
|
|
|
|
1606 |
}
|
1607 |
}
|
1608 |
|
1609 |
+
render() {
|
1610 |
+
const {
|
1611 |
+
page,
|
1612 |
+
match,
|
1613 |
+
query
|
1614 |
+
} = this.props;
|
1615 |
+
const {
|
1616 |
+
url,
|
1617 |
+
params
|
1618 |
+
} = match;
|
1619 |
+
window.wpNavMenuUrlUpdate(query);
|
1620 |
+
window.wpNavMenuClassChange(page, url);
|
1621 |
+
return Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
1622 |
+
fallback: Object(external_wp_element_["createElement"])(external_wc_components_["Spinner"], null)
|
1623 |
+
}, Object(external_wp_element_["createElement"])(page.container, {
|
1624 |
+
params: params,
|
1625 |
+
path: url,
|
1626 |
+
pathMatch: page.path,
|
1627 |
+
query: query
|
1628 |
+
}));
|
1629 |
}
|
1630 |
|
1631 |
+
}
|
1632 |
+
/**
|
1633 |
+
* Update an anchor's link in sidebar to include persisted queries. Leave excluded screens
|
1634 |
+
* as is.
|
1635 |
+
*
|
1636 |
+
* @param {HTMLElement} item - Sidebar anchor link.
|
1637 |
+
* @param {Object} nextQuery - A query object to be added to updated hrefs.
|
1638 |
+
* @param {Array} excludedScreens - wc-admin screens to avoid updating.
|
1639 |
+
*/
|
1640 |
|
1641 |
+
function updateLinkHref(item, nextQuery, excludedScreens) {
|
1642 |
+
if (Object(utils["f" /* isWCAdmin */])(item.href)) {
|
1643 |
+
const search = Object(external_lodash_["last"])(item.href.split('?'));
|
1644 |
+
const query = Object(lib["parse"])(search);
|
1645 |
+
const path = query.path || 'homescreen';
|
1646 |
+
const screen = Object(external_wc_navigation_["getScreenFromPath"])(path);
|
1647 |
+
const isExcludedScreen = excludedScreens.includes(screen);
|
1648 |
+
const href = 'admin.php?' + Object(lib["stringify"])(Object.assign(query, isExcludedScreen ? {} : nextQuery)); // Replace the href so you can see the url on hover.
|
1649 |
|
1650 |
+
item.href = href;
|
|
|
|
|
1651 |
|
1652 |
+
item.onclick = e => {
|
1653 |
+
e.preventDefault();
|
1654 |
+
Object(external_wc_navigation_["getHistory"])().push(href);
|
1655 |
+
};
|
1656 |
}
|
1657 |
+
} // Update's wc-admin links in wp-admin menu
|
1658 |
|
1659 |
+
window.wpNavMenuUrlUpdate = function (query) {
|
1660 |
+
const nextQuery = Object(external_wc_navigation_["getPersistedQuery"])(query);
|
1661 |
+
const excludedScreens = Object(external_wc_navigation_["getQueryExcludedScreens"])();
|
1662 |
+
Array.from(document.querySelectorAll('#adminmenu a')).forEach(item => updateLinkHref(item, nextQuery, excludedScreens));
|
1663 |
+
}; // When the route changes, we need to update wp-admin's menu with the correct section & current link
|
1664 |
|
|
|
|
|
1665 |
|
1666 |
+
window.wpNavMenuClassChange = function (page, url) {
|
1667 |
+
Array.from(document.getElementsByClassName('current')).forEach(function (item) {
|
1668 |
+
item.classList.remove('current');
|
1669 |
+
});
|
1670 |
+
const submenu = Array.from(document.querySelectorAll('.wp-has-current-submenu'));
|
1671 |
+
submenu.forEach(function (element) {
|
1672 |
+
element.classList.remove('wp-has-current-submenu');
|
1673 |
+
element.classList.remove('wp-menu-open');
|
1674 |
+
element.classList.remove('selected');
|
1675 |
+
element.classList.add('wp-not-current-submenu');
|
1676 |
+
element.classList.add('menu-top');
|
1677 |
+
});
|
1678 |
+
const pageUrl = url === '/' ? 'admin.php?page=wc-admin' : 'admin.php?page=wc-admin&path=' + encodeURIComponent(url);
|
1679 |
+
const currentItemsSelector = url === '/' ? `li > a[href$="${pageUrl}"], li > a[href*="${pageUrl}?"]` : `li > a[href*="${pageUrl}"]`;
|
1680 |
+
const currentItems = document.querySelectorAll(currentItemsSelector);
|
1681 |
+
Array.from(currentItems).forEach(function (item) {
|
1682 |
+
item.parentElement.classList.add('current');
|
1683 |
+
});
|
1684 |
|
1685 |
+
if (page.wpOpenMenu) {
|
1686 |
+
const currentMenu = document.querySelector('#' + page.wpOpenMenu);
|
|
|
|
|
|
|
1687 |
|
1688 |
+
if (currentMenu) {
|
1689 |
+
currentMenu.classList.remove('wp-not-current-submenu');
|
1690 |
+
currentMenu.classList.add('wp-has-current-submenu');
|
1691 |
+
currentMenu.classList.add('wp-menu-open');
|
1692 |
+
currentMenu.classList.add('current');
|
1693 |
}
|
|
|
|
|
|
|
1694 |
}
|
1695 |
|
1696 |
+
const wpWrap = document.querySelector('#wpwrap');
|
1697 |
+
wpWrap.classList.remove('wp-responsive-open');
|
1698 |
+
};
|
1699 |
+
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
1700 |
+
var classnames = __webpack_require__(6);
|
1701 |
+
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
1702 |
|
1703 |
+
// EXTERNAL MODULE: external ["wp","htmlEntities"]
|
1704 |
+
var external_wp_htmlEntities_ = __webpack_require__(28);
|
|
|
|
|
|
|
|
|
|
|
1705 |
|
1706 |
+
// EXTERNAL MODULE: external ["wc","experimental"]
|
1707 |
+
var external_wc_experimental_ = __webpack_require__(20);
|
1708 |
|
1709 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js + 2 modules
|
1710 |
+
var build_module_icon = __webpack_require__(115);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1711 |
|
1712 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
|
1713 |
+
var chevron_left = __webpack_require__(290);
|
1714 |
|
1715 |
+
// EXTERNAL MODULE: external ["wp","keycodes"]
|
1716 |
+
var external_wp_keycodes_ = __webpack_require__(27);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1717 |
|
1718 |
+
// EXTERNAL MODULE: ./client/header/style.scss
|
1719 |
+
var header_style = __webpack_require__(283);
|
1720 |
|
1721 |
+
// EXTERNAL MODULE: external ["wp","primitives"]
|
1722 |
+
var external_wp_primitives_ = __webpack_require__(8);
|
|
|
1723 |
|
1724 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/inbox.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1725 |
|
|
|
|
|
1726 |
|
1727 |
+
/**
|
1728 |
+
* WordPress dependencies
|
1729 |
+
*/
|
|
|
|
|
|
|
1730 |
|
1731 |
+
var inbox_inbox = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
|
1732 |
+
xmlns: "http://www.w3.org/2000/svg",
|
1733 |
+
viewBox: "0 0 24 24"
|
1734 |
+
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
1735 |
+
fillRule: "evenodd",
|
1736 |
+
d: "M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z",
|
1737 |
+
clipRule: "evenodd"
|
1738 |
+
}));
|
1739 |
+
/* harmony default export */ var library_inbox = (inbox_inbox);
|
1740 |
+
//# sourceMappingURL=inbox.js.map
|
1741 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/help.js
|
1742 |
|
|
|
|
|
|
|
1743 |
|
1744 |
+
/**
|
1745 |
+
* WordPress dependencies
|
1746 |
+
*/
|
|
|
|
|
|
|
1747 |
|
1748 |
+
var help_help = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
|
1749 |
+
xmlns: "http://www.w3.org/2000/svg",
|
1750 |
+
viewBox: "0 0 24 24"
|
1751 |
+
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
1752 |
+
d: "M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"
|
1753 |
+
}));
|
1754 |
+
/* harmony default export */ var library_help = (help_help);
|
1755 |
+
//# sourceMappingURL=help.js.map
|
1756 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
|
1757 |
+
var external = __webpack_require__(496);
|
1758 |
|
1759 |
+
// EXTERNAL MODULE: ./client/header/activity-panel/style.scss
|
1760 |
+
var activity_panel_style = __webpack_require__(284);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1761 |
|
1762 |
+
// EXTERNAL MODULE: ./client/inbox-panel/utils.js
|
1763 |
+
var inbox_panel_utils = __webpack_require__(164);
|
|
|
1764 |
|
1765 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/unread-indicators.js
|
1766 |
+
/**
|
1767 |
+
* External dependencies
|
1768 |
+
*/
|
1769 |
|
|
|
|
|
|
|
1770 |
|
1771 |
+
/**
|
1772 |
+
* Internal dependencies
|
1773 |
+
*/
|
|
|
|
|
|
|
1774 |
|
|
|
|
|
1775 |
|
1776 |
+
const UNREAD_NOTES_QUERY = {
|
1777 |
+
page: 1,
|
1778 |
+
per_page: external_wc_data_["QUERY_DEFAULTS"].pageSize,
|
1779 |
+
status: 'unactioned',
|
1780 |
+
type: external_wc_data_["QUERY_DEFAULTS"].noteTypes,
|
1781 |
+
orderby: 'date',
|
1782 |
+
order: 'desc'
|
1783 |
+
};
|
1784 |
+
function isNotesPanelVisible(select) {
|
1785 |
+
const {
|
1786 |
+
getNotes,
|
1787 |
+
getNotesError,
|
1788 |
+
isResolving
|
1789 |
+
} = select(external_wc_data_["NOTES_STORE_NAME"]);
|
1790 |
+
const {
|
1791 |
+
getCurrentUser
|
1792 |
+
} = select(external_wc_data_["USER_STORE_NAME"]);
|
1793 |
+
const userData = getCurrentUser();
|
1794 |
+
const lastRead = parseInt(userData && userData.woocommerce_meta && userData.woocommerce_meta.activity_panel_inbox_last_read, 10);
|
1795 |
|
1796 |
+
if (!lastRead) {
|
1797 |
+
return null;
|
1798 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1799 |
|
1800 |
+
getNotes(UNREAD_NOTES_QUERY);
|
1801 |
+
const isError = Boolean(getNotesError('getNotes', [UNREAD_NOTES_QUERY]));
|
1802 |
+
const isRequesting = isResolving('getNotes', [UNREAD_NOTES_QUERY]);
|
|
|
|
|
|
|
1803 |
|
1804 |
+
if (isError || isRequesting) {
|
1805 |
+
return null;
|
1806 |
+
}
|
1807 |
|
1808 |
+
const latestNotes = getNotes(UNREAD_NOTES_QUERY);
|
1809 |
+
const unreadNotesCount = Object(inbox_panel_utils["a" /* getUnreadNotesCount */])(latestNotes, lastRead);
|
1810 |
+
return unreadNotesCount > 0;
|
1811 |
+
}
|
1812 |
+
function getLowStockCount() {
|
1813 |
+
return Object(build_module["f" /* getSetting */])('lowStockCount', 0);
|
1814 |
+
}
|
1815 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/tab/index.js
|
1816 |
|
|
|
|
|
1817 |
|
1818 |
+
/**
|
1819 |
+
* External dependencies
|
1820 |
+
*/
|
|
|
|
|
|
|
|
|
1821 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1822 |
|
|
|
|
|
|
|
1823 |
|
1824 |
+
const Tab = ({
|
1825 |
+
icon,
|
1826 |
+
title,
|
1827 |
+
name,
|
1828 |
+
unread,
|
1829 |
+
selected,
|
1830 |
+
isPanelOpen,
|
1831 |
+
onTabClick
|
1832 |
+
}) => {
|
1833 |
+
const className = classnames_default()('woocommerce-layout__activity-panel-tab', {
|
1834 |
+
'is-active': isPanelOpen && selected,
|
1835 |
+
'has-unread': unread
|
1836 |
+
});
|
1837 |
+
const tabKey = `activity-panel-tab-${name}`;
|
1838 |
+
return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
1839 |
+
role: "tab",
|
1840 |
+
className: className,
|
1841 |
+
"aria-selected": selected,
|
1842 |
+
"aria-controls": `activity-panel-${name}`,
|
1843 |
+
key: tabKey,
|
1844 |
+
id: tabKey,
|
1845 |
+
onClick: () => {
|
1846 |
+
onTabClick(name);
|
1847 |
+
}
|
1848 |
+
}, icon, title, ' ', unread && Object(external_wp_element_["createElement"])("span", {
|
1849 |
+
className: "screen-reader-text"
|
1850 |
+
}, Object(external_wp_i18n_["__"])('unread activity', 'woocommerce-admin')));
|
1851 |
+
};
|
1852 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/tabs/index.js
|
1853 |
|
|
|
1854 |
|
|
|
|
|
1855 |
|
1856 |
+
/**
|
1857 |
+
* External dependencies
|
1858 |
+
*/
|
|
|
|
|
1859 |
|
|
|
|
|
|
|
1860 |
|
|
|
|
|
|
|
|
|
1861 |
|
1862 |
+
/**
|
1863 |
+
* Internal dependencies
|
1864 |
+
*/
|
|
|
|
|
1865 |
|
|
|
|
|
|
|
|
|
|
|
1866 |
|
1867 |
+
const Tabs = ({
|
1868 |
+
tabs,
|
1869 |
+
onTabClick,
|
1870 |
+
selectedTab: selectedTabName,
|
1871 |
+
tabOpen = false
|
1872 |
+
}) => {
|
1873 |
+
const [{
|
1874 |
+
tabOpen: tabIsOpenState,
|
1875 |
+
currentTab
|
1876 |
+
}, setTabState] = Object(external_wp_element_["useState"])({
|
1877 |
+
tabOpen,
|
1878 |
+
currentTab: selectedTabName
|
1879 |
+
}); // Keep state synced with props
|
1880 |
|
1881 |
+
Object(external_wp_element_["useEffect"])(() => {
|
1882 |
+
setTabState({
|
1883 |
+
tabOpen,
|
1884 |
+
currentTab: selectedTabName
|
1885 |
+
});
|
1886 |
+
}, [tabOpen, selectedTabName]);
|
1887 |
+
return Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], {
|
1888 |
+
role: "tablist",
|
1889 |
+
orientation: "horizontal",
|
1890 |
+
className: "woocommerce-layout__activity-panel-tabs"
|
1891 |
+
}, tabs && tabs.map((tab, i) => {
|
1892 |
+
if (tab.component) {
|
1893 |
+
const {
|
1894 |
+
component: Comp,
|
1895 |
+
options
|
1896 |
+
} = tab;
|
1897 |
+
return Object(external_wp_element_["createElement"])(Comp, extends_default()({
|
1898 |
+
key: i
|
1899 |
+
}, options));
|
1900 |
}
|
|
|
|
|
1901 |
|
1902 |
+
return Object(external_wp_element_["createElement"])(Tab, extends_default()({
|
1903 |
+
key: i,
|
1904 |
+
index: i,
|
1905 |
+
isPanelOpen: tabIsOpenState,
|
1906 |
+
selected: currentTab === tab.name
|
1907 |
+
}, tab, {
|
1908 |
+
onTabClick: () => {
|
1909 |
+
const isTabOpen = currentTab === tab.name || currentTab === '' ? !tabIsOpenState : true; // If a panel is being opened, or if an existing panel is already open and a different one is being opened, record a track.
|
1910 |
|
1911 |
+
if (!isTabOpen || currentTab !== tab.name) {
|
1912 |
+
Object(external_wc_tracks_["recordEvent"])('activity_panel_open', {
|
1913 |
+
tab: tab.name
|
1914 |
+
});
|
1915 |
+
}
|
1916 |
|
1917 |
+
setTabState({
|
1918 |
+
tabOpen: isTabOpen,
|
1919 |
+
currentTab: tab.name
|
1920 |
+
});
|
1921 |
+
onTabClick(tab, isTabOpen);
|
1922 |
+
}
|
1923 |
+
}));
|
1924 |
+
}));
|
1925 |
+
};
|
1926 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/setup-progress.js
|
1927 |
|
1928 |
+
const SetupProgress = () => Object(external_wp_element_["createElement"])("svg", {
|
1929 |
+
className: "woocommerce-layout__activity-panel-tab-icon setup-progress",
|
1930 |
+
width: "18",
|
1931 |
+
height: "18",
|
1932 |
+
viewBox: "0 0 24 24",
|
1933 |
+
fill: "none",
|
1934 |
+
xmlns: "http://www.w3.org/2000/svg"
|
1935 |
+
}, Object(external_wp_element_["createElement"])("path", {
|
1936 |
+
d: "M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",
|
1937 |
+
stroke: "#DCDCDE",
|
1938 |
+
strokeWidth: "2"
|
1939 |
+
}), Object(external_wp_element_["createElement"])("path", {
|
1940 |
+
d: "M4 12V12C4 16.4183 7.58172 20 12 20V20C16.4183 20 20 16.4183 20 12V12C20 7.58172 16.4183 4 12 4V4",
|
1941 |
+
strokeWidth: "2",
|
1942 |
+
strokeLinecap: "round"
|
1943 |
+
}));
|
1944 |
+
// EXTERNAL MODULE: ./client/header/activity-panel/display-options/index.js + 3 modules
|
1945 |
+
var display_options = __webpack_require__(252);
|
1946 |
|
1947 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
|
1948 |
+
var library_close = __webpack_require__(493);
|
|
|
|
|
|
|
|
|
|
|
1949 |
|
1950 |
+
// EXTERNAL MODULE: ./client/header/activity-panel/highlight-tooltip/style.scss
|
1951 |
+
var highlight_tooltip_style = __webpack_require__(285);
|
|
|
|
|
|
|
1952 |
|
1953 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/highlight-tooltip/index.js
|
|
|
|
|
|
|
|
|
1954 |
|
|
|
|
|
1955 |
|
1956 |
+
/**
|
1957 |
+
* External dependencies
|
1958 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1959 |
|
|
|
|
|
1960 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1961 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1962 |
|
|
|
1963 |
|
|
|
|
|
|
|
|
|
|
|
1964 |
|
1965 |
+
/**
|
1966 |
+
* Internal dependencies
|
1967 |
+
*/
|
|
|
1968 |
|
|
|
|
|
|
|
|
|
1969 |
|
1970 |
+
const SHOW_CLASS = 'highlight-tooltip__show';
|
|
|
|
|
|
|
1971 |
|
1972 |
+
function HighlightTooltip({
|
1973 |
+
title,
|
1974 |
+
closeButtonText,
|
1975 |
+
content,
|
1976 |
+
show = true,
|
1977 |
+
id,
|
1978 |
+
onClose,
|
1979 |
+
delay,
|
1980 |
+
onShow = external_lodash_["noop"],
|
1981 |
+
useAnchor = false
|
1982 |
+
}) {
|
1983 |
+
const [showHighlight, setShowHighlight] = Object(external_wp_element_["useState"])(delay > 0 ? null : show);
|
1984 |
+
const [node, setNode] = Object(external_wp_element_["useState"])(null);
|
1985 |
+
const [anchorRect, setAnchorRect] = Object(external_wp_element_["useState"])(null);
|
1986 |
+
Object(external_wp_element_["useEffect"])(() => {
|
1987 |
+
const element = document.getElementById(id);
|
1988 |
+
let container, parent;
|
1989 |
|
1990 |
+
if (element && !node) {
|
1991 |
+
// Add tooltip container
|
1992 |
+
if (!useAnchor) {
|
1993 |
+
parent = element.parentElement;
|
|
|
1994 |
} else {
|
1995 |
+
parent = document.createElement('div');
|
1996 |
+
document.body.appendChild(parent);
|
|
|
|
|
|
|
1997 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1998 |
|
1999 |
+
container = document.createElement('div');
|
2000 |
+
container.classList.add('highlight-tooltip__container');
|
2001 |
+
parent.appendChild(container);
|
2002 |
+
setNode(container);
|
2003 |
+
}
|
2004 |
|
2005 |
+
const timeoutId = triggerShowTooltip(container);
|
2006 |
+
return () => {
|
2007 |
+
if (container) {
|
2008 |
+
const parentElement = container.parentElement;
|
2009 |
+
parentElement.removeChild(container);
|
2010 |
|
2011 |
+
if (useAnchor) {
|
2012 |
+
parentElement.remove();
|
2013 |
+
}
|
2014 |
+
}
|
2015 |
|
2016 |
+
if (timeoutId) {
|
2017 |
+
clearTimeout(timeoutId);
|
2018 |
+
}
|
2019 |
+
};
|
2020 |
+
}, []);
|
2021 |
+
Object(external_wp_element_["useEffect"])(() => {
|
2022 |
+
if (!showHighlight && node) {
|
2023 |
+
node.classList.remove(SHOW_CLASS);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024 |
}
|
2025 |
+
}, [showHighlight]);
|
2026 |
+
Object(external_wp_element_["useEffect"])(() => {
|
2027 |
+
if (show !== showHighlight && showHighlight !== null && node) {
|
2028 |
+
setShowHighlight(show);
|
2029 |
|
2030 |
+
if (!show) {
|
2031 |
+
node.classList.remove(SHOW_CLASS);
|
2032 |
+
} else if (node) {
|
2033 |
+
triggerShowTooltip(node);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2034 |
}
|
2035 |
}
|
2036 |
+
}, [show]);
|
2037 |
+
Object(external_wp_element_["useLayoutEffect"])(() => {
|
2038 |
+
window.addEventListener('resize', updateSize);
|
2039 |
+
return () => window.removeEventListener('resize', updateSize);
|
2040 |
+
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2041 |
|
2042 |
+
function updateSize() {
|
2043 |
+
if (useAnchor) {
|
2044 |
+
const element = document.getElementById(id);
|
2045 |
+
setAnchorRect(element.getBoundingClientRect());
|
2046 |
}
|
2047 |
+
}
|
2048 |
|
2049 |
+
const triggerShowTooltip = container => {
|
2050 |
+
let timeoutId = null;
|
2051 |
|
2052 |
+
if (delay > 0) {
|
2053 |
+
timeoutId = setTimeout(() => {
|
2054 |
+
timeoutId = null;
|
2055 |
+
showTooltip(container);
|
2056 |
+
}, delay);
|
2057 |
+
} else if (!showHighlight) {
|
2058 |
+
showTooltip(container);
|
2059 |
+
}
|
2060 |
|
2061 |
+
return timeoutId;
|
2062 |
+
};
|
2063 |
|
2064 |
+
const showTooltip = container => {
|
2065 |
+
const element = document.getElementById(id);
|
2066 |
|
2067 |
+
if (element && useAnchor) {
|
2068 |
+
setAnchorRect(element.getBoundingClientRect());
|
2069 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2070 |
|
2071 |
+
if (container) {
|
2072 |
+
container.classList.add(SHOW_CLASS);
|
2073 |
+
}
|
|
|
|
|
2074 |
|
2075 |
+
setShowHighlight(true);
|
2076 |
+
onShow();
|
2077 |
+
};
|
2078 |
|
2079 |
+
const triggerClose = () => {
|
2080 |
+
setShowHighlight(false);
|
2081 |
|
2082 |
+
if (onClose) {
|
2083 |
+
onClose();
|
2084 |
+
}
|
2085 |
+
};
|
2086 |
|
2087 |
+
if (!node) {
|
2088 |
+
return null;
|
2089 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2090 |
|
2091 |
+
return Object(external_wp_element_["createPortal"])(Object(external_wp_element_["createElement"])("div", {
|
2092 |
+
className: "highlight-tooltip__portal"
|
2093 |
+
}, showHighlight ? Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["IsolatedEventContainer"], {
|
2094 |
+
className: "highlight-tooltip__overlay"
|
2095 |
+
}), Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
|
2096 |
+
className: "highlight-tooltip__popover",
|
2097 |
+
noArrow: false,
|
2098 |
+
anchorRect: anchorRect,
|
2099 |
+
focusOnMount: "container"
|
2100 |
+
}, Object(external_wp_element_["createElement"])(external_wp_components_["Card"], {
|
2101 |
+
size: "medium"
|
2102 |
+
}, Object(external_wp_element_["createElement"])(external_wp_components_["CardHeader"], null, title, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
2103 |
+
isSmall: true,
|
2104 |
+
onClick: triggerClose,
|
2105 |
+
icon: library_close["a" /* default */]
|
2106 |
+
})), Object(external_wp_element_["createElement"])(external_wp_components_["CardBody"], null, content || null), Object(external_wp_element_["createElement"])(external_wp_components_["CardFooter"], {
|
2107 |
+
isBorderless: true
|
2108 |
+
}, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
2109 |
+
size: "small",
|
2110 |
+
isPrimary: true,
|
2111 |
+
onClick: triggerClose
|
2112 |
+
}, closeButtonText || Object(external_wp_i18n_["__"])('Close', 'woocommerce-admin')))))) : null), node);
|
2113 |
+
}
|
2114 |
|
2115 |
+
HighlightTooltip.propTypes = {
|
2116 |
+
/**
|
2117 |
+
* The id of the element it should highlight, should be unique per HighlightTooltip.
|
2118 |
+
*/
|
2119 |
+
id: prop_types_default.a.string.isRequired,
|
2120 |
|
2121 |
+
/**
|
2122 |
+
* Title of the popup
|
2123 |
+
*/
|
2124 |
+
title: prop_types_default.a.string.isRequired,
|
|
|
|
|
2125 |
|
2126 |
+
/**
|
2127 |
+
* Text of the close button.
|
2128 |
+
*/
|
2129 |
+
closeButtonText: prop_types_default.a.string.isRequired,
|
2130 |
|
2131 |
+
/**
|
2132 |
+
* Content of the popup, can be either text or react element.
|
2133 |
+
*/
|
2134 |
+
content: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
|
|
|
2135 |
|
2136 |
+
/**
|
2137 |
+
* If to show the popup, defaults to true.
|
2138 |
+
*/
|
2139 |
+
show: prop_types_default.a.bool,
|
|
|
|
|
|
|
|
|
|
|
|
|
2140 |
|
2141 |
+
/**
|
2142 |
+
* Callback for when the user closes the popup.
|
2143 |
+
*/
|
2144 |
+
onClose: prop_types_default.a.func,
|
2145 |
|
2146 |
+
/**
|
2147 |
+
* This will delay the popup from appearing by the number of ms.
|
2148 |
+
*/
|
2149 |
+
delay: prop_types_default.a.number,
|
2150 |
|
2151 |
+
/**
|
2152 |
+
* A callback for when the tooltip is shown.
|
2153 |
+
*/
|
2154 |
+
onShow: prop_types_default.a.func,
|
|
|
|
|
2155 |
|
2156 |
+
/**
|
2157 |
+
* useAnchor, will append the tooltip to the body tag, and make use of the anchorRect to display the tooltip.
|
2158 |
+
* Defaults to false.
|
2159 |
+
*/
|
2160 |
+
useAnchor: prop_types_default.a.bool
|
2161 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2162 |
|
2163 |
+
// EXTERNAL MODULE: external ["wp","dom"]
|
2164 |
+
var external_wp_dom_ = __webpack_require__(90);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2165 |
|
2166 |
+
// CONCATENATED MODULE: ./client/hooks/useFocusOnMount.js
|
2167 |
+
/**
|
2168 |
+
* This hook was directly copied from https://github.com/WordPress/gutenberg/blob/master/packages/compose/src/hooks/use-focus-on-mount/index.js
|
2169 |
+
* to avoid its absence in older versions of WordPress.
|
2170 |
+
*
|
2171 |
+
* This can be removed once the minimum supported version of WordPress includes this hook.
|
2172 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2173 |
|
2174 |
+
/**
|
2175 |
+
* External dependencies
|
2176 |
+
*/
|
2177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2178 |
|
2179 |
+
/**
|
2180 |
+
* Hook used to focus the first tabbable element on mount.
|
2181 |
+
*
|
2182 |
+
* @param {boolean|string} focusOnMount Focus on mount mode.
|
2183 |
+
* @return {Function} Ref callback.
|
2184 |
+
*
|
2185 |
+
* @example
|
2186 |
+
* ```js
|
2187 |
+
* import { useFocusOnMount } from '@wordpress/compose';
|
2188 |
+
*
|
2189 |
+
* const WithFocusOnMount = () => {
|
2190 |
+
* const ref = useFocusOnMount()
|
2191 |
+
* return (
|
2192 |
+
* <div ref={ ref }>
|
2193 |
+
* <Button />
|
2194 |
+
* <Button />
|
2195 |
+
* </div>
|
2196 |
+
* );
|
2197 |
+
* }
|
2198 |
+
* ```
|
2199 |
+
*/
|
|
|
|
|
2200 |
|
2201 |
+
function useFocusOnMount(focusOnMount = 'firstElement') {
|
2202 |
+
const focusOnMountRef = Object(external_wp_element_["useRef"])(focusOnMount);
|
2203 |
+
Object(external_wp_element_["useEffect"])(() => {
|
2204 |
+
focusOnMountRef.current = focusOnMount;
|
2205 |
+
}, [focusOnMount]);
|
2206 |
+
return Object(external_wp_element_["useCallback"])(node => {
|
2207 |
+
if (!node || focusOnMountRef.current === false) {
|
2208 |
+
return;
|
2209 |
}
|
2210 |
|
2211 |
+
if (node.contains(node.ownerDocument.activeElement)) {
|
2212 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2213 |
}
|
2214 |
|
2215 |
+
let target = node;
|
|
|
|
|
2216 |
|
2217 |
+
if (focusOnMountRef.current === 'firstElement') {
|
2218 |
+
const firstTabbable = external_wp_dom_["focus"].tabbable.find(node)[0];
|
|
|
|
|
|
|
2219 |
|
2220 |
+
if (firstTabbable) {
|
2221 |
+
target = firstTabbable;
|
2222 |
}
|
2223 |
+
}
|
2224 |
|
2225 |
+
target.focus();
|
2226 |
+
}, []);
|
2227 |
+
}
|
2228 |
+
// CONCATENATED MODULE: ./client/hooks/useFocusOutside.js
|
2229 |
+
/**
|
2230 |
+
* External dependencies
|
2231 |
+
*/
|
2232 |
|
|
|
|
|
2233 |
|
2234 |
+
/**
|
2235 |
+
* Input types which are classified as button types, for use in considering
|
2236 |
+
* whether element is a (focus-normalized) button.
|
2237 |
+
*
|
2238 |
+
* @type {string[]}
|
2239 |
+
*/
|
2240 |
|
2241 |
+
const INPUT_BUTTON_TYPES = ['button', 'submit'];
|
2242 |
+
/**
|
2243 |
+
* @typedef {HTMLButtonElement | HTMLLinkElement | HTMLInputElement} FocusNormalizedButton
|
2244 |
+
*/
|
2245 |
+
// Disable reason: Rule doesn't support predicate return types
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2246 |
|
2247 |
+
/* eslint-disable jsdoc/valid-types */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2248 |
|
2249 |
+
/**
|
2250 |
+
* Returns true if the given element is a button element subject to focus
|
2251 |
+
* normalization, or false otherwise.
|
2252 |
+
*
|
2253 |
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
|
2254 |
+
*
|
2255 |
+
* @param {EventTarget} eventTarget The target from a mouse or touch event.
|
2256 |
+
*
|
2257 |
+
* @return {eventTarget is FocusNormalizedButton} Whether element is a button.
|
2258 |
+
*/
|
2259 |
|
2260 |
+
function isFocusNormalizedButton(eventTarget) {
|
2261 |
+
if (!(eventTarget instanceof window.HTMLElement)) {
|
2262 |
+
return false;
|
2263 |
+
}
|
|
|
|
|
|
|
|
|
2264 |
|
2265 |
+
switch (eventTarget.nodeName) {
|
2266 |
+
case 'A':
|
2267 |
+
case 'BUTTON':
|
2268 |
+
return true;
|
2269 |
|
2270 |
+
case 'INPUT':
|
2271 |
+
return Object(external_lodash_["includes"])(INPUT_BUTTON_TYPES,
|
2272 |
+
/** @type {HTMLInputElement} */
|
2273 |
+
eventTarget.type);
|
2274 |
}
|
2275 |
|
2276 |
+
return false;
|
2277 |
}
|
2278 |
+
/* eslint-enable jsdoc/valid-types */
|
2279 |
|
2280 |
+
/**
|
2281 |
+
* @typedef {import('react').SyntheticEvent} SyntheticEvent
|
2282 |
+
*/
|
|
|
|
|
|
|
2283 |
|
2284 |
+
/**
|
2285 |
+
* @callback EventCallback
|
2286 |
+
* @param {SyntheticEvent} event input related event.
|
2287 |
+
*/
|
2288 |
|
2289 |
+
/**
|
2290 |
+
* @typedef FocusOutsideReactElement
|
2291 |
+
* @property {EventCallback} handleFocusOutside callback for a focus outside event.
|
2292 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2293 |
|
2294 |
+
/**
|
2295 |
+
* @typedef {import('react').MutableRefObject<FocusOutsideReactElement | undefined>} FocusOutsideRef
|
2296 |
+
*/
|
|
|
|
|
|
|
|
|
2297 |
|
2298 |
+
/**
|
2299 |
+
* @typedef {Object} FocusOutsideReturnValue
|
2300 |
+
* @property {EventCallback} onFocus An event handler for focus events.
|
2301 |
+
* @property {EventCallback} onBlur An event handler for blur events.
|
2302 |
+
* @property {EventCallback} onMouseDown An event handler for mouse down events.
|
2303 |
+
* @property {EventCallback} onMouseUp An event handler for mouse up events.
|
2304 |
+
* @property {EventCallback} onTouchStart An event handler for touch start events.
|
2305 |
+
* @property {EventCallback} onTouchEnd An event handler for touch end events.
|
2306 |
+
*/
|
2307 |
|
2308 |
+
/**
|
2309 |
+
* A react hook that can be used to check whether focus has moved outside the
|
2310 |
+
* element the event handlers are bound to.
|
2311 |
+
*
|
2312 |
+
* @param {EventCallback} onFocusOutside A callback triggered when focus moves outside
|
2313 |
+
* the element the event handlers are bound to.
|
2314 |
+
*
|
2315 |
+
* @return {FocusOutsideReturnValue} An object containing event handlers. Bind the event handlers
|
2316 |
+
* to a wrapping element element to capture when focus moves
|
2317 |
+
* outside that element.
|
2318 |
+
*/
|
2319 |
|
|
|
2320 |
|
2321 |
+
function useFocusOutside(onFocusOutside) {
|
2322 |
+
const currentOnFocusOutside = Object(external_wp_element_["useRef"])(onFocusOutside);
|
2323 |
+
Object(external_wp_element_["useEffect"])(() => {
|
2324 |
+
currentOnFocusOutside.current = onFocusOutside;
|
2325 |
+
}, [onFocusOutside]);
|
2326 |
+
const preventBlurCheck = Object(external_wp_element_["useRef"])(false);
|
2327 |
+
/**
|
2328 |
+
* @type {import('react').MutableRefObject<number | undefined>}
|
2329 |
+
*/
|
2330 |
|
2331 |
+
const blurCheckTimeoutId = Object(external_wp_element_["useRef"])();
|
2332 |
+
/**
|
2333 |
+
* Cancel a blur check timeout.
|
2334 |
+
*/
|
2335 |
|
2336 |
+
const cancelBlurCheck = Object(external_wp_element_["useCallback"])(() => {
|
2337 |
+
clearTimeout(blurCheckTimeoutId.current);
|
2338 |
+
}, []); // Cancel blur checks on unmount.
|
2339 |
|
2340 |
+
Object(external_wp_element_["useEffect"])(() => {
|
2341 |
+
return () => cancelBlurCheck();
|
2342 |
+
}, []); // Cancel a blur check if the callback or ref is no longer provided.
|
2343 |
|
2344 |
+
Object(external_wp_element_["useEffect"])(() => {
|
2345 |
+
if (!onFocusOutside) {
|
2346 |
+
cancelBlurCheck();
|
2347 |
}
|
2348 |
+
}, [onFocusOutside, cancelBlurCheck]);
|
2349 |
+
/**
|
2350 |
+
* Handles a mousedown or mouseup event to respectively assign and
|
2351 |
+
* unassign a flag for preventing blur check on button elements. Some
|
2352 |
+
* browsers, namely Firefox and Safari, do not emit a focus event on
|
2353 |
+
* button elements when clicked, while others do. The logic here
|
2354 |
+
* intends to normalize this as treating click on buttons as focus.
|
2355 |
+
*
|
2356 |
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
|
2357 |
+
*
|
2358 |
+
* @param {SyntheticEvent} event Event for mousedown or mouseup.
|
2359 |
+
*/
|
2360 |
|
2361 |
+
const normalizeButtonFocus = Object(external_wp_element_["useCallback"])(event => {
|
2362 |
+
const {
|
2363 |
+
type,
|
2364 |
+
target
|
2365 |
+
} = event;
|
2366 |
+
const isInteractionEnd = Object(external_lodash_["includes"])(['mouseup', 'touchend'], type);
|
2367 |
|
2368 |
+
if (isInteractionEnd) {
|
2369 |
+
preventBlurCheck.current = false;
|
2370 |
+
} else if (isFocusNormalizedButton(target)) {
|
2371 |
+
preventBlurCheck.current = true;
|
2372 |
+
}
|
2373 |
+
}, []);
|
2374 |
+
/**
|
2375 |
+
* A callback triggered when a blur event occurs on the element the handler
|
2376 |
+
* is bound to.
|
2377 |
+
*
|
2378 |
+
* Calls the `onFocusOutside` callback in an immediate timeout if focus has
|
2379 |
+
* move outside the bound element and is still within the document.
|
2380 |
+
*
|
2381 |
+
* @param {SyntheticEvent} event Blur event.
|
2382 |
+
*/
|
2383 |
|
2384 |
+
const queueBlurCheck = Object(external_wp_element_["useCallback"])(event => {
|
2385 |
+
// React does not allow using an event reference asynchronously
|
2386 |
+
// due to recycling behavior, except when explicitly persisted.
|
2387 |
+
event.persist(); // Skip blur check if clicking button. See `normalizeButtonFocus`.
|
|
|
|
|
2388 |
|
2389 |
+
if (preventBlurCheck.current) {
|
2390 |
+
return;
|
|
|
|
|
|
|
|
|
2391 |
}
|
|
|
2392 |
|
2393 |
+
blurCheckTimeoutId.current = setTimeout(() => {
|
2394 |
+
// If document is not focused then focus should remain
|
2395 |
+
// inside the wrapped component and therefore we cancel
|
2396 |
+
// this blur event thereby leaving focus in place.
|
2397 |
+
// https://developer.mozilla.org/en-US/docs/Web/API/Document/hasFocus.
|
2398 |
+
if (!document.hasFocus()) {
|
2399 |
+
event.preventDefault();
|
2400 |
+
return;
|
2401 |
}
|
2402 |
|
2403 |
+
if (typeof currentOnFocusOutside.current === 'function') {
|
2404 |
+
currentOnFocusOutside.current(event);
|
|
|
|
|
|
|
|
|
2405 |
}
|
2406 |
+
}, 0);
|
2407 |
+
}, []);
|
2408 |
+
return {
|
2409 |
+
onFocus: cancelBlurCheck,
|
2410 |
+
onMouseDown: normalizeButtonFocus,
|
2411 |
+
onMouseUp: normalizeButtonFocus,
|
2412 |
+
onTouchStart: normalizeButtonFocus,
|
2413 |
+
onTouchEnd: normalizeButtonFocus,
|
2414 |
+
onBlur: queueBlurCheck
|
2415 |
+
};
|
2416 |
+
}
|
2417 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/panel.js
|
2418 |
|
|
|
|
|
2419 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2420 |
|
2421 |
+
/**
|
2422 |
+
* External dependencies
|
2423 |
+
*/
|
2424 |
|
|
|
|
|
2425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2426 |
|
2427 |
+
/**
|
2428 |
+
* Internal dependencies
|
2429 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
2430 |
|
|
|
2431 |
|
|
|
|
|
|
|
2432 |
|
2433 |
+
const Panel = ({
|
2434 |
+
content,
|
2435 |
+
isPanelOpen,
|
2436 |
+
isPanelSwitching,
|
2437 |
+
currentTab,
|
2438 |
+
tab,
|
2439 |
+
closePanel,
|
2440 |
+
clearPanel
|
2441 |
+
}) => {
|
2442 |
+
const panelClass = 'woocommerce-layout__activity-panel-wrapper';
|
2443 |
|
2444 |
+
const handleFocusOutside = event => {
|
2445 |
+
const isClickOnModalOrSnackbar = event.relatedTarget && (event.relatedTarget.closest('.woocommerce-inbox-dismiss-confirmation_modal') || event.relatedTarget.closest('.components-snackbar__action'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2446 |
|
2447 |
+
if (isPanelOpen && !isClickOnModalOrSnackbar) {
|
2448 |
+
closePanel();
|
2449 |
+
}
|
2450 |
+
};
|
2451 |
|
2452 |
+
const possibleFocusPanel = () => {
|
2453 |
+
if (!containerRef.current || !isPanelOpen || !tab) {
|
2454 |
+
return;
|
2455 |
+
}
|
|
|
2456 |
|
2457 |
+
focusOnMountRef(containerRef.current);
|
2458 |
+
};
|
2459 |
|
2460 |
+
const finishTransition = e => {
|
2461 |
+
if (e && e.propertyName === 'transform') {
|
2462 |
+
clearPanel();
|
2463 |
+
possibleFocusPanel();
|
2464 |
+
}
|
2465 |
+
};
|
2466 |
|
2467 |
+
const focusOnMountRef = useFocusOnMount();
|
2468 |
+
const useFocusOutsideProps = useFocusOutside(handleFocusOutside);
|
2469 |
+
const containerRef = Object(external_wp_element_["useRef"])(null);
|
2470 |
+
const mergedContainerRef = Object(external_wp_element_["useCallback"])(node => {
|
2471 |
+
containerRef.current = node;
|
2472 |
+
focusOnMountRef(node);
|
2473 |
+
}, []);
|
2474 |
|
2475 |
+
if (!tab) {
|
2476 |
+
return Object(external_wp_element_["createElement"])("div", {
|
2477 |
+
className: panelClass
|
2478 |
+
});
|
2479 |
+
}
|
2480 |
|
2481 |
+
if (!content) {
|
2482 |
+
return null;
|
2483 |
+
}
|
|
|
2484 |
|
2485 |
+
const classNames = classnames_default()(panelClass, {
|
2486 |
+
'is-open': isPanelOpen,
|
2487 |
+
'is-switching': isPanelSwitching
|
2488 |
+
});
|
2489 |
+
return Object(external_wp_element_["createElement"])("div", extends_default()({
|
2490 |
+
className: classNames,
|
2491 |
+
tabIndex: 0,
|
2492 |
+
role: "tabpanel",
|
2493 |
+
"aria-label": tab.title,
|
2494 |
+
onTransitionEnd: finishTransition
|
2495 |
+
}, useFocusOutsideProps, {
|
2496 |
+
ref: mergedContainerRef
|
2497 |
+
}), Object(external_wp_element_["createElement"])("div", {
|
2498 |
+
className: "woocommerce-layout__activity-panel-content",
|
2499 |
+
key: 'activity-panel-' + currentTab,
|
2500 |
+
id: 'activity-panel-' + currentTab
|
2501 |
+
}, Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
2502 |
+
fallback: Object(external_wp_element_["createElement"])(external_wc_components_["Spinner"], null)
|
2503 |
+
}, content)));
|
2504 |
+
};
|
2505 |
+
/* harmony default export */ var panel = (Panel);
|
2506 |
+
// EXTERNAL MODULE: ./client/homescreen/activity-panel/orders/utils.js
|
2507 |
+
var orders_utils = __webpack_require__(65);
|
2508 |
|
2509 |
+
// EXTERNAL MODULE: ./client/homescreen/activity-panel/reviews/utils.js
|
2510 |
+
var reviews_utils = __webpack_require__(102);
|
2511 |
|
2512 |
+
// EXTERNAL MODULE: ./client/header/activity-panel/panels/inbox/abbreviated-notifications-panel.js + 2 modules
|
2513 |
+
var abbreviated_notifications_panel = __webpack_require__(253);
|
2514 |
|
2515 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/index.js
|
2516 |
|
|
|
2517 |
|
2518 |
/**
|
2519 |
+
* External dependencies
|
|
|
2520 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2521 |
|
|
|
2522 |
|
|
|
|
|
|
|
2523 |
|
|
|
|
|
2524 |
|
|
|
|
|
2525 |
|
|
|
|
|
2526 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2527 |
|
|
|
|
|
2528 |
|
|
|
2529 |
|
2530 |
|
|
|
2531 |
|
|
|
|
|
2532 |
|
2533 |
+
/**
|
2534 |
+
* Internal dependencies
|
2535 |
+
*/
|
2536 |
|
|
|
|
|
|
|
|
|
2537 |
|
|
|
|
|
|
|
2538 |
|
|
|
|
|
2539 |
|
|
|
|
|
2540 |
|
|
|
|
|
2541 |
|
|
|
|
|
2542 |
|
|
|
|
|
2543 |
|
|
|
|
|
|
|
2544 |
|
|
|
|
|
2545 |
|
|
|
|
|
2546 |
|
|
|
|
|
2547 |
|
2548 |
+
const HelpPanel = Object(external_wp_element_["lazy"])(() => __webpack_require__.e(/* import() | activity-panels-help */ 4).then(__webpack_require__.bind(null, 610)));
|
2549 |
+
const InboxPanel = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(2), __webpack_require__.e(5)]).then(__webpack_require__.bind(null, 600)));
|
2550 |
+
const ActivityPanel = ({
|
2551 |
+
isEmbedded,
|
2552 |
+
query,
|
2553 |
+
userPreferencesData
|
2554 |
+
}) => {
|
2555 |
+
const [currentTab, setCurrentTab] = Object(external_wp_element_["useState"])('');
|
2556 |
+
const [isPanelClosing, setIsPanelClosing] = Object(external_wp_element_["useState"])(false);
|
2557 |
+
const [isPanelOpen, setIsPanelOpen] = Object(external_wp_element_["useState"])(false);
|
2558 |
+
const [isPanelSwitching, setIsPanelSwitching] = Object(external_wp_element_["useState"])(false);
|
2559 |
+
const {
|
2560 |
+
fills
|
2561 |
+
} = Object(external_wc_experimental_["useSlot"])(abbreviated_notifications_panel["a" /* ABBREVIATED_NOTIFICATION_SLOT_NAME */]);
|
2562 |
+
const hasExtendedNotifications = Boolean(fills === null || fills === void 0 ? void 0 : fills.length);
|
2563 |
|
2564 |
+
const getPreviewSiteBtnTrackData = (select, getOption) => {
|
2565 |
+
let trackData = {};
|
|
|
2566 |
|
2567 |
+
if (query.page === 'wc-admin' && query.task === 'appearance') {
|
2568 |
+
var _tasksStatus$themeMod;
|
2569 |
|
2570 |
+
const {
|
2571 |
+
getTasksStatus
|
2572 |
+
} = select(external_wc_data_["ONBOARDING_STORE_NAME"]);
|
2573 |
+
const tasksStatus = getTasksStatus();
|
2574 |
+
const demoNotice = getOption('woocommerce_demo_store_notice');
|
2575 |
+
trackData = {
|
2576 |
+
set_notice: demoNotice ? 'Y' : 'N',
|
2577 |
+
create_homepage: tasksStatus.hasHomepage === true ? 'Y' : 'N',
|
2578 |
+
upload_logo: (_tasksStatus$themeMod = tasksStatus.themeMods) !== null && _tasksStatus$themeMod !== void 0 && _tasksStatus$themeMod.custom_logo ? 'Y' : 'N'
|
2579 |
+
};
|
2580 |
+
}
|
2581 |
|
2582 |
+
return trackData;
|
2583 |
+
};
|
|
|
2584 |
|
2585 |
+
function getThingsToDoNextCount(tasks, dismissedTasks, isExtendedTaskListHidden) {
|
2586 |
+
if (!tasks || isExtendedTaskListHidden) {
|
2587 |
+
return 0;
|
2588 |
+
}
|
2589 |
|
2590 |
+
return tasks.filter(task => task.visible && !task.completed && !dismissedTasks.includes(task.key)).length;
|
2591 |
+
}
|
2592 |
|
2593 |
+
function isAbbreviatedPanelVisible(select, setupTaskListHidden, thingsToDoNextCount) {
|
2594 |
+
const orderStatuses = Object(orders_utils["c" /* getOrderStatuses */])(select);
|
2595 |
+
const isOrdersCardVisible = setupTaskListHidden && isPanelOpen ? Object(orders_utils["d" /* getUnreadOrders */])(select, orderStatuses) > 0 : false;
|
2596 |
+
const isReviewsCardVisible = setupTaskListHidden && isPanelOpen ? Object(reviews_utils["b" /* getUnapprovedReviews */])(select) : false;
|
2597 |
+
const isLowStockCardVisible = setupTaskListHidden && isPanelOpen ? Object(orders_utils["a" /* getLowStockCount */])(select) : false;
|
2598 |
+
return thingsToDoNextCount > 0 || isOrdersCardVisible || isReviewsCardVisible || isLowStockCardVisible || hasExtendedNotifications;
|
2599 |
+
}
|
2600 |
|
2601 |
+
const {
|
2602 |
+
hasUnreadNotes,
|
2603 |
+
hasAbbreviatedNotifications,
|
2604 |
+
thingsToDoNextCount,
|
2605 |
+
requestingTaskListOptions,
|
2606 |
+
setupTaskListComplete,
|
2607 |
+
setupTaskListHidden,
|
2608 |
+
trackedCompletedTasks,
|
2609 |
+
previewSiteBtnTrackData
|
2610 |
+
} = Object(external_wp_data_["useSelect"])(select => {
|
2611 |
+
const {
|
2612 |
+
getOption,
|
2613 |
+
isResolving
|
2614 |
+
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
2615 |
+
const isSetupTaskListHidden = getOption('woocommerce_task_list_hidden') === 'yes';
|
2616 |
+
const isExtendedTaskListHidden = getOption('woocommerce_extended_task_list_hidden') === 'yes';
|
2617 |
+
const extendedTaskList = Object(external_wp_hooks_["applyFilters"])('woocommerce_admin_onboarding_task_list', [], query);
|
2618 |
+
const dismissedTasks = getOption('woocommerce_task_list_dismissed_tasks') || [];
|
2619 |
+
const thingsToDoCount = getThingsToDoNextCount(extendedTaskList, dismissedTasks, isExtendedTaskListHidden);
|
2620 |
+
return {
|
2621 |
+
hasUnreadNotes: isNotesPanelVisible(select),
|
2622 |
+
hasAbbreviatedNotifications: isAbbreviatedPanelVisible(select, isSetupTaskListHidden, thingsToDoCount),
|
2623 |
+
thingsToDoNextCount: thingsToDoCount,
|
2624 |
+
requestingTaskListOptions: isResolving('getOption', ['woocommerce_task_list_complete']) || isResolving('getOption', ['woocommerce_task_list_hidden']),
|
2625 |
+
setupTaskListComplete: getOption('woocommerce_task_list_complete') === 'yes',
|
2626 |
+
setupTaskListHidden: isSetupTaskListHidden,
|
2627 |
+
trackedCompletedTasks: getOption('woocommerce_task_list_tracked_completed_tasks') || [],
|
2628 |
+
previewSiteBtnTrackData: getPreviewSiteBtnTrackData(select, getOption)
|
2629 |
+
};
|
2630 |
+
});
|
2631 |
+
const {
|
2632 |
+
updateOptions
|
2633 |
+
} = Object(external_wp_data_["useDispatch"])(external_wc_data_["OPTIONS_STORE_NAME"]);
|
2634 |
+
const {
|
2635 |
+
currentUserCan
|
2636 |
+
} = Object(external_wc_data_["useUser"])();
|
2637 |
|
2638 |
+
const togglePanel = ({
|
2639 |
+
name: tabName
|
2640 |
+
}, isTabOpen) => {
|
2641 |
+
const panelSwitching = tabName !== currentTab && currentTab !== '' && isTabOpen && isPanelOpen;
|
2642 |
|
2643 |
+
if (isPanelClosing) {
|
2644 |
+
return;
|
2645 |
+
}
|
2646 |
|
2647 |
+
setCurrentTab(tabName);
|
2648 |
+
setIsPanelOpen(isTabOpen);
|
2649 |
+
setIsPanelSwitching(panelSwitching);
|
2650 |
+
};
|
2651 |
|
2652 |
+
const closePanel = () => {
|
2653 |
+
setIsPanelClosing(true);
|
2654 |
+
setIsPanelOpen(false);
|
2655 |
+
};
|
2656 |
|
2657 |
+
const clearPanel = () => {
|
2658 |
+
if (!isPanelOpen) {
|
2659 |
+
setIsPanelClosing(false);
|
2660 |
+
setIsPanelSwitching(false);
|
2661 |
+
setCurrentTab('');
|
2662 |
+
}
|
2663 |
+
};
|
2664 |
|
2665 |
+
const isHomescreen = () => {
|
2666 |
+
return query.page === 'wc-admin' && !query.path;
|
2667 |
+
};
|
2668 |
|
2669 |
+
const isPerformingSetupTask = () => {
|
2670 |
+
return query.task && !query.path && (requestingTaskListOptions === true || setupTaskListHidden === false && setupTaskListComplete === false);
|
2671 |
+
};
|
2672 |
|
2673 |
+
const redirectToHomeScreen = () => {
|
2674 |
+
if (Object(utils["f" /* isWCAdmin */])(window.location.href)) {
|
2675 |
+
Object(external_wc_navigation_["getHistory"])().push(Object(external_wc_navigation_["getNewPath"])({}, '/', {}));
|
2676 |
+
} else {
|
2677 |
+
window.location.href = Object(build_module["e" /* getAdminLink */])('admin.php?page=wc-admin');
|
2678 |
+
}
|
2679 |
+
}; // @todo Pull in dynamic unread status/count
|
2680 |
|
2681 |
|
2682 |
+
const getTabs = () => {
|
2683 |
+
const inbox = {
|
2684 |
+
name: 'inbox',
|
2685 |
+
title: Object(external_wp_i18n_["__"])('Inbox', 'woocommerce-admin'),
|
2686 |
+
icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
2687 |
+
icon: library_inbox
|
2688 |
+
}),
|
2689 |
+
unread: hasUnreadNotes || hasAbbreviatedNotifications,
|
2690 |
+
visible: (isEmbedded || !isHomescreen()) && !isPerformingSetupTask()
|
2691 |
+
};
|
2692 |
+
const setup = {
|
2693 |
+
name: 'setup',
|
2694 |
+
title: Object(external_wp_i18n_["__"])('Finish setup', 'woocommerce-admin'),
|
2695 |
+
icon: Object(external_wp_element_["createElement"])(SetupProgress, null),
|
2696 |
+
onClick: () => {
|
2697 |
+
const currentLocation = window.location.href;
|
2698 |
+
const homescreenLocation = Object(build_module["e" /* getAdminLink */])('admin.php?page=wc-admin'); // Don't navigate if we're already on the homescreen, this will cause an infinite loop
|
2699 |
|
2700 |
+
if (currentLocation !== homescreenLocation) {
|
2701 |
+
// Ensure that if the user is trying to get to the task list they can see it even if
|
2702 |
+
// it was dismissed.
|
2703 |
+
if (setupTaskListHidden === 'no') {
|
2704 |
+
redirectToHomeScreen();
|
2705 |
+
} else {
|
2706 |
+
updateOptions({
|
2707 |
+
woocommerce_task_list_hidden: 'no'
|
2708 |
+
}).then(redirectToHomeScreen);
|
2709 |
+
}
|
2710 |
+
}
|
2711 |
|
2712 |
+
return null;
|
2713 |
+
},
|
2714 |
+
visible: currentUserCan('manage_woocommerce') && !setupTaskListComplete && !setupTaskListHidden && !isPerformingSetupTask() && (!isHomescreen() || isEmbedded)
|
2715 |
+
};
|
2716 |
+
const help = {
|
2717 |
+
name: 'help',
|
2718 |
+
title: Object(external_wp_i18n_["__"])('Help', 'woocommerce-admin'),
|
2719 |
+
icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
2720 |
+
icon: library_help
|
2721 |
+
}),
|
2722 |
+
visible: isHomescreen() && !isEmbedded || isPerformingSetupTask()
|
2723 |
+
};
|
2724 |
+
const displayOptions = {
|
2725 |
+
component: display_options["b" /* DisplayOptions */],
|
2726 |
+
visible: !isEmbedded && isHomescreen() && !isPerformingSetupTask()
|
2727 |
+
};
|
2728 |
+
const previewSite = {
|
2729 |
+
name: 'previewSite',
|
2730 |
+
title: Object(external_wp_i18n_["__"])('Preview site', 'woocommerce-admin'),
|
2731 |
+
icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
2732 |
+
icon: external["a" /* default */]
|
2733 |
+
}),
|
2734 |
+
visible: query.page === 'wc-admin' && query.task === 'appearance',
|
2735 |
+
onClick: () => {
|
2736 |
+
window.open(window.wcSettings.siteUrl);
|
2737 |
+
Object(external_wc_tracks_["recordEvent"])('wcadmin_tasklist_previewsite', previewSiteBtnTrackData);
|
2738 |
+
return null;
|
2739 |
+
}
|
2740 |
+
};
|
2741 |
+
return [inbox, setup, previewSite, displayOptions, help].filter(tab => tab.visible);
|
2742 |
+
};
|
2743 |
|
2744 |
+
const getPanelContent = tab => {
|
2745 |
+
const {
|
2746 |
+
task
|
2747 |
+
} = query;
|
2748 |
|
2749 |
+
switch (tab) {
|
2750 |
+
case 'inbox':
|
2751 |
+
return Object(external_wp_element_["createElement"])(InboxPanel, {
|
2752 |
+
hasAbbreviatedNotifications: hasAbbreviatedNotifications,
|
2753 |
+
thingsToDoNextCount: thingsToDoNextCount
|
2754 |
+
});
|
2755 |
|
2756 |
+
case 'help':
|
2757 |
+
return Object(external_wp_element_["createElement"])(HelpPanel, {
|
2758 |
+
taskName: task
|
2759 |
+
});
|
2760 |
|
2761 |
+
default:
|
2762 |
+
return null;
|
2763 |
+
}
|
2764 |
+
};
|
2765 |
|
2766 |
+
const closedHelpPanelHighlight = () => {
|
2767 |
+
Object(external_wc_tracks_["recordEvent"])('help_tooltip_click');
|
|
|
|
|
2768 |
|
2769 |
+
if (userPreferencesData && userPreferencesData.updateUserPreferences) {
|
2770 |
+
userPreferencesData.updateUserPreferences({
|
2771 |
+
help_panel_highlight_shown: 'yes'
|
2772 |
+
});
|
2773 |
+
}
|
|
|
|
|
2774 |
};
|
2775 |
|
2776 |
+
const shouldShowHelpTooltip = () => {
|
2777 |
+
const {
|
2778 |
+
task
|
2779 |
+
} = query;
|
2780 |
+
const startedTasks = userPreferencesData && userPreferencesData.task_list_tracked_started_tasks;
|
2781 |
+
const highlightShown = userPreferencesData && userPreferencesData.help_panel_highlight_shown;
|
2782 |
|
2783 |
+
if (task && highlightShown !== 'yes' && (startedTasks || {})[task] > 1 && !trackedCompletedTasks.includes(task)) {
|
2784 |
+
return true;
|
2785 |
+
}
|
|
|
|
|
|
|
|
|
|
|
2786 |
|
2787 |
+
return false;
|
2788 |
+
};
|
2789 |
|
2790 |
+
const tabs = getTabs();
|
2791 |
+
const headerId = Object(external_lodash_["uniqueId"])('activity-panel-header_');
|
2792 |
+
const showHelpHighlightTooltip = shouldShowHelpTooltip();
|
2793 |
+
return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wc_components_["H"], {
|
2794 |
+
id: headerId,
|
2795 |
+
className: "screen-reader-text"
|
2796 |
+
}, Object(external_wp_i18n_["__"])('Store Activity', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_components_["Section"], {
|
2797 |
+
component: "aside",
|
2798 |
+
id: "woocommerce-activity-panel",
|
2799 |
+
className: "woocommerce-layout__activity-panel",
|
2800 |
+
"aria-labelledby": headerId
|
2801 |
+
}, Object(external_wp_element_["createElement"])(Tabs, {
|
2802 |
+
tabs: tabs,
|
2803 |
+
tabOpen: isPanelOpen,
|
2804 |
+
selectedTab: currentTab,
|
2805 |
+
onTabClick: (tab, tabOpen) => {
|
2806 |
+
if (tab.onClick) {
|
2807 |
+
tab.onClick();
|
2808 |
+
return;
|
2809 |
+
}
|
2810 |
+
|
2811 |
+
togglePanel(tab, tabOpen);
|
2812 |
}
|
2813 |
+
}), Object(external_wp_element_["createElement"])(Panel, {
|
2814 |
+
currentTab: true,
|
2815 |
+
isPanelOpen: isPanelOpen,
|
2816 |
+
isPanelSwitching: isPanelSwitching,
|
2817 |
+
tab: Object(external_lodash_["find"])(getTabs(), {
|
2818 |
+
name: currentTab
|
2819 |
+
}),
|
2820 |
+
content: getPanelContent(currentTab),
|
2821 |
+
closePanel: () => closePanel(),
|
2822 |
+
clearPanel: () => clearPanel()
|
2823 |
+
})), showHelpHighlightTooltip ? Object(external_wp_element_["createElement"])(HighlightTooltip, {
|
2824 |
+
delay: 1000,
|
2825 |
+
useAnchor: true,
|
2826 |
+
title: Object(external_wp_i18n_["__"])("We're here for help", 'woocommerce-admin'),
|
2827 |
+
content: Object(external_wp_i18n_["__"])('If you have any questions, feel free to explore the WooCommerce docs listed here.', 'woocommerce-admin'),
|
2828 |
+
closeButtonText: Object(external_wp_i18n_["__"])('Got it', 'woocommerce-admin'),
|
2829 |
+
id: "activity-panel-tab-help",
|
2830 |
+
onClose: () => closedHelpPanelHighlight(),
|
2831 |
+
onShow: () => Object(external_wc_tracks_["recordEvent"])('help_tooltip_view')
|
2832 |
+
}) : null);
|
2833 |
+
};
|
2834 |
+
ActivityPanel.defaultProps = {
|
2835 |
+
getHistory: external_wc_navigation_["getHistory"]
|
2836 |
+
};
|
2837 |
+
/* harmony default export */ var activity_panel = (ActivityPanel);
|
2838 |
+
// EXTERNAL MODULE: ./node_modules/gridicons/dist/cross-small.js
|
2839 |
+
var cross_small = __webpack_require__(100);
|
2840 |
+
var cross_small_default = /*#__PURE__*/__webpack_require__.n(cross_small);
|
2841 |
|
2842 |
+
// CONCATENATED MODULE: ./client/lib/platform/index.js
|
2843 |
+
const ANDROID_PLATFORM = 'android';
|
2844 |
+
const IOS_PLATFORM = 'ios';
|
2845 |
+
const UNKNOWN_PLATFORM = 'unknown';
|
2846 |
+
/**
|
2847 |
+
* Provide basic detection of platform based on user agent. This is not
|
2848 |
+
* a robust check for browser features or the like. You should only use
|
2849 |
+
* this for non-critical display logic.
|
2850 |
+
*/
|
2851 |
+
|
2852 |
+
const platform = () => {
|
2853 |
+
if (/iPhone|iPad|iPod/i.test(window.navigator.userAgent)) {
|
2854 |
+
return IOS_PLATFORM;
|
2855 |
+
} else if (/Android/i.test(window.navigator.userAgent)) {
|
2856 |
+
return ANDROID_PLATFORM;
|
2857 |
}
|
2858 |
|
2859 |
+
return UNKNOWN_PLATFORM;
|
2860 |
+
};
|
2861 |
+
// CONCATENATED MODULE: ./client/mobile-banner/app-icon.js
|
2862 |
|
2863 |
+
const AppIcon = () => {
|
2864 |
+
return Object(external_wp_element_["createElement"])("svg", {
|
2865 |
+
width: "37",
|
2866 |
+
height: "37",
|
2867 |
+
viewBox: "0 0 92 92",
|
2868 |
+
fill: "none",
|
2869 |
+
xmlns: "http://www.w3.org/2000/svg"
|
2870 |
+
}, Object(external_wp_element_["createElement"])("rect", {
|
2871 |
+
width: "92",
|
2872 |
+
height: "92",
|
2873 |
+
rx: "21.3953",
|
2874 |
+
fill: "#7F54B3"
|
2875 |
+
}), Object(external_wp_element_["createElement"])("path", {
|
2876 |
+
fillRule: "evenodd",
|
2877 |
+
clipRule: "evenodd",
|
2878 |
+
d: "M72.5937 28.043H19.8094C16.4781 28.0459 13.7783 30.7705 13.7754 34.1324V54.4501C13.7783 57.812 16.4781 60.5366 19.8094 60.5395H44.8229L56.2573 66.9607L53.6672 60.5395H72.599C74.2009 60.5402 75.7374 59.8983 76.8702 58.7552C78.0029 57.612 78.639 56.0614 78.6383 54.4447V34.1324C78.6376 32.5157 78.0002 30.9657 76.8664 29.8235C75.7327 28.6814 74.1956 28.0408 72.5937 28.043ZM19.1057 32.4208C18.4658 32.4324 17.8646 32.7359 17.467 33.2482C17.0888 33.7635 16.9404 34.4175 17.058 35.0502C18.5962 45.0986 20.0338 51.8757 21.371 55.3816C21.8779 56.658 22.4896 57.2703 23.2063 57.2185C24.3075 57.1489 25.6263 55.5968 27.1627 52.5621C27.9964 50.8412 29.2602 48.2662 30.9539 44.837C32.3785 49.88 34.309 53.6787 36.7456 56.2331C37.4291 56.9436 38.1204 57.2748 38.8195 57.2266C39.4185 57.1931 39.953 56.8315 40.217 56.2813C40.4753 55.7358 40.5806 55.1278 40.5211 54.5248C40.3516 52.0703 40.5919 48.667 41.2421 44.3149C41.9081 39.8057 42.7523 36.5818 43.7749 34.6432C43.9822 34.2526 44.0733 33.8087 44.037 33.366C44.0039 32.7587 43.7116 32.1969 43.2374 31.829C42.7745 31.4367 42.1799 31.2446 41.5803 31.2935C40.8334 31.3325 40.1682 31.7885 39.8499 32.4797C38.2331 35.5019 37.0812 40.4109 36.3943 47.2068C35.2823 44.2394 34.4509 41.1703 33.9114 38.0412C33.623 36.4613 32.9037 35.7125 31.7536 35.7946C30.9592 35.8589 30.3063 36.3944 29.7819 37.4012L24.0348 48.5643C23.0997 44.6692 22.2205 39.9289 21.3972 34.3433C21.1997 32.9652 20.4358 32.3244 19.1057 32.4208ZM69.9089 34.6877C71.6969 35.0381 73.2407 36.2 74.1186 37.8559C74.9693 39.3247 75.3946 41.1161 75.3946 43.23C75.4148 45.9567 74.7062 48.6357 73.3477 50.9687C71.7778 53.7023 69.7195 55.0691 67.1727 55.0691C66.6933 55.0668 66.2153 55.0128 65.7467 54.9078C63.9584 54.5581 62.4143 53.396 61.5371 51.7396C60.6864 50.2452 60.261 48.4411 60.261 46.3272C60.2357 43.6127 60.945 40.9454 62.3079 38.6295C63.9023 35.8959 65.9607 34.5291 68.4829 34.5291C68.9623 34.5304 69.4402 34.5836 69.9089 34.6877ZM68.7937 49.4848C69.7707 48.5773 70.4399 47.2269 70.8012 45.4337V45.4419C70.9315 44.7826 70.9959 44.1112 70.9933 43.4382C70.986 42.5849 70.8291 41.74 70.5302 40.9452C70.1443 39.901 69.6304 39.3124 68.9884 39.1793C68.0378 38.9643 67.1239 39.5256 66.2469 40.8632C65.5812 41.8393 65.109 42.9432 64.8577 44.1106C64.7276 44.7708 64.6632 45.4432 64.6657 46.1171C64.6739 46.9677 64.8308 47.8096 65.1287 48.6019C65.5146 49.6388 66.0294 50.2274 66.6731 50.3678C67.3169 50.5081 68.0237 50.2138 68.7937 49.4848ZM57.9079 37.8559C57.0291 36.2008 55.4854 35.0392 53.6976 34.6877C53.2279 34.5837 52.749 34.5306 52.2687 34.5291C49.7443 34.5291 47.6856 35.8959 46.0927 38.6295C44.7295 40.9454 44.0201 43.6127 44.0454 46.3272C44.0454 48.4411 44.4699 50.2452 45.319 51.7396C46.1976 53.3949 47.7414 54.5566 49.5294 54.9078C49.999 55.0126 50.4779 55.0667 50.9582 55.0691C53.5055 55.0691 55.5642 53.7023 57.1343 50.9687C58.4922 48.6355 59.2001 45.9565 59.1789 43.23C59.1789 41.1161 58.7544 39.3247 57.9053 37.8559H57.9079ZM54.5903 45.4337C54.2307 47.2269 53.5614 48.5773 52.5825 49.4848C51.8115 50.2065 51.101 50.5017 50.4589 50.3678C49.8169 50.2338 49.3011 49.6461 48.9169 48.6019C48.6181 47.8097 48.4603 46.9678 48.4511 46.1171C48.4495 45.4431 48.5148 44.7707 48.6459 44.1106C48.8971 42.9432 49.3694 41.8393 50.0353 40.8632C50.9124 39.5256 51.8264 38.9643 52.7773 39.1793C53.4193 39.3124 53.9333 39.901 54.3193 40.9452C54.617 41.7404 54.7739 42.585 54.7824 43.4382C54.785 44.1112 54.7207 44.7826 54.5903 45.4419V45.4337Z",
|
2879 |
+
fill: "white"
|
2880 |
+
}));
|
2881 |
+
};
|
2882 |
+
// EXTERNAL MODULE: ./client/mobile-banner/style.scss
|
2883 |
+
var mobile_banner_style = __webpack_require__(286);
|
2884 |
+
|
2885 |
+
// CONCATENATED MODULE: ./client/mobile-banner/constants.js
|
2886 |
+
// The Play Store link is defined as an exported constant mainly for the sake of testing the Mobile App Banner.
|
2887 |
+
// It is nearly impossible to fake navigation in JSDOM 16, so exposing this link for mocking allows us to
|
2888 |
+
// avoid triggering a navigation.
|
2889 |
+
const PLAY_STORE_LINK = 'https://play.google.com/store/apps/details?id=com.woocommerce.android';
|
2890 |
+
const TRACKING_EVENT_NAME = 'wcadmin_mobile_android_banner_click';
|
2891 |
+
// CONCATENATED MODULE: ./client/mobile-banner/index.js
|
2892 |
+
|
2893 |
+
|
2894 |
+
/**
|
2895 |
+
* External dependencies
|
2896 |
+
*/
|
2897 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2898 |
|
|
|
|
|
|
|
2899 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2900 |
|
|
|
|
|
2901 |
|
|
|
2902 |
|
2903 |
/**
|
2904 |
+
* Internal dependencies
|
2905 |
*/
|
2906 |
|
|
|
|
|
|
|
|
|
2907 |
|
|
|
|
|
2908 |
|
|
|
|
|
|
|
2909 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2910 |
|
2911 |
+
const SHOW_APP_BANNER_MODIFIER_CLASS = 'woocommerce-layout__show-app-banner';
|
2912 |
+
const MobileAppBanner = ({
|
2913 |
+
onInstall,
|
2914 |
+
onDismiss
|
2915 |
+
}) => {
|
2916 |
+
Object(external_wp_element_["useEffect"])(() => {
|
2917 |
+
const layout = document.getElementsByClassName('woocommerce-layout')[0];
|
2918 |
|
2919 |
+
if (platform() === ANDROID_PLATFORM) {
|
2920 |
+
if (layout) {
|
2921 |
+
// This is a hack to allow the mobile banner to work in the context of the header which is
|
2922 |
+
// position fixed. This can be refactored away when we move away from the activity panel
|
2923 |
+
// in future.
|
2924 |
+
layout.classList.add(SHOW_APP_BANNER_MODIFIER_CLASS);
|
2925 |
+
}
|
2926 |
+
}
|
2927 |
|
2928 |
+
return () => {
|
2929 |
+
if (layout) {
|
2930 |
+
layout.classList.remove(SHOW_APP_BANNER_MODIFIER_CLASS);
|
2931 |
+
}
|
2932 |
+
};
|
2933 |
+
}, []);
|
2934 |
+
const [isDismissed, setDismissed] = Object(external_wp_element_["useState"])(false); // On iOS the "Smart App Banner" meta tag is used so only display this on Android.
|
2935 |
|
2936 |
+
if (platform() === ANDROID_PLATFORM && !isDismissed) {
|
2937 |
+
return Object(external_wp_element_["createElement"])("div", {
|
2938 |
+
className: "woocommerce-mobile-app-banner"
|
2939 |
+
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
2940 |
+
icon: Object(external_wp_element_["createElement"])(cross_small_default.a, {
|
2941 |
+
"data-testid": "dismiss-btn"
|
2942 |
+
}),
|
2943 |
+
onClick: () => {
|
2944 |
+
onDismiss();
|
2945 |
+
setDismissed(true);
|
2946 |
+
Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, {
|
2947 |
+
action: 'dismiss'
|
2948 |
+
});
|
2949 |
+
}
|
2950 |
+
}), Object(external_wp_element_["createElement"])(AppIcon, null), Object(external_wp_element_["createElement"])("div", {
|
2951 |
+
className: "woocommerce-mobile-app-banner__description"
|
2952 |
+
}, Object(external_wp_element_["createElement"])("p", {
|
2953 |
+
className: "woocommerce-mobile-app-banner__description__text"
|
2954 |
+
}, Object(external_wp_i18n_["__"])('Run your store from anywhere', 'woocommerce-admin')), Object(external_wp_element_["createElement"])("p", {
|
2955 |
+
className: "woocommerce-mobile-app-banner__description__text"
|
2956 |
+
}, Object(external_wp_i18n_["__"])('Download the WooCommerce app', 'woocommerce-admin'))), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
2957 |
+
href: PLAY_STORE_LINK,
|
2958 |
+
isSecondary: true,
|
2959 |
+
onClick: () => {
|
2960 |
+
onInstall();
|
2961 |
+
setDismissed(true);
|
2962 |
+
Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, {
|
2963 |
+
action: 'install'
|
2964 |
+
});
|
2965 |
+
}
|
2966 |
+
}, Object(external_wp_i18n_["__"])('Install', 'woocommerce-admin')));
|
2967 |
}
|
2968 |
|
2969 |
+
return null;
|
2970 |
+
};
|
2971 |
+
// CONCATENATED MODULE: ./client/hooks/useIsScrolled.js
|
2972 |
+
/**
|
2973 |
+
* External dependencies
|
2974 |
+
*/
|
|
|
|
|
|
|
2975 |
|
2976 |
+
function useIsScrolled() {
|
2977 |
+
const [isScrolled, setIsScrolled] = Object(external_wp_element_["useState"])(false);
|
2978 |
+
const rafHandle = Object(external_wp_element_["useRef"])(null);
|
2979 |
+
Object(external_wp_element_["useEffect"])(() => {
|
2980 |
+
const updateIsScrolled = () => {
|
2981 |
+
setIsScrolled(window.pageYOffset > 20);
|
2982 |
+
};
|
2983 |
|
2984 |
+
const scrollListener = () => {
|
2985 |
+
rafHandle.current = window.requestAnimationFrame(updateIsScrolled);
|
2986 |
+
};
|
2987 |
|
2988 |
+
window.addEventListener('scroll', scrollListener);
|
2989 |
+
return () => {
|
2990 |
+
window.removeEventListener('scroll', scrollListener);
|
2991 |
+
window.cancelAnimationFrame(rafHandle.current);
|
2992 |
+
};
|
2993 |
+
}, []);
|
2994 |
+
return isScrolled;
|
2995 |
+
}
|
2996 |
+
// EXTERNAL MODULE: ./client/navigation/style.scss
|
2997 |
+
var navigation_style = __webpack_require__(287);
|
2998 |
|
2999 |
+
// CONCATENATED MODULE: ./client/navigation/utils.ts
|
3000 |
/**
|
3001 |
+
* External dependencies
|
3002 |
*/
|
3003 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3004 |
|
3005 |
+
/**
|
3006 |
+
* Get the full URL if a relative path is passed.
|
3007 |
+
*/
|
3008 |
+
const getFullUrl = url => {
|
3009 |
+
if (url.indexOf('http') === 0) {
|
3010 |
+
return url;
|
3011 |
}
|
3012 |
|
3013 |
+
return Object(build_module["e" /* getAdminLink */])(url);
|
3014 |
+
};
|
3015 |
/**
|
3016 |
+
* Get a default regex expression to match the path and provided params.
|
3017 |
*/
|
3018 |
|
3019 |
+
const getDefaultMatchExpression = url => {
|
3020 |
+
const escapedUrl = url.replace(/[-\/\\^$*+?.()|[\]{}]/gi, '\\$&');
|
3021 |
+
const [path, args, hash] = escapedUrl.split(/\\\?|#/);
|
3022 |
+
const hashExpression = hash ? `(.*#${hash}$)` : '';
|
3023 |
+
const argsExpression = args ? args.split('&').reduce((acc, param) => {
|
3024 |
+
return `${acc}(?=.*[?|&]${param}(&|$|#))`;
|
3025 |
+
}, '') : '';
|
3026 |
+
return '^' + path + argsExpression + hashExpression;
|
3027 |
+
};
|
3028 |
+
/**
|
3029 |
+
* Get a match score for a menu item given a location.
|
3030 |
+
*/
|
3031 |
|
3032 |
+
const getMatchScore = (location, itemUrl, itemExpression = null) => {
|
3033 |
+
if (!itemUrl) {
|
3034 |
+
return 0;
|
3035 |
}
|
3036 |
|
3037 |
+
const fullUrl = getFullUrl(itemUrl);
|
3038 |
+
const {
|
3039 |
+
href
|
3040 |
+
} = location; // Return highest possible score for exact match.
|
3041 |
+
|
3042 |
+
if (fullUrl === href) {
|
3043 |
+
return Number.MAX_SAFE_INTEGER;
|
3044 |
}
|
3045 |
|
3046 |
+
const defaultExpression = getDefaultMatchExpression(fullUrl);
|
3047 |
+
const regexp = new RegExp(itemExpression || defaultExpression, 'i');
|
3048 |
+
return (decodeURIComponent(href).match(regexp) || []).length;
|
3049 |
+
};
|
3050 |
|
3051 |
/**
|
3052 |
+
* Get the closest matching item.
|
3053 |
+
*
|
3054 |
+
* @param {Array} items An array of items to match against.
|
3055 |
*/
|
3056 |
+
const getMatchingItem = items => {
|
3057 |
+
let matchedItem = null;
|
3058 |
+
let highestMatchScore = 0;
|
3059 |
+
items.forEach(item => {
|
3060 |
+
const score = getMatchScore(window.location, item.url, item.matchExpression);
|
3061 |
|
3062 |
+
if (score > 0 && score >= highestMatchScore) {
|
3063 |
+
highestMatchScore = score;
|
3064 |
+
matchedItem = item;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3065 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3066 |
});
|
3067 |
+
return matchedItem || null;
|
3068 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3069 |
/**
|
3070 |
+
* Available menu IDs.
|
3071 |
*/
|
3072 |
|
3073 |
+
const menuIds = ['primary', 'favorites', 'plugins', 'secondary'];
|
3074 |
|
3075 |
+
/**
|
3076 |
+
* Default categories for the menu.
|
3077 |
+
*/
|
3078 |
+
const defaultCategories = {
|
3079 |
+
woocommerce: {
|
3080 |
+
id: 'woocommerce',
|
3081 |
+
isCategory: true,
|
3082 |
+
menuId: 'primary',
|
3083 |
+
migrate: true,
|
3084 |
+
order: 10,
|
3085 |
+
parent: '',
|
3086 |
+
title: 'WooCommerce'
|
3087 |
+
}
|
3088 |
+
};
|
3089 |
+
/**
|
3090 |
+
* Sort an array of menu items by their order property.
|
3091 |
+
*
|
3092 |
+
* @param {Array} menuItems Array of menu items.
|
3093 |
+
* @return {Array} Sorted menu items.
|
3094 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3095 |
|
3096 |
+
const sortMenuItems = menuItems => {
|
3097 |
+
return menuItems.sort((a, b) => {
|
3098 |
+
if (a.order === b.order) {
|
3099 |
+
return a.title.localeCompare(b.title);
|
3100 |
+
}
|
3101 |
|
3102 |
+
return a.order - b.order;
|
3103 |
+
});
|
3104 |
+
};
|
|
|
|
|
3105 |
/**
|
3106 |
+
* Get a flat tree structure of all Categories and thier children grouped by menuId
|
3107 |
+
*
|
3108 |
+
* @param {Array} menuItems Array of menu items.
|
3109 |
+
* @param {Function} currentUserCan Callback method passed the capability to determine if a menu item is visible.
|
3110 |
+
* @return {Object} Mapped menu items and categories.
|
3111 |
*/
|
3112 |
|
3113 |
+
const getMappedItemsCategories = (menuItems, currentUserCan) => {
|
3114 |
+
const categories = { ...defaultCategories
|
3115 |
+
};
|
3116 |
+
const items = sortMenuItems(menuItems).reduce((acc, item) => {
|
3117 |
+
// Set up the category if it doesn't yet exist.
|
3118 |
+
if (!acc[item.parent]) {
|
3119 |
+
acc[item.parent] = {};
|
3120 |
+
menuIds.forEach(menuId => {
|
3121 |
+
acc[item.parent][menuId] = [];
|
3122 |
+
});
|
3123 |
+
} // Incorrect menu ID.
|
3124 |
|
|
|
|
|
|
|
|
|
3125 |
|
3126 |
+
if (!acc[item.parent][item.menuId]) {
|
3127 |
+
return acc;
|
3128 |
+
} // User does not have permission to view this item.
|
3129 |
|
|
|
3130 |
|
3131 |
+
if (currentUserCan && item.capability && !currentUserCan(item.capability)) {
|
3132 |
+
return acc;
|
3133 |
+
} // Add categories.
|
3134 |
|
|
|
|
|
|
|
|
|
|
|
3135 |
|
3136 |
+
if (item.isCategory) {
|
3137 |
+
categories[item.id] = item;
|
3138 |
+
}
|
|
|
3139 |
|
3140 |
+
const menuIdArray = acc[item.parent][item.menuId];
|
|
|
|
|
|
|
|
|
3141 |
|
3142 |
+
if (menuIdArray) {
|
3143 |
+
menuIdArray.push(item);
|
3144 |
+
}
|
3145 |
|
3146 |
+
return acc;
|
3147 |
+
}, {});
|
3148 |
+
return {
|
3149 |
+
items,
|
3150 |
+
categories
|
3151 |
};
|
3152 |
+
};
|
3153 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
|
3154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3155 |
|
3156 |
+
/**
|
3157 |
+
* WordPress dependencies
|
3158 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
3159 |
|
3160 |
+
var wordpress = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
|
3161 |
+
xmlns: "http://www.w3.org/2000/svg",
|
3162 |
+
viewBox: "-2 -2 24 24"
|
3163 |
+
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
3164 |
+
d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
|
3165 |
+
}));
|
3166 |
+
/* harmony default export */ var library_wordpress = (wordpress);
|
3167 |
+
//# sourceMappingURL=wordpress.js.map
|
3168 |
+
// CONCATENATED MODULE: ./client/navigation/components/header/index.js
|
3169 |
|
|
|
|
|
|
|
|
|
|
|
3170 |
|
|
|
3171 |
/**
|
3172 |
+
* External dependencies
|
|
|
|
|
|
|
3173 |
*/
|
3174 |
|
3175 |
|
|
|
|
|
|
|
|
|
3176 |
|
|
|
|
|
3177 |
|
|
|
|
|
|
|
3178 |
|
|
|
3179 |
|
|
|
|
|
|
|
3180 |
|
|
|
|
|
|
|
3181 |
|
|
|
|
|
|
|
3182 |
|
|
|
|
|
|
|
3183 |
|
3184 |
+
/**
|
3185 |
+
* Internal dependencies
|
3186 |
+
*/
|
3187 |
|
|
|
3188 |
|
3189 |
+
|
3190 |
+
const Header = () => {
|
3191 |
+
const siteTitle = Object(build_module["f" /* getSetting */])('siteTitle', '');
|
3192 |
+
const homeUrl = Object(build_module["f" /* getSetting */])('homeUrl', '');
|
3193 |
+
const isScrolled = useIsScrolled();
|
3194 |
+
const [isFolded, setIsFolded] = Object(external_wp_element_["useState"])(document.body.classList.contains(false));
|
3195 |
+
const navClasses = {
|
3196 |
+
folded: 'is-wc-nav-folded',
|
3197 |
+
expanded: 'is-wc-nav-expanded'
|
3198 |
};
|
3199 |
|
3200 |
+
const foldNav = () => {
|
3201 |
+
document.body.classList.add(navClasses.folded);
|
3202 |
+
document.body.classList.remove(navClasses.expanded);
|
3203 |
+
setIsFolded(true);
|
3204 |
+
};
|
|
|
|
|
|
|
|
|
3205 |
|
3206 |
+
const expandNav = () => {
|
3207 |
+
document.body.classList.remove(navClasses.folded);
|
3208 |
+
document.body.classList.add(navClasses.expanded);
|
3209 |
+
setIsFolded(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3210 |
};
|
3211 |
|
3212 |
+
const toggleFolded = () => {
|
3213 |
+
if (document.body.classList.contains(navClasses.folded)) {
|
3214 |
+
expandNav();
|
3215 |
+
} else {
|
3216 |
+
foldNav();
|
3217 |
+
}
|
3218 |
+
};
|
3219 |
|
3220 |
+
const foldOnMobile = (screenWidth = document.body.clientWidth) => {
|
3221 |
+
if (screenWidth <= 960) {
|
3222 |
+
foldNav();
|
3223 |
+
} else {
|
3224 |
+
expandNav();
|
3225 |
+
}
|
3226 |
+
};
|
3227 |
|
3228 |
+
Object(external_wp_element_["useEffect"])(() => {
|
3229 |
+
foldOnMobile();
|
3230 |
+
const foldEvents = [{
|
3231 |
+
eventName: 'orientationchange',
|
3232 |
+
handler: e => foldOnMobile(e.target.screen.availWidth)
|
3233 |
+
}, {
|
3234 |
+
eventName: 'resize',
|
3235 |
+
handler: Object(external_lodash_["debounce"])(() => foldOnMobile(), 200)
|
3236 |
+
}];
|
3237 |
|
3238 |
+
for (const {
|
3239 |
+
eventName,
|
3240 |
+
handler
|
3241 |
+
} of foldEvents) {
|
3242 |
+
window.addEventListener(eventName, handler, false);
|
3243 |
+
}
|
3244 |
|
3245 |
+
Object(external_wc_navigation_["addHistoryListener"])(() => foldOnMobile());
|
3246 |
+
}, []);
|
3247 |
+
let buttonIcon = Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
3248 |
+
size: "36px",
|
3249 |
+
icon: library_wordpress
|
3250 |
+
});
|
3251 |
+
const {
|
3252 |
+
isRequestingSiteIcon,
|
3253 |
+
siteIconUrl
|
3254 |
+
} = Object(external_wp_data_["useSelect"])(select => {
|
3255 |
+
const {
|
3256 |
+
isResolving
|
3257 |
+
} = select('core/data');
|
3258 |
+
const {
|
3259 |
+
getEntityRecord
|
3260 |
+
} = select('core');
|
3261 |
+
const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
|
3262 |
+
return {
|
3263 |
+
isRequestingSiteIcon: isResolving('core', 'getEntityRecord', ['root', '__unstableBase', undefined]),
|
3264 |
+
siteIconUrl: siteData.siteIconUrl
|
3265 |
+
};
|
3266 |
+
});
|
3267 |
|
3268 |
+
if (siteIconUrl) {
|
3269 |
+
buttonIcon = Object(external_wp_element_["createElement"])("img", {
|
3270 |
+
alt: Object(external_wp_i18n_["__"])('Site Icon'),
|
3271 |
+
src: siteIconUrl
|
3272 |
+
});
|
3273 |
+
} else if (isRequestingSiteIcon) {
|
3274 |
+
buttonIcon = null;
|
3275 |
+
}
|
3276 |
|
3277 |
+
const className = classnames_default()('woocommerce-navigation-header', {
|
3278 |
+
'is-scrolled': isScrolled
|
3279 |
+
});
|
3280 |
+
return Object(external_wp_element_["createElement"])("div", {
|
3281 |
+
className: className
|
3282 |
+
}, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
3283 |
+
onClick: () => toggleFolded(),
|
3284 |
+
className: "woocommerce-navigation-header__site-icon",
|
3285 |
+
"aria-label": "Fold navigation",
|
3286 |
+
role: "switch",
|
3287 |
+
"aria-checked": isFolded ? 'true' : 'false'
|
3288 |
+
}, buttonIcon), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
3289 |
+
href: homeUrl,
|
3290 |
+
className: "woocommerce-navigation-header__site-title",
|
3291 |
+
as: "span"
|
3292 |
+
}, Object(external_wp_htmlEntities_["decodeEntities"])(siteTitle)));
|
3293 |
+
};
|
3294 |
|
3295 |
+
/* harmony default export */ var header = (Header);
|
3296 |
+
// EXTERNAL MODULE: ./client/navigation/components/category-title/style.scss
|
3297 |
+
var category_title_style = __webpack_require__(288);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3298 |
|
3299 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js
|
|
|
3300 |
|
|
|
3301 |
|
3302 |
/**
|
3303 |
+
* WordPress dependencies
|
3304 |
*/
|
3305 |
|
3306 |
+
var starFilled = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
|
3307 |
+
xmlns: "http://www.w3.org/2000/svg",
|
3308 |
+
viewBox: "0 0 24 24"
|
3309 |
+
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
3310 |
+
d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
|
3311 |
+
}));
|
3312 |
+
/* harmony default export */ var star_filled = (starFilled);
|
3313 |
+
//# sourceMappingURL=star-filled.js.map
|
3314 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
|
3315 |
|
|
|
|
|
|
|
3316 |
|
3317 |
+
/**
|
3318 |
+
* WordPress dependencies
|
3319 |
+
*/
|
|
|
|
|
|
|
|
|
3320 |
|
3321 |
+
var starEmpty = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
|
3322 |
+
xmlns: "http://www.w3.org/2000/svg",
|
3323 |
+
viewBox: "0 0 24 24"
|
3324 |
+
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
3325 |
+
fillRule: "evenodd",
|
3326 |
+
d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",
|
3327 |
+
clipRule: "evenodd"
|
3328 |
+
}));
|
3329 |
+
/* harmony default export */ var star_empty = (starEmpty);
|
3330 |
+
//# sourceMappingURL=star-empty.js.map
|
3331 |
+
// EXTERNAL MODULE: ./client/navigation/components/favorite-button/style.scss
|
3332 |
+
var favorite_button_style = __webpack_require__(289);
|
3333 |
|
3334 |
+
// CONCATENATED MODULE: ./client/navigation/components/favorite-button/index.js
|
3335 |
|
|
|
|
|
3336 |
|
3337 |
+
/**
|
3338 |
+
* External dependencies
|
3339 |
+
*/
|
3340 |
|
|
|
|
|
|
|
|
|
3341 |
|
|
|
|
|
|
|
|
|
3342 |
|
|
|
|
|
|
|
|
|
|
|
3343 |
|
|
|
|
|
|
|
|
|
3344 |
|
|
|
3345 |
|
3346 |
+
/**
|
3347 |
+
* Internal dependencies
|
3348 |
+
*/
|
3349 |
|
|
|
3350 |
|
3351 |
+
const FavoriteButton = ({
|
3352 |
+
id
|
3353 |
+
}) => {
|
3354 |
+
const {
|
3355 |
+
favorites,
|
3356 |
+
isResolving
|
3357 |
+
} = Object(external_wp_data_["useSelect"])(select => {
|
3358 |
+
return {
|
3359 |
+
favorites: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getFavorites(),
|
3360 |
+
isResolving: select(external_wc_data_["NAVIGATION_STORE_NAME"]).isResolving('getFavorites')
|
3361 |
+
};
|
3362 |
+
});
|
3363 |
+
const {
|
3364 |
+
addFavorite,
|
3365 |
+
removeFavorite
|
3366 |
+
} = Object(external_wp_data_["useDispatch"])(external_wc_data_["NAVIGATION_STORE_NAME"]);
|
3367 |
+
const isFavorited = favorites.includes(id);
|
3368 |
|
3369 |
+
const toggleFavorite = () => {
|
3370 |
+
const toggle = isFavorited ? removeFavorite : addFavorite;
|
3371 |
+
toggle(id);
|
3372 |
+
Object(external_wc_tracks_["recordEvent"])('navigation_favorite', {
|
3373 |
+
id,
|
3374 |
+
action: isFavorited ? 'unfavorite' : 'favorite'
|
3375 |
+
});
|
3376 |
+
};
|
3377 |
|
3378 |
+
if (isResolving) {
|
3379 |
+
return null;
|
3380 |
+
}
|
3381 |
|
3382 |
+
return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
3383 |
+
id: "woocommerce-navigation-favorite-button",
|
3384 |
+
className: "woocommerce-navigation-favorite-button",
|
3385 |
+
isTertiary: true,
|
3386 |
+
onClick: toggleFavorite,
|
3387 |
+
"aria-label": isFavorited ? Object(external_wp_i18n_["__"])('Add this item to your favorites.', 'woocommerce-admin') : Object(external_wp_i18n_["__"])('Remove this item from your favorites.', 'woocommerce-admin')
|
3388 |
+
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
3389 |
+
icon: isFavorited ? star_filled : star_empty,
|
3390 |
+
className: `star-${isFavorited ? 'filled' : 'empty'}-icon`
|
3391 |
+
}));
|
3392 |
+
};
|
3393 |
+
/* harmony default export */ var favorite_button = (FavoriteButton);
|
3394 |
+
// CONCATENATED MODULE: ./client/navigation/components/favorites-tooltip/index.js
|
3395 |
|
|
|
|
|
3396 |
|
3397 |
+
/**
|
3398 |
+
* External dependencies
|
3399 |
+
*/
|
3400 |
|
|
|
|
|
3401 |
|
|
|
|
|
3402 |
|
3403 |
+
/**
|
3404 |
+
* Internal dependencies
|
3405 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3406 |
|
|
|
|
|
3407 |
|
3408 |
+
const tooltipHiddenOption = 'woocommerce_navigation_favorites_tooltip_hidden';
|
3409 |
+
const FavoritesTooltip = () => {
|
3410 |
+
const {
|
3411 |
+
isFavoritesResolving,
|
3412 |
+
isOptionResolving,
|
3413 |
+
isTooltipHidden
|
3414 |
+
} = Object(external_wp_data_["useSelect"])(select => {
|
3415 |
+
const {
|
3416 |
+
getOption,
|
3417 |
+
isResolving
|
3418 |
+
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
3419 |
+
return {
|
3420 |
+
isFavoritesResolving: select(external_wc_data_["NAVIGATION_STORE_NAME"]).isResolving('getFavorites'),
|
3421 |
+
isOptionResolving: isResolving('getOption', [tooltipHiddenOption]),
|
3422 |
+
isTooltipHidden: getOption(tooltipHiddenOption) === 'yes'
|
3423 |
+
};
|
3424 |
+
});
|
3425 |
+
const {
|
3426 |
+
updateOptions
|
3427 |
+
} = Object(external_wp_data_["useDispatch"])(external_wc_data_["OPTIONS_STORE_NAME"]);
|
3428 |
|
3429 |
+
if (isFavoritesResolving || isTooltipHidden || isOptionResolving) {
|
3430 |
+
return null;
|
3431 |
+
}
|
3432 |
|
3433 |
+
if (document.body.classList.contains('is-wc-nav-folded')) {
|
3434 |
+
return null;
|
3435 |
+
}
|
3436 |
|
3437 |
+
return Object(external_wp_element_["createElement"])(HighlightTooltip, {
|
3438 |
+
delay: 1000,
|
3439 |
+
title: Object(external_wp_i18n_["__"])('Introducing favorites', 'woocommerce-admin'),
|
3440 |
+
content: Object(external_wp_i18n_["__"])('You can now favorite your extensions to pin them in the top level of the navigation.', 'woocommerce-admin'),
|
3441 |
+
closeButtonText: Object(external_wp_i18n_["__"])('Got it', 'woocommerce-admin'),
|
3442 |
+
id: "woocommerce-navigation-favorite-button",
|
3443 |
+
onClose: () => updateOptions({
|
3444 |
+
[tooltipHiddenOption]: 'yes'
|
3445 |
+
}),
|
3446 |
+
useAnchor: true
|
3447 |
+
});
|
3448 |
+
};
|
3449 |
+
/* harmony default export */ var favorites_tooltip = (FavoritesTooltip);
|
3450 |
+
// CONCATENATED MODULE: ./client/navigation/components/category-title/index.js
|
3451 |
|
3452 |
|
3453 |
/**
|
3454 |
+
* Internal dependencies
|
3455 |
*/
|
3456 |
|
3457 |
|
3458 |
|
3459 |
+
const CategoryTitle = ({
|
3460 |
+
category
|
3461 |
+
}) => {
|
3462 |
+
const {
|
3463 |
+
id,
|
3464 |
+
menuId,
|
3465 |
+
title
|
3466 |
+
} = category;
|
3467 |
+
const className = 'woocommerce-navigation-category-title';
|
3468 |
|
3469 |
+
if (['plugins', 'favorites'].includes(menuId)) {
|
3470 |
+
return Object(external_wp_element_["createElement"])("span", {
|
3471 |
+
className: className
|
3472 |
+
}, Object(external_wp_element_["createElement"])("span", {
|
3473 |
+
className: `${className}__text`
|
3474 |
+
}, title), Object(external_wp_element_["createElement"])(FavoriteButton, {
|
3475 |
+
id: id
|
3476 |
+
}), Object(external_wp_element_["createElement"])(FavoritesTooltip, null));
|
3477 |
+
}
|
3478 |
|
3479 |
+
return Object(external_wp_element_["createElement"])("span", {
|
3480 |
+
className: className
|
3481 |
+
}, title);
|
3482 |
+
};
|
3483 |
+
/* harmony default export */ var category_title = (CategoryTitle);
|
3484 |
+
// CONCATENATED MODULE: ./client/navigation/components/Item/index.js
|
3485 |
|
3486 |
|
3487 |
/**
|
3488 |
+
* External dependencies
|
3489 |
*/
|
3490 |
|
3491 |
|
3492 |
|
3493 |
|
3494 |
+
const Item = ({
|
3495 |
+
item
|
3496 |
+
}) => {
|
3497 |
+
var _slot$fills;
|
3498 |
|
3499 |
+
const slot = Object(external_wc_experimental_["useSlot"])('woocommerce_navigation_' + item.id);
|
3500 |
+
const hasFills = Boolean(slot === null || slot === void 0 ? void 0 : (_slot$fills = slot.fills) === null || _slot$fills === void 0 ? void 0 : _slot$fills.length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3501 |
|
3502 |
+
const trackClick = id => {
|
3503 |
+
Object(external_wc_tracks_["recordEvent"])('navigation_click', {
|
3504 |
+
menu_item: id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3505 |
});
|
3506 |
+
}; // Disable reason: The div wrapping the slot item is used for tracking purposes
|
3507 |
+
// and should not be a tabbable element.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3508 |
|
3509 |
+
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
|
3510 |
+
// Only render a slot if a coresponding Fill exists and the item is not a category
|
|
|
3511 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3512 |
|
3513 |
+
if (hasFills && !item.isCategory) {
|
3514 |
+
return Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationItem"], {
|
3515 |
+
key: item.id,
|
3516 |
+
item: item.id
|
3517 |
+
}, Object(external_wp_element_["createElement"])("div", {
|
3518 |
+
onClick: () => trackClick(item.id)
|
3519 |
+
}, Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"].Slot, {
|
3520 |
+
name: item.id
|
3521 |
+
})));
|
|
|
|
|
3522 |
}
|
3523 |
|
3524 |
+
return Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationItem"], {
|
3525 |
+
key: item.id,
|
3526 |
+
item: item.id,
|
3527 |
+
title: item.title,
|
3528 |
+
href: item.url,
|
3529 |
+
navigateToMenu: !item.url && item.id,
|
3530 |
+
onClick: () => trackClick(item.id),
|
3531 |
+
hideIfTargetMenuEmpty: true
|
3532 |
+
});
|
3533 |
+
/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
|
3534 |
+
};
|
3535 |
|
3536 |
+
/* harmony default export */ var components_Item = (Item);
|
3537 |
+
// CONCATENATED MODULE: ./client/navigation/components/container/primary-menu.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3538 |
|
|
|
|
|
|
|
3539 |
|
3540 |
+
/**
|
3541 |
+
* External dependencies
|
3542 |
+
*/
|
|
|
|
|
|
|
3543 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3544 |
|
3545 |
|
3546 |
+
/**
|
3547 |
+
* Internal dependencies
|
3548 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3549 |
|
|
|
|
|
|
|
3550 |
|
|
|
|
|
|
|
|
|
|
|
3551 |
|
3552 |
+
const PrimaryMenu = ({
|
3553 |
+
category,
|
3554 |
+
onBackClick,
|
3555 |
+
pluginItems,
|
3556 |
+
primaryItems
|
3557 |
+
}) => {
|
3558 |
+
if (!primaryItems.length && !pluginItems.length) {
|
3559 |
+
return null;
|
3560 |
}
|
3561 |
|
3562 |
+
const rootBackLabel = Object(external_wp_hooks_["applyFilters"])('woocommerce_navigation_root_back_label', Object(external_wp_i18n_["__"])('WordPress Dashboard', 'woocommerce-admin'));
|
3563 |
+
const rootBackUrl = Object(external_wp_hooks_["applyFilters"])('woocommerce_navigation_root_back_url', window.wcNavigation.rootBackUrl);
|
3564 |
+
const isRootBackVisible = category.id === 'woocommerce' && rootBackUrl;
|
3565 |
+
return Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationMenu"], {
|
3566 |
+
title: Object(external_wp_element_["createElement"])(category_title, {
|
3567 |
+
category: category
|
3568 |
+
}),
|
3569 |
+
menu: category.id,
|
3570 |
+
parentMenu: category.parent,
|
3571 |
+
backButtonLabel: isRootBackVisible ? rootBackLabel : category.backButtonLabel || null,
|
3572 |
+
onBackButtonClick: isRootBackVisible ? () => {
|
3573 |
+
onBackClick('woocommerce');
|
3574 |
+
window.location = rootBackUrl;
|
3575 |
+
} : () => onBackClick(category.id)
|
3576 |
+
}, !!primaryItems.length && Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationGroup"], null, primaryItems.map(item => Object(external_wp_element_["createElement"])(components_Item, {
|
3577 |
+
key: item.id,
|
3578 |
+
item: item
|
3579 |
+
}))), !!pluginItems.length && Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationGroup"], {
|
3580 |
+
title: category.id === 'woocommerce' ? Object(external_wp_i18n_["__"])('Extensions', 'woocommerce-admin') : null
|
3581 |
+
}, pluginItems.map(item => Object(external_wp_element_["createElement"])(components_Item, {
|
3582 |
+
key: item.id,
|
3583 |
+
item: item
|
3584 |
+
}))));
|
3585 |
+
};
|
3586 |
+
// CONCATENATED MODULE: ./client/navigation/components/container/secondary-menu.js
|
3587 |
+
|
3588 |
|
|
|
3589 |
/**
|
3590 |
+
* External dependencies
|
|
|
|
|
|
|
|
|
|
|
3591 |
*/
|
3592 |
|
3593 |
+
/**
|
3594 |
+
* Internal dependencies
|
3595 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
3596 |
|
|
|
3597 |
|
3598 |
+
|
3599 |
+
const SecondaryMenu = ({
|
3600 |
+
category,
|
3601 |
+
items,
|
3602 |
+
onBackClick
|
3603 |
+
}) => {
|
3604 |
+
if (!items.length) {
|
3605 |
+
return null;
|
3606 |
}
|
|
|
3607 |
|
3608 |
+
const isRoot = category.id === 'woocommerce';
|
3609 |
+
return Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationMenu"], {
|
3610 |
+
className: "components-navigation__menu-secondary",
|
3611 |
+
title: !isRoot && Object(external_wp_element_["createElement"])(category_title, {
|
3612 |
+
category: category
|
3613 |
+
}),
|
3614 |
+
menu: category.id,
|
3615 |
+
parentMenu: category.parent,
|
3616 |
+
backButtonLabel: category.backButtonLabel || null,
|
3617 |
+
onBackButtonClick: isRoot ? null : () => onBackClick(category.id)
|
3618 |
+
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["NavigationGroup"], {
|
3619 |
+
onBackButtonClick: () => onBackClick(category.id)
|
3620 |
+
}, items.map(item => Object(external_wp_element_["createElement"])(components_Item, {
|
3621 |
+
key: item.id,
|
3622 |
+
item: item
|
3623 |
+
}))));
|
3624 |
+
};
|
3625 |
+
// CONCATENATED MODULE: ./client/navigation/components/container/index.js
|
3626 |
|
3627 |
|
3628 |
+
/**
|
3629 |
+
* External dependencies
|
3630 |
+
*/
|
3631 |
+
|
3632 |
+
|
3633 |
+
|
3634 |
+
|
3635 |
+
|
3636 |
+
|
3637 |
+
|
3638 |
+
/**
|
3639 |
+
* Internal dependencies
|
3640 |
+
*/
|
3641 |
+
|
3642 |
+
|
3643 |
+
|
3644 |
+
|
3645 |
+
|
3646 |
+
|
3647 |
+
const Container = () => {
|
3648 |
+
const {
|
3649 |
+
menuItems
|
3650 |
+
} = Object(external_wp_data_["useSelect"])(select => {
|
3651 |
+
return {
|
3652 |
+
menuItems: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getMenuItems()
|
3653 |
+
};
|
3654 |
});
|
3655 |
+
Object(external_wp_element_["useEffect"])(() => {
|
3656 |
+
// Collapse the original WP Menu.
|
3657 |
+
document.documentElement.classList.remove('wp-toolbar');
|
3658 |
+
document.body.classList.add('has-woocommerce-navigation');
|
3659 |
+
const adminMenu = document.getElementById('adminmenumain');
|
3660 |
|
3661 |
+
if (!adminMenu) {
|
3662 |
+
return;
|
3663 |
+
}
|
3664 |
|
3665 |
+
adminMenu.classList.add('folded');
|
3666 |
+
}, []);
|
3667 |
+
const [activeItem, setActiveItem] = Object(external_wp_element_["useState"])('woocommerce-home');
|
3668 |
+
const [activeLevel, setActiveLevel] = Object(external_wp_element_["useState"])('woocommerce');
|
3669 |
+
Object(external_wp_element_["useEffect"])(() => {
|
3670 |
+
const initialMatchedItem = getMatchingItem(menuItems);
|
3671 |
+
|
3672 |
+
if (initialMatchedItem && activeItem !== initialMatchedItem) {
|
3673 |
+
setActiveItem(initialMatchedItem);
|
3674 |
+
setActiveLevel(initialMatchedItem.parent);
|
3675 |
}
|
|
|
3676 |
|
3677 |
+
const removeListener = Object(external_wc_navigation_["addHistoryListener"])(() => {
|
3678 |
+
setTimeout(() => {
|
3679 |
+
const matchedItem = getMatchingItem(menuItems);
|
|
|
|
|
|
|
3680 |
|
3681 |
+
if (matchedItem) {
|
3682 |
+
setActiveItem(matchedItem);
|
3683 |
+
setActiveLevel(matchedItem.parent);
|
3684 |
+
}
|
3685 |
+
}, 0);
|
3686 |
+
});
|
3687 |
+
return removeListener;
|
3688 |
+
}, [menuItems]);
|
3689 |
+
const {
|
3690 |
+
currentUserCan
|
3691 |
+
} = Object(external_wc_data_["useUser"])();
|
3692 |
+
const {
|
3693 |
+
categories,
|
3694 |
+
items
|
3695 |
+
} = Object(external_wp_element_["useMemo"])(() => getMappedItemsCategories(menuItems, currentUserCan), [menuItems, currentUserCan]);
|
3696 |
+
const navDomRef = Object(external_wp_element_["useRef"])(null);
|
3697 |
|
3698 |
+
const onBackClick = id => {
|
3699 |
+
Object(external_wc_tracks_["recordEvent"])('navigation_back_click', {
|
3700 |
+
category: id
|
3701 |
+
});
|
3702 |
+
};
|
3703 |
|
3704 |
+
const isRoot = activeLevel === 'woocommerce';
|
3705 |
+
const classes = classnames_default()('woocommerce-navigation', {
|
3706 |
+
'is-root': isRoot
|
3707 |
+
});
|
3708 |
+
return Object(external_wp_element_["createElement"])("div", {
|
3709 |
+
className: classes
|
3710 |
+
}, Object(external_wp_element_["createElement"])(header, null), Object(external_wp_element_["createElement"])("div", {
|
3711 |
+
className: "woocommerce-navigation__wrapper",
|
3712 |
+
ref: navDomRef
|
3713 |
+
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Navigation"], {
|
3714 |
+
activeItem: activeItem ? activeItem.id : null,
|
3715 |
+
activeMenu: activeLevel,
|
3716 |
+
onActivateMenu: (...args) => {
|
3717 |
+
if (navDomRef && navDomRef.current) {
|
3718 |
+
navDomRef.current.scrollTop = 0;
|
3719 |
+
}
|
3720 |
|
3721 |
+
setActiveLevel(...args);
|
3722 |
+
}
|
3723 |
+
}, Object.values(categories).map(category => {
|
3724 |
+
const categoryItems = items[category.id];
|
3725 |
+
return !!categoryItems && [Object(external_wp_element_["createElement"])(PrimaryMenu, {
|
3726 |
+
key: category.id,
|
3727 |
+
category: category,
|
3728 |
+
onBackClick: onBackClick,
|
3729 |
+
primaryItems: [...categoryItems.primary, ...categoryItems.favorites],
|
3730 |
+
pluginItems: categoryItems.plugins
|
3731 |
+
}), Object(external_wp_element_["createElement"])(SecondaryMenu, {
|
3732 |
+
key: `secondary/${category.id}`,
|
3733 |
+
category: category,
|
3734 |
+
onBackClick: onBackClick,
|
3735 |
+
items: categoryItems.secondary
|
3736 |
+
})];
|
3737 |
+
}))));
|
3738 |
+
};
|
3739 |
|
3740 |
+
/* harmony default export */ var container = (Container);
|
3741 |
+
// CONCATENATED MODULE: ./client/navigation/index.js
|
3742 |
/**
|
3743 |
* External dependencies
|
3744 |
*/
|
3745 |
|
3746 |
+
/**
|
3747 |
+
* Internal dependencies
|
3748 |
+
*/
|
|
|
|
|
|
|
|
|
3749 |
|
|
|
|
|
|
|
3750 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3751 |
|
3752 |
+
const HydratedNavigation = Object(external_wc_data_["withNavigationHydration"])(window.wcNavigation)(container);
|
3753 |
+
/* harmony default export */ var navigation = (HydratedNavigation);
|
3754 |
// CONCATENATED MODULE: ./client/header/index.js
|
3755 |
|
3756 |
|
3763 |
|
3764 |
|
3765 |
|
3766 |
+
|
3767 |
+
|
3768 |
+
|
3769 |
+
|
3770 |
+
|
3771 |
+
|
3772 |
/**
|
3773 |
* Internal dependencies
|
3774 |
*/
|
3776 |
|
3777 |
|
3778 |
|
|
|
|
|
|
|
3779 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3780 |
|
3781 |
+
|
3782 |
+
const renderTaskListBackButton = () => {
|
3783 |
+
const currentUrl = new URL(window.location.href);
|
3784 |
+
const task = currentUrl.searchParams.get('task');
|
3785 |
+
|
3786 |
+
if (task) {
|
3787 |
+
const homeText = Object(external_wp_i18n_["__"])('WooCommerce Home', 'woocommerce-admin');
|
3788 |
+
|
3789 |
+
const navigateHome = () => {
|
3790 |
+
Object(external_wc_tracks_["recordEvent"])('topbar_back_button', {
|
3791 |
+
page_name: getPageTitle(window.title)
|
3792 |
+
});
|
3793 |
+
Object(external_wc_navigation_["updateQueryString"])({}, Object(external_wc_navigation_["getHistory"])().location.pathname, {});
|
3794 |
+
}; // if it's a task list page, render a back button to the homescreen
|
3795 |
+
|
3796 |
+
|
3797 |
+
return Object(external_wp_element_["createElement"])(external_wp_components_["Tooltip"], {
|
3798 |
+
text: homeText
|
3799 |
+
}, Object(external_wp_element_["createElement"])("div", {
|
3800 |
+
tabIndex: "0",
|
3801 |
+
role: "button",
|
3802 |
+
"data-testid": "header-back-button",
|
3803 |
+
className: "woocommerce-layout__header-back-button",
|
3804 |
+
onKeyDown: ({
|
3805 |
+
keyCode
|
3806 |
+
}) => {
|
3807 |
+
if (keyCode === external_wp_keycodes_["ENTER"] || keyCode === external_wp_keycodes_["SPACE"]) {
|
3808 |
+
navigateHome();
|
3809 |
+
}
|
3810 |
+
}
|
3811 |
+
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
3812 |
+
icon: chevron_left["a" /* default */],
|
3813 |
+
onClick: navigateHome
|
3814 |
+
})));
|
3815 |
+
}
|
3816 |
+
|
3817 |
+
return null;
|
3818 |
+
};
|
3819 |
+
|
3820 |
+
const getPageTitle = defaultTitle => {
|
3821 |
+
const currentUrl = new URL(window.location.href);
|
3822 |
+
const task = currentUrl.searchParams.get('task'); // If it's the task list then render a title based on which task the user is on.
|
3823 |
+
|
3824 |
+
return {
|
3825 |
+
payments: Object(external_wp_i18n_["__"])('Set up payments', 'woocommerce-admin'),
|
3826 |
+
tax: Object(external_wp_i18n_["__"])('Add tax rates', 'woocommerce-admin'),
|
3827 |
+
appearance: Object(external_wp_i18n_["__"])('Personalize your store', 'woocommerce-admin'),
|
3828 |
+
products: Object(external_wp_i18n_["__"])('Add products', 'woocommerce-admin'),
|
3829 |
+
shipping: Object(external_wp_i18n_["__"])('Set up shipping costs', 'woocommerce-admin')
|
3830 |
+
}[task] || defaultTitle;
|
3831 |
+
};
|
3832 |
+
|
3833 |
+
const header_Header = ({
|
3834 |
+
sections,
|
3835 |
+
isEmbedded = false,
|
3836 |
+
query
|
3837 |
+
}) => {
|
3838 |
+
const headerElement = Object(external_wp_element_["useRef"])(null);
|
3839 |
+
const siteTitle = Object(build_module["f" /* getSetting */])('siteTitle', '');
|
3840 |
+
const pageTitle = sections.slice(-1)[0];
|
3841 |
+
const isScrolled = useIsScrolled();
|
3842 |
+
const {
|
3843 |
+
updateUserPreferences,
|
3844 |
+
...userData
|
3845 |
+
} = Object(external_wc_data_["useUserPreferences"])();
|
3846 |
+
const isModalDismissed = userData.android_app_banner_dismissed === 'yes';
|
3847 |
+
let debounceTimer = null;
|
3848 |
+
const className = classnames_default()('woocommerce-layout__header', {
|
3849 |
+
'is-scrolled': isScrolled
|
3850 |
+
});
|
3851 |
+
Object(external_wp_element_["useLayoutEffect"])(() => {
|
3852 |
+
updateBodyMargin();
|
3853 |
+
window.addEventListener('resize', updateBodyMargin);
|
3854 |
+
return () => {
|
3855 |
+
window.removeEventListener('resize', updateBodyMargin);
|
3856 |
+
const wpBody = document.querySelector('#wpbody');
|
3857 |
+
|
3858 |
+
if (!wpBody) {
|
3859 |
+
return;
|
3860 |
+
}
|
3861 |
|
3862 |
wpBody.style.marginTop = null;
|
3863 |
};
|
3864 |
+
}, [isModalDismissed]);
|
3865 |
|
3866 |
const updateBodyMargin = () => {
|
3867 |
clearTimeout(debounceTimer);
|
3890 |
}
|
3891 |
}
|
3892 |
}, [isEmbedded, sections, siteTitle]);
|
3893 |
+
|
3894 |
+
const dismissHandler = () => {
|
3895 |
+
updateUserPreferences({
|
3896 |
+
android_app_banner_dismissed: 'yes'
|
3897 |
+
});
|
3898 |
+
};
|
3899 |
+
|
3900 |
+
const backButton = renderTaskListBackButton();
|
3901 |
+
const backButtonClass = backButton ? 'with-back-button' : '';
|
3902 |
return Object(external_wp_element_["createElement"])("div", {
|
3903 |
className: className,
|
3904 |
ref: headerElement
|
3905 |
+
}, !isModalDismissed && Object(external_wp_element_["createElement"])(MobileAppBanner, {
|
3906 |
+
onDismiss: dismissHandler,
|
3907 |
+
onInstall: dismissHandler
|
3908 |
+
}), Object(external_wp_element_["createElement"])("div", {
|
3909 |
className: "woocommerce-layout__header-wrapper"
|
3910 |
+
}, window.wcAdminFeatures.navigation && Object(external_wp_element_["createElement"])(navigation, null), renderTaskListBackButton(), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
3911 |
+
className: `woocommerce-layout__header-heading ${backButtonClass}`,
|
|
|
|
|
|
|
|
|
|
|
3912 |
as: "h1"
|
3913 |
+
}, getPageTitle(Object(external_wp_htmlEntities_["decodeEntities"])(pageTitle))), window.wcAdminFeatures['activity-panels'] && Object(external_wp_element_["createElement"])(activity_panel, {
|
3914 |
+
isEmbedded: isEmbedded,
|
3915 |
+
query: query,
|
3916 |
+
userPreferencesData: { ...userData,
|
3917 |
+
updateUserPreferences
|
|
|
|
|
|
|
|
|
3918 |
}
|
3919 |
})));
|
3920 |
};
|
3937 |
}
|
3938 |
|
3939 |
/* harmony default export */ var layout_notices = (notices_Notices);
|
3940 |
+
// EXTERNAL MODULE: ./node_modules/react-spring/web.cjs.js
|
3941 |
+
var web_cjs = __webpack_require__(159);
|
3942 |
|
3943 |
// EXTERNAL MODULE: ./client/layout/transient-notices/snackbar/index.js
|
3944 |
+
var snackbar = __webpack_require__(255);
|
3945 |
|
3946 |
// CONCATENATED MODULE: ./client/layout/transient-notices/snackbar/list.js
|
3947 |
|
3972 |
* @return {Object} The rendered notices list.
|
3973 |
*/
|
3974 |
|
3975 |
+
function SnackbarList({
|
3976 |
+
notices,
|
3977 |
+
className,
|
3978 |
+
children,
|
3979 |
+
onRemove = external_lodash_["noop"],
|
3980 |
+
onRemove2 = external_lodash_["noop"]
|
3981 |
+
}) {
|
|
|
3982 |
const isReducedMotion = Object(external_wp_compose_["useReducedMotion"])();
|
3983 |
const [refMap] = Object(external_wp_element_["useState"])(() => new WeakMap());
|
3984 |
+
const transitions = Object(web_cjs["useTransition"])(notices, notice => notice.id, {
|
|
|
3985 |
from: {
|
3986 |
opacity: 0,
|
3987 |
height: 0
|
4010 |
|
4011 |
return Object(external_wp_element_["createElement"])("div", {
|
4012 |
className: className
|
4013 |
+
}, children, transitions.map(({
|
4014 |
+
item: notice,
|
4015 |
+
key,
|
4016 |
+
props: style
|
4017 |
+
}) => Object(external_wp_element_["createElement"])(web_cjs["animated"].div, {
|
4018 |
+
key: key,
|
4019 |
style: style
|
4020 |
}, Object(external_wp_element_["createElement"])("div", {
|
4021 |
className: "components-snackbar-list__notice-container",
|
4027 |
|
4028 |
/* harmony default export */ var list = (SnackbarList);
|
4029 |
// EXTERNAL MODULE: ./client/layout/transient-notices/style.scss
|
4030 |
+
var transient_notices_style = __webpack_require__(295);
|
4031 |
|
4032 |
// CONCATENATED MODULE: ./client/layout/transient-notices/index.js
|
4033 |
|
4092 |
|
4093 |
Object(external_wp_element_["useEffect"])(() => {
|
4094 |
getCurrentUserNotices().forEach(queuedNotice => {
|
|
|
|
|
|
|
|
|
|
|
|
|
4095 |
const notice = Object(external_wp_hooks_["applyFilters"])(QUEUED_NOTICE_FILTER, queuedNotice);
|
4096 |
createNotice2(notice.status, notice.content, {
|
4097 |
onDismiss: () => {
|
4135 |
notices: prop_types_default.a.array
|
4136 |
};
|
4137 |
/* harmony default export */ var transient_notices = (TransientNotices);
|
4138 |
+
// CONCATENATED MODULE: ./client/layout/navigation.js
|
|
|
4139 |
|
|
|
|
|
4140 |
|
4141 |
+
/**
|
4142 |
+
* External dependencies
|
4143 |
+
*/
|
4144 |
+
|
4145 |
|
|
|
|
|
4146 |
|
|
|
4147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4148 |
|
|
|
|
|
|
|
|
|
4149 |
|
4150 |
/**
|
4151 |
* Internal dependencies
|
4153 |
|
4154 |
|
4155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4156 |
|
|
|
|
|
|
|
4157 |
|
4158 |
+
const NavigationPlugin = () => {
|
4159 |
+
const {
|
4160 |
+
persistedQuery
|
4161 |
+
} = Object(external_wp_data_["useSelect"])(select => {
|
4162 |
+
return {
|
4163 |
+
persistedQuery: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getPersistedQuery()
|
4164 |
+
};
|
4165 |
+
});
|
4166 |
+
/**
|
4167 |
+
* If the current page is embedded, stay with the default urls
|
4168 |
+
* provided by Navigation because the router isn't present to
|
4169 |
+
* respond to <Link /> component's manipulation of the url.
|
4170 |
+
*/
|
4171 |
|
4172 |
+
if (!Object(utils["f" /* isWCAdmin */])(window.location.href)) {
|
4173 |
return null;
|
4174 |
}
|
4175 |
|
4176 |
+
const reports = Object(get_reports["a" /* default */])().filter(item => item.navArgs);
|
4177 |
+
const pages = getPages().filter(page => page.navArgs).map(page => {
|
4178 |
+
if (page.path === '/analytics/settings') {
|
4179 |
+
return { ...page,
|
4180 |
+
breadcrumbs: [Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')]
|
4181 |
+
};
|
4182 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4183 |
|
4184 |
+
return page;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4185 |
});
|
4186 |
+
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, pages.map(page => Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"], {
|
4187 |
+
item: page.navArgs.id,
|
4188 |
+
key: page.navArgs.id
|
4189 |
+
}, Object(external_wp_element_["createElement"])(external_wc_components_["Link"], {
|
4190 |
+
className: "components-button",
|
4191 |
+
href: Object(external_wc_navigation_["getNewPath"])(Object(external_wc_navigation_["pathIsExcluded"])(page.path) ? {} : persistedQuery, page.path, {}),
|
4192 |
+
type: "wc-admin"
|
4193 |
+
}, page.breadcrumbs[page.breadcrumbs.length - 1]))), reports.map(item => Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"], {
|
4194 |
+
item: item.navArgs.id,
|
4195 |
+
key: item.navArgs.id
|
4196 |
+
}, Object(external_wp_element_["createElement"])(external_wc_components_["Link"], {
|
4197 |
+
className: "components-button",
|
4198 |
+
href: Object(external_wc_navigation_["getNewPath"])(Object(external_wc_navigation_["pathIsExcluded"])(item.report) ? {} : persistedQuery, `/analytics/${item.report}`, {}),
|
4199 |
+
type: "wc-admin"
|
4200 |
+
}, item.title))));
|
4201 |
};
|
4202 |
+
|
4203 |
+
Object(external_wp_plugins_["registerPlugin"])('wc-admin-navigation', {
|
4204 |
+
render: NavigationPlugin
|
4205 |
+
});
|
4206 |
+
// CONCATENATED MODULE: ./client/layout/index.js
|
4207 |
|
4208 |
|
4209 |
|
4213 |
|
4214 |
|
4215 |
|
|
|
|
|
|
|
4216 |
|
4217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4220 |
|
|
|
|
|
|
|
|
|
|
|
4221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4223 |
|
|
|
|
|
4224 |
|
|
|
|
|
4225 |
|
|
|
4226 |
|
4227 |
|
4228 |
/**
|
4229 |
+
* Internal dependencies
|
4230 |
*/
|
4231 |
|
4232 |
|
4234 |
|
4235 |
|
4236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4237 |
|
4238 |
+
const StoreAlerts = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | store-alerts */[__webpack_require__.e(1), __webpack_require__.e(47)]).then(__webpack_require__.bind(null, 609)));
|
4239 |
+
const WCPayUsageModal = Object(external_wp_element_["lazy"])(() => __webpack_require__.e(/* import() | wcpay-usage-modal */ 51).then(__webpack_require__.bind(null, 515)));
|
4240 |
+
class layout_PrimaryLayout extends external_wp_element_["Component"] {
|
4241 |
+
render() {
|
4242 |
+
const {
|
4243 |
+
children
|
4244 |
+
} = this.props;
|
4245 |
+
return Object(external_wp_element_["createElement"])("div", {
|
4246 |
+
className: "woocommerce-layout__primary",
|
4247 |
+
id: "woocommerce-layout__primary"
|
4248 |
+
}, window.wcAdminFeatures['store-alerts'] && Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
4249 |
+
fallback: Object(external_wp_element_["createElement"])(external_wc_components_["Spinner"], null)
|
4250 |
+
}, Object(external_wp_element_["createElement"])(StoreAlerts, null)), Object(external_wp_element_["createElement"])(layout_notices, null), children);
|
4251 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4252 |
|
4253 |
+
}
|
|
|
|
|
|
|
|
|
4254 |
|
4255 |
+
class layout_Layout extends external_wp_element_["Component"] {
|
4256 |
+
componentDidMount() {
|
4257 |
+
this.recordPageViewTrack();
|
4258 |
+
}
|
4259 |
|
4260 |
+
componentDidUpdate(prevProps) {
|
4261 |
+
const previousPath = Object(external_lodash_["get"])(prevProps, 'location.pathname');
|
4262 |
+
const currentPath = Object(external_lodash_["get"])(this.props, 'location.pathname');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4263 |
|
4264 |
+
if (!previousPath || !currentPath) {
|
4265 |
+
return;
|
|
|
|
|
|
|
4266 |
}
|
|
|
|
|
|
|
|
|
|
|
4267 |
|
4268 |
+
if (previousPath !== currentPath) {
|
4269 |
+
this.recordPageViewTrack();
|
|
|
|
|
4270 |
}
|
4271 |
}
|
4272 |
|
4273 |
+
recordPageViewTrack() {
|
4274 |
+
const {
|
4275 |
+
activePlugins,
|
4276 |
+
installedPlugins,
|
4277 |
+
isEmbedded,
|
4278 |
+
isJetpackConnected
|
4279 |
+
} = this.props;
|
4280 |
+
const navigationFlag = {
|
4281 |
+
has_navigation: !!window.wcNavigation
|
4282 |
+
};
|
4283 |
|
4284 |
+
if (isEmbedded) {
|
4285 |
+
const path = document.location.pathname + document.location.search;
|
4286 |
+
Object(external_wc_tracks_["recordPageView"])(path, {
|
4287 |
+
is_embedded: true,
|
4288 |
+
...navigationFlag
|
4289 |
+
});
|
4290 |
+
return;
|
4291 |
}
|
4292 |
|
4293 |
+
const pathname = Object(external_lodash_["get"])(this.props, 'location.pathname');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4294 |
|
4295 |
+
if (!pathname) {
|
4296 |
+
return;
|
4297 |
+
} // Remove leading slash, and camel case remaining pathname
|
4298 |
|
|
|
|
|
|
|
4299 |
|
4300 |
+
let path = pathname.substring(1).replace(/\//g, '_'); // When pathname is `/` we are on the home screen.
|
|
|
4301 |
|
4302 |
+
if (path.length === 0) {
|
4303 |
+
path = 'home_screen';
|
4304 |
}
|
|
|
4305 |
|
4306 |
+
Object(external_wc_tracks_["recordPageView"])(path, {
|
4307 |
+
jetpack_installed: installedPlugins.includes('jetpack'),
|
4308 |
+
jetpack_active: activePlugins.includes('jetpack'),
|
4309 |
+
jetpack_connected: isJetpackConnected,
|
4310 |
+
...navigationFlag
|
4311 |
+
});
|
4312 |
}
|
4313 |
|
4314 |
+
getQuery(searchString) {
|
4315 |
+
if (!searchString) {
|
4316 |
+
return {};
|
4317 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4318 |
|
4319 |
+
const search = searchString.substring(1);
|
4320 |
+
return Object(lib["parse"])(search);
|
4321 |
+
}
|
|
|
|
|
4322 |
|
4323 |
+
isWCPaySettingsPage() {
|
4324 |
+
const {
|
4325 |
+
page,
|
4326 |
+
section,
|
4327 |
+
tab
|
4328 |
+
} = Object(external_wc_navigation_["getQuery"])();
|
4329 |
+
return page === 'wc-settings' && tab === 'checkout' && section === 'woocommerce_payments';
|
4330 |
+
}
|
4331 |
|
4332 |
+
render() {
|
4333 |
+
const {
|
4334 |
+
isEmbedded,
|
4335 |
+
...restProps
|
4336 |
+
} = this.props;
|
4337 |
+
const {
|
4338 |
+
location,
|
4339 |
+
page
|
4340 |
+
} = this.props;
|
4341 |
+
const {
|
4342 |
+
breadcrumbs
|
4343 |
+
} = page;
|
4344 |
+
const query = this.getQuery(location && location.search);
|
4345 |
+
return Object(external_wp_element_["createElement"])(external_wp_components_["SlotFillProvider"], null, Object(external_wp_element_["createElement"])("div", {
|
4346 |
+
className: "woocommerce-layout"
|
4347 |
+
}, Object(external_wp_element_["createElement"])(header_Header, {
|
4348 |
+
sections: Object(external_lodash_["isFunction"])(breadcrumbs) ? breadcrumbs(this.props) : breadcrumbs,
|
4349 |
+
isEmbedded: isEmbedded,
|
4350 |
+
query: query
|
4351 |
+
}), Object(external_wp_element_["createElement"])(transient_notices, null), !isEmbedded && Object(external_wp_element_["createElement"])(layout_PrimaryLayout, null, Object(external_wp_element_["createElement"])("div", {
|
4352 |
+
className: "woocommerce-layout__main"
|
4353 |
+
}, Object(external_wp_element_["createElement"])(controller_Controller, extends_default()({}, restProps, {
|
4354 |
+
query: query
|
4355 |
+
})))), isEmbedded && this.isWCPaySettingsPage() && Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
4356 |
+
fallback: null
|
4357 |
+
}, Object(external_wp_element_["createElement"])(WCPayUsageModal, null))), Object(external_wp_element_["createElement"])(external_wp_plugins_["PluginArea"], {
|
4358 |
+
scope: "woocommerce-admin"
|
4359 |
+
}));
|
4360 |
+
}
|
4361 |
|
4362 |
+
}
|
|
|
|
|
|
|
4363 |
|
4364 |
+
layout_Layout.propTypes = {
|
4365 |
+
isEmbedded: prop_types_default.a.bool,
|
4366 |
+
page: prop_types_default.a.shape({
|
4367 |
+
container: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.object // Support React.lazy
|
4368 |
+
]),
|
4369 |
+
path: prop_types_default.a.string,
|
4370 |
+
breadcrumbs: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(prop_types_default.a.string), prop_types_default.a.string]))]).isRequired,
|
4371 |
+
wpOpenMenu: prop_types_default.a.string
|
4372 |
+
}).isRequired
|
4373 |
+
};
|
4374 |
+
const Layout = Object(external_wp_compose_["compose"])(Object(external_wc_data_["withPluginsHydration"])({ ...(window.wcSettings.plugins || {}),
|
4375 |
+
jetpackStatus: window.wcSettings.dataEndpoints && window.wcSettings.dataEndpoints.jetpackStatus || false
|
4376 |
+
}), Object(external_wp_data_["withSelect"])((select, {
|
4377 |
+
isEmbedded
|
4378 |
+
}) => {
|
4379 |
+
// Embedded pages don't send plugin info to Tracks.
|
4380 |
+
if (isEmbedded) {
|
4381 |
+
return;
|
4382 |
+
}
|
4383 |
|
4384 |
+
const {
|
4385 |
+
getActivePlugins,
|
4386 |
+
getInstalledPlugins,
|
4387 |
+
isJetpackConnected
|
4388 |
+
} = select(external_wc_data_["PLUGINS_STORE_NAME"]);
|
4389 |
+
return {
|
4390 |
+
activePlugins: getActivePlugins(),
|
4391 |
+
isJetpackConnected: isJetpackConnected(),
|
4392 |
+
installedPlugins: getInstalledPlugins()
|
4393 |
+
};
|
4394 |
+
}))(layout_Layout);
|
4395 |
|
4396 |
+
const _PageLayout = () => {
|
4397 |
+
const {
|
4398 |
+
currentUserCan
|
4399 |
+
} = Object(external_wc_data_["useUser"])();
|
4400 |
+
return Object(external_wp_element_["createElement"])(react_router_Router, {
|
4401 |
+
history: Object(external_wc_navigation_["getHistory"])()
|
4402 |
+
}, Object(external_wp_element_["createElement"])(react_router_Switch, null, getPages().filter(page => !page.capability || currentUserCan(page.capability)).map(page => {
|
4403 |
+
return Object(external_wp_element_["createElement"])(react_router_Route, {
|
4404 |
+
key: page.path,
|
4405 |
+
path: page.path,
|
4406 |
+
exact: true,
|
4407 |
+
render: props => Object(external_wp_element_["createElement"])(Layout, extends_default()({
|
4408 |
+
page: page
|
4409 |
+
}, props))
|
4410 |
+
});
|
4411 |
+
})));
|
4412 |
};
|
4413 |
|
4414 |
+
const PageLayout = Object(external_wp_compose_["compose"])(window.wcSettings.preloadOptions ? Object(external_wc_data_["withOptionsHydration"])({ ...window.wcSettings.preloadOptions
|
4415 |
+
}) : external_lodash_["identity"])(_PageLayout);
|
4416 |
|
4417 |
+
const _EmbedLayout = () => Object(external_wp_element_["createElement"])(Layout, {
|
4418 |
+
page: {
|
4419 |
+
breadcrumbs: Object(build_module["f" /* getSetting */])('embedBreadcrumbs', [])
|
4420 |
+
},
|
4421 |
+
isEmbedded: true
|
4422 |
+
});
|
|
|
4423 |
|
4424 |
+
const EmbedLayout = Object(external_wp_compose_["compose"])(window.wcSettings.preloadOptions ? Object(external_wc_data_["withOptionsHydration"])({ ...window.wcSettings.preloadOptions
|
4425 |
+
}) : external_lodash_["identity"])(_EmbedLayout);
|
|
|
4426 |
|
4427 |
+
/***/ }),
|
4428 |
|
4429 |
+
/***/ 12:
|
4430 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4431 |
|
4432 |
+
(function() { module.exports = window["wc"]["navigation"]; }());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4433 |
|
4434 |
+
/***/ }),
|
|
|
|
|
4435 |
|
4436 |
+
/***/ 120:
|
4437 |
+
/***/ (function(module, exports) {
|
4438 |
|
4439 |
+
(function() { module.exports = window["wc"]["number"]; }());
|
|
|
4440 |
|
4441 |
+
/***/ }),
|
|
|
|
|
|
|
4442 |
|
4443 |
+
/***/ 122:
|
4444 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
4445 |
|
4446 |
+
(function() { module.exports = window["wc"]["explat"]; }());
|
4447 |
|
4448 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
4449 |
|
4450 |
+
/***/ 127:
|
4451 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
4452 |
|
4453 |
+
(function() { module.exports = window["wp"]["notices"]; }());
|
4454 |
|
4455 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4456 |
|
4457 |
+
/***/ 128:
|
4458 |
+
/***/ (function(module, exports) {
|
|
|
|
|
4459 |
|
4460 |
+
// shim for using process in browser
|
4461 |
+
var process = module.exports = {};
|
|
|
|
|
4462 |
|
4463 |
+
// cached from whatever global is present so that test runners that stub it
|
4464 |
+
// don't break things. But we need to wrap it in a try catch in case it is
|
4465 |
+
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
4466 |
+
// function because try/catches deoptimize in certain engines.
|
|
|
4467 |
|
4468 |
+
var cachedSetTimeout;
|
4469 |
+
var cachedClearTimeout;
|
|
|
4470 |
|
4471 |
+
function defaultSetTimout() {
|
4472 |
+
throw new Error('setTimeout has not been defined');
|
4473 |
+
}
|
4474 |
+
function defaultClearTimeout () {
|
4475 |
+
throw new Error('clearTimeout has not been defined');
|
4476 |
+
}
|
4477 |
+
(function () {
|
4478 |
+
try {
|
4479 |
+
if (typeof setTimeout === 'function') {
|
4480 |
+
cachedSetTimeout = setTimeout;
|
4481 |
+
} else {
|
4482 |
+
cachedSetTimeout = defaultSetTimout;
|
4483 |
+
}
|
4484 |
+
} catch (e) {
|
4485 |
+
cachedSetTimeout = defaultSetTimout;
|
4486 |
+
}
|
4487 |
+
try {
|
4488 |
+
if (typeof clearTimeout === 'function') {
|
4489 |
+
cachedClearTimeout = clearTimeout;
|
4490 |
+
} else {
|
4491 |
+
cachedClearTimeout = defaultClearTimeout;
|
4492 |
+
}
|
4493 |
+
} catch (e) {
|
4494 |
+
cachedClearTimeout = defaultClearTimeout;
|
4495 |
+
}
|
4496 |
+
} ())
|
4497 |
+
function runTimeout(fun) {
|
4498 |
+
if (cachedSetTimeout === setTimeout) {
|
4499 |
+
//normal enviroments in sane situations
|
4500 |
+
return setTimeout(fun, 0);
|
4501 |
+
}
|
4502 |
+
// if setTimeout wasn't available but was latter defined
|
4503 |
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
4504 |
+
cachedSetTimeout = setTimeout;
|
4505 |
+
return setTimeout(fun, 0);
|
4506 |
+
}
|
4507 |
+
try {
|
4508 |
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
4509 |
+
return cachedSetTimeout(fun, 0);
|
4510 |
+
} catch(e){
|
4511 |
+
try {
|
4512 |
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
4513 |
+
return cachedSetTimeout.call(null, fun, 0);
|
4514 |
+
} catch(e){
|
4515 |
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
4516 |
+
return cachedSetTimeout.call(this, fun, 0);
|
4517 |
+
}
|
4518 |
+
}
|
4519 |
|
|
|
|
|
|
|
|
|
4520 |
|
4521 |
+
}
|
4522 |
+
function runClearTimeout(marker) {
|
4523 |
+
if (cachedClearTimeout === clearTimeout) {
|
4524 |
+
//normal enviroments in sane situations
|
4525 |
+
return clearTimeout(marker);
|
4526 |
+
}
|
4527 |
+
// if clearTimeout wasn't available but was latter defined
|
4528 |
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
4529 |
+
cachedClearTimeout = clearTimeout;
|
4530 |
+
return clearTimeout(marker);
|
4531 |
+
}
|
4532 |
+
try {
|
4533 |
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
4534 |
+
return cachedClearTimeout(marker);
|
4535 |
+
} catch (e){
|
4536 |
+
try {
|
4537 |
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
4538 |
+
return cachedClearTimeout.call(null, marker);
|
4539 |
+
} catch (e){
|
4540 |
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
4541 |
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
4542 |
+
return cachedClearTimeout.call(this, marker);
|
4543 |
+
}
|
4544 |
+
}
|
4545 |
|
|
|
|
|
|
|
4546 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4547 |
|
4548 |
+
}
|
4549 |
+
var queue = [];
|
4550 |
+
var draining = false;
|
4551 |
+
var currentQueue;
|
4552 |
+
var queueIndex = -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4553 |
|
4554 |
+
function cleanUpNextTick() {
|
4555 |
+
if (!draining || !currentQueue) {
|
4556 |
+
return;
|
4557 |
+
}
|
4558 |
+
draining = false;
|
4559 |
+
if (currentQueue.length) {
|
4560 |
+
queue = currentQueue.concat(queue);
|
4561 |
+
} else {
|
4562 |
+
queueIndex = -1;
|
4563 |
+
}
|
4564 |
+
if (queue.length) {
|
4565 |
+
drainQueue();
|
4566 |
+
}
|
4567 |
+
}
|
4568 |
|
4569 |
+
function drainQueue() {
|
4570 |
+
if (draining) {
|
4571 |
+
return;
|
4572 |
}
|
4573 |
+
var timeout = runTimeout(cleanUpNextTick);
|
4574 |
+
draining = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4575 |
|
4576 |
+
var len = queue.length;
|
4577 |
+
while(len) {
|
4578 |
+
currentQueue = queue;
|
4579 |
+
queue = [];
|
4580 |
+
while (++queueIndex < len) {
|
4581 |
+
if (currentQueue) {
|
4582 |
+
currentQueue[queueIndex].run();
|
4583 |
+
}
|
4584 |
+
}
|
4585 |
+
queueIndex = -1;
|
4586 |
+
len = queue.length;
|
4587 |
+
}
|
4588 |
+
currentQueue = null;
|
4589 |
+
draining = false;
|
4590 |
+
runClearTimeout(timeout);
|
4591 |
+
}
|
4592 |
|
4593 |
+
process.nextTick = function (fun) {
|
4594 |
+
var args = new Array(arguments.length - 1);
|
4595 |
+
if (arguments.length > 1) {
|
4596 |
+
for (var i = 1; i < arguments.length; i++) {
|
4597 |
+
args[i - 1] = arguments[i];
|
4598 |
+
}
|
4599 |
}
|
4600 |
+
queue.push(new Item(fun, args));
|
4601 |
+
if (queue.length === 1 && !draining) {
|
4602 |
+
runTimeout(drainQueue);
|
4603 |
+
}
|
4604 |
+
};
|
|
|
|
|
|
|
|
|
|
|
4605 |
|
4606 |
+
// v8 likes predictible objects
|
4607 |
+
function Item(fun, array) {
|
4608 |
+
this.fun = fun;
|
4609 |
+
this.array = array;
|
4610 |
+
}
|
4611 |
+
Item.prototype.run = function () {
|
4612 |
+
this.fun.apply(null, this.array);
|
4613 |
+
};
|
4614 |
+
process.title = 'browser';
|
4615 |
+
process.browser = true;
|
4616 |
+
process.env = {};
|
4617 |
+
process.argv = [];
|
4618 |
+
process.version = ''; // empty string to avoid regexp issues
|
4619 |
+
process.versions = {};
|
4620 |
|
4621 |
+
function noop() {}
|
|
|
|
|
4622 |
|
4623 |
+
process.on = noop;
|
4624 |
+
process.addListener = noop;
|
4625 |
+
process.once = noop;
|
4626 |
+
process.off = noop;
|
4627 |
+
process.removeListener = noop;
|
4628 |
+
process.removeAllListeners = noop;
|
4629 |
+
process.emit = noop;
|
4630 |
+
process.prependListener = noop;
|
4631 |
+
process.prependOnceListener = noop;
|
4632 |
|
4633 |
+
process.listeners = function (name) { return [] }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4634 |
|
4635 |
+
process.binding = function (name) {
|
4636 |
+
throw new Error('process.binding is not supported');
|
4637 |
+
};
|
4638 |
|
4639 |
+
process.cwd = function () { return '/' };
|
4640 |
+
process.chdir = function (dir) {
|
4641 |
+
throw new Error('process.chdir is not supported');
|
4642 |
+
};
|
4643 |
+
process.umask = function() { return 0; };
|
4644 |
|
|
|
|
|
|
|
4645 |
|
4646 |
+
/***/ }),
|
4647 |
|
4648 |
+
/***/ 129:
|
4649 |
+
/***/ (function(module, exports, __webpack_require__) {
|
4650 |
|
4651 |
+
"use strict";
|
4652 |
+
/** @license React v16.13.1
|
4653 |
+
* react-is.production.min.js
|
4654 |
+
*
|
4655 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
4656 |
+
*
|
4657 |
+
* This source code is licensed under the MIT license found in the
|
4658 |
+
* LICENSE file in the root directory of this source tree.
|
4659 |
*/
|
4660 |
|
4661 |
+
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
4662 |
+
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
4663 |
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
|
4664 |
+
exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
|
4665 |
+
exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
|
4666 |
+
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
|
4667 |
|
4668 |
|
4669 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4670 |
|
4671 |
+
/***/ 13:
|
4672 |
+
/***/ (function(module, exports) {
|
|
|
|
|
4673 |
|
4674 |
+
(function() { module.exports = window["wp"]["compose"]; }());
|
|
|
|
|
|
|
4675 |
|
4676 |
+
/***/ }),
|
|
|
4677 |
|
4678 |
+
/***/ 14:
|
4679 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
4680 |
|
4681 |
+
(function() { module.exports = window["wp"]["url"]; }());
|
|
|
|
|
|
|
|
|
|
|
|
|
4682 |
|
4683 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
4684 |
|
4685 |
+
/***/ 15:
|
4686 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
4687 |
|
4688 |
+
"use strict";
|
4689 |
+
/* unused harmony export ADMIN_URL */
|
4690 |
+
/* unused harmony export COUNTRIES */
|
4691 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CURRENCY; });
|
4692 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return LOCALE; });
|
4693 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ORDER_STATUSES; });
|
4694 |
+
/* unused harmony export SITE_TITLE */
|
4695 |
+
/* unused harmony export WC_ASSET_URL */
|
4696 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getSetting; });
|
4697 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return setSetting; });
|
4698 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getAdminLink; });
|
4699 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return enqueueScript; });
|
4700 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
4701 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
4702 |
+
/**
|
4703 |
+
* External dependencies
|
4704 |
+
*/
|
4705 |
+
// Remove mutable data from settings object to prevent access. Data stores should be used instead.
|
|
|
|
|
|
|
|
|
|
|
4706 |
|
4707 |
+
const mutableSources = ['wcAdminSettings', 'preloadSettings'];
|
4708 |
+
const settings = typeof wcSettings === 'object' ? wcSettings : {};
|
4709 |
+
const SOURCE = Object.keys(settings).reduce((source, key) => {
|
4710 |
+
if (!mutableSources.includes(key)) {
|
4711 |
+
source[key] = settings[key];
|
4712 |
+
}
|
4713 |
|
4714 |
+
return source;
|
4715 |
+
}, {});
|
4716 |
+
const ADMIN_URL = SOURCE.adminUrl;
|
4717 |
+
const COUNTRIES = SOURCE.countries;
|
4718 |
+
const CURRENCY = SOURCE.currency;
|
4719 |
+
const LOCALE = SOURCE.locale;
|
4720 |
+
const ORDER_STATUSES = SOURCE.orderStatuses;
|
4721 |
+
const SITE_TITLE = SOURCE.siteTitle;
|
4722 |
+
const WC_ASSET_URL = SOURCE.wcAssetUrl;
|
4723 |
+
/**
|
4724 |
+
* Retrieves a setting value from the setting state.
|
4725 |
+
*
|
4726 |
+
* @param {string} name The identifier for the setting.
|
4727 |
+
* @param {*} [fallback=false] The value to use as a fallback
|
4728 |
+
* if the setting is not in the
|
4729 |
+
* state.
|
4730 |
+
* @param {Function} [filter=( val ) => val] A callback for filtering the
|
4731 |
+
* value before it's returned.
|
4732 |
+
* Receives both the found value
|
4733 |
+
* (if it exists for the key) and
|
4734 |
+
* the provided fallback arg.
|
4735 |
+
*
|
4736 |
+
* @return {*} The value present in the settings state for the given
|
4737 |
+
* name.
|
4738 |
+
*/
|
4739 |
+
|
4740 |
+
function getSetting(name, fallback = false, filter = val => val) {
|
4741 |
+
if (mutableSources.includes(name)) {
|
4742 |
+
throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Mutable settings should be accessed via data store.'));
|
4743 |
+
}
|
4744 |
|
4745 |
+
const value = SOURCE.hasOwnProperty(name) ? SOURCE[name] : fallback;
|
4746 |
+
return filter(value, fallback);
|
4747 |
+
}
|
4748 |
+
/**
|
4749 |
+
* Sets a value to a property on the settings state.
|
4750 |
+
*
|
4751 |
+
* NOTE: This feature is to be removed in favour of data stores when a full migration
|
4752 |
+
* is complete.
|
4753 |
+
*
|
4754 |
+
* @deprecated
|
4755 |
+
*
|
4756 |
+
* @param {string} name The setting property key for the
|
4757 |
+
* setting being mutated.
|
4758 |
+
* @param {*} value The value to set.
|
4759 |
+
* @param {Function} [filter=( val ) => val] Allows for providing a callback
|
4760 |
+
* to sanitize the setting (eg.
|
4761 |
+
* ensure it's a number)
|
4762 |
+
*/
|
4763 |
|
4764 |
+
function setSetting(name, value, filter = val => val) {
|
4765 |
+
if (mutableSources.includes(name)) {
|
4766 |
+
throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Mutable settings should be mutated via data store.'));
|
4767 |
+
}
|
4768 |
|
4769 |
+
SOURCE[name] = filter(value);
|
4770 |
+
}
|
4771 |
/**
|
4772 |
+
* Returns a string with the site's wp-admin URL appended. JS version of `admin_url`.
|
4773 |
+
*
|
4774 |
+
* @param {string} path Relative path.
|
4775 |
+
* @return {string} Full admin URL.
|
4776 |
*/
|
4777 |
|
4778 |
+
function getAdminLink(path) {
|
4779 |
+
return (ADMIN_URL || '') + path;
|
4780 |
+
}
|
4781 |
+
/**
|
4782 |
+
* Adds a script to the page if it has not already been loaded. JS version of `wp_enqueue_script`.
|
4783 |
+
*
|
4784 |
+
* @param {Object} script WP_Script
|
4785 |
+
* @param {string} script.handle Script handle.
|
4786 |
+
* @param {string} script.src Script URL.
|
4787 |
+
*/
|
4788 |
|
4789 |
+
function enqueueScript(script) {
|
4790 |
+
return new Promise((resolve, reject) => {
|
4791 |
+
if (document.querySelector(`#${script.handle}-js`)) {
|
4792 |
+
resolve();
|
4793 |
+
}
|
4794 |
|
4795 |
+
const domElement = document.createElement('script');
|
4796 |
+
domElement.src = script.src;
|
4797 |
+
domElement.id = `${script.handle}-js`;
|
4798 |
+
domElement.async = true;
|
4799 |
+
domElement.onload = resolve;
|
4800 |
+
domElement.onerror = reject;
|
4801 |
+
document.body.appendChild(domElement);
|
4802 |
+
});
|
4803 |
+
}
|
4804 |
|
4805 |
+
/***/ }),
|
4806 |
|
4807 |
+
/***/ 159:
|
4808 |
+
/***/ (function(module, exports, __webpack_require__) {
|
4809 |
|
4810 |
+
"use strict";
|
4811 |
|
4812 |
|
4813 |
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4814 |
|
4815 |
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
4816 |
|
4817 |
+
var _extends = _interopDefault(__webpack_require__(35));
|
4818 |
+
var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(291));
|
4819 |
+
var React = __webpack_require__(5);
|
4820 |
+
var React__default = _interopDefault(React);
|
4821 |
+
var _inheritsLoose = _interopDefault(__webpack_require__(292));
|
4822 |
+
var _assertThisInitialized = _interopDefault(__webpack_require__(294));
|
4823 |
|
4824 |
+
var is = {
|
4825 |
+
arr: Array.isArray,
|
4826 |
+
obj: function obj(a) {
|
4827 |
+
return Object.prototype.toString.call(a) === '[object Object]';
|
4828 |
+
},
|
4829 |
+
fun: function fun(a) {
|
4830 |
+
return typeof a === 'function';
|
4831 |
+
},
|
4832 |
+
str: function str(a) {
|
4833 |
+
return typeof a === 'string';
|
4834 |
+
},
|
4835 |
+
num: function num(a) {
|
4836 |
+
return typeof a === 'number';
|
4837 |
+
},
|
4838 |
+
und: function und(a) {
|
4839 |
+
return a === void 0;
|
4840 |
+
},
|
4841 |
+
nul: function nul(a) {
|
4842 |
+
return a === null;
|
4843 |
+
},
|
4844 |
+
set: function set(a) {
|
4845 |
+
return a instanceof Set;
|
4846 |
+
},
|
4847 |
+
map: function map(a) {
|
4848 |
+
return a instanceof Map;
|
4849 |
+
},
|
4850 |
+
equ: function equ(a, b) {
|
4851 |
+
if (typeof a !== typeof b) return false;
|
4852 |
+
if (is.str(a) || is.num(a)) return a === b;
|
4853 |
+
if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
|
4854 |
+
var i;
|
4855 |
|
4856 |
+
for (i in a) {
|
4857 |
+
if (!(i in b)) return false;
|
4858 |
+
}
|
4859 |
|
4860 |
+
for (i in b) {
|
4861 |
+
if (a[i] !== b[i]) return false;
|
4862 |
+
}
|
4863 |
|
4864 |
+
return is.und(i) ? a === b : true;
|
4865 |
+
}
|
4866 |
+
};
|
4867 |
+
function merge(target, lowercase) {
|
4868 |
+
if (lowercase === void 0) {
|
4869 |
+
lowercase = true;
|
4870 |
+
}
|
4871 |
|
4872 |
+
return function (object) {
|
4873 |
+
return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
|
4874 |
+
var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
|
4875 |
+
acc[key] = target(key);
|
4876 |
+
return acc;
|
4877 |
+
}, target);
|
4878 |
+
};
|
4879 |
+
}
|
4880 |
+
function useForceUpdate() {
|
4881 |
+
var _useState = React.useState(false),
|
4882 |
+
f = _useState[1];
|
4883 |
|
4884 |
+
var forceUpdate = React.useCallback(function () {
|
4885 |
+
return f(function (v) {
|
4886 |
+
return !v;
|
4887 |
+
});
|
4888 |
+
}, []);
|
4889 |
+
return forceUpdate;
|
4890 |
+
}
|
4891 |
+
function withDefault(value, defaultValue) {
|
4892 |
+
return is.und(value) || is.nul(value) ? defaultValue : value;
|
4893 |
+
}
|
4894 |
+
function toArray(a) {
|
4895 |
+
return !is.und(a) ? is.arr(a) ? a : [a] : [];
|
4896 |
+
}
|
4897 |
+
function callProp(obj) {
|
4898 |
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
4899 |
+
args[_key - 1] = arguments[_key];
|
4900 |
+
}
|
4901 |
|
4902 |
+
return is.fun(obj) ? obj.apply(void 0, args) : obj;
|
4903 |
+
}
|
4904 |
|
4905 |
+
function getForwardProps(props) {
|
4906 |
+
var to = props.to,
|
4907 |
+
from = props.from,
|
4908 |
+
config = props.config,
|
4909 |
+
onStart = props.onStart,
|
4910 |
+
onRest = props.onRest,
|
4911 |
+
onFrame = props.onFrame,
|
4912 |
+
children = props.children,
|
4913 |
+
reset = props.reset,
|
4914 |
+
reverse = props.reverse,
|
4915 |
+
force = props.force,
|
4916 |
+
immediate = props.immediate,
|
4917 |
+
delay = props.delay,
|
4918 |
+
attach = props.attach,
|
4919 |
+
destroyed = props.destroyed,
|
4920 |
+
interpolateTo = props.interpolateTo,
|
4921 |
+
ref = props.ref,
|
4922 |
+
lazy = props.lazy,
|
4923 |
+
forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
|
4924 |
+
|
4925 |
+
return forward;
|
4926 |
+
}
|
4927 |
+
|
4928 |
+
function interpolateTo(props) {
|
4929 |
+
var forward = getForwardProps(props);
|
4930 |
+
if (is.und(forward)) return _extends({
|
4931 |
+
to: forward
|
4932 |
+
}, props);
|
4933 |
+
var rest = Object.keys(props).reduce(function (a, k) {
|
4934 |
+
var _extends2;
|
4935 |
+
|
4936 |
+
return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2));
|
4937 |
+
}, {});
|
4938 |
+
return _extends({
|
4939 |
+
to: forward
|
4940 |
+
}, rest);
|
4941 |
+
}
|
4942 |
+
function handleRef(ref, forward) {
|
4943 |
+
if (forward) {
|
4944 |
+
// If it's a function, assume it's a ref callback
|
4945 |
+
if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
|
4946 |
+
forward.current = ref;
|
4947 |
+
}
|
4948 |
+
}
|
4949 |
|
4950 |
+
return ref;
|
4951 |
+
}
|
4952 |
|
4953 |
+
var Animated =
|
4954 |
+
/*#__PURE__*/
|
4955 |
+
function () {
|
4956 |
+
function Animated() {
|
4957 |
+
this.payload = void 0;
|
4958 |
+
this.children = [];
|
4959 |
+
}
|
4960 |
|
4961 |
+
var _proto = Animated.prototype;
|
4962 |
|
4963 |
+
_proto.getAnimatedValue = function getAnimatedValue() {
|
4964 |
+
return this.getValue();
|
4965 |
+
};
|
4966 |
|
4967 |
+
_proto.getPayload = function getPayload() {
|
4968 |
+
return this.payload || this;
|
4969 |
+
};
|
4970 |
|
4971 |
+
_proto.attach = function attach() {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4972 |
|
4973 |
+
_proto.detach = function detach() {};
|
|
|
4974 |
|
4975 |
+
_proto.getChildren = function getChildren() {
|
4976 |
+
return this.children;
|
4977 |
+
};
|
4978 |
|
4979 |
+
_proto.addChild = function addChild(child) {
|
4980 |
+
if (this.children.length === 0) this.attach();
|
4981 |
+
this.children.push(child);
|
4982 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4983 |
|
4984 |
+
_proto.removeChild = function removeChild(child) {
|
4985 |
+
var index = this.children.indexOf(child);
|
4986 |
+
this.children.splice(index, 1);
|
4987 |
+
if (this.children.length === 0) this.detach();
|
4988 |
};
|
4989 |
|
4990 |
+
return Animated;
|
4991 |
+
}();
|
4992 |
+
var AnimatedArray =
|
4993 |
+
/*#__PURE__*/
|
4994 |
+
function (_Animated) {
|
4995 |
+
_inheritsLoose(AnimatedArray, _Animated);
|
4996 |
+
|
4997 |
+
function AnimatedArray() {
|
4998 |
+
var _this;
|
4999 |
+
|
5000 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
5001 |
+
args[_key] = arguments[_key];
|
5002 |
}
|
5003 |
|
5004 |
+
_this = _Animated.call.apply(_Animated, [this].concat(args)) || this;
|
5005 |
+
_this.payload = [];
|
5006 |
|
5007 |
+
_this.attach = function () {
|
5008 |
+
return _this.payload.forEach(function (p) {
|
5009 |
+
return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
|
5010 |
+
});
|
5011 |
+
};
|
5012 |
+
|
5013 |
+
_this.detach = function () {
|
5014 |
+
return _this.payload.forEach(function (p) {
|
5015 |
+
return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
|
5016 |
+
});
|
5017 |
+
};
|
5018 |
+
|
5019 |
+
return _this;
|
5020 |
}
|
5021 |
|
5022 |
+
return AnimatedArray;
|
5023 |
+
}(Animated);
|
5024 |
+
var AnimatedObject =
|
5025 |
+
/*#__PURE__*/
|
5026 |
+
function (_Animated2) {
|
5027 |
+
_inheritsLoose(AnimatedObject, _Animated2);
|
|
|
|
|
|
|
|
|
|
|
5028 |
|
5029 |
+
function AnimatedObject() {
|
5030 |
+
var _this2;
|
5031 |
+
|
5032 |
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
5033 |
+
args[_key3] = arguments[_key3];
|
5034 |
+
}
|
5035 |
+
|
5036 |
+
_this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this;
|
5037 |
+
_this2.payload = {};
|
5038 |
+
|
5039 |
+
_this2.attach = function () {
|
5040 |
+
return Object.values(_this2.payload).forEach(function (s) {
|
5041 |
+
return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
|
5042 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
5043 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5044 |
|
5045 |
+
_this2.detach = function () {
|
5046 |
+
return Object.values(_this2.payload).forEach(function (s) {
|
5047 |
+
return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
|
5048 |
+
});
|
5049 |
+
};
|
5050 |
|
5051 |
+
return _this2;
|
5052 |
+
}
|
|
|
5053 |
|
5054 |
+
var _proto2 = AnimatedObject.prototype;
|
|
|
|
|
|
|
5055 |
|
5056 |
+
_proto2.getValue = function getValue(animated) {
|
5057 |
+
if (animated === void 0) {
|
5058 |
+
animated = false;
|
5059 |
+
}
|
5060 |
|
5061 |
+
var payload = {};
|
5062 |
+
|
5063 |
+
for (var _key4 in this.payload) {
|
5064 |
+
var value = this.payload[_key4];
|
5065 |
+
if (animated && !(value instanceof Animated)) continue;
|
5066 |
+
payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
|
5067 |
}
|
5068 |
+
|
5069 |
+
return payload;
|
5070 |
};
|
5071 |
|
5072 |
+
_proto2.getAnimatedValue = function getAnimatedValue() {
|
5073 |
+
return this.getValue(true);
|
5074 |
};
|
5075 |
|
5076 |
+
return AnimatedObject;
|
5077 |
+
}(Animated);
|
5078 |
+
|
5079 |
+
var applyAnimatedValues;
|
5080 |
+
function injectApplyAnimatedValues(fn, transform) {
|
5081 |
+
applyAnimatedValues = {
|
5082 |
+
fn: fn,
|
5083 |
+
transform: transform
|
5084 |
};
|
5085 |
+
}
|
5086 |
+
var colorNames;
|
5087 |
+
function injectColorNames(names) {
|
5088 |
+
colorNames = names;
|
5089 |
+
}
|
5090 |
+
var requestFrame = function requestFrame(cb) {
|
5091 |
+
return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1;
|
5092 |
+
};
|
5093 |
+
var cancelFrame = function cancelFrame(id) {
|
5094 |
+
typeof window !== 'undefined' && window.cancelAnimationFrame(id);
|
5095 |
+
};
|
5096 |
+
function injectFrame(raf, caf) {
|
5097 |
+
requestFrame = raf;
|
5098 |
+
cancelFrame = caf;
|
5099 |
+
}
|
5100 |
+
var interpolation;
|
5101 |
+
function injectStringInterpolator(fn) {
|
5102 |
+
interpolation = fn;
|
5103 |
+
}
|
5104 |
+
var now = function now() {
|
5105 |
+
return Date.now();
|
5106 |
+
};
|
5107 |
+
function injectNow(nowFn) {
|
5108 |
+
now = nowFn;
|
5109 |
+
}
|
5110 |
+
var defaultElement;
|
5111 |
+
function injectDefaultElement(el) {
|
5112 |
+
defaultElement = el;
|
5113 |
+
}
|
5114 |
+
var animatedApi = function animatedApi(node) {
|
5115 |
+
return node.current;
|
5116 |
+
};
|
5117 |
+
function injectAnimatedApi(fn) {
|
5118 |
+
animatedApi = fn;
|
5119 |
+
}
|
5120 |
+
var createAnimatedStyle;
|
5121 |
+
function injectCreateAnimatedStyle(factory) {
|
5122 |
+
createAnimatedStyle = factory;
|
5123 |
+
}
|
5124 |
+
var manualFrameloop;
|
5125 |
+
function injectManualFrameloop(callback) {
|
5126 |
+
manualFrameloop = callback;
|
5127 |
+
}
|
5128 |
+
|
5129 |
+
var Globals = /*#__PURE__*/Object.freeze({
|
5130 |
+
get applyAnimatedValues () { return applyAnimatedValues; },
|
5131 |
+
injectApplyAnimatedValues: injectApplyAnimatedValues,
|
5132 |
+
get colorNames () { return colorNames; },
|
5133 |
+
injectColorNames: injectColorNames,
|
5134 |
+
get requestFrame () { return requestFrame; },
|
5135 |
+
get cancelFrame () { return cancelFrame; },
|
5136 |
+
injectFrame: injectFrame,
|
5137 |
+
get interpolation () { return interpolation; },
|
5138 |
+
injectStringInterpolator: injectStringInterpolator,
|
5139 |
+
get now () { return now; },
|
5140 |
+
injectNow: injectNow,
|
5141 |
+
get defaultElement () { return defaultElement; },
|
5142 |
+
injectDefaultElement: injectDefaultElement,
|
5143 |
+
get animatedApi () { return animatedApi; },
|
5144 |
+
injectAnimatedApi: injectAnimatedApi,
|
5145 |
+
get createAnimatedStyle () { return createAnimatedStyle; },
|
5146 |
+
injectCreateAnimatedStyle: injectCreateAnimatedStyle,
|
5147 |
+
get manualFrameloop () { return manualFrameloop; },
|
5148 |
+
injectManualFrameloop: injectManualFrameloop
|
5149 |
+
});
|
5150 |
|
5151 |
+
/**
|
5152 |
+
* Wraps the `style` property with `AnimatedStyle`.
|
5153 |
+
*/
|
|
|
|
|
|
|
|
|
5154 |
|
5155 |
+
var AnimatedProps =
|
5156 |
+
/*#__PURE__*/
|
5157 |
+
function (_AnimatedObject) {
|
5158 |
+
_inheritsLoose(AnimatedProps, _AnimatedObject);
|
5159 |
|
5160 |
+
function AnimatedProps(props, callback) {
|
5161 |
+
var _this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5162 |
|
5163 |
+
_this = _AnimatedObject.call(this) || this;
|
5164 |
+
_this.update = void 0;
|
5165 |
+
_this.payload = !props.style ? props : _extends({}, props, {
|
5166 |
+
style: createAnimatedStyle(props.style)
|
5167 |
+
});
|
5168 |
+
_this.update = callback;
|
|
|
|
|
|
|
5169 |
|
5170 |
+
_this.attach();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5171 |
|
5172 |
+
return _this;
|
5173 |
+
}
|
|
|
|
|
5174 |
|
5175 |
+
return AnimatedProps;
|
5176 |
+
}(AnimatedObject);
|
|
|
|
|
|
|
|
|
5177 |
|
5178 |
+
var isFunctionComponent = function isFunctionComponent(val) {
|
5179 |
+
return is.fun(val) && !(val.prototype instanceof React__default.Component);
|
5180 |
+
};
|
|
|
5181 |
|
5182 |
+
var createAnimatedComponent = function createAnimatedComponent(Component) {
|
5183 |
+
var AnimatedComponent = React.forwardRef(function (props, ref) {
|
5184 |
+
var forceUpdate = useForceUpdate();
|
5185 |
+
var mounted = React.useRef(true);
|
5186 |
+
var propsAnimated = React.useRef(null);
|
5187 |
+
var node = React.useRef(null);
|
5188 |
+
var attachProps = React.useCallback(function (props) {
|
5189 |
+
var oldPropsAnimated = propsAnimated.current;
|
5190 |
|
5191 |
+
var callback = function callback() {
|
5192 |
+
var didUpdate = false;
|
5193 |
|
5194 |
+
if (node.current) {
|
5195 |
+
didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
|
5196 |
+
}
|
|
|
|
|
|
|
5197 |
|
5198 |
+
if (!node.current || didUpdate === false) {
|
5199 |
+
// If no referenced node has been found, or the update target didn't have a
|
5200 |
+
// native-responder, then forceUpdate the animation ...
|
5201 |
+
forceUpdate();
|
5202 |
+
}
|
5203 |
+
};
|
5204 |
|
5205 |
+
propsAnimated.current = new AnimatedProps(props, callback);
|
5206 |
+
oldPropsAnimated && oldPropsAnimated.detach();
|
5207 |
+
}, []);
|
5208 |
+
React.useEffect(function () {
|
5209 |
+
return function () {
|
5210 |
+
mounted.current = false;
|
5211 |
+
propsAnimated.current && propsAnimated.current.detach();
|
5212 |
+
};
|
5213 |
+
}, []);
|
5214 |
+
React.useImperativeHandle(ref, function () {
|
5215 |
+
return animatedApi(node, mounted, forceUpdate);
|
5216 |
+
});
|
5217 |
+
attachProps(props);
|
5218 |
|
5219 |
+
var _getValue = propsAnimated.current.getValue(),
|
5220 |
+
scrollTop = _getValue.scrollTop,
|
5221 |
+
scrollLeft = _getValue.scrollLeft,
|
5222 |
+
animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
|
5223 |
+
// See: https://github.com/react-spring/react-spring/issues/569
|
5224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5225 |
|
5226 |
+
var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
|
5227 |
+
return node.current = handleRef(childRef, ref);
|
5228 |
+
};
|
5229 |
+
return React__default.createElement(Component, _extends({}, animatedProps, {
|
5230 |
+
ref: refFn
|
5231 |
+
}));
|
5232 |
+
});
|
5233 |
+
return AnimatedComponent;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5234 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5235 |
|
5236 |
+
var active = false;
|
5237 |
+
var controllers = new Set();
|
5238 |
|
5239 |
+
var update = function update() {
|
5240 |
+
if (!active) return false;
|
5241 |
+
var time = now();
|
5242 |
|
5243 |
+
for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
5244 |
+
var _ref;
|
5245 |
|
5246 |
+
if (_isArray) {
|
5247 |
+
if (_i >= _iterator.length) break;
|
5248 |
+
_ref = _iterator[_i++];
|
5249 |
+
} else {
|
5250 |
+
_i = _iterator.next();
|
5251 |
+
if (_i.done) break;
|
5252 |
+
_ref = _i.value;
|
5253 |
+
}
|
5254 |
|
5255 |
+
var controller = _ref;
|
5256 |
+
var isActive = false;
|
|
|
5257 |
|
5258 |
+
for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
|
5259 |
+
var config = controller.configs[configIdx];
|
5260 |
+
var endOfAnimation = void 0,
|
5261 |
+
lastTime = void 0;
|
|
|
5262 |
|
5263 |
+
for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
|
5264 |
+
var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
|
|
|
|
|
|
|
|
|
|
|
5265 |
|
5266 |
+
if (animation.done) continue;
|
5267 |
+
var from = config.fromValues[valIdx];
|
5268 |
+
var to = config.toValues[valIdx];
|
5269 |
+
var position = animation.lastPosition;
|
5270 |
+
var isAnimated = to instanceof Animated;
|
5271 |
+
var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
|
5272 |
+
if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
|
|
|
|
|
5273 |
|
5274 |
+
if (config.immediate) {
|
5275 |
+
animation.setValue(to);
|
5276 |
+
animation.done = true;
|
5277 |
+
continue;
|
5278 |
+
} // Break animation when string values are involved
|
|
|
5279 |
|
|
|
|
|
|
|
5280 |
|
5281 |
+
if (typeof from === 'string' || typeof to === 'string') {
|
5282 |
+
animation.setValue(to);
|
5283 |
+
animation.done = true;
|
5284 |
+
continue;
|
5285 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5286 |
|
5287 |
+
if (config.duration !== void 0) {
|
5288 |
+
/** Duration easing */
|
5289 |
+
position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
|
5290 |
+
endOfAnimation = time >= animation.startTime + config.duration;
|
5291 |
+
} else if (config.decay) {
|
5292 |
+
/** Decay easing */
|
5293 |
+
position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
|
5294 |
+
endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
|
5295 |
+
if (endOfAnimation) to = position;
|
5296 |
+
} else {
|
5297 |
+
/** Spring easing */
|
5298 |
+
lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
|
5299 |
+
velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
|
5300 |
|
5301 |
+
if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
|
5302 |
|
5303 |
+
var numSteps = Math.floor(time - lastTime);
|
|
|
|
|
5304 |
|
5305 |
+
for (var i = 0; i < numSteps; ++i) {
|
5306 |
+
var force = -config.tension * (position - to);
|
5307 |
+
var damping = -config.friction * velocity;
|
5308 |
+
var acceleration = (force + damping) / config.mass;
|
5309 |
+
velocity = velocity + acceleration * 1 / 1000;
|
5310 |
+
position = position + velocity * 1 / 1000;
|
5311 |
+
} // Conditions for stopping the spring animation
|
5312 |
|
5313 |
|
5314 |
+
var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false;
|
5315 |
+
var isVelocity = Math.abs(velocity) <= config.precision;
|
5316 |
+
var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
|
5317 |
+
endOfAnimation = isOvershooting || isVelocity && isDisplacement;
|
5318 |
+
animation.lastVelocity = velocity;
|
5319 |
+
animation.lastTime = time;
|
5320 |
+
} // Trails aren't done until their parents conclude
|
5321 |
|
5322 |
|
5323 |
+
if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false;
|
5324 |
|
5325 |
+
if (endOfAnimation) {
|
5326 |
+
// Ensure that we end up with a round value
|
5327 |
+
if (animation.value !== to) position = to;
|
5328 |
+
animation.done = true;
|
5329 |
+
} else isActive = true;
|
5330 |
|
5331 |
+
animation.setValue(position);
|
5332 |
+
animation.lastPosition = position;
|
5333 |
+
} // Keep track of updated values only when necessary
|
5334 |
|
5335 |
|
5336 |
+
if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue();
|
5337 |
+
} // Update callbacks in the end of the frame
|
5338 |
|
5339 |
|
5340 |
+
if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5341 |
|
5342 |
+
if (!isActive) {
|
5343 |
+
controllers.delete(controller);
|
5344 |
+
controller.stop(true);
|
|
|
|
|
5345 |
}
|
5346 |
+
} // Loop over as long as there are controllers ...
|
5347 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5348 |
|
5349 |
+
if (controllers.size) {
|
5350 |
+
if (manualFrameloop) manualFrameloop();else requestFrame(update);
|
5351 |
+
} else {
|
5352 |
+
active = false;
|
5353 |
}
|
5354 |
|
5355 |
+
return active;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5356 |
};
|
|
|
5357 |
|
5358 |
+
var start = function start(controller) {
|
5359 |
+
if (!controllers.has(controller)) controllers.add(controller);
|
5360 |
|
5361 |
+
if (!active) {
|
5362 |
+
active = true;
|
5363 |
+
if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
|
5364 |
+
}
|
5365 |
+
};
|
5366 |
|
5367 |
+
var stop = function stop(controller) {
|
5368 |
+
if (controllers.has(controller)) controllers.delete(controller);
|
5369 |
+
};
|
5370 |
|
5371 |
+
function createInterpolator(range, output, extrapolate) {
|
5372 |
+
if (typeof range === 'function') {
|
5373 |
+
return range;
|
5374 |
+
}
|
5375 |
+
|
5376 |
+
if (Array.isArray(range)) {
|
5377 |
+
return createInterpolator({
|
5378 |
+
range: range,
|
5379 |
+
output: output,
|
5380 |
+
extrapolate: extrapolate
|
5381 |
+
});
|
5382 |
+
}
|
5383 |
|
5384 |
+
if (interpolation && typeof range.output[0] === 'string') {
|
5385 |
+
return interpolation(range);
|
5386 |
+
}
|
5387 |
|
5388 |
+
var config = range;
|
5389 |
+
var outputRange = config.output;
|
5390 |
+
var inputRange = config.range || [0, 1];
|
5391 |
+
var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
|
5392 |
+
var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
|
5393 |
|
5394 |
+
var easing = config.easing || function (t) {
|
5395 |
+
return t;
|
5396 |
+
};
|
|
|
|
|
|
|
5397 |
|
5398 |
+
return function (input) {
|
5399 |
+
var range = findRange(input, inputRange);
|
5400 |
+
return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
|
|
|
5401 |
};
|
5402 |
+
}
|
5403 |
|
5404 |
+
function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
|
5405 |
+
var result = map ? map(input) : input; // Extrapolate
|
5406 |
+
|
5407 |
+
if (result < inputMin) {
|
5408 |
+
if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
|
5409 |
}
|
5410 |
|
5411 |
+
if (result > inputMax) {
|
5412 |
+
if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
|
5413 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5414 |
|
5415 |
+
if (outputMin === outputMax) return outputMin;
|
5416 |
+
if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
|
|
|
|
|
5417 |
|
5418 |
+
if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing
|
5419 |
|
5420 |
+
result = easing(result); // Output Range
|
5421 |
+
|
5422 |
+
if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
|
5423 |
+
return result;
|
5424 |
+
}
|
5425 |
+
|
5426 |
+
function findRange(input, inputRange) {
|
5427 |
+
for (var i = 1; i < inputRange.length - 1; ++i) {
|
5428 |
+
if (inputRange[i] >= input) break;
|
5429 |
}
|
5430 |
|
5431 |
+
return i - 1;
|
5432 |
+
}
|
|
|
|
|
|
|
5433 |
|
5434 |
+
var AnimatedInterpolation =
|
5435 |
+
/*#__PURE__*/
|
5436 |
+
function (_AnimatedArray) {
|
5437 |
+
_inheritsLoose(AnimatedInterpolation, _AnimatedArray);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5438 |
|
5439 |
+
function AnimatedInterpolation(parents, range, output, extrapolate) {
|
5440 |
+
var _this;
|
5441 |
|
5442 |
+
_this = _AnimatedArray.call(this) || this;
|
5443 |
+
_this.calc = void 0;
|
5444 |
+
_this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents];
|
5445 |
+
_this.calc = createInterpolator(range, output, extrapolate);
|
5446 |
+
return _this;
|
5447 |
}
|
5448 |
|
5449 |
+
var _proto = AnimatedInterpolation.prototype;
|
|
|
|
|
|
|
5450 |
|
5451 |
+
_proto.getValue = function getValue() {
|
5452 |
+
return this.calc.apply(this, this.payload.map(function (value) {
|
5453 |
+
return value.getValue();
|
5454 |
+
}));
|
5455 |
+
};
|
5456 |
|
5457 |
+
_proto.updateConfig = function updateConfig(range, output, extrapolate) {
|
5458 |
+
this.calc = createInterpolator(range, output, extrapolate);
|
5459 |
+
};
|
|
|
5460 |
|
5461 |
+
_proto.interpolate = function interpolate(range, output, extrapolate) {
|
5462 |
+
return new AnimatedInterpolation(this, range, output, extrapolate);
|
5463 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5464 |
|
5465 |
+
return AnimatedInterpolation;
|
5466 |
+
}(AnimatedArray);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5467 |
|
5468 |
+
var interpolate$1 = function interpolate(parents, range, output) {
|
5469 |
+
return parents && new AnimatedInterpolation(parents, range, output);
|
5470 |
+
};
|
5471 |
|
5472 |
+
var config = {
|
5473 |
+
default: {
|
5474 |
+
tension: 170,
|
5475 |
+
friction: 26
|
5476 |
+
},
|
5477 |
+
gentle: {
|
5478 |
+
tension: 120,
|
5479 |
+
friction: 14
|
5480 |
+
},
|
5481 |
+
wobbly: {
|
5482 |
+
tension: 180,
|
5483 |
+
friction: 12
|
5484 |
+
},
|
5485 |
+
stiff: {
|
5486 |
+
tension: 210,
|
5487 |
+
friction: 20
|
5488 |
+
},
|
5489 |
+
slow: {
|
5490 |
+
tension: 280,
|
5491 |
+
friction: 60
|
5492 |
+
},
|
5493 |
+
molasses: {
|
5494 |
+
tension: 280,
|
5495 |
+
friction: 120
|
5496 |
}
|
5497 |
};
|
5498 |
+
|
5499 |
+
/** API
|
5500 |
+
* useChain(references, timeSteps, timeFrame)
|
|
|
|
|
5501 |
*/
|
5502 |
|
5503 |
+
function useChain(refs, timeSteps, timeFrame) {
|
5504 |
+
if (timeFrame === void 0) {
|
5505 |
+
timeFrame = 1000;
|
5506 |
+
}
|
|
|
5507 |
|
5508 |
+
var previous = React.useRef();
|
5509 |
+
React.useEffect(function () {
|
5510 |
+
if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
|
5511 |
+
var current = _ref.current;
|
5512 |
+
return current && current.start();
|
5513 |
+
});else if (timeSteps) {
|
5514 |
+
refs.forEach(function (_ref2, index) {
|
5515 |
+
var current = _ref2.current;
|
5516 |
+
|
5517 |
+
if (current) {
|
5518 |
+
var ctrls = current.controllers;
|
5519 |
+
|
5520 |
+
if (ctrls.length) {
|
5521 |
+
var t = timeFrame * timeSteps[index];
|
5522 |
+
ctrls.forEach(function (ctrl) {
|
5523 |
+
ctrl.queue = ctrl.queue.map(function (e) {
|
5524 |
+
return _extends({}, e, {
|
5525 |
+
delay: e.delay + t
|
5526 |
+
});
|
5527 |
+
});
|
5528 |
+
ctrl.start();
|
5529 |
+
});
|
5530 |
+
}
|
5531 |
+
}
|
5532 |
+
});
|
5533 |
+
} else refs.reduce(function (q, _ref3, rI) {
|
5534 |
+
var current = _ref3.current;
|
5535 |
+
return q = q.then(function () {
|
5536 |
+
return current.start();
|
5537 |
+
});
|
5538 |
+
}, Promise.resolve());
|
5539 |
+
previous.current = refs;
|
5540 |
});
|
5541 |
+
}
|
5542 |
+
|
5543 |
/**
|
5544 |
+
* Animated works by building a directed acyclic graph of dependencies
|
5545 |
+
* transparently when you render your Animated components.
|
5546 |
*
|
5547 |
+
* new Animated.Value(0)
|
5548 |
+
* .interpolate() .interpolate() new Animated.Value(1)
|
5549 |
+
* opacity translateY scale
|
5550 |
+
* style transform
|
5551 |
+
* View#234 style
|
5552 |
+
* View#123
|
5553 |
+
*
|
5554 |
+
* A) Top Down phase
|
5555 |
+
* When an AnimatedValue is updated, we recursively go down through this
|
5556 |
+
* graph in order to find leaf nodes: the views that we flag as needing
|
5557 |
+
* an update.
|
5558 |
+
*
|
5559 |
+
* B) Bottom Up phase
|
5560 |
+
* When a view is flagged as needing an update, we recursively go back up
|
5561 |
+
* in order to build the new value that it needs. The reason why we need
|
5562 |
+
* this two-phases process is to deal with composite props such as
|
5563 |
+
* transform which can receive values from multiple parents.
|
5564 |
+
*/
|
5565 |
+
function addAnimatedStyles(node, styles) {
|
5566 |
+
if ('update' in node) {
|
5567 |
+
styles.add(node);
|
5568 |
+
} else {
|
5569 |
+
node.getChildren().forEach(function (child) {
|
5570 |
+
return addAnimatedStyles(child, styles);
|
5571 |
+
});
|
5572 |
+
}
|
5573 |
+
}
|
5574 |
|
5575 |
+
var AnimatedValue =
|
5576 |
+
/*#__PURE__*/
|
5577 |
+
function (_Animated) {
|
5578 |
+
_inheritsLoose(AnimatedValue, _Animated);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5579 |
|
5580 |
+
function AnimatedValue(_value) {
|
5581 |
+
var _this;
|
5582 |
|
5583 |
+
_this = _Animated.call(this) || this;
|
5584 |
+
_this.animatedStyles = new Set();
|
5585 |
+
_this.value = void 0;
|
5586 |
+
_this.startPosition = void 0;
|
5587 |
+
_this.lastPosition = void 0;
|
5588 |
+
_this.lastVelocity = void 0;
|
5589 |
+
_this.startTime = void 0;
|
5590 |
+
_this.lastTime = void 0;
|
5591 |
+
_this.done = false;
|
5592 |
+
|
5593 |
+
_this.setValue = function (value, flush) {
|
5594 |
+
if (flush === void 0) {
|
5595 |
+
flush = true;
|
5596 |
+
}
|
5597 |
|
5598 |
+
_this.value = value;
|
5599 |
+
if (flush) _this.flush();
|
5600 |
+
};
|
5601 |
|
5602 |
+
_this.value = _value;
|
5603 |
+
_this.startPosition = _value;
|
5604 |
+
_this.lastPosition = _value;
|
5605 |
+
return _this;
|
5606 |
+
}
|
5607 |
|
5608 |
+
var _proto = AnimatedValue.prototype;
|
5609 |
|
5610 |
+
_proto.flush = function flush() {
|
5611 |
+
if (this.animatedStyles.size === 0) {
|
5612 |
+
addAnimatedStyles(this, this.animatedStyles);
|
5613 |
}
|
5614 |
|
5615 |
+
this.animatedStyles.forEach(function (animatedStyle) {
|
5616 |
+
return animatedStyle.update();
|
5617 |
+
});
|
5618 |
+
};
|
5619 |
|
5620 |
+
_proto.clearStyles = function clearStyles() {
|
5621 |
+
this.animatedStyles.clear();
|
5622 |
+
};
|
5623 |
|
5624 |
+
_proto.getValue = function getValue() {
|
5625 |
+
return this.value;
|
|
|
|
|
|
|
5626 |
};
|
|
|
|
|
|
|
5627 |
|
5628 |
+
_proto.interpolate = function interpolate(range, output, extrapolate) {
|
5629 |
+
return new AnimatedInterpolation(this, range, output, extrapolate);
|
5630 |
+
};
|
5631 |
|
5632 |
+
return AnimatedValue;
|
5633 |
+
}(Animated);
|
5634 |
|
5635 |
+
var AnimatedValueArray =
|
5636 |
+
/*#__PURE__*/
|
5637 |
+
function (_AnimatedArray) {
|
5638 |
+
_inheritsLoose(AnimatedValueArray, _AnimatedArray);
|
5639 |
|
5640 |
+
function AnimatedValueArray(values) {
|
5641 |
+
var _this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5642 |
|
5643 |
+
_this = _AnimatedArray.call(this) || this;
|
5644 |
+
_this.payload = values.map(function (n) {
|
5645 |
+
return new AnimatedValue(n);
|
5646 |
+
});
|
5647 |
+
return _this;
|
5648 |
+
}
|
5649 |
|
5650 |
+
var _proto = AnimatedValueArray.prototype;
|
|
|
|
|
5651 |
|
5652 |
+
_proto.setValue = function setValue(value, flush) {
|
5653 |
+
var _this2 = this;
|
5654 |
|
5655 |
+
if (flush === void 0) {
|
5656 |
+
flush = true;
|
5657 |
+
}
|
5658 |
|
5659 |
+
if (Array.isArray(value)) {
|
5660 |
+
if (value.length === this.payload.length) {
|
5661 |
+
value.forEach(function (v, i) {
|
5662 |
+
return _this2.payload[i].setValue(v, flush);
|
5663 |
+
});
|
5664 |
+
}
|
5665 |
+
} else {
|
5666 |
+
this.payload.forEach(function (p) {
|
5667 |
+
return p.setValue(value, flush);
|
5668 |
+
});
|
5669 |
+
}
|
5670 |
+
};
|
5671 |
|
5672 |
+
_proto.getValue = function getValue() {
|
5673 |
+
return this.payload.map(function (v) {
|
5674 |
+
return v.getValue();
|
5675 |
+
});
|
5676 |
+
};
|
5677 |
|
5678 |
+
_proto.interpolate = function interpolate(range, output) {
|
5679 |
+
return new AnimatedInterpolation(this, range, output);
|
5680 |
+
};
|
5681 |
|
5682 |
+
return AnimatedValueArray;
|
5683 |
+
}(AnimatedArray);
|
5684 |
|
5685 |
+
var G = 0;
|
5686 |
|
5687 |
+
var Controller =
|
5688 |
+
/*#__PURE__*/
|
5689 |
+
function () {
|
5690 |
+
function Controller() {
|
5691 |
+
var _this = this;
|
5692 |
|
5693 |
+
this.id = void 0;
|
5694 |
+
this.idle = true;
|
5695 |
+
this.hasChanged = false;
|
5696 |
+
this.guid = 0;
|
5697 |
+
this.local = 0;
|
5698 |
+
this.props = {};
|
5699 |
+
this.merged = {};
|
5700 |
+
this.animations = {};
|
5701 |
+
this.interpolations = {};
|
5702 |
+
this.values = {};
|
5703 |
+
this.configs = [];
|
5704 |
+
this.listeners = [];
|
5705 |
+
this.queue = [];
|
5706 |
+
this.localQueue = void 0;
|
5707 |
|
5708 |
+
this.getValues = function () {
|
5709 |
+
return _this.interpolations;
|
5710 |
+
};
|
5711 |
|
5712 |
+
this.id = G++;
|
5713 |
+
}
|
5714 |
+
/** update(props)
|
5715 |
+
* This function filters input props and creates an array of tasks which are executed in .start()
|
5716 |
+
* Each task is allowed to carry a delay, which means it can execute asnychroneously */
|
5717 |
|
5718 |
|
5719 |
+
var _proto = Controller.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5720 |
|
5721 |
+
_proto.update = function update$$1(args) {
|
5722 |
+
//this._id = n + this.id
|
5723 |
+
if (!args) return this; // Extract delay and the to-prop from props
|
|
|
|
|
5724 |
|
5725 |
+
var _ref = interpolateTo(args),
|
5726 |
+
_ref$delay = _ref.delay,
|
5727 |
+
delay = _ref$delay === void 0 ? 0 : _ref$delay,
|
5728 |
+
to = _ref.to,
|
5729 |
+
props = _objectWithoutPropertiesLoose(_ref, ["delay", "to"]);
|
5730 |
|
5731 |
+
if (is.arr(to) || is.fun(to)) {
|
5732 |
+
// If config is either a function or an array queue it up as is
|
5733 |
+
this.queue.push(_extends({}, props, {
|
5734 |
+
delay: delay,
|
5735 |
+
to: to
|
5736 |
+
}));
|
5737 |
+
} else if (to) {
|
5738 |
+
// Otherwise go through each key since it could be delayed individually
|
5739 |
+
var ops = {};
|
5740 |
+
Object.entries(to).forEach(function (_ref2) {
|
5741 |
+
var _to;
|
5742 |
+
|
5743 |
+
var k = _ref2[0],
|
5744 |
+
v = _ref2[1];
|
5745 |
+
|
5746 |
+
// Fetch delay and create an entry, consisting of the to-props, the delay, and basic props
|
5747 |
+
var entry = _extends({
|
5748 |
+
to: (_to = {}, _to[k] = v, _to),
|
5749 |
+
delay: callProp(delay, k)
|
5750 |
+
}, props);
|
5751 |
+
|
5752 |
+
var previous = ops[entry.delay] && ops[entry.delay].to;
|
5753 |
+
ops[entry.delay] = _extends({}, ops[entry.delay], entry, {
|
5754 |
+
to: _extends({}, previous, entry.to)
|
5755 |
+
});
|
5756 |
+
});
|
5757 |
+
this.queue = Object.values(ops);
|
5758 |
+
} // Sort queue, so that async calls go last
|
5759 |
|
|
|
|
|
5760 |
|
5761 |
+
this.queue = this.queue.sort(function (a, b) {
|
5762 |
+
return a.delay - b.delay;
|
5763 |
+
}); // Diff the reduced props immediately (they'll contain the from-prop and some config)
|
|
|
|
|
|
|
5764 |
|
5765 |
+
this.diff(props);
|
5766 |
+
return this;
|
5767 |
+
}
|
5768 |
+
/** start(onEnd)
|
5769 |
+
* This function either executes a queue, if present, or starts the frameloop, which animates */
|
5770 |
+
;
|
5771 |
+
|
5772 |
+
_proto.start = function start$$1(onEnd) {
|
5773 |
+
var _this2 = this;
|
5774 |
+
|
5775 |
+
// If a queue is present we must excecute it
|
5776 |
+
if (this.queue.length) {
|
5777 |
+
this.idle = false; // Updates can interrupt trailing queues, in that case we just merge values
|
5778 |
+
|
5779 |
+
if (this.localQueue) {
|
5780 |
+
this.localQueue.forEach(function (_ref3) {
|
5781 |
+
var _ref3$from = _ref3.from,
|
5782 |
+
from = _ref3$from === void 0 ? {} : _ref3$from,
|
5783 |
+
_ref3$to = _ref3.to,
|
5784 |
+
to = _ref3$to === void 0 ? {} : _ref3$to;
|
5785 |
+
if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged);
|
5786 |
+
if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to);
|
5787 |
+
});
|
5788 |
+
} // The guid helps us tracking frames, a new queue over an old one means an override
|
5789 |
+
// We discard async calls in that caseÍ
|
5790 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5791 |
|
5792 |
+
var local = this.local = ++this.guid;
|
5793 |
+
var queue = this.localQueue = this.queue;
|
5794 |
+
this.queue = []; // Go through each entry and execute it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5795 |
|
5796 |
+
queue.forEach(function (_ref4, index) {
|
5797 |
+
var delay = _ref4.delay,
|
5798 |
+
props = _objectWithoutPropertiesLoose(_ref4, ["delay"]);
|
5799 |
+
|
5800 |
+
var cb = function cb(finished) {
|
5801 |
+
if (index === queue.length - 1 && local === _this2.guid && finished) {
|
5802 |
+
_this2.idle = true;
|
5803 |
+
if (_this2.props.onRest) _this2.props.onRest(_this2.merged);
|
5804 |
+
}
|
5805 |
+
|
5806 |
+
if (onEnd) onEnd();
|
5807 |
+
}; // Entries can be delayed, ansyc or immediate
|
5808 |
+
|
5809 |
+
|
5810 |
+
var async = is.arr(props.to) || is.fun(props.to);
|
5811 |
+
|
5812 |
+
if (delay) {
|
5813 |
+
setTimeout(function () {
|
5814 |
+
if (local === _this2.guid) {
|
5815 |
+
if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
|
5816 |
+
}
|
5817 |
+
}, delay);
|
5818 |
+
} else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
|
5819 |
+
});
|
5820 |
+
} // Otherwise we kick of the frameloop
|
5821 |
+
else {
|
5822 |
+
if (is.fun(onEnd)) this.listeners.push(onEnd);
|
5823 |
+
if (this.props.onStart) this.props.onStart();
|
5824 |
+
|
5825 |
+
start(this);
|
5826 |
+
}
|
5827 |
+
|
5828 |
+
return this;
|
5829 |
+
};
|
5830 |
+
|
5831 |
+
_proto.stop = function stop$$1(finished) {
|
5832 |
+
this.listeners.forEach(function (onEnd) {
|
5833 |
+
return onEnd(finished);
|
5834 |
});
|
5835 |
+
this.listeners = [];
|
5836 |
+
return this;
|
5837 |
}
|
5838 |
+
/** Pause sets onEnd listeners free, but also removes the controller from the frameloop */
|
5839 |
+
;
|
5840 |
|
5841 |
+
_proto.pause = function pause(finished) {
|
5842 |
+
this.stop(true);
|
5843 |
+
if (finished) stop(this);
|
5844 |
+
return this;
|
5845 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5846 |
|
5847 |
+
_proto.runAsync = function runAsync(_ref5, onEnd) {
|
5848 |
+
var _this3 = this;
|
5849 |
|
5850 |
+
var delay = _ref5.delay,
|
5851 |
+
props = _objectWithoutPropertiesLoose(_ref5, ["delay"]);
|
5852 |
|
5853 |
+
var local = this.local; // If "to" is either a function or an array it will be processed async, therefor "to" should be empty right now
|
5854 |
+
// If the view relies on certain values "from" has to be present
|
|
|
5855 |
|
5856 |
+
var queue = Promise.resolve(undefined);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5857 |
|
5858 |
+
if (is.arr(props.to)) {
|
5859 |
+
var _loop = function _loop(i) {
|
5860 |
+
var index = i;
|
5861 |
|
5862 |
+
var fresh = _extends({}, props, interpolateTo(props.to[index]));
|
|
|
|
|
5863 |
|
5864 |
+
if (is.arr(fresh.config)) fresh.config = fresh.config[index];
|
5865 |
+
queue = queue.then(function () {
|
5866 |
+
//this.stop()
|
5867 |
+
if (local === _this3.guid) return new Promise(function (r) {
|
5868 |
+
return _this3.diff(fresh).start(r);
|
5869 |
+
});
|
5870 |
+
});
|
5871 |
+
};
|
|
|
|
|
|
|
|
|
5872 |
|
5873 |
+
for (var i = 0; i < props.to.length; i++) {
|
5874 |
+
_loop(i);
|
5875 |
+
}
|
5876 |
+
} else if (is.fun(props.to)) {
|
5877 |
+
var index = 0;
|
5878 |
+
var last;
|
5879 |
+
queue = queue.then(function () {
|
5880 |
+
return props.to( // next(props)
|
5881 |
+
function (p) {
|
5882 |
+
var fresh = _extends({}, props, interpolateTo(p));
|
5883 |
+
|
5884 |
+
if (is.arr(fresh.config)) fresh.config = fresh.config[index];
|
5885 |
+
index++; //this.stop()
|
5886 |
+
|
5887 |
+
if (local === _this3.guid) return last = new Promise(function (r) {
|
5888 |
+
return _this3.diff(fresh).start(r);
|
5889 |
+
});
|
5890 |
+
return;
|
5891 |
+
}, // cancel()
|
5892 |
+
function (finished) {
|
5893 |
+
if (finished === void 0) {
|
5894 |
+
finished = true;
|
5895 |
+
}
|
5896 |
|
5897 |
+
return _this3.stop(finished);
|
5898 |
+
}).then(function () {
|
5899 |
+
return last;
|
5900 |
+
});
|
5901 |
+
});
|
5902 |
+
}
|
5903 |
|
5904 |
+
queue.then(onEnd);
|
5905 |
+
};
|
|
|
5906 |
|
5907 |
+
_proto.diff = function diff(props) {
|
5908 |
+
var _this4 = this;
|
5909 |
|
5910 |
+
this.props = _extends({}, this.props, props);
|
5911 |
+
var _this$props = this.props,
|
5912 |
+
_this$props$from = _this$props.from,
|
5913 |
+
from = _this$props$from === void 0 ? {} : _this$props$from,
|
5914 |
+
_this$props$to = _this$props.to,
|
5915 |
+
to = _this$props$to === void 0 ? {} : _this$props$to,
|
5916 |
+
_this$props$config = _this$props.config,
|
5917 |
+
config = _this$props$config === void 0 ? {} : _this$props$config,
|
5918 |
+
reverse = _this$props.reverse,
|
5919 |
+
attach = _this$props.attach,
|
5920 |
+
reset = _this$props.reset,
|
5921 |
+
immediate = _this$props.immediate; // Reverse values when requested
|
5922 |
+
|
5923 |
+
if (reverse) {
|
5924 |
+
var _ref6 = [to, from];
|
5925 |
+
from = _ref6[0];
|
5926 |
+
to = _ref6[1];
|
5927 |
+
} // This will collect all props that were ever set, reset merged props when necessary
|
5928 |
+
|
5929 |
+
|
5930 |
+
this.merged = _extends({}, from, this.merged, to);
|
5931 |
+
this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring
|
5932 |
+
|
5933 |
+
var target = attach && attach(this); // Reduces input { name: value } pairs into animated values
|
5934 |
+
|
5935 |
+
this.animations = Object.entries(this.merged).reduce(function (acc, _ref7) {
|
5936 |
+
var name = _ref7[0],
|
5937 |
+
value = _ref7[1];
|
5938 |
+
// Issue cached entries, except on reset
|
5939 |
+
var entry = acc[name] || {}; // Figure out what the value is supposed to be
|
5940 |
+
|
5941 |
+
var isNumber = is.num(value);
|
5942 |
+
var isString = is.str(value) && !value.startsWith('#') && !/\d/.test(value) && !colorNames[value];
|
5943 |
+
var isArray = is.arr(value);
|
5944 |
+
var isInterpolation = !isNumber && !isArray && !isString;
|
5945 |
+
var fromValue = !is.und(from[name]) ? from[name] : value;
|
5946 |
+
var toValue = isNumber || isArray ? value : isString ? value : 1;
|
5947 |
+
var toConfig = callProp(config, name);
|
5948 |
+
if (target) toValue = target.animations[name].parent;
|
5949 |
+
var parent = entry.parent,
|
5950 |
+
interpolation$$1 = entry.interpolation,
|
5951 |
+
toValues = toArray(target ? toValue.getPayload() : toValue),
|
5952 |
+
animatedValues;
|
5953 |
+
var newValue = value;
|
5954 |
+
if (isInterpolation) newValue = interpolation({
|
5955 |
+
range: [0, 1],
|
5956 |
+
output: [value, value]
|
5957 |
+
})(1);
|
5958 |
+
var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags
|
5959 |
+
|
5960 |
+
var isFirst = is.und(parent);
|
5961 |
+
var isActive = !isFirst && entry.animatedValues.some(function (v) {
|
5962 |
+
return !v.done;
|
5963 |
+
});
|
5964 |
+
var currentValueDiffersFromGoal = !is.equ(newValue, currentValue);
|
5965 |
+
var hasNewGoal = !is.equ(newValue, entry.previous);
|
5966 |
+
var hasNewConfig = !is.equ(toConfig, entry.config); // Change animation props when props indicate a new goal (new value differs from previous one)
|
5967 |
+
// and current values differ from it. Config changes trigger a new update as well (though probably shouldn't?)
|
5968 |
+
|
5969 |
+
if (reset || hasNewGoal && currentValueDiffersFromGoal || hasNewConfig) {
|
5970 |
+
var _extends2;
|
5971 |
+
|
5972 |
+
// Convert regular values into animated values, ALWAYS re-use if possible
|
5973 |
+
if (isNumber || isString) parent = interpolation$$1 = entry.parent || new AnimatedValue(fromValue);else if (isArray) parent = interpolation$$1 = entry.parent || new AnimatedValueArray(fromValue);else if (isInterpolation) {
|
5974 |
+
var prev = entry.interpolation && entry.interpolation.calc(entry.parent.value);
|
5975 |
+
prev = prev !== void 0 && !reset ? prev : fromValue;
|
5976 |
+
|
5977 |
+
if (entry.parent) {
|
5978 |
+
parent = entry.parent;
|
5979 |
+
parent.setValue(0, false);
|
5980 |
+
} else parent = new AnimatedValue(0);
|
5981 |
+
|
5982 |
+
var range = {
|
5983 |
+
output: [prev, value]
|
5984 |
+
};
|
5985 |
|
5986 |
+
if (entry.interpolation) {
|
5987 |
+
interpolation$$1 = entry.interpolation;
|
5988 |
+
entry.interpolation.updateConfig(range);
|
5989 |
+
} else interpolation$$1 = parent.interpolate(range);
|
5990 |
+
}
|
5991 |
+
toValues = toArray(target ? toValue.getPayload() : toValue);
|
5992 |
+
animatedValues = toArray(parent.getPayload());
|
5993 |
+
if (reset && !isInterpolation) parent.setValue(fromValue, false);
|
5994 |
+
_this4.hasChanged = true; // Reset animated values
|
5995 |
+
|
5996 |
+
animatedValues.forEach(function (value) {
|
5997 |
+
value.startPosition = value.value;
|
5998 |
+
value.lastPosition = value.value;
|
5999 |
+
value.lastVelocity = isActive ? value.lastVelocity : undefined;
|
6000 |
+
value.lastTime = isActive ? value.lastTime : undefined;
|
6001 |
+
value.startTime = now();
|
6002 |
+
value.done = false;
|
6003 |
+
value.animatedStyles.clear();
|
6004 |
+
}); // Set immediate values
|
6005 |
+
|
6006 |
+
if (callProp(immediate, name)) {
|
6007 |
+
parent.setValue(isInterpolation ? toValue : value, false);
|
6008 |
+
}
|
6009 |
|
6010 |
+
return _extends({}, acc, (_extends2 = {}, _extends2[name] = _extends({}, entry, {
|
6011 |
+
name: name,
|
6012 |
+
parent: parent,
|
6013 |
+
interpolation: interpolation$$1,
|
6014 |
+
animatedValues: animatedValues,
|
6015 |
+
toValues: toValues,
|
6016 |
+
previous: newValue,
|
6017 |
+
config: toConfig,
|
6018 |
+
fromValues: toArray(parent.getValue()),
|
6019 |
+
immediate: callProp(immediate, name),
|
6020 |
+
initialVelocity: withDefault(toConfig.velocity, 0),
|
6021 |
+
clamp: withDefault(toConfig.clamp, false),
|
6022 |
+
precision: withDefault(toConfig.precision, 0.01),
|
6023 |
+
tension: withDefault(toConfig.tension, 170),
|
6024 |
+
friction: withDefault(toConfig.friction, 26),
|
6025 |
+
mass: withDefault(toConfig.mass, 1),
|
6026 |
+
duration: toConfig.duration,
|
6027 |
+
easing: withDefault(toConfig.easing, function (t) {
|
6028 |
+
return t;
|
6029 |
+
}),
|
6030 |
+
decay: toConfig.decay
|
6031 |
+
}), _extends2));
|
6032 |
+
} else {
|
6033 |
+
if (!currentValueDiffersFromGoal) {
|
6034 |
+
var _extends3;
|
6035 |
+
|
6036 |
+
// So ... the current target value (newValue) appears to be different from the previous value,
|
6037 |
+
// which normally constitutes an update, but the actual value (currentValue) matches the target!
|
6038 |
+
// In order to resolve this without causing an animation update we silently flag the animation as done,
|
6039 |
+
// which it technically is. Interpolations also needs a config update with their target set to 1.
|
6040 |
+
if (isInterpolation) {
|
6041 |
+
parent.setValue(1, false);
|
6042 |
+
interpolation$$1.updateConfig({
|
6043 |
+
output: [newValue, newValue]
|
6044 |
+
});
|
6045 |
+
}
|
6046 |
|
6047 |
+
parent.done = true;
|
6048 |
+
_this4.hasChanged = true;
|
6049 |
+
return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], {
|
6050 |
+
previous: newValue
|
6051 |
+
}), _extends3));
|
6052 |
+
}
|
6053 |
|
6054 |
+
return acc;
|
6055 |
+
}
|
6056 |
+
}, this.animations);
|
6057 |
|
6058 |
+
if (this.hasChanged) {
|
6059 |
+
// Make animations available to frameloop
|
6060 |
+
this.configs = Object.values(this.animations);
|
6061 |
+
this.values = {};
|
6062 |
+
this.interpolations = {};
|
6063 |
|
6064 |
+
for (var key in this.animations) {
|
6065 |
+
this.interpolations[key] = this.animations[key].interpolation;
|
6066 |
+
this.values[key] = this.animations[key].interpolation.getValue();
|
6067 |
+
}
|
6068 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6069 |
|
6070 |
+
return this;
|
|
|
|
|
|
|
|
|
|
|
|
|
6071 |
};
|
6072 |
|
6073 |
+
_proto.destroy = function destroy() {
|
6074 |
+
this.stop();
|
6075 |
+
this.props = {};
|
6076 |
+
this.merged = {};
|
6077 |
+
this.animations = {};
|
6078 |
+
this.interpolations = {};
|
6079 |
+
this.values = {};
|
6080 |
+
this.configs = [];
|
6081 |
+
this.local = 0;
|
6082 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6083 |
|
6084 |
+
return Controller;
|
6085 |
+
}();
|
6086 |
|
6087 |
+
/** API
|
6088 |
+
* const props = useSprings(number, [{ ... }, { ... }, ...])
|
6089 |
+
* const [props, set] = useSprings(number, (i, controller) => ({ ... }))
|
6090 |
*/
|
6091 |
|
6092 |
+
var useSprings = function useSprings(length, props) {
|
6093 |
+
var mounted = React.useRef(false);
|
6094 |
+
var ctrl = React.useRef();
|
6095 |
+
var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations
|
6096 |
|
6097 |
+
var _useMemo = React.useMemo(function () {
|
6098 |
+
// Remove old controllers
|
6099 |
+
if (ctrl.current) {
|
6100 |
+
ctrl.current.map(function (c) {
|
6101 |
+
return c.destroy();
|
6102 |
+
});
|
6103 |
+
ctrl.current = undefined;
|
6104 |
+
}
|
6105 |
|
6106 |
+
var ref;
|
6107 |
+
return [new Array(length).fill().map(function (_, i) {
|
6108 |
+
var ctrl = new Controller();
|
6109 |
+
var newProps = isFn ? callProp(props, i, ctrl) : props[i];
|
6110 |
+
if (i === 0) ref = newProps.ref;
|
6111 |
+
ctrl.update(newProps);
|
6112 |
+
if (!ref) ctrl.start();
|
6113 |
+
return ctrl;
|
6114 |
+
}), ref];
|
6115 |
+
}, [length]),
|
6116 |
+
controllers = _useMemo[0],
|
6117 |
+
ref = _useMemo[1];
|
6118 |
|
6119 |
+
ctrl.current = controllers; // The hooks reference api gets defined here ...
|
6120 |
|
6121 |
+
var api = React.useImperativeHandle(ref, function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6122 |
return {
|
6123 |
+
start: function start() {
|
6124 |
+
return Promise.all(ctrl.current.map(function (c) {
|
6125 |
+
return new Promise(function (r) {
|
6126 |
+
return c.start(r);
|
6127 |
+
});
|
6128 |
+
}));
|
6129 |
+
},
|
6130 |
+
stop: function stop(finished) {
|
6131 |
+
return ctrl.current.forEach(function (c) {
|
6132 |
+
return c.stop(finished);
|
6133 |
+
});
|
6134 |
+
},
|
6135 |
+
|
6136 |
+
get controllers() {
|
6137 |
+
return ctrl.current;
|
6138 |
+
}
|
6139 |
+
|
6140 |
};
|
6141 |
+
}); // This function updates the controllers
|
|
|
|
|
|
|
6142 |
|
6143 |
+
var updateCtrl = React.useMemo(function () {
|
6144 |
+
return function (updateProps) {
|
6145 |
+
return ctrl.current.map(function (c, i) {
|
6146 |
+
c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]);
|
6147 |
+
if (!ref) c.start();
|
6148 |
+
});
|
6149 |
+
};
|
6150 |
+
}, [length]); // Update controller if props aren't functional
|
6151 |
|
6152 |
+
React.useEffect(function () {
|
6153 |
+
if (mounted.current) {
|
6154 |
+
if (!isFn) updateCtrl(props);
|
6155 |
+
} else if (!ref) ctrl.current.forEach(function (c) {
|
6156 |
+
return c.start();
|
6157 |
+
});
|
6158 |
+
}); // Update mounted flag and destroy controller on unmount
|
6159 |
|
6160 |
+
React.useEffect(function () {
|
6161 |
+
return mounted.current = true, function () {
|
6162 |
+
return ctrl.current.forEach(function (c) {
|
6163 |
+
return c.destroy();
|
6164 |
+
});
|
6165 |
+
};
|
6166 |
+
}, []); // Return animated props, or, anim-props + the update-setter above
|
6167 |
+
|
6168 |
+
var propValues = ctrl.current.map(function (c) {
|
6169 |
+
return c.getValues();
|
6170 |
});
|
6171 |
+
return isFn ? [propValues, updateCtrl, function (finished) {
|
6172 |
+
return ctrl.current.forEach(function (c) {
|
6173 |
+
return c.pause(finished);
|
6174 |
+
});
|
6175 |
+
}] : propValues;
|
6176 |
};
|
|
|
|
|
|
|
6177 |
|
6178 |
+
/** API
|
6179 |
+
* const props = useSpring({ ... })
|
6180 |
+
* const [props, set] = useSpring(() => ({ ... }))
|
6181 |
*/
|
6182 |
|
6183 |
+
var useSpring = function useSpring(props) {
|
6184 |
+
var isFn = is.fun(props);
|
6185 |
|
6186 |
+
var _useSprings = useSprings(1, isFn ? props : [props]),
|
6187 |
+
result = _useSprings[0],
|
6188 |
+
set = _useSprings[1],
|
6189 |
+
pause = _useSprings[2];
|
6190 |
|
6191 |
+
return isFn ? [result[0], set, pause] : result;
|
6192 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6193 |
|
6194 |
+
/** API
|
6195 |
+
* const trails = useTrail(number, { ... })
|
6196 |
+
* const [trails, set] = useTrail(number, () => ({ ... }))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6197 |
*/
|
6198 |
|
6199 |
+
var useTrail = function useTrail(length, props) {
|
6200 |
+
var mounted = React.useRef(false);
|
6201 |
+
var isFn = is.fun(props);
|
6202 |
+
var updateProps = callProp(props);
|
6203 |
+
var instances = React.useRef();
|
6204 |
|
6205 |
+
var _useSprings = useSprings(length, function (i, ctrl) {
|
6206 |
+
if (i === 0) instances.current = [];
|
6207 |
+
instances.current.push(ctrl);
|
6208 |
+
return _extends({}, updateProps, {
|
6209 |
+
config: callProp(updateProps.config, i),
|
6210 |
+
attach: i > 0 && function () {
|
6211 |
+
return instances.current[i - 1];
|
6212 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
6213 |
});
|
6214 |
+
}),
|
6215 |
+
result = _useSprings[0],
|
6216 |
+
set = _useSprings[1],
|
6217 |
+
pause = _useSprings[2]; // Set up function to update controller
|
6218 |
+
|
6219 |
+
|
6220 |
+
var updateCtrl = React.useMemo(function () {
|
6221 |
+
return function (props) {
|
6222 |
+
return set(function (i, ctrl) {
|
6223 |
+
var last = props.reverse ? i === 0 : length - 1 === i;
|
6224 |
+
var attachIdx = props.reverse ? i + 1 : i - 1;
|
6225 |
+
var attachController = instances.current[attachIdx];
|
6226 |
+
return _extends({}, props, {
|
6227 |
+
config: callProp(props.config || updateProps.config, i),
|
6228 |
+
attach: attachController && function () {
|
6229 |
+
return attachController;
|
6230 |
+
}
|
6231 |
+
});
|
6232 |
+
});
|
6233 |
+
};
|
6234 |
+
}, [length, updateProps.reverse]); // Update controller if props aren't functional
|
6235 |
|
6236 |
+
React.useEffect(function () {
|
6237 |
+
return void (mounted.current && !isFn && updateCtrl(props));
|
6238 |
+
}); // Update mounted flag and destroy controller on unmount
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6239 |
|
6240 |
+
React.useEffect(function () {
|
6241 |
+
return void (mounted.current = true);
|
6242 |
+
}, []);
|
6243 |
+
return isFn ? [result, updateCtrl, pause] : result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6244 |
};
|
6245 |
|
6246 |
+
/** API
|
6247 |
+
* const transitions = useTransition(items, itemKeys, { ... })
|
6248 |
+
* const [transitions, update] = useTransition(items, itemKeys, () => ({ ... }))
|
|
|
|
|
|
|
6249 |
*/
|
6250 |
|
6251 |
+
var guid = 0;
|
6252 |
+
var ENTER = 'enter';
|
6253 |
+
var LEAVE = 'leave';
|
6254 |
+
var UPDATE = 'update';
|
6255 |
|
6256 |
+
var mapKeys = function mapKeys(items, keys) {
|
6257 |
+
return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String);
|
6258 |
+
};
|
6259 |
|
6260 |
+
var get = function get(props) {
|
6261 |
+
var items = props.items,
|
6262 |
+
_props$keys = props.keys,
|
6263 |
+
keys = _props$keys === void 0 ? function (item) {
|
6264 |
+
return item;
|
6265 |
+
} : _props$keys,
|
6266 |
+
rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]);
|
6267 |
+
|
6268 |
+
items = toArray(items !== void 0 ? items : null);
|
6269 |
+
return _extends({
|
6270 |
+
items: items,
|
6271 |
+
keys: mapKeys(items, keys)
|
6272 |
+
}, rest);
|
6273 |
+
};
|
6274 |
|
6275 |
+
function useTransition(input, keyTransform, config) {
|
6276 |
+
var props = _extends({
|
6277 |
+
items: input,
|
6278 |
+
keys: keyTransform || function (i) {
|
6279 |
+
return i;
|
6280 |
+
}
|
6281 |
+
}, config);
|
6282 |
+
|
6283 |
+
var _get = get(props),
|
6284 |
+
_get$lazy = _get.lazy,
|
6285 |
+
lazy = _get$lazy === void 0 ? false : _get$lazy,
|
6286 |
+
_get$unique = _get.unique,
|
6287 |
+
_get$reset = _get.reset,
|
6288 |
+
reset = _get$reset === void 0 ? false : _get$reset,
|
6289 |
+
enter = _get.enter,
|
6290 |
+
leave = _get.leave,
|
6291 |
+
update = _get.update,
|
6292 |
+
onDestroyed = _get.onDestroyed,
|
6293 |
+
keys = _get.keys,
|
6294 |
+
items = _get.items,
|
6295 |
+
onFrame = _get.onFrame,
|
6296 |
+
_onRest = _get.onRest,
|
6297 |
+
onStart = _get.onStart,
|
6298 |
+
ref = _get.ref,
|
6299 |
+
extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]);
|
6300 |
+
|
6301 |
+
var forceUpdate = useForceUpdate();
|
6302 |
+
var mounted = React.useRef(false);
|
6303 |
+
var state = React.useRef({
|
6304 |
+
mounted: false,
|
6305 |
+
first: true,
|
6306 |
+
deleted: [],
|
6307 |
+
current: {},
|
6308 |
+
transitions: [],
|
6309 |
+
prevProps: {},
|
6310 |
+
paused: !!props.ref,
|
6311 |
+
instances: !mounted.current && new Map(),
|
6312 |
+
forceUpdate: forceUpdate
|
6313 |
+
});
|
6314 |
+
React.useImperativeHandle(props.ref, function () {
|
6315 |
+
return {
|
6316 |
+
start: function start() {
|
6317 |
+
return Promise.all(Array.from(state.current.instances).map(function (_ref) {
|
6318 |
+
var c = _ref[1];
|
6319 |
+
return new Promise(function (r) {
|
6320 |
+
return c.start(r);
|
6321 |
+
});
|
6322 |
+
}));
|
6323 |
+
},
|
6324 |
+
stop: function stop(finished) {
|
6325 |
+
return Array.from(state.current.instances).forEach(function (_ref2) {
|
6326 |
+
var c = _ref2[1];
|
6327 |
+
return c.stop(finished);
|
6328 |
+
});
|
6329 |
+
},
|
6330 |
+
|
6331 |
+
get controllers() {
|
6332 |
+
return Array.from(state.current.instances).map(function (_ref3) {
|
6333 |
+
var c = _ref3[1];
|
6334 |
+
return c;
|
6335 |
+
});
|
6336 |
+
}
|
6337 |
|
6338 |
+
};
|
6339 |
+
}); // Update state
|
6340 |
+
|
6341 |
+
state.current = diffItems(state.current, props);
|
6342 |
+
|
6343 |
+
if (state.current.changed) {
|
6344 |
+
// Update state
|
6345 |
+
state.current.transitions.forEach(function (transition) {
|
6346 |
+
var slot = transition.slot,
|
6347 |
+
from = transition.from,
|
6348 |
+
to = transition.to,
|
6349 |
+
config = transition.config,
|
6350 |
+
trail = transition.trail,
|
6351 |
+
key = transition.key,
|
6352 |
+
item = transition.item;
|
6353 |
+
if (!state.current.instances.has(key)) state.current.instances.set(key, new Controller()); // update the map object
|
6354 |
+
|
6355 |
+
var ctrl = state.current.instances.get(key);
|
6356 |
+
|
6357 |
+
var newProps = _extends({}, extra, {
|
6358 |
+
to: to,
|
6359 |
+
from: from,
|
6360 |
+
config: config,
|
6361 |
+
ref: ref,
|
6362 |
+
onRest: function onRest(values) {
|
6363 |
+
if (state.current.mounted) {
|
6364 |
+
if (transition.destroyed) {
|
6365 |
+
// If no ref is given delete destroyed items immediately
|
6366 |
+
if (!ref && !lazy) cleanUp(state, key);
|
6367 |
+
if (onDestroyed) onDestroyed(item);
|
6368 |
+
} // A transition comes to rest once all its springs conclude
|
6369 |
+
|
6370 |
+
|
6371 |
+
var curInstances = Array.from(state.current.instances);
|
6372 |
+
var active = curInstances.some(function (_ref4) {
|
6373 |
+
var c = _ref4[1];
|
6374 |
+
return !c.idle;
|
6375 |
+
});
|
6376 |
+
if (!active && (ref || lazy) && state.current.deleted.length > 0) cleanUp(state);
|
6377 |
+
if (_onRest) _onRest(item, slot, values);
|
6378 |
+
}
|
6379 |
+
},
|
6380 |
+
onStart: onStart && function () {
|
6381 |
+
return onStart(item, slot);
|
6382 |
+
},
|
6383 |
+
onFrame: onFrame && function (values) {
|
6384 |
+
return onFrame(item, slot, values);
|
6385 |
+
},
|
6386 |
+
delay: trail,
|
6387 |
+
reset: reset && slot === ENTER // Update controller
|
6388 |
|
6389 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
6390 |
|
6391 |
+
ctrl.update(newProps);
|
6392 |
+
if (!state.current.paused) ctrl.start();
|
6393 |
+
});
|
6394 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
6395 |
|
6396 |
+
React.useEffect(function () {
|
6397 |
+
state.current.mounted = mounted.current = true;
|
6398 |
+
return function () {
|
6399 |
+
state.current.mounted = mounted.current = false;
|
6400 |
+
Array.from(state.current.instances).map(function (_ref5) {
|
6401 |
+
var c = _ref5[1];
|
6402 |
+
return c.destroy();
|
6403 |
+
});
|
6404 |
+
state.current.instances.clear();
|
6405 |
+
};
|
6406 |
+
}, []);
|
6407 |
+
return state.current.transitions.map(function (_ref6) {
|
6408 |
+
var item = _ref6.item,
|
6409 |
+
slot = _ref6.slot,
|
6410 |
+
key = _ref6.key;
|
6411 |
+
return {
|
6412 |
+
item: item,
|
6413 |
+
key: key,
|
6414 |
+
state: slot,
|
6415 |
+
props: state.current.instances.get(key).getValues()
|
6416 |
+
};
|
6417 |
+
});
|
6418 |
+
}
|
6419 |
|
6420 |
+
function cleanUp(state, filterKey) {
|
6421 |
+
var deleted = state.current.deleted;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6422 |
|
6423 |
+
var _loop = function _loop() {
|
6424 |
+
if (_isArray) {
|
6425 |
+
if (_i >= _iterator.length) return "break";
|
6426 |
+
_ref8 = _iterator[_i++];
|
6427 |
+
} else {
|
6428 |
+
_i = _iterator.next();
|
6429 |
+
if (_i.done) return "break";
|
6430 |
+
_ref8 = _i.value;
|
6431 |
+
}
|
6432 |
|
6433 |
+
var _ref7 = _ref8;
|
6434 |
+
var key = _ref7.key;
|
|
|
6435 |
|
6436 |
+
var filter = function filter(t) {
|
6437 |
+
return t.key !== key;
|
6438 |
+
};
|
6439 |
|
6440 |
+
if (is.und(filterKey) || filterKey === key) {
|
6441 |
+
state.current.instances.delete(key);
|
6442 |
+
state.current.transitions = state.current.transitions.filter(filter);
|
6443 |
+
state.current.deleted = state.current.deleted.filter(filter);
|
6444 |
+
}
|
6445 |
+
};
|
6446 |
|
6447 |
+
for (var _iterator = deleted, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
6448 |
+
var _ref8;
|
6449 |
|
6450 |
+
var _ret = _loop();
|
|
|
|
|
|
|
|
|
|
|
6451 |
|
6452 |
+
if (_ret === "break") break;
|
|
|
6453 |
}
|
6454 |
|
6455 |
+
state.current.forceUpdate();
|
6456 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6457 |
|
6458 |
+
function diffItems(_ref9, props) {
|
6459 |
+
var first = _ref9.first,
|
6460 |
+
prevProps = _ref9.prevProps,
|
6461 |
+
state = _objectWithoutPropertiesLoose(_ref9, ["first", "prevProps"]);
|
6462 |
|
6463 |
+
var _get2 = get(props),
|
6464 |
+
items = _get2.items,
|
6465 |
+
keys = _get2.keys,
|
6466 |
+
initial = _get2.initial,
|
6467 |
+
from = _get2.from,
|
6468 |
+
enter = _get2.enter,
|
6469 |
+
leave = _get2.leave,
|
6470 |
+
update = _get2.update,
|
6471 |
+
_get2$trail = _get2.trail,
|
6472 |
+
trail = _get2$trail === void 0 ? 0 : _get2$trail,
|
6473 |
+
unique = _get2.unique,
|
6474 |
+
config = _get2.config,
|
6475 |
+
_get2$order = _get2.order,
|
6476 |
+
order = _get2$order === void 0 ? [ENTER, LEAVE, UPDATE] : _get2$order;
|
6477 |
|
6478 |
+
var _get3 = get(prevProps),
|
6479 |
+
_keys = _get3.keys,
|
6480 |
+
_items = _get3.items;
|
6481 |
|
6482 |
+
var current = _extends({}, state.current);
|
6483 |
|
6484 |
+
var deleted = [].concat(state.deleted); // Compare next keys with current keys
|
6485 |
|
6486 |
+
var currentKeys = Object.keys(current);
|
6487 |
+
var currentSet = new Set(currentKeys);
|
6488 |
+
var nextSet = new Set(keys);
|
6489 |
+
var added = keys.filter(function (item) {
|
6490 |
+
return !currentSet.has(item);
|
6491 |
+
});
|
6492 |
+
var removed = state.transitions.filter(function (item) {
|
6493 |
+
return !item.destroyed && !nextSet.has(item.originalKey);
|
6494 |
+
}).map(function (i) {
|
6495 |
+
return i.originalKey;
|
6496 |
+
});
|
6497 |
+
var updated = keys.filter(function (item) {
|
6498 |
+
return currentSet.has(item);
|
6499 |
+
});
|
6500 |
+
var delay = -trail;
|
6501 |
|
6502 |
+
while (order.length) {
|
6503 |
+
var changeType = order.shift();
|
6504 |
|
6505 |
+
switch (changeType) {
|
6506 |
+
case ENTER:
|
6507 |
+
{
|
6508 |
+
added.forEach(function (key, index) {
|
6509 |
+
// In unique mode, remove fading out transitions if their key comes in again
|
6510 |
+
if (unique && deleted.find(function (d) {
|
6511 |
+
return d.originalKey === key;
|
6512 |
+
})) deleted = deleted.filter(function (t) {
|
6513 |
+
return t.originalKey !== key;
|
6514 |
+
});
|
6515 |
+
var keyIndex = keys.indexOf(key);
|
6516 |
+
var item = items[keyIndex];
|
6517 |
+
var slot = first && initial !== void 0 ? 'initial' : ENTER;
|
6518 |
+
current[key] = {
|
6519 |
+
slot: slot,
|
6520 |
+
originalKey: key,
|
6521 |
+
key: unique ? String(key) : guid++,
|
6522 |
+
item: item,
|
6523 |
+
trail: delay = delay + trail,
|
6524 |
+
config: callProp(config, item, slot),
|
6525 |
+
from: callProp(first ? initial !== void 0 ? initial || {} : from : from, item),
|
6526 |
+
to: callProp(enter, item)
|
6527 |
+
};
|
6528 |
+
});
|
6529 |
+
break;
|
6530 |
+
}
|
6531 |
|
6532 |
+
case LEAVE:
|
6533 |
+
{
|
6534 |
+
removed.forEach(function (key) {
|
6535 |
+
var keyIndex = _keys.indexOf(key);
|
6536 |
+
|
6537 |
+
var item = _items[keyIndex];
|
6538 |
+
var slot = LEAVE;
|
6539 |
+
deleted.unshift(_extends({}, current[key], {
|
6540 |
+
slot: slot,
|
6541 |
+
destroyed: true,
|
6542 |
+
left: _keys[Math.max(0, keyIndex - 1)],
|
6543 |
+
right: _keys[Math.min(_keys.length, keyIndex + 1)],
|
6544 |
+
trail: delay = delay + trail,
|
6545 |
+
config: callProp(config, item, slot),
|
6546 |
+
to: callProp(leave, item)
|
6547 |
+
}));
|
6548 |
+
delete current[key];
|
6549 |
+
});
|
6550 |
+
break;
|
6551 |
+
}
|
6552 |
|
6553 |
+
case UPDATE:
|
6554 |
+
{
|
6555 |
+
updated.forEach(function (key) {
|
6556 |
+
var keyIndex = keys.indexOf(key);
|
6557 |
+
var item = items[keyIndex];
|
6558 |
+
var slot = UPDATE;
|
6559 |
+
current[key] = _extends({}, current[key], {
|
6560 |
+
item: item,
|
6561 |
+
slot: slot,
|
6562 |
+
trail: delay = delay + trail,
|
6563 |
+
config: callProp(config, item, slot),
|
6564 |
+
to: callProp(update, item)
|
6565 |
+
});
|
6566 |
+
});
|
6567 |
+
break;
|
6568 |
+
}
|
6569 |
+
}
|
6570 |
+
}
|
6571 |
|
6572 |
+
var out = keys.map(function (key) {
|
6573 |
+
return current[key];
|
6574 |
+
}); // This tries to restore order for deleted items by finding their last known siblings
|
6575 |
+
// only using the left sibling to keep order placement consistent for all deleted items
|
6576 |
|
6577 |
+
deleted.forEach(function (_ref10) {
|
6578 |
+
var left = _ref10.left,
|
6579 |
+
right = _ref10.right,
|
6580 |
+
item = _objectWithoutPropertiesLoose(_ref10, ["left", "right"]);
|
6581 |
|
6582 |
+
var pos; // Was it the element on the left, if yes, move there ...
|
6583 |
|
6584 |
+
if ((pos = out.findIndex(function (t) {
|
6585 |
+
return t.originalKey === left;
|
6586 |
+
})) !== -1) pos += 1; // And if nothing else helps, move it to the start ¯\_(ツ)_/¯
|
6587 |
|
6588 |
+
pos = Math.max(0, pos);
|
6589 |
+
out = [].concat(out.slice(0, pos), [item], out.slice(pos));
|
|
|
|
|
|
|
|
|
|
|
6590 |
});
|
6591 |
+
return _extends({}, state, {
|
6592 |
+
changed: added.length || removed.length || updated.length,
|
6593 |
+
first: first && added.length === 0,
|
6594 |
+
transitions: out,
|
6595 |
+
current: current,
|
6596 |
+
deleted: deleted,
|
6597 |
+
prevProps: props
|
6598 |
+
});
|
6599 |
+
}
|
6600 |
|
6601 |
+
var AnimatedStyle =
|
6602 |
+
/*#__PURE__*/
|
6603 |
+
function (_AnimatedObject) {
|
6604 |
+
_inheritsLoose(AnimatedStyle, _AnimatedObject);
|
6605 |
|
6606 |
+
function AnimatedStyle(style) {
|
6607 |
+
var _this;
|
|
|
|
|
|
|
|
|
6608 |
|
6609 |
+
if (style === void 0) {
|
6610 |
+
style = {};
|
|
|
6611 |
}
|
6612 |
|
6613 |
+
_this = _AnimatedObject.call(this) || this;
|
|
|
|
|
6614 |
|
6615 |
+
if (style.transform && !(style.transform instanceof Animated)) {
|
6616 |
+
style = applyAnimatedValues.transform(style);
|
6617 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6618 |
|
6619 |
+
_this.payload = style;
|
6620 |
+
return _this;
|
6621 |
+
}
|
|
|
|
|
6622 |
|
6623 |
+
return AnimatedStyle;
|
6624 |
+
}(AnimatedObject);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6625 |
|
6626 |
+
// http://www.w3.org/TR/css3-color/#svg-color
|
6627 |
+
var colors = {
|
6628 |
+
transparent: 0x00000000,
|
6629 |
+
aliceblue: 0xf0f8ffff,
|
6630 |
+
antiquewhite: 0xfaebd7ff,
|
6631 |
+
aqua: 0x00ffffff,
|
6632 |
+
aquamarine: 0x7fffd4ff,
|
6633 |
+
azure: 0xf0ffffff,
|
6634 |
+
beige: 0xf5f5dcff,
|
6635 |
+
bisque: 0xffe4c4ff,
|
6636 |
+
black: 0x000000ff,
|
6637 |
+
blanchedalmond: 0xffebcdff,
|
6638 |
+
blue: 0x0000ffff,
|
6639 |
+
blueviolet: 0x8a2be2ff,
|
6640 |
+
brown: 0xa52a2aff,
|
6641 |
+
burlywood: 0xdeb887ff,
|
6642 |
+
burntsienna: 0xea7e5dff,
|
6643 |
+
cadetblue: 0x5f9ea0ff,
|
6644 |
+
chartreuse: 0x7fff00ff,
|
6645 |
+
chocolate: 0xd2691eff,
|
6646 |
+
coral: 0xff7f50ff,
|
6647 |
+
cornflowerblue: 0x6495edff,
|
6648 |
+
cornsilk: 0xfff8dcff,
|
6649 |
+
crimson: 0xdc143cff,
|
6650 |
+
cyan: 0x00ffffff,
|
6651 |
+
darkblue: 0x00008bff,
|
6652 |
+
darkcyan: 0x008b8bff,
|
6653 |
+
darkgoldenrod: 0xb8860bff,
|
6654 |
+
darkgray: 0xa9a9a9ff,
|
6655 |
+
darkgreen: 0x006400ff,
|
6656 |
+
darkgrey: 0xa9a9a9ff,
|
6657 |
+
darkkhaki: 0xbdb76bff,
|
6658 |
+
darkmagenta: 0x8b008bff,
|
6659 |
+
darkolivegreen: 0x556b2fff,
|
6660 |
+
darkorange: 0xff8c00ff,
|
6661 |
+
darkorchid: 0x9932ccff,
|
6662 |
+
darkred: 0x8b0000ff,
|
6663 |
+
darksalmon: 0xe9967aff,
|
6664 |
+
darkseagreen: 0x8fbc8fff,
|
6665 |
+
darkslateblue: 0x483d8bff,
|
6666 |
+
darkslategray: 0x2f4f4fff,
|
6667 |
+
darkslategrey: 0x2f4f4fff,
|
6668 |
+
darkturquoise: 0x00ced1ff,
|
6669 |
+
darkviolet: 0x9400d3ff,
|
6670 |
+
deeppink: 0xff1493ff,
|
6671 |
+
deepskyblue: 0x00bfffff,
|
6672 |
+
dimgray: 0x696969ff,
|
6673 |
+
dimgrey: 0x696969ff,
|
6674 |
+
dodgerblue: 0x1e90ffff,
|
6675 |
+
firebrick: 0xb22222ff,
|
6676 |
+
floralwhite: 0xfffaf0ff,
|
6677 |
+
forestgreen: 0x228b22ff,
|
6678 |
+
fuchsia: 0xff00ffff,
|
6679 |
+
gainsboro: 0xdcdcdcff,
|
6680 |
+
ghostwhite: 0xf8f8ffff,
|
6681 |
+
gold: 0xffd700ff,
|
6682 |
+
goldenrod: 0xdaa520ff,
|
6683 |
+
gray: 0x808080ff,
|
6684 |
+
green: 0x008000ff,
|
6685 |
+
greenyellow: 0xadff2fff,
|
6686 |
+
grey: 0x808080ff,
|
6687 |
+
honeydew: 0xf0fff0ff,
|
6688 |
+
hotpink: 0xff69b4ff,
|
6689 |
+
indianred: 0xcd5c5cff,
|
6690 |
+
indigo: 0x4b0082ff,
|
6691 |
+
ivory: 0xfffff0ff,
|
6692 |
+
khaki: 0xf0e68cff,
|
6693 |
+
lavender: 0xe6e6faff,
|
6694 |
+
lavenderblush: 0xfff0f5ff,
|
6695 |
+
lawngreen: 0x7cfc00ff,
|
6696 |
+
lemonchiffon: 0xfffacdff,
|
6697 |
+
lightblue: 0xadd8e6ff,
|
6698 |
+
lightcoral: 0xf08080ff,
|
6699 |
+
lightcyan: 0xe0ffffff,
|
6700 |
+
lightgoldenrodyellow: 0xfafad2ff,
|
6701 |
+
lightgray: 0xd3d3d3ff,
|
6702 |
+
lightgreen: 0x90ee90ff,
|
6703 |
+
lightgrey: 0xd3d3d3ff,
|
6704 |
+
lightpink: 0xffb6c1ff,
|
6705 |
+
lightsalmon: 0xffa07aff,
|
6706 |
+
lightseagreen: 0x20b2aaff,
|
6707 |
+
lightskyblue: 0x87cefaff,
|
6708 |
+
lightslategray: 0x778899ff,
|
6709 |
+
lightslategrey: 0x778899ff,
|
6710 |
+
lightsteelblue: 0xb0c4deff,
|
6711 |
+
lightyellow: 0xffffe0ff,
|
6712 |
+
lime: 0x00ff00ff,
|
6713 |
+
limegreen: 0x32cd32ff,
|
6714 |
+
linen: 0xfaf0e6ff,
|
6715 |
+
magenta: 0xff00ffff,
|
6716 |
+
maroon: 0x800000ff,
|
6717 |
+
mediumaquamarine: 0x66cdaaff,
|
6718 |
+
mediumblue: 0x0000cdff,
|
6719 |
+
mediumorchid: 0xba55d3ff,
|
6720 |
+
mediumpurple: 0x9370dbff,
|
6721 |
+
mediumseagreen: 0x3cb371ff,
|
6722 |
+
mediumslateblue: 0x7b68eeff,
|
6723 |
+
mediumspringgreen: 0x00fa9aff,
|
6724 |
+
mediumturquoise: 0x48d1ccff,
|
6725 |
+
mediumvioletred: 0xc71585ff,
|
6726 |
+
midnightblue: 0x191970ff,
|
6727 |
+
mintcream: 0xf5fffaff,
|
6728 |
+
mistyrose: 0xffe4e1ff,
|
6729 |
+
moccasin: 0xffe4b5ff,
|
6730 |
+
navajowhite: 0xffdeadff,
|
6731 |
+
navy: 0x000080ff,
|
6732 |
+
oldlace: 0xfdf5e6ff,
|
6733 |
+
olive: 0x808000ff,
|
6734 |
+
olivedrab: 0x6b8e23ff,
|
6735 |
+
orange: 0xffa500ff,
|
6736 |
+
orangered: 0xff4500ff,
|
6737 |
+
orchid: 0xda70d6ff,
|
6738 |
+
palegoldenrod: 0xeee8aaff,
|
6739 |
+
palegreen: 0x98fb98ff,
|
6740 |
+
paleturquoise: 0xafeeeeff,
|
6741 |
+
palevioletred: 0xdb7093ff,
|
6742 |
+
papayawhip: 0xffefd5ff,
|
6743 |
+
peachpuff: 0xffdab9ff,
|
6744 |
+
peru: 0xcd853fff,
|
6745 |
+
pink: 0xffc0cbff,
|
6746 |
+
plum: 0xdda0ddff,
|
6747 |
+
powderblue: 0xb0e0e6ff,
|
6748 |
+
purple: 0x800080ff,
|
6749 |
+
rebeccapurple: 0x663399ff,
|
6750 |
+
red: 0xff0000ff,
|
6751 |
+
rosybrown: 0xbc8f8fff,
|
6752 |
+
royalblue: 0x4169e1ff,
|
6753 |
+
saddlebrown: 0x8b4513ff,
|
6754 |
+
salmon: 0xfa8072ff,
|
6755 |
+
sandybrown: 0xf4a460ff,
|
6756 |
+
seagreen: 0x2e8b57ff,
|
6757 |
+
seashell: 0xfff5eeff,
|
6758 |
+
sienna: 0xa0522dff,
|
6759 |
+
silver: 0xc0c0c0ff,
|
6760 |
+
skyblue: 0x87ceebff,
|
6761 |
+
slateblue: 0x6a5acdff,
|
6762 |
+
slategray: 0x708090ff,
|
6763 |
+
slategrey: 0x708090ff,
|
6764 |
+
snow: 0xfffafaff,
|
6765 |
+
springgreen: 0x00ff7fff,
|
6766 |
+
steelblue: 0x4682b4ff,
|
6767 |
+
tan: 0xd2b48cff,
|
6768 |
+
teal: 0x008080ff,
|
6769 |
+
thistle: 0xd8bfd8ff,
|
6770 |
+
tomato: 0xff6347ff,
|
6771 |
+
turquoise: 0x40e0d0ff,
|
6772 |
+
violet: 0xee82eeff,
|
6773 |
+
wheat: 0xf5deb3ff,
|
6774 |
+
white: 0xffffffff,
|
6775 |
+
whitesmoke: 0xf5f5f5ff,
|
6776 |
+
yellow: 0xffff00ff,
|
6777 |
+
yellowgreen: 0x9acd32ff
|
6778 |
};
|
6779 |
|
6780 |
+
// const INTEGER = '[-+]?\\d+';
|
6781 |
+
var NUMBER = '[-+]?\\d*\\.?\\d+';
|
6782 |
+
var PERCENTAGE = NUMBER + '%';
|
|
|
|
|
6783 |
|
6784 |
+
function call() {
|
6785 |
+
for (var _len = arguments.length, parts = new Array(_len), _key = 0; _key < _len; _key++) {
|
6786 |
+
parts[_key] = arguments[_key];
|
6787 |
+
}
|
6788 |
|
6789 |
+
return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)';
|
6790 |
+
}
|
6791 |
|
6792 |
+
var rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER));
|
6793 |
+
var rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
6794 |
+
var hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE));
|
6795 |
+
var hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
|
6796 |
+
var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
6797 |
+
var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
6798 |
+
var hex6 = /^#([0-9a-fA-F]{6})$/;
|
6799 |
+
var hex8 = /^#([0-9a-fA-F]{8})$/;
|
6800 |
|
6801 |
+
/*
|
6802 |
+
https://github.com/react-community/normalize-css-color
|
|
|
6803 |
|
6804 |
+
BSD 3-Clause License
|
6805 |
|
6806 |
+
Copyright (c) 2016, React Community
|
6807 |
+
All rights reserved.
|
|
|
6808 |
|
6809 |
+
Redistribution and use in source and binary forms, with or without
|
6810 |
+
modification, are permitted provided that the following conditions are met:
|
6811 |
|
6812 |
+
* Redistributions of source code must retain the above copyright notice, this
|
6813 |
+
list of conditions and the following disclaimer.
|
6814 |
|
6815 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
6816 |
+
this list of conditions and the following disclaimer in the documentation
|
6817 |
+
and/or other materials provided with the distribution.
|
6818 |
|
6819 |
+
* Neither the name of the copyright holder nor the names of its
|
6820 |
+
contributors may be used to endorse or promote products derived from
|
6821 |
+
this software without specific prior written permission.
|
6822 |
|
6823 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
6824 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
6825 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
6826 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
6827 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
6828 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
6829 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
6830 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
6831 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
6832 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
6833 |
+
*/
|
6834 |
+
function normalizeColor(color) {
|
6835 |
+
var match;
|
6836 |
|
6837 |
+
if (typeof color === 'number') {
|
6838 |
+
return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;
|
6839 |
+
} // Ordered based on occurrences on Facebook codebase
|
6840 |
|
6841 |
|
6842 |
+
if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;
|
6843 |
+
if (colors.hasOwnProperty(color)) return colors[color];
|
6844 |
|
6845 |
+
if (match = rgb.exec(color)) {
|
6846 |
+
return (parse255(match[1]) << 24 | // r
|
6847 |
+
parse255(match[2]) << 16 | // g
|
6848 |
+
parse255(match[3]) << 8 | // b
|
6849 |
+
0x000000ff) >>> // a
|
6850 |
+
0;
|
6851 |
+
}
|
6852 |
|
6853 |
+
if (match = rgba.exec(color)) {
|
6854 |
+
return (parse255(match[1]) << 24 | // r
|
6855 |
+
parse255(match[2]) << 16 | // g
|
6856 |
+
parse255(match[3]) << 8 | // b
|
6857 |
+
parse1(match[4])) >>> // a
|
6858 |
+
0;
|
6859 |
+
}
|
6860 |
|
6861 |
+
if (match = hex3.exec(color)) {
|
6862 |
+
return parseInt(match[1] + match[1] + // r
|
6863 |
+
match[2] + match[2] + // g
|
6864 |
+
match[3] + match[3] + // b
|
6865 |
+
'ff', // a
|
6866 |
+
16) >>> 0;
|
6867 |
+
} // https://drafts.csswg.org/css-color-4/#hex-notation
|
6868 |
|
6869 |
|
6870 |
+
if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6871 |
|
6872 |
+
if (match = hex4.exec(color)) {
|
6873 |
+
return parseInt(match[1] + match[1] + // r
|
6874 |
+
match[2] + match[2] + // g
|
6875 |
+
match[3] + match[3] + // b
|
6876 |
+
match[4] + match[4], // a
|
6877 |
+
16) >>> 0;
|
6878 |
}
|
|
|
|
|
|
|
|
|
|
|
6879 |
|
6880 |
+
if (match = hsl.exec(color)) {
|
6881 |
+
return (hslToRgb(parse360(match[1]), // h
|
6882 |
+
parsePercentage(match[2]), // s
|
6883 |
+
parsePercentage(match[3]) // l
|
6884 |
+
) | 0x000000ff) >>> // a
|
6885 |
+
0;
|
6886 |
+
}
|
6887 |
|
6888 |
+
if (match = hsla.exec(color)) {
|
6889 |
+
return (hslToRgb(parse360(match[1]), // h
|
6890 |
+
parsePercentage(match[2]), // s
|
6891 |
+
parsePercentage(match[3]) // l
|
6892 |
+
) | parse1(match[4])) >>> // a
|
6893 |
+
0;
|
6894 |
}
|
6895 |
|
6896 |
+
return null;
|
6897 |
+
}
|
|
|
|
|
|
|
|
|
|
|
6898 |
|
6899 |
+
function hue2rgb(p, q, t) {
|
6900 |
+
if (t < 0) t += 1;
|
6901 |
+
if (t > 1) t -= 1;
|
6902 |
+
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
6903 |
+
if (t < 1 / 2) return q;
|
6904 |
+
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
6905 |
+
return p;
|
6906 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6907 |
|
6908 |
+
function hslToRgb(h, s, l) {
|
6909 |
+
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
6910 |
+
var p = 2 * l - q;
|
6911 |
+
var r = hue2rgb(p, q, h + 1 / 3);
|
6912 |
+
var g = hue2rgb(p, q, h);
|
6913 |
+
var b = hue2rgb(p, q, h - 1 / 3);
|
6914 |
+
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
|
6915 |
+
}
|
6916 |
+
|
6917 |
+
function parse255(str) {
|
6918 |
+
var int = parseInt(str, 10);
|
6919 |
+
if (int < 0) return 0;
|
6920 |
+
if (int > 255) return 255;
|
6921 |
+
return int;
|
6922 |
+
}
|
6923 |
+
|
6924 |
+
function parse360(str) {
|
6925 |
+
var int = parseFloat(str);
|
6926 |
+
return (int % 360 + 360) % 360 / 360;
|
6927 |
+
}
|
6928 |
+
|
6929 |
+
function parse1(str) {
|
6930 |
+
var num = parseFloat(str);
|
6931 |
+
if (num < 0) return 0;
|
6932 |
+
if (num > 1) return 255;
|
6933 |
+
return Math.round(num * 255);
|
6934 |
+
}
|
6935 |
+
|
6936 |
+
function parsePercentage(str) {
|
6937 |
+
// parseFloat conveniently ignores the final %
|
6938 |
+
var int = parseFloat(str);
|
6939 |
+
if (int < 0) return 0;
|
6940 |
+
if (int > 100) return 1;
|
6941 |
+
return int / 100;
|
6942 |
+
}
|
6943 |
+
|
6944 |
+
function colorToRgba(input) {
|
6945 |
+
var int32Color = normalizeColor(input);
|
6946 |
+
if (int32Color === null) return input;
|
6947 |
+
int32Color = int32Color || 0;
|
6948 |
+
var r = (int32Color & 0xff000000) >>> 24;
|
6949 |
+
var g = (int32Color & 0x00ff0000) >>> 16;
|
6950 |
+
var b = (int32Color & 0x0000ff00) >>> 8;
|
6951 |
+
var a = (int32Color & 0x000000ff) / 255;
|
6952 |
+
return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
|
6953 |
+
} // Problem: https://github.com/animatedjs/animated/pull/102
|
6954 |
+
// Solution: https://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly/658662
|
6955 |
|
6956 |
|
6957 |
+
var stringShapeRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; // Covers rgb, rgba, hsl, hsla
|
6958 |
+
// Taken from https://gist.github.com/olmokramer/82ccce673f86db7cda5e
|
6959 |
|
6960 |
+
var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; // Covers color names (transparent, blue, etc.)
|
6961 |
+
|
6962 |
+
var colorNamesRegex = new RegExp("(" + Object.keys(colors).join('|') + ")", 'g');
|
6963 |
/**
|
6964 |
+
* Supports string shapes by extracting numbers so new values can be computed,
|
6965 |
+
* and recombines those values into new strings of the same shape. Supports
|
6966 |
+
* things like:
|
6967 |
+
*
|
6968 |
+
* rgba(123, 42, 99, 0.36) // colors
|
6969 |
+
* -45deg // values with units
|
6970 |
+
* 0 2px 2px 0px rgba(0, 0, 0, 0.12) // box shadows
|
6971 |
*/
|
6972 |
|
6973 |
+
var createStringInterpolator = function createStringInterpolator(config) {
|
6974 |
+
// Replace colors with rgba
|
6975 |
+
var outputRange = config.output.map(function (rangeValue) {
|
6976 |
+
return rangeValue.replace(colorRegex, colorToRgba);
|
6977 |
+
}).map(function (rangeValue) {
|
6978 |
+
return rangeValue.replace(colorNamesRegex, colorToRgba);
|
6979 |
+
});
|
6980 |
+
var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {
|
6981 |
+
return [];
|
6982 |
+
});
|
6983 |
+
outputRange.forEach(function (value) {
|
6984 |
+
value.match(stringShapeRegex).forEach(function (number, i) {
|
6985 |
+
return outputRanges[i].push(+number);
|
6986 |
+
});
|
6987 |
+
});
|
6988 |
+
var interpolations = outputRange[0].match(stringShapeRegex).map(function (_value, i) {
|
6989 |
+
return createInterpolator(_extends({}, config, {
|
6990 |
+
output: outputRanges[i]
|
6991 |
+
}));
|
6992 |
+
});
|
6993 |
+
return function (input) {
|
6994 |
+
var i = 0;
|
6995 |
+
return outputRange[0] // 'rgba(0, 100, 200, 0)'
|
6996 |
+
// ->
|
6997 |
+
// 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'
|
6998 |
+
.replace(stringShapeRegex, function () {
|
6999 |
+
return interpolations[i++](input);
|
7000 |
+
}) // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to
|
7001 |
+
// round the opacity (4th column).
|
7002 |
+
.replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, function (_, p1, p2, p3, p4) {
|
7003 |
+
return "rgba(" + Math.round(p1) + ", " + Math.round(p2) + ", " + Math.round(p3) + ", " + p4 + ")";
|
7004 |
+
});
|
7005 |
+
};
|
7006 |
+
};
|
7007 |
|
7008 |
+
var isUnitlessNumber = {
|
7009 |
+
animationIterationCount: true,
|
7010 |
+
borderImageOutset: true,
|
7011 |
+
borderImageSlice: true,
|
7012 |
+
borderImageWidth: true,
|
7013 |
+
boxFlex: true,
|
7014 |
+
boxFlexGroup: true,
|
7015 |
+
boxOrdinalGroup: true,
|
7016 |
+
columnCount: true,
|
7017 |
+
columns: true,
|
7018 |
+
flex: true,
|
7019 |
+
flexGrow: true,
|
7020 |
+
flexPositive: true,
|
7021 |
+
flexShrink: true,
|
7022 |
+
flexNegative: true,
|
7023 |
+
flexOrder: true,
|
7024 |
+
gridRow: true,
|
7025 |
+
gridRowEnd: true,
|
7026 |
+
gridRowSpan: true,
|
7027 |
+
gridRowStart: true,
|
7028 |
+
gridColumn: true,
|
7029 |
+
gridColumnEnd: true,
|
7030 |
+
gridColumnSpan: true,
|
7031 |
+
gridColumnStart: true,
|
7032 |
+
fontWeight: true,
|
7033 |
+
lineClamp: true,
|
7034 |
+
lineHeight: true,
|
7035 |
+
opacity: true,
|
7036 |
+
order: true,
|
7037 |
+
orphans: true,
|
7038 |
+
tabSize: true,
|
7039 |
+
widows: true,
|
7040 |
+
zIndex: true,
|
7041 |
+
zoom: true,
|
7042 |
+
// SVG-related properties
|
7043 |
+
fillOpacity: true,
|
7044 |
+
floodOpacity: true,
|
7045 |
+
stopOpacity: true,
|
7046 |
+
strokeDasharray: true,
|
7047 |
+
strokeDashoffset: true,
|
7048 |
+
strokeMiterlimit: true,
|
7049 |
+
strokeOpacity: true,
|
7050 |
+
strokeWidth: true
|
7051 |
+
};
|
7052 |
|
7053 |
+
var prefixKey = function prefixKey(prefix, key) {
|
7054 |
+
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
7055 |
+
};
|
7056 |
|
7057 |
+
var prefixes = ['Webkit', 'Ms', 'Moz', 'O'];
|
7058 |
+
isUnitlessNumber = Object.keys(isUnitlessNumber).reduce(function (acc, prop) {
|
7059 |
+
prefixes.forEach(function (prefix) {
|
7060 |
+
return acc[prefixKey(prefix, prop)] = acc[prop];
|
7061 |
+
});
|
7062 |
+
return acc;
|
7063 |
+
}, isUnitlessNumber);
|
7064 |
|
7065 |
+
function dangerousStyleValue(name, value, isCustomProperty) {
|
7066 |
+
if (value == null || typeof value === 'boolean' || value === '') return '';
|
7067 |
+
if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
|
7068 |
|
7069 |
+
return ('' + value).trim();
|
7070 |
+
}
|
7071 |
|
7072 |
+
var attributeCache = {};
|
7073 |
+
injectCreateAnimatedStyle(function (style) {
|
7074 |
+
return new AnimatedStyle(style);
|
7075 |
+
});
|
7076 |
+
injectDefaultElement('div');
|
7077 |
+
injectStringInterpolator(createStringInterpolator);
|
7078 |
+
injectColorNames(colors);
|
7079 |
+
injectApplyAnimatedValues(function (instance, props) {
|
7080 |
+
if (instance.nodeType && instance.setAttribute !== undefined) {
|
7081 |
+
var style = props.style,
|
7082 |
+
children = props.children,
|
7083 |
+
scrollTop = props.scrollTop,
|
7084 |
+
scrollLeft = props.scrollLeft,
|
7085 |
+
attributes = _objectWithoutPropertiesLoose(props, ["style", "children", "scrollTop", "scrollLeft"]);
|
7086 |
+
|
7087 |
+
var filter = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter';
|
7088 |
+
if (scrollTop !== void 0) instance.scrollTop = scrollTop;
|
7089 |
+
if (scrollLeft !== void 0) instance.scrollLeft = scrollLeft; // Set textContent, if children is an animatable value
|
7090 |
+
|
7091 |
+
if (children !== void 0) instance.textContent = children; // Set styles ...
|
7092 |
+
|
7093 |
+
for (var styleName in style) {
|
7094 |
+
if (!style.hasOwnProperty(styleName)) continue;
|
7095 |
+
var isCustomProperty = styleName.indexOf('--') === 0;
|
7096 |
+
var styleValue = dangerousStyleValue(styleName, style[styleName], isCustomProperty);
|
7097 |
+
if (styleName === 'float') styleName = 'cssFloat';
|
7098 |
+
if (isCustomProperty) instance.style.setProperty(styleName, styleValue);else instance.style[styleName] = styleValue;
|
7099 |
+
} // Set attributes ...
|
7100 |
+
|
7101 |
+
|
7102 |
+
for (var name in attributes) {
|
7103 |
+
// Attributes are written in dash case
|
7104 |
+
var dashCase = filter ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, function (n) {
|
7105 |
+
return '-' + n.toLowerCase();
|
7106 |
+
}));
|
7107 |
+
if (typeof instance.getAttribute(dashCase) !== 'undefined') instance.setAttribute(dashCase, attributes[name]);
|
7108 |
+
}
|
7109 |
|
7110 |
+
return;
|
7111 |
+
} else return false;
|
7112 |
+
}, function (style) {
|
7113 |
+
return style;
|
7114 |
+
});
|
7115 |
|
7116 |
+
var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
7117 |
+
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
7118 |
+
// Extend animated with all the available THREE elements
|
7119 |
+
var apply = merge(createAnimatedComponent, false);
|
7120 |
+
var extendedAnimated = apply(domElements);
|
7121 |
+
|
7122 |
+
exports.apply = apply;
|
7123 |
+
exports.config = config;
|
7124 |
+
exports.update = update;
|
7125 |
+
exports.animated = extendedAnimated;
|
7126 |
+
exports.a = extendedAnimated;
|
7127 |
+
exports.interpolate = interpolate$1;
|
7128 |
+
exports.Globals = Globals;
|
7129 |
+
exports.useSpring = useSpring;
|
7130 |
+
exports.useTrail = useTrail;
|
7131 |
+
exports.useTransition = useTransition;
|
7132 |
+
exports.useChain = useChain;
|
7133 |
+
exports.useSprings = useSprings;
|
7134 |
|
7135 |
|
7136 |
+
/***/ }),
|
7137 |
|
7138 |
+
/***/ 16:
|
7139 |
+
/***/ (function(module, exports) {
|
7140 |
|
7141 |
+
(function() { module.exports = window["wc"]["tracks"]; }());
|
|
|
|
|
7142 |
|
7143 |
+
/***/ }),
|
7144 |
|
7145 |
+
/***/ 160:
|
7146 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7147 |
|
7148 |
+
"use strict";
|
7149 |
+
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
7150 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
7151 |
+
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
|
7152 |
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
7153 |
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
|
7154 |
|
7155 |
|
7156 |
|
7157 |
|
7158 |
|
7159 |
+
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
7160 |
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
|
7161 |
|
7162 |
+
function getUniqueId() {
|
7163 |
+
var key = '__global_unique_id__';
|
7164 |
+
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
7165 |
+
}
|
7166 |
|
7167 |
+
function objectIs(x, y) {
|
7168 |
+
if (x === y) {
|
7169 |
+
return x !== 0 || 1 / x === 1 / y;
|
7170 |
+
} else {
|
7171 |
+
return x !== x && y !== y;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7172 |
}
|
7173 |
+
}
|
7174 |
|
7175 |
+
function createEventEmitter(value) {
|
7176 |
+
var handlers = [];
|
7177 |
+
return {
|
7178 |
+
on: function on(handler) {
|
7179 |
+
handlers.push(handler);
|
7180 |
+
},
|
7181 |
+
off: function off(handler) {
|
7182 |
+
handlers = handlers.filter(function (h) {
|
7183 |
+
return h !== handler;
|
7184 |
+
});
|
7185 |
+
},
|
7186 |
+
get: function get() {
|
7187 |
+
return value;
|
7188 |
+
},
|
7189 |
+
set: function set(newValue, changedBits) {
|
7190 |
+
value = newValue;
|
7191 |
+
handlers.forEach(function (handler) {
|
7192 |
+
return handler(value, changedBits);
|
7193 |
+
});
|
7194 |
+
}
|
7195 |
+
};
|
7196 |
}
|
7197 |
|
7198 |
+
function onlyChild(children) {
|
7199 |
+
return Array.isArray(children) ? children[0] : children;
|
7200 |
+
}
|
|
|
7201 |
|
7202 |
+
function createReactContext(defaultValue, calculateChangedBits) {
|
7203 |
+
var _Provider$childContex, _Consumer$contextType;
|
|
|
7204 |
|
7205 |
+
var contextProp = '__create-react-context-' + getUniqueId() + '__';
|
|
|
|
|
7206 |
|
7207 |
+
var Provider = /*#__PURE__*/function (_Component) {
|
7208 |
+
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Provider, _Component);
|
|
|
|
|
7209 |
|
7210 |
+
function Provider() {
|
7211 |
+
var _this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7212 |
|
7213 |
+
_this = _Component.apply(this, arguments) || this;
|
7214 |
+
_this.emitter = createEventEmitter(_this.props.value);
|
7215 |
+
return _this;
|
|
|
|
|
|
|
|
|
7216 |
}
|
7217 |
|
7218 |
+
var _proto = Provider.prototype;
|
7219 |
|
7220 |
+
_proto.getChildContext = function getChildContext() {
|
7221 |
+
var _ref;
|
|
|
7222 |
|
7223 |
+
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
7224 |
+
};
|
7225 |
|
7226 |
+
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
7227 |
+
if (this.props.value !== nextProps.value) {
|
7228 |
+
var oldValue = this.props.value;
|
7229 |
+
var newValue = nextProps.value;
|
7230 |
+
var changedBits;
|
7231 |
|
7232 |
+
if (objectIs(oldValue, newValue)) {
|
7233 |
+
changedBits = 0;
|
7234 |
+
} else {
|
7235 |
+
changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
7236 |
|
7237 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
7238 |
|
7239 |
+
changedBits |= 0;
|
|
|
|
|
|
|
7240 |
|
7241 |
+
if (changedBits !== 0) {
|
7242 |
+
this.emitter.set(nextProps.value, changedBits);
|
7243 |
+
}
|
7244 |
+
}
|
7245 |
+
}
|
7246 |
+
};
|
7247 |
|
7248 |
+
_proto.render = function render() {
|
7249 |
+
return this.props.children;
|
7250 |
+
};
|
|
|
|
|
|
|
|
|
|
|
7251 |
|
7252 |
+
return Provider;
|
7253 |
+
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7254 |
|
7255 |
+
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object.isRequired, _Provider$childContex);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7256 |
|
7257 |
+
var Consumer = /*#__PURE__*/function (_Component2) {
|
7258 |
+
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Consumer, _Component2);
|
|
|
|
|
7259 |
|
7260 |
+
function Consumer() {
|
7261 |
+
var _this2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7262 |
|
7263 |
+
_this2 = _Component2.apply(this, arguments) || this;
|
7264 |
+
_this2.state = {
|
7265 |
+
value: _this2.getValue()
|
7266 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7267 |
|
7268 |
+
_this2.onUpdate = function (newValue, changedBits) {
|
7269 |
+
var observedBits = _this2.observedBits | 0;
|
7270 |
|
7271 |
+
if ((observedBits & changedBits) !== 0) {
|
7272 |
+
_this2.setState({
|
7273 |
+
value: _this2.getValue()
|
7274 |
+
});
|
7275 |
+
}
|
7276 |
+
};
|
7277 |
|
7278 |
+
return _this2;
|
7279 |
+
}
|
7280 |
|
7281 |
+
var _proto2 = Consumer.prototype;
|
7282 |
|
7283 |
+
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
7284 |
+
var observedBits = nextProps.observedBits;
|
7285 |
+
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
7286 |
+
};
|
7287 |
|
7288 |
+
_proto2.componentDidMount = function componentDidMount() {
|
7289 |
+
if (this.context[contextProp]) {
|
7290 |
+
this.context[contextProp].on(this.onUpdate);
|
7291 |
+
}
|
7292 |
|
7293 |
+
var observedBits = this.props.observedBits;
|
7294 |
+
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
7295 |
+
};
|
7296 |
|
7297 |
+
_proto2.componentWillUnmount = function componentWillUnmount() {
|
7298 |
+
if (this.context[contextProp]) {
|
7299 |
+
this.context[contextProp].off(this.onUpdate);
|
7300 |
+
}
|
7301 |
+
};
|
7302 |
|
7303 |
+
_proto2.getValue = function getValue() {
|
7304 |
+
if (this.context[contextProp]) {
|
7305 |
+
return this.context[contextProp].get();
|
7306 |
+
} else {
|
7307 |
+
return defaultValue;
|
7308 |
+
}
|
7309 |
+
};
|
7310 |
|
7311 |
+
_proto2.render = function render() {
|
7312 |
+
return onlyChild(this.props.children)(this.state.value);
|
7313 |
+
};
|
7314 |
|
7315 |
+
return Consumer;
|
7316 |
+
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
|
7317 |
|
7318 |
+
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object, _Consumer$contextType);
|
7319 |
+
return {
|
7320 |
+
Provider: Provider,
|
7321 |
+
Consumer: Consumer
|
7322 |
+
};
|
7323 |
+
}
|
7324 |
|
7325 |
+
var index = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext || createReactContext;
|
7326 |
|
7327 |
+
/* harmony default export */ __webpack_exports__["a"] = (index);
|
|
|
7328 |
|
7329 |
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(78)))
|
7330 |
|
7331 |
/***/ }),
|
7332 |
|
7333 |
+
/***/ 161:
|
7334 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7335 |
|
7336 |
+
var isarray = __webpack_require__(296)
|
|
|
7337 |
|
7338 |
+
/**
|
7339 |
+
* Expose `pathToRegexp`.
|
7340 |
+
*/
|
7341 |
+
module.exports = pathToRegexp
|
7342 |
+
module.exports.parse = parse
|
7343 |
+
module.exports.compile = compile
|
7344 |
+
module.exports.tokensToFunction = tokensToFunction
|
7345 |
+
module.exports.tokensToRegExp = tokensToRegExp
|
7346 |
|
7347 |
+
/**
|
7348 |
+
* The main path matching regexp utility.
|
7349 |
+
*
|
7350 |
+
* @type {RegExp}
|
7351 |
+
*/
|
7352 |
+
var PATH_REGEXP = new RegExp([
|
7353 |
+
// Match escaped characters that would otherwise appear in future matches.
|
7354 |
+
// This allows the user to escape special characters that won't transform.
|
7355 |
+
'(\\\\.)',
|
7356 |
+
// Match Express-style parameters and un-named parameters with a prefix
|
7357 |
+
// and optional suffixes. Matches appear as:
|
7358 |
+
//
|
7359 |
+
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
|
7360 |
+
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
|
7361 |
+
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
|
7362 |
+
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
|
7363 |
+
].join('|'), 'g')
|
7364 |
|
7365 |
+
/**
|
7366 |
+
* Parse a string for the raw tokens.
|
7367 |
+
*
|
7368 |
+
* @param {string} str
|
7369 |
+
* @param {Object=} options
|
7370 |
+
* @return {!Array}
|
7371 |
+
*/
|
7372 |
+
function parse (str, options) {
|
7373 |
+
var tokens = []
|
7374 |
+
var key = 0
|
7375 |
+
var index = 0
|
7376 |
+
var path = ''
|
7377 |
+
var defaultDelimiter = options && options.delimiter || '/'
|
7378 |
+
var res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7379 |
|
7380 |
+
while ((res = PATH_REGEXP.exec(str)) != null) {
|
7381 |
+
var m = res[0]
|
7382 |
+
var escaped = res[1]
|
7383 |
+
var offset = res.index
|
7384 |
+
path += str.slice(index, offset)
|
7385 |
+
index = offset + m.length
|
7386 |
|
7387 |
+
// Ignore already escaped sequences.
|
7388 |
+
if (escaped) {
|
7389 |
+
path += escaped[1]
|
7390 |
+
continue
|
|
|
|
|
|
|
|
|
|
|
|
|
7391 |
}
|
7392 |
+
|
7393 |
+
var next = str[index]
|
7394 |
+
var prefix = res[2]
|
7395 |
+
var name = res[3]
|
7396 |
+
var capture = res[4]
|
7397 |
+
var group = res[5]
|
7398 |
+
var modifier = res[6]
|
7399 |
+
var asterisk = res[7]
|
7400 |
+
|
7401 |
+
// Push the current path onto the tokens.
|
7402 |
+
if (path) {
|
7403 |
+
tokens.push(path)
|
7404 |
+
path = ''
|
7405 |
}
|
7406 |
|
7407 |
+
var partial = prefix != null && next != null && next !== prefix
|
7408 |
+
var repeat = modifier === '+' || modifier === '*'
|
7409 |
+
var optional = modifier === '?' || modifier === '*'
|
7410 |
+
var delimiter = res[2] || defaultDelimiter
|
7411 |
+
var pattern = capture || group
|
7412 |
|
7413 |
+
tokens.push({
|
7414 |
+
name: name || key++,
|
7415 |
+
prefix: prefix || '',
|
7416 |
+
delimiter: delimiter,
|
7417 |
+
optional: optional,
|
7418 |
+
repeat: repeat,
|
7419 |
+
partial: partial,
|
7420 |
+
asterisk: !!asterisk,
|
7421 |
+
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
|
7422 |
+
})
|
7423 |
+
}
|
7424 |
|
7425 |
+
// Match any characters still remaining.
|
7426 |
+
if (index < str.length) {
|
7427 |
+
path += str.substr(index)
|
7428 |
+
}
|
|
|
7429 |
|
7430 |
+
// If the path exists, push it onto the end.
|
7431 |
+
if (path) {
|
7432 |
+
tokens.push(path)
|
7433 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7434 |
|
7435 |
+
return tokens
|
7436 |
+
}
|
|
|
|
|
|
|
|
|
7437 |
|
7438 |
+
/**
|
7439 |
+
* Compile a string to a template function for the path.
|
7440 |
+
*
|
7441 |
+
* @param {string} str
|
7442 |
+
* @param {Object=} options
|
7443 |
+
* @return {!function(Object=, Object=)}
|
7444 |
+
*/
|
7445 |
+
function compile (str, options) {
|
7446 |
+
return tokensToFunction(parse(str, options), options)
|
|
|
|
|
|
|
|
|
|
|
|
|
7447 |
}
|
7448 |
|
7449 |
+
/**
|
7450 |
+
* Prettier encoding of URI path segments.
|
7451 |
+
*
|
7452 |
+
* @param {string}
|
7453 |
+
* @return {string}
|
7454 |
+
*/
|
7455 |
+
function encodeURIComponentPretty (str) {
|
7456 |
+
return encodeURI(str).replace(/[\/?#]/g, function (c) {
|
7457 |
+
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
7458 |
+
})
|
7459 |
+
}
|
|
|
7460 |
|
7461 |
+
/**
|
7462 |
+
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
|
7463 |
+
*
|
7464 |
+
* @param {string}
|
7465 |
+
* @return {string}
|
7466 |
+
*/
|
7467 |
+
function encodeAsterisk (str) {
|
7468 |
+
return encodeURI(str).replace(/[?#]/g, function (c) {
|
7469 |
+
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
7470 |
+
})
|
7471 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7472 |
|
7473 |
+
/**
|
7474 |
+
* Expose a method for transforming tokens into the path function.
|
7475 |
+
*/
|
7476 |
+
function tokensToFunction (tokens, options) {
|
7477 |
+
// Compile all the tokens into regexps.
|
7478 |
+
var matches = new Array(tokens.length)
|
7479 |
|
7480 |
+
// Compile all the patterns before compilation.
|
7481 |
+
for (var i = 0; i < tokens.length; i++) {
|
7482 |
+
if (typeof tokens[i] === 'object') {
|
7483 |
+
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
|
7484 |
+
}
|
7485 |
+
}
|
|
|
|
|
|
|
7486 |
|
7487 |
+
return function (obj, opts) {
|
7488 |
+
var path = ''
|
7489 |
+
var data = obj || {}
|
7490 |
+
var options = opts || {}
|
7491 |
+
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
|
7492 |
|
7493 |
+
for (var i = 0; i < tokens.length; i++) {
|
7494 |
+
var token = tokens[i]
|
|
|
7495 |
|
7496 |
+
if (typeof token === 'string') {
|
7497 |
+
path += token
|
|
|
|
|
|
|
7498 |
|
7499 |
+
continue
|
7500 |
+
}
|
7501 |
|
7502 |
+
var value = data[token.name]
|
7503 |
+
var segment
|
7504 |
|
7505 |
+
if (value == null) {
|
7506 |
+
if (token.optional) {
|
7507 |
+
// Prepend partial segment prefixes.
|
7508 |
+
if (token.partial) {
|
7509 |
+
path += token.prefix
|
7510 |
+
}
|
7511 |
|
7512 |
+
continue
|
7513 |
+
} else {
|
7514 |
+
throw new TypeError('Expected "' + token.name + '" to be defined')
|
7515 |
+
}
|
7516 |
+
}
|
|
|
|
|
|
|
|
|
7517 |
|
7518 |
+
if (isarray(value)) {
|
7519 |
+
if (!token.repeat) {
|
7520 |
+
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
|
7521 |
+
}
|
|
|
|
|
7522 |
|
7523 |
+
if (value.length === 0) {
|
7524 |
+
if (token.optional) {
|
7525 |
+
continue
|
7526 |
+
} else {
|
7527 |
+
throw new TypeError('Expected "' + token.name + '" to not be empty')
|
7528 |
+
}
|
7529 |
+
}
|
7530 |
|
7531 |
+
for (var j = 0; j < value.length; j++) {
|
7532 |
+
segment = encode(value[j])
|
7533 |
|
7534 |
+
if (!matches[i].test(segment)) {
|
7535 |
+
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
|
7536 |
+
}
|
7537 |
|
7538 |
+
path += (j === 0 ? token.prefix : token.delimiter) + segment
|
7539 |
+
}
|
7540 |
|
7541 |
+
continue
|
7542 |
+
}
|
7543 |
|
7544 |
+
segment = token.asterisk ? encodeAsterisk(value) : encode(value)
|
|
|
7545 |
|
7546 |
+
if (!matches[i].test(segment)) {
|
7547 |
+
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
|
7548 |
+
}
|
7549 |
|
7550 |
+
path += token.prefix + segment
|
7551 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
7552 |
|
7553 |
+
return path
|
7554 |
+
}
|
7555 |
+
}
|
7556 |
|
7557 |
+
/**
|
7558 |
+
* Escape a regular expression string.
|
7559 |
+
*
|
7560 |
+
* @param {string} str
|
7561 |
+
* @return {string}
|
7562 |
+
*/
|
7563 |
+
function escapeString (str) {
|
7564 |
+
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
|
7565 |
+
}
|
7566 |
|
7567 |
+
/**
|
7568 |
+
* Escape the capturing group by escaping special characters and meaning.
|
7569 |
+
*
|
7570 |
+
* @param {string} group
|
7571 |
+
* @return {string}
|
7572 |
+
*/
|
7573 |
+
function escapeGroup (group) {
|
7574 |
+
return group.replace(/([=!:$\/()])/g, '\\$1')
|
7575 |
+
}
|
7576 |
|
7577 |
+
/**
|
7578 |
+
* Attach the keys as a property of the regexp.
|
7579 |
+
*
|
7580 |
+
* @param {!RegExp} re
|
7581 |
+
* @param {Array} keys
|
7582 |
+
* @return {!RegExp}
|
7583 |
+
*/
|
7584 |
+
function attachKeys (re, keys) {
|
7585 |
+
re.keys = keys
|
7586 |
+
return re
|
7587 |
+
}
|
7588 |
|
7589 |
+
/**
|
7590 |
+
* Get the flags for a regexp from the options.
|
7591 |
+
*
|
7592 |
+
* @param {Object} options
|
7593 |
+
* @return {string}
|
7594 |
+
*/
|
7595 |
+
function flags (options) {
|
7596 |
+
return options && options.sensitive ? '' : 'i'
|
7597 |
+
}
|
7598 |
|
7599 |
+
/**
|
7600 |
+
* Pull out keys from a regexp.
|
7601 |
+
*
|
7602 |
+
* @param {!RegExp} path
|
7603 |
+
* @param {!Array} keys
|
7604 |
+
* @return {!RegExp}
|
7605 |
+
*/
|
7606 |
+
function regexpToRegexp (path, keys) {
|
7607 |
+
// Use a negative lookahead to match only capturing groups.
|
7608 |
+
var groups = path.source.match(/\((?!\?)/g)
|
7609 |
|
7610 |
+
if (groups) {
|
7611 |
+
for (var i = 0; i < groups.length; i++) {
|
7612 |
+
keys.push({
|
7613 |
+
name: i,
|
7614 |
+
prefix: null,
|
7615 |
+
delimiter: null,
|
7616 |
+
optional: false,
|
7617 |
+
repeat: false,
|
7618 |
+
partial: false,
|
7619 |
+
asterisk: false,
|
7620 |
+
pattern: null
|
7621 |
+
})
|
7622 |
+
}
|
7623 |
+
}
|
7624 |
|
7625 |
+
return attachKeys(path, keys)
|
7626 |
+
}
|
7627 |
|
7628 |
+
/**
|
7629 |
+
* Transform an array into a regexp.
|
7630 |
+
*
|
7631 |
+
* @param {!Array} path
|
7632 |
+
* @param {Array} keys
|
7633 |
+
* @param {!Object} options
|
7634 |
+
* @return {!RegExp}
|
7635 |
+
*/
|
7636 |
+
function arrayToRegexp (path, keys, options) {
|
7637 |
+
var parts = []
|
7638 |
|
7639 |
+
for (var i = 0; i < path.length; i++) {
|
7640 |
+
parts.push(pathToRegexp(path[i], keys, options).source)
|
|
|
|
|
7641 |
}
|
7642 |
|
7643 |
+
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
|
|
|
7644 |
|
7645 |
+
return attachKeys(regexp, keys)
|
7646 |
+
}
|
7647 |
|
7648 |
+
/**
|
7649 |
+
* Create a path regexp from string input.
|
7650 |
+
*
|
7651 |
+
* @param {string} path
|
7652 |
+
* @param {!Array} keys
|
7653 |
+
* @param {!Object} options
|
7654 |
+
* @return {!RegExp}
|
7655 |
+
*/
|
7656 |
+
function stringToRegexp (path, keys, options) {
|
7657 |
+
return tokensToRegExp(parse(path, options), keys, options)
|
7658 |
}
|
7659 |
|
7660 |
+
/**
|
7661 |
+
* Expose a function for taking tokens and returning a RegExp.
|
7662 |
+
*
|
7663 |
+
* @param {!Array} tokens
|
7664 |
+
* @param {(Array|Object)=} keys
|
7665 |
+
* @param {Object=} options
|
7666 |
+
* @return {!RegExp}
|
7667 |
+
*/
|
7668 |
+
function tokensToRegExp (tokens, keys, options) {
|
7669 |
+
if (!isarray(keys)) {
|
7670 |
+
options = /** @type {!Object} */ (keys || options)
|
7671 |
+
keys = []
|
7672 |
}
|
7673 |
|
7674 |
+
options = options || {}
|
7675 |
|
7676 |
+
var strict = options.strict
|
7677 |
+
var end = options.end !== false
|
7678 |
+
var route = ''
|
|
|
|
|
|
|
|
|
|
|
7679 |
|
7680 |
+
// Iterate over the tokens and create our regexp string.
|
7681 |
+
for (var i = 0; i < tokens.length; i++) {
|
7682 |
+
var token = tokens[i]
|
7683 |
|
7684 |
+
if (typeof token === 'string') {
|
7685 |
+
route += escapeString(token)
|
7686 |
+
} else {
|
7687 |
+
var prefix = escapeString(token.prefix)
|
7688 |
+
var capture = '(?:' + token.pattern + ')'
|
7689 |
+
|
7690 |
+
keys.push(token)
|
7691 |
|
7692 |
+
if (token.repeat) {
|
7693 |
+
capture += '(?:' + prefix + capture + ')*'
|
7694 |
+
}
|
7695 |
|
7696 |
+
if (token.optional) {
|
7697 |
+
if (!token.partial) {
|
7698 |
+
capture = '(?:' + prefix + '(' + capture + '))?'
|
7699 |
+
} else {
|
7700 |
+
capture = prefix + '(' + capture + ')?'
|
7701 |
+
}
|
7702 |
} else {
|
7703 |
+
capture = prefix + '(' + capture + ')'
|
7704 |
}
|
7705 |
+
|
7706 |
+
route += capture
|
7707 |
}
|
7708 |
}
|
7709 |
|
7710 |
+
var delimiter = escapeString(options.delimiter || '/')
|
7711 |
+
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
|
|
|
|
|
|
|
|
|
|
|
7712 |
|
7713 |
+
// In non-strict mode we allow a slash at the end of match. If the path to
|
7714 |
+
// match already ends with a slash, we remove it for consistency. The slash
|
7715 |
+
// is valid at the end of a path match, not in the middle. This is important
|
7716 |
+
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
7717 |
+
if (!strict) {
|
7718 |
+
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
|
7719 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7720 |
|
7721 |
+
if (end) {
|
7722 |
+
route += '$'
|
7723 |
+
} else {
|
7724 |
+
// In non-ending mode, we need the capturing groups to match as much as
|
7725 |
+
// possible by using a positive lookahead to the end or next path segment.
|
7726 |
+
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
|
7727 |
}
|
7728 |
|
7729 |
+
return attachKeys(new RegExp('^' + route, flags(options)), keys)
|
7730 |
}
|
7731 |
|
7732 |
+
/**
|
7733 |
+
* Normalize the given path string, returning a regular expression.
|
7734 |
+
*
|
7735 |
+
* An empty array can be passed in for the keys, which will hold the
|
7736 |
+
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
7737 |
+
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
7738 |
+
*
|
7739 |
+
* @param {(string|RegExp|Array)} path
|
7740 |
+
* @param {(Array|Object)=} keys
|
7741 |
+
* @param {Object=} options
|
7742 |
+
* @return {!RegExp}
|
7743 |
+
*/
|
7744 |
+
function pathToRegexp (path, keys, options) {
|
7745 |
+
if (!isarray(keys)) {
|
7746 |
+
options = /** @type {!Object} */ (keys || options)
|
7747 |
+
keys = []
|
7748 |
}
|
7749 |
|
7750 |
+
options = options || {}
|
|
|
|
|
7751 |
|
7752 |
+
if (path instanceof RegExp) {
|
7753 |
+
return regexpToRegexp(path, /** @type {!Array} */ (keys))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7754 |
}
|
7755 |
|
7756 |
+
if (isarray(path)) {
|
7757 |
+
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
|
7758 |
}
|
7759 |
|
7760 |
+
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
|
7761 |
+
}
|
|
|
7762 |
|
|
|
|
|
|
|
|
|
7763 |
|
7764 |
+
/***/ }),
|
|
|
7765 |
|
7766 |
+
/***/ 164:
|
7767 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7768 |
|
7769 |
+
"use strict";
|
7770 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getUnreadNotesCount; });
|
7771 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return hasValidNotes; });
|
7772 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
7773 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
|
7774 |
+
/**
|
7775 |
+
* External dependencies
|
7776 |
+
*/
|
7777 |
|
7778 |
+
/**
|
7779 |
+
* Get the count of the unread notes from the received list.
|
7780 |
+
*
|
7781 |
+
* @param {Array} notes - List of notes, contains read and unread notes.
|
7782 |
+
* @param {number} lastRead - The timestamp that the user read a note.
|
7783 |
+
* @return {number} - Unread notes count.
|
7784 |
+
*/
|
|
|
|
|
|
|
|
|
7785 |
|
7786 |
+
function getUnreadNotesCount(notes, lastRead) {
|
7787 |
+
const unreadNotes = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["filter"])(notes, note => {
|
7788 |
+
const {
|
7789 |
+
is_deleted: isDeleted,
|
7790 |
+
date_created_gmt: dateCreatedGmt,
|
7791 |
+
status
|
7792 |
+
} = note;
|
7793 |
+
|
7794 |
+
if (!isDeleted) {
|
7795 |
+
const unread = !lastRead || !dateCreatedGmt || new Date(dateCreatedGmt + 'Z').getTime() > lastRead;
|
7796 |
+
return unread && status === 'unactioned';
|
7797 |
+
}
|
7798 |
+
});
|
7799 |
+
return unreadNotes.length;
|
7800 |
+
}
|
7801 |
+
/**
|
7802 |
+
* Verifies if there are any valid notes in the list.
|
7803 |
+
*
|
7804 |
+
* @param {Array} notes - List of notes, contains read and unread notes.
|
7805 |
+
* @return {boolean} - Whether there are valid notes or not.
|
7806 |
+
*/
|
7807 |
+
|
7808 |
+
function hasValidNotes(notes) {
|
7809 |
+
const validNotes = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["filter"])(notes, note => {
|
7810 |
+
const {
|
7811 |
+
is_deleted: isDeleted
|
7812 |
+
} = note;
|
7813 |
+
return !isDeleted;
|
7814 |
+
});
|
7815 |
+
return validNotes.length > 0;
|
7816 |
+
}
|
7817 |
|
7818 |
+
/***/ }),
|
7819 |
|
7820 |
+
/***/ 17:
|
7821 |
+
/***/ (function(module, exports) {
|
7822 |
|
7823 |
+
(function() { module.exports = window["wp"]["apiFetch"]; }());
|
7824 |
|
7825 |
/***/ }),
|
7826 |
|
7827 |
+
/***/ 18:
|
7828 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7829 |
|
7830 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
7831 |
|
7832 |
|
7833 |
+
Object.defineProperty(exports, "__esModule", {
|
7834 |
+
value: true
|
7835 |
+
});
|
7836 |
|
7837 |
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
|
7838 |
+
* External Dependencies
|
7839 |
+
*/
|
7840 |
|
|
|
|
|
7841 |
|
7842 |
+
/**
|
7843 |
+
* Internal Dependencies
|
7844 |
+
*/
|
|
|
7845 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7846 |
|
7847 |
+
var _react = __webpack_require__(5);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7848 |
|
7849 |
+
var _react2 = _interopRequireDefault(_react);
|
|
|
|
|
7850 |
|
7851 |
+
var _reactAddonsCreateFragment = __webpack_require__(69);
|
|
|
7852 |
|
7853 |
+
var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment);
|
7854 |
|
7855 |
+
var _tokenize = __webpack_require__(72);
|
|
|
7856 |
|
7857 |
+
var _tokenize2 = _interopRequireDefault(_tokenize);
|
|
|
7858 |
|
7859 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
|
|
|
7860 |
|
7861 |
+
var currentMixedString = void 0;
|
7862 |
|
7863 |
+
function getCloseIndex(openIndex, tokens) {
|
7864 |
+
var openToken = tokens[openIndex],
|
7865 |
+
nestLevel = 0,
|
7866 |
+
token,
|
7867 |
+
i;
|
7868 |
+
for (i = openIndex + 1; i < tokens.length; i++) {
|
7869 |
+
token = tokens[i];
|
7870 |
+
if (token.value === openToken.value) {
|
7871 |
+
if (token.type === 'componentOpen') {
|
7872 |
+
nestLevel++;
|
7873 |
+
continue;
|
7874 |
+
}
|
7875 |
+
if (token.type === 'componentClose') {
|
7876 |
+
if (nestLevel === 0) {
|
7877 |
+
return i;
|
7878 |
+
}
|
7879 |
+
nestLevel--;
|
7880 |
+
}
|
7881 |
+
}
|
7882 |
+
}
|
7883 |
+
// if we get this far, there was no matching close token
|
7884 |
+
throw new Error('Missing closing component token `' + openToken.value + '`');
|
7885 |
+
}
|
7886 |
|
7887 |
+
function buildChildren(tokens, components) {
|
7888 |
+
var children = [],
|
7889 |
+
childrenObject = {},
|
7890 |
+
openComponent,
|
7891 |
+
clonedOpenComponent,
|
7892 |
+
openIndex,
|
7893 |
+
closeIndex,
|
7894 |
+
token,
|
7895 |
+
i,
|
7896 |
+
grandChildTokens,
|
7897 |
+
grandChildren,
|
7898 |
+
siblingTokens,
|
7899 |
+
siblings;
|
7900 |
+
|
7901 |
+
for (i = 0; i < tokens.length; i++) {
|
7902 |
+
token = tokens[i];
|
7903 |
+
if (token.type === 'string') {
|
7904 |
+
children.push(token.value);
|
7905 |
+
continue;
|
7906 |
+
}
|
7907 |
+
// component node should at least be set
|
7908 |
+
if (!components.hasOwnProperty(token.value) || typeof components[token.value] === 'undefined') {
|
7909 |
+
throw new Error('Invalid interpolation, missing component node: `' + token.value + '`');
|
7910 |
+
}
|
7911 |
+
// should be either ReactElement or null (both type "object"), all other types deprecated
|
7912 |
+
if (_typeof(components[token.value]) !== 'object') {
|
7913 |
+
throw new Error('Invalid interpolation, component node must be a ReactElement or null: `' + token.value + '`', '\n> ' + currentMixedString);
|
7914 |
+
}
|
7915 |
+
// we should never see a componentClose token in this loop
|
7916 |
+
if (token.type === 'componentClose') {
|
7917 |
+
throw new Error('Missing opening component token: `' + token.value + '`');
|
7918 |
+
}
|
7919 |
+
if (token.type === 'componentOpen') {
|
7920 |
+
openComponent = components[token.value];
|
7921 |
+
openIndex = i;
|
7922 |
+
break;
|
7923 |
+
}
|
7924 |
+
// componentSelfClosing token
|
7925 |
+
children.push(components[token.value]);
|
7926 |
+
continue;
|
7927 |
+
}
|
7928 |
|
7929 |
+
if (openComponent) {
|
7930 |
+
closeIndex = getCloseIndex(openIndex, tokens);
|
7931 |
+
grandChildTokens = tokens.slice(openIndex + 1, closeIndex);
|
7932 |
+
grandChildren = buildChildren(grandChildTokens, components);
|
7933 |
+
clonedOpenComponent = _react2.default.cloneElement(openComponent, {}, grandChildren);
|
7934 |
+
children.push(clonedOpenComponent);
|
7935 |
+
|
7936 |
+
if (closeIndex < tokens.length - 1) {
|
7937 |
+
siblingTokens = tokens.slice(closeIndex + 1);
|
7938 |
+
siblings = buildChildren(siblingTokens, components);
|
7939 |
+
children = children.concat(siblings);
|
7940 |
+
}
|
7941 |
+
}
|
7942 |
|
7943 |
+
if (children.length === 1) {
|
7944 |
+
return children[0];
|
7945 |
+
}
|
|
|
7946 |
|
7947 |
+
children.forEach(function (child, index) {
|
7948 |
+
if (child) {
|
7949 |
+
childrenObject['interpolation-child-' + index] = child;
|
7950 |
+
}
|
7951 |
+
});
|
7952 |
|
7953 |
+
return (0, _reactAddonsCreateFragment2.default)(childrenObject);
|
7954 |
+
}
|
7955 |
|
7956 |
+
function interpolate(options) {
|
7957 |
+
var mixedString = options.mixedString,
|
7958 |
+
components = options.components,
|
7959 |
+
throwErrors = options.throwErrors;
|
|
|
|
|
7960 |
|
|
|
|
|
|
|
7961 |
|
7962 |
+
currentMixedString = mixedString;
|
|
|
7963 |
|
7964 |
+
if (!components) {
|
7965 |
+
return mixedString;
|
7966 |
+
}
|
7967 |
|
7968 |
+
if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object') {
|
7969 |
+
if (throwErrors) {
|
7970 |
+
throw new Error('Interpolation Error: unable to process `' + mixedString + '` because components is not an object');
|
7971 |
+
}
|
7972 |
|
7973 |
+
return mixedString;
|
7974 |
+
}
|
7975 |
|
7976 |
+
var tokens = (0, _tokenize2.default)(mixedString);
|
|
|
|
|
|
|
7977 |
|
7978 |
+
try {
|
7979 |
+
return buildChildren(tokens, components);
|
7980 |
+
} catch (error) {
|
7981 |
+
if (throwErrors) {
|
7982 |
+
throw new Error('Interpolation Error: unable to process `' + mixedString + '` because of error `' + error.message + '`');
|
7983 |
+
}
|
7984 |
|
7985 |
+
return mixedString;
|
7986 |
+
}
|
7987 |
+
};
|
|
|
|
|
|
|
7988 |
|
7989 |
+
exports.default = interpolate;
|
7990 |
+
//# sourceMappingURL=index.js.map
|
7991 |
|
7992 |
+
/***/ }),
|
7993 |
|
7994 |
+
/***/ 19:
|
7995 |
+
/***/ (function(module, exports) {
|
|
|
|
|
7996 |
|
7997 |
+
(function() { module.exports = window["wc"]["date"]; }());
|
|
|
|
|
|
|
7998 |
|
7999 |
+
/***/ }),
|
|
|
|
|
8000 |
|
8001 |
+
/***/ 2:
|
8002 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
8003 |
|
8004 |
+
(function() { module.exports = window["wp"]["i18n"]; }());
|
|
|
|
|
|
|
|
|
|
|
|
|
8005 |
|
8006 |
+
/***/ }),
|
|
|
|
|
8007 |
|
8008 |
+
/***/ 20:
|
8009 |
+
/***/ (function(module, exports) {
|
8010 |
|
8011 |
+
(function() { module.exports = window["wc"]["experimental"]; }());
|
|
|
|
|
|
|
|
|
|
|
8012 |
|
8013 |
+
/***/ }),
|
8014 |
|
8015 |
+
/***/ 21:
|
8016 |
+
/***/ (function(module, exports) {
|
8017 |
|
8018 |
+
(function() { module.exports = window["wc"]["components"]; }());
|
8019 |
|
8020 |
/***/ }),
|
8021 |
|
8022 |
+
/***/ 22:
|
8023 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8024 |
|
8025 |
+
"use strict";
|
8026 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
|
8027 |
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
8028 |
+
if (source == null) return {};
|
8029 |
+
var target = {};
|
8030 |
+
var sourceKeys = Object.keys(source);
|
8031 |
+
var key, i;
|
8032 |
|
8033 |
+
for (i = 0; i < sourceKeys.length; i++) {
|
8034 |
+
key = sourceKeys[i];
|
8035 |
+
if (excluded.indexOf(key) >= 0) continue;
|
8036 |
+
target[key] = source[key];
|
8037 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8038 |
|
8039 |
+
return target;
|
8040 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8041 |
|
8042 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
8043 |
|
8044 |
+
/***/ 23:
|
8045 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
8046 |
|
8047 |
+
"use strict";
|
8048 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
|
8049 |
+
function _extends() {
|
8050 |
+
_extends = Object.assign || function (target) {
|
8051 |
+
for (var i = 1; i < arguments.length; i++) {
|
8052 |
+
var source = arguments[i];
|
|
|
8053 |
|
8054 |
+
for (var key in source) {
|
8055 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
8056 |
+
target[key] = source[key];
|
8057 |
+
}
|
8058 |
+
}
|
8059 |
}
|
8060 |
|
8061 |
+
return target;
|
8062 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8063 |
|
8064 |
+
return _extends.apply(this, arguments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8065 |
}
|
8066 |
|
8067 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
8068 |
|
8069 |
+
/***/ 25:
|
8070 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
8071 |
|
8072 |
+
"use strict";
|
|
|
|
|
|
|
|
|
8073 |
|
8074 |
+
// EXPORTS
|
8075 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inheritsLoose; });
|
8076 |
|
8077 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
8078 |
+
function _setPrototypeOf(o, p) {
|
8079 |
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
8080 |
+
o.__proto__ = p;
|
8081 |
+
return o;
|
8082 |
+
};
|
8083 |
|
8084 |
+
return _setPrototypeOf(o, p);
|
8085 |
+
}
|
8086 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
8087 |
|
8088 |
+
function _inheritsLoose(subClass, superClass) {
|
8089 |
+
subClass.prototype = Object.create(superClass.prototype);
|
8090 |
+
subClass.prototype.constructor = subClass;
|
8091 |
+
_setPrototypeOf(subClass, superClass);
|
8092 |
+
}
|
8093 |
|
8094 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
8095 |
|
8096 |
+
/***/ 252:
|
8097 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
8098 |
|
8099 |
+
"use strict";
|
|
|
|
|
|
|
8100 |
|
8101 |
+
// EXPORTS
|
8102 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ Fill; });
|
8103 |
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ DisplayOptions; });
|
|
|
|
|
|
|
|
|
8104 |
|
8105 |
+
// EXTERNAL MODULE: external ["wp","element"]
|
8106 |
+
var external_wp_element_ = __webpack_require__(0);
|
8107 |
|
8108 |
+
// EXTERNAL MODULE: external ["wp","components"]
|
8109 |
+
var external_wp_components_ = __webpack_require__(4);
|
|
|
8110 |
|
8111 |
+
// EXTERNAL MODULE: external ["wp","data"]
|
8112 |
+
var external_wp_data_ = __webpack_require__(7);
|
8113 |
|
8114 |
+
// EXTERNAL MODULE: external ["wp","i18n"]
|
8115 |
+
var external_wp_i18n_ = __webpack_require__(2);
|
8116 |
|
8117 |
+
// EXTERNAL MODULE: external ["wc","data"]
|
8118 |
+
var external_wc_data_ = __webpack_require__(11);
|
8119 |
|
8120 |
+
// EXTERNAL MODULE: external ["wc","tracks"]
|
8121 |
+
var external_wc_tracks_ = __webpack_require__(16);
|
|
|
8122 |
|
8123 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/display.js
|
|
|
8124 |
|
|
|
|
|
|
|
8125 |
|
8126 |
/**
|
8127 |
+
* External dependencies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8128 |
*/
|
8129 |
|
8130 |
const DisplayIcon = () => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("svg", {
|
8155 |
strokeLinecap: "round",
|
8156 |
strokeLinejoin: "round"
|
8157 |
})), Object(external_wp_i18n_["__"])('Display', 'woocommerce-admin'));
|
8158 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/single-column.js
|
8159 |
|
8160 |
const SingleColumnIcon = () => Object(external_wp_element_["createElement"])("svg", {
|
8161 |
className: "woocommerce-layout__activity-panel-tab-icon",
|
8171 |
height: "13",
|
8172 |
strokeWidth: "1"
|
8173 |
}));
|
8174 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/two-columns.js
|
8175 |
|
8176 |
const TwoColumnsIcon = () => Object(external_wp_element_["createElement"])("svg", {
|
8177 |
className: "woocommerce-layout__activity-panel-tab-icon",
|
8193 |
height: "13",
|
8194 |
strokeWidth: "1"
|
8195 |
}));
|
8196 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/display-options/index.js
|
8197 |
|
8198 |
|
8199 |
/**
|
8233 |
const {
|
8234 |
getOption
|
8235 |
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
|
|
|
|
|
|
|
|
8236 |
return {
|
8237 |
defaultHomescreenLayout: getOption('woocommerce_default_homepage_layout') || 'single_column',
|
8238 |
+
taskListComplete: getOption('woocommerce_task_list_complete') === 'yes',
|
8239 |
+
isTaskListHidden: getOption('woocommerce_task_list_hidden') === 'yes'
|
8240 |
};
|
8241 |
});
|
8242 |
const {
|
8263 |
popoverProps: {
|
8264 |
className: 'woocommerce-layout__activity-panel-popover'
|
8265 |
}
|
8266 |
+
}, ({
|
8267 |
+
onClose
|
8268 |
+
}) => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, fills, hasTwoColumnContent ? Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
|
8269 |
+
className: "woocommerce-layout__homescreen-display-options",
|
8270 |
+
label: Object(external_wp_i18n_["__"])('Layout', 'woocommerce-admin')
|
8271 |
+
}, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItemsChoice"], {
|
8272 |
+
choices: LAYOUTS,
|
8273 |
+
onSelect: newLayout => {
|
8274 |
+
updateUserPreferences({
|
8275 |
+
homepage_layout: newLayout
|
8276 |
+
});
|
8277 |
+
onClose();
|
8278 |
+
Object(external_wc_tracks_["recordEvent"])('homescreen_display_option', {
|
8279 |
+
display_option: newLayout
|
8280 |
+
});
|
8281 |
+
},
|
8282 |
+
value: layout || defaultHomescreenLayout
|
8283 |
+
})) : null));
|
|
|
|
|
|
|
8284 |
});
|
8285 |
};
|
8286 |
|
8287 |
/***/ }),
|
8288 |
|
8289 |
+
/***/ 253:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8290 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8291 |
|
8292 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8293 |
|
8294 |
+
// EXPORTS
|
8295 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ ABBREVIATED_NOTIFICATION_SLOT_NAME; });
|
8296 |
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ AbbreviatedNotificationsPanel; });
|
8297 |
|
8298 |
+
// EXTERNAL MODULE: external ["wp","element"]
|
8299 |
+
var external_wp_element_ = __webpack_require__(0);
|
|
|
8300 |
|
8301 |
+
// EXTERNAL MODULE: external ["wp","i18n"]
|
8302 |
+
var external_wp_i18n_ = __webpack_require__(2);
|
8303 |
|
8304 |
+
// EXTERNAL MODULE: external ["wc","experimental"]
|
8305 |
+
var external_wc_experimental_ = __webpack_require__(20);
|
8306 |
|
8307 |
+
// EXTERNAL MODULE: external ["wc","tracks"]
|
8308 |
+
var external_wc_tracks_ = __webpack_require__(16);
|
8309 |
|
8310 |
+
// EXTERNAL MODULE: external ["wc","components"]
|
8311 |
+
var external_wc_components_ = __webpack_require__(21);
|
|
|
|
|
|
|
8312 |
|
8313 |
+
// EXTERNAL MODULE: external ["wp","data"]
|
8314 |
+
var external_wp_data_ = __webpack_require__(7);
|
8315 |
|
8316 |
+
// EXTERNAL MODULE: external ["wc","data"]
|
8317 |
+
var external_wc_data_ = __webpack_require__(11);
|
8318 |
|
8319 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/page.js
|
8320 |
+
var page = __webpack_require__(494);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8321 |
|
8322 |
+
// EXTERNAL MODULE: external ["wp","primitives"]
|
8323 |
+
var external_wp_primitives_ = __webpack_require__(8);
|
8324 |
|
8325 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/comment.js
|
|
|
8326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8327 |
|
8328 |
/**
|
8329 |
+
* WordPress dependencies
|
|
|
|
|
|
|
|
|
8330 |
*/
|
8331 |
|
8332 |
+
var comment = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
|
8333 |
+
viewBox: "0 0 24 24",
|
8334 |
+
xmlns: "http://www.w3.org/2000/svg"
|
8335 |
+
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
8336 |
+
d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"
|
8337 |
+
}));
|
8338 |
+
/* harmony default export */ var library_comment = (comment);
|
8339 |
+
//# sourceMappingURL=comment.js.map
|
8340 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/box.js
|
8341 |
+
var box = __webpack_require__(495);
|
8342 |
|
8343 |
+
// EXTERNAL MODULE: external ["wp","components"]
|
8344 |
+
var external_wp_components_ = __webpack_require__(4);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8345 |
|
8346 |
+
// EXTERNAL MODULE: ./client/homescreen/activity-panel/orders/utils.js
|
8347 |
+
var utils = __webpack_require__(65);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8348 |
|
8349 |
+
// EXTERNAL MODULE: ./client/homescreen/activity-panel/reviews/utils.js
|
8350 |
+
var reviews_utils = __webpack_require__(102);
|
|
|
8351 |
|
8352 |
+
// EXTERNAL MODULE: ./client/dashboard/utils.js
|
8353 |
+
var dashboard_utils = __webpack_require__(59);
|
|
|
8354 |
|
8355 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/panels/inbox/icons/bell.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8356 |
|
8357 |
+
const Bell = () => Object(external_wp_element_["createElement"])("svg", {
|
8358 |
+
width: "24",
|
8359 |
+
height: "24",
|
8360 |
+
viewBox: "0 0 24 24",
|
8361 |
+
xmlns: "http://www.w3.org/2000/svg"
|
8362 |
+
}, Object(external_wp_element_["createElement"])("path", {
|
8363 |
+
d: "M0 0h24v24H0z",
|
8364 |
+
fill: "none"
|
8365 |
+
}), Object(external_wp_element_["createElement"])("path", {
|
8366 |
+
d: "M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"
|
8367 |
+
}));
|
8368 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/panels/inbox/abbreviated-notifications-panel.js
|
8369 |
|
|
|
|
|
|
|
8370 |
|
|
|
|
|
8371 |
/**
|
8372 |
+
* External dependencies
|
|
|
|
|
|
|
8373 |
*/
|
8374 |
|
8375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8376 |
|
|
|
8377 |
|
|
|
8378 |
|
|
|
|
|
8379 |
|
|
|
8380 |
|
|
|
|
|
8381 |
|
8382 |
+
/**
|
8383 |
+
* Internal dependencies
|
8384 |
+
*/
|
8385 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8386 |
|
8387 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8388 |
|
8389 |
|
8390 |
+
const EXTENDED_TASK_LIST_ID = 'extended_task_list';
|
8391 |
+
const ORDER_PANEL_ID = 'orders-panel';
|
8392 |
+
const REVIEWS_PANEL_ID = 'reviews-panel';
|
8393 |
+
const STOCK_PANEL_ID = 'stock-panel';
|
8394 |
+
const ABBREVIATED_NOTIFICATION_SLOT_NAME = 'AbbreviatedNotification';
|
8395 |
+
const AbbreviatedNotificationsPanel = ({
|
8396 |
+
thingsToDoNextCount
|
8397 |
+
}) => {
|
8398 |
+
const {
|
8399 |
+
ordersToProcessCount,
|
8400 |
+
reviewsToModerateCount,
|
8401 |
+
stockNoticesCount,
|
8402 |
+
isSetupTaskListHidden,
|
8403 |
+
isExtendedTaskListHidden
|
8404 |
+
} = Object(external_wp_data_["useSelect"])(select => {
|
8405 |
+
const {
|
8406 |
+
getOption
|
8407 |
+
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
8408 |
+
const orderStatuses = Object(utils["c" /* getOrderStatuses */])(select);
|
8409 |
return {
|
8410 |
+
ordersToProcessCount: Object(utils["d" /* getUnreadOrders */])(select, orderStatuses),
|
8411 |
+
reviewsToModerateCount: Object(reviews_utils["b" /* getUnapprovedReviews */])(select),
|
8412 |
+
stockNoticesCount: Object(utils["a" /* getLowStockCount */])(select),
|
8413 |
+
isSetupTaskListHidden: getOption('woocommerce_task_list_hidden') === 'yes',
|
8414 |
+
isExtendedTaskListHidden: getOption('woocommerce_extended_task_list_hidden') === 'yes'
|
8415 |
};
|
8416 |
+
});
|
8417 |
|
8418 |
+
const trackAbbreviatedCardClick = name => {
|
8419 |
+
Object(external_wc_tracks_["recordEvent"])('activity_panel_click', {
|
8420 |
+
task: name
|
8421 |
+
});
|
8422 |
};
|
|
|
8423 |
|
8424 |
+
const {
|
8425 |
+
Slot
|
8426 |
+
} = Object(external_wp_components_["createSlotFill"])(ABBREVIATED_NOTIFICATION_SLOT_NAME);
|
8427 |
+
const isWCAdminPage = Object(dashboard_utils["f" /* isWCAdmin */])(window.location.href);
|
8428 |
+
return Object(external_wp_element_["createElement"])("div", {
|
8429 |
+
className: "woocommerce-abbreviated-notifications"
|
8430 |
+
}, thingsToDoNextCount > 0 && !isExtendedTaskListHidden && Object(external_wp_element_["createElement"])(external_wc_components_["AbbreviatedCard"], {
|
8431 |
+
className: "woocommerce-abbreviated-notification",
|
8432 |
+
icon: Object(external_wp_element_["createElement"])(Bell, null),
|
8433 |
+
href: `admin.php?page=wc-admin#${EXTENDED_TASK_LIST_ID}`,
|
8434 |
+
onClick: () => trackAbbreviatedCardClick('thingsToDoNext'),
|
8435 |
+
type: isWCAdminPage ? 'wc-admin' : 'wp-admin'
|
8436 |
+
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
8437 |
+
as: "h3"
|
8438 |
+
}, Object(external_wp_i18n_["__"])('Things to do next', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
8439 |
+
as: "p"
|
8440 |
+
}, Object(external_wp_i18n_["sprintf"])(
|
8441 |
+
/* translators: Things the user has to do */
|
8442 |
+
Object(external_wp_i18n_["_n"])('You have %d new thing to do', 'You have %d new things to do', thingsToDoNextCount, 'woocommerce-admin'), thingsToDoNextCount))), ordersToProcessCount > 0 && isSetupTaskListHidden && Object(external_wp_element_["createElement"])(external_wc_components_["AbbreviatedCard"], {
|
8443 |
+
className: "woocommerce-abbreviated-notification",
|
8444 |
+
icon: page["a" /* default */],
|
8445 |
+
href: `admin.php?page=wc-admin&opened_panel=${ORDER_PANEL_ID}`,
|
8446 |
+
onClick: () => trackAbbreviatedCardClick('ordersToProcess'),
|
8447 |
+
type: isWCAdminPage ? 'wc-admin' : 'wp-admin'
|
8448 |
+
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
8449 |
+
as: "h3"
|
8450 |
+
}, Object(external_wp_i18n_["__"])('Orders to fulfill', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], null, Object(external_wp_i18n_["sprintf"])(
|
8451 |
+
/* translators: Number of orders the user has to fulfill */
|
8452 |
+
Object(external_wp_i18n_["_n"])('You have %d order to fulfill', 'You have %d orders to fulfill', ordersToProcessCount, 'woocommerce-admin'), ordersToProcessCount))), reviewsToModerateCount > 0 && isSetupTaskListHidden && Object(external_wp_element_["createElement"])(external_wc_components_["AbbreviatedCard"], {
|
8453 |
+
className: "woocommerce-abbreviated-notification",
|
8454 |
+
icon: library_comment,
|
8455 |
+
href: `admin.php?page=wc-admin&opened_panel=${REVIEWS_PANEL_ID}`,
|
8456 |
+
onClick: () => trackAbbreviatedCardClick('reviewsToModerate'),
|
8457 |
+
type: isWCAdminPage ? 'wc-admin' : 'wp-admin'
|
8458 |
+
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
8459 |
+
as: "h3"
|
8460 |
+
}, Object(external_wp_i18n_["__"])('Reviews to moderate', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], null, Object(external_wp_i18n_["sprintf"])(
|
8461 |
+
/* translators: Number of reviews the user has to moderate */
|
8462 |
+
Object(external_wp_i18n_["_n"])('You have %d review to moderate', 'You have %d reviews to moderate', reviewsToModerateCount, 'woocommerce-admin'), reviewsToModerateCount))), stockNoticesCount > 0 && isSetupTaskListHidden && Object(external_wp_element_["createElement"])(external_wc_components_["AbbreviatedCard"], {
|
8463 |
+
className: "woocommerce-abbreviated-notification",
|
8464 |
+
icon: box["a" /* default */],
|
8465 |
+
href: `admin.php?page=wc-admin&opened_panel=${STOCK_PANEL_ID}`,
|
8466 |
+
onClick: () => trackAbbreviatedCardClick('stockNotices'),
|
8467 |
+
type: isWCAdminPage ? 'wc-admin' : 'wp-admin'
|
8468 |
+
}, Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], {
|
8469 |
+
as: "h3"
|
8470 |
+
}, Object(external_wp_i18n_["__"])('Inventory to review', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_experimental_["Text"], null, Object(external_wp_i18n_["__"])('You have inventory to review and update', 'woocommerce-admin'))), !isExtendedTaskListHidden && Object(external_wp_element_["createElement"])(Slot, null));
|
8471 |
+
};
|
8472 |
+
/* harmony default export */ var abbreviated_notifications_panel = (AbbreviatedNotificationsPanel);
|
8473 |
|
8474 |
+
/***/ }),
|
8475 |
|
8476 |
+
/***/ 254:
|
8477 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8478 |
|
8479 |
+
"use strict";
|
|
|
|
|
8480 |
|
8481 |
+
// EXPORTS
|
8482 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ DEFAULT_ACTIONABLE_STATUSES; });
|
8483 |
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ config; });
|
8484 |
|
8485 |
+
// UNUSED EXPORTS: DEFAULT_ORDER_STATUSES, DEFAULT_DATE_RANGE
|
|
|
|
|
|
|
|
|
8486 |
|
8487 |
+
// EXTERNAL MODULE: external ["wp","element"]
|
8488 |
+
var external_wp_element_ = __webpack_require__(0);
|
|
|
|
|
8489 |
|
8490 |
+
// EXTERNAL MODULE: external ["wp","i18n"]
|
8491 |
+
var external_wp_i18n_ = __webpack_require__(2);
|
|
|
|
|
8492 |
|
8493 |
+
// EXTERNAL MODULE: external ["wp","hooks"]
|
8494 |
+
var external_wp_hooks_ = __webpack_require__(30);
|
8495 |
|
8496 |
+
// EXTERNAL MODULE: ./node_modules/interpolate-components/lib/index.js
|
8497 |
+
var lib = __webpack_require__(18);
|
8498 |
+
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
8499 |
|
8500 |
+
// EXTERNAL MODULE: ./packages/wc-admin-settings/build-module/index.js
|
8501 |
+
var build_module = __webpack_require__(15);
|
|
|
|
|
8502 |
|
8503 |
+
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
8504 |
+
var qs_lib = __webpack_require__(32);
|
8505 |
|
8506 |
+
// EXTERNAL MODULE: external ["wc","components"]
|
8507 |
+
var external_wc_components_ = __webpack_require__(21);
|
|
|
|
|
8508 |
|
8509 |
+
// EXTERNAL MODULE: external ["wc","data"]
|
8510 |
+
var external_wc_data_ = __webpack_require__(11);
|
8511 |
|
8512 |
+
// EXTERNAL MODULE: external ["wc","date"]
|
8513 |
+
var external_wc_date_ = __webpack_require__(19);
|
|
|
8514 |
|
8515 |
+
// CONCATENATED MODULE: ./client/analytics/settings/default-date.js
|
8516 |
|
|
|
|
|
|
|
8517 |
|
8518 |
+
/**
|
8519 |
+
* External dependencies
|
8520 |
+
*/
|
8521 |
|
|
|
|
|
|
|
8522 |
|
|
|
|
|
|
|
|
|
|
|
8523 |
|
8524 |
|
|
|
|
|
|
|
8525 |
|
8526 |
+
const DefaultDate = ({
|
8527 |
+
value,
|
8528 |
+
onChange
|
8529 |
+
}) => {
|
8530 |
+
const {
|
8531 |
+
wcAdminSettings
|
8532 |
+
} = Object(external_wc_data_["useSettings"])('wc_admin', ['wcAdminSettings']);
|
8533 |
+
const {
|
8534 |
+
woocommerce_default_date_range: defaultDateRange
|
8535 |
+
} = wcAdminSettings;
|
8536 |
|
8537 |
+
const change = query => {
|
8538 |
+
onChange({
|
8539 |
+
target: {
|
8540 |
+
name: 'woocommerce_default_date_range',
|
8541 |
+
value: Object(qs_lib["stringify"])(query)
|
8542 |
+
}
|
8543 |
+
});
|
8544 |
+
};
|
8545 |
|
8546 |
+
const query = Object(qs_lib["parse"])(value.replace(/&/g, '&'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8547 |
const {
|
8548 |
+
period,
|
8549 |
+
compare,
|
8550 |
+
before,
|
8551 |
+
after
|
8552 |
+
} = Object(external_wc_date_["getDateParamsFromQuery"])(query, defaultDateRange);
|
8553 |
+
const {
|
8554 |
+
primary: primaryDate,
|
8555 |
+
secondary: secondaryDate
|
8556 |
+
} = Object(external_wc_date_["getCurrentDates"])(query, defaultDateRange);
|
8557 |
+
const dateQuery = {
|
8558 |
+
period,
|
8559 |
+
compare,
|
8560 |
+
before,
|
8561 |
+
after,
|
8562 |
+
primaryDate,
|
8563 |
+
secondaryDate
|
8564 |
+
};
|
8565 |
+
return Object(external_wp_element_["createElement"])(external_wc_components_["DateRangeFilterPicker"], {
|
8566 |
+
query: query,
|
8567 |
+
onRangeSelect: change,
|
8568 |
+
dateQuery: dateQuery,
|
8569 |
+
isoDateFormat: external_wc_date_["isoDateFormat"]
|
8570 |
+
});
|
8571 |
+
};
|
8572 |
|
8573 |
+
/* harmony default export */ var default_date = (DefaultDate);
|
8574 |
+
// CONCATENATED MODULE: ./client/analytics/settings/config.js
|
8575 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8576 |
|
8577 |
+
/**
|
8578 |
+
* External dependencies
|
8579 |
+
*/
|
8580 |
|
|
|
8581 |
|
|
|
|
|
8582 |
|
|
|
8583 |
|
8584 |
+
/**
|
8585 |
+
* Internal dependencies
|
8586 |
+
*/
|
8587 |
|
|
|
|
|
8588 |
|
8589 |
+
const SETTINGS_FILTER = 'woocommerce_admin_analytics_settings';
|
8590 |
+
const DEFAULT_ACTIONABLE_STATUSES = ['processing', 'on-hold'];
|
8591 |
+
const DEFAULT_ORDER_STATUSES = ['completed', 'processing', 'refunded', 'cancelled', 'failed', 'pending', 'on-hold'];
|
8592 |
+
const DEFAULT_DATE_RANGE = 'period=month&compare=previous_year';
|
8593 |
+
const filteredOrderStatuses = Object.keys(build_module["c" /* ORDER_STATUSES */]).filter(status => status !== 'refunded').map(key => {
|
8594 |
+
return {
|
8595 |
+
value: key,
|
8596 |
+
label: build_module["c" /* ORDER_STATUSES */][key],
|
8597 |
+
description: Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Exclude the %s status from reports', 'woocommerce-admin'), build_module["c" /* ORDER_STATUSES */][key])
|
8598 |
+
};
|
8599 |
+
});
|
8600 |
+
const unregisteredOrderStatuses = Object(build_module["f" /* getSetting */])('unregisteredOrderStatuses', {});
|
8601 |
+
const orderStatusOptions = [{
|
8602 |
+
key: 'defaultStatuses',
|
8603 |
+
options: filteredOrderStatuses.filter(status => DEFAULT_ORDER_STATUSES.includes(status.value))
|
8604 |
+
}, {
|
8605 |
+
key: 'customStatuses',
|
8606 |
+
label: Object(external_wp_i18n_["__"])('Custom Statuses', 'woocommerce-admin'),
|
8607 |
+
options: filteredOrderStatuses.filter(status => !DEFAULT_ORDER_STATUSES.includes(status.value))
|
8608 |
+
}, {
|
8609 |
+
key: 'unregisteredStatuses',
|
8610 |
+
label: Object(external_wp_i18n_["__"])('Unregistered Statuses', 'woocommerce-admin'),
|
8611 |
+
options: Object.keys(unregisteredOrderStatuses).map(key => {
|
8612 |
+
return {
|
8613 |
+
value: key,
|
8614 |
+
label: key,
|
8615 |
+
description: Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Exclude the %s status from reports', 'woocommerce-admin'), key)
|
8616 |
+
};
|
8617 |
+
})
|
8618 |
+
}];
|
8619 |
+
const config = Object(external_wp_hooks_["applyFilters"])(SETTINGS_FILTER, {
|
8620 |
+
woocommerce_excluded_report_order_statuses: {
|
8621 |
+
label: Object(external_wp_i18n_["__"])('Excluded Statuses:', 'woocommerce-admin'),
|
8622 |
+
inputType: 'checkboxGroup',
|
8623 |
+
options: orderStatusOptions,
|
8624 |
+
helpText: lib_default()({
|
8625 |
+
mixedString: Object(external_wp_i18n_["__"])('Orders with these statuses are excluded from the totals in your reports. ' + 'The {{strong}}Refunded{{/strong}} status can not be excluded.', 'woocommerce-admin'),
|
8626 |
+
components: {
|
8627 |
+
strong: Object(external_wp_element_["createElement"])("strong", null)
|
8628 |
+
}
|
8629 |
+
}),
|
8630 |
+
defaultValue: ['pending', 'cancelled', 'failed']
|
8631 |
+
},
|
8632 |
+
woocommerce_actionable_order_statuses: {
|
8633 |
+
label: Object(external_wp_i18n_["__"])('Actionable Statuses:', 'woocommerce-admin'),
|
8634 |
+
inputType: 'checkboxGroup',
|
8635 |
+
options: orderStatusOptions,
|
8636 |
+
helpText: Object(external_wp_i18n_["__"])('Orders with these statuses require action on behalf of the store admin. ' + 'These orders will show up in the Home Screen - Orders task.', 'woocommerce-admin'),
|
8637 |
+
defaultValue: DEFAULT_ACTIONABLE_STATUSES
|
8638 |
+
},
|
8639 |
+
woocommerce_default_date_range: {
|
8640 |
+
name: 'woocommerce_default_date_range',
|
8641 |
+
label: Object(external_wp_i18n_["__"])('Default Date Range:', 'woocommerce-admin'),
|
8642 |
+
inputType: 'component',
|
8643 |
+
component: default_date,
|
8644 |
+
helpText: Object(external_wp_i18n_["__"])('Select a default date range. When no range is selected, reports will be viewed by ' + 'the default date range.', 'woocommerce-admin'),
|
8645 |
+
defaultValue: DEFAULT_DATE_RANGE
|
8646 |
+
}
|
8647 |
+
});
|
8648 |
|
8649 |
/***/ }),
|
8650 |
|
8651 |
+
/***/ 255:
|
8652 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8653 |
|
8654 |
"use strict";
|
8655 |
+
/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
8656 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
8657 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
8658 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
8659 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
8660 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
|
8661 |
+
/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(256);
|
8662 |
+
/* harmony import */ var _wordpress_a11y__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_a11y__WEBPACK_IMPORTED_MODULE_3__);
|
8663 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
|
8664 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
|
8665 |
+
/* harmony import */ var _wordpress_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(257);
|
8666 |
+
/* harmony import */ var _wordpress_warning__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_warning__WEBPACK_IMPORTED_MODULE_5__);
|
8667 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4);
|
8668 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__);
|
8669 |
+
|
8670 |
+
|
8671 |
/**
|
8672 |
* External dependencies
|
8673 |
*/
|
8674 |
|
|
|
8675 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8676 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8677 |
|
|
|
|
|
|
|
8678 |
|
|
|
|
|
|
|
8679 |
|
8680 |
+
|
8681 |
+
const NOTICE_TIMEOUT = 10000;
|
8682 |
+
/** @typedef {import('@wordpress/element').WPElement} WPElement */
|
8683 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
8684 |
/**
|
8685 |
+
* Custom hook which announces the message with the given politeness, if a
|
8686 |
+
* valid message is provided.
|
|
|
|
|
|
|
|
|
8687 |
*
|
8688 |
+
* @param {string|WPElement} [message] Message to announce.
|
8689 |
+
* @param {'polite'|'assertive'} politeness Politeness to announce.
|
|
|
|
|
|
|
|
|
8690 |
*/
|
8691 |
|
8692 |
+
function useSpokenMessage(message, politeness) {
|
8693 |
+
const spokenMessage = typeof message === 'string' ? message : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["renderToString"])(message);
|
8694 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(() => {
|
8695 |
+
if (spokenMessage) {
|
8696 |
+
Object(_wordpress_a11y__WEBPACK_IMPORTED_MODULE_3__["speak"])(spokenMessage, politeness);
|
8697 |
+
}
|
8698 |
+
}, [spokenMessage, politeness]);
|
|
|
8699 |
}
|
8700 |
|
8701 |
+
function Snackbar({
|
8702 |
+
className,
|
8703 |
+
children,
|
8704 |
+
spokenMessage = children,
|
8705 |
+
politeness = 'polite',
|
8706 |
+
actions = [],
|
8707 |
+
onRemove = lodash__WEBPACK_IMPORTED_MODULE_1__["noop"],
|
8708 |
+
icon = null,
|
8709 |
+
explicitDismiss = false,
|
8710 |
+
// onDismiss is a callback executed when the snackbar is dismissed.
|
8711 |
+
// It is distinct from onRemove, which _looks_ like a callback but is
|
8712 |
+
// actually the function to call to remove the snackbar from the UI.
|
8713 |
+
onDismiss = null
|
8714 |
+
}, ref) {
|
8715 |
+
onDismiss = onDismiss || lodash__WEBPACK_IMPORTED_MODULE_1__["noop"];
|
8716 |
|
8717 |
+
function dismissMe(event) {
|
8718 |
+
if (event && event.preventDefault) {
|
8719 |
+
event.preventDefault();
|
|
|
|
|
8720 |
}
|
8721 |
|
8722 |
+
onDismiss();
|
8723 |
+
onRemove();
|
8724 |
+
}
|
|
|
|
|
|
|
|
|
8725 |
|
8726 |
+
function onActionClick(event, onClick) {
|
8727 |
+
event.stopPropagation();
|
8728 |
+
onRemove();
|
8729 |
|
8730 |
+
if (onClick) {
|
8731 |
+
onClick(event);
|
8732 |
+
}
|
8733 |
+
}
|
8734 |
|
8735 |
+
useSpokenMessage(spokenMessage, politeness); // Only set up the timeout dismiss if we're not explicitly dismissing.
|
|
|
|
|
8736 |
|
8737 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(() => {
|
8738 |
+
const timeoutHandle = setTimeout(() => {
|
8739 |
+
if (!explicitDismiss) {
|
8740 |
+
onDismiss();
|
8741 |
+
onRemove();
|
8742 |
+
}
|
8743 |
+
}, NOTICE_TIMEOUT);
|
8744 |
+
return () => clearTimeout(timeoutHandle);
|
8745 |
+
}, [explicitDismiss, onDismiss, onRemove]);
|
8746 |
+
const classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, 'components-snackbar', {
|
8747 |
+
'components-snackbar-explicit-dismiss': !!explicitDismiss
|
8748 |
+
});
|
8749 |
|
8750 |
+
if (actions && actions.length > 1) {
|
8751 |
+
// we need to inform developers that snackbar only accepts 1 action
|
8752 |
+
typeof process !== "undefined" && process.env && "production" !== "production" ? _wordpress_warning__WEBPACK_IMPORTED_MODULE_5___default()('Snackbar can only have 1 action, use Notice if your message require many messages') : void 0; // return first element only while keeping it inside an array
|
8753 |
|
8754 |
+
actions = [actions[0]];
|
8755 |
+
}
|
8756 |
|
8757 |
+
const snackbarContentClassnames = classnames__WEBPACK_IMPORTED_MODULE_2___default()('components-snackbar__content', {
|
8758 |
+
'components-snackbar__content-with-icon': !!icon
|
8759 |
+
});
|
8760 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
8761 |
+
ref: ref,
|
8762 |
+
className: classes,
|
8763 |
+
onClick: !explicitDismiss ? dismissMe : lodash__WEBPACK_IMPORTED_MODULE_1__["noop"],
|
8764 |
+
tabIndex: "0",
|
8765 |
+
role: !explicitDismiss ? 'button' : '',
|
8766 |
+
onKeyPress: !explicitDismiss ? dismissMe : lodash__WEBPACK_IMPORTED_MODULE_1__["noop"],
|
8767 |
+
"aria-label": !explicitDismiss ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Dismiss this notice') : ''
|
8768 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
8769 |
+
className: snackbarContentClassnames
|
8770 |
+
}, icon && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
8771 |
+
className: "components-snackbar__icon"
|
8772 |
+
}, icon), children, actions.map(({
|
8773 |
+
label,
|
8774 |
+
onClick,
|
8775 |
+
url
|
8776 |
+
}, index) => {
|
8777 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__["Button"], {
|
8778 |
+
key: index,
|
8779 |
+
href: url,
|
8780 |
+
isTertiary: true,
|
8781 |
+
onClick: event => onActionClick(event, onClick),
|
8782 |
+
className: "components-snackbar__action"
|
8783 |
+
}, label);
|
8784 |
+
}), explicitDismiss && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", {
|
8785 |
+
role: "button",
|
8786 |
+
"aria-label": "Dismiss this notice",
|
8787 |
+
tabIndex: "0",
|
8788 |
+
className: "components-snackbar__dismiss-button",
|
8789 |
+
onClick: dismissMe,
|
8790 |
+
onKeyPress: dismissMe
|
8791 |
+
}, "\u2715")));
|
8792 |
+
}
|
8793 |
|
8794 |
+
/* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(Snackbar));
|
8795 |
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(128)))
|
8796 |
|
8797 |
+
/***/ }),
|
|
|
8798 |
|
8799 |
+
/***/ 256:
|
8800 |
+
/***/ (function(module, exports) {
|
8801 |
|
8802 |
+
(function() { module.exports = window["wp"]["a11y"]; }());
|
|
|
8803 |
|
8804 |
+
/***/ }),
|
|
|
8805 |
|
8806 |
+
/***/ 257:
|
8807 |
+
/***/ (function(module, exports) {
|
8808 |
|
8809 |
+
(function() { module.exports = window["wp"]["warning"]; }());
|
8810 |
|
8811 |
+
/***/ }),
|
|
|
|
|
8812 |
|
8813 |
+
/***/ 258:
|
8814 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8815 |
|
8816 |
+
(function() { module.exports = window["wc"]["customerEffortScore"]; }());
|
|
|
8817 |
|
8818 |
+
/***/ }),
|
|
|
8819 |
|
8820 |
+
/***/ 268:
|
8821 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8822 |
|
8823 |
+
"use strict";
|
|
|
8824 |
|
8825 |
+
// EXPORTS
|
8826 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ customer_effort_score_tracks_container; });
|
8827 |
|
8828 |
+
// UNUSED EXPORTS: CustomerEffortScoreTracks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8829 |
|
8830 |
+
// NAMESPACE OBJECT: ./client/customer-effort-score-tracks/data/actions.js
|
8831 |
+
var actions_namespaceObject = {};
|
8832 |
+
__webpack_require__.r(actions_namespaceObject);
|
8833 |
+
__webpack_require__.d(actions_namespaceObject, "setCesSurveyQueue", function() { return setCesSurveyQueue; });
|
8834 |
+
__webpack_require__.d(actions_namespaceObject, "addCesSurvey", function() { return addCesSurvey; });
|
8835 |
+
__webpack_require__.d(actions_namespaceObject, "addCesSurveyForAnalytics", function() { return addCesSurveyForAnalytics; });
|
8836 |
+
__webpack_require__.d(actions_namespaceObject, "addCesSurveyForCustomerSearch", function() { return addCesSurveyForCustomerSearch; });
|
8837 |
|
8838 |
+
// NAMESPACE OBJECT: ./client/customer-effort-score-tracks/data/resolvers.js
|
8839 |
+
var resolvers_namespaceObject = {};
|
8840 |
+
__webpack_require__.r(resolvers_namespaceObject);
|
8841 |
+
__webpack_require__.d(resolvers_namespaceObject, "getCesSurveyQueue", function() { return resolvers_getCesSurveyQueue; });
|
8842 |
|
8843 |
+
// NAMESPACE OBJECT: ./client/customer-effort-score-tracks/data/selectors.js
|
8844 |
+
var selectors_namespaceObject = {};
|
8845 |
+
__webpack_require__.r(selectors_namespaceObject);
|
8846 |
+
__webpack_require__.d(selectors_namespaceObject, "getCesSurveyQueue", function() { return selectors_getCesSurveyQueue; });
|
8847 |
|
8848 |
+
// EXTERNAL MODULE: external ["wp","element"]
|
8849 |
+
var external_wp_element_ = __webpack_require__(0);
|
8850 |
|
8851 |
+
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
8852 |
+
var prop_types = __webpack_require__(1);
|
8853 |
+
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
8854 |
|
8855 |
+
// EXTERNAL MODULE: external ["wc","tracks"]
|
8856 |
+
var external_wc_tracks_ = __webpack_require__(16);
|
8857 |
|
8858 |
+
// EXTERNAL MODULE: external ["wc","customerEffortScore"]
|
8859 |
+
var external_wc_customerEffortScore_ = __webpack_require__(258);
|
8860 |
+
var external_wc_customerEffortScore_default = /*#__PURE__*/__webpack_require__.n(external_wc_customerEffortScore_);
|
8861 |
|
8862 |
+
// EXTERNAL MODULE: external ["wp","compose"]
|
8863 |
+
var external_wp_compose_ = __webpack_require__(13);
|
8864 |
|
8865 |
+
// EXTERNAL MODULE: external ["wp","data"]
|
8866 |
+
var external_wp_data_ = __webpack_require__(7);
|
8867 |
|
8868 |
+
// EXTERNAL MODULE: external ["wc","data"]
|
8869 |
+
var external_wc_data_ = __webpack_require__(11);
|
|
|
8870 |
|
8871 |
+
// EXTERNAL MODULE: external ["wp","i18n"]
|
8872 |
+
var external_wp_i18n_ = __webpack_require__(2);
|
8873 |
|
8874 |
+
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/customer-effort-score-tracks.js
|
8875 |
|
8876 |
|
8877 |
+
/**
|
8878 |
+
* External dependencies
|
8879 |
+
*/
|
8880 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8881 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8882 |
|
|
|
|
|
|
|
|
|
|
|
8883 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8884 |
|
|
|
8885 |
|
|
|
|
|
8886 |
|
|
|
8887 |
|
8888 |
+
const SHOWN_FOR_ACTIONS_OPTION_NAME = 'woocommerce_ces_shown_for_actions';
|
8889 |
+
const ADMIN_INSTALL_TIMESTAMP_OPTION_NAME = 'woocommerce_admin_install_timestamp';
|
8890 |
+
const ALLOW_TRACKING_OPTION_NAME = 'woocommerce_allow_tracking';
|
8891 |
+
/**
|
8892 |
+
* A CustomerEffortScore wrapper that uses tracks to track the selected
|
8893 |
+
* customer effort score.
|
8894 |
+
*
|
8895 |
+
* @param {Object} props Component props.
|
8896 |
+
* @param {string} props.action The action name sent to Tracks.
|
8897 |
+
* @param {Object} props.trackProps Additional props sent to Tracks.
|
8898 |
+
* @param {string} props.label The label displayed in the modal.
|
8899 |
+
* @param {string} props.onSubmitLabel The label displayed upon survey submission.
|
8900 |
+
* @param {Array} props.cesShownForActions The array of actions that the CES modal has been shown for.
|
8901 |
+
* @param {boolean} props.allowTracking Whether tracking is allowed or not.
|
8902 |
+
* @param {boolean} props.resolving Are values still being resolved.
|
8903 |
+
* @param {number} props.storeAgeInWeeks The age of the store in weeks.
|
8904 |
+
* @param {Function} props.updateOptions Function to update options.
|
8905 |
+
* @param {Function} props.createNotice Function to create a snackbar.
|
8906 |
+
*/
|
8907 |
|
8908 |
+
function CustomerEffortScoreTracks({
|
8909 |
+
action,
|
8910 |
+
trackProps,
|
8911 |
+
label,
|
8912 |
+
onSubmitLabel = Object(external_wp_i18n_["__"])('Thank you for your feedback!', 'woocommerce-admin'),
|
8913 |
+
cesShownForActions,
|
8914 |
+
allowTracking,
|
8915 |
+
resolving,
|
8916 |
+
storeAgeInWeeks,
|
8917 |
+
updateOptions,
|
8918 |
+
createNotice
|
8919 |
+
}) {
|
8920 |
+
const [modalShown, setModalShown] = Object(external_wp_element_["useState"])(false);
|
8921 |
|
8922 |
+
if (resolving) {
|
8923 |
+
return null;
|
8924 |
+
} // Don't show if tracking is disallowed.
|
8925 |
|
|
|
|
|
8926 |
|
8927 |
+
if (!allowTracking) {
|
8928 |
+
return null;
|
8929 |
+
} // We only want to return null early if the modal was already shown
|
8930 |
+
// for this action *before* this component was initially instantiated.
|
8931 |
+
//
|
8932 |
+
// We want to make sure we still render CustomerEffortScore below
|
8933 |
+
// (we don't want to return null early), if the modal was shown for this
|
8934 |
+
// instantiation, so that the component doesn't go away while we are
|
8935 |
+
// still showing it.
|
8936 |
|
|
|
|
|
8937 |
|
8938 |
+
if (cesShownForActions.indexOf(action) !== -1 && !modalShown) {
|
8939 |
+
return null;
|
8940 |
+
}
|
8941 |
|
8942 |
+
const onNoticeShown = () => {
|
8943 |
+
Object(external_wc_tracks_["recordEvent"])('ces_snackbar_view', {
|
8944 |
+
action,
|
8945 |
+
store_age: storeAgeInWeeks,
|
8946 |
+
...trackProps
|
8947 |
+
});
|
8948 |
+
};
|
8949 |
|
8950 |
+
const addActionToShownOption = () => {
|
8951 |
+
updateOptions({
|
8952 |
+
[SHOWN_FOR_ACTIONS_OPTION_NAME]: [action, ...cesShownForActions]
|
8953 |
+
});
|
8954 |
+
};
|
8955 |
|
8956 |
+
const onNoticeDismissed = () => {
|
8957 |
+
Object(external_wc_tracks_["recordEvent"])('ces_snackbar_dismiss', {
|
8958 |
+
action,
|
8959 |
+
store_age: storeAgeInWeeks,
|
8960 |
+
...trackProps
|
8961 |
+
});
|
8962 |
+
addActionToShownOption();
|
8963 |
+
};
|
8964 |
|
8965 |
+
const onModalShown = () => {
|
8966 |
+
setModalShown(true);
|
8967 |
+
Object(external_wc_tracks_["recordEvent"])('ces_view', {
|
8968 |
+
action,
|
8969 |
+
store_age: storeAgeInWeeks,
|
8970 |
+
...trackProps
|
8971 |
+
});
|
8972 |
+
addActionToShownOption();
|
8973 |
+
};
|
8974 |
+
|
8975 |
+
const recordScore = (score, comments) => {
|
8976 |
+
Object(external_wc_tracks_["recordEvent"])('ces_feedback', {
|
8977 |
+
action,
|
8978 |
+
score,
|
8979 |
+
comments: comments || '',
|
8980 |
+
store_age: storeAgeInWeeks,
|
8981 |
+
...trackProps
|
8982 |
+
});
|
8983 |
+
createNotice('success', onSubmitLabel);
|
8984 |
+
};
|
8985 |
+
|
8986 |
+
return Object(external_wp_element_["createElement"])(external_wc_customerEffortScore_default.a, {
|
8987 |
+
recordScoreCallback: recordScore,
|
8988 |
+
label: label,
|
8989 |
+
onNoticeShownCallback: onNoticeShown,
|
8990 |
+
onNoticeDismissedCallback: onNoticeDismissed,
|
8991 |
+
onModalShownCallback: onModalShown,
|
8992 |
+
icon: Object(external_wp_element_["createElement"])("span", {
|
8993 |
+
style: {
|
8994 |
+
height: 21,
|
8995 |
+
width: 21
|
8996 |
+
},
|
8997 |
+
role: "img",
|
8998 |
+
"aria-label": Object(external_wp_i18n_["__"])('Pencil icon', 'woocommerce-admin')
|
8999 |
+
}, "\u270F\uFE0F")
|
9000 |
+
});
|
9001 |
+
}
|
9002 |
|
9003 |
+
CustomerEffortScoreTracks.propTypes = {
|
9004 |
+
/**
|
9005 |
+
* The action name sent to Tracks.
|
9006 |
+
*/
|
9007 |
+
action: prop_types_default.a.string.isRequired,
|
9008 |
|
9009 |
+
/**
|
9010 |
+
* Additional props sent to Tracks.
|
9011 |
+
*/
|
9012 |
+
trackProps: prop_types_default.a.object,
|
9013 |
|
9014 |
+
/**
|
9015 |
+
* The label displayed in the modal.
|
9016 |
+
*/
|
9017 |
+
label: prop_types_default.a.string.isRequired,
|
9018 |
|
9019 |
+
/**
|
9020 |
+
* The label for the snackbar that appears upon survey submission.
|
9021 |
+
*/
|
9022 |
+
onSubmitLabel: prop_types_default.a.string,
|
9023 |
|
9024 |
+
/**
|
9025 |
+
* The array of actions that the CES modal has been shown for.
|
9026 |
+
*/
|
9027 |
+
cesShownForActions: prop_types_default.a.arrayOf(prop_types_default.a.string).isRequired,
|
9028 |
|
9029 |
+
/**
|
9030 |
+
* Whether tracking is allowed or not.
|
9031 |
+
*/
|
9032 |
+
allowTracking: prop_types_default.a.bool,
|
9033 |
|
9034 |
+
/**
|
9035 |
+
* Whether props are still being resolved.
|
9036 |
+
*/
|
9037 |
+
resolving: prop_types_default.a.bool.isRequired,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9038 |
|
9039 |
+
/**
|
9040 |
+
* The age of the store in weeks.
|
9041 |
+
*/
|
9042 |
+
storeAgeInWeeks: prop_types_default.a.number,
|
|
|
|
|
|
|
|
|
9043 |
|
9044 |
+
/**
|
9045 |
+
* Function to update options.
|
9046 |
+
*/
|
9047 |
+
updateOptions: prop_types_default.a.func,
|
9048 |
+
|
9049 |
+
/**
|
9050 |
+
* Function to create a snackbar
|
9051 |
+
*/
|
9052 |
+
createNotice: prop_types_default.a.func
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9053 |
};
|
9054 |
|
9055 |
+
function getStoreAgeInWeeks(adminInstallTimestamp) {
|
9056 |
+
if (adminInstallTimestamp === 0) {
|
9057 |
+
return null;
|
9058 |
+
} // Date.now() is ms since Unix epoch, adminInstallTimestamp is in
|
9059 |
+
// seconds since Unix epoch.
|
9060 |
|
|
|
9061 |
|
9062 |
+
const storeAgeInMs = Date.now() - adminInstallTimestamp * 1000;
|
9063 |
+
const storeAgeInWeeks = Math.round(storeAgeInMs / external_wc_data_["WEEK"]);
|
9064 |
+
return storeAgeInWeeks;
|
9065 |
+
}
|
9066 |
+
|
9067 |
+
/* harmony default export */ var customer_effort_score_tracks = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => {
|
9068 |
+
const {
|
9069 |
+
getOption,
|
9070 |
+
isResolving
|
9071 |
+
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
9072 |
+
const cesShownForActions = getOption(SHOWN_FOR_ACTIONS_OPTION_NAME) || [];
|
9073 |
+
const adminInstallTimestamp = getOption(ADMIN_INSTALL_TIMESTAMP_OPTION_NAME) || 0;
|
9074 |
+
const storeAgeInWeeks = getStoreAgeInWeeks(adminInstallTimestamp);
|
9075 |
+
const allowTrackingOption = getOption(ALLOW_TRACKING_OPTION_NAME) || 'no';
|
9076 |
+
const allowTracking = allowTrackingOption === 'yes';
|
9077 |
+
const resolving = isResolving('getOption', [SHOWN_FOR_ACTIONS_OPTION_NAME]) || storeAgeInWeeks === null || isResolving('getOption', [ADMIN_INSTALL_TIMESTAMP_OPTION_NAME]) || isResolving('getOption', [ALLOW_TRACKING_OPTION_NAME]);
|
9078 |
+
return {
|
9079 |
+
cesShownForActions,
|
9080 |
+
allowTracking,
|
9081 |
+
storeAgeInWeeks,
|
9082 |
+
resolving
|
9083 |
+
};
|
9084 |
+
}), Object(external_wp_data_["withDispatch"])(dispatch => {
|
9085 |
+
const {
|
9086 |
+
updateOptions
|
9087 |
+
} = dispatch(external_wc_data_["OPTIONS_STORE_NAME"]);
|
9088 |
+
const {
|
9089 |
+
createNotice
|
9090 |
+
} = dispatch('core/notices');
|
9091 |
+
return {
|
9092 |
+
updateOptions,
|
9093 |
+
createNotice
|
9094 |
+
};
|
9095 |
+
}))(CustomerEffortScoreTracks));
|
9096 |
+
// EXTERNAL MODULE: ./client/customer-effort-score-tracks/data/constants.js
|
9097 |
+
var constants = __webpack_require__(53);
|
9098 |
+
|
9099 |
+
// EXTERNAL MODULE: external ["wp","dataControls"]
|
9100 |
+
var external_wp_dataControls_ = __webpack_require__(10);
|
9101 |
|
9102 |
+
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/action-types.js
|
9103 |
+
const TYPES = {
|
9104 |
+
SET_CES_SURVEY_QUEUE: 'SET_CES_SURVEY_QUEUE',
|
9105 |
+
ADD_CES_SURVEY: 'ADD_CES_SURVEY'
|
9106 |
+
};
|
9107 |
+
/* harmony default export */ var action_types = (TYPES);
|
9108 |
+
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/actions.js
|
9109 |
/**
|
9110 |
* External dependencies
|
9111 |
*/
|
9112 |
|
|
|
|
|
9113 |
/**
|
9114 |
* Internal dependencies
|
9115 |
*/
|
9116 |
|
9117 |
|
9118 |
+
/**
|
9119 |
+
* Initialize the state
|
9120 |
+
*
|
9121 |
+
* @param {Object} queue initial queue
|
9122 |
+
*/
|
9123 |
|
9124 |
+
function setCesSurveyQueue(queue) {
|
|
|
|
|
|
|
|
|
9125 |
return {
|
9126 |
+
type: action_types.SET_CES_SURVEY_QUEUE,
|
9127 |
+
queue
|
|
|
9128 |
};
|
9129 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9130 |
/**
|
9131 |
+
* Add a new CES track to the state.
|
9132 |
*
|
9133 |
+
* @param {string} action action name for the survey
|
9134 |
+
* @param {string} label label for the snackback
|
9135 |
+
* @param {string} pageNow value of window.pagenow
|
9136 |
+
* @param {string} adminPage value of window.adminpage
|
9137 |
+
* @param {string} onsubmit_label label for the snackback onsubmit
|
9138 |
+
* @param {Object} props object for optional props
|
9139 |
*/
|
9140 |
|
9141 |
+
function addCesSurvey(action, label, pageNow = window.pagenow, adminPage = window.adminpage, onsubmit_label = undefined, props = {}) {
|
9142 |
+
return {
|
9143 |
+
type: action_types.ADD_CES_SURVEY,
|
9144 |
+
action,
|
9145 |
+
label,
|
9146 |
+
pageNow,
|
9147 |
+
adminPage,
|
9148 |
+
onsubmit_label,
|
9149 |
+
props
|
9150 |
+
};
|
9151 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9152 |
/**
|
9153 |
+
* Add a new CES survey track for the pages in Analytics menu
|
9154 |
*/
|
9155 |
|
9156 |
+
function addCesSurveyForAnalytics() {
|
9157 |
+
return addCesSurvey('analytics_filtered', Object(external_wp_i18n_["__"])('How easy was it to filter your store analytics?', 'woocommerce-admin'), 'woocommerce_page_wc-admin', 'woocommerce_page_wc-admin');
|
9158 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
9159 |
/**
|
9160 |
+
* Add a new CES survey track on searching customers.
|
|
|
|
|
|
|
|
|
9161 |
*/
|
9162 |
|
9163 |
+
function addCesSurveyForCustomerSearch() {
|
9164 |
+
return addCesSurvey('ces_search', Object(external_wp_i18n_["__"])('How easy was it to use search?', 'woocommerce-admin'), 'woocommerce_page_wc-admin', 'woocommerce_page_wc-admin', undefined, {
|
9165 |
+
search_area: 'customer'
|
9166 |
+
});
|
|
|
|
|
|
|
9167 |
}
|
9168 |
+
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/resolvers.js
|
9169 |
+
/**
|
9170 |
+
* External dependencies
|
9171 |
+
*/
|
9172 |
|
9173 |
+
/**
|
9174 |
+
* Internal dependencies
|
9175 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9176 |
|
|
|
|
|
|
|
9177 |
|
|
|
|
|
9178 |
|
9179 |
+
function* resolvers_getCesSurveyQueue() {
|
9180 |
+
const response = yield Object(external_wp_dataControls_["apiFetch"])({
|
9181 |
+
path: `${constants["a" /* API_NAMESPACE */]}/options?options=${constants["b" /* QUEUE_OPTION_NAME */]}`
|
9182 |
});
|
9183 |
|
9184 |
+
if (response) {
|
9185 |
+
yield setCesSurveyQueue(response[constants["b" /* QUEUE_OPTION_NAME */]] || []);
|
9186 |
+
} else {
|
9187 |
+
throw new Error();
|
9188 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9189 |
}
|
9190 |
+
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/selectors.js
|
9191 |
+
function selectors_getCesSurveyQueue(state) {
|
9192 |
+
return state.queue;
|
9193 |
+
}
|
9194 |
+
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/reducer.js
|
9195 |
+
/**
|
9196 |
+
* Internal dependencies
|
9197 |
+
*/
|
9198 |
|
9199 |
+
const DEFAULT_STATE = {
|
9200 |
+
queue: []
|
9201 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9202 |
|
9203 |
+
const reducer = (state = DEFAULT_STATE, action) => {
|
9204 |
+
switch (action.type) {
|
9205 |
+
case action_types.SET_CES_SURVEY_QUEUE:
|
9206 |
+
return { ...state,
|
9207 |
+
queue: action.queue
|
9208 |
+
};
|
9209 |
|
9210 |
+
case action_types.ADD_CES_SURVEY:
|
9211 |
+
// Prevent duplicate
|
9212 |
+
const hasDuplicate = state.queue.filter(track => track.action === action.action);
|
9213 |
|
9214 |
+
if (hasDuplicate.length) {
|
9215 |
+
return state;
|
9216 |
+
}
|
9217 |
|
9218 |
+
const newTrack = {
|
9219 |
+
action: action.action,
|
9220 |
+
label: action.label,
|
9221 |
+
pagenow: action.pageNow,
|
9222 |
+
adminpage: action.adminPage,
|
9223 |
+
onSubmitLabel: action.onSubmitLabel,
|
9224 |
+
props: action.props
|
9225 |
+
};
|
9226 |
+
return { ...state,
|
9227 |
+
queue: [...state.queue, newTrack]
|
9228 |
+
};
|
9229 |
|
9230 |
+
default:
|
9231 |
+
return state;
|
9232 |
+
}
|
9233 |
+
};
|
|
|
|
|
9234 |
|
9235 |
+
/* harmony default export */ var data_reducer = (reducer);
|
9236 |
+
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/data/index.js
|
9237 |
+
/**
|
9238 |
+
* External dependencies
|
9239 |
+
*/
|
9240 |
|
|
|
|
|
|
|
|
|
|
|
9241 |
|
9242 |
+
/**
|
9243 |
+
* Internal dependencies
|
9244 |
+
*/
|
9245 |
|
|
|
|
|
9246 |
|
|
|
9247 |
|
|
|
9248 |
|
|
|
|
|
9249 |
|
|
|
9250 |
|
9251 |
+
/* harmony default export */ var data = (Object(external_wp_data_["registerStore"])(constants["c" /* STORE_KEY */], {
|
9252 |
+
actions: actions_namespaceObject,
|
9253 |
+
selectors: selectors_namespaceObject,
|
9254 |
+
resolvers: resolvers_namespaceObject,
|
9255 |
+
controls: external_wp_dataControls_["controls"],
|
9256 |
+
reducer: data_reducer
|
9257 |
+
}));
|
9258 |
+
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/customer-effort-score-tracks-container.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9259 |
|
9260 |
|
9261 |
/**
|
9265 |
|
9266 |
|
9267 |
|
9268 |
+
/**
|
9269 |
+
* Internal dependencies
|
9270 |
+
*/
|
9271 |
|
9272 |
|
9273 |
|
9274 |
|
9275 |
+
/**
|
9276 |
+
* Maps the queue of CES tracks surveys to CustomerEffortScoreTracks
|
9277 |
+
* components. Note that generally there will only be a single survey per page
|
9278 |
+
* however this is designed to be flexible if multiple surveys per page are
|
9279 |
+
* added in the future.
|
9280 |
+
*
|
9281 |
+
* @param {Object} props Component props.
|
9282 |
+
* @param {Array} props.queue The queue of surveys.
|
9283 |
+
* @param {boolean} props.resolving Whether the queue is resolving.
|
9284 |
+
* @param {Function} props.clearQueue Sets up clearing of the queue on the next page load.
|
9285 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9286 |
|
9287 |
+
function CustomerEffortScoreTracksContainer({
|
9288 |
+
queue,
|
9289 |
+
resolving,
|
9290 |
+
clearQueue
|
9291 |
+
}) {
|
9292 |
+
if (resolving) {
|
9293 |
+
return null;
|
9294 |
}
|
9295 |
|
9296 |
+
const queueForPage = queue.filter(item => item.pagenow === window.pagenow && item.adminpage === window.adminpage);
|
|
|
|
|
|
|
|
|
|
|
|
|
9297 |
|
9298 |
+
if (queueForPage.length) {
|
9299 |
+
clearQueue();
|
9300 |
+
}
|
9301 |
|
9302 |
+
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, queueForPage.map((item, index) => Object(external_wp_element_["createElement"])(customer_effort_score_tracks, {
|
9303 |
+
key: index,
|
9304 |
+
action: item.action,
|
9305 |
+
label: item.label,
|
9306 |
+
onSubmitLabel: item.onsubmit_label,
|
9307 |
+
trackProps: item.props || {}
|
9308 |
+
})));
|
9309 |
}
|
9310 |
|
9311 |
+
CustomerEffortScoreTracksContainer.propTypes = {
|
9312 |
+
/**
|
9313 |
+
* The queue of CES tracks surveys to display.
|
9314 |
+
*/
|
9315 |
+
queue: prop_types_default.a.arrayOf(prop_types_default.a.object),
|
9316 |
|
9317 |
+
/**
|
9318 |
+
* If the queue option is being resolved.
|
9319 |
+
*/
|
9320 |
+
resolving: prop_types_default.a.bool,
|
9321 |
+
|
9322 |
+
/**
|
9323 |
+
* Set up clearing the queue on the next page load.
|
9324 |
+
*/
|
9325 |
+
clearQueue: prop_types_default.a.func
|
9326 |
+
};
|
9327 |
+
/* harmony default export */ var customer_effort_score_tracks_container = (Object(external_wp_compose_["compose"])(Object(external_wp_data_["withSelect"])(select => {
|
9328 |
+
const {
|
9329 |
+
getCesSurveyQueue,
|
9330 |
+
isResolving
|
9331 |
+
} = select(constants["c" /* STORE_KEY */]);
|
9332 |
+
const queue = getCesSurveyQueue();
|
9333 |
+
const resolving = isResolving('getOption', [constants["b" /* QUEUE_OPTION_NAME */]]);
|
9334 |
+
return {
|
9335 |
+
queue,
|
9336 |
+
resolving
|
9337 |
+
};
|
9338 |
+
}), Object(external_wp_data_["withDispatch"])(dispatch => {
|
9339 |
+
const {
|
9340 |
+
updateOptions
|
9341 |
+
} = dispatch(external_wc_data_["OPTIONS_STORE_NAME"]);
|
9342 |
+
return {
|
9343 |
+
clearQueue: () => {
|
9344 |
+
// This sets an option that should be used on the next page
|
9345 |
+
// load to clear the CES tracks queue for the current page (see
|
9346 |
+
// CustomerEffortScoreTracks.php) - clearing the queue
|
9347 |
+
// directly puts this into an infinite loop which is picked
|
9348 |
+
// up by React.
|
9349 |
+
updateOptions({
|
9350 |
+
woocommerce_clear_ces_tracks_queue_for_page: {
|
9351 |
+
pagenow: window.pagenow,
|
9352 |
+
adminpage: window.adminpage
|
9353 |
}
|
9354 |
+
});
|
9355 |
}
|
|
|
|
|
9356 |
};
|
9357 |
+
}))(CustomerEffortScoreTracksContainer));
|
9358 |
+
// CONCATENATED MODULE: ./client/customer-effort-score-tracks/index.js
|
9359 |
|
|
|
|
|
9360 |
|
|
|
|
|
9361 |
|
9362 |
+
/***/ }),
|
9363 |
|
9364 |
+
/***/ 269:
|
9365 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9366 |
|
9367 |
+
"use strict";
|
9368 |
|
9369 |
+
// EXPORTS
|
9370 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ EmbeddedBodyLayout; });
|
|
|
|
|
|
|
|
|
|
|
9371 |
|
9372 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
|
9373 |
+
var helpers_extends = __webpack_require__(35);
|
9374 |
+
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
|
9375 |
|
9376 |
+
// EXTERNAL MODULE: external ["wp","element"]
|
9377 |
+
var external_wp_element_ = __webpack_require__(0);
|
|
|
|
|
|
|
|
|
9378 |
|
9379 |
+
// EXTERNAL MODULE: external ["wp","hooks"]
|
9380 |
+
var external_wp_hooks_ = __webpack_require__(30);
|
|
|
|
|
9381 |
|
9382 |
+
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
9383 |
+
var lib = __webpack_require__(32);
|
|
|
9384 |
|
9385 |
+
// EXTERNAL MODULE: external ["wp","data"]
|
9386 |
+
var external_wp_data_ = __webpack_require__(7);
|
9387 |
|
9388 |
+
// EXTERNAL MODULE: external ["wc","data"]
|
9389 |
+
var external_wc_data_ = __webpack_require__(11);
|
9390 |
|
9391 |
+
// CONCATENATED MODULE: ./client/settings-recommendations/recommendations-eligibility-wrapper.tsx
|
9392 |
|
|
|
|
|
|
|
9393 |
|
9394 |
+
/**
|
9395 |
+
* External dependencies
|
9396 |
+
*/
|
9397 |
|
|
|
|
|
9398 |
|
9399 |
+
const SHOW_MARKETPLACE_SUGGESTION_OPTION = 'woocommerce_show_marketplace_suggestions';
|
9400 |
+
|
9401 |
+
const RecommendationsEligibilityWrapper = ({
|
9402 |
+
children
|
9403 |
+
}) => {
|
9404 |
+
const {
|
9405 |
+
currentUserCan
|
9406 |
+
} = Object(external_wc_data_["useUser"])();
|
9407 |
+
const isMarketplaceSuggestionsEnabled = Object(external_wp_data_["useSelect"])(select => {
|
9408 |
+
const {
|
9409 |
+
getOption,
|
9410 |
+
hasFinishedResolution
|
9411 |
+
} = select(external_wc_data_["OPTIONS_STORE_NAME"]);
|
9412 |
+
const hasFinishedResolving = hasFinishedResolution('getOption', [SHOW_MARKETPLACE_SUGGESTION_OPTION]);
|
9413 |
+
const canShowMarketplaceSuggestions = getOption(SHOW_MARKETPLACE_SUGGESTION_OPTION) === 'yes';
|
9414 |
+
return hasFinishedResolving && canShowMarketplaceSuggestions;
|
9415 |
+
});
|
9416 |
+
|
9417 |
+
if (!currentUserCan('install_plugins')) {
|
9418 |
+
return null;
|
9419 |
}
|
9420 |
|
9421 |
+
if (!isMarketplaceSuggestionsEnabled) {
|
9422 |
+
return null;
|
9423 |
+
}
|
9424 |
+
|
9425 |
+
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, children);
|
9426 |
+
};
|
9427 |
+
|
9428 |
+
/* harmony default export */ var recommendations_eligibility_wrapper = (RecommendationsEligibilityWrapper);
|
9429 |
+
// CONCATENATED MODULE: ./client/payments/payment-recommendations-wrapper.tsx
|
9430 |
|
|
|
|
|
9431 |
|
9432 |
+
/**
|
9433 |
+
* External dependencies
|
9434 |
+
*/
|
9435 |
|
9436 |
+
/**
|
9437 |
+
* Internal dependencies
|
9438 |
+
*/
|
|
|
|
|
9439 |
|
9440 |
+
|
9441 |
+
const PaymentRecommendationsChunk = Object(external_wp_element_["lazy"])(() => Promise.all(/* import() | payment-recommendations */[__webpack_require__.e(3), __webpack_require__.e(44)]).then(__webpack_require__.bind(null, 601)));
|
9442 |
+
const PaymentRecommendations = ({
|
9443 |
+
page,
|
9444 |
+
tab,
|
9445 |
+
section
|
9446 |
+
}) => {
|
9447 |
+
if (page === 'wc-settings' && tab === 'checkout' && !section) {
|
9448 |
+
return Object(external_wp_element_["createElement"])(recommendations_eligibility_wrapper, null, Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
9449 |
+
fallback: null
|
9450 |
+
}, Object(external_wp_element_["createElement"])(PaymentRecommendationsChunk, null)));
|
9451 |
}
|
|
|
9452 |
|
9453 |
+
return null;
|
9454 |
+
};
|
9455 |
+
// CONCATENATED MODULE: ./client/payments/index.ts
|
|
|
|
|
9456 |
|
9457 |
+
// EXTERNAL MODULE: ./client/embedded-body-layout/style.scss
|
9458 |
+
var style = __webpack_require__(297);
|
|
|
|
|
|
|
9459 |
|
9460 |
+
// CONCATENATED MODULE: ./client/embedded-body-layout/embedded-body-layout.tsx
|
|
|
9461 |
|
|
|
|
|
|
|
9462 |
|
|
|
9463 |
|
9464 |
+
/**
|
9465 |
+
* External dependencies
|
9466 |
+
*/
|
|
|
9467 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9468 |
|
9469 |
+
/**
|
9470 |
+
* Internal dependencies
|
9471 |
+
*/
|
9472 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9473 |
|
|
|
9474 |
|
|
|
9475 |
|
9476 |
+
function isWPPage(params) {
|
9477 |
+
return params.page !== undefined;
|
9478 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9479 |
|
9480 |
+
const EMBEDDED_BODY_COMPONENT_LIST = [PaymentRecommendations];
|
9481 |
+
/**
|
9482 |
+
* This component is appended to the bottom of the WooCommerce non-react pages (like settings).
|
9483 |
+
* You can add a component by writing a Fill component from slot-fill with the `embedded-body-layout` name.
|
9484 |
+
*
|
9485 |
+
* Each Fill component receives QueryParams, consisting of a page, tab, and section string.
|
9486 |
+
*/
|
9487 |
|
9488 |
+
const EmbeddedBodyLayout = () => {
|
9489 |
+
const query = Object(lib["parse"])(location.search.substring(1));
|
9490 |
+
let queryParams = {
|
9491 |
+
page: '',
|
9492 |
+
tab: ''
|
9493 |
};
|
9494 |
+
|
9495 |
+
if (isWPPage(query)) {
|
9496 |
+
queryParams = query;
|
9497 |
+
}
|
9498 |
+
|
9499 |
+
const componentList = Object(external_wp_hooks_["applyFilters"])('woocommerce_admin_embedded_layout_components', EMBEDDED_BODY_COMPONENT_LIST, queryParams);
|
9500 |
+
return Object(external_wp_element_["createElement"])("div", {
|
9501 |
+
className: "woocommerce-embedded-layout__primary",
|
9502 |
+
id: "woocommerce-embedded-layout__primary"
|
9503 |
+
}, componentList.map((Comp, index) => {
|
9504 |
+
return Object(external_wp_element_["createElement"])(Comp, extends_default()({
|
9505 |
+
key: index
|
9506 |
+
}, queryParams));
|
9507 |
+
}));
|
9508 |
};
|
9509 |
+
// CONCATENATED MODULE: ./client/embedded-body-layout/index.ts
|
9510 |
|
|
|
9511 |
|
9512 |
+
/***/ }),
|
|
|
|
|
9513 |
|
9514 |
+
/***/ 27:
|
9515 |
+
/***/ (function(module, exports) {
|
|
|
9516 |
|
9517 |
+
(function() { module.exports = window["wp"]["keycodes"]; }());
|
|
|
|
|
|
|
|
|
|
|
|
|
9518 |
|
9519 |
+
/***/ }),
|
9520 |
+
|
9521 |
+
/***/ 278:
|
9522 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9523 |
+
|
9524 |
+
"use strict";
|
9525 |
+
__webpack_require__.r(__webpack_exports__);
|
9526 |
+
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
9527 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
9528 |
+
/* harmony import */ var _wordpress_notices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(127);
|
9529 |
+
/* harmony import */ var _wordpress_notices__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_notices__WEBPACK_IMPORTED_MODULE_1__);
|
9530 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
|
9531 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__);
|
9532 |
+
/* harmony import */ var _stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(280);
|
9533 |
+
/* harmony import */ var _stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_3__);
|
9534 |
+
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(119);
|
9535 |
+
/* harmony import */ var _customer_effort_score_tracks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(268);
|
9536 |
+
/* harmony import */ var _embedded_body_layout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(269);
|
9537 |
+
|
9538 |
+
|
9539 |
+
/**
|
9540 |
+
* External dependencies
|
9541 |
+
*/
|
9542 |
|
|
|
|
|
|
|
9543 |
|
|
|
|
|
9544 |
|
9545 |
+
/**
|
9546 |
+
* Internal dependencies
|
9547 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9548 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9549 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9550 |
|
|
|
|
|
9551 |
|
9552 |
+
// Modify webpack pubilcPath at runtime based on location of WordPress Plugin.
|
9553 |
+
// eslint-disable-next-line no-undef,camelcase
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9554 |
|
9555 |
+
__webpack_require__.p = global.wcAdminAssets.path;
|
9556 |
+
const appRoot = document.getElementById('root');
|
9557 |
+
const embeddedRoot = document.getElementById('woocommerce-embedded-root');
|
9558 |
+
const settingsGroup = 'wc_admin';
|
9559 |
+
const hydrateUser = window.wcSettings.currentUserData;
|
9560 |
|
9561 |
+
if (appRoot) {
|
9562 |
+
let HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withSettingsHydration"])(settingsGroup, window.wcSettings)(_layout__WEBPACK_IMPORTED_MODULE_4__[/* PageLayout */ "b"]);
|
9563 |
+
const hydrateSettings = window.wcSettings.preloadSettings && window.wcSettings.preloadSettings.general;
|
|
|
|
|
|
|
9564 |
|
9565 |
+
if (hydrateSettings) {
|
9566 |
+
HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withSettingsHydration"])('general', {
|
9567 |
+
general: window.wcSettings.preloadSettings.general
|
9568 |
+
})(HydratedPageLayout);
|
9569 |
}
|
9570 |
|
9571 |
+
if (hydrateUser) {
|
9572 |
+
HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withCurrentUserHydration"])(hydrateUser)(HydratedPageLayout);
|
|
|
|
|
9573 |
}
|
9574 |
|
9575 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedPageLayout, null), appRoot);
|
9576 |
+
} else if (embeddedRoot) {
|
9577 |
+
let HydratedEmbedLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withSettingsHydration"])(settingsGroup, window.wcSettings)(_layout__WEBPACK_IMPORTED_MODULE_4__[/* EmbedLayout */ "a"]);
|
9578 |
|
9579 |
+
if (hydrateUser) {
|
9580 |
+
HydratedEmbedLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_2__["withCurrentUserHydration"])(hydrateUser)(HydratedEmbedLayout);
|
9581 |
+
} // Render the header.
|
|
|
|
|
|
|
|
|
9582 |
|
|
|
9583 |
|
9584 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedEmbedLayout, null), embeddedRoot);
|
9585 |
+
embeddedRoot.classList.remove('is-embed-loading'); // Render notices just above the WP content div.
|
9586 |
+
|
9587 |
+
const wpBody = document.getElementById('wpbody-content');
|
9588 |
+
const wrap = wpBody.querySelector('.wrap.woocommerce') || wpBody.querySelector('.wrap');
|
9589 |
+
const noticeContainer = document.createElement('div');
|
9590 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
9591 |
+
className: "woocommerce-layout"
|
9592 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_layout__WEBPACK_IMPORTED_MODULE_4__[/* PrimaryLayout */ "c"], null)), wpBody.insertBefore(noticeContainer, wrap));
|
9593 |
+
const embeddedBodyContainer = document.createElement('div');
|
9594 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_embedded_body_layout__WEBPACK_IMPORTED_MODULE_6__[/* EmbeddedBodyLayout */ "a"], null), wpBody.insertBefore(embeddedBodyContainer, wrap.nextSibling));
|
9595 |
+
} // Render the CustomerEffortScoreTracksContainer only if
|
9596 |
+
// the feature flag is enabled.
|
9597 |
|
9598 |
|
9599 |
+
if (window.wcAdminFeatures && window.wcAdminFeatures['customer-effort-score-tracks'] === true) {
|
9600 |
+
// Set up customer effort score survey.
|
9601 |
+
(function () {
|
9602 |
+
const root = appRoot || embeddedRoot;
|
9603 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_customer_effort_score_tracks__WEBPACK_IMPORTED_MODULE_5__[/* CustomerEffortScoreTracksContainer */ "a"], null), root.insertBefore(document.createElement('div'), null));
|
9604 |
+
})();
|
9605 |
+
}
|
9606 |
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(78)))
|
9607 |
|
9608 |
/***/ }),
|
9609 |
|
9610 |
+
/***/ 28:
|
9611 |
/***/ (function(module, exports) {
|
9612 |
|
9613 |
+
(function() { module.exports = window["wp"]["htmlEntities"]; }());
|
9614 |
|
9615 |
/***/ }),
|
9616 |
|
9617 |
+
/***/ 280:
|
9618 |
/***/ (function(module, exports, __webpack_require__) {
|
9619 |
|
9620 |
// extracted by mini-css-extract-plugin
|
9621 |
|
9622 |
/***/ }),
|
9623 |
|
9624 |
+
/***/ 281:
|
9625 |
+
/***/ (function(module, exports) {
|
9626 |
|
9627 |
+
(function() { module.exports = window["wc"]["notices"]; }());
|
9628 |
|
9629 |
/***/ }),
|
9630 |
|
9631 |
+
/***/ 282:
|
9632 |
/***/ (function(module, exports, __webpack_require__) {
|
9633 |
|
9634 |
// extracted by mini-css-extract-plugin
|
9635 |
|
9636 |
/***/ }),
|
9637 |
|
9638 |
+
/***/ 283:
|
9639 |
/***/ (function(module, exports, __webpack_require__) {
|
9640 |
|
9641 |
// extracted by mini-css-extract-plugin
|
9642 |
|
9643 |
/***/ }),
|
9644 |
|
9645 |
+
/***/ 284:
|
9646 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
9647 |
|
9648 |
+
// extracted by mini-css-extract-plugin
|
9649 |
|
9650 |
/***/ }),
|
9651 |
|
9652 |
+
/***/ 285:
|
9653 |
/***/ (function(module, exports, __webpack_require__) {
|
9654 |
|
9655 |
// extracted by mini-css-extract-plugin
|
9656 |
|
9657 |
/***/ }),
|
9658 |
|
9659 |
+
/***/ 286:
|
9660 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9661 |
|
9662 |
+
// extracted by mini-css-extract-plugin
|
|
|
9663 |
|
9664 |
/***/ }),
|
9665 |
|
9666 |
+
/***/ 287:
|
9667 |
/***/ (function(module, exports, __webpack_require__) {
|
9668 |
|
9669 |
+
// extracted by mini-css-extract-plugin
|
|
|
9670 |
|
9671 |
+
/***/ }),
|
|
|
|
|
9672 |
|
9673 |
+
/***/ 288:
|
9674 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
9675 |
|
9676 |
+
// extracted by mini-css-extract-plugin
|
9677 |
|
9678 |
/***/ }),
|
9679 |
|
9680 |
+
/***/ 289:
|
9681 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9682 |
|
9683 |
+
// extracted by mini-css-extract-plugin
|
|
|
|
|
9684 |
|
9685 |
+
/***/ }),
|
9686 |
|
9687 |
+
/***/ 29:
|
9688 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9689 |
|
9690 |
+
(function() { module.exports = window["ReactDOM"]; }());
|
|
|
|
|
|
|
9691 |
|
9692 |
+
/***/ }),
|
|
|
|
|
9693 |
|
9694 |
+
/***/ 290:
|
9695 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
9696 |
|
9697 |
+
"use strict";
|
9698 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
9699 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
9700 |
+
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
|
9701 |
+
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
9702 |
|
|
|
|
|
|
|
9703 |
|
9704 |
+
/**
|
9705 |
+
* WordPress dependencies
|
9706 |
+
*/
|
9707 |
|
9708 |
+
var chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
|
9709 |
+
xmlns: "http://www.w3.org/2000/svg",
|
9710 |
+
viewBox: "0 0 24 24"
|
9711 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
|
9712 |
+
d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
|
9713 |
+
}));
|
9714 |
+
/* harmony default export */ __webpack_exports__["a"] = (chevronLeft);
|
9715 |
+
//# sourceMappingURL=chevron-left.js.map
|
9716 |
|
9717 |
+
/***/ }),
|
|
|
|
|
9718 |
|
9719 |
+
/***/ 291:
|
9720 |
+
/***/ (function(module, exports) {
|
|
|
9721 |
|
9722 |
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
9723 |
+
if (source == null) return {};
|
9724 |
+
var target = {};
|
9725 |
+
var sourceKeys = Object.keys(source);
|
9726 |
+
var key, i;
|
9727 |
|
9728 |
+
for (i = 0; i < sourceKeys.length; i++) {
|
9729 |
+
key = sourceKeys[i];
|
9730 |
+
if (excluded.indexOf(key) >= 0) continue;
|
9731 |
+
target[key] = source[key];
|
|
|
|
|
|
|
9732 |
}
|
9733 |
|
9734 |
+
return target;
|
9735 |
}
|
9736 |
|
9737 |
+
module.exports = _objectWithoutPropertiesLoose;
|
9738 |
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9739 |
|
9740 |
+
/***/ }),
|
|
|
9741 |
|
9742 |
+
/***/ 292:
|
9743 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
9744 |
|
9745 |
+
var setPrototypeOf = __webpack_require__(293);
|
|
|
|
|
9746 |
|
9747 |
+
function _inheritsLoose(subClass, superClass) {
|
9748 |
+
subClass.prototype = Object.create(superClass.prototype);
|
9749 |
+
subClass.prototype.constructor = subClass;
|
9750 |
+
setPrototypeOf(subClass, superClass);
|
9751 |
}
|
9752 |
|
9753 |
+
module.exports = _inheritsLoose;
|
9754 |
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9755 |
|
9756 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9757 |
|
9758 |
+
/***/ 293:
|
9759 |
+
/***/ (function(module, exports) {
|
9760 |
|
9761 |
+
function _setPrototypeOf(o, p) {
|
9762 |
+
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
9763 |
+
o.__proto__ = p;
|
9764 |
+
return o;
|
9765 |
+
};
|
9766 |
|
9767 |
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
9768 |
+
return _setPrototypeOf(o, p);
|
9769 |
}
|
9770 |
|
9771 |
+
module.exports = _setPrototypeOf;
|
9772 |
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9773 |
|
9774 |
+
/***/ }),
|
|
|
9775 |
|
9776 |
+
/***/ 294:
|
9777 |
+
/***/ (function(module, exports) {
|
|
|
9778 |
|
9779 |
+
function _assertThisInitialized(self) {
|
9780 |
+
if (self === void 0) {
|
9781 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
9782 |
}
|
9783 |
|
9784 |
+
return self;
|
9785 |
}
|
9786 |
|
9787 |
+
module.exports = _assertThisInitialized;
|
9788 |
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9789 |
|
9790 |
+
/***/ }),
|
|
|
9791 |
|
9792 |
+
/***/ 295:
|
9793 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
9794 |
|
9795 |
+
// extracted by mini-css-extract-plugin
|
9796 |
|
9797 |
+
/***/ }),
|
|
|
|
|
|
|
9798 |
|
9799 |
+
/***/ 296:
|
9800 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
9801 |
|
9802 |
+
module.exports = Array.isArray || function (arr) {
|
9803 |
+
return Object.prototype.toString.call(arr) == '[object Array]';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9804 |
};
|
9805 |
|
|
|
|
|
|
|
|
|
|
|
9806 |
|
9807 |
+
/***/ }),
|
9808 |
+
|
9809 |
+
/***/ 297:
|
9810 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
9811 |
|
9812 |
+
// extracted by mini-css-extract-plugin
|
9813 |
|
9814 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9815 |
|
9816 |
+
/***/ 3:
|
9817 |
+
/***/ (function(module, exports) {
|
|
|
|
|
9818 |
|
9819 |
+
(function() { module.exports = window["lodash"]; }());
|
|
|
9820 |
|
9821 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9822 |
|
9823 |
+
/***/ 30:
|
9824 |
+
/***/ (function(module, exports) {
|
9825 |
|
9826 |
+
(function() { module.exports = window["wp"]["hooks"]; }());
|
|
|
|
|
|
|
|
|
9827 |
|
9828 |
+
/***/ }),
|
|
|
|
|
9829 |
|
9830 |
+
/***/ 32:
|
9831 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
9832 |
|
9833 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
9834 |
|
|
|
9835 |
|
9836 |
+
var stringify = __webpack_require__(67);
|
9837 |
+
var parse = __webpack_require__(68);
|
9838 |
+
var formats = __webpack_require__(39);
|
9839 |
|
9840 |
+
module.exports = {
|
9841 |
+
formats: formats,
|
9842 |
+
parse: parse,
|
9843 |
+
stringify: stringify
|
9844 |
+
};
|
9845 |
|
9846 |
|
9847 |
/***/ }),
|
9848 |
|
9849 |
+
/***/ 35:
|
9850 |
/***/ (function(module, exports) {
|
9851 |
|
9852 |
+
function _extends() {
|
9853 |
+
module.exports = _extends = Object.assign || function (target) {
|
9854 |
+
for (var i = 1; i < arguments.length; i++) {
|
9855 |
+
var source = arguments[i];
|
9856 |
|
9857 |
+
for (var key in source) {
|
9858 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
9859 |
+
target[key] = source[key];
|
9860 |
+
}
|
9861 |
+
}
|
9862 |
+
}
|
9863 |
|
9864 |
+
return target;
|
9865 |
+
};
|
9866 |
|
9867 |
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
9868 |
+
return _extends.apply(this, arguments);
|
9869 |
+
}
|
9870 |
+
|
9871 |
+
module.exports = _extends;
|
9872 |
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
9873 |
|
9874 |
/***/ }),
|
9875 |
|
9911 |
|
9912 |
/***/ }),
|
9913 |
|
9914 |
+
/***/ 41:
|
9915 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9916 |
|
9917 |
+
"use strict";
|
9918 |
+
var isProduction = "production" === 'production';
|
9919 |
+
var prefix = 'Invariant failed';
|
9920 |
+
function invariant(condition, message) {
|
9921 |
+
if (condition) {
|
9922 |
+
return;
|
9923 |
+
}
|
9924 |
+
if (isProduction) {
|
9925 |
+
throw new Error(prefix);
|
9926 |
+
}
|
9927 |
+
throw new Error(prefix + ": " + (message || ''));
|
9928 |
+
}
|
9929 |
|
9930 |
+
/* harmony default export */ __webpack_exports__["a"] = (invariant);
|
9931 |
+
|
9932 |
+
|
9933 |
+
/***/ }),
|
9934 |
+
|
9935 |
+
/***/ 46:
|
9936 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9937 |
+
|
9938 |
+
"use strict";
|
9939 |
+
/**
|
9940 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
9941 |
+
*
|
9942 |
+
* This source code is licensed under the MIT license found in the
|
9943 |
+
* LICENSE file in the root directory of this source tree.
|
9944 |
+
*/
|
9945 |
+
|
9946 |
+
|
9947 |
+
|
9948 |
+
var ReactPropTypesSecret = __webpack_require__(47);
|
9949 |
+
|
9950 |
+
function emptyFunction() {}
|
9951 |
+
function emptyFunctionWithReset() {}
|
9952 |
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
9953 |
+
|
9954 |
+
module.exports = function() {
|
9955 |
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
9956 |
+
if (secret === ReactPropTypesSecret) {
|
9957 |
+
// It is still safe when called from React.
|
9958 |
+
return;
|
9959 |
}
|
9960 |
+
var err = new Error(
|
9961 |
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
9962 |
+
'Use PropTypes.checkPropTypes() to call them. ' +
|
9963 |
+
'Read more at http://fb.me/use-check-prop-types'
|
9964 |
+
);
|
9965 |
+
err.name = 'Invariant Violation';
|
9966 |
+
throw err;
|
9967 |
+
};
|
9968 |
+
shim.isRequired = shim;
|
9969 |
+
function getShim() {
|
9970 |
+
return shim;
|
9971 |
+
};
|
9972 |
+
// Important!
|
9973 |
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
9974 |
+
var ReactPropTypes = {
|
9975 |
+
array: shim,
|
9976 |
+
bool: shim,
|
9977 |
+
func: shim,
|
9978 |
+
number: shim,
|
9979 |
+
object: shim,
|
9980 |
+
string: shim,
|
9981 |
+
symbol: shim,
|
9982 |
|
9983 |
+
any: shim,
|
9984 |
+
arrayOf: getShim,
|
9985 |
+
element: shim,
|
9986 |
+
elementType: shim,
|
9987 |
+
instanceOf: getShim,
|
9988 |
+
node: shim,
|
9989 |
+
objectOf: getShim,
|
9990 |
+
oneOf: getShim,
|
9991 |
+
oneOfType: getShim,
|
9992 |
+
shape: getShim,
|
9993 |
+
exact: getShim,
|
9994 |
+
|
9995 |
+
checkPropTypes: emptyFunctionWithReset,
|
9996 |
+
resetWarningCache: emptyFunction
|
9997 |
+
};
|
9998 |
+
|
9999 |
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
10000 |
+
|
10001 |
+
return ReactPropTypes;
|
10002 |
+
};
|
10003 |
+
|
10004 |
+
|
10005 |
+
/***/ }),
|
10006 |
+
|
10007 |
+
/***/ 47:
|
10008 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10009 |
+
|
10010 |
+
"use strict";
|
10011 |
+
/**
|
10012 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
10013 |
+
*
|
10014 |
+
* This source code is licensed under the MIT license found in the
|
10015 |
+
* LICENSE file in the root directory of this source tree.
|
10016 |
+
*/
|
10017 |
+
|
10018 |
+
|
10019 |
+
|
10020 |
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
10021 |
+
|
10022 |
+
module.exports = ReactPropTypesSecret;
|
10023 |
+
|
10024 |
+
|
10025 |
+
/***/ }),
|
10026 |
|
10027 |
+
/***/ 471:
|
10028 |
+
/***/ (function(module, exports) {
|
10029 |
+
|
10030 |
+
(function() { module.exports = window["wc"]["csvExport"]; }());
|
10031 |
|
10032 |
/***/ }),
|
10033 |
|
10034 |
+
/***/ 48:
|
10035 |
/***/ (function(module, exports, __webpack_require__) {
|
10036 |
|
10037 |
"use strict";
|
10290 |
|
10291 |
/***/ }),
|
10292 |
|
10293 |
+
/***/ 49:
|
10294 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10295 |
|
10296 |
"use strict";
|
|
|
|
|
|
|
|
|
10297 |
|
10298 |
|
10299 |
/**
|
10300 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
10301 |
+
*
|
10302 |
+
* This source code is licensed under the MIT license found in the
|
10303 |
+
* LICENSE file in the root directory of this source tree.
|
10304 |
+
*
|
10305 |
+
*
|
10306 |
*/
|
10307 |
|
10308 |
+
function makeEmptyFunction(arg) {
|
10309 |
+
return function () {
|
10310 |
+
return arg;
|
10311 |
+
};
|
10312 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10313 |
|
10314 |
/**
|
10315 |
+
* This function accepts and discards inputs; it has no side effects. This is
|
10316 |
+
* primarily useful idiomatically for overridable function endpoints which
|
10317 |
+
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
|
10318 |
*/
|
10319 |
+
var emptyFunction = function emptyFunction() {};
|
10320 |
|
10321 |
+
emptyFunction.thatReturns = makeEmptyFunction;
|
10322 |
+
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
10323 |
+
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
10324 |
+
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
10325 |
+
emptyFunction.thatReturnsThis = function () {
|
10326 |
+
return this;
|
10327 |
+
};
|
10328 |
+
emptyFunction.thatReturnsArgument = function (arg) {
|
10329 |
+
return arg;
|
10330 |
+
};
|
10331 |
+
|
10332 |
+
module.exports = emptyFunction;
|
10333 |
|
10334 |
/***/ }),
|
10335 |
|
10336 |
+
/***/ 493:
|
10337 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10338 |
|
10339 |
"use strict";
|
10340 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
10341 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
10342 |
+
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
|
10343 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
10344 |
|
10345 |
|
10347 |
* WordPress dependencies
|
10348 |
*/
|
10349 |
|
10350 |
+
var close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
|
10351 |
xmlns: "http://www.w3.org/2000/svg",
|
10352 |
viewBox: "0 0 24 24"
|
10353 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
|
10354 |
+
d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
|
|
|
|
|
10355 |
}));
|
10356 |
+
/* harmony default export */ __webpack_exports__["a"] = (close);
|
10357 |
+
//# sourceMappingURL=close.js.map
|
10358 |
|
10359 |
/***/ }),
|
10360 |
|
10361 |
+
/***/ 494:
|
10362 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10363 |
|
10364 |
"use strict";
|
10365 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
10366 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
10367 |
+
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
|
10368 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
10369 |
|
10370 |
|
10372 |
* WordPress dependencies
|
10373 |
*/
|
10374 |
|
10375 |
+
var page = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
|
10376 |
xmlns: "http://www.w3.org/2000/svg",
|
10377 |
viewBox: "0 0 24 24"
|
10378 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
|
10379 |
+
d: "M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"
|
10380 |
}));
|
10381 |
+
/* harmony default export */ __webpack_exports__["a"] = (page);
|
10382 |
+
//# sourceMappingURL=page.js.map
|
10383 |
|
10384 |
/***/ }),
|
10385 |
|
10386 |
+
/***/ 495:
|
10387 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10388 |
|
10389 |
"use strict";
|
10390 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
10391 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
10392 |
+
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
|
10393 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
10394 |
|
10395 |
|
10397 |
* WordPress dependencies
|
10398 |
*/
|
10399 |
|
10400 |
+
var box = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
|
10401 |
xmlns: "http://www.w3.org/2000/svg",
|
10402 |
viewBox: "0 0 24 24"
|
10403 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
|
10404 |
+
fillRule: "evenodd",
|
10405 |
+
d: "M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z",
|
10406 |
+
clipRule: "evenodd"
|
10407 |
}));
|
10408 |
+
/* harmony default export */ __webpack_exports__["a"] = (box);
|
10409 |
+
//# sourceMappingURL=box.js.map
|
10410 |
|
10411 |
/***/ }),
|
10412 |
|
10413 |
+
/***/ 496:
|
10414 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10415 |
|
10416 |
"use strict";
|
|
|
|
|
|
|
10417 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
10418 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
10419 |
+
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
|
10420 |
+
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
|
|
|
|
|
|
|
|
10421 |
|
10422 |
|
10423 |
/**
|
10424 |
+
* WordPress dependencies
|
|
|
|
|
|
|
|
|
|
|
10425 |
*/
|
10426 |
|
10427 |
+
var external = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
|
10428 |
+
xmlns: "http://www.w3.org/2000/svg",
|
10429 |
+
viewBox: "0 0 24 24"
|
10430 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
|
10431 |
+
d: "M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"
|
10432 |
+
}));
|
10433 |
+
/* harmony default export */ __webpack_exports__["a"] = (external);
|
10434 |
+
//# sourceMappingURL=external.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10435 |
|
10436 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10437 |
|
10438 |
+
/***/ 5:
|
10439 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10440 |
|
10441 |
+
(function() { module.exports = window["React"]; }());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10442 |
|
10443 |
/***/ }),
|
10444 |
|
10445 |
+
/***/ 51:
|
10446 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10447 |
|
10448 |
"use strict";
|
10457 |
// UNUSED EXPORTS: createHashHistory, parsePath
|
10458 |
|
10459 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
10460 |
+
var esm_extends = __webpack_require__(23);
|
10461 |
|
10462 |
// CONCATENATED MODULE: ./node_modules/resolve-pathname/esm/resolve-pathname.js
|
10463 |
function isAbsolute(pathname) {
|
10575 |
/* harmony default export */ var value_equal = (valueEqual);
|
10576 |
|
10577 |
// EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js
|
10578 |
+
var tiny_invariant_esm = __webpack_require__(41);
|
10579 |
|
10580 |
// CONCATENATED MODULE: ./node_modules/history/esm/history.js
|
10581 |
|
11499 |
|
11500 |
|
11501 |
|
11502 |
+
/***/ }),
|
11503 |
+
|
11504 |
+
/***/ 53:
|
11505 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11506 |
+
|
11507 |
+
"use strict";
|
11508 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return STORE_KEY; });
|
11509 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return API_NAMESPACE; });
|
11510 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return QUEUE_OPTION_NAME; });
|
11511 |
+
const STORE_KEY = 'wc/customer-effort-score';
|
11512 |
+
const API_NAMESPACE = '/wc-admin';
|
11513 |
+
const QUEUE_OPTION_NAME = 'woocommerce_ces_tracks_queue';
|
11514 |
+
|
11515 |
+
/***/ }),
|
11516 |
+
|
11517 |
+
/***/ 57:
|
11518 |
+
/***/ (function(module, exports) {
|
11519 |
+
|
11520 |
+
(function() { module.exports = window["wp"]["date"]; }());
|
11521 |
+
|
11522 |
+
/***/ }),
|
11523 |
+
|
11524 |
+
/***/ 59:
|
11525 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11526 |
+
|
11527 |
+
"use strict";
|
11528 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getCountryCode; });
|
11529 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getCurrencyRegion; });
|
11530 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getProductIdsForCart; });
|
11531 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getCategorizedOnboardingProducts; });
|
11532 |
+
/* unused harmony export getProductList */
|
11533 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getPriceValue; });
|
11534 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isWCAdmin; });
|
11535 |
+
/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28);
|
11536 |
+
/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_0__);
|
11537 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
11538 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
11539 |
+
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
|
11540 |
+
/**
|
11541 |
+
* External dependencies
|
11542 |
+
*/
|
11543 |
+
|
11544 |
+
|
11545 |
+
|
11546 |
+
/**
|
11547 |
+
* Gets the country code from a country:state value string.
|
11548 |
+
*
|
11549 |
+
* @param {string} countryState Country state string, e.g. US:GA.
|
11550 |
+
* @return {string} Country string.
|
11551 |
+
*/
|
11552 |
+
|
11553 |
+
function getCountryCode(countryState) {
|
11554 |
+
if (!countryState) {
|
11555 |
+
return null;
|
11556 |
+
}
|
11557 |
+
|
11558 |
+
return countryState.split(':')[0];
|
11559 |
+
}
|
11560 |
+
function getCurrencyRegion(countryState) {
|
11561 |
+
let region = getCountryCode(countryState);
|
11562 |
+
const euCountries = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["without"])(Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__[/* getSetting */ "f"])('onboarding', {
|
11563 |
+
euCountries: []
|
11564 |
+
}).euCountries, 'GB');
|
11565 |
+
|
11566 |
+
if (euCountries.includes(region)) {
|
11567 |
+
region = 'EU';
|
11568 |
+
}
|
11569 |
+
|
11570 |
+
return region;
|
11571 |
+
}
|
11572 |
+
/**
|
11573 |
+
* Gets the product IDs for items based on the product types and theme selected in the onboarding profiler.
|
11574 |
+
*
|
11575 |
+
* @param {Object} profileItems Onboarding profile.
|
11576 |
+
* @param {boolean} includeInstalledItems Include installed items in returned product IDs.
|
11577 |
+
* @param {Array} installedPlugins Installed plugins.
|
11578 |
+
* @return {Array} Product Ids.
|
11579 |
+
*/
|
11580 |
+
|
11581 |
+
function getProductIdsForCart(profileItems, includeInstalledItems = false, installedPlugins) {
|
11582 |
+
const productList = getProductList(profileItems, includeInstalledItems, installedPlugins);
|
11583 |
+
const productIds = productList.map(product => product.id || product.product);
|
11584 |
+
return productIds;
|
11585 |
+
}
|
11586 |
+
/**
|
11587 |
+
* Gets the labeled/categorized product names and types for items based on the product types and theme selected in the onboarding profiler.
|
11588 |
+
*
|
11589 |
+
* @param {Object} profileItems Onboarding profile.
|
11590 |
+
* @param {Array} installedPlugins Installed plugins.
|
11591 |
+
* @return {Array} Objects with labeled/categorized product names and types.
|
11592 |
+
*/
|
11593 |
+
|
11594 |
+
function getCategorizedOnboardingProducts(profileItems, installedPlugins) {
|
11595 |
+
const productList = {};
|
11596 |
+
productList.products = getProductList(profileItems, true, installedPlugins);
|
11597 |
+
productList.remainingProducts = getProductList(profileItems, false, installedPlugins);
|
11598 |
+
const uniqueItemsList = [...new Set([...productList.products, ...productList.remainingProducts])];
|
11599 |
+
productList.uniqueItemsList = uniqueItemsList.map(product => {
|
11600 |
+
let cleanedProduct;
|
11601 |
+
|
11602 |
+
if (product.label) {
|
11603 |
+
cleanedProduct = {
|
11604 |
+
type: 'extension',
|
11605 |
+
name: product.label
|
11606 |
+
};
|
11607 |
+
} else {
|
11608 |
+
cleanedProduct = {
|
11609 |
+
type: 'theme',
|
11610 |
+
name: product.title
|
11611 |
+
};
|
11612 |
+
}
|
11613 |
+
|
11614 |
+
return cleanedProduct;
|
11615 |
+
});
|
11616 |
+
return productList;
|
11617 |
+
}
|
11618 |
+
/**
|
11619 |
+
* Gets a product list for items based on the product types and theme selected in the onboarding profiler.
|
11620 |
+
*
|
11621 |
+
* @param {Object} profileItems Onboarding profile.
|
11622 |
+
* @param {boolean} includeInstalledItems Include installed items in returned product list.
|
11623 |
+
* @param {Array} installedPlugins Installed plugins.
|
11624 |
+
* @return {Array} Products.
|
11625 |
+
*/
|
11626 |
+
|
11627 |
+
function getProductList(profileItems, includeInstalledItems = false, installedPlugins) {
|
11628 |
+
const onboarding = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__[/* getSetting */ "f"])('onboarding', {});
|
11629 |
+
const productList = []; // The population of onboarding.productTypes only happens if the task list should be shown
|
11630 |
+
// so bail early if it isn't present.
|
11631 |
+
|
11632 |
+
if (!onboarding.productTypes) {
|
11633 |
+
return productList;
|
11634 |
+
}
|
11635 |
+
|
11636 |
+
const productTypes = profileItems.product_types || [];
|
11637 |
+
productTypes.forEach(productType => {
|
11638 |
+
if (onboarding.productTypes[productType] && onboarding.productTypes[productType].product && (includeInstalledItems || !installedPlugins.includes(onboarding.productTypes[productType].slug))) {
|
11639 |
+
productList.push(onboarding.productTypes[productType]);
|
11640 |
+
}
|
11641 |
+
});
|
11642 |
+
const theme = onboarding.themes.find(themeData => themeData.slug === profileItems.theme);
|
11643 |
+
|
11644 |
+
if (theme && theme.id && getPriceValue(theme.price) > 0 && (includeInstalledItems || !theme.is_installed)) {
|
11645 |
+
productList.push(theme);
|
11646 |
+
}
|
11647 |
+
|
11648 |
+
return productList;
|
11649 |
+
}
|
11650 |
+
/**
|
11651 |
+
* Get the value of a price from a string, removing any non-numeric characters.
|
11652 |
+
*
|
11653 |
+
* @param {string} string Price string.
|
11654 |
+
* @return {number} Number value.
|
11655 |
+
*/
|
11656 |
+
|
11657 |
+
function getPriceValue(string) {
|
11658 |
+
return Number(Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_0__["decodeEntities"])(string).replace(/[^0-9.-]+/g, ''));
|
11659 |
+
}
|
11660 |
+
/**
|
11661 |
+
* Determines if a URL is a WC admin url.
|
11662 |
+
*
|
11663 |
+
* @param {*} url - the url to test
|
11664 |
+
* @return {boolean} true if the url is a wc-admin URL
|
11665 |
+
*/
|
11666 |
+
|
11667 |
+
function isWCAdmin(url) {
|
11668 |
+
return /admin.php\?page=wc-admin/.test(url);
|
11669 |
+
}
|
11670 |
+
|
11671 |
+
/***/ }),
|
11672 |
+
|
11673 |
+
/***/ 6:
|
11674 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11675 |
+
|
11676 |
+
/*!
|
11677 |
+
Copyright (c) 2018 Jed Watson.
|
11678 |
+
Licensed under the MIT License (MIT), see
|
11679 |
+
http://jedwatson.github.io/classnames
|
11680 |
+
*/
|
11681 |
+
/* global define */
|
11682 |
+
|
11683 |
+
(function () {
|
11684 |
+
'use strict';
|
11685 |
+
|
11686 |
+
var hasOwn = {}.hasOwnProperty;
|
11687 |
+
|
11688 |
+
function classNames() {
|
11689 |
+
var classes = [];
|
11690 |
+
|
11691 |
+
for (var i = 0; i < arguments.length; i++) {
|
11692 |
+
var arg = arguments[i];
|
11693 |
+
if (!arg) continue;
|
11694 |
+
|
11695 |
+
var argType = typeof arg;
|
11696 |
+
|
11697 |
+
if (argType === 'string' || argType === 'number') {
|
11698 |
+
classes.push(arg);
|
11699 |
+
} else if (Array.isArray(arg)) {
|
11700 |
+
if (arg.length) {
|
11701 |
+
var inner = classNames.apply(null, arg);
|
11702 |
+
if (inner) {
|
11703 |
+
classes.push(inner);
|
11704 |
+
}
|
11705 |
+
}
|
11706 |
+
} else if (argType === 'object') {
|
11707 |
+
if (arg.toString === Object.prototype.toString) {
|
11708 |
+
for (var key in arg) {
|
11709 |
+
if (hasOwn.call(arg, key) && arg[key]) {
|
11710 |
+
classes.push(key);
|
11711 |
+
}
|
11712 |
+
}
|
11713 |
+
} else {
|
11714 |
+
classes.push(arg.toString());
|
11715 |
+
}
|
11716 |
+
}
|
11717 |
+
}
|
11718 |
+
|
11719 |
+
return classes.join(' ');
|
11720 |
+
}
|
11721 |
|
11722 |
+
if ( true && module.exports) {
|
11723 |
+
classNames.default = classNames;
|
11724 |
+
module.exports = classNames;
|
11725 |
+
} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
|
11726 |
+
// register as 'classnames', consistent with npm package name
|
11727 |
+
define('classnames', [], function () {
|
11728 |
+
return classNames;
|
11729 |
+
});
|
11730 |
+
} else {
|
11731 |
+
window.classNames = classNames;
|
11732 |
+
}
|
11733 |
+
}());
|
11734 |
|
|
|
11735 |
|
11736 |
/***/ }),
|
11737 |
|
11738 |
+
/***/ 65:
|
11739 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11740 |
|
11741 |
"use strict";
|
11742 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getUnreadOrders; });
|
11743 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getOrderStatuses; });
|
11744 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getLowStockCountQuery; });
|
11745 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getLowStockCount; });
|
11746 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
11747 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_0__);
|
11748 |
+
/* harmony import */ var _analytics_settings_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(254);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11749 |
/**
|
11750 |
+
* External dependencies
|
|
|
|
|
|
|
11751 |
*/
|
11752 |
|
11753 |
+
/**
|
11754 |
+
* Internal dependencies
|
11755 |
+
*/
|
11756 |
|
11757 |
|
11758 |
+
function getUnreadOrders(select, orderStatuses) {
|
11759 |
+
const {
|
11760 |
+
getItemsTotalCount,
|
11761 |
+
getItemsError,
|
11762 |
+
isResolving
|
11763 |
+
} = select(_woocommerce_data__WEBPACK_IMPORTED_MODULE_0__["ITEMS_STORE_NAME"]);
|
11764 |
|
11765 |
+
if (!orderStatuses.length) {
|
11766 |
+
return 0;
|
11767 |
+
}
|
11768 |
|
11769 |
+
const ordersQuery = {
|
11770 |
+
page: 1,
|
11771 |
+
per_page: 1,
|
11772 |
+
// Core endpoint requires per_page > 0.
|
11773 |
+
status: orderStatuses,
|
11774 |
+
_fields: ['id']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11775 |
};
|
11776 |
+
const defaultValue = null; // Disable eslint rule requiring `totalOrders` to be defined below because the next two statements
|
11777 |
+
// depend on `getItemsTotalCount` to have been called.
|
11778 |
+
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11779 |
|
11780 |
+
const totalOrders = getItemsTotalCount('orders', ordersQuery, defaultValue);
|
11781 |
+
const isError = Boolean(getItemsError('orders', ordersQuery));
|
11782 |
+
const isRequesting = isResolving('getItemsTotalCount', ['orders', ordersQuery, defaultValue]);
|
11783 |
|
11784 |
+
if (isError || isRequesting) {
|
11785 |
+
return null;
|
11786 |
+
}
|
11787 |
|
11788 |
+
return totalOrders;
|
11789 |
+
}
|
11790 |
+
function getOrderStatuses(select) {
|
11791 |
+
const {
|
11792 |
+
getSetting: getMutableSetting
|
11793 |
+
} = select(_woocommerce_data__WEBPACK_IMPORTED_MODULE_0__["SETTINGS_STORE_NAME"]);
|
11794 |
+
const {
|
11795 |
+
woocommerce_actionable_order_statuses: orderStatuses = _analytics_settings_config__WEBPACK_IMPORTED_MODULE_1__[/* DEFAULT_ACTIONABLE_STATUSES */ "a"]
|
11796 |
+
} = getMutableSetting('wc_admin', 'wcAdminSettings', {});
|
11797 |
+
return orderStatuses;
|
11798 |
+
}
|
11799 |
+
const getLowStockCountQuery = {
|
11800 |
+
page: 1,
|
11801 |
+
per_page: 1,
|
11802 |
+
low_in_stock: true,
|
11803 |
+
status: 'publish',
|
11804 |
+
_fields: ['id']
|
11805 |
};
|
11806 |
+
function getLowStockCount(select) {
|
11807 |
+
const {
|
11808 |
+
getItemsTotalCount,
|
11809 |
+
getItemsError,
|
11810 |
+
isResolving
|
11811 |
+
} = select(_woocommerce_data__WEBPACK_IMPORTED_MODULE_0__["ITEMS_STORE_NAME"]);
|
11812 |
+
const defaultValue = null; // Disable eslint rule requiring `totalLowStockProducts` to be defined below because the next two statements
|
11813 |
+
// depend on `getItemsTotalCount` to have been called.
|
11814 |
+
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
|
11815 |
|
11816 |
+
const totalLowStockProducts = getItemsTotalCount('products/low-in-stock', getLowStockCountQuery, defaultValue);
|
11817 |
+
const isError = Boolean(getItemsError('products/low-in-stock', getLowStockCountQuery));
|
11818 |
+
const isRequesting = isResolving('getItemsTotalCount', ['products/low-in-stock', getLowStockCountQuery, defaultValue]);
|
11819 |
|
11820 |
+
if (isError || isRequesting && totalLowStockProducts === defaultValue) {
|
11821 |
+
return null;
|
11822 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11823 |
|
11824 |
+
return totalLowStockProducts;
|
11825 |
+
}
|
11826 |
|
11827 |
/***/ }),
|
11828 |
|
11829 |
+
/***/ 67:
|
11830 |
/***/ (function(module, exports, __webpack_require__) {
|
11831 |
|
11832 |
"use strict";
|
11833 |
|
11834 |
|
11835 |
+
var utils = __webpack_require__(48);
|
11836 |
var formats = __webpack_require__(39);
|
11837 |
var has = Object.prototype.hasOwnProperty;
|
11838 |
|
12112 |
|
12113 |
/***/ }),
|
12114 |
|
12115 |
+
/***/ 68:
|
12116 |
/***/ (function(module, exports, __webpack_require__) {
|
12117 |
|
12118 |
"use strict";
|
12119 |
|
12120 |
|
12121 |
+
var utils = __webpack_require__(48);
|
12122 |
|
12123 |
var has = Object.prototype.hasOwnProperty;
|
12124 |
var isArray = Array.isArray;
|
12375 |
};
|
12376 |
|
12377 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12378 |
/***/ }),
|
12379 |
|
12380 |
/***/ 69:
|
12381 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12382 |
|
12383 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12384 |
/**
|
12385 |
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12386 |
*
|
12387 |
+
* This source code is licensed under the MIT license found in the
|
12388 |
+
* LICENSE file in the root directory of this source tree.
|
12389 |
*/
|
12390 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12391 |
|
|
|
|
|
|
|
12392 |
|
12393 |
+
var React = __webpack_require__(5);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12394 |
|
12395 |
+
var REACT_ELEMENT_TYPE =
|
12396 |
+
(typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) ||
|
12397 |
+
0xeac7;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12398 |
|
12399 |
+
var emptyFunction = __webpack_require__(49);
|
12400 |
+
var invariant = __webpack_require__(70);
|
12401 |
+
var warning = __webpack_require__(71);
|
|
|
|
|
|
|
|
|
12402 |
|
12403 |
+
var SEPARATOR = '.';
|
12404 |
+
var SUBSEPARATOR = ':';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12405 |
|
12406 |
+
var didWarnAboutMaps = false;
|
12407 |
+
|
12408 |
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
12409 |
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
12410 |
+
|
12411 |
+
function getIteratorFn(maybeIterable) {
|
12412 |
+
var iteratorFn =
|
12413 |
+
maybeIterable &&
|
12414 |
+
((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) ||
|
12415 |
+
maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
12416 |
+
if (typeof iteratorFn === 'function') {
|
12417 |
+
return iteratorFn;
|
12418 |
+
}
|
12419 |
+
}
|
12420 |
+
|
12421 |
+
function escape(key) {
|
12422 |
+
var escapeRegex = /[=:]/g;
|
12423 |
+
var escaperLookup = {
|
12424 |
+
'=': '=0',
|
12425 |
+
':': '=2'
|
12426 |
+
};
|
12427 |
+
var escapedString = ('' + key).replace(escapeRegex, function(match) {
|
12428 |
+
return escaperLookup[match];
|
12429 |
});
|
12430 |
+
|
12431 |
+
return '$' + escapedString;
|
12432 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12433 |
|
12434 |
+
function getComponentKey(component, index) {
|
12435 |
+
// Do some typechecking here since we call this blindly. We want to ensure
|
12436 |
+
// that we don't block potential future ES APIs.
|
12437 |
+
if (component && typeof component === 'object' && component.key != null) {
|
12438 |
+
// Explicit key
|
12439 |
+
return escape(component.key);
|
12440 |
+
}
|
12441 |
+
// Implicit key determined by the index in the set
|
12442 |
+
return index.toString(36);
|
12443 |
+
}
|
12444 |
|
12445 |
+
function traverseAllChildrenImpl(
|
12446 |
+
children,
|
12447 |
+
nameSoFar,
|
12448 |
+
callback,
|
12449 |
+
traverseContext
|
12450 |
+
) {
|
12451 |
+
var type = typeof children;
|
12452 |
+
|
12453 |
+
if (type === 'undefined' || type === 'boolean') {
|
12454 |
+
// All of the above are perceived as null.
|
12455 |
+
children = null;
|
12456 |
}
|
12457 |
|
12458 |
+
if (
|
12459 |
+
children === null ||
|
12460 |
+
type === 'string' ||
|
12461 |
+
type === 'number' ||
|
12462 |
+
// The following is inlined from ReactElement. This means we can optimize
|
12463 |
+
// some checks. React Fiber also inlines this logic for similar purposes.
|
12464 |
+
(type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE)
|
12465 |
+
) {
|
12466 |
+
callback(
|
12467 |
+
traverseContext,
|
12468 |
+
children,
|
12469 |
+
// If it's the only child, treat the name as if it was wrapped in an array
|
12470 |
+
// so that it's consistent if the number of children grows.
|
12471 |
+
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar
|
12472 |
+
);
|
12473 |
+
return 1;
|
12474 |
+
}
|
12475 |
+
|
12476 |
+
var child;
|
12477 |
+
var nextName;
|
12478 |
+
var subtreeCount = 0; // Count of children found in the current subtree.
|
12479 |
+
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
12480 |
|
12481 |
+
if (Array.isArray(children)) {
|
12482 |
+
for (var i = 0; i < children.length; i++) {
|
12483 |
+
child = children[i];
|
12484 |
+
nextName = nextNamePrefix + getComponentKey(child, i);
|
12485 |
+
subtreeCount += traverseAllChildrenImpl(
|
12486 |
+
child,
|
12487 |
+
nextName,
|
12488 |
+
callback,
|
12489 |
+
traverseContext
|
12490 |
+
);
|
12491 |
+
}
|
12492 |
+
} else {
|
12493 |
+
var iteratorFn = getIteratorFn(children);
|
12494 |
+
if (iteratorFn) {
|
12495 |
+
if (false) {}
|
12496 |
+
|
12497 |
+
var iterator = iteratorFn.call(children);
|
12498 |
+
var step;
|
12499 |
+
var ii = 0;
|
12500 |
+
while (!(step = iterator.next()).done) {
|
12501 |
+
child = step.value;
|
12502 |
+
nextName = nextNamePrefix + getComponentKey(child, ii++);
|
12503 |
+
subtreeCount += traverseAllChildrenImpl(
|
12504 |
+
child,
|
12505 |
+
nextName,
|
12506 |
+
callback,
|
12507 |
+
traverseContext
|
12508 |
+
);
|
12509 |
+
}
|
12510 |
+
} else if (type === 'object') {
|
12511 |
+
var addendum = '';
|
12512 |
+
if (false) {}
|
12513 |
+
var childrenString = '' + children;
|
12514 |
+
invariant(
|
12515 |
+
false,
|
12516 |
+
'Objects are not valid as a React child (found: %s).%s',
|
12517 |
+
childrenString === '[object Object]'
|
12518 |
+
? 'object with keys {' + Object.keys(children).join(', ') + '}'
|
12519 |
+
: childrenString,
|
12520 |
+
addendum
|
12521 |
+
);
|
12522 |
+
}
|
12523 |
}
|
12524 |
|
12525 |
+
return subtreeCount;
|
12526 |
+
}
|
12527 |
+
|
12528 |
+
function traverseAllChildren(children, callback, traverseContext) {
|
12529 |
+
if (children == null) {
|
12530 |
+
return 0;
|
12531 |
}
|
12532 |
|
12533 |
+
return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
12534 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
12535 |
|
12536 |
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
12537 |
+
function escapeUserProvidedKey(text) {
|
12538 |
+
return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
|
12539 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
12540 |
|
12541 |
+
function cloneAndReplaceKey(oldElement, newKey) {
|
12542 |
+
return React.cloneElement(
|
12543 |
+
oldElement,
|
12544 |
+
{key: newKey},
|
12545 |
+
oldElement.props !== undefined ? oldElement.props.children : undefined
|
12546 |
+
);
|
12547 |
}
|
12548 |
|
12549 |
+
var DEFAULT_POOL_SIZE = 10;
|
12550 |
+
var DEFAULT_POOLER = oneArgumentPooler;
|
12551 |
|
12552 |
+
var oneArgumentPooler = function(copyFieldsFrom) {
|
12553 |
+
var Klass = this;
|
12554 |
+
if (Klass.instancePool.length) {
|
12555 |
+
var instance = Klass.instancePool.pop();
|
12556 |
+
Klass.call(instance, copyFieldsFrom);
|
12557 |
+
return instance;
|
12558 |
+
} else {
|
12559 |
+
return new Klass(copyFieldsFrom);
|
12560 |
+
}
|
12561 |
+
};
|
12562 |
|
12563 |
+
var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {
|
12564 |
+
// Casting as any so that flow ignores the actual implementation and trusts
|
12565 |
+
// it to match the type we declared
|
12566 |
+
var NewKlass = CopyConstructor;
|
12567 |
+
NewKlass.instancePool = [];
|
12568 |
+
NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
12569 |
+
if (!NewKlass.poolSize) {
|
12570 |
+
NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
12571 |
+
}
|
12572 |
+
NewKlass.release = standardReleaser;
|
12573 |
+
return NewKlass;
|
12574 |
+
};
|
12575 |
|
12576 |
+
var standardReleaser = function standardReleaser(instance) {
|
12577 |
+
var Klass = this;
|
12578 |
+
invariant(
|
12579 |
+
instance instanceof Klass,
|
12580 |
+
'Trying to release an instance into a pool of a different type.'
|
12581 |
+
);
|
12582 |
+
instance.destructor();
|
12583 |
+
if (Klass.instancePool.length < Klass.poolSize) {
|
12584 |
+
Klass.instancePool.push(instance);
|
12585 |
+
}
|
12586 |
+
};
|
12587 |
|
12588 |
+
var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) {
|
12589 |
+
var Klass = this;
|
12590 |
+
if (Klass.instancePool.length) {
|
12591 |
+
var instance = Klass.instancePool.pop();
|
12592 |
+
Klass.call(instance, a1, a2, a3, a4);
|
12593 |
+
return instance;
|
12594 |
+
} else {
|
12595 |
+
return new Klass(a1, a2, a3, a4);
|
12596 |
+
}
|
12597 |
+
};
|
12598 |
|
12599 |
+
function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
|
12600 |
+
this.result = mapResult;
|
12601 |
+
this.keyPrefix = keyPrefix;
|
12602 |
+
this.func = mapFunction;
|
12603 |
+
this.context = mapContext;
|
12604 |
+
this.count = 0;
|
12605 |
+
}
|
12606 |
+
MapBookKeeping.prototype.destructor = function() {
|
12607 |
+
this.result = null;
|
12608 |
+
this.keyPrefix = null;
|
12609 |
+
this.func = null;
|
12610 |
+
this.context = null;
|
12611 |
+
this.count = 0;
|
12612 |
+
};
|
12613 |
+
addPoolingTo(MapBookKeeping, fourArgumentPooler);
|
12614 |
+
|
12615 |
+
function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
12616 |
+
var result = bookKeeping.result;
|
12617 |
+
var keyPrefix = bookKeeping.keyPrefix;
|
12618 |
+
var func = bookKeeping.func;
|
12619 |
+
var context = bookKeeping.context;
|
12620 |
+
|
12621 |
+
var mappedChild = func.call(context, child, bookKeeping.count++);
|
12622 |
+
if (Array.isArray(mappedChild)) {
|
12623 |
+
mapIntoWithKeyPrefixInternal(
|
12624 |
+
mappedChild,
|
12625 |
+
result,
|
12626 |
+
childKey,
|
12627 |
+
emptyFunction.thatReturnsArgument
|
12628 |
+
);
|
12629 |
+
} else if (mappedChild != null) {
|
12630 |
+
if (React.isValidElement(mappedChild)) {
|
12631 |
+
mappedChild = cloneAndReplaceKey(
|
12632 |
+
mappedChild,
|
12633 |
+
// Keep both the (mapped) and old keys if they differ, just as
|
12634 |
+
// traverseAllChildren used to do for objects as children
|
12635 |
+
keyPrefix +
|
12636 |
+
(mappedChild.key && (!child || child.key !== mappedChild.key)
|
12637 |
+
? escapeUserProvidedKey(mappedChild.key) + '/'
|
12638 |
+
: '') +
|
12639 |
+
childKey
|
12640 |
+
);
|
12641 |
+
}
|
12642 |
+
result.push(mappedChild);
|
12643 |
+
}
|
12644 |
+
}
|
12645 |
+
|
12646 |
+
function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
12647 |
+
var escapedPrefix = '';
|
12648 |
+
if (prefix != null) {
|
12649 |
+
escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
12650 |
+
}
|
12651 |
+
var traverseContext = MapBookKeeping.getPooled(
|
12652 |
+
array,
|
12653 |
+
escapedPrefix,
|
12654 |
+
func,
|
12655 |
+
context
|
12656 |
+
);
|
12657 |
+
traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
12658 |
+
MapBookKeeping.release(traverseContext);
|
12659 |
+
}
|
12660 |
+
|
12661 |
+
var numericPropertyRegex = /^\d+$/;
|
12662 |
+
|
12663 |
+
var warnedAboutNumeric = false;
|
12664 |
+
|
12665 |
+
function createReactFragment(object) {
|
12666 |
+
if (typeof object !== 'object' || !object || Array.isArray(object)) {
|
12667 |
+
warning(
|
12668 |
+
false,
|
12669 |
+
'React.addons.createFragment only accepts a single object. Got: %s',
|
12670 |
+
object
|
12671 |
+
);
|
12672 |
+
return object;
|
12673 |
+
}
|
12674 |
+
if (React.isValidElement(object)) {
|
12675 |
+
warning(
|
12676 |
+
false,
|
12677 |
+
'React.addons.createFragment does not accept a ReactElement ' +
|
12678 |
+
'without a wrapper object.'
|
12679 |
+
);
|
12680 |
+
return object;
|
12681 |
+
}
|
12682 |
|
12683 |
+
invariant(
|
12684 |
+
object.nodeType !== 1,
|
12685 |
+
'React.addons.createFragment(...): Encountered an invalid child; DOM ' +
|
12686 |
+
'elements are not valid children of React components.'
|
12687 |
+
);
|
12688 |
|
12689 |
+
var result = [];
|
12690 |
|
12691 |
+
for (var key in object) {
|
12692 |
+
if (false) {}
|
12693 |
+
mapIntoWithKeyPrefixInternal(
|
12694 |
+
object[key],
|
12695 |
+
result,
|
12696 |
+
key,
|
12697 |
+
emptyFunction.thatReturnsArgument
|
12698 |
+
);
|
12699 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12700 |
|
12701 |
+
return result;
|
12702 |
+
}
|
12703 |
|
12704 |
+
module.exports = createReactFragment;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12705 |
|
12706 |
|
12707 |
/***/ }),
|
12708 |
|
12709 |
+
/***/ 7:
|
12710 |
+
/***/ (function(module, exports) {
|
12711 |
+
|
12712 |
+
(function() { module.exports = window["wp"]["data"]; }());
|
12713 |
+
|
12714 |
+
/***/ }),
|
12715 |
+
|
12716 |
+
/***/ 70:
|
12717 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12718 |
|
12719 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12720 |
/**
|
12721 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
12722 |
+
*
|
12723 |
+
* This source code is licensed under the MIT license found in the
|
12724 |
+
* LICENSE file in the root directory of this source tree.
|
12725 |
+
*
|
12726 |
*/
|
12727 |
|
12728 |
+
|
12729 |
+
|
12730 |
/**
|
12731 |
+
* Use invariant() to assert state which your program assumes to be true.
|
12732 |
+
*
|
12733 |
+
* Provide sprintf-style format (only %s is supported) and arguments
|
12734 |
+
* to provide information about what broke and what you were
|
12735 |
+
* expecting.
|
12736 |
+
*
|
12737 |
+
* The invariant message will be stripped in production, but the invariant
|
12738 |
+
* will remain to ensure logic does not differ in production.
|
12739 |
*/
|
12740 |
|
12741 |
+
var validateFormat = function validateFormat(format) {};
|
12742 |
|
12743 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
|
|
12744 |
|
12745 |
+
function invariant(condition, format, a, b, c, d, e, f) {
|
12746 |
+
validateFormat(format);
|
12747 |
+
|
12748 |
+
if (!condition) {
|
12749 |
+
var error;
|
12750 |
+
if (format === undefined) {
|
12751 |
+
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
12752 |
+
} else {
|
12753 |
+
var args = [a, b, c, d, e, f];
|
12754 |
+
var argIndex = 0;
|
12755 |
+
error = new Error(format.replace(/%s/g, function () {
|
12756 |
+
return args[argIndex++];
|
12757 |
+
}));
|
12758 |
+
error.name = 'Invariant Violation';
|
12759 |
+
}
|
12760 |
+
|
12761 |
+
error.framesToPop = 1; // we don't care about invariant's own frame
|
12762 |
+
throw error;
|
12763 |
}
|
12764 |
+
}
|
12765 |
|
12766 |
+
module.exports = invariant;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12767 |
|
12768 |
+
/***/ }),
|
|
|
|
|
12769 |
|
12770 |
+
/***/ 71:
|
12771 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
12772 |
|
12773 |
+
"use strict";
|
12774 |
+
/**
|
12775 |
+
* Copyright (c) 2014-present, Facebook, Inc.
|
12776 |
+
*
|
12777 |
+
* This source code is licensed under the MIT license found in the
|
12778 |
+
* LICENSE file in the root directory of this source tree.
|
12779 |
+
*
|
12780 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12781 |
|
|
|
|
|
|
|
12782 |
|
|
|
|
|
|
|
12783 |
|
12784 |
+
var emptyFunction = __webpack_require__(49);
|
12785 |
+
|
12786 |
+
/**
|
12787 |
+
* Similar to invariant but only logs a warning if the condition is not met.
|
12788 |
+
* This can be used to log issues in development environments in critical
|
12789 |
+
* paths. Removing the logging code for production environments will keep the
|
12790 |
+
* same logic and follow the same code paths.
|
12791 |
+
*/
|
12792 |
+
|
12793 |
+
var warning = emptyFunction;
|
12794 |
+
|
12795 |
+
if (false) { var printWarning; }
|
12796 |
+
|
12797 |
+
module.exports = warning;
|
12798 |
|
12799 |
/***/ }),
|
12800 |
|
12801 |
+
/***/ 72:
|
12802 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12803 |
|
12804 |
+
"use strict";
|
12805 |
+
|
12806 |
+
|
12807 |
+
function identifyToken(item) {
|
12808 |
+
// {{/example}}
|
12809 |
+
if (item.match(/^\{\{\//)) {
|
12810 |
+
return {
|
12811 |
+
type: 'componentClose',
|
12812 |
+
value: item.replace(/\W/g, '')
|
12813 |
+
};
|
12814 |
+
}
|
12815 |
+
// {{example /}}
|
12816 |
+
if (item.match(/\/\}\}$/)) {
|
12817 |
+
return {
|
12818 |
+
type: 'componentSelfClosing',
|
12819 |
+
value: item.replace(/\W/g, '')
|
12820 |
+
};
|
12821 |
+
}
|
12822 |
+
// {{example}}
|
12823 |
+
if (item.match(/^\{\{/)) {
|
12824 |
+
return {
|
12825 |
+
type: 'componentOpen',
|
12826 |
+
value: item.replace(/\W/g, '')
|
12827 |
+
};
|
12828 |
+
}
|
12829 |
+
return {
|
12830 |
+
type: 'string',
|
12831 |
+
value: item
|
12832 |
+
};
|
12833 |
+
}
|
12834 |
+
|
12835 |
+
module.exports = function (mixedString) {
|
12836 |
+
var tokenStrings = mixedString.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g); // split to components and strings
|
12837 |
+
return tokenStrings.map(identifyToken);
|
12838 |
+
};
|
12839 |
+
//# sourceMappingURL=tokenize.js.map
|
12840 |
|
12841 |
/***/ }),
|
12842 |
|
12843 |
+
/***/ 78:
|
12844 |
/***/ (function(module, exports) {
|
12845 |
|
12846 |
var g;
|
12867 |
|
12868 |
/***/ }),
|
12869 |
|
12870 |
+
/***/ 8:
|
12871 |
/***/ (function(module, exports) {
|
12872 |
|
12873 |
(function() { module.exports = window["wp"]["primitives"]; }());
|
12874 |
|
12875 |
/***/ }),
|
12876 |
|
12877 |
+
/***/ 88:
|
12878 |
/***/ (function(module, exports) {
|
12879 |
|
12880 |
(function() { module.exports = window["wc"]["currency"]; }());
|
12881 |
|
12882 |
/***/ }),
|
12883 |
|
12884 |
+
/***/ 9:
|
12885 |
+
/***/ (function(module, exports) {
|
12886 |
+
|
12887 |
+
(function() { module.exports = window["moment"]; }());
|
12888 |
+
|
12889 |
+
/***/ }),
|
12890 |
+
|
12891 |
+
/***/ 90:
|
12892 |
/***/ (function(module, exports) {
|
12893 |
|
12894 |
(function() { module.exports = window["wp"]["dom"]; }());
|
dist/app/index.min.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-components', 'wc-csv', 'wc-currency', 'wc-customer-effort-score', 'wc-date', 'wc-experimental', 'wc-explat', 'wc-navigation', 'wc-notices', 'wc-number', 'wc-
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-components', 'wc-csv', 'wc-currency', 'wc-customer-effort-score', 'wc-date', 'wc-experimental', 'wc-explat', 'wc-navigation', 'wc-notices', 'wc-number', 'wc-store-data', 'wc-tracks', 'wp-a11y', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-url', 'wp-warning'), 'version' => '9789c5d51f392b0d1bcb4d9371691c8c');
|
dist/app/index.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/*! For license information please see index.min.js.LICENSE.txt */
|
2 |
-
this.wc=this.wc||{},this.wc.app=function(e){function t(t){for(var n,o,i=t[0],a=t[1],c=0,s=[];c<i.length;c++)o=i[c],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&s.push(r[o][0]),r[o]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(u&&u(t);s.length;)s.shift()()}var n={},o={18:0},r={18:0};function i(e){var t=function(e){return a.p+"chunks/"+({4:"activity-panels-help",5:"activity-panels-inbox",6:"analytics-report",7:"analytics-report-categories",8:"analytics-report-coupons",9:"analytics-report-customers",10:"analytics-report-downloads",11:"analytics-report-orders",12:"analytics-report-products",13:"analytics-report-revenue",14:"analytics-report-stock",15:"analytics-report-taxes",16:"analytics-report-variations",17:"analytics-settings",24:"customizable-dashboard",25:"dashboard",26:"dashboard-charts",31:"homescreen",32:"leaderboards",34:"marketing-overview",45:"payment-recommendations",47:"profile-wizard",48:"shipping-recommendations",49:"store-alerts",50:"store-performance",52:"two-column-tasks",53:"two-column-tasks-extended",54:"wcpay-payment-welcome-page",55:"wcpay-usage-modal"}[e]||e)+".min.js"}(e);return window.wcAdminAssets&&window.wcAdminAssets.version&&(t+="?ver="+window.wcAdminAssets.version),t}function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{0:1,3:1,4:1,5:1,6:1,7:1,9:1,12:1,14:1,17:1,25:1,26:1,31:1,32:1,34:1,45:1,47:1,48:1,49:1,50:1,52:1,54:1}[e]&&t.push(o[e]=new Promise((function(t,n){for(var r="chunks/"+e+".style.css",i=a.p+r,c=document.getElementsByTagName("link"),s=0;s<c.length;s++){var l=(d=c[s]).getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(l===r||l===i))return t()}var u=document.getElementsByTagName("style");for(s=0;s<u.length;s++){var d;if((l=(d=u[s]).getAttribute("data-href"))===r||l===i)return t()}var m=document.createElement("link");m.rel="stylesheet",m.type="text/css",m.setAttribute("data-webpack",!0),m.onload=t,m.onerror=function(t){var r=t&&t.target&&t.target.src||i,a=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=r,delete o[e],m.parentNode.removeChild(m),n(a)},m.href=i,window.wcAdminAssets&&window.wcAdminAssets.version&&(m.href+="?ver="+window.wcAdminAssets.version),document.getElementsByTagName("head")[0].appendChild(m)})).then((function(){o[e]=0})));var n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var s,l=document.createElement("script");l.charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.src=i(e);var u=new Error;s=function(t){l.onerror=l.onload=null,clearTimeout(d);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",u.name="ChunkLoadError",u.type=o,u.request=i,n[1](u)}r[e]=void 0}};var d=setTimeout((function(){s({type:"timeout",target:l})}),12e4);l.onerror=l.onload=s,document.head.appendChild(l)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(n,o,function(t){return e[t]}.bind(null,o));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var c=window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var u=s;return a(a.s=291)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t,n){e.exports=n(60)()},10:function(e,t){e.exports=window.wp.dataControls},104:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}));var o=n(12);const r=5,i={page:1,per_page:1,status:"hold",_embed:1,_fields:["id"]};function a(e){const{getReviewsTotalCount:t,getReviewsError:n,isResolving:r}=e(o.REVIEWS_STORE_NAME),a=t(i),c=Boolean(n(i)),s=r("getReviewsTotalCount",[i]);return c||s&&void 0===a?null:a}},105:function(e,t,n){"use strict";var o=n(0);t.a=function(e){let{icon:t,size:n=24,...r}=e;return Object(o.cloneElement)(t,{width:n,height:n,...r})}},106:function(e,t,n){"use strict";e.exports=n(131)},11:function(e,t){e.exports=window.moment},118:function(e,t,n){"use strict";var o=n(2),r=n(28),i=n(0),a=n(23);const c=Object(i.lazy)(()=>Promise.all([n.e(0),n.e(13)]).then(n.bind(null,505))),s=Object(i.lazy)(()=>Promise.all([n.e(0),n.e(12)]).then(n.bind(null,501))),l=Object(i.lazy)(()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,506))),u=Object(i.lazy)(()=>Promise.all([n.e(0),n.e(11)]).then(n.bind(null,507))),d=Object(i.lazy)(()=>Promise.all([n.e(0),n.e(7)]).then(n.bind(null,503))),m=Object(i.lazy)(()=>Promise.all([n.e(0),n.e(8)]).then(n.bind(null,508))),p=Object(i.lazy)(()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,509))),f=Object(i.lazy)(()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,510))),h=Object(i.lazy)(()=>n.e(14).then(n.bind(null,502))),b=Object(i.lazy)(()=>n.e(9).then(n.bind(null,504))),g=Object(a.d)("manageStock","no");t.a=()=>{const e=[{report:"revenue",title:Object(o.__)("Revenue","woocommerce-admin"),component:c,navArgs:{id:"woocommerce-analytics-revenue"}},{report:"products",title:Object(o.__)("Products","woocommerce-admin"),component:s,navArgs:{id:"woocommerce-analytics-products"}},{report:"variations",title:Object(o.__)("Variations","woocommerce-admin"),component:l,navArgs:{id:"woocommerce-analytics-variations"}},{report:"orders",title:Object(o.__)("Orders","woocommerce-admin"),component:u,navArgs:{id:"woocommerce-analytics-orders"}},{report:"categories",title:Object(o.__)("Categories","woocommerce-admin"),component:d,navArgs:{id:"woocommerce-analytics-categories"}},{report:"coupons",title:Object(o.__)("Coupons","woocommerce-admin"),component:m,navArgs:{id:"woocommerce-analytics-coupons"}},{report:"taxes",title:Object(o.__)("Taxes","woocommerce-admin"),component:p,navArgs:{id:"woocommerce-analytics-taxes"}},"yes"===g?{report:"stock",title:Object(o.__)("Stock","woocommerce-admin"),component:h,navArgs:{id:"woocommerce-analytics-stock"}}:null,{report:"customers",title:Object(o.__)("Customers","woocommerce-admin"),component:b},{report:"downloads",title:Object(o.__)("Downloads","woocommerce-admin"),component:f,navArgs:{id:"woocommerce-analytics-downloads"}}].filter(Boolean);return Object(r.applyFilters)("woocommerce_admin_reports_list",e)}},119:function(e,t,n){"use strict";n.d(t,"useTransition",(function(){return ye}));var o=n(3);n.d(t,"Globals",(function(){return o.b}));var r=n(6),i=n(33);n(174),n(175);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function c(e,...t){return o.s.fun(e)?e(...t):e}const s=(e,t)=>!0===e||!!(t&&e&&(o.s.fun(e)?e(t):Object(o.y)(e).includes(t))),l=(e,t)=>o.s.obj(e)?t&&e[t]:e,u=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,d=e=>e,m=(e,t=d)=>{let n=p;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const n=t(e[i],i);o.s.und(n)||(r[i]=n)}return r},p=["config","onProps","onStart","onChange","onPause","onResume","onRest"],f={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function h(e){const t=function(e){const t={};let n=0;if(Object(o.l)(e,(e,o)=>{f[o]||(t[o]=e,n++)}),n)return t}(e);if(t){const n={to:t};return Object(o.l)(e,(e,o)=>o in t||(n[o]=e)),n}return a({},e)}function b(e){return e=Object(o.q)(e),o.s.arr(e)?e.map(b):Object(o.t)(e)?o.b.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function g(e){for(const t in e)return!0;return!1}function w(e){return o.s.fun(e)||o.s.arr(e)&&o.s.obj(e[0])}function v(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function y(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const O=1.70158,j=1.525*O,_=2*Math.PI/3,E=2*Math.PI/4.5,k=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},C=a({},{tension:170,friction:26},{mass:1,damping:1,easing:{linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>2.70158*e*e*e-O*e*e,easeOutBack:e=>1+2.70158*Math.pow(e-1,3)+O*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-j)/2:(Math.pow(2*e-2,2)*((j+1)*(2*e-2)+j)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*_),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*_)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*E)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*E)/2+1,easeInBounce:e=>1-k(1-e),easeOutBounce:k,easeInOutBounce:e=>e<.5?(1-k(1-2*e))/2:(1+k(2*e-1))/2}.linear,clamp:!1});class S{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,C)}}function x(e,t){if(o.s.und(t.decay)){const n=!o.s.und(t.tension)||!o.s.und(t.friction);!n&&o.s.und(t.frequency)&&o.s.und(t.damping)&&o.s.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const T=[];class A{constructor(){this.changed=!1,this.values=T,this.toValues=null,this.fromValues=T,this.to=void 0,this.from=void 0,this.config=new S,this.immediate=!1}}function P(e,{key:t,props:n,defaultProps:r,state:i,actions:l}){return new Promise((u,d)=>{var m;let p,f,h=s(null!=(m=n.cancel)?m:null==r?void 0:r.cancel,t);if(h)w();else{o.s.und(n.pause)||(i.paused=s(n.pause,t));let e=null==r?void 0:r.pause;!0!==e&&(e=i.paused||s(e,t)),p=c(n.delay||0,t),e?(i.resumeQueue.add(g),l.pause()):(l.resume(),g())}function b(){i.resumeQueue.add(g),i.timeouts.delete(f),f.cancel(),p=f.time-o.w.now()}function g(){p>0&&!o.b.skipAnimation?(i.delayed=!0,f=o.w.setTimeout(w,p),i.pauseQueue.add(b),i.timeouts.add(f)):w()}function w(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(b),i.timeouts.delete(f),e<=(i.cancelId||0)&&(h=!0);try{l.start(a({},n,{callId:e,cancel:h}),u)}catch(e){d(e)}}})}const N=(e,t)=>1==t.length?t[0]:t.some(e=>e.cancelled)?I(e.get()):t.every(e=>e.noop)?M(e.get()):R(e.get(),t.every(e=>e.finished)),M=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),R=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),I=e=>({value:e,cancelled:!0,finished:!1});function L(e,t,n,r){const{callId:i,parentId:c,onRest:s}=t,{asyncTo:l,promise:u}=n;return c||e!==l||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const d=m(t,(e,t)=>"onRest"===t?void 0:e);let p,f;const h=new Promise((e,t)=>(p=e,f=t)),b=e=>{const t=i<=(n.cancelId||0)&&I(r)||i!==n.asyncId&&R(r,!1);if(t)throw e.result=t,f(e),e},g=(e,t)=>{const c=new D,s=new F;return(async()=>{if(o.b.skipAnimation)throw V(n),s.result=R(r,!1),f(s),s;b(c);const l=o.s.obj(e)?a({},e):a({},t,{to:e});l.parentId=i,Object(o.l)(d,(e,t)=>{o.s.und(l[t])&&(l[t]=e)});const u=await r.start(l);return b(c),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),u})()};let w;if(o.b.skipAnimation)return V(n),R(r,!1);try{let t;t=o.s.arr(e)?(async e=>{for(const t of e)await g(t)})(e):Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([t.then(p),h]),w=R(r.get(),!0,!1)}catch(e){if(e instanceof D)w=e.result;else{if(!(e instanceof F))throw e;w=e.result}}finally{i==n.asyncId&&(n.asyncId=c,n.asyncTo=c?l:void 0,n.promise=c?u:void 0)}return o.s.fun(s)&&o.w.batchedUpdates(()=>{s(w,r,r.item)}),w})():u}function V(e,t){Object(o.m)(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class D extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class F extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const B=e=>e instanceof z;let U=1;class z extends o.a{constructor(...e){super(...e),this.id=U++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Object(i.e)(this);return e&&e.getValue()}to(...e){return o.b.to(this,e)}interpolate(...e){return Object(o.j)(),o.b.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Object(o.d)(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||o.o.sort(this),Object(o.d)(this,{type:"priority",parent:this,priority:e})}}const q=Symbol.for("SpringPhase"),H=e=>(1&e[q])>0,$=e=>(2&e[q])>0,Q=e=>(4&e[q])>0,W=(e,t)=>t?e[q]|=3:e[q]&=-3,G=(e,t)=>t?e[q]|=4:e[q]&=-5;class Y extends z{constructor(e,t){if(super(),this.key=void 0,this.animation=new A,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!o.s.und(e)||!o.s.und(t)){const n=o.s.obj(e)?a({},e):a({},t,{from:e});o.s.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!($(this)||this._state.asyncTo)||Q(this)}get goal(){return Object(o.q)(this.animation.to)}get velocity(){const e=Object(i.e)(this);return e instanceof i.c?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return H(this)}get isAnimating(){return $(this)}get isPaused(){return Q(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{config:a,toValues:c}=r;const s=Object(i.g)(r.to);!s&&Object(o.r)(r.to)&&(c=Object(o.y)(Object(o.q)(r.to))),r.values.forEach((l,u)=>{if(l.done)return;const d=l.constructor==i.b?1:s?s[u].lastPosition:c[u];let m=r.immediate,p=d;if(!m){if(p=l.lastPosition,a.tension<=0)return void(l.done=!0);let t=l.elapsedTime+=e;const n=r.fromValues[u],i=null!=l.v0?l.v0:l.v0=o.s.arr(a.velocity)?a.velocity[u]:a.velocity;let c;if(o.s.und(a.duration))if(a.decay){const e=!0===a.decay?.998:a.decay,o=Math.exp(-(1-e)*t);p=n+i/(1-e)*(1-o),m=Math.abs(l.lastPosition-p)<.1,c=i*o}else{c=null==l.lastVelocity?i:l.lastVelocity;const t=a.precision||(n==d?.005:Math.min(1,.001*Math.abs(d-n))),r=a.restVelocity||t/10,s=a.clamp?0:a.bounce,u=!o.s.und(s),f=n==d?l.v0>0:n<d;let h,b=!1;const g=1,w=Math.ceil(e/g);for(let e=0;e<w&&(h=Math.abs(c)>r,h||(m=Math.abs(d-p)<=t,!m));++e){u&&(b=p==d||p>d==f,b&&(c=-c*s,p=d));c+=(1e-6*-a.tension*(p-d)+.001*-a.friction*c)/a.mass*g,p+=c*g}}else{let o=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,l.durationProgress>0&&(l.elapsedTime=a.duration*l.durationProgress,t=l.elapsedTime+=e)),o=(a.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,l.durationProgress=o),p=n+a.easing(o)*(d-n),c=(p-l.lastPosition)/e,m=1==o}l.lastVelocity=c,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),m=!0)}s&&!s[u].done&&(m=!1),m?l.done=!0:t=!1,l.setValue(p,a.round)&&(n=!0)});const l=Object(i.e)(this),u=l.getValue();if(t){const e=Object(o.q)(r.to);u===e&&!n||a.decay?n&&a.decay&&this._onChange(u):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(u)}set(e){return o.w.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if($(this)){const{to:e,config:t}=this.animation;o.w.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return o.s.und(e)?(n=this.queue||[],this.queue=[]):n=[o.s.obj(e)?e:a({},t,{to:e})],Promise.all(n.map(e=>this._update(e))).then(e=>N(this,e))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),V(this._state,e&&this._lastCallId),o.w.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=o.s.obj(n)?n[t]:n,(null==n||w(n))&&(n=void 0),r=o.s.obj(r)?r[t]:r,null==r&&(r=void 0);const a={to:n,from:r};return H(this)||(e.reverse&&([n,r]=[r,n]),r=Object(o.q)(r),o.s.und(r)?Object(i.e)(this)||this._set(n):this._set(r)),a}_update(e,t){let n=a({},e);const{key:r,defaultProps:i}=this;n.default&&Object.assign(i,m(n,(e,t)=>/^on/.test(t)?l(e,r):e)),te(this,n,"onProps"),ne(this,"onProps",n,this);const c=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return P(++this._lastCallId,{key:r,props:n,defaultProps:i,state:s,actions:{pause:()=>{Q(this)||(G(this,!0),Object(o.n)(s.pauseQueue),ne(this,"onPause",R(this,Z(this,this.animation.to)),this))},resume:()=>{Q(this)&&(G(this,!1),$(this)&&this._resume(),Object(o.n)(s.resumeQueue),ne(this,"onResume",R(this,Z(this,this.animation.to)),this))},start:this._merge.bind(this,c)}}).then(e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=J(n);if(e)return this._update(e,!0)}return e})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(I(this));const r=!o.s.und(e.to),l=!o.s.und(e.from);if(r||l){if(!(t.callId>this._lastToId))return n(I(this));this._lastToId=t.callId}const{key:u,defaultProps:d,animation:m}=this,{to:p,from:f}=m;let{to:h=p,from:g=f}=e;!l||r||t.default&&!o.s.und(h)||(h=g),t.reverse&&([h,g]=[g,h]);const v=!Object(o.u)(g,f);v&&(m.from=g),g=Object(o.q)(g);const y=!Object(o.u)(h,p);y&&this._focus(h);const O=w(t.to),{config:j}=m,{decay:_,velocity:E}=j;(r||l)&&(j.velocity=0),t.config&&!O&&function(e,t,n){n&&(x(n=a({},n),t),t=a({},n,t)),x(e,t),Object.assign(e,t);for(const t in C)null==e[t]&&(e[t]=C[t]);let{mass:r,frequency:i,damping:c}=e;o.s.und(i)||(i<.01&&(i=.01),c<0&&(c=0),e.tension=Math.pow(2*Math.PI/i,2)*r,e.friction=4*Math.PI*c*r/i)}(j,c(t.config,u),t.config!==d.config?c(d.config,u):void 0);let k=Object(i.e)(this);if(!k||o.s.und(h))return n(R(this,!0));const S=o.s.und(t.reset)?l&&!t.default:!o.s.und(g)&&s(t.reset,u),T=S?g:this.get(),A=b(h),P=o.s.num(A)||o.s.arr(A)||Object(o.t)(A),N=!O&&(!P||s(d.immediate||t.immediate,u));if(y){const e=Object(i.f)(h);if(e!==k.constructor){if(!N)throw Error(`Cannot animate between ${k.constructor.name} and ${e.name}, as the "to" prop suggests`);k=this._set(A)}}const V=k.constructor;let D=Object(o.r)(h),F=!1;if(!D){const e=S||!H(this)&&v;(y||e)&&(F=Object(o.u)(b(T),A),D=!F),(Object(o.u)(m.immediate,N)||N)&&Object(o.u)(j.decay,_)&&Object(o.u)(j.velocity,E)||(D=!0)}if(F&&$(this)&&(m.changed&&!S?D=!0:D||this._stop(p)),!O&&((D||Object(o.r)(p))&&(m.values=k.getPayload(),m.toValues=Object(o.r)(h)?null:V==i.b?[1]:Object(o.y)(A)),m.immediate!=N&&(m.immediate=N,N||S||this._set(p)),D)){const{onRest:e}=m;Object(o.k)(ee,e=>te(this,t,e));const r=R(this,Z(this,p));Object(o.n)(this._pendingCalls,r),this._pendingCalls.add(n),m.changed&&o.w.batchedUpdates(()=>{m.changed=!S,null==e||e(r,this),S?c(d.onRest,r):null==m.onStart||m.onStart(r,this)})}S&&this._set(T),O?n(L(t.to,t,this._state,this)):D?this._start():$(this)&&!y?this._pendingCalls.add(n):n(M(T))}_focus(e){const t=this.animation;e!==t.to&&(Object(o.p)(this)&&this._detach(),t.to=e,Object(o.p)(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Object(o.r)(t)&&(Object(o.c)(t,this),B(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Object(o.r)(e)&&Object(o.x)(e,this)}_set(e,t=!0){const n=Object(o.q)(e);if(!o.s.und(n)){const e=Object(i.e)(this);if(!e||!Object(o.u)(n,e.getValue())){const r=Object(i.f)(n);e&&e.constructor==r?e.setValue(n):Object(i.h)(this,r.create(n)),e&&o.w.batchedUpdates(()=>{this._onChange(n,t)})}}return Object(i.e)(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,ne(this,"onStart",R(this,Z(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),c(this.animation.onChange,e,this)),c(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Object(i.e)(this).reset(Object(o.q)(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),$(this)||(W(this,!0),Q(this)||this._resume())}_resume(){o.b.skipAnimation?this.finish():o.o.start(this)}_stop(e,t){if($(this)){W(this,!1);const n=this.animation;Object(o.k)(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Object(o.d)(this,{type:"idle",parent:this});const r=t?I(this.get()):R(this.get(),Z(this,null!=e?e:n.to));Object(o.n)(this._pendingCalls,r),n.changed&&(n.changed=!1,ne(this,"onRest",r,this))}}}function Z(e,t){const n=b(t),r=b(e.get());return Object(o.u)(r,n)}function J(e,t=e.loop,n=e.to){let o=c(t);if(o){const r=!0!==o&&h(o),i=(r||e).reverse,c=!r||r.reset;return K(a({},e,{loop:t,default:!1,pause:void 0,to:!i||w(n)?n:void 0,from:c?e.from:void 0,reset:c},r))}}function K(e){const{to:t,from:n}=e=h(e),r=new Set;return o.s.obj(t)&&X(t,r),o.s.obj(n)&&X(n,r),e.keys=r.size?Array.from(r):null,e}function X(e,t){Object(o.l)(e,(e,n)=>null!=e&&t.add(n))}const ee=["onStart","onRest","onChange","onPause","onResume"];function te(e,t,n){e.animation[n]=t[n]!==u(t,n)?l(t[n],e.key):void 0}function ne(e,t,...n){var o,r,i,a;null==(o=(r=e.animation)[t])||o.call(r,...n),null==(i=(a=e.defaultProps)[t])||i.call(a,...n)}const oe=["onStart","onChange","onRest"];let re=1;class ie{constructor(e,t){this.id=re++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(a({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];o.s.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(K(e)),this}start(e){let{queue:t}=this;return e?t=Object(o.y)(e).map(K):this.queue=[],this._flush?this._flush(this,t):(de(this,t),ae(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Object(o.k)(Object(o.y)(t),t=>n[t].stop(!!e))}else V(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(o.s.und(e))this.start({pause:!0});else{const t=this.springs;Object(o.k)(Object(o.y)(e),e=>t[e].pause())}return this}resume(e){if(o.s.und(e))this.start({pause:!1});else{const t=this.springs;Object(o.k)(Object(o.y)(e),e=>t[e].resume())}return this}each(e){Object(o.l)(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,Object(o.m)(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));const a=!r&&this._started,c=i||a&&n.size?this.get():null;i&&t.size&&Object(o.m)(t,([e,t])=>{t.value=c,e(t,this,this._item)}),a&&(this._started=!1,Object(o.m)(n,([e,t])=>{t.value=c,e(t,this,this._item)}))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}o.w.onFrame(this._onFrame)}}function ae(e,t){return Promise.all(t.map(t=>async function e(t,n,r){const{keys:i,to:a,from:c,loop:s,onRest:l,onResolve:d}=n,m=o.s.obj(n.default)&&n.default;s&&(n.loop=!1);!1===a&&(n.to=null);!1===c&&(n.from=null);const p=o.s.arr(a)||o.s.fun(a)?a:void 0;p?(n.to=void 0,n.onRest=void 0,m&&(m.onRest=void 0)):Object(o.k)(oe,e=>{const r=n[e];if(o.s.fun(r)){const o=t._events[e];n[e]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},m&&(m[e]=n[e])}});const f=t._state;n.pause===!f.paused?(f.paused=n.pause,Object(o.n)(n.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(n.pause=!0);const h=(i||Object.keys(t.springs)).map(e=>t.springs[e].start(n)),b=!0===n.cancel||!0===u(n,"cancel");(p||b&&f.asyncId)&&h.push(P(++t._lastAsyncId,{props:n,state:f,actions:{pause:o.v,resume:o.v,start(e,n){b?(V(f,t._lastAsyncId),n(I(t))):(e.onRest=l,n(L(p,e,f,t)))}}}));f.paused&&await new Promise(e=>{f.resumeQueue.add(e)});const g=N(t,await Promise.all(h));if(s&&g.finished&&(!r||!g.noop)){const o=J(n,s,a);if(o)return de(t,[o]),e(t,o,!0)}d&&o.w.batchedUpdates(()=>d(g,t,t.item));return g}(e,t))).then(t=>N(e,t))}function ce(e,t){const n=a({},e.springs);return t&&Object(o.k)(Object(o.y)(t),e=>{o.s.und(e.keys)&&(e=K(e)),o.s.obj(e.to)||(e=a({},e,{to:void 0})),ue(n,e,e=>le(e))}),se(e,n),n}function se(e,t){Object(o.l)(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,Object(o.c)(t,e))})}function le(e,t){const n=new Y;return n.key=e,t&&Object(o.c)(n,t),n}function ue(e,t,n){t.keys&&Object(o.k)(t.keys,o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)})}function de(e,t){Object(o.k)(t,t=>{ue(e.springs,t,t=>le(t,e))})}function me(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}const pe=["children"],fe=e=>{let{children:t}=e,n=me(e,pe);const i=Object(r.useContext)(he),a=n.pause||!!i.pause,c=n.immediate||!!i.immediate;n=Object(o.B)(()=>({pause:a,immediate:c}),[a,c]);const{Provider:s}=he;return r.createElement(s,{value:n},t)},he=(be=fe,ge={},Object.assign(be,r.createContext(ge)),be.Provider._context=be,be.Consumer._context=be,be);var be,ge;fe.Provider=he.Provider,fe.Consumer=he.Consumer;const we=()=>{const e=[],t=function(t){Object(o.i)();const r=[];return Object(o.k)(e,(e,i)=>{if(o.s.und(t))r.push(e.start());else{const o=n(t,e,i);o&&r.push(e.start(o))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Object(o.k)(e,e=>e.pause(...arguments)),this},t.resume=function(){return Object(o.k)(e,e=>e.resume(...arguments)),this},t.set=function(t){Object(o.k)(e,e=>e.set(t))},t.start=function(t){const n=[];return Object(o.k)(e,(e,r)=>{if(o.s.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}}),n},t.stop=function(){return Object(o.k)(e,e=>e.stop(...arguments)),this},t.update=function(t){return Object(o.k)(e,(e,n)=>e.update(this._getProps(t,e,n))),this};const n=function(e,t,n){return o.s.fun(e)?e(n,t):e};return t._getProps=n,t};let ve;function ye(e,t,n){const i=o.s.fun(t)&&t,{reset:s,sort:l,trail:u=0,expires:d=!0,exitBeforeEnter:p=!1,onDestroyed:f,ref:b,config:w}=i?i():t,O=Object(r.useMemo)(()=>i||3==arguments.length?we():void 0,[]),j=Object(o.y)(e),_=[],E=Object(r.useRef)(null),k=s?null:E.current;Object(o.A)(()=>{E.current=_}),Object(o.C)(()=>()=>{Object(o.k)(E.current,e=>{e.expired&&clearTimeout(e.expirationId),v(e.ctrl,O),e.ctrl.stop(!0)})});const C=je(j,i?i():t,k),S=s&&E.current||[];Object(o.A)(()=>Object(o.k)(S,({ctrl:e,item:t,key:n})=>{v(e,O),c(f,t,n)}));const x=[];if(k&&Object(o.k)(k,(e,t)=>{e.expired?(clearTimeout(e.expirationId),S.push(e)):~(t=x[t]=C.indexOf(e.key))&&(_[t]=e)}),Object(o.k)(j,(e,t)=>{_[t]||(_[t]={key:C[t],item:e,phase:ve.MOUNT,ctrl:new ie},_[t].ctrl.item=e)}),x.length){let e=-1;const{leave:n}=i?i():t;Object(o.k)(x,(t,o)=>{const r=k[o];~t?(e=_.indexOf(r),_[e]=a({},r,{item:j[t]})):n&&_.splice(++e,0,r)})}o.s.fun(l)&&_.sort((e,t)=>l(e.item,t.item));let T=-u;const A=Object(o.z)(),P=m(t),N=new Map,M=Object(r.useRef)(new Map),R=Object(r.useRef)(!1);Object(o.k)(_,(e,n)=>{const r=e.key,s=e.phase,l=i?i():t;let m,f,g=c(l.delay||0,r);if(s==ve.MOUNT)m=l.enter,f=ve.ENTER;else{const e=C.indexOf(r)<0;if(s!=ve.LEAVE)if(e)m=l.leave,f=ve.LEAVE;else{if(!(m=l.update))return;f=ve.UPDATE}else{if(e)return;m=l.enter,f=ve.ENTER}}if(m=c(m,e.item,n),m=o.s.obj(m)?h(m):{to:m},!m.config){const t=w||P.config;m.config=c(t,e.item,n,f)}T+=u;const v=a({},P,{delay:g+T,ref:b,immediate:l.immediate,reset:!1},m);if(f==ve.ENTER&&o.s.und(v.from)){const r=i?i():t,a=o.s.und(r.initial)||k?r.from:r.initial;v.from=c(a,e.item,n)}const{onResolve:y}=v;v.onResolve=e=>{c(y,e);const t=E.current,n=t.find(e=>e.key===r);if(n&&(!e.cancelled||n.phase==ve.UPDATE)&&n.ctrl.idle){const e=t.every(e=>e.ctrl.idle);if(n.phase==ve.LEAVE){const t=c(d,n.item);if(!1!==t){const o=!0===t?0:t;if(n.expired=!0,!e&&o>0)return void(o<=2147483647&&(n.expirationId=setTimeout(A,o)))}}e&&t.some(e=>e.expired)&&(M.current.delete(n),p&&(R.current=!0),A())}};const O=ce(e.ctrl,v);f===ve.LEAVE&&p?M.current.set(e,{phase:f,springs:O,payload:v}):N.set(e,{phase:f,springs:O,payload:v})});const I=Object(r.useContext)(fe),L=Object(o.D)(I),V=I!==L&&g(I);Object(o.A)(()=>{V&&Object(o.k)(_,e=>{e.ctrl.start({default:I})})},[I]),Object(o.k)(N,(e,t)=>{if(M.current.size){const e=_.findIndex(e=>e.key===t.key);_.splice(e,1)}}),Object(o.A)(()=>{Object(o.k)(M.current.size?M.current:N,({phase:e,payload:t},n)=>{const{ctrl:o}=n;n.phase=e,null==O||O.add(o),V&&e==ve.ENTER&&o.start({default:I}),t&&(y(o,t.ref),o.ref&&!R.current?o.update(t):(o.start(t),R.current&&(R.current=!1)))})},s?void 0:n);const D=e=>r.createElement(r.Fragment,null,_.map((t,n)=>{const{springs:i}=N.get(t)||t.ctrl,c=e(a({},i),t.item,t,n);return c&&c.type?r.createElement(c.type,a({},c.props,{key:o.s.str(t.key)||o.s.num(t.key)?t.key:t.ctrl.id,ref:c.ref})):c}));return O?[D,O]:D}!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(ve||(ve={}));let Oe=1;function je(e,{key:t,keys:n=t},r){if(null===n){const t=new Set;return e.map(e=>{const n=r&&r.find(n=>n.item===e&&n.phase!==ve.LEAVE&&!t.has(n));return n?(t.add(n),n.key):Oe++})}return o.s.und(n)?e:o.s.fun(n)?e.map(n):Object(o.y)(n)}class _e extends z{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=Object(o.f)(...t);const n=this._get(),r=Object(i.f)(n);Object(i.h)(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Object(o.u)(t,n)||(Object(i.e)(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&ke(this._active)&&Ce(this)}_get(){const e=o.s.arr(this.source)?this.source.map(o.q):Object(o.y)(Object(o.q)(this.source));return this.calc(...e)}_start(){this.idle&&!ke(this._active)&&(this.idle=!1,Object(o.k)(Object(i.g)(this),e=>{e.done=!1}),o.b.skipAnimation?(o.w.batchedUpdates(()=>this.advance()),Ce(this)):o.o.start(this))}_attach(){let e=1;Object(o.k)(Object(o.y)(this.source),t=>{Object(o.r)(t)&&Object(o.c)(t,this),B(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Object(o.k)(Object(o.y)(this.source),e=>{Object(o.r)(e)&&Object(o.x)(e,this)}),this._active.clear(),Ce(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Object(o.y)(this.source).reduce((e,t)=>Math.max(e,(B(t)?t.priority:0)+1),0))}}function Ee(e){return!1!==e.idle}function ke(e){return!e.size||Array.from(e).every(Ee)}function Ce(e){e.idle||(e.idle=!0,Object(o.k)(Object(i.g)(e),e=>{e.done=!0}),Object(o.d)(e,{type:"idle",parent:e}))}o.b.assign({createStringInterpolator:o.g,to:(e,t)=>new _e(e,t)});o.o.advance},12:function(e,t){e.exports=window.wc.data},120:function(e,t,n){"use strict";var o=n(106),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function s(e){return o.isMemo(e)?a:c[e.$$typeof]||r}c[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[o.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(f){var r=p(n);r&&r!==f&&e(t,r,o)}var a=u(n);d&&(a=a.concat(d(n)));for(var c=s(t),h=s(n),b=0;b<a.length;++b){var g=a[b];if(!(i[g]||o&&o[g]||h&&h[g]||c&&c[g])){var w=m(n,g);try{l(t,g,w)}catch(e){}}}}return t}},121:function(e,t,n){"use strict";n.d(t,"c",(function(){return ht})),n.d(t,"b",(function(){return vt})),n.d(t,"a",(function(){return yt}));var o=n(40),r=n.n(o),i=n(0),a=n(4),c=n(14),s=n(8),l=n(27),u=n(6),d=n.n(u),m=n(55),p=n(162),f=n(47),h=n(24),b=n(163),g=n.n(b),w=(n(106),n(31)),v=(n(120),function(e){var t=Object(p.a)();return t.displayName=e,t}("Router-History")),y=function(e){var t=Object(p.a)();return t.displayName=e,t}("Router"),O=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(l.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return d.a.createElement(y.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},d.a.createElement(v.Provider,{children:this.props.children||null,value:this.props.history}))},t}(d.a.Component);d.a.Component;d.a.Component;var j={},_=0;function E(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,o=n.path,r=n.exact,i=void 0!==r&&r,a=n.strict,c=void 0!==a&&a,s=n.sensitive,l=void 0!==s&&s;return[].concat(o).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var o=function(e,t){var n=""+t.end+t.strict+t.sensitive,o=j[n]||(j[n]={});if(o[e])return o[e];var r=[],i={regexp:g()(e,r,t),keys:r};return _<1e4&&(o[e]=i,_++),i}(n,{end:i,strict:c,sensitive:l}),r=o.regexp,a=o.keys,s=r.exec(e);if(!s)return null;var u=s[0],d=s.slice(1),m=e===u;return i&&!m?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:m,params:a.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var k=function(e){function t(){return e.apply(this,arguments)||this}return Object(l.a)(t,e),t.prototype.render=function(){var e=this;return d.a.createElement(y.Consumer,null,(function(t){t||Object(f.a)(!1);var n=e.props.location||t.location,o=e.props.computedMatch?e.props.computedMatch:e.props.path?E(n.pathname,e.props):t.match,r=Object(h.a)({},t,{location:n,match:o}),i=e.props,a=i.children,c=i.component,s=i.render;return Array.isArray(a)&&0===a.length&&(a=null),d.a.createElement(y.Provider,{value:r},r.match?a?"function"==typeof a?a(r):a:c?d.a.createElement(c,r):s?s(r):null:"function"==typeof a?a(r):null)}))},t}(d.a.Component);function C(e){return"/"===e.charAt(0)?e:"/"+e}function S(e,t){if(!e)return t;var n=C(e);return 0!==t.pathname.indexOf(n)?t:Object(h.a)({},t,{pathname:t.pathname.substr(n.length)})}function x(e){return"string"==typeof e?e:Object(m.d)(e)}function T(e){return function(){Object(f.a)(!1)}}function A(){}d.a.Component;var P=function(e){function t(){return e.apply(this,arguments)||this}return Object(l.a)(t,e),t.prototype.render=function(){var e=this;return d.a.createElement(y.Consumer,null,(function(t){t||Object(f.a)(!1);var n,o,r=e.props.location||t.location;return d.a.Children.forEach(e.props.children,(function(e){if(null==o&&d.a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;o=i?E(r.pathname,Object(h.a)({},e.props,{path:i})):t.match}})),o?d.a.cloneElement(n,{location:r,computedMatch:o}):null}))},t}(d.a.Component);d.a.useContext;var N=n(1),M=n.n(N),R=n(5),I=n(32),L=n(13),V=n(12),D=n(17),F=(n(294),n(56)),B=(n(295),n(28)),U=n(2),z=n(22),q=n(118),H=n(69),$=n(23),Q=n(173);const W=Object(i.lazy)(()=>n.e(6).then(n.bind(null,643))),G=Object(i.lazy)(()=>n.e(17).then(n.bind(null,654))),Y=Object(i.lazy)(()=>n.e(25).then(n.bind(null,644))),Z=Object(i.lazy)(()=>Promise.all([n.e(1),n.e(2),n.e(3),n.e(31)]).then(n.bind(null,650))),J=Object(i.lazy)(()=>Promise.all([n.e(2),n.e(34)]).then(n.bind(null,655))),K=Object(i.lazy)(()=>Promise.all([n.e(1),n.e(47)]).then(n.bind(null,651))),X=Object(i.lazy)(()=>Promise.all([n.e(1),n.e(47)]).then(n.bind(null,645))),ee=Object(i.lazy)(()=>n.e(54).then(n.bind(null,653))),te=()=>{const e=[],t=[["",Object($.d)("woocommerceTranslation")]];e.push({container:Z,path:"/",breadcrumbs:[...t,Object(U.__)("Home","woocommerce-admin")],wpOpenMenu:"toplevel_page_woocommerce",navArgs:{id:"woocommerce-home"},capability:"manage_woocommerce"}),window.wcAdminFeatures.analytics&&(e.push({container:Y,path:"/analytics/overview",breadcrumbs:[...t,["/analytics/overview",Object(U.__)("Analytics","woocommerce-admin")],Object(U.__)("Overview","woocommerce-admin")],wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",navArgs:{id:"woocommerce-analytics-overview"},capability:"view_woocommerce_reports"}),e.push({container:G,path:"/analytics/settings",breadcrumbs:[...t,["/analytics/revenue",Object(U.__)("Analytics","woocommerce-admin")],Object(U.__)("Settings","woocommerce-admin")],wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",navArgs:{id:"woocommerce-analytics-settings"},capability:"view_woocommerce_reports"}),e.push({container:W,path:"/customers",breadcrumbs:[...t,Object(U.__)("Customers","woocommerce-admin")],wpOpenMenu:"toplevel_page_woocommerce",navArgs:{id:"woocommerce-analytics-customers"},capability:"view_woocommerce_reports"}),e.push({container:W,path:"/analytics/:report",breadcrumbs:e=>{let{match:n}=e;const o=Object(R.find)(Object(q.a)(),{report:n.params.report});return o?[...t,["/analytics/revenue",Object(U.__)("Analytics","woocommerce-admin")],o.title]:[]},wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",capability:"view_woocommerce_reports"})),window.wcAdminFeatures.marketing&&e.push({container:J,path:"/marketing",breadcrumbs:[...t,["/marketing",Object(U.__)("Marketing","woocommerce-admin")],Object(U.__)("Overview","woocommerce-admin")],wpOpenMenu:"toplevel_page_woocommerce-marketing",navArgs:{id:"woocommerce-marketing-overview"},capability:"view_woocommerce_reports"}),window.wcAdminFeatures.onboarding&&e.push({container:K,path:"/setup-wizard",breadcrumbs:[...t,Object(U.__)("Setup Wizard","woocommerce-admin")],capability:"manage_woocommerce"}),window.wcAdminFeatures.settings&&e.push({container:X,path:"/settings/:page",breadcrumbs:e=>{let{match:n}=e;const o=Object($.d)("settingsPages"),r=o[n.params.page];return r?[...t,[o.general?"/settings/general":"/settings/"+Object.keys(o)[0],Object(U.__)("Settings","woocommerce-admin")],r]:[]},wpOpenMenu:"toplevel_page_woocommerce",capability:"manage_woocommerce"}),window.wcAdminFeatures["wc-pay-welcome-page"]&&e.push({container:ee,path:"/wc-pay-welcome-page",breadcrumbs:[["/wc-pay-welcome-page",Object(U.__)("WooCommerce Payments","woocommerce-admin")],Object(U.__)("WooCommerce Payments","woocommerce-admin")],navArgs:{id:"woocommerce-wc-pay-welcome-page"},wpOpenMenu:"toplevel_page_woocommerce-wc-pay-welcome-page",capability:"manage_woocommerce"});const n=Object(B.applyFilters)("woocommerce_admin_pages_list",e);return n.push({container:Q.a,path:"*",breadcrumbs:[...t,Object(U.__)("Not allowed","woocommerce-admin")],wpOpenMenu:"toplevel_page_woocommerce"}),n};class ne extends i.Component{componentDidMount(){window.document.documentElement.scrollTop=0,window.document.body.classList.remove("woocommerce-admin-is-loading")}componentDidUpdate(e){const t=Object(R.omit)(e.query,"chartType","filter","paged"),n=Object(R.omit)(this.props.query,"chartType","filter","paged");e.query.paged>1&&!Object(R.isEqual)(t,n)&&Object(L.getHistory)().replace(Object(L.getNewPath)({paged:1})),e.match.url!==this.props.match.url&&(window.document.documentElement.scrollTop=0)}render(){const{page:e,match:t,query:n}=this.props,{url:o,params:r}=t;return window.wpNavMenuUrlUpdate(n),window.wpNavMenuClassChange(e,o),Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)(z.Spinner,null)},Object(i.createElement)(e.container,{params:r,path:o,pathMatch:e.path,query:n}))}}window.wpNavMenuUrlUpdate=function(e){const t=Object(L.getPersistedQuery)(e),n=Object(L.getQueryExcludedScreens)();Array.from(document.querySelectorAll("#adminmenu a")).forEach(e=>function(e,t,n){if(Object(H.f)(e.href)){const o=Object(R.last)(e.href.split("?")),r=Object(I.parse)(o),i=r.path||"homescreen",a=Object(L.getScreenFromPath)(i),c=n.includes(a),s="admin.php?"+Object(I.stringify)(Object.assign(r,c?{}:t));e.href=s,e.onclick=e=>{e.preventDefault(),Object(L.getHistory)().push(s)}}}(e,t,n))},window.wpNavMenuClassChange=function(e,t){const n=document.querySelector("#adminmenu");Array.from(n.getElementsByClassName("current")).forEach((function(e){e.classList.remove("current")}));Array.from(n.querySelectorAll(".wp-has-current-submenu")).forEach((function(e){e.classList.remove("wp-has-current-submenu"),e.classList.remove("wp-menu-open"),e.classList.remove("selected"),e.classList.add("wp-not-current-submenu"),e.classList.add("menu-top")}));const o="/"===t?"admin.php?page=wc-admin":"admin.php?page=wc-admin&path="+encodeURIComponent(t),r="/"===t?`li > a[href$="${o}"], li > a[href*="${o}?"]`:`li > a[href*="${o}"]`,i=n.querySelectorAll(r);if(Array.from(i).forEach((function(e){e.parentElement.classList.add("current")})),e.wpOpenMenu){const t=n.querySelector("#"+e.wpOpenMenu);t&&(t.classList.remove("wp-not-current-submenu"),t.classList.add("wp-has-current-submenu"),t.classList.add("wp-menu-open"),t.classList.add("current"))}document.querySelector("#wpwrap").classList.remove("wp-responsive-open")};var oe=n(7),re=n.n(oe),ie=n(34),ae=n(15),ce=n(18);n(296);function se(){const[e,t]=Object(i.useState)(!1),n=Object(i.useRef)(null);return Object(i.useEffect)(()=>{const e=()=>{t(window.pageYOffset>20)},o=()=>{n.current=window.requestAnimationFrame(e)};return window.addEventListener("scroll",o),()=>{window.removeEventListener("scroll",o),window.cancelAnimationFrame(n.current)}},[]),e}var le=n(54);const ue=e=>{var t;let{sections:n,isEmbedded:o=!1,query:r}=e;const a=Object(i.useRef)(null),c=Object(ae.getSetting)("siteTitle",""),s=n.slice(-1)[0],l=se();let u=null;const d=re()("woocommerce-layout__header",{"is-scrolled":l}),m=Object(ce.useSlot)("woocommerce_header_page_title"),p=Boolean(null==m||null===(t=m.fills)||void 0===t?void 0:t.length),f=Object(ce.useSlot)("woocommerce_header_item"),h=null==f?void 0:f.fills;Object(i.useLayoutEffect)(()=>(b(),window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b);const e=document.querySelector("#wpbody");e&&(e.style.marginTop=null)}),[h]);const b=()=>{clearTimeout(u),u=setTimeout((function(){const e=document.querySelector("#wpbody");e&&a.current&&(e.style.marginTop=a.current.offsetHeight+"px")}),200)};return Object(i.useEffect)(()=>{if(!o){const e=n.map(e=>Array.isArray(e)?e[1]:e).reverse().join(" ‹ "),t=Object(ie.decodeEntities)(Object(U.sprintf)(Object(U.__)("%1$s ‹ %2$s — WooCommerce","woocommerce-admin"),e,c));document.title!==t&&(document.title=t)}},[o,n,c]),Object(i.createElement)("div",{className:d,ref:a},Object(i.createElement)("div",{className:"woocommerce-layout__header-wrapper"},Object(i.createElement)(le.b.Slot,{fillProps:{isEmbedded:o,query:r}}),Object(i.createElement)(ce.Text,{className:"woocommerce-layout__header-heading",as:"h1"},Object(ie.decodeEntities)(p?Object(i.createElement)(le.c.Slot,{fillProps:{isEmbedded:o,query:r}}):s)),Object(i.createElement)(le.a.Slot,{fillProps:{isEmbedded:o,query:r}})))};class de extends i.Component{render(){return Object(i.createElement)("div",{id:"woocommerce-layout__notice-list",className:"woocommerce-layout__notice-list"})}}var me=de,pe=n(161),fe=n(259);var he=function(e){let{notices:t,className:n,children:o,onRemove:a=R.noop,onRemove2:s=R.noop}=e;const l=Object(c.useReducedMotion)(),[u]=Object(i.useState)(()=>new WeakMap),d=Object(pe.useTransition)(t,{keys:e=>e.id,from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:u.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:l});n=re()("components-snackbar-list",n);const m=e=>()=>{a(e.id),s(e.id)};return Object(i.createElement)("div",{className:n},o,d((e,t)=>Object(i.createElement)(pe.animated.div,{style:e},Object(i.createElement)("div",{className:"components-snackbar-list__notice-container",ref:e=>e&&u.set(t,e)},Object(i.createElement)(fe.a,r()({},Object(R.omit)(t,["content"]),{onRemove:m(t)}),t.content)))))};n(297);const be="woocommerce_admin_transient_notices_queue";function ge(e){const{removeNotice:t}=Object(s.useDispatch)("core/notices"),{createNotice:n,removeNotice:o}=Object(s.useDispatch)("core/notices2"),{updateOptions:r}=Object(s.useDispatch)(V.OPTIONS_STORE_NAME),{currentUser:a={},notices:c=[],notices2:l=[],noticesQueue:u={}}=Object(s.useSelect)(e=>({currentUser:e(V.USER_STORE_NAME).getCurrentUser(),notices:e("core/notices").getNotices(),notices2:e("core/notices2").getNotices(),noticesQueue:e(V.OPTIONS_STORE_NAME).getOption(be)}));Object(i.useEffect)(()=>{Object.values(u).filter(e=>e.user_id===a.id||!e.user_id).forEach(e=>{const t=Object(B.applyFilters)("woocommerce_admin_queued_notice_filter",e);n(t.status,t.content,{onDismiss:()=>{(e=>{const t={...u};delete t[e],r({[be]:t})})(t.id)},...t.options||{}})})},[]);const{className:d}=e,m=re()("woocommerce-transient-notices","components-notices__snackbar",d),p=c.concat(l);return Object(i.createElement)(he,{notices:p,className:m,onRemove:t,onRemove2:o})}ge.propTypes={className:M.a.string,notices:M.a.array};var we=ge,ve=n(105),ye=n(525),Oe=n(526);n(298);const je=()=>Object(i.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)("mask",{id:"mask0_2915:6733",maskUnits:"userSpaceOnUse",x:"4",y:"3",width:"16",height:"18"},Object(i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 3.5H13.5L13.9 5.5H19.5V15.5H12.5L12.1 13.5H6.5V20.5H4.5V3.5ZM12.26 7.5L11.86 5.5H6.5V11.5H13.74L14.14 13.5H17.5V7.5H12.26Z",fill:"white"})),Object(i.createElement)("g",{mask:"url(#mask0_2915:6733)"},Object(i.createElement)("rect",{width:"24",height:"24",fill:"#50575E"})));var _e=n(176);const Ee={page:1,per_page:V.QUERY_DEFAULTS.pageSize,status:"unactioned",type:V.QUERY_DEFAULTS.noteTypes,orderby:"date",order:"desc"};function ke(e){const{getNotes:t,getNotesError:n,isResolving:o}=e(V.NOTES_STORE_NAME),{getCurrentUser:r}=e(V.USER_STORE_NAME),i=r(),a=parseInt(i&&i.woocommerce_meta&&i.woocommerce_meta.activity_panel_inbox_last_read,10);if(!a)return null;t(Ee);const c=Boolean(n("getNotes",[Ee])),s=o("getNotes",[Ee]);if(c||s)return null;const l=t(Ee);return Object(_e.a)(l,a)>0}const Ce=e=>{let{icon:t,title:n,name:o,unread:r,selected:c,isPanelOpen:s,onTabClick:l}=e;const u=re()("woocommerce-layout__activity-panel-tab",{"is-active":s&&c,"has-unread":r}),d="activity-panel-tab-"+o;return Object(i.createElement)(a.Button,{role:"tab",className:u,"aria-selected":c,"aria-controls":"activity-panel-"+o,key:d,id:d,onClick:()=>{l(o)}},t,n," ",r&&Object(i.createElement)("span",{className:"screen-reader-text"},Object(U.__)("unread activity","woocommerce-admin")))},Se=e=>{let{tabs:t,onTabClick:n,selectedTab:o,tabOpen:c=!1}=e;const[{tabOpen:s,currentTab:l},u]=Object(i.useState)({tabOpen:c,currentTab:o});return Object(i.useEffect)(()=>{u({tabOpen:c,currentTab:o})},[c,o]),Object(i.createElement)(a.NavigableMenu,{role:"tablist",orientation:"horizontal",className:"woocommerce-layout__activity-panel-tabs"},t&&t.map((e,t)=>{if(e.component){const{component:n,options:o}=e;return Object(i.createElement)(n,r()({key:t},o))}return Object(i.createElement)(Ce,r()({key:t,index:t,isPanelOpen:s,selected:l===e.name},e,{onTabClick:()=>{const t=l!==e.name&&""!==l||!s;t&&l===e.name||Object(D.recordEvent)("activity_panel_open",{tab:e.name}),u({tabOpen:t,currentTab:e.name}),n(e,t)}}))}))},xe=()=>Object(i.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon setup-progress",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)("path",{d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",stroke:"#DCDCDE",strokeWidth:"2"}),Object(i.createElement)("path",{d:"M4 12V12C4 16.4183 7.58172 20 12 20V20C16.4183 20 20 16.4183 20 12V12C20 7.58172 16.4183 4 12 4V4",strokeWidth:"2",strokeLinecap:"round"}));var Te=n(168),Ae=n(522);n(299);const Pe="highlight-tooltip__show";function Ne(e){let{title:t,closeButtonText:n,content:o,show:r=!0,id:c,onClose:s,delay:l,onShow:u=R.noop,useAnchor:d=!1}=e;const[m,p]=Object(i.useState)(l>0?null:r),[f,h]=Object(i.useState)(null),[b,g]=Object(i.useState)(null);function w(){if(d){const e=document.getElementById(c);g(e.getBoundingClientRect())}}Object(i.useEffect)(()=>{const e=document.getElementById(c);let t,n;e&&!f&&(d?(n=document.createElement("div"),document.body.appendChild(n)):n=e.parentElement,t=document.createElement("div"),t.classList.add("highlight-tooltip__container"),n.appendChild(t),h(t));const o=v(t);return()=>{if(t){const e=t.parentElement;e.removeChild(t),d&&e.remove()}o&&clearTimeout(o)}},[]),Object(i.useEffect)(()=>{!m&&f&&f.classList.remove(Pe)},[m]),Object(i.useEffect)(()=>{r!==m&&null!==m&&f&&(p(r),r?f&&v(f):f.classList.remove(Pe))},[r]),Object(i.useLayoutEffect)(()=>(window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)),[]);const v=e=>{let t=null;return l>0?t=setTimeout(()=>{t=null,y(e)},l):m||y(e),t},y=e=>{const t=document.getElementById(c);t&&d&&g(t.getBoundingClientRect()),e&&e.classList.add(Pe),p(!0),u()},O=()=>{p(!1),s&&s()};return f?Object(i.createPortal)(Object(i.createElement)("div",{className:"highlight-tooltip__portal"},m?Object(i.createElement)(i.Fragment,null,Object(i.createElement)(a.IsolatedEventContainer,{className:"highlight-tooltip__overlay"}),Object(i.createElement)(a.Popover,{className:"highlight-tooltip__popover",noArrow:!1,anchorRect:b,focusOnMount:"container"},Object(i.createElement)(a.Card,{size:"medium"},Object(i.createElement)(a.CardHeader,null,t,Object(i.createElement)(a.Button,{isSmall:!0,onClick:O,icon:Ae.a})),Object(i.createElement)(a.CardBody,null,o||null),Object(i.createElement)(a.CardFooter,{isBorderless:!0},Object(i.createElement)(a.Button,{size:"small",isPrimary:!0,onClick:O},n||Object(U.__)("Close","woocommerce-admin")))))):null),f):null}Ne.propTypes={id:M.a.string.isRequired,title:M.a.string.isRequired,closeButtonText:M.a.string.isRequired,content:M.a.oneOfType([M.a.string,M.a.node]),show:M.a.bool,onClose:M.a.func,delay:M.a.number,onShow:M.a.func,useAnchor:M.a.bool};var Me=n(93);const Re=["button","submit"];function Ie(e){const t=Object(i.useRef)(e);Object(i.useEffect)(()=>{t.current=e},[e]);const n=Object(i.useRef)(!1),o=Object(i.useRef)(),r=Object(i.useCallback)(()=>{clearTimeout(o.current)},[]);Object(i.useEffect)(()=>()=>r(),[]),Object(i.useEffect)(()=>{e||r()},[e,r]);const a=Object(i.useCallback)(e=>{const{type:t,target:o}=e;Object(R.includes)(["mouseup","touchend"],t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(R.includes)(Re,e.type)}return!1}(o)&&(n.current=!0)},[]),c=Object(i.useCallback)(e=>{e.persist(),n.current||(o.current=setTimeout(()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()},0))},[]);return{onFocus:r,onMouseDown:a,onMouseUp:a,onTouchStart:a,onTouchEnd:a,onBlur:c}}const Le=e=>{let{content:t,isPanelOpen:n,isPanelSwitching:o,currentTab:a,tab:c,closePanel:s,clearPanel:l}=e;const u="woocommerce-layout__activity-panel-wrapper",d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"firstElement";const t=Object(i.useRef)(e);return Object(i.useEffect)(()=>{t.current=e},[e]),Object(i.useCallback)(e=>{if(!e||!1===t.current)return;if(e.contains(e.ownerDocument.activeElement))return;let n=e;if("firstElement"===t.current){const t=Me.focus.tabbable.find(e)[0];t&&(n=t)}n.focus()},[])}(),m=Ie(e=>{const t=e.relatedTarget&&(e.relatedTarget.closest(".woocommerce-inbox-dismiss-confirmation_modal")||e.relatedTarget.closest(".components-snackbar__action"));n&&!t&&s()}),p=Object(i.useRef)(null),f=Object(i.useCallback)(e=>{p.current=e,d(e)},[]);if(!c)return Object(i.createElement)("div",{className:u});if(!t)return null;const h=re()(u,{"is-open":n,"is-switching":o});return Object(i.createElement)("div",r()({className:h,tabIndex:0,role:"tabpanel","aria-label":c.title,onTransitionEnd:e=>{e&&"transform"===e.propertyName&&(l(),p.current&&n&&c&&d(p.current))}},m,{ref:f}),Object(i.createElement)("div",{className:"woocommerce-layout__activity-panel-content",key:"activity-panel-"+a,id:"activity-panel-"+a},Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)(z.Spinner,null)},t)))};var Ve=n(74),De=n(104),Fe=n(257);const Be=Object(i.lazy)(()=>n.e(4).then(n.bind(null,656))),Ue=Object(i.lazy)(()=>Promise.all([n.e(2),n.e(3),n.e(5)]).then(n.bind(null,646))),ze=e=>{let{isEmbedded:t,query:n}=e;const[o,r]=Object(i.useState)(""),[a,c]=Object(i.useState)(!1),[l,u]=Object(i.useState)(!1),[d,m]=Object(i.useState)(!1),{fills:p}=Object(ce.useSlot)(Fe.a),f=Boolean(null==p?void 0:p.length),{updateUserPreferences:h,...b}=Object(V.useUserPreferences)(),g=(e,t)=>{let o={};if("wc-admin"===n.page&&"appearance"===n.task){var r,i,a;const{getTaskLists:n}=e(V.ONBOARDING_STORE_NAME),c=n().reduce((e,t)=>[...e,...t.tasks],[]).find(e=>"appearance"===e.id);o={set_notice:t("woocommerce_demo_store_notice")?"Y":"N",create_homepage:!0===(null==c||null===(r=c.additionalData)||void 0===r?void 0:r.hasHomepage)?"Y":"N",upload_logo:null!=c&&null!==(i=c.additionalData)&&void 0!==i&&null!==(a=i.themeMods)&&void 0!==a&&a.custom_logo?"Y":"N"}}return o};function w(e,t,n){const o=Object(Ve.c)(e),r=!(!t||!l)&&Object(Ve.d)(e,o)>0,i=!(!t||!l)&&Object(De.b)(e),a=!(!t||!l)&&Object(Ve.a)(e);return n>0||r||i||a||f}const{hasUnreadNotes:v,hasAbbreviatedNotifications:y,isCompletedTask:O,thingsToDoNextCount:j,requestingTaskListOptions:_,setupTaskListComplete:E,setupTaskListHidden:k,previewSiteBtnTrackData:C}=Object(s.useSelect)(e=>{var t,o,r;const{getOption:i}=e(V.OPTIONS_STORE_NAME),{getTask:a,getTaskList:c,hasFinishedResolution:s}=e(V.ONBOARDING_STORE_NAME),l=null===(t=c("setup"))||void 0===t?void 0:t.isHidden,u=function(e){return e&&e.tasks.length&&!e.isHidden?e.tasks.filter(e=>e.canView&&!e.isComplete&&!e.isDismissed).length:0}(c("extended"));return{hasUnreadNotes:ke(e),hasAbbreviatedNotifications:w(e,l,u),thingsToDoNextCount:u,requestingTaskListOptions:!s("getTaskLists"),setupTaskListComplete:null===(o=c("setup"))||void 0===o?void 0:o.isComplete,setupTaskListHidden:l,isCompletedTask:Boolean(n.task&&(null===(r=a(n.task))||void 0===r?void 0:r.isComplete)),previewSiteBtnTrackData:g(e,i)}}),{unhideTaskList:S}=Object(s.useDispatch)(V.ONBOARDING_STORE_NAME),{currentUserCan:x}=Object(V.useUser)(),T=()=>"wc-admin"===n.page&&!n.path,A=()=>n.task&&!n.path&&(!0===_||!1===k&&!1===E),P=()=>{Object(H.f)(window.location.href)?Object(L.getHistory)().push(Object(L.getNewPath)({},"/",{})):window.location.href=Object(ae.getAdminLink)("admin.php?page=wc-admin")},N=()=>{const e={name:"activity",title:Object(U.__)("Activity","woocommerce-admin"),icon:Object(i.createElement)(je,null),unread:v||y,visible:(t||!T())&&!A()},o={name:"setup",title:Object(U.__)("Finish setup","woocommerce-admin"),icon:Object(i.createElement)(xe,null),onClick:()=>(window.location.href!==Object(ae.getAdminLink)("admin.php?page=wc-admin")&&("no"===k?P():S("setup").then(P)),null),visible:x("manage_woocommerce")&&!_&&!E&&!k&&!A()&&(!T()||t)},r={name:"help",title:Object(U.__)("Help","woocommerce-admin"),icon:Object(i.createElement)(ve.a,{icon:ye.a}),visible:x("manage_woocommerce")&&(T()&&!t||A())},a={component:Te.b,visible:x("manage_woocommerce")&&!t&&T()&&!A()};return[e,o,{name:"previewSite",title:Object(U.__)("Preview site","woocommerce-admin"),icon:Object(i.createElement)(ve.a,{icon:Oe.a}),visible:"wc-admin"===n.page&&"appearance"===n.task,onClick:()=>(window.open(Object(ae.getSetting)("siteUrl")),Object(D.recordEvent)("wcadmin_tasklist_previewsite",C),null)},a,r].filter(e=>e.visible)},M=N(),I=Object(R.uniqueId)("activity-panel-header_"),F=(()=>{const{task:e}=n,t=b&&b.task_list_tracked_started_tasks,o=b&&b.help_panel_highlight_shown;return!(!(e&&"yes"!==o&&(t||{})[e]>1)||O)})();return Object(i.createElement)("div",null,Object(i.createElement)(z.H,{id:I,className:"screen-reader-text"},Object(U.__)("Store Activity","woocommerce-admin")),Object(i.createElement)(z.Section,{component:"aside",id:"woocommerce-activity-panel",className:"woocommerce-layout__activity-panel","aria-labelledby":I},Object(i.createElement)(Se,{tabs:M,tabOpen:l,selectedTab:o,onTabClick:(e,t)=>{e.onClick?e.onClick():((e,t)=>{let{name:n}=e;const i=n!==o&&""!==o&&t&&l;a||(r(n),u(t),m(i))})(e,t)}}),Object(i.createElement)(Le,{currentTab:!0,isPanelOpen:l,isPanelSwitching:d,tab:Object(R.find)(N(),{name:o}),content:(e=>{const{task:t}=n;switch(e){case"activity":return Object(i.createElement)(Ue,{hasAbbreviatedNotifications:y,thingsToDoNextCount:j});case"help":return Object(i.createElement)(Be,{taskName:t});default:return null}})(o),closePanel:()=>(c(!0),void u(!1)),clearPanel:()=>{l||(c(!1),m(!1),r(""))}})),F?Object(i.createElement)(Ne,{delay:1e3,useAnchor:!0,title:Object(U.__)("We're here for help","woocommerce-admin"),content:Object(U.__)("If you have any questions, feel free to explore the WooCommerce docs listed here.","woocommerce-admin"),closeButtonText:Object(U.__)("Got it","woocommerce-admin"),id:"activity-panel-tab-help",onClose:()=>(Object(D.recordEvent)("help_tooltip_click"),void(b&&h&&h({help_panel_highlight_shown:"yes"}))),onShow:()=>Object(D.recordEvent)("help_tooltip_view")}):null)};ze.defaultProps={getHistory:L.getHistory};var qe=ze;Object(F.registerPlugin)("activity-panel-header-item",{render:()=>Object(i.createElement)(le.a,{order:20},e=>{let{isEmbedded:t,query:n}=e;return window.wcAdminFeatures["activity-panels"]?Object(i.createElement)(qe,{isEmbedded:t,query:n}):null}),scope:"woocommerce-admin"});var He=n(262),$e=n.n(He);const Qe=()=>Object(i.createElement)("svg",{width:"37",height:"37",viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)("rect",{width:"92",height:"92",rx:"21.3953",fill:"#7F54B3"}),Object(i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M72.5937 28.043H19.8094C16.4781 28.0459 13.7783 30.7705 13.7754 34.1324V54.4501C13.7783 57.812 16.4781 60.5366 19.8094 60.5395H44.8229L56.2573 66.9607L53.6672 60.5395H72.599C74.2009 60.5402 75.7374 59.8983 76.8702 58.7552C78.0029 57.612 78.639 56.0614 78.6383 54.4447V34.1324C78.6376 32.5157 78.0002 30.9657 76.8664 29.8235C75.7327 28.6814 74.1956 28.0408 72.5937 28.043ZM19.1057 32.4208C18.4658 32.4324 17.8646 32.7359 17.467 33.2482C17.0888 33.7635 16.9404 34.4175 17.058 35.0502C18.5962 45.0986 20.0338 51.8757 21.371 55.3816C21.8779 56.658 22.4896 57.2703 23.2063 57.2185C24.3075 57.1489 25.6263 55.5968 27.1627 52.5621C27.9964 50.8412 29.2602 48.2662 30.9539 44.837C32.3785 49.88 34.309 53.6787 36.7456 56.2331C37.4291 56.9436 38.1204 57.2748 38.8195 57.2266C39.4185 57.1931 39.953 56.8315 40.217 56.2813C40.4753 55.7358 40.5806 55.1278 40.5211 54.5248C40.3516 52.0703 40.5919 48.667 41.2421 44.3149C41.9081 39.8057 42.7523 36.5818 43.7749 34.6432C43.9822 34.2526 44.0733 33.8087 44.037 33.366C44.0039 32.7587 43.7116 32.1969 43.2374 31.829C42.7745 31.4367 42.1799 31.2446 41.5803 31.2935C40.8334 31.3325 40.1682 31.7885 39.8499 32.4797C38.2331 35.5019 37.0812 40.4109 36.3943 47.2068C35.2823 44.2394 34.4509 41.1703 33.9114 38.0412C33.623 36.4613 32.9037 35.7125 31.7536 35.7946C30.9592 35.8589 30.3063 36.3944 29.7819 37.4012L24.0348 48.5643C23.0997 44.6692 22.2205 39.9289 21.3972 34.3433C21.1997 32.9652 20.4358 32.3244 19.1057 32.4208ZM69.9089 34.6877C71.6969 35.0381 73.2407 36.2 74.1186 37.8559C74.9693 39.3247 75.3946 41.1161 75.3946 43.23C75.4148 45.9567 74.7062 48.6357 73.3477 50.9687C71.7778 53.7023 69.7195 55.0691 67.1727 55.0691C66.6933 55.0668 66.2153 55.0128 65.7467 54.9078C63.9584 54.5581 62.4143 53.396 61.5371 51.7396C60.6864 50.2452 60.261 48.4411 60.261 46.3272C60.2357 43.6127 60.945 40.9454 62.3079 38.6295C63.9023 35.8959 65.9607 34.5291 68.4829 34.5291C68.9623 34.5304 69.4402 34.5836 69.9089 34.6877ZM68.7937 49.4848C69.7707 48.5773 70.4399 47.2269 70.8012 45.4337V45.4419C70.9315 44.7826 70.9959 44.1112 70.9933 43.4382C70.986 42.5849 70.8291 41.74 70.5302 40.9452C70.1443 39.901 69.6304 39.3124 68.9884 39.1793C68.0378 38.9643 67.1239 39.5256 66.2469 40.8632C65.5812 41.8393 65.109 42.9432 64.8577 44.1106C64.7276 44.7708 64.6632 45.4432 64.6657 46.1171C64.6739 46.9677 64.8308 47.8096 65.1287 48.6019C65.5146 49.6388 66.0294 50.2274 66.6731 50.3678C67.3169 50.5081 68.0237 50.2138 68.7937 49.4848ZM57.9079 37.8559C57.0291 36.2008 55.4854 35.0392 53.6976 34.6877C53.2279 34.5837 52.749 34.5306 52.2687 34.5291C49.7443 34.5291 47.6856 35.8959 46.0927 38.6295C44.7295 40.9454 44.0201 43.6127 44.0454 46.3272C44.0454 48.4411 44.4699 50.2452 45.319 51.7396C46.1976 53.3949 47.7414 54.5566 49.5294 54.9078C49.999 55.0126 50.4779 55.0667 50.9582 55.0691C53.5055 55.0691 55.5642 53.7023 57.1343 50.9687C58.4922 48.6355 59.2001 45.9565 59.1789 43.23C59.1789 41.1161 58.7544 39.3247 57.9053 37.8559H57.9079ZM54.5903 45.4337C54.2307 47.2269 53.5614 48.5773 52.5825 49.4848C51.8115 50.2065 51.101 50.5017 50.4589 50.3678C49.8169 50.2338 49.3011 49.6461 48.9169 48.6019C48.6181 47.8097 48.4603 46.9678 48.4511 46.1171C48.4495 45.4431 48.5148 44.7707 48.6459 44.1106C48.8971 42.9432 49.3694 41.8393 50.0353 40.8632C50.9124 39.5256 51.8264 38.9643 52.7773 39.1793C53.4193 39.3124 53.9333 39.901 54.3193 40.9452C54.617 41.7404 54.7739 42.585 54.7824 43.4382C54.785 44.1112 54.7207 44.7826 54.5903 45.4419V45.4337Z",fill:"white"}));n(300);const We=e=>{let{onInstall:t,onDismiss:n}=e;const[o,r]=Object(i.useState)(!1),c="android"==(/iPhone|iPad|iPod/i.test(window.navigator.userAgent)?"ios":/Android/i.test(window.navigator.userAgent)?"android":"unknown")&&!o;return Object(i.useEffect)(()=>{const e=document.getElementsByClassName("woocommerce-layout")[0];return c&&e&&e.classList.add("woocommerce-layout__show-app-banner"),()=>{e&&e.classList.remove("woocommerce-layout__show-app-banner")}},[c]),c?Object(i.createElement)("div",{className:"woocommerce-mobile-app-banner"},Object(i.createElement)(ve.a,{icon:Object(i.createElement)($e.a,{"data-testid":"dismiss-btn"}),onClick:()=>{n(),r(!0),Object(D.recordEvent)("wcadmin_mobile_android_banner_click",{action:"dismiss"})}}),Object(i.createElement)(Qe,null),Object(i.createElement)("div",{className:"woocommerce-mobile-app-banner__description"},Object(i.createElement)("p",{className:"woocommerce-mobile-app-banner__description__text"},Object(U.__)("Run your store from anywhere","woocommerce-admin")),Object(i.createElement)("p",{className:"woocommerce-mobile-app-banner__description__text"},Object(U.__)("Download the WooCommerce app","woocommerce-admin"))),Object(i.createElement)(a.Button,{href:"https://play.google.com/store/apps/details?id=com.woocommerce.android",isSecondary:!0,onClick:()=>{t(),r(!0),Object(D.recordEvent)("wcadmin_mobile_android_banner_click",{action:"install"})}},Object(U.__)("Install","woocommerce-admin"))):null};Object(F.registerPlugin)("mobile-banner-header-item",{render:()=>{const{updateUserPreferences:e,...t}=Object(V.useUserPreferences)(),n=()=>{e({android_app_banner_dismissed:"yes"})};return"yes"===t.android_app_banner_dismissed?null:Object(i.createElement)(le.a,null,Object(i.createElement)(We,{onDismiss:n,onInstall:n}))},scope:"woocommerce-admin"});n(301);const Ge=e=>0===e.indexOf("http")?e:Object(ae.getAdminLink)(e),Ye=e=>{const t=e.replace(/[-\/\\^$*+?.()|[\]{}]/gi,"\\$&"),[n,o,r]=t.split(/\\\?|#/),i=r?`(.*#${r}$)`:"";return"^"+n+(o?o.split("&").reduce((e,t)=>`${e}(?=.*[?|&]${t}(&|$|#))`,""):"")+i},Ze=e=>{let t=null,n=0;return e.forEach(e=>{const o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return 0;const o=Ge(t),{href:r}=e;if(o===r)return Number.MAX_SAFE_INTEGER;const i=Ye(o),a=new RegExp(n||i,"i");return(decodeURIComponent(r).match(a)||[]).length}(window.location,e.url,e.matchExpression);o>0&&o>=n&&(n=o,t=e)}),t||null},Je=["primary","favorites","plugins","secondary"],Ke={woocommerce:{id:"woocommerce",isCategory:!0,menuId:"primary",migrate:!0,order:10,parent:"",title:"WooCommerce"}};var Xe=n(9);var et=Object(i.createElement)(Xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(i.createElement)(Xe.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));var tt=()=>{const e=Object(ae.getSetting)("siteTitle",""),t=Object(ae.getSetting)("homeUrl",""),n=se(),[o,r]=Object(i.useState)(document.body.classList.contains(!1)),c="is-wc-nav-folded",l="is-wc-nav-expanded",u=()=>{document.body.classList.add(c),document.body.classList.remove(l),r(!0)},d=()=>{document.body.classList.remove(c),document.body.classList.add(l),r(!1)},m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body.clientWidth;e<=960?u():d()};Object(i.useEffect)(()=>{m();const e=[{eventName:"orientationchange",handler:e=>m(e.target.screen.availWidth)},{eventName:"resize",handler:Object(R.debounce)(()=>m(),200)}];for(const{eventName:t,handler:n}of e)window.addEventListener(t,n,!1);Object(L.addHistoryListener)(()=>m())},[]);let p=Object(i.createElement)(ve.a,{size:"36px",icon:et});const{isRequestingSiteIcon:f,siteIconUrl:h}=Object(s.useSelect)(e=>{const{isResolving:t}=e("core/data"),{getEntityRecord:n}=e("core"),o=n("root","__unstableBase",void 0)||{};return{isRequestingSiteIcon:t("core","getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:o.siteIconUrl}});h?p=Object(i.createElement)("img",{alt:Object(U.__)("Site Icon"),src:h}):f&&(p=null);const b=re()("woocommerce-navigation-header",{"is-scrolled":n});return Object(i.createElement)("div",{className:b},Object(i.createElement)(a.Button,{onClick:()=>{document.body.classList.contains(c)?d():u()},className:"woocommerce-navigation-header__site-icon","aria-label":"Fold navigation",role:"switch","aria-checked":o?"true":"false"},p),Object(i.createElement)(a.Button,{title:e,href:t,className:"woocommerce-navigation-header__site-title",as:"span"},Object(ie.decodeEntities)(e)))};n(302);var nt=Object(i.createElement)(Xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Xe.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));var ot=Object(i.createElement)(Xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Xe.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));n(303);const rt=e=>{let{id:t}=e;const{favorites:n,isResolving:o}=Object(s.useSelect)(e=>({favorites:e(V.NAVIGATION_STORE_NAME).getFavorites(),isResolving:e(V.NAVIGATION_STORE_NAME).isResolving("getFavorites")})),{addFavorite:r,removeFavorite:c}=Object(s.useDispatch)(V.NAVIGATION_STORE_NAME),l=n.includes(t);return o?null:Object(i.createElement)(a.Button,{id:"woocommerce-navigation-favorite-button",className:"woocommerce-navigation-favorite-button",isTertiary:!0,onClick:()=>{(l?c:r)(t),Object(D.recordEvent)("navigation_favorite",{id:t,action:l?"unfavorite":"favorite"})},"aria-label":l?Object(U.__)("Add this item to your favorites.","woocommerce-admin"):Object(U.__)("Remove this item from your favorites.","woocommerce-admin")},Object(i.createElement)(ve.a,{icon:l?nt:ot,className:`star-${l?"filled":"empty"}-icon`}))};const it="woocommerce_navigation_favorites_tooltip_hidden",at=()=>{const{isFavoritesResolving:e,isOptionResolving:t,isTooltipHidden:n}=Object(s.useSelect)(e=>{const{getOption:t,isResolving:n}=e(V.OPTIONS_STORE_NAME);return{isFavoritesResolving:e(V.NAVIGATION_STORE_NAME).isResolving("getFavorites"),isOptionResolving:n("getOption",[it]),isTooltipHidden:"yes"===t(it)}}),{updateOptions:o}=Object(s.useDispatch)(V.OPTIONS_STORE_NAME);return e||n||t||document.body.classList.contains("is-wc-nav-folded")?null:Object(i.createElement)(Ne,{delay:1e3,title:Object(U.__)("Introducing favorites","woocommerce-admin"),content:Object(U.__)("You can now favorite your extensions to pin them in the top level of the navigation.","woocommerce-admin"),closeButtonText:Object(U.__)("Got it","woocommerce-admin"),id:"woocommerce-navigation-favorite-button",onClose:()=>o({[it]:"yes"}),useAnchor:!0})};var ct=e=>{let{category:t}=e;const{id:n,menuId:o,title:r}=t,a="woocommerce-navigation-category-title";return["plugins","favorites"].includes(o)?Object(i.createElement)("span",{className:a},Object(i.createElement)("span",{className:a+"__text"},r),Object(i.createElement)(rt,{id:n}),Object(i.createElement)(at,null)):Object(i.createElement)("span",{className:a},r)};var st=e=>{var t;let{item:n}=e;const o=Object(ce.useSlot)("woocommerce_navigation_"+n.id),r=Boolean(null==o||null===(t=o.fills)||void 0===t?void 0:t.length),a=e=>{Object(D.recordEvent)("navigation_click",{menu_item:e})};return r&&!n.isCategory?Object(i.createElement)(ce.NavigationItem,{key:n.id,item:n.id},Object(i.createElement)("div",{onClick:()=>a(n.id)},Object(i.createElement)(L.WooNavigationItem.Slot,{name:n.id}))):Object(i.createElement)(ce.NavigationItem,{key:n.id,item:n.id,title:n.title,badge:n.badge?n.badge:null,href:n.url,navigateToMenu:!n.url&&n.id,onClick:()=>a(n.id),hideIfTargetMenuEmpty:!0})};const lt=e=>{let{category:t,onBackClick:n,pluginItems:o,primaryItems:r}=e;if(!r.length&&!o.length)return null;const a=Object(B.applyFilters)("woocommerce_navigation_root_back_label",Object(U.__)("WordPress Dashboard","woocommerce-admin")),c=Object(B.applyFilters)("woocommerce_navigation_root_back_url",window.wcNavigation.rootBackUrl),s="woocommerce"===t.id&&c;return Object(i.createElement)(ce.NavigationMenu,{title:Object(i.createElement)(ct,{category:t}),menu:t.id,parentMenu:t.parent,backButtonLabel:s?a:t.backButtonLabel||null,onBackButtonClick:s?()=>{n("woocommerce"),window.location=c}:()=>n(t.id)},!!r.length&&Object(i.createElement)(ce.NavigationGroup,null,r.map(e=>Object(i.createElement)(st,{key:e.id,item:e}))),!!o.length&&Object(i.createElement)(ce.NavigationGroup,{title:"woocommerce"===t.id?Object(U.__)("Extensions","woocommerce-admin"):null},o.map(e=>Object(i.createElement)(st,{key:e.id,item:e}))))},ut=e=>{let{category:t,items:n,onBackClick:o}=e;if(!n.length)return null;const r="woocommerce"===t.id;return Object(i.createElement)(ce.NavigationMenu,{className:"components-navigation__menu-secondary",title:!r&&Object(i.createElement)(ct,{category:t}),menu:t.id,parentMenu:t.parent,backButtonLabel:t.backButtonLabel||null,onBackButtonClick:r?null:()=>o(t.id)},Object(i.createElement)(ce.NavigationGroup,{onBackButtonClick:()=>o(t.id)},n.map(e=>Object(i.createElement)(st,{key:e.id,item:e}))))};var dt=()=>{const{menuItems:e}=Object(s.useSelect)(e=>({menuItems:e(V.NAVIGATION_STORE_NAME).getMenuItems()}));Object(i.useEffect)(()=>{document.documentElement.classList.remove("wp-toolbar"),document.body.classList.add("has-woocommerce-navigation");const e=document.getElementById("adminmenumain");e&&e.classList.add("folded")},[]);const[t,n]=Object(i.useState)("woocommerce-home"),[o,r]=Object(i.useState)("woocommerce");Object(i.useEffect)(()=>{const o=Ze(e);o&&t!==o&&(n(o),r(o.parent));return Object(L.addHistoryListener)(()=>{setTimeout(()=>{const t=Ze(e);t&&(n(t),r(t.parent))},0)})},[e]);const{currentUserCan:a}=Object(V.useUser)(),{categories:c,items:l}=Object(i.useMemo)(()=>((e,t)=>{const n={...Ke};return{items:(e=>e.sort((e,t)=>e.order===t.order?e.title.localeCompare(t.title):e.order-t.order))(e).reduce((e,o)=>{if(e[o.parent]||(e[o.parent]={},Je.forEach(t=>{e[o.parent][t]=[]})),!e[o.parent][o.menuId])return e;if(t&&o.capability&&!t(o.capability))return e;o.isCategory&&(n[o.id]=o);const r=e[o.parent][o.menuId];return r&&r.push(o),e},{}),categories:n}})(e,a),[e,a]),u=Object(i.useRef)(null),d=e=>{Object(D.recordEvent)("navigation_back_click",{category:e})},m="woocommerce"===o,p=re()("woocommerce-navigation",{"is-root":m});return Object(i.createElement)("div",{className:p},Object(i.createElement)(tt,null),Object(i.createElement)("div",{className:"woocommerce-navigation__wrapper",ref:u},Object(i.createElement)(ce.Navigation,{activeItem:t?t.id:null,activeMenu:o,onActivateMenu:function(){u&&u.current&&(u.current.scrollTop=0),r(...arguments)}},Object.values(c).map(e=>{const t=l[e.id];return!!t&&[Object(i.createElement)(lt,{key:e.id,category:e,onBackClick:d,primaryItems:[...t.primary,...t.favorites],pluginItems:t.plugins}),Object(i.createElement)(ut,{key:"secondary/"+e.id,category:e,onBackClick:d,items:t.secondary})]}))))};var mt=Object(V.withNavigationHydration)(window.wcNavigation)(dt);Object(F.registerPlugin)("wc-admin-navigation",{render:()=>{const{persistedQuery:e}=Object(s.useSelect)(e=>({persistedQuery:e(V.NAVIGATION_STORE_NAME).getPersistedQuery()}));if(!window.wcAdminFeatures.navigation)return null;if(!Object(H.f)(window.location.href))return Object(i.createElement)(le.b,{order:-100},Object(i.createElement)(mt,null));const t=Object(q.a)().filter(e=>e.navArgs),n=te().filter(e=>e.navArgs).map(e=>"/analytics/settings"===e.path?{...e,breadcrumbs:[Object(U.__)("Analytics","woocommerce-admin")]}:e);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(le.b,{order:-100},Object(i.createElement)(mt,null)),n.map(t=>Object(i.createElement)(L.WooNavigationItem,{item:t.navArgs.id,key:t.navArgs.id},Object(i.createElement)(z.Link,{className:"components-button",href:Object(L.getNewPath)(Object(L.pathIsExcluded)(t.path)?{}:e,t.path,{}),type:"wc-admin"},t.breadcrumbs[t.breadcrumbs.length-1]))),t.map(t=>Object(i.createElement)(L.WooNavigationItem,{item:t.navArgs.id,key:t.navArgs.id},Object(i.createElement)(z.Link,{className:"components-button",href:Object(L.getNewPath)(Object(L.pathIsExcluded)(t.report)?{}:e,"/analytics/"+t.report,{}),type:"wc-admin"},t.title))))},scope:"woocommerce-navigation"});const pt=Object(i.lazy)(()=>Promise.all([n.e(1),n.e(49)]).then(n.bind(null,659))),ft=Object(i.lazy)(()=>n.e(55).then(n.bind(null,548)));class ht extends i.Component{render(){const{children:e}=this.props;return Object(i.createElement)("div",{className:"woocommerce-layout__primary",id:"woocommerce-layout__primary"},window.wcAdminFeatures["store-alerts"]&&Object(i.createElement)(i.Suspense,{fallback:null},Object(i.createElement)(pt,null)),Object(i.createElement)(me,null),e)}}class bt extends i.Component{componentDidMount(){this.recordPageViewTrack()}componentDidUpdate(e){const t=Object(R.get)(e,"location.pathname"),n=Object(R.get)(this.props,"location.pathname");t&&n&&t!==n&&this.recordPageViewTrack()}recordPageViewTrack(){const{activePlugins:e,installedPlugins:t,isEmbedded:n,isJetpackConnected:o}=this.props,r={has_navigation:!!window.wcNavigation};if(n){const e=document.location.pathname+document.location.search;return void Object(D.recordPageView)(e,{is_embedded:!0,...r})}const i=Object(R.get)(this.props,"location.pathname");if(!i)return;let a=i.substring(1).replace(/\//g,"_");0===a.length&&(a="home_screen"),Object(D.recordPageView)(a,{jetpack_installed:t.includes("jetpack"),jetpack_active:e.includes("jetpack"),jetpack_connected:o,...r})}getQuery(e){if(!e)return{};const t=e.substring(1);return Object(I.parse)(t)}isWCPaySettingsPage(){const{page:e,section:t,tab:n}=Object(L.getQuery)();return"wc-settings"===e&&"checkout"===n&&"woocommerce_payments"===t}render(){const{isEmbedded:e,...t}=this.props,{location:n,page:o}=this.props,{breadcrumbs:c}=o,s=this.getQuery(n&&n.search);return Object(i.createElement)(a.SlotFillProvider,null,Object(i.createElement)("div",{className:"woocommerce-layout"},Object(i.createElement)(ue,{sections:Object(R.isFunction)(c)?c(this.props):c,isEmbedded:e,query:s}),Object(i.createElement)(we,null),!e&&Object(i.createElement)(ht,null,Object(i.createElement)("div",{className:"woocommerce-layout__main"},Object(i.createElement)(ne,r()({},t,{query:s})))),e&&this.isWCPaySettingsPage()&&Object(i.createElement)(i.Suspense,{fallback:null},Object(i.createElement)(ft,null))),Object(i.createElement)(F.PluginArea,{scope:"woocommerce-admin"}),window.wcAdminFeatures.navigation&&Object(i.createElement)(F.PluginArea,{scope:"woocommerce-navigation"}),Object(i.createElement)(F.PluginArea,{scope:"woocommerce-tasks"}))}}bt.propTypes={isEmbedded:M.a.bool,page:M.a.shape({container:M.a.oneOfType([M.a.func,M.a.object]),path:M.a.string,breadcrumbs:M.a.oneOfType([M.a.func,M.a.arrayOf(M.a.oneOfType([M.a.arrayOf(M.a.string),M.a.string]))]).isRequired,wpOpenMenu:M.a.string}).isRequired};const gt=Object($.d)("dataEndpoints"),wt=Object(c.compose)(Object(V.withPluginsHydration)({...Object($.d)("plugins",{}),jetpackStatus:gt&>.jetpackStatus||!1}),Object(s.withSelect)((e,t)=>{let{isEmbedded:n}=t;if(n)return;const{getActivePlugins:o,getInstalledPlugins:r,isJetpackConnected:i}=e(V.PLUGINS_STORE_NAME);return{activePlugins:o(),isJetpackConnected:i(),installedPlugins:r()}}))(bt),vt=Object(c.compose)(window.wcSettings.admin?Object(V.withOptionsHydration)({...Object($.d)("preloadOptions",{})}):R.identity)(()=>{const{currentUserCan:e}=Object(V.useUser)();return Object(i.createElement)(O,{history:Object(L.getHistory)()},Object(i.createElement)(P,null,te().filter(t=>!t.capability||e(t.capability)).map(e=>Object(i.createElement)(k,{key:e.path,path:e.path,exact:!0,render:t=>Object(i.createElement)(wt,r()({page:e},t))}))))}),yt=Object(c.compose)(Object($.d)("preloadOptions")?Object(V.withOptionsHydration)({...Object($.d)("preloadOptions")}):R.identity)(()=>Object(i.createElement)(wt,{page:{breadcrumbs:Object($.d)("embedBreadcrumbs",[])},isEmbedded:!0}))},122:function(e,t){e.exports=window.wc.number},123:function(e,t){e.exports=window.wc.explat},129:function(e,t){e.exports=window.wp.notices},13:function(e,t){e.exports=window.wc.navigation},130:function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var s,l=[],u=!1,d=-1;function m(){u&&s&&(u=!1,s.length?l=s.concat(l):d=-1,l.length&&p())}function p(){if(!u){var e=c(m);u=!0;for(var t=l.length;t;){for(s=l,l=[];++d<t;)s&&s[d].run();d=-1,t=l.length}s=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||u||c(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},131:function(e,t,n){"use strict";var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,u=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.async_mode"):60111,m=o?Symbol.for("react.concurrent_mode"):60111,p=o?Symbol.for("react.forward_ref"):60112,f=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.suspense_list"):60120,b=o?Symbol.for("react.memo"):60115,g=o?Symbol.for("react.lazy"):60116,w=o?Symbol.for("react.block"):60121,v=o?Symbol.for("react.fundamental"):60117,y=o?Symbol.for("react.responder"):60118,O=o?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case m:case a:case s:case c:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case g:case b:case l:return e;default:return t}}case i:return t}}}function _(e){return j(e)===m}t.AsyncMode=d,t.ConcurrentMode=m,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=b,t.Portal=i,t.Profiler=s,t.StrictMode=c,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||j(e)===d},t.isConcurrentMode=_,t.isContextConsumer=function(e){return j(e)===u},t.isContextProvider=function(e){return j(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return j(e)===p},t.isFragment=function(e){return j(e)===a},t.isLazy=function(e){return j(e)===g},t.isMemo=function(e){return j(e)===b},t.isPortal=function(e){return j(e)===i},t.isProfiler=function(e){return j(e)===s},t.isStrictMode=function(e){return j(e)===c},t.isSuspense=function(e){return j(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===m||e===s||e===c||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===b||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===v||e.$$typeof===y||e.$$typeof===O||e.$$typeof===w)},t.typeOf=j},14:function(e,t){e.exports=window.wp.compose},15:function(e,t){e.exports=window.wc.wcSettings},16:function(e,t){e.exports=window.wp.url},161:function(e,t,n){"use strict";n.d(t,"animated",(function(){return _}));var o=n(119);n.o(o,"useTransition")&&n.d(t,"useTransition",(function(){return o.useTransition}));var r=n(30),i=n(3),a=n(33);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}const s=["style","children","scrollTop","scrollLeft"],l=/^--/;function u(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||l.test(e)||m.hasOwnProperty(e)&&m[e]?(""+t).trim():t+"px"}const d={};let m={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const p=["Webkit","Ms","Moz","O"];m=Object.keys(m).reduce((e,t)=>(p.forEach(n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t]),e),m);const f=["x","y","z"],h=/^(matrix|translate|scale|rotate|skew)/,b=/^(translate)/,g=/^(rotate|skew)/,w=(e,t)=>i.s.num(e)&&0!==e?e+t:e,v=(e,t)=>i.s.arr(e)?e.every(e=>v(e,t)):i.s.num(e)?e===t:parseFloat(e)===t;class y extends a.a{constructor(e){let{x:t,y:n,z:o}=e,r=c(e,f);const a=[],s=[];(t||n||o)&&(a.push([t||0,n||0,o||0]),s.push(e=>[`translate3d(${e.map(e=>w(e,"px")).join(",")})`,v(e,0)])),Object(i.l)(r,(e,t)=>{if("transform"===t)a.push([e||""]),s.push(e=>[e,""===e]);else if(h.test(t)){if(delete r[t],i.s.und(e))return;const n=b.test(t)?"px":g.test(t)?"deg":"";a.push(Object(i.y)(e)),s.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${w(r,n)})`,v(r,0)]:e=>[`${t}(${e.map(e=>w(e,n)).join(",")})`,v(e,t.startsWith("scale")?1:0)])}}),a.length&&(r.transform=new O(a,s)),super(r)}}class O extends i.a{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Object(i.k)(this.inputs,(n,o)=>{const r=Object(i.q)(n[0]),[a,c]=this.transforms[o](i.s.arr(r)?r:n.map(i.q));e+=" "+a,t=t&&c}),t?"none":e}observerAdded(e){1==e&&Object(i.k)(this.inputs,e=>Object(i.k)(e,e=>Object(i.r)(e)&&Object(i.c)(e,this)))}observerRemoved(e){0==e&&Object(i.k)(this.inputs,e=>Object(i.k)(e,e=>Object(i.r)(e)&&Object(i.x)(e,this)))}eventObserved(e){"change"==e.type&&(this._value=null),Object(i.d)(this,e)}}const j=["scrollTop","scrollLeft"];o.Globals.assign({batchedUpdates:r.unstable_batchedUpdates,createStringInterpolator:i.g,colors:i.e});const _=Object(a.d)(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:r,children:i,scrollTop:a,scrollLeft:m}=o,p=c(o,s),f=Object.values(p),h=Object.keys(p).map(t=>n||e.hasAttribute(t)?t:d[t]||(d[t]=t.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())));void 0!==i&&(e.textContent=i);for(let t in r)if(r.hasOwnProperty(t)){const n=u(t,r[t]);l.test(t)?e.style.setProperty(t,n):e.style[t]=n}h.forEach((t,n)=>{e.setAttribute(t,f[n])}),void 0!==a&&(e.scrollTop=a),void 0!==m&&(e.scrollLeft=m)},createAnimatedStyle:e=>new y(e),getComponentProps:e=>c(e,j)}).animated},162:function(e,t,n){"use strict";(function(e){var o=n(6),r=n.n(o),i=n(27),a=n(1),c=n.n(a),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:{};function l(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,o){e=n,t.forEach((function(t){return t(e,o)}))}}}var u=r.a.createContext||function(e,t){var n,r,a,u="__create-react-context-"+((s[a="__global_unique_id__"]=(s[a]||0)+1)+"__"),d=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=l(t.props.value),t}Object(i.a)(n,e);var o=n.prototype;return o.getChildContext=function(){var e;return(e={})[u]=this.emitter,e},o.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,o=this.props.value,r=e.value;((i=o)===(a=r)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof t?t(o,r):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,a},o.render=function(){return this.props.children},n}(o.Component);d.childContextTypes=((n={})[u]=c.a.object.isRequired,n);var m=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var o=n.prototype;return o.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},o.componentDidMount=function(){this.context[u]&&this.context[u].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},o.componentWillUnmount=function(){this.context[u]&&this.context[u].off(this.onUpdate)},o.getValue=function(){return this.context[u]?this.context[u].get():e},o.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(o.Component);return m.contextTypes=((r={})[u]=c.a.object,r),{Provider:d,Consumer:m}};t.a=u}).call(this,n(81))},163:function(e,t,n){var o=n(304);e.exports=p,e.exports.parse=i,e.exports.compile=function(e,t){return c(i(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=m;var r=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,o=[],i=0,a=0,c="",u=t&&t.delimiter||"/";null!=(n=r.exec(e));){var d=n[0],m=n[1],p=n.index;if(c+=e.slice(a,p),a=p+d.length,m)c+=m[1];else{var f=e[a],h=n[2],b=n[3],g=n[4],w=n[5],v=n[6],y=n[7];c&&(o.push(c),c="");var O=null!=h&&null!=f&&f!==h,j="+"===v||"*"===v,_="?"===v||"*"===v,E=n[2]||u,k=g||w;o.push({name:b||i++,prefix:h||"",delimiter:E,optional:_,repeat:j,partial:O,asterisk:!!y,pattern:k?l(k):y?".*":"[^"+s(E)+"]+?"})}}return a<e.length&&(c+=e.substr(a)),c&&o.push(c),o}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function c(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)"object"==typeof e[r]&&(n[r]=new RegExp("^(?:"+e[r].pattern+")$",d(t)));return function(t,r){for(var i="",c=t||{},s=(r||{}).pretty?a:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var d,m=c[u.name];if(null==m){if(u.optional){u.partial&&(i+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(o(m)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(m)+"`");if(0===m.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var p=0;p<m.length;p++){if(d=s(m[p]),!n[l].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");i+=(0===p?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(m).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(m),!n[l].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');i+=u.prefix+d}}else i+=u}return i}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function m(e,t,n){o(t)||(n=t||n,t=[]);for(var r=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<e.length;c++){var l=e[c];if("string"==typeof l)a+=s(l);else{var m=s(l.prefix),p="(?:"+l.pattern+")";t.push(l),l.repeat&&(p+="(?:"+m+p+")*"),a+=p=l.optional?l.partial?m+"("+p+")?":"(?:"+m+"("+p+"))?":m+"("+p+")"}}var f=s(n.delimiter||"/"),h=a.slice(-f.length)===f;return r||(a=(h?a.slice(0,-f.length):a)+"(?:"+f+"(?=$))?"),a+=i?"$":r&&h?"":"(?="+f+"|$)",u(new RegExp("^"+a,d(n)),t)}function p(e,t,n){return o(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var o=0;o<n.length;o++)t.push({name:o,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):o(e)?function(e,t,n){for(var o=[],r=0;r<e.length;r++)o.push(p(e[r],t,n).source);return u(new RegExp("(?:"+o.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return m(i(e,n),t,n)}(e,t,n)}},168:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return p}));var o=n(0),r=n(4),i=n(8),a=n(2),c=n(12),s=n(17);const l=()=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"24",height:"24",viewBox:"3 3 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M13.8053 15.3982C13.8053 15.7965 13.4867 16.1947 13.0089 16.1947H6.79646C6.55752 16.1947 6.39823 16.115 6.23894 15.9558C6.07965 15.7965 6 15.6372 6 15.3982V6.79646C6 6.63717 6.15929 6.39823 6.23894 6.23894C6.39823 6.07965 6.55752 6 6.79646 6H13.0089C13.4071 6 13.8053 6.31858 13.8053 6.79646V15.3982Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(o.createElement)("path",{d:"M23.9203 10.6195C23.9203 11.0177 23.6017 11.4159 23.1238 11.4159H16.9115C16.6725 11.4159 16.5132 11.3363 16.3539 11.177C16.1946 11.0177 16.115 10.8584 16.115 10.6195V6.79646C16.115 6.39823 16.4336 6 16.9115 6H23.1238C23.5221 6 23.9203 6.31858 23.9203 6.79646V10.6195Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(o.createElement)("path",{d:"M13.8053 23.2035C13.8053 23.4424 13.7257 23.6017 13.5664 23.761C13.4071 23.9203 13.2478 23.9999 13.0089 23.9999H6.79646C6.39823 23.9999 6 23.6813 6 23.2035V19.3804C6 19.1415 6.07965 18.9822 6.23894 18.8229C6.39823 18.6636 6.55752 18.584 6.79646 18.584H13.0089C13.4071 18.584 13.8053 18.9026 13.8053 19.3804V23.2035Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(o.createElement)("path",{d:"M16.9912 23.9999C16.7522 23.9999 16.5929 23.9202 16.4336 23.7609C16.2743 23.6016 16.1947 23.4423 16.1947 23.2034V14.6016C16.1947 14.3627 16.2743 14.2034 16.4336 14.0441C16.5929 13.8848 16.7522 13.8052 16.9912 13.8052H23.2036C23.4425 13.8052 23.6018 13.8848 23.7611 14.0441C23.9204 14.2034 24 14.3627 24 14.6016V23.2034C24 23.6016 23.6814 23.9999 23.2036 23.9999H16.9912Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),Object(a.__)("Display","woocommerce-admin")),{Fill:u,Slot:d}=Object(r.createSlotFill)("DisplayOptions");u.Slot=d;const m=[{value:"single_column",label:Object(o.createElement)(o.Fragment,null,Object(o.createElement)(()=>Object(o.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("rect",{x:"0.5",y:"0.5",width:"11",height:"13",strokeWidth:"1"})),null),Object(a.__)("Single column","woocommerce-admin"))},{value:"two_columns",label:Object(o.createElement)(o.Fragment,null,Object(o.createElement)(()=>Object(o.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("rect",{x:"0.5",y:"0.5",width:"7",height:"13",strokeWidth:"1"}),Object(o.createElement)("rect",{x:"9.5",y:"0.5",width:"7",height:"13",strokeWidth:"1"})),null),Object(a.__)("Two columns","woocommerce-admin"))}],p=()=>{const{defaultHomescreenLayout:e,taskListComplete:t,isTaskListHidden:n}=Object(i.useSelect)(e=>{const{getOption:t}=e(c.OPTIONS_STORE_NAME),{getTaskList:n}=e(c.ONBOARDING_STORE_NAME),o=n("setup");return{defaultHomescreenLayout:t("woocommerce_default_homepage_layout")||"single_column",taskListComplete:null==o?void 0:o.isComplete,isTaskListHidden:null==o?void 0:o.isHidden}}),{updateUserPreferences:u,homepage_layout:p}=Object(c.useUserPreferences)(),f=t||n||window.wcAdminFeatures.analytics;return Object(o.createElement)(d,null,t=>0!==t.length||f?Object(o.createElement)(r.DropdownMenu,{icon:Object(o.createElement)(l,null),label:Object(a.__)("Display options","woocommerce-admin"),toggleProps:{className:"woocommerce-layout__activity-panel-tab display-options",onClick:()=>Object(s.recordEvent)("homescreen_display_click")},popoverProps:{className:"woocommerce-layout__activity-panel-popover"}},n=>{let{onClose:i}=n;return Object(o.createElement)(o.Fragment,null,t,f?Object(o.createElement)(r.MenuGroup,{className:"woocommerce-layout__homescreen-display-options",label:Object(a.__)("Layout","woocommerce-admin")},Object(o.createElement)(r.MenuItemsChoice,{choices:m,onSelect:e=>{u({homepage_layout:e}),i(),Object(s.recordEvent)("homescreen_display_option",{display_option:e})},value:p||e})):null)}):null)}},17:function(e,t){e.exports=window.wc.tracks},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(0),r=n(2),i=n(4),a=n(18);const c=()=>Object(o.createElement)("div",{className:"woocommerce-layout__no-match"},Object(o.createElement)(i.Card,null,Object(o.createElement)(i.CardBody,null,Object(o.createElement)(a.Text,null,Object(r.__)("Sorry, you are not allowed to access this page.","woocommerce-admin")))))},174:function(e,t){},175:function(e,t){},176:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return c}));var o=n(5);function r(e,t){return Object(o.filter)(e,e=>{const{is_deleted:n,date_created_gmt:o,status:r}=e;if(!n){return(!t||!o||new Date(o+"Z").getTime()>t)&&"unactioned"===r}}).length}function i(e){return Object(o.filter)(e,e=>{const{is_deleted:t}=e;return!t}).length>0}const a=(e,t)=>{const n=document.createElement("div"),r=Array.from(e.childNodes);for(let e=0;e<r.length;e++){let i=r[e].cloneNode(!0);if(!(n.textContent.length+i.textContent.length<=t)){const e=t-n.textContent.length;i.innerHTML&&i.textContent.slice(0,e)!==i.innerHTML.slice(0,e)?i=a(i,e):i.textContent=Object(o.truncate)(i.textContent,{length:e,separator:" ",omission:""}),n.appendChild(i);break}n.appendChild(i)}return n},c=(e,t)=>{const n=document.createElement("div");return n.innerHTML=e,n.textContent.length>t?a(n,t).innerHTML+"...":e}},18:function(e,t){e.exports=window.wc.experimental},19:function(e,t){e.exports=window.wp.apiFetch},2:function(e,t){e.exports=window.wp.i18n},20:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n(6);function r(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function i(e,t){let n,r,a=[];for(let o=0;o<e.length;o++){const i=e[o];if("string"!==i.type){if(void 0===t[i.value])throw new Error(`Invalid interpolation, missing component node: \`${i.value}\``);if("object"!=typeof t[i.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${i.value}\``);if("componentClose"===i.type)throw new Error(`Missing opening component token: \`${i.value}\``);if("componentOpen"===i.type){n=t[i.value],r=o;break}a.push(t[i.value])}else a.push(i.value)}if(n){const c=function(e,t){const n=t[e];let o=0;for(let r=e+1;r<t.length;r++){const e=t[r];if(e.value===n.value){if("componentOpen"===e.type){o++;continue}if("componentClose"===e.type){if(0===o)return r;o--}}}throw new Error("Missing closing component token `"+n.value+"`")}(r,e),s=i(e.slice(r+1,c),t),l=Object(o.cloneElement)(n,{},s);if(a.push(l),c<e.length-1){const n=i(e.slice(c+1),t);a=a.concat(n)}}return a=a.filter(Boolean),0===a.length?null:1===a.length?a[0]:Object(o.createElement)(o.Fragment,null,...a)}function a(e){const{mixedString:t,components:n,throwErrors:o}=e;if(!n)return t;if("object"!=typeof n){if(o)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const a=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}(t);try{return i(a,n)}catch(e){if(o)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}},21:function(e,t){e.exports=window.wc.date},22:function(e,t){e.exports=window.wc.components},23:function(e,t,n){"use strict";n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return m}));var o=n(2),r=n(15);const i=["wcAdminSettings","preloadSettings"],a=Object(r.getSetting)("admin",{}),c=Object.keys(a).reduce((e,t)=>(i.includes(t)||(e[t]=a[t]),e),{});function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e;if(i.includes(e))throw new Error(Object(o.__)("Mutable settings should be accessed via data store."));const r=c.hasOwnProperty(e)?c[e]:t;return n(r,t)}Object(r.getSetting)("adminUrl"),Object(r.getSetting)("countries");const l=Object(r.getSetting)("currency"),u=Object(r.getSetting)("locale"),d=(Object(r.getSetting)("siteTitle"),Object(r.getSetting)("wcAssetUrl"),s("orderStatuses"));function m(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e;if(i.includes(e))throw new Error(Object(o.__)("Mutable settings should be mutated via data store."));c[e]=n(t)}},24:function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return o}))},257:function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return y}));var o=n(0),r=n(2),i=n(18),a=n(17),c=n(22),s=n(8),l=n(12),u=n(523),d=n(9);var m=Object(o.createElement)(d.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(d.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})),p=n(524),f=n(4),h=n(74),b=n(104),g=n(69);const w=()=>Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(o.createElement)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"})),v="AbbreviatedNotification",y=e=>{let{thingsToDoNextCount:t}=e;const{ordersToProcessCount:n,reviewsToModerateCount:d,stockNoticesCount:y,isSetupTaskListHidden:O,isExtendedTaskListHidden:j}=Object(s.useSelect)(e=>{var t,n;const{getTaskList:o}=e(l.ONBOARDING_STORE_NAME),r=Object(h.c)(e);return{ordersToProcessCount:Object(h.d)(e,r),reviewsToModerateCount:Object(b.b)(e),stockNoticesCount:Object(h.a)(e),isSetupTaskListHidden:null===(t=o("setup"))||void 0===t?void 0:t.isHidden,isExtendedTaskListHidden:null===(n=o("extended"))||void 0===n?void 0:n.isHidden}}),_=e=>{Object(a.recordEvent)("activity_panel_click",{task:e})},{Slot:E}=Object(f.createSlotFill)(v),k=Object(g.f)(window.location.href);return Object(o.createElement)("div",{className:"woocommerce-abbreviated-notifications"},t>0&&!j&&Object(o.createElement)(c.AbbreviatedCard,{className:"woocommerce-abbreviated-notification",icon:Object(o.createElement)(w,null),href:"admin.php?page=wc-admin#extended_task_list",onClick:()=>_("thingsToDoNext"),type:k?"wc-admin":"wp-admin"},Object(o.createElement)(i.Text,{as:"h3"},Object(r.__)("Things to do next","woocommerce-admin")),Object(o.createElement)(i.Text,{as:"p"},Object(r.sprintf)(Object(r._n)("You have %d new thing to do","You have %d new things to do",t,"woocommerce-admin"),t))),n>0&&O&&Object(o.createElement)(c.AbbreviatedCard,{className:"woocommerce-abbreviated-notification",icon:u.a,href:"admin.php?page=wc-admin&opened_panel=orders-panel",onClick:()=>_("ordersToProcess"),type:k?"wc-admin":"wp-admin"},Object(o.createElement)(i.Text,{as:"h3"},Object(r.__)("Orders to fulfill","woocommerce-admin")),Object(o.createElement)(i.Text,null,Object(r.sprintf)(Object(r._n)("You have %d order to fulfill","You have %d orders to fulfill",n,"woocommerce-admin"),n))),d>0&&O&&Object(o.createElement)(c.AbbreviatedCard,{className:"woocommerce-abbreviated-notification",icon:m,href:"admin.php?page=wc-admin&opened_panel=reviews-panel",onClick:()=>_("reviewsToModerate"),type:k?"wc-admin":"wp-admin"},Object(o.createElement)(i.Text,{as:"h3"},Object(r.__)("Reviews to moderate","woocommerce-admin")),Object(o.createElement)(i.Text,null,Object(r.sprintf)(Object(r._n)("You have %d review to moderate","You have %d reviews to moderate",d,"woocommerce-admin"),d))),y>0&&O&&Object(o.createElement)(c.AbbreviatedCard,{className:"woocommerce-abbreviated-notification",icon:p.a,href:"admin.php?page=wc-admin&opened_panel=stock-panel",onClick:()=>_("stockNotices"),type:k?"wc-admin":"wp-admin"},Object(o.createElement)(i.Text,{as:"h3"},Object(r.__)("Inventory to review","woocommerce-admin")),Object(o.createElement)(i.Text,null,Object(r.__)("You have inventory to review and update","woocommerce-admin"))),!j&&Object(o.createElement)(E,null))}},258:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return w}));var o=n(0),r=n(2),i=n(28),a=n(20),c=n(32),s=n(22),l=n(12),u=n(21);var d=e=>{let{value:t,onChange:n}=e;const{wcAdminSettings:r}=Object(l.useSettings)("wc_admin",["wcAdminSettings"]),{woocommerce_default_date_range:i}=r,a=Object(c.parse)(t.replace(/&/g,"&")),{period:d,compare:m,before:p,after:f}=Object(u.getDateParamsFromQuery)(a,i),{primary:h,secondary:b}=Object(u.getCurrentDates)(a,i),g={period:d,compare:m,before:p,after:f,primaryDate:h,secondaryDate:b};return Object(o.createElement)(s.DateRangeFilterPicker,{query:a,onRangeSelect:e=>{n({target:{name:"woocommerce_default_date_range",value:Object(c.stringify)(e)}})},dateQuery:g,isoDateFormat:u.isoDateFormat})},m=n(23);const p=["processing","on-hold"],f=["completed","processing","refunded","cancelled","failed","pending","on-hold"],h=Object.keys(m.c).filter(e=>"refunded"!==e).map(e=>({value:e,label:m.c[e],description:Object(r.sprintf)(Object(r.__)("Exclude the %s status from reports","woocommerce-admin"),m.c[e])})),b=Object(m.d)("unregisteredOrderStatuses",{}),g=[{key:"defaultStatuses",options:h.filter(e=>f.includes(e.value))},{key:"customStatuses",label:Object(r.__)("Custom Statuses","woocommerce-admin"),options:h.filter(e=>!f.includes(e.value))},{key:"unregisteredStatuses",label:Object(r.__)("Unregistered Statuses","woocommerce-admin"),options:Object.keys(b).map(e=>({value:e,label:e,description:Object(r.sprintf)(Object(r.__)("Exclude the %s status from reports","woocommerce-admin"),e)}))}],w=Object(i.applyFilters)("woocommerce_admin_analytics_settings",{woocommerce_excluded_report_order_statuses:{label:Object(r.__)("Excluded statuses:","woocommerce-admin"),inputType:"checkboxGroup",options:g,helpText:Object(a.a)({mixedString:Object(r.__)("Orders with these statuses are excluded from the totals in your reports. The {{strong}}Refunded{{/strong}} status can not be excluded.","woocommerce-admin"),components:{strong:Object(o.createElement)("strong",null)}}),defaultValue:["pending","cancelled","failed"]},woocommerce_actionable_order_statuses:{label:Object(r.__)("Actionable statuses:","woocommerce-admin"),inputType:"checkboxGroup",options:g,helpText:Object(r.__)("Orders with these statuses require action on behalf of the store admin. These orders will show up in the Home Screen - Orders task.","woocommerce-admin"),defaultValue:p},woocommerce_default_date_range:{name:"woocommerce_default_date_range",label:Object(r.__)("Default date range:","woocommerce-admin"),inputType:"component",component:d,helpText:Object(r.__)("Select a default date range. When no range is selected, reports will be viewed by the default date range.","woocommerce-admin"),defaultValue:"period=month&compare=previous_year"}})},259:function(e,t,n){"use strict";(function(e){var o=n(0),r=n(5),i=n(7),a=n.n(i),c=n(260),s=n(2),l=(n(261),n(4));t.a=Object(o.forwardRef)((function(t,n){let{className:i,children:u,spokenMessage:d=u,politeness:m="polite",actions:p=[],onRemove:f=r.noop,icon:h=null,explicitDismiss:b=!1,onDismiss:g=null,__unstableHTML:w=!1}=t;function v(e){e&&e.preventDefault&&e.preventDefault(),g(),f()}g=g||r.noop,function(e,t){const n="string"==typeof e?e:Object(o.renderToString)(e);Object(o.useEffect)(()=>{n&&Object(c.speak)(n,t)},[n,t])}(d,m),Object(o.useEffect)(()=>{const e=setTimeout(()=>{b||(g(),f())},1e4);return()=>clearTimeout(e)},[b,g,f]);const y=a()(i,"components-snackbar",{"components-snackbar-explicit-dismiss":!!b});p&&p.length>1&&(void 0!==e&&e.env,p=[p[0]]);const O=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!h});return!0===w&&(u=Object(o.createElement)(o.RawHTML,null,u)),Object(o.createElement)("div",{ref:n,className:y,onClick:b?r.noop:v,tabIndex:"0",role:b?"":"button",onKeyPress:b?r.noop:v,"aria-label":b?"":Object(s.__)("Dismiss this notice")},Object(o.createElement)("div",{className:O},h&&Object(o.createElement)("div",{className:"components-snackbar__icon"},h),u,p.map((e,t)=>{let{label:n,onClick:r,url:i}=e;return Object(o.createElement)(l.Button,{key:t,href:i,isTertiary:!0,onClick:e=>function(e,t){e.stopPropagation(),f(),t&&t(e)}(e,r),className:"components-snackbar__action"},n)}),b&&Object(o.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:v,onKeyPress:v},"✕")))}))}).call(this,n(130))},260:function(e,t){e.exports=window.wp.a11y},261:function(e,t){e.exports=window.wp.warning},262:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,c=(e.icon,e.className),s=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,i),l=["gridicon","gridicons-cross-small",c,!1,!1,!1].filter(Boolean).join(" ");return r.default.createElement("svg",a({className:l,height:n,width:n,onClick:o},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),r.default.createElement("g",null,r.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})))};var o,r=(o=n(6))&&o.__esModule?o:{default:o},i=["size","onClick","icon","className"];function a(){return(a=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)}},263:function(e,t){e.exports=window.wc.customerEffortScore},27:function(e,t,n){"use strict";function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}n.d(t,"a",(function(){return r}))},28:function(e,t){e.exports=window.wp.hooks},281:function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var o={};n.r(o),n.d(o,"setCesSurveyQueue",(function(){return O})),n.d(o,"addCesSurvey",(function(){return j})),n.d(o,"addCesSurveyForAnalytics",(function(){return _})),n.d(o,"addCesSurveyForCustomerSearch",(function(){return E}));var r={};n.r(r),n.d(r,"getCesSurveyQueue",(function(){return k}));var i={};n.r(i),n.d(i,"getCesSurveyQueue",(function(){return C}));var a=n(0),c=n(1),s=n.n(c),l=n(17),u=n(263),d=n.n(u),m=n(14),p=n(8),f=n(12),h=n(2);function b(e){let{action:t,trackProps:n,label:o,onSubmitLabel:r=Object(h.__)("Thank you for your feedback!","woocommerce-admin"),cesShownForActions:i,allowTracking:c,resolving:s,storeAgeInWeeks:u,updateOptions:m,createNotice:p}=e;const[f,b]=Object(a.useState)(!1);if(s)return null;if(!c)return null;if(-1!==i.indexOf(t)&&!f)return null;const g=()=>{m({woocommerce_ces_shown_for_actions:[t,...i]})};return Object(a.createElement)(d.a,{recordScoreCallback:(e,o)=>{Object(l.recordEvent)("ces_feedback",{action:t,score:e,comments:o||"",store_age:u,...n}),p("success",r)},label:o,onNoticeShownCallback:()=>{Object(l.recordEvent)("ces_snackbar_view",{action:t,store_age:u,...n})},onNoticeDismissedCallback:()=>{Object(l.recordEvent)("ces_snackbar_dismiss",{action:t,store_age:u,...n}),g()},onModalShownCallback:()=>{b(!0),Object(l.recordEvent)("ces_view",{action:t,store_age:u,...n}),g()},icon:Object(a.createElement)("span",{style:{height:21,width:21},role:"img","aria-label":Object(h.__)("Pencil icon","woocommerce-admin")},"✏️")})}b.propTypes={action:s.a.string.isRequired,trackProps:s.a.object,label:s.a.string.isRequired,onSubmitLabel:s.a.string,cesShownForActions:s.a.arrayOf(s.a.string).isRequired,allowTracking:s.a.bool,resolving:s.a.bool.isRequired,storeAgeInWeeks:s.a.number,updateOptions:s.a.func,createNotice:s.a.func};var g=Object(m.compose)(Object(p.withSelect)(e=>{const{getOption:t,isResolving:n}=e(f.OPTIONS_STORE_NAME),o=t("woocommerce_ces_shown_for_actions")||[],r=function(e){if(0===e)return null;const t=Date.now()-1e3*e;return Math.round(t/f.WEEK)}(t("woocommerce_admin_install_timestamp")||0);return{cesShownForActions:o,allowTracking:"yes"===(t("woocommerce_allow_tracking")||"no"),storeAgeInWeeks:r,resolving:n("getOption",["woocommerce_ces_shown_for_actions"])||null===r||n("getOption",["woocommerce_admin_install_timestamp"])||n("getOption",["woocommerce_allow_tracking"])}}),Object(p.withDispatch)(e=>{const{updateOptions:t}=e(f.OPTIONS_STORE_NAME),{createNotice:n}=e("core/notices");return{updateOptions:t,createNotice:n}}))(b),w=n(59),v=n(10);var y={SET_CES_SURVEY_QUEUE:"SET_CES_SURVEY_QUEUE",ADD_CES_SURVEY:"ADD_CES_SURVEY"};function O(e){return{type:y.SET_CES_SURVEY_QUEUE,queue:e}}function j(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.pagenow,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.adminpage,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return{type:y.ADD_CES_SURVEY,action:e,label:t,pageNow:n,adminPage:o,onsubmit_label:r,props:i}}function _(){return j("analytics_filtered",Object(h.__)("How easy was it to filter your store analytics?","woocommerce-admin"),"woocommerce_page_wc-admin","woocommerce_page_wc-admin")}function E(){return j("ces_search",Object(h.__)("How easy was it to use search?","woocommerce-admin"),"woocommerce_page_wc-admin","woocommerce_page_wc-admin",void 0,{search_area:"customer"})}function*k(){const e=yield Object(v.apiFetch)({path:`${w.a}/options?options=${w.b}`});if(!e)throw new Error;yield O(e[w.b]||[])}function C(e){return e.queue}const S={queue:[]};var x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case y.SET_CES_SURVEY_QUEUE:return{...e,queue:t.queue};case y.ADD_CES_SURVEY:if(e.queue.filter(e=>e.action===t.action).length)return e;const n={action:t.action,label:t.label,pagenow:t.pageNow,adminpage:t.adminPage,onSubmitLabel:t.onSubmitLabel,props:t.props};return{...e,queue:[...e.queue,n]};default:return e}};Object(p.registerStore)(w.c,{actions:o,selectors:i,resolvers:r,controls:v.controls,reducer:x});function T(e){let{queue:t,resolving:n,clearQueue:o}=e;if(n)return null;const r=t.filter(e=>e.pagenow===window.pagenow&&e.adminpage===window.adminpage);return r.length&&o(),Object(a.createElement)(a.Fragment,null,r.map((e,t)=>Object(a.createElement)(g,{key:t,action:e.action,label:e.label,onSubmitLabel:e.onsubmit_label,trackProps:e.props||{}})))}T.propTypes={queue:s.a.arrayOf(s.a.object),resolving:s.a.bool,clearQueue:s.a.func};var A=Object(m.compose)(Object(p.withSelect)(e=>{const{getCesSurveyQueue:t,isResolving:n}=e(w.c);return{queue:t(),resolving:n("getOption",[w.b])}}),Object(p.withDispatch)(e=>{const{updateOptions:t}=e(f.OPTIONS_STORE_NAME);return{clearQueue:()=>{t({woocommerce_clear_ces_tracks_queue_for_page:{pagenow:window.pagenow,adminpage:window.adminpage}})}}}))(T)},282:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(40),r=n.n(o),i=n(0),a=n(28),c=n(32),s=n(8),l=n(12);var u=e=>{let{children:t}=e;const{currentUserCan:n}=Object(l.useUser)(),o=Object(s.useSelect)(e=>{const{getOption:t,hasFinishedResolution:n}=e(l.OPTIONS_STORE_NAME),o=n("getOption",["woocommerce_show_marketplace_suggestions"]),r="no"!==t("woocommerce_show_marketplace_suggestions");return o&&r});return n("install_plugins")&&o?Object(i.createElement)(i.Fragment,null,t):null};const d=Object(i.lazy)(()=>n.e(45).then(n.bind(null,647))),m=Object(i.lazy)(()=>n.e(48).then(n.bind(null,657)));n(305);const p=[e=>{let{page:t,tab:n,section:o}=e;return"wc-settings"!==t||"checkout"!==n||o?null:Object(i.createElement)(u,null,Object(i.createElement)(i.Suspense,{fallback:null},Object(i.createElement)(d,null)))},e=>{let{page:t,tab:n,section:o,zone_id:r}=e;return"wc-settings"!==t||"shipping"!==n||Boolean(o)||Boolean(r)?null:Object(i.createElement)(u,null,Object(i.createElement)(i.Suspense,{fallback:null},Object(i.createElement)(m,null)))}],f=()=>{const e=Object(c.parse)(location.search.substring(1));let t={page:"",tab:""};void 0!==e.page&&(t=e);const n=Object(a.applyFilters)("woocommerce_admin_embedded_layout_components",p,t);return Object(i.createElement)("div",{className:"woocommerce-embedded-layout__primary",id:"woocommerce-embedded-layout__primary"},n.map((e,n)=>Object(i.createElement)(e,r()({key:n},t))))}},291:function(e,t,n){"use strict";n.r(t),function(e){var t=n(0),o=(n(129),n(12)),r=(n(293),n(23)),i=n(121),a=n(281),c=n(282);n.p=e.wcAdminAssets.path;const s=document.getElementById("root"),l=document.getElementById("woocommerce-embedded-root"),u=Object(r.d)("currentUserData");if(s){let e=Object(o.withSettingsHydration)("wc_admin",window.wcSettings.admin)(i.b);const n=!!window.wcSettings.admin&&window.wcSettings.admin.preloadSettings;n&&n.general&&(e=Object(o.withSettingsHydration)("general",{general:n.general})(e)),u&&(e=Object(o.withCurrentUserHydration)(u)(e)),Object(t.render)(Object(t.createElement)(e,null),s)}else if(l){let e=Object(o.withSettingsHydration)("wc_admin",window.wcSettings.admin)(i.a);u&&(e=Object(o.withCurrentUserHydration)(u)(e)),Object(t.render)(Object(t.createElement)(e,null),l),l.classList.remove("is-embed-loading");const n=document.getElementById("wpbody-content"),r=n.querySelector(".wrap.woocommerce")||n.querySelector(".wrap"),a=document.createElement("div");Object(t.render)(Object(t.createElement)("div",{className:"woocommerce-layout"},Object(t.createElement)(i.c,null)),n.insertBefore(a,r));const s=document.createElement("div");Object(t.render)(Object(t.createElement)(c.a,null),n.insertBefore(s,r.nextSibling))}window.wcAdminFeatures&&!0===window.wcAdminFeatures["customer-effort-score-tracks"]&&function(){const e=s||l;Object(t.render)(Object(t.createElement)(a.a,null),e.insertBefore(document.createElement("div"),null))}()}.call(this,n(81))},293:function(e,t,n){},294:function(e,t){e.exports=window.wc.notices},295:function(e,t,n){},296:function(e,t,n){},297:function(e,t,n){},298:function(e,t,n){},299:function(e,t,n){},3:function(e,t,n){"use strict";n.d(t,"w",(function(){return r})),n.d(t,"a",(function(){return ve})),n.d(t,"b",(function(){return V})),n.d(t,"c",(function(){return Oe})),n.d(t,"d",(function(){return we})),n.d(t,"e",(function(){return W})),n.d(t,"f",(function(){return de})),n.d(t,"g",(function(){return Me})),n.d(t,"h",(function(){return _})),n.d(t,"i",(function(){return Fe})),n.d(t,"j",(function(){return Ve})),n.d(t,"k",(function(){return C})),n.d(t,"l",(function(){return S})),n.d(t,"m",(function(){return T})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return z})),n.d(t,"p",(function(){return ge})),n.d(t,"q",(function(){return be})),n.d(t,"r",(function(){return he})),n.d(t,"s",(function(){return E})),n.d(t,"t",(function(){return Be})),n.d(t,"u",(function(){return k})),n.d(t,"v",(function(){return j})),n.d(t,"x",(function(){return je})),n.d(t,"y",(function(){return x})),n.d(t,"z",(function(){return qe})),n.d(t,"A",(function(){return We})),n.d(t,"B",(function(){return $e})),n.d(t,"C",(function(){return Ue})),n.d(t,"D",(function(){return Qe}));let o=v();const r=e=>h(e,o);let i=v();r.write=e=>h(e,i);let a=v();r.onStart=e=>h(e,a);let c=v();r.onFrame=e=>h(e,c);let s=v();r.onFinish=e=>h(e,s);let l=[];r.setTimeout=(e,t)=>{let n=r.now()+t,o=()=>{let e=l.findIndex(e=>e.cancel==o);~e&&l.splice(e,1),p-=~e?1:0},i={time:n,handler:e,cancel:o};return l.splice(u(n),0,i),p+=1,b(),i};let u=e=>~(~l.findIndex(t=>t.time>e)||~l.length);r.cancel=e=>{a.delete(e),c.delete(e),o.delete(e),i.delete(e),s.delete(e)},r.sync=e=>{f=!0,r.batchedUpdates(e),f=!1},r.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,r.onStart(n)}return o.handler=e,o.cancel=()=>{a.delete(n),t=null},o};let d="undefined"!=typeof window?window.requestAnimationFrame:()=>{};r.use=e=>d=e,r.now="undefined"!=typeof performance?()=>performance.now():Date.now,r.batchedUpdates=e=>e(),r.catch=console.error,r.frameLoop="always",r.advance=()=>{"demand"!==r.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):w()};let m=-1,p=0,f=!1;function h(e,t){f?(t.delete(e),e(0)):(t.add(e),b())}function b(){m<0&&(m=0,"demand"!==r.frameLoop&&d(g))}function g(){~m&&(d(g),r.batchedUpdates(w))}function w(){let e=m;m=r.now();let t=u(m);t&&(y(l.splice(0,t),e=>e.handler()),p-=t),a.flush(),o.flush(e?Math.min(64,m-e):16.667),c.flush(),i.flush(),s.flush(),p||(m=-1)}function v(){let e=new Set,t=e;return{add(n){p+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(p-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,p-=t.size,y(t,t=>t(n)&&e.add(t)),p+=e.size,t=e)}}}function y(e,t){e.forEach(e=>{try{t(e)}catch(e){r.catch(e)}})}var O=n(6);function j(){}const _=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),E={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function k(e,t){if(E.arr(e)){if(!E.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const C=(e,t)=>e.forEach(t);function S(e,t,n){if(E.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],""+o);else for(const o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}const x=e=>E.und(e)?[]:E.arr(e)?e:[e];function T(e,t){if(e.size){const n=Array.from(e);e.clear(),C(n,t)}}const A=(e,...t)=>T(e,e=>e(...t)),P=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let N,M,R=null,I=!1,L=j;var V=Object.freeze({__proto__:null,get createStringInterpolator(){return N},get to(){return M},get colors(){return R},get skipAnimation(){return I},get willAdvance(){return L},assign:e=>{e.to&&(M=e.to),e.now&&(r.now=e.now),void 0!==e.colors&&(R=e.colors),null!=e.skipAnimation&&(I=e.skipAnimation),e.createStringInterpolator&&(N=e.createStringInterpolator),e.requestAnimationFrame&&r.use(e.requestAnimationFrame),e.batchedUpdates&&(r.batchedUpdates=e.batchedUpdates),e.willAdvance&&(L=e.willAdvance),e.frameLoop&&(r.frameLoop=e.frameLoop)}});const D=new Set;let F=[],B=[],U=0;const z={get idle(){return!D.size&&!F.length},start(e){U>e.priority?(D.add(e),r.onStart(q)):(H(e),r(Q))},advance:Q,sort(e){if(U)r.onFrame(()=>z.sort(e));else{const t=F.indexOf(e);~t&&(F.splice(t,1),$(e))}},clear(){F=[],D.clear()}};function q(){D.forEach(H),D.clear(),r(Q)}function H(e){F.includes(e)||$(e)}function $(e){F.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(F,t=>t.priority>e.priority),0,e)}function Q(e){const t=B;for(let n=0;n<F.length;n++){const o=F[n];U=o.priority,o.idle||(L(o),o.advance(e),o.idle||t.push(o))}return U=0,B=F,B.length=0,F=t,F.length>0}const W={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},G="[-+]?\\d*\\.?\\d+";function Y(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const Z=new RegExp("rgb"+Y(G,G,G)),J=new RegExp("rgba"+Y(G,G,G,G)),K=new RegExp("hsl"+Y(G,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),X=new RegExp("hsla"+Y(G,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",G)),ee=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,te=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ne=/^#([0-9a-fA-F]{6})$/,oe=/^#([0-9a-fA-F]{8})$/;function re(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ie(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,i=re(r,o,e+1/3),a=re(r,o,e),c=re(r,o,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*c)<<8}function ae(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ce(e){return(parseFloat(e)%360+360)%360/360}function se(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function le(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function ue(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ne.exec(e))?parseInt(t[1]+"ff",16)>>>0:R&&void 0!==R[e]?R[e]:(t=Z.exec(e))?(ae(t[1])<<24|ae(t[2])<<16|ae(t[3])<<8|255)>>>0:(t=J.exec(e))?(ae(t[1])<<24|ae(t[2])<<16|ae(t[3])<<8|se(t[4]))>>>0:(t=ee.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=oe.exec(e))?parseInt(t[1],16)>>>0:(t=te.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=K.exec(e))?(255|ie(ce(t[1]),le(t[2]),le(t[3])))>>>0:(t=X.exec(e))?(ie(ce(t[1]),le(t[2]),le(t[3]))|se(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const de=(e,t,n)=>{if(E.fun(e))return e;if(E.arr(e))return de({range:e,output:t,extrapolate:n});if(E.str(e.output[0]))return N(e);const o=e,r=o.output,i=o.range||[0,1],a=o.extrapolateLeft||o.extrapolate||"extend",c=o.extrapolateRight||o.extrapolate||"extend",s=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,o,r,i,a,c,s){let l=s?s(e):e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>n){if("identity"===c)return l;"clamp"===c&&(l=n)}if(o===r)return o;if(t===n)return e<=t?o:r;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=i(l),o===-1/0?l=-l:r===1/0?l+=o:l=l*(r-o)+o;return l}(e,i[t],i[t+1],r[t],r[t+1],s,a,c,o.map)}};function me(){return(me=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const pe=Symbol.for("FluidValue.get"),fe=Symbol.for("FluidValue.observers"),he=e=>Boolean(e&&e[pe]),be=e=>e&&e[pe]?e[pe]():e,ge=e=>e[fe]||null;function we(e,t){let n=e[fe];n&&n.forEach(e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)})}class ve{constructor(e){if(this[pe]=void 0,this[fe]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");ye(this,e)}}const ye=(e,t)=>_e(e,pe,t);function Oe(e,t){if(e[pe]){let n=e[fe];n||_e(e,fe,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function je(e,t){let n=e[fe];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[fe]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const _e=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ee=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ke=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ce=new RegExp(`(${Ee.source})(%|[a-z]+)`,"i"),Se=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Te=e=>{const[t,n]=Ae(e);if(!t||P())return e;const o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&xe.test(n)?Te(n):n||e},Ae=e=>{const t=xe.exec(e);if(!t)return[,];const[,n,o]=t;return[n,o]};let Pe;const Ne=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,Me=e=>{Pe||(Pe=R?new RegExp(`(${Object.keys(R).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(e=>be(e).replace(xe,Te).replace(ke,ue).replace(Pe,ue)),n=t.map(e=>e.match(Ee).map(Number)),o=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})).map(t=>de(me({},e,{output:t})));return e=>{var n;const r=!Ce.test(t[0])&&(null==(n=t.find(e=>Ce.test(e)))?void 0:n.replace(Ee,""));let i=0;return t[0].replace(Ee,()=>`${o[i++](e)}${r||""}`).replace(Se,Ne)}},Re="react-spring: ",Ie=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(Re+"once requires a function parameter");return(...e)=>{n||(t(...e),n=!0)}},Le=Ie(console.warn);function Ve(){Le(Re+'The "interpolate" function is deprecated in v9 (use "to" instead)')}const De=Ie(console.warn);function Fe(){De(Re+'Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions')}function Be(e){return E.str(e)&&("#"==e[0]||/\d/.test(e)||!P()&&xe.test(e)||e in(R||{}))}const Ue=e=>Object(O.useEffect)(e,ze),ze=[];function qe(){const e=Object(O.useState)()[1],t=Object(O.useState)(He)[0];return Ue(t.unmount),()=>{t.current&&e({})}}function He(){const e={current:!0,unmount:()=>()=>{e.current=!1}};return e}function $e(e,t){const[n]=Object(O.useState)(()=>({inputs:t,result:e()})),o=Object(O.useRef)(),r=o.current;let i=r;if(i){Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs))||(i={inputs:t,result:e()})}else i=n;return Object(O.useEffect)(()=>{o.current=i,r==n&&(n.inputs=n.result=void 0)},[i]),i.result}function Qe(e){const t=Object(O.useRef)();return Object(O.useEffect)(()=>{t.current=e}),t.current}const We="undefined"!=typeof window&&window.document&&window.document.createElement?O.useLayoutEffect:O.useEffect},30:function(e,t){e.exports=window.ReactDOM},300:function(e,t,n){},301:function(e,t,n){},302:function(e,t,n){},303:function(e,t,n){},304:function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},305:function(e,t,n){},31:function(e,t,n){"use strict";function o(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}n.d(t,"a",(function(){return o}))},32:function(e,t,n){"use strict";var o=n(62),r=n(63),i=n(39);e.exports={formats:i,parse:r,stringify:o}},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return O})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return b})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return c}));var o=n(3),r=n(6);const i=Symbol.for("Animated:node"),a=e=>e&&e[i],c=(e,t)=>Object(o.h)(e,i,t),s=e=>e&&e[i]&&e[i].getPayload();class l{constructor(){this.payload=void 0,c(this,this)}getPayload(){return this.payload||[]}}class u extends l{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,o.s.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new u(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return o.s.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,o.s.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class d extends u{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=Object(o.f)({output:[e,e]})}static create(e){return new d(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(o.s.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Object(o.f)({output:[this.getValue(),e]})),this._value=0,super.reset()}}const m={dependencies:null};class p extends l{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Object(o.l)(this.source,(n,r)=>{var a;(a=n)&&a[i]===a?t[r]=n.getValue(e):Object(o.r)(n)?t[r]=Object(o.q)(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Object(o.k)(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Object(o.l)(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){m.dependencies&&Object(o.r)(e)&&m.dependencies.add(e);const t=s(e);t&&Object(o.k)(t,e=>this.add(e))}}class f extends p{constructor(e){super(e)}static create(e){return new f(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(h)),!0)}}function h(e){return(Object(o.t)(e)?d:u).create(e)}function b(e){const t=a(e);return t?t.constructor:o.s.arr(e)?f:Object(o.t)(e)?d:u}function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const w=(e,t)=>{const n=!o.s.fun(e)||e.prototype&&e.prototype.isReactComponent;return Object(r.forwardRef)((i,a)=>{const c=Object(r.useRef)(null),s=n&&Object(r.useCallback)(e=>{c.current=function(e,t){e&&(o.s.fun(e)?e(t):e.current=t);return t}(a,e)},[a]),[l,u]=function(e,t){const n=new Set;m.dependencies=n,e.style&&(e=g({},e,{style:t.createAnimatedStyle(e.style)}));return e=new p(e),m.dependencies=null,[e,n]}(i,t),d=Object(o.z)(),f=()=>{const e=c.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&d()},h=new v(f,u),b=Object(r.useRef)();Object(o.A)(()=>{const e=b.current;b.current=h,Object(o.k)(u,e=>Object(o.c)(e,h)),e&&(Object(o.k)(e.deps,t=>Object(o.x)(t,e)),o.w.cancel(e.update))}),Object(r.useEffect)(f,[]),Object(o.C)(()=>()=>{const e=b.current;Object(o.k)(e.deps,t=>Object(o.x)(t,e))});const w=t.getComponentProps(l.getValue());return r.createElement(e,g({},w,{ref:s}))})};class v{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&o.w.write(this.update)}}const y=Symbol.for("AnimatedComponent"),O=(e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new p(e)),getComponentProps:r=(e=>e)}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{const t=j(e)||"Anonymous";return(e=o.s.str(e)?a[e]||(a[e]=w(e,i)):e[y]||(e[y]=w(e,i))).displayName=`Animated(${t})`,e};return Object(o.l)(e,(t,n)=>{o.s.arr(e)&&(n=j(t)),a[n]=a(t)}),{animated:a}},j=e=>o.s.str(e)?e:e&&o.s.str(e.displayName)?e.displayName:o.s.fun(e)&&e.name||null},34:function(e,t){e.exports=window.wp.htmlEntities},35:function(e,t){e.exports=window.wp.keycodes},39:function(e,t,n){"use strict";var o=String.prototype.replace,r=/%20/g,i="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return o.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:a}},4:function(e,t){e.exports=window.wp.components},40:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},45:function(e,t,n){"use strict";var o=n(39),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)void 0!==e[o]&&(n[o]=e[o]);return n};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o<t.length;++o)for(var r=t[o],a=r.obj[r.prop],c=Object.keys(a),s=0;s<c.length;++s){var l=c[s],u=a[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var o=[],r=0;r<n.length;++r)void 0!==n[r]&&o.push(n[r]);t.obj[t.prop]=o}}}(t),e},decode:function(e,t,n){var o=e.replace(/\+/g," ");if("iso-8859-1"===n)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(e){return o}},encode:function(e,t,n,r,i){if(0===e.length)return e;var c=e;if("symbol"==typeof e?c=Symbol.prototype.toString.call(e):"string"!=typeof e&&(c=String(e)),"iso-8859-1"===n)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var s="",l=0;l<c.length;++l){var u=c.charCodeAt(l);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===o.RFC1738&&(40===u||41===u)?s+=c.charAt(l):u<128?s+=a[u]:u<2048?s+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?s+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&c.charCodeAt(l)),s+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return s},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(t(e[o]));return n}return t(e)},merge:function e(t,n,o){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return i(t)&&!i(n)&&(a=c(t,o)),i(t)&&i(n)?(n.forEach((function(n,i){if(r.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,o):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var a=n[i];return r.call(t,i)?t[i]=e(t[i],a,o):t[i]=a,t}),a)}}},47:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o="Invariant failed";function r(e,t){if(!e)throw new Error(o)}},497:function(e,t){e.exports=window.wc.csvExport},5:function(e,t){e.exports=window.lodash},522:function(e,t,n){"use strict";var o=n(0),r=n(9);const i=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},523:function(e,t,n){"use strict";var o=n(0),r=n(9);const i=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));t.a=i},524:function(e,t,n){"use strict";var o=n(0),r=n(9);const i=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{fillRule:"evenodd",d:"M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z",clipRule:"evenodd"}));t.a=i},525:function(e,t,n){"use strict";var o=n(0),r=n(9);const i=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"}));t.a=i},526:function(e,t,n){"use strict";var o=n(0),r=n(9);const i=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.a=i},54:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s}));var o=n(0),r=n(4);const i=(e,t,n)=>"function"==typeof e?Object(o.cloneElement)(e(n),{order:t}):Object(o.cloneElement)(e,{...n,order:t}),a=e=>{let{children:t,order:n=1}=e;return Object(o.createElement)(r.Fill,{name:"woocommerce_header_item"},e=>i(t,n,e))};a.Slot=e=>{let{fillProps:t}=e;return Object(o.createElement)(r.Slot,{name:"woocommerce_header_item",fillProps:t},e=>e.sort((e,t)=>e[0].props.order-t[0].props.order))};const c=e=>{let{children:t,order:n=1}=e;return Object(o.createElement)(r.Fill,{name:"woocommerce_header_navigation_item"},e=>i(t,n,e))};c.Slot=e=>{let{fillProps:t}=e;return Object(o.createElement)(r.Slot,{name:"woocommerce_header_navigation_item",fillProps:t},e=>e.sort((e,t)=>e[0].props.order-t[0].props.order))};const s=e=>{let{children:t}=e;return Object(o.createElement)(r.Fill,{name:"woocommerce_header_page_title"},t)};s.Slot=e=>{let{fillProps:t}=e;return Object(o.createElement)(r.Slot,{name:"woocommerce_header_page_title",fillProps:t},e=>[e.pop()])}},55:function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"c",(function(){return j})),n.d(t,"b",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"d",(function(){return p}));var o=n(24);function r(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,o=n+1,r=e.length;o<r;n+=1,o+=1)e[n]=e[o];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,o=e&&e.split("/")||[],a=t&&t.split("/")||[],c=e&&r(e),s=t&&r(t),l=c||s;if(e&&r(e)?a=o:o.length&&(a.pop(),a=a.concat(o)),!a.length)return"/";if(a.length){var u=a[a.length-1];n="."===u||".."===u||""===u}else n=!1;for(var d=0,m=a.length;m>=0;m--){var p=a[m];"."===p?i(a,m):".."===p?(i(a,m),d++):d&&(i(a,m),d--)}if(!l)for(;d--;d)a.unshift("..");!l||""===a[0]||a[0]&&r(a[0])||a.unshift("");var f=a.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};function c(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,o){return e(t,n[o])}));if("object"==typeof t||"object"==typeof n){var o=c(t),r=c(n);return o!==t||r!==n?e(o,r):Object.keys(Object.assign({},t,n)).every((function(o){return e(t[o],n[o])}))}return!1},l=n(47);function u(e){return"/"===e.charAt(0)?e:"/"+e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function m(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,o=e.hash,r=t||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}function f(e,t,n,r){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",o="",r=t.indexOf("#");-1!==r&&(o=t.substr(r),t=t.substr(0,r));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===o?"":o}}(e)).state=t:(void 0===(i=Object(o.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,o,r){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof o?o(i,r):r(!0):r(!1!==i)}else r(!0)},appendListener:function(e){var n=!0;function o(){n&&e.apply(void 0,arguments)}return t.push(o),function(){n=!1,t=t.filter((function(e){return e!==o}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];t.forEach((function(e){return e.apply(void 0,n)}))}}}var g=!("undefined"==typeof window||!window.document||!window.document.createElement);function w(e,t){t(window.confirm(e))}function v(){try{return window.history.state||{}}catch(e){return{}}}function y(e){void 0===e&&(e={}),g||Object(l.a)(!1);var t,n=window.history,r=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,c=a.forceRefresh,s=void 0!==c&&c,h=a.getUserConfirmation,y=void 0===h?w:h,O=a.keyLength,j=void 0===O?6:O,_=e.basename?m(u(e.basename)):"";function E(e){var t=e||{},n=t.key,o=t.state,r=window.location,i=r.pathname+r.search+r.hash;return _&&(i=d(i,_)),f(i,o,n)}function k(){return Math.random().toString(36).substr(2,j)}var C=b();function S(e){Object(o.a)(F,e),F.length=n.length,C.notifyListeners(F.location,F.action)}function x(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||P(E(e.state))}function T(){P(E(v()))}var A=!1;function P(e){if(A)A=!1,S();else{C.confirmTransitionTo(e,"POP",y,(function(t){t?S({action:"POP",location:e}):function(e){var t=F.location,n=M.indexOf(t.key);-1===n&&(n=0);var o=M.indexOf(e.key);-1===o&&(o=0);var r=n-o;r&&(A=!0,I(r))}(e)}))}}var N=E(v()),M=[N.key];function R(e){return _+p(e)}function I(e){n.go(e)}var L=0;function V(e){1===(L+=e)&&1===e?(window.addEventListener("popstate",x),i&&window.addEventListener("hashchange",T)):0===L&&(window.removeEventListener("popstate",x),i&&window.removeEventListener("hashchange",T))}var D=!1;var F={length:n.length,action:"POP",location:N,createHref:R,push:function(e,t){var o=f(e,t,k(),F.location);C.confirmTransitionTo(o,"PUSH",y,(function(e){if(e){var t=R(o),i=o.key,a=o.state;if(r)if(n.pushState({key:i,state:a},null,t),s)window.location.href=t;else{var c=M.indexOf(F.location.key),l=M.slice(0,c+1);l.push(o.key),M=l,S({action:"PUSH",location:o})}else window.location.href=t}}))},replace:function(e,t){var o=f(e,t,k(),F.location);C.confirmTransitionTo(o,"REPLACE",y,(function(e){if(e){var t=R(o),i=o.key,a=o.state;if(r)if(n.replaceState({key:i,state:a},null,t),s)window.location.replace(t);else{var c=M.indexOf(F.location.key);-1!==c&&(M[c]=o.key),S({action:"REPLACE",location:o})}else window.location.replace(t)}}))},go:I,goBack:function(){I(-1)},goForward:function(){I(1)},block:function(e){void 0===e&&(e=!1);var t=C.setPrompt(e);return D||(V(1),D=!0),function(){return D&&(D=!1,V(-1)),t()}},listen:function(e){var t=C.appendListener(e);return V(1),function(){V(-1),t()}}};return F}function O(e,t,n){return Math.min(Math.max(e,t),n)}function j(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,r=t.initialEntries,i=void 0===r?["/"]:r,a=t.initialIndex,c=void 0===a?0:a,s=t.keyLength,l=void 0===s?6:s,u=b();function d(e){Object(o.a)(y,e),y.length=y.entries.length,u.notifyListeners(y.location,y.action)}function m(){return Math.random().toString(36).substr(2,l)}var h=O(c,0,i.length-1),g=i.map((function(e){return f(e,void 0,"string"==typeof e?m():e.key||m())})),w=p;function v(e){var t=O(y.index+e,0,y.entries.length-1),o=y.entries[t];u.confirmTransitionTo(o,"POP",n,(function(e){e?d({action:"POP",location:o,index:t}):d()}))}var y={length:g.length,action:"POP",location:g[h],index:h,entries:g,createHref:w,push:function(e,t){var o=f(e,t,m(),y.location);u.confirmTransitionTo(o,"PUSH",n,(function(e){if(e){var t=y.index+1,n=y.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),d({action:"PUSH",location:o,index:t,entries:n})}}))},replace:function(e,t){var o=f(e,t,m(),y.location);u.confirmTransitionTo(o,"REPLACE",n,(function(e){e&&(y.entries[y.index]=o,d({action:"REPLACE",location:o}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=y.index+e;return t>=0&&t<y.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return y}},56:function(e,t){e.exports=window.wp.plugins},59:function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));const o="wc/customer-effort-score",r="/wc-admin",i="woocommerce_ces_tracks_queue"},6:function(e,t){e.exports=window.React},60:function(e,t,n){"use strict";var o=n(61);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},61:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},62:function(e,t,n){"use strict";var o=n(45),r=n(39),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,s=Array.prototype.push,l=function(e,t){s.apply(e,c(t)?t:[t])},u=Date.prototype.toISOString,d=r.default,m={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:d,formatter:r.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,n,r,i,a,s,u,d,p,f,h,b,g,w){var v,y=t;if("function"==typeof u?y=u(n,y):y instanceof Date?y=f(y):"comma"===r&&c(y)&&(y=o.maybeMap(y,(function(e){return e instanceof Date?f(e):e}))),null===y){if(i)return s&&!g?s(n,m.encoder,w,"key",h):n;y=""}if("string"==typeof(v=y)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||o.isBuffer(y))return s?[b(g?n:s(n,m.encoder,w,"key",h))+"="+b(s(y,m.encoder,w,"value",h))]:[b(n)+"="+b(String(y))];var O,j=[];if(void 0===y)return j;if("comma"===r&&c(y))O=[{value:y.length>0?y.join(",")||null:void 0}];else if(c(u))O=u;else{var _=Object.keys(y);O=d?_.sort(d):_}for(var E=0;E<O.length;++E){var k=O[E],C="object"==typeof k&&void 0!==k.value?k.value:y[k];if(!a||null!==C){var S=c(y)?"function"==typeof r?r(n,k):n:n+(p?"."+k:"["+k+"]");l(j,e(C,S,r,i,a,s,u,d,p,f,h,b,g,w))}}return j};e.exports=function(e,t){var n,o=e,s=function(e){if(!e)return m;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=r.default;if(void 0!==e.format){if(!i.call(r.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var o=r.formatters[n],a=m.filter;return("function"==typeof e.filter||c(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===e.allowDots?m.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"==typeof s.filter?o=(0,s.filter)("",o):c(s.filter)&&(n=s.filter);var u,d=[];if("object"!=typeof o||null===o)return"";u=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=a[u];n||(n=Object.keys(o)),s.sort&&n.sort(s.sort);for(var h=0;h<n.length;++h){var b=n[h];s.skipNulls&&null===o[b]||l(d,p(o[b],b,f,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset))}var g=d.join(s.delimiter),w=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),g.length>0?w+g:""}},63:function(e,t,n){"use strict";var o=n(45),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:o.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,o){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var d=0;n.depth>0&&null!==(c=a.exec(i))&&d<n.depth;){if(d+=1,!n.plainObjects&&r.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),function(e,t,n,o){for(var r=o?t:s(t,n),i=e.length-1;i>=0;--i){var a,c=e[i];if("[]"===c&&n.parseArrays)a=[].concat(r);else{a=n.plainObjects?Object.create(null):{};var l="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&c!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=r:a[l]=r:a={0:r}}r=a}return r}(u,t,n,o)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||o.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,l={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,m=u.split(t.delimiter,d),p=-1,f=t.charset;if(t.charsetSentinel)for(n=0;n<m.length;++n)0===m[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===m[n]?f="utf-8":"utf8=%26%2310003%3B"===m[n]&&(f="iso-8859-1"),p=n,n=m.length);for(n=0;n<m.length;++n)if(n!==p){var h,b,g=m[n],w=g.indexOf("]="),v=-1===w?g.indexOf("="):w+1;-1===v?(h=t.decoder(g,a.decoder,f,"key"),b=t.strictNullHandling?null:""):(h=t.decoder(g.slice(0,v),a.decoder,f,"key"),b=o.maybeMap(s(g.slice(v+1),t),(function(e){return t.decoder(e,a.decoder,f,"value")}))),b&&t.interpretNumericEntities&&"iso-8859-1"===f&&(b=c(b)),g.indexOf("[]=")>-1&&(b=i(b)?[b]:b),r.call(l,h)?l[h]=o.combine(l[h],b):l[h]=b}return l}(e,n):e,d=n.plainObjects?Object.create(null):{},m=Object.keys(u),p=0;p<m.length;++p){var f=m[p],h=l(f,u[f],n,"string"==typeof e);d=o.merge(d,h,n)}return o.compact(d)}},65:function(e,t){e.exports=window.wp.date},69:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"f",(function(){return m}));var o=n(34),r=n(5),i=n(23);function a(e){return e?e.split(":")[0]:null}function c(e){let t=a(e);return Object(r.without)(Object(i.d)("onboarding",{euCountries:[]}).euCountries,"GB").includes(t)&&(t="EU"),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;const r=u(t,n,o,e),i=r.map(e=>e.id||e.product);return i}function l(e,t,n){const o={};o.products=u(t,!0,n,e),o.remainingProducts=u(t,!1,n,e);const r=[...new Set([...o.products,...o.remainingProducts])];return o.uniqueItemsList=r.map(e=>{let t;return t=e.label?{type:"extension",name:e.label}:{type:"theme",name:e.title},t}),o}function u(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;const r=[];if(!o)return r;const a=e.product_types||[];a.forEach(e=>{o[e]&&o[e].product&&(t||!n.includes(o[e].slug))&&r.push(o[e])});const c=Object(i.d)("onboarding",{});let s=null;return c&&c.themes&&(s=c.themes.find(t=>t.slug===e.theme)),s&&s.id&&d(s.price)>0&&(t||!s.is_installed)&&r.push(s),r}function d(e){return Number(Object(o.decodeEntities)(e).replace(/[^0-9.-]+/g,""))}function m(e){return/admin.php\?page=wc-admin/.test(e)}},7:function(e,t,n){!function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],o=0;o<arguments.length;o++){var r=arguments[o];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=n.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var c in r)t.call(r,c)&&r[c]&&e.push(c);else e.push(r.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},74:function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return s}));var o=n(12),r=n(258);function i(e,t){const{getItemsTotalCount:n,getItemsError:r,isResolving:i}=e(o.ITEMS_STORE_NAME);if(!t.length)return 0;const a={page:1,per_page:1,status:t,_fields:["id"]},c=n("orders",a,null),s=Boolean(r("orders",a)),l=i("getItemsTotalCount",["orders",a,null]);return s||l?null:c}function a(e){const{getSetting:t}=e(o.SETTINGS_STORE_NAME),{woocommerce_actionable_order_statuses:n=r.a}=t("wc_admin","wcAdminSettings",{});return n}const c={page:1,per_page:1,low_in_stock:!0,status:"publish",_fields:["id"]};function s(e){const{getItemsTotalCount:t,getItemsError:n,isResolving:r}=e(o.ITEMS_STORE_NAME),i=t("products/low-in-stock",c,null),a=Boolean(n("products/low-in-stock",c)),s=r("getItemsTotalCount",["products/low-in-stock",c,null]);return a||s&&null===i?null:i}},8:function(e,t){e.exports=window.wp.data},81:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},9:function(e,t){e.exports=window.wp.primitives},91:function(e,t){e.exports=window.wc.currency},93:function(e,t){e.exports=window.wp.dom}});
|
1 |
/*! For license information please see index.min.js.LICENSE.txt */
|
2 |
+
this.wc=this.wc||{},this.wc.app=function(e){function t(t){for(var n,r,i=t[0],a=t[1],c=0,s=[];c<i.length;c++)r=i[c],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&s.push(o[r][0]),o[r]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(u&&u(t);s.length;)s.shift()()}var n={},r={18:0},o={18:0};function i(e){var t=function(e){return a.p+"chunks/"+({4:"activity-panels-help",5:"activity-panels-inbox",6:"analytics-report",7:"analytics-report-categories",8:"analytics-report-coupons",9:"analytics-report-customers",10:"analytics-report-downloads",11:"analytics-report-orders",12:"analytics-report-products",13:"analytics-report-revenue",14:"analytics-report-stock",15:"analytics-report-taxes",16:"analytics-report-variations",17:"analytics-settings",24:"customizable-dashboard",25:"dashboard",26:"dashboard-charts",31:"homescreen",32:"leaderboards",34:"marketing-overview",44:"payment-recommendations",46:"profile-wizard",47:"store-alerts",48:"store-performance",49:"task-list",51:"wcpay-usage-modal"}[e]||e)+".min.js"}(e);return window.wcAdminAssets&&window.wcAdminAssets.version&&(t+="?ver="+window.wcAdminAssets.version),t}function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[];r[e]?t.push(r[e]):0!==r[e]&&{0:1,4:1,5:1,6:1,7:1,9:1,11:1,12:1,14:1,17:1,25:1,26:1,31:1,32:1,34:1,44:1,46:1,47:1,48:1,49:1}[e]&&t.push(r[e]=new Promise((function(t,n){for(var o="rtl"===document.dir?"./chunks/"+e+".style.rtl.css":"./chunks/"+e+".style.css",i=a.p+o,c=document.getElementsByTagName("link"),s=0;s<c.length;s++){var l=(d=c[s]).getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(l===o||l===i))return t()}var u=document.getElementsByTagName("style");for(s=0;s<u.length;s++){var d;if((l=(d=u[s]).getAttribute("data-href"))===o||l===i)return t()}var m=document.createElement("link");m.rel="stylesheet",m.type="text/css",m.setAttribute("data-webpack",!0),m.onload=t,m.onerror=function(t){var o=t&&t.target&&t.target.src||i,a=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=o,delete r[e],m.parentNode.removeChild(m),n(a)},m.href=i,window.wcAdminAssets&&window.wcAdminAssets.version&&(m.href+="?ver="+window.wcAdminAssets.version),document.getElementsByTagName("head")[0].appendChild(m)})).then((function(){r[e]=0})));var n=o[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,r){n=o[e]=[t,r]}));t.push(n[2]=c);var s,l=document.createElement("script");l.charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.src=i(e);var u=new Error;s=function(t){l.onerror=l.onload=null,clearTimeout(d);var n=o[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+r+": "+i+")",u.name="ChunkLoadError",u.type=r,u.request=i,n[1](u)}o[e]=void 0}};var d=setTimeout((function(){s({type:"timeout",target:l})}),12e4);l.onerror=l.onload=s,document.head.appendChild(l)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var c=window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var u=s;return a(a.s=278)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t,n){e.exports=n(46)()},10:function(e,t){e.exports=window.wp.dataControls},100:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s=["gridicon","gridicons-cross-small",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:s,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})))};var o,i=n(5),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},102:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(11);const o=5,i={page:1,per_page:1,status:"hold",_embed:1,_fields:["id"]};function a(e){const{getReviewsTotalCount:t,getReviewsError:n,isResolving:o}=e(r.REVIEWS_STORE_NAME),a=t(i),c=Boolean(n(i)),s=o("getReviewsTotalCount",[i]);return c||s&&void 0===a?null:a}},103:function(e,t,n){"use strict";e.exports=n(129)},11:function(e,t){e.exports=window.wc.data},115:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(22);var i=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,c=void 0===n?24:n,s=function(e,t){if(null==e)return{};var n,r,i=Object(o.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["icon","size"]);return Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:c,height:c},s))}},116:function(e,t){e.exports=window.wp.plugins},117:function(e,t,n){"use strict";var r=n(2),o=n(30),i=n(15),a=n(0);const c=Object(i.f)("manageStock","no"),s=Object(a.lazy)(()=>Promise.all([n.e(0),n.e(13)]).then(n.bind(null,477))),l=Object(a.lazy)(()=>Promise.all([n.e(0),n.e(12)]).then(n.bind(null,473))),u=Object(a.lazy)(()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,478))),d=Object(a.lazy)(()=>Promise.all([n.e(0),n.e(11)]).then(n.bind(null,479))),m=Object(a.lazy)(()=>Promise.all([n.e(0),n.e(7)]).then(n.bind(null,475))),p=Object(a.lazy)(()=>Promise.all([n.e(0),n.e(8)]).then(n.bind(null,480))),f=Object(a.lazy)(()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,481))),h=Object(a.lazy)(()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,482))),b=Object(a.lazy)(()=>n.e(14).then(n.bind(null,474))),v=Object(a.lazy)(()=>n.e(9).then(n.bind(null,476)));t.a=()=>{const e=[{report:"revenue",title:Object(r.__)("Revenue","woocommerce-admin"),component:s,navArgs:{id:"woocommerce-analytics-revenue"}},{report:"products",title:Object(r.__)("Products","woocommerce-admin"),component:l,navArgs:{id:"woocommerce-analytics-products"}},{report:"variations",title:Object(r.__)("Variations","woocommerce-admin"),component:u,navArgs:{id:"woocommerce-analytics-variations"}},{report:"orders",title:Object(r.__)("Orders","woocommerce-admin"),component:d,navArgs:{id:"woocommerce-analytics-orders"}},{report:"categories",title:Object(r.__)("Categories","woocommerce-admin"),component:m,navArgs:{id:"woocommerce-analytics-categories"}},{report:"coupons",title:Object(r.__)("Coupons","woocommerce-admin"),component:p,navArgs:{id:"woocommerce-analytics-coupons"}},{report:"taxes",title:Object(r.__)("Taxes","woocommerce-admin"),component:f,navArgs:{id:"woocommerce-analytics-taxes"}},"yes"===c?{report:"stock",title:Object(r.__)("Stock","woocommerce-admin"),component:b,navArgs:{id:"woocommerce-analytics-stock"}}:null,{report:"customers",title:Object(r.__)("Customers","woocommerce-admin"),component:v},{report:"downloads",title:Object(r.__)("Downloads","woocommerce-admin"),component:h,navArgs:{id:"woocommerce-analytics-downloads"}}].filter(Boolean);return Object(o.applyFilters)("woocommerce_admin_reports_list",e)}},118:function(e,t,n){"use strict";var r=n(103),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function s(e){return r.isMemo(e)?a:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var o=p(n);o&&o!==f&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var c=s(t),h=s(n),b=0;b<a.length;++b){var v=a[b];if(!(i[v]||r&&r[v]||h&&h[v]||c&&c[v])){var g=m(n,v);try{l(t,v,g)}catch(e){}}}}return t}},119:function(e,t,n){"use strict";n.d(t,"c",(function(){return ht})),n.d(t,"b",(function(){return gt})),n.d(t,"a",(function(){return yt}));var r=n(35),o=n.n(r),i=n(0),a=n(4),c=n(13),s=n(7),l=n(25),u=n(5),d=n.n(u),m=n(1),p=n.n(m),f=n(51),h=n(160),b=n(41),v=n(23),g=n(161),y=n.n(g),w=(n(103),n(22)),O=(n(118),function(e){var t=Object(h.a)();return t.displayName=e,t}("Router-History")),j=function(e){var t=Object(h.a)();return t.displayName=e,t}("Router"),_=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(l.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return d.a.createElement(j.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},d.a.createElement(O.Provider,{children:this.props.children||null,value:this.props.history}))},t}(d.a.Component);d.a.Component;d.a.Component;var E={},k=0;function S(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,s=n.sensitive,l=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=E[n]||(E[n]={});if(r[e])return r[e];var o=[],i={regexp:y()(e,o,t),keys:o};return k<1e4&&(r[e]=i,k++),i}(n,{end:i,strict:c,sensitive:l}),o=r.regexp,a=r.keys,s=o.exec(e);if(!s)return null;var u=s[0],d=s.slice(1),m=e===u;return i&&!m?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:m,params:a.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var x=function(e){function t(){return e.apply(this,arguments)||this}return Object(l.a)(t,e),t.prototype.render=function(){var e=this;return d.a.createElement(j.Consumer,null,(function(t){t||Object(b.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?S(n.pathname,e.props):t.match,o=Object(v.a)({},t,{location:n,match:r}),i=e.props,a=i.children,c=i.component,s=i.render;return Array.isArray(a)&&0===a.length&&(a=null),d.a.createElement(j.Provider,{value:o},o.match?a?"function"==typeof a?a(o):a:c?d.a.createElement(c,o):s?s(o):null:"function"==typeof a?a(o):null)}))},t}(d.a.Component);function C(e){return"/"===e.charAt(0)?e:"/"+e}function T(e,t){if(!e)return t;var n=C(e);return 0!==t.pathname.indexOf(n)?t:Object(v.a)({},t,{pathname:t.pathname.substr(n.length)})}function A(e){return"string"==typeof e?e:Object(f.d)(e)}function P(e){return function(){Object(b.a)(!1)}}function N(){}d.a.Component;var R=function(e){function t(){return e.apply(this,arguments)||this}return Object(l.a)(t,e),t.prototype.render=function(){var e=this;return d.a.createElement(j.Consumer,null,(function(t){t||Object(b.a)(!1);var n,r,o=e.props.location||t.location;return d.a.Children.forEach(e.props.children,(function(e){if(null==r&&d.a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?S(o.pathname,Object(v.a)({},e.props,{path:i})):t.match}})),r?d.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(d.a.Component);d.a.useContext;var M=n(3),L=n(32),V=n(21),I=n(12),F=n(15),D=n(11),z=n(16),U=(n(281),n(116)),B=(n(282),n(30)),H=n(2),q=n(117),$=n(59);const W=Object(i.lazy)(()=>n.e(6).then(n.bind(null,597))),Q=Object(i.lazy)(()=>n.e(17).then(n.bind(null,606))),G=Object(i.lazy)(()=>n.e(25).then(n.bind(null,598))),Y=Object(i.lazy)(()=>Promise.all([n.e(1),n.e(2),n.e(31)]).then(n.bind(null,604))),Z=Object(i.lazy)(()=>Promise.all([n.e(2),n.e(34)]).then(n.bind(null,607))),K=Object(i.lazy)(()=>Promise.all([n.e(1),n.e(46)]).then(n.bind(null,605))),J=Object(i.lazy)(()=>Promise.all([n.e(1),n.e(46)]).then(n.bind(null,599))),X=()=>{const e=[],t=[["",wcSettings.woocommerceTranslation]];return e.push({container:Y,path:"/",breadcrumbs:[...t,Object(H.__)("Home","woocommerce-admin")],wpOpenMenu:"toplevel_page_woocommerce",navArgs:{id:"woocommerce-home"},capability:"manage_woocommerce"}),window.wcAdminFeatures.analytics&&(e.push({container:G,path:"/analytics/overview",breadcrumbs:[...t,["/analytics/overview",Object(H.__)("Analytics","woocommerce-admin")],Object(H.__)("Overview","woocommerce-admin")],wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",navArgs:{id:"woocommerce-analytics-overview"},capability:"view_woocommerce_reports"}),e.push({container:Q,path:"/analytics/settings",breadcrumbs:[...t,["/analytics/revenue",Object(H.__)("Analytics","woocommerce-admin")],Object(H.__)("Settings","woocommerce-admin")],wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",navArgs:{id:"woocommerce-analytics-settings"},capability:"view_woocommerce_reports"}),e.push({container:W,path:"/customers",breadcrumbs:[...t,Object(H.__)("Customers","woocommerce-admin")],wpOpenMenu:"toplevel_page_woocommerce",navArgs:{id:"woocommerce-analytics-customers"},capability:"view_woocommerce_reports"}),e.push({container:W,path:"/analytics/:report",breadcrumbs:({match:e})=>{const n=Object(M.find)(Object(q.a)(),{report:e.params.report});return n?[...t,["/analytics/revenue",Object(H.__)("Analytics","woocommerce-admin")],n.title]:[]},wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",capability:"view_woocommerce_reports"})),window.wcAdminFeatures.marketing&&e.push({container:Z,path:"/marketing",breadcrumbs:[...t,["/marketing",Object(H.__)("Marketing","woocommerce-admin")],Object(H.__)("Overview","woocommerce-admin")],wpOpenMenu:"toplevel_page_woocommerce-marketing",navArgs:{id:"woocommerce-marketing-overview"},capability:"view_woocommerce_reports"}),window.wcAdminFeatures.onboarding&&e.push({container:K,path:"/setup-wizard",breadcrumbs:[...t,["/setup-wizard",Object(H.__)("Setup Wizard","woocommerce-admin")]],capability:"manage_woocommerce"}),window.wcAdminFeatures.settings&&e.push({container:J,path:"/settings/:page",breadcrumbs:({match:e})=>{const n=Object(F.f)("settingsPages"),r=n[e.params.page];return r?[...t,[n.general?"/settings/general":"/settings/"+Object.keys(n)[0],Object(H.__)("Settings","woocommerce-admin")],r]:[]},wpOpenMenu:"toplevel_page_woocommerce",capability:"manage_woocommerce"}),Object(B.applyFilters)("woocommerce_admin_pages_list",e)};class ee extends i.Component{componentDidMount(){window.document.documentElement.scrollTop=0,window.document.body.classList.remove("woocommerce-admin-is-loading")}componentDidUpdate(e){const t=Object(M.omit)(e.query,"chartType","filter","paged"),n=Object(M.omit)(this.props.query,"chartType","filter","paged");e.query.paged>1&&!Object(M.isEqual)(t,n)&&Object(I.getHistory)().replace(Object(I.getNewPath)({paged:1})),e.match.url!==this.props.match.url&&(window.document.documentElement.scrollTop=0)}render(){const{page:e,match:t,query:n}=this.props,{url:r,params:o}=t;return window.wpNavMenuUrlUpdate(n),window.wpNavMenuClassChange(e,r),Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)(V.Spinner,null)},Object(i.createElement)(e.container,{params:o,path:r,pathMatch:e.path,query:n}))}}window.wpNavMenuUrlUpdate=function(e){const t=Object(I.getPersistedQuery)(e),n=Object(I.getQueryExcludedScreens)();Array.from(document.querySelectorAll("#adminmenu a")).forEach(e=>function(e,t,n){if(Object($.f)(e.href)){const r=Object(M.last)(e.href.split("?")),o=Object(L.parse)(r),i=o.path||"homescreen",a=Object(I.getScreenFromPath)(i),c=n.includes(a),s="admin.php?"+Object(L.stringify)(Object.assign(o,c?{}:t));e.href=s,e.onclick=e=>{e.preventDefault(),Object(I.getHistory)().push(s)}}}(e,t,n))},window.wpNavMenuClassChange=function(e,t){Array.from(document.getElementsByClassName("current")).forEach((function(e){e.classList.remove("current")}));Array.from(document.querySelectorAll(".wp-has-current-submenu")).forEach((function(e){e.classList.remove("wp-has-current-submenu"),e.classList.remove("wp-menu-open"),e.classList.remove("selected"),e.classList.add("wp-not-current-submenu"),e.classList.add("menu-top")}));const n="/"===t?"admin.php?page=wc-admin":"admin.php?page=wc-admin&path="+encodeURIComponent(t),r="/"===t?`li > a[href$="${n}"], li > a[href*="${n}?"]`:`li > a[href*="${n}"]`,o=document.querySelectorAll(r);if(Array.from(o).forEach((function(e){e.parentElement.classList.add("current")})),e.wpOpenMenu){const t=document.querySelector("#"+e.wpOpenMenu);t&&(t.classList.remove("wp-not-current-submenu"),t.classList.add("wp-has-current-submenu"),t.classList.add("wp-menu-open"),t.classList.add("current"))}document.querySelector("#wpwrap").classList.remove("wp-responsive-open")};var te=n(6),ne=n.n(te),re=n(28),oe=n(20),ie=n(115),ae=n(290),ce=n(27),se=(n(283),n(8)),le=Object(i.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(se.Path,{fillRule:"evenodd",d:"M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z",clipRule:"evenodd"})),ue=Object(i.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(se.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})),de=n(496),me=(n(284),n(164));const pe={page:1,per_page:D.QUERY_DEFAULTS.pageSize,status:"unactioned",type:D.QUERY_DEFAULTS.noteTypes,orderby:"date",order:"desc"};function fe(e){const{getNotes:t,getNotesError:n,isResolving:r}=e(D.NOTES_STORE_NAME),{getCurrentUser:o}=e(D.USER_STORE_NAME),i=o(),a=parseInt(i&&i.woocommerce_meta&&i.woocommerce_meta.activity_panel_inbox_last_read,10);if(!a)return null;t(pe);const c=Boolean(n("getNotes",[pe])),s=r("getNotes",[pe]);if(c||s)return null;const l=t(pe);return Object(me.a)(l,a)>0}const he=({icon:e,title:t,name:n,unread:r,selected:o,isPanelOpen:c,onTabClick:s})=>{const l=ne()("woocommerce-layout__activity-panel-tab",{"is-active":c&&o,"has-unread":r}),u="activity-panel-tab-"+n;return Object(i.createElement)(a.Button,{role:"tab",className:l,"aria-selected":o,"aria-controls":"activity-panel-"+n,key:u,id:u,onClick:()=>{s(n)}},e,t," ",r&&Object(i.createElement)("span",{className:"screen-reader-text"},Object(H.__)("unread activity","woocommerce-admin")))},be=({tabs:e,onTabClick:t,selectedTab:n,tabOpen:r=!1})=>{const[{tabOpen:c,currentTab:s},l]=Object(i.useState)({tabOpen:r,currentTab:n});return Object(i.useEffect)(()=>{l({tabOpen:r,currentTab:n})},[r,n]),Object(i.createElement)(a.NavigableMenu,{role:"tablist",orientation:"horizontal",className:"woocommerce-layout__activity-panel-tabs"},e&&e.map((e,n)=>{if(e.component){const{component:t,options:r}=e;return Object(i.createElement)(t,o()({key:n},r))}return Object(i.createElement)(he,o()({key:n,index:n,isPanelOpen:c,selected:s===e.name},e,{onTabClick:()=>{const n=s!==e.name&&""!==s||!c;n&&s===e.name||Object(z.recordEvent)("activity_panel_open",{tab:e.name}),l({tabOpen:n,currentTab:e.name}),t(e,n)}}))}))},ve=()=>Object(i.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon setup-progress",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)("path",{d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",stroke:"#DCDCDE",strokeWidth:"2"}),Object(i.createElement)("path",{d:"M4 12V12C4 16.4183 7.58172 20 12 20V20C16.4183 20 20 16.4183 20 12V12C20 7.58172 16.4183 4 12 4V4",strokeWidth:"2",strokeLinecap:"round"}));var ge=n(252),ye=n(493);n(285);const we="highlight-tooltip__show";function Oe({title:e,closeButtonText:t,content:n,show:r=!0,id:o,onClose:c,delay:s,onShow:l=M.noop,useAnchor:u=!1}){const[d,m]=Object(i.useState)(s>0?null:r),[p,f]=Object(i.useState)(null),[h,b]=Object(i.useState)(null);function v(){if(u){const e=document.getElementById(o);b(e.getBoundingClientRect())}}Object(i.useEffect)(()=>{const e=document.getElementById(o);let t,n;e&&!p&&(u?(n=document.createElement("div"),document.body.appendChild(n)):n=e.parentElement,t=document.createElement("div"),t.classList.add("highlight-tooltip__container"),n.appendChild(t),f(t));const r=g(t);return()=>{if(t){const e=t.parentElement;e.removeChild(t),u&&e.remove()}r&&clearTimeout(r)}},[]),Object(i.useEffect)(()=>{!d&&p&&p.classList.remove(we)},[d]),Object(i.useEffect)(()=>{r!==d&&null!==d&&p&&(m(r),r?p&&g(p):p.classList.remove(we))},[r]),Object(i.useLayoutEffect)(()=>(window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)),[]);const g=e=>{let t=null;return s>0?t=setTimeout(()=>{t=null,y(e)},s):d||y(e),t},y=e=>{const t=document.getElementById(o);t&&u&&b(t.getBoundingClientRect()),e&&e.classList.add(we),m(!0),l()},w=()=>{m(!1),c&&c()};return p?Object(i.createPortal)(Object(i.createElement)("div",{className:"highlight-tooltip__portal"},d?Object(i.createElement)(i.Fragment,null,Object(i.createElement)(a.IsolatedEventContainer,{className:"highlight-tooltip__overlay"}),Object(i.createElement)(a.Popover,{className:"highlight-tooltip__popover",noArrow:!1,anchorRect:h,focusOnMount:"container"},Object(i.createElement)(a.Card,{size:"medium"},Object(i.createElement)(a.CardHeader,null,e,Object(i.createElement)(a.Button,{isSmall:!0,onClick:w,icon:ye.a})),Object(i.createElement)(a.CardBody,null,n||null),Object(i.createElement)(a.CardFooter,{isBorderless:!0},Object(i.createElement)(a.Button,{size:"small",isPrimary:!0,onClick:w},t||Object(H.__)("Close","woocommerce-admin")))))):null),p):null}Oe.propTypes={id:p.a.string.isRequired,title:p.a.string.isRequired,closeButtonText:p.a.string.isRequired,content:p.a.oneOfType([p.a.string,p.a.node]),show:p.a.bool,onClose:p.a.func,delay:p.a.number,onShow:p.a.func,useAnchor:p.a.bool};var je=n(90);const _e=["button","submit"];function Ee(e){const t=Object(i.useRef)(e);Object(i.useEffect)(()=>{t.current=e},[e]);const n=Object(i.useRef)(!1),r=Object(i.useRef)(),o=Object(i.useCallback)(()=>{clearTimeout(r.current)},[]);Object(i.useEffect)(()=>()=>o(),[]),Object(i.useEffect)(()=>{e||o()},[e,o]);const a=Object(i.useCallback)(e=>{const{type:t,target:r}=e;Object(M.includes)(["mouseup","touchend"],t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(M.includes)(_e,e.type)}return!1}(r)&&(n.current=!0)},[]),c=Object(i.useCallback)(e=>{e.persist(),n.current||(r.current=setTimeout(()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()},0))},[]);return{onFocus:o,onMouseDown:a,onMouseUp:a,onTouchStart:a,onTouchEnd:a,onBlur:c}}const ke=({content:e,isPanelOpen:t,isPanelSwitching:n,currentTab:r,tab:a,closePanel:c,clearPanel:s})=>{const l="woocommerce-layout__activity-panel-wrapper",u=function(e="firstElement"){const t=Object(i.useRef)(e);return Object(i.useEffect)(()=>{t.current=e},[e]),Object(i.useCallback)(e=>{if(!e||!1===t.current)return;if(e.contains(e.ownerDocument.activeElement))return;let n=e;if("firstElement"===t.current){const t=je.focus.tabbable.find(e)[0];t&&(n=t)}n.focus()},[])}(),d=Ee(e=>{const n=e.relatedTarget&&(e.relatedTarget.closest(".woocommerce-inbox-dismiss-confirmation_modal")||e.relatedTarget.closest(".components-snackbar__action"));t&&!n&&c()}),m=Object(i.useRef)(null),p=Object(i.useCallback)(e=>{m.current=e,u(e)},[]);if(!a)return Object(i.createElement)("div",{className:l});if(!e)return null;const f=ne()(l,{"is-open":t,"is-switching":n});return Object(i.createElement)("div",o()({className:f,tabIndex:0,role:"tabpanel","aria-label":a.title,onTransitionEnd:e=>{e&&"transform"===e.propertyName&&(s(),m.current&&t&&a&&u(m.current))}},d,{ref:p}),Object(i.createElement)("div",{className:"woocommerce-layout__activity-panel-content",key:"activity-panel-"+r,id:"activity-panel-"+r},Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)(V.Spinner,null)},e)))};var Se=n(65),xe=n(102),Ce=n(253);const Te=Object(i.lazy)(()=>n.e(4).then(n.bind(null,610))),Ae=Object(i.lazy)(()=>Promise.all([n.e(2),n.e(5)]).then(n.bind(null,600))),Pe=({isEmbedded:e,query:t,userPreferencesData:n})=>{const[r,o]=Object(i.useState)(""),[a,c]=Object(i.useState)(!1),[l,u]=Object(i.useState)(!1),[d,m]=Object(i.useState)(!1),{fills:p}=Object(oe.useSlot)(Ce.a),f=Boolean(null==p?void 0:p.length),h=(e,n)=>{let r={};if("wc-admin"===t.page&&"appearance"===t.task){var o;const{getTasksStatus:t}=e(D.ONBOARDING_STORE_NAME),i=t();r={set_notice:n("woocommerce_demo_store_notice")?"Y":"N",create_homepage:!0===i.hasHomepage?"Y":"N",upload_logo:null!==(o=i.themeMods)&&void 0!==o&&o.custom_logo?"Y":"N"}}return r};function b(e,t,n){const r=Object(Se.c)(e),o=!(!t||!l)&&Object(Se.d)(e,r)>0,i=!(!t||!l)&&Object(xe.b)(e),a=!(!t||!l)&&Object(Se.a)(e);return n>0||o||i||a||f}const{hasUnreadNotes:v,hasAbbreviatedNotifications:g,thingsToDoNextCount:y,requestingTaskListOptions:w,setupTaskListComplete:O,setupTaskListHidden:j,trackedCompletedTasks:_,previewSiteBtnTrackData:E}=Object(s.useSelect)(e=>{const{getOption:n,isResolving:r}=e(D.OPTIONS_STORE_NAME),o="yes"===n("woocommerce_task_list_hidden"),i="yes"===n("woocommerce_extended_task_list_hidden"),a=function(e,t,n){return!e||n?0:e.filter(e=>e.visible&&!e.completed&&!t.includes(e.key)).length}(Object(B.applyFilters)("woocommerce_admin_onboarding_task_list",[],t),n("woocommerce_task_list_dismissed_tasks")||[],i);return{hasUnreadNotes:fe(e),hasAbbreviatedNotifications:b(e,o,a),thingsToDoNextCount:a,requestingTaskListOptions:r("getOption",["woocommerce_task_list_complete"])||r("getOption",["woocommerce_task_list_hidden"]),setupTaskListComplete:"yes"===n("woocommerce_task_list_complete"),setupTaskListHidden:o,trackedCompletedTasks:n("woocommerce_task_list_tracked_completed_tasks")||[],previewSiteBtnTrackData:h(e,n)}}),{updateOptions:k}=Object(s.useDispatch)(D.OPTIONS_STORE_NAME),{currentUserCan:S}=Object(D.useUser)(),x=()=>"wc-admin"===t.page&&!t.path,C=()=>t.task&&!t.path&&(!0===w||!1===j&&!1===O),T=()=>{Object($.f)(window.location.href)?Object(I.getHistory)().push(Object(I.getNewPath)({},"/",{})):window.location.href=Object(F.e)("admin.php?page=wc-admin")},A=()=>{const n={name:"inbox",title:Object(H.__)("Inbox","woocommerce-admin"),icon:Object(i.createElement)(ie.a,{icon:le}),unread:v||g,visible:(e||!x())&&!C()},r={name:"setup",title:Object(H.__)("Finish setup","woocommerce-admin"),icon:Object(i.createElement)(ve,null),onClick:()=>(window.location.href!==Object(F.e)("admin.php?page=wc-admin")&&("no"===j?T():k({woocommerce_task_list_hidden:"no"}).then(T)),null),visible:S("manage_woocommerce")&&!O&&!j&&!C()&&(!x()||e)},o={name:"help",title:Object(H.__)("Help","woocommerce-admin"),icon:Object(i.createElement)(ie.a,{icon:ue}),visible:x()&&!e||C()},a={component:ge.b,visible:!e&&x()&&!C()};return[n,r,{name:"previewSite",title:Object(H.__)("Preview site","woocommerce-admin"),icon:Object(i.createElement)(ie.a,{icon:de.a}),visible:"wc-admin"===t.page&&"appearance"===t.task,onClick:()=>(window.open(window.wcSettings.siteUrl),Object(z.recordEvent)("wcadmin_tasklist_previewsite",E),null)},a,o].filter(e=>e.visible)},P=A(),N=Object(M.uniqueId)("activity-panel-header_"),R=(()=>{const{task:e}=t,r=n&&n.task_list_tracked_started_tasks,o=n&&n.help_panel_highlight_shown;return!(!(e&&"yes"!==o&&(r||{})[e]>1)||_.includes(e))})();return Object(i.createElement)("div",null,Object(i.createElement)(V.H,{id:N,className:"screen-reader-text"},Object(H.__)("Store Activity","woocommerce-admin")),Object(i.createElement)(V.Section,{component:"aside",id:"woocommerce-activity-panel",className:"woocommerce-layout__activity-panel","aria-labelledby":N},Object(i.createElement)(be,{tabs:P,tabOpen:l,selectedTab:r,onTabClick:(e,t)=>{e.onClick?e.onClick():(({name:e},t)=>{const n=e!==r&&""!==r&&t&&l;a||(o(e),u(t),m(n))})(e,t)}}),Object(i.createElement)(ke,{currentTab:!0,isPanelOpen:l,isPanelSwitching:d,tab:Object(M.find)(A(),{name:r}),content:(e=>{const{task:n}=t;switch(e){case"inbox":return Object(i.createElement)(Ae,{hasAbbreviatedNotifications:g,thingsToDoNextCount:y});case"help":return Object(i.createElement)(Te,{taskName:n});default:return null}})(r),closePanel:()=>(c(!0),void u(!1)),clearPanel:()=>{l||(c(!1),m(!1),o(""))}})),R?Object(i.createElement)(Oe,{delay:1e3,useAnchor:!0,title:Object(H.__)("We're here for help","woocommerce-admin"),content:Object(H.__)("If you have any questions, feel free to explore the WooCommerce docs listed here.","woocommerce-admin"),closeButtonText:Object(H.__)("Got it","woocommerce-admin"),id:"activity-panel-tab-help",onClose:()=>(Object(z.recordEvent)("help_tooltip_click"),void(n&&n.updateUserPreferences&&n.updateUserPreferences({help_panel_highlight_shown:"yes"}))),onShow:()=>Object(z.recordEvent)("help_tooltip_view")}):null)};Pe.defaultProps={getHistory:I.getHistory};var Ne=Pe,Re=n(100),Me=n.n(Re);const Le=()=>/iPhone|iPad|iPod/i.test(window.navigator.userAgent)?"ios":/Android/i.test(window.navigator.userAgent)?"android":"unknown",Ve=()=>Object(i.createElement)("svg",{width:"37",height:"37",viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)("rect",{width:"92",height:"92",rx:"21.3953",fill:"#7F54B3"}),Object(i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M72.5937 28.043H19.8094C16.4781 28.0459 13.7783 30.7705 13.7754 34.1324V54.4501C13.7783 57.812 16.4781 60.5366 19.8094 60.5395H44.8229L56.2573 66.9607L53.6672 60.5395H72.599C74.2009 60.5402 75.7374 59.8983 76.8702 58.7552C78.0029 57.612 78.639 56.0614 78.6383 54.4447V34.1324C78.6376 32.5157 78.0002 30.9657 76.8664 29.8235C75.7327 28.6814 74.1956 28.0408 72.5937 28.043ZM19.1057 32.4208C18.4658 32.4324 17.8646 32.7359 17.467 33.2482C17.0888 33.7635 16.9404 34.4175 17.058 35.0502C18.5962 45.0986 20.0338 51.8757 21.371 55.3816C21.8779 56.658 22.4896 57.2703 23.2063 57.2185C24.3075 57.1489 25.6263 55.5968 27.1627 52.5621C27.9964 50.8412 29.2602 48.2662 30.9539 44.837C32.3785 49.88 34.309 53.6787 36.7456 56.2331C37.4291 56.9436 38.1204 57.2748 38.8195 57.2266C39.4185 57.1931 39.953 56.8315 40.217 56.2813C40.4753 55.7358 40.5806 55.1278 40.5211 54.5248C40.3516 52.0703 40.5919 48.667 41.2421 44.3149C41.9081 39.8057 42.7523 36.5818 43.7749 34.6432C43.9822 34.2526 44.0733 33.8087 44.037 33.366C44.0039 32.7587 43.7116 32.1969 43.2374 31.829C42.7745 31.4367 42.1799 31.2446 41.5803 31.2935C40.8334 31.3325 40.1682 31.7885 39.8499 32.4797C38.2331 35.5019 37.0812 40.4109 36.3943 47.2068C35.2823 44.2394 34.4509 41.1703 33.9114 38.0412C33.623 36.4613 32.9037 35.7125 31.7536 35.7946C30.9592 35.8589 30.3063 36.3944 29.7819 37.4012L24.0348 48.5643C23.0997 44.6692 22.2205 39.9289 21.3972 34.3433C21.1997 32.9652 20.4358 32.3244 19.1057 32.4208ZM69.9089 34.6877C71.6969 35.0381 73.2407 36.2 74.1186 37.8559C74.9693 39.3247 75.3946 41.1161 75.3946 43.23C75.4148 45.9567 74.7062 48.6357 73.3477 50.9687C71.7778 53.7023 69.7195 55.0691 67.1727 55.0691C66.6933 55.0668 66.2153 55.0128 65.7467 54.9078C63.9584 54.5581 62.4143 53.396 61.5371 51.7396C60.6864 50.2452 60.261 48.4411 60.261 46.3272C60.2357 43.6127 60.945 40.9454 62.3079 38.6295C63.9023 35.8959 65.9607 34.5291 68.4829 34.5291C68.9623 34.5304 69.4402 34.5836 69.9089 34.6877ZM68.7937 49.4848C69.7707 48.5773 70.4399 47.2269 70.8012 45.4337V45.4419C70.9315 44.7826 70.9959 44.1112 70.9933 43.4382C70.986 42.5849 70.8291 41.74 70.5302 40.9452C70.1443 39.901 69.6304 39.3124 68.9884 39.1793C68.0378 38.9643 67.1239 39.5256 66.2469 40.8632C65.5812 41.8393 65.109 42.9432 64.8577 44.1106C64.7276 44.7708 64.6632 45.4432 64.6657 46.1171C64.6739 46.9677 64.8308 47.8096 65.1287 48.6019C65.5146 49.6388 66.0294 50.2274 66.6731 50.3678C67.3169 50.5081 68.0237 50.2138 68.7937 49.4848ZM57.9079 37.8559C57.0291 36.2008 55.4854 35.0392 53.6976 34.6877C53.2279 34.5837 52.749 34.5306 52.2687 34.5291C49.7443 34.5291 47.6856 35.8959 46.0927 38.6295C44.7295 40.9454 44.0201 43.6127 44.0454 46.3272C44.0454 48.4411 44.4699 50.2452 45.319 51.7396C46.1976 53.3949 47.7414 54.5566 49.5294 54.9078C49.999 55.0126 50.4779 55.0667 50.9582 55.0691C53.5055 55.0691 55.5642 53.7023 57.1343 50.9687C58.4922 48.6355 59.2001 45.9565 59.1789 43.23C59.1789 41.1161 58.7544 39.3247 57.9053 37.8559H57.9079ZM54.5903 45.4337C54.2307 47.2269 53.5614 48.5773 52.5825 49.4848C51.8115 50.2065 51.101 50.5017 50.4589 50.3678C49.8169 50.2338 49.3011 49.6461 48.9169 48.6019C48.6181 47.8097 48.4603 46.9678 48.4511 46.1171C48.4495 45.4431 48.5148 44.7707 48.6459 44.1106C48.8971 42.9432 49.3694 41.8393 50.0353 40.8632C50.9124 39.5256 51.8264 38.9643 52.7773 39.1793C53.4193 39.3124 53.9333 39.901 54.3193 40.9452C54.617 41.7404 54.7739 42.585 54.7824 43.4382C54.785 44.1112 54.7207 44.7826 54.5903 45.4419V45.4337Z",fill:"white"}));n(286);const Ie=({onInstall:e,onDismiss:t})=>{Object(i.useEffect)(()=>{const e=document.getElementsByClassName("woocommerce-layout")[0];return"android"===Le()&&e&&e.classList.add("woocommerce-layout__show-app-banner"),()=>{e&&e.classList.remove("woocommerce-layout__show-app-banner")}},[]);const[n,r]=Object(i.useState)(!1);return"android"!==Le()||n?null:Object(i.createElement)("div",{className:"woocommerce-mobile-app-banner"},Object(i.createElement)(ie.a,{icon:Object(i.createElement)(Me.a,{"data-testid":"dismiss-btn"}),onClick:()=>{t(),r(!0),Object(z.recordEvent)("wcadmin_mobile_android_banner_click",{action:"dismiss"})}}),Object(i.createElement)(Ve,null),Object(i.createElement)("div",{className:"woocommerce-mobile-app-banner__description"},Object(i.createElement)("p",{className:"woocommerce-mobile-app-banner__description__text"},Object(H.__)("Run your store from anywhere","woocommerce-admin")),Object(i.createElement)("p",{className:"woocommerce-mobile-app-banner__description__text"},Object(H.__)("Download the WooCommerce app","woocommerce-admin"))),Object(i.createElement)(a.Button,{href:"https://play.google.com/store/apps/details?id=com.woocommerce.android",isSecondary:!0,onClick:()=>{e(),r(!0),Object(z.recordEvent)("wcadmin_mobile_android_banner_click",{action:"install"})}},Object(H.__)("Install","woocommerce-admin")))};function Fe(){const[e,t]=Object(i.useState)(!1),n=Object(i.useRef)(null);return Object(i.useEffect)(()=>{const e=()=>{t(window.pageYOffset>20)},r=()=>{n.current=window.requestAnimationFrame(e)};return window.addEventListener("scroll",r),()=>{window.removeEventListener("scroll",r),window.cancelAnimationFrame(n.current)}},[]),e}n(287);const De=(e,t,n=null)=>{if(!t)return 0;const r=0===(o=t).indexOf("http")?o:Object(F.e)(o);var o;const{href:i}=e;if(r===i)return Number.MAX_SAFE_INTEGER;const a=(e=>{const t=e.replace(/[-\/\\^$*+?.()|[\]{}]/gi,"\\$&"),[n,r,o]=t.split(/\\\?|#/),i=o?`(.*#${o}$)`:"";return"^"+n+(r?r.split("&").reduce((e,t)=>`${e}(?=.*[?|&]${t}(&|$|#))`,""):"")+i})(r),c=new RegExp(n||a,"i");return(decodeURIComponent(i).match(c)||[]).length},ze=e=>{let t=null,n=0;return e.forEach(e=>{const r=De(window.location,e.url,e.matchExpression);r>0&&r>=n&&(n=r,t=e)}),t||null},Ue=["primary","favorites","plugins","secondary"],Be={woocommerce:{id:"woocommerce",isCategory:!0,menuId:"primary",migrate:!0,order:10,parent:"",title:"WooCommerce"}};var He=Object(i.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(i.createElement)(se.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));var qe=()=>{const e=Object(F.f)("siteTitle",""),t=Object(F.f)("homeUrl",""),n=Fe(),[r,o]=Object(i.useState)(document.body.classList.contains(!1)),c="is-wc-nav-folded",l="is-wc-nav-expanded",u=()=>{document.body.classList.add(c),document.body.classList.remove(l),o(!0)},d=()=>{document.body.classList.remove(c),document.body.classList.add(l),o(!1)},m=(e=document.body.clientWidth)=>{e<=960?u():d()};Object(i.useEffect)(()=>{m();const e=[{eventName:"orientationchange",handler:e=>m(e.target.screen.availWidth)},{eventName:"resize",handler:Object(M.debounce)(()=>m(),200)}];for(const{eventName:t,handler:n}of e)window.addEventListener(t,n,!1);Object(I.addHistoryListener)(()=>m())},[]);let p=Object(i.createElement)(ie.a,{size:"36px",icon:He});const{isRequestingSiteIcon:f,siteIconUrl:h}=Object(s.useSelect)(e=>{const{isResolving:t}=e("core/data"),{getEntityRecord:n}=e("core"),r=n("root","__unstableBase",void 0)||{};return{isRequestingSiteIcon:t("core","getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:r.siteIconUrl}});h?p=Object(i.createElement)("img",{alt:Object(H.__)("Site Icon"),src:h}):f&&(p=null);const b=ne()("woocommerce-navigation-header",{"is-scrolled":n});return Object(i.createElement)("div",{className:b},Object(i.createElement)(a.Button,{onClick:()=>{document.body.classList.contains(c)?d():u()},className:"woocommerce-navigation-header__site-icon","aria-label":"Fold navigation",role:"switch","aria-checked":r?"true":"false"},p),Object(i.createElement)(a.Button,{href:t,className:"woocommerce-navigation-header__site-title",as:"span"},Object(re.decodeEntities)(e)))},$e=(n(288),Object(i.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(se.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}))),We=Object(i.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(se.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));n(289);const Qe=({id:e})=>{const{favorites:t,isResolving:n}=Object(s.useSelect)(e=>({favorites:e(D.NAVIGATION_STORE_NAME).getFavorites(),isResolving:e(D.NAVIGATION_STORE_NAME).isResolving("getFavorites")})),{addFavorite:r,removeFavorite:o}=Object(s.useDispatch)(D.NAVIGATION_STORE_NAME),c=t.includes(e);return n?null:Object(i.createElement)(a.Button,{id:"woocommerce-navigation-favorite-button",className:"woocommerce-navigation-favorite-button",isTertiary:!0,onClick:()=>{(c?o:r)(e),Object(z.recordEvent)("navigation_favorite",{id:e,action:c?"unfavorite":"favorite"})},"aria-label":c?Object(H.__)("Add this item to your favorites.","woocommerce-admin"):Object(H.__)("Remove this item from your favorites.","woocommerce-admin")},Object(i.createElement)(ie.a,{icon:c?$e:We,className:`star-${c?"filled":"empty"}-icon`}))};const Ge="woocommerce_navigation_favorites_tooltip_hidden",Ye=()=>{const{isFavoritesResolving:e,isOptionResolving:t,isTooltipHidden:n}=Object(s.useSelect)(e=>{const{getOption:t,isResolving:n}=e(D.OPTIONS_STORE_NAME);return{isFavoritesResolving:e(D.NAVIGATION_STORE_NAME).isResolving("getFavorites"),isOptionResolving:n("getOption",[Ge]),isTooltipHidden:"yes"===t(Ge)}}),{updateOptions:r}=Object(s.useDispatch)(D.OPTIONS_STORE_NAME);return e||n||t||document.body.classList.contains("is-wc-nav-folded")?null:Object(i.createElement)(Oe,{delay:1e3,title:Object(H.__)("Introducing favorites","woocommerce-admin"),content:Object(H.__)("You can now favorite your extensions to pin them in the top level of the navigation.","woocommerce-admin"),closeButtonText:Object(H.__)("Got it","woocommerce-admin"),id:"woocommerce-navigation-favorite-button",onClose:()=>r({[Ge]:"yes"}),useAnchor:!0})};var Ze=({category:e})=>{const{id:t,menuId:n,title:r}=e,o="woocommerce-navigation-category-title";return["plugins","favorites"].includes(n)?Object(i.createElement)("span",{className:o},Object(i.createElement)("span",{className:o+"__text"},r),Object(i.createElement)(Qe,{id:t}),Object(i.createElement)(Ye,null)):Object(i.createElement)("span",{className:o},r)};var Ke=({item:e})=>{var t;const n=Object(oe.useSlot)("woocommerce_navigation_"+e.id),r=Boolean(null==n||null===(t=n.fills)||void 0===t?void 0:t.length),o=e=>{Object(z.recordEvent)("navigation_click",{menu_item:e})};return r&&!e.isCategory?Object(i.createElement)(oe.NavigationItem,{key:e.id,item:e.id},Object(i.createElement)("div",{onClick:()=>o(e.id)},Object(i.createElement)(I.WooNavigationItem.Slot,{name:e.id}))):Object(i.createElement)(oe.NavigationItem,{key:e.id,item:e.id,title:e.title,href:e.url,navigateToMenu:!e.url&&e.id,onClick:()=>o(e.id),hideIfTargetMenuEmpty:!0})};const Je=({category:e,onBackClick:t,pluginItems:n,primaryItems:r})=>{if(!r.length&&!n.length)return null;const o=Object(B.applyFilters)("woocommerce_navigation_root_back_label",Object(H.__)("WordPress Dashboard","woocommerce-admin")),a=Object(B.applyFilters)("woocommerce_navigation_root_back_url",window.wcNavigation.rootBackUrl),c="woocommerce"===e.id&&a;return Object(i.createElement)(oe.NavigationMenu,{title:Object(i.createElement)(Ze,{category:e}),menu:e.id,parentMenu:e.parent,backButtonLabel:c?o:e.backButtonLabel||null,onBackButtonClick:c?()=>{t("woocommerce"),window.location=a}:()=>t(e.id)},!!r.length&&Object(i.createElement)(oe.NavigationGroup,null,r.map(e=>Object(i.createElement)(Ke,{key:e.id,item:e}))),!!n.length&&Object(i.createElement)(oe.NavigationGroup,{title:"woocommerce"===e.id?Object(H.__)("Extensions","woocommerce-admin"):null},n.map(e=>Object(i.createElement)(Ke,{key:e.id,item:e}))))},Xe=({category:e,items:t,onBackClick:n})=>{if(!t.length)return null;const r="woocommerce"===e.id;return Object(i.createElement)(oe.NavigationMenu,{className:"components-navigation__menu-secondary",title:!r&&Object(i.createElement)(Ze,{category:e}),menu:e.id,parentMenu:e.parent,backButtonLabel:e.backButtonLabel||null,onBackButtonClick:r?null:()=>n(e.id)},Object(i.createElement)(oe.NavigationGroup,{onBackButtonClick:()=>n(e.id)},t.map(e=>Object(i.createElement)(Ke,{key:e.id,item:e}))))};var et=()=>{const{menuItems:e}=Object(s.useSelect)(e=>({menuItems:e(D.NAVIGATION_STORE_NAME).getMenuItems()}));Object(i.useEffect)(()=>{document.documentElement.classList.remove("wp-toolbar"),document.body.classList.add("has-woocommerce-navigation");const e=document.getElementById("adminmenumain");e&&e.classList.add("folded")},[]);const[t,n]=Object(i.useState)("woocommerce-home"),[r,o]=Object(i.useState)("woocommerce");Object(i.useEffect)(()=>{const r=ze(e);r&&t!==r&&(n(r),o(r.parent));return Object(I.addHistoryListener)(()=>{setTimeout(()=>{const t=ze(e);t&&(n(t),o(t.parent))},0)})},[e]);const{currentUserCan:a}=Object(D.useUser)(),{categories:c,items:l}=Object(i.useMemo)(()=>((e,t)=>{const n={...Be};return{items:(e=>e.sort((e,t)=>e.order===t.order?e.title.localeCompare(t.title):e.order-t.order))(e).reduce((e,r)=>{if(e[r.parent]||(e[r.parent]={},Ue.forEach(t=>{e[r.parent][t]=[]})),!e[r.parent][r.menuId])return e;if(t&&r.capability&&!t(r.capability))return e;r.isCategory&&(n[r.id]=r);const o=e[r.parent][r.menuId];return o&&o.push(r),e},{}),categories:n}})(e,a),[e,a]),u=Object(i.useRef)(null),d=e=>{Object(z.recordEvent)("navigation_back_click",{category:e})},m="woocommerce"===r,p=ne()("woocommerce-navigation",{"is-root":m});return Object(i.createElement)("div",{className:p},Object(i.createElement)(qe,null),Object(i.createElement)("div",{className:"woocommerce-navigation__wrapper",ref:u},Object(i.createElement)(oe.Navigation,{activeItem:t?t.id:null,activeMenu:r,onActivateMenu:(...e)=>{u&&u.current&&(u.current.scrollTop=0),o(...e)}},Object.values(c).map(e=>{const t=l[e.id];return!!t&&[Object(i.createElement)(Je,{key:e.id,category:e,onBackClick:d,primaryItems:[...t.primary,...t.favorites],pluginItems:t.plugins}),Object(i.createElement)(Xe,{key:"secondary/"+e.id,category:e,onBackClick:d,items:t.secondary})]}))))};var tt=Object(D.withNavigationHydration)(window.wcNavigation)(et);const nt=()=>{if(new URL(window.location.href).searchParams.get("task")){const e=Object(H.__)("WooCommerce Home","woocommerce-admin"),t=()=>{Object(z.recordEvent)("topbar_back_button",{page_name:rt(window.title)}),Object(I.updateQueryString)({},Object(I.getHistory)().location.pathname,{})};return Object(i.createElement)(a.Tooltip,{text:e},Object(i.createElement)("div",{tabIndex:"0",role:"button","data-testid":"header-back-button",className:"woocommerce-layout__header-back-button",onKeyDown:({keyCode:e})=>{e!==ce.ENTER&&e!==ce.SPACE||t()}},Object(i.createElement)(ie.a,{icon:ae.a,onClick:t})))}return null},rt=e=>{const t=new URL(window.location.href).searchParams.get("task");return{payments:Object(H.__)("Set up payments","woocommerce-admin"),tax:Object(H.__)("Add tax rates","woocommerce-admin"),appearance:Object(H.__)("Personalize your store","woocommerce-admin"),products:Object(H.__)("Add products","woocommerce-admin"),shipping:Object(H.__)("Set up shipping costs","woocommerce-admin")}[t]||e},ot=({sections:e,isEmbedded:t=!1,query:n})=>{const r=Object(i.useRef)(null),o=Object(F.f)("siteTitle",""),a=e.slice(-1)[0],c=Fe(),{updateUserPreferences:s,...l}=Object(D.useUserPreferences)(),u="yes"===l.android_app_banner_dismissed;let d=null;const m=ne()("woocommerce-layout__header",{"is-scrolled":c});Object(i.useLayoutEffect)(()=>(p(),window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p);const e=document.querySelector("#wpbody");e&&(e.style.marginTop=null)}),[u]);const p=()=>{clearTimeout(d),d=setTimeout((function(){const e=document.querySelector("#wpbody");e&&r.current&&(e.style.marginTop=r.current.offsetHeight+"px")}),200)};Object(i.useEffect)(()=>{if(!t){const t=e.map(e=>Array.isArray(e)?e[1]:e).reverse().join(" ‹ "),n=Object(re.decodeEntities)(Object(H.sprintf)(Object(H.__)("%1$s ‹ %2$s — WooCommerce","woocommerce-admin"),t,o));document.title!==n&&(document.title=n)}},[t,e,o]);const f=()=>{s({android_app_banner_dismissed:"yes"})},h=nt()?"with-back-button":"";return Object(i.createElement)("div",{className:m,ref:r},!u&&Object(i.createElement)(Ie,{onDismiss:f,onInstall:f}),Object(i.createElement)("div",{className:"woocommerce-layout__header-wrapper"},window.wcAdminFeatures.navigation&&Object(i.createElement)(tt,null),nt(),Object(i.createElement)(oe.Text,{className:"woocommerce-layout__header-heading "+h,as:"h1"},rt(Object(re.decodeEntities)(a))),window.wcAdminFeatures["activity-panels"]&&Object(i.createElement)(Ne,{isEmbedded:t,query:n,userPreferencesData:{...l,updateUserPreferences:s}})))};class it extends i.Component{render(){return Object(i.createElement)("div",{id:"woocommerce-layout__notice-list",className:"woocommerce-layout__notice-list"})}}var at=it,ct=n(159),st=n(255);var lt=function({notices:e,className:t,children:n,onRemove:r=M.noop,onRemove2:a=M.noop}){const s=Object(c.useReducedMotion)(),[l]=Object(i.useState)(()=>new WeakMap),u=Object(ct.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:l.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:s});t=ne()("components-snackbar-list",t);const d=e=>()=>{r(e.id),a(e.id)};return Object(i.createElement)("div",{className:t},n,u.map(({item:e,key:t,props:n})=>Object(i.createElement)(ct.animated.div,{key:t,style:n},Object(i.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&l.set(e,t)},Object(i.createElement)(st.a,o()({},Object(M.omit)(e,["content"]),{onRemove:d(e)}),e.content)))))};n(295);const ut="woocommerce_admin_transient_notices_queue";function dt(e){const{removeNotice:t}=Object(s.useDispatch)("core/notices"),{createNotice:n,removeNotice:r}=Object(s.useDispatch)("core/notices2"),{updateOptions:o}=Object(s.useDispatch)(D.OPTIONS_STORE_NAME),{currentUser:a={},notices:c=[],notices2:l=[],noticesQueue:u={}}=Object(s.useSelect)(e=>({currentUser:e(D.USER_STORE_NAME).getCurrentUser(),notices:e("core/notices").getNotices(),notices2:e("core/notices2").getNotices(),noticesQueue:e(D.OPTIONS_STORE_NAME).getOption(ut)}));Object(i.useEffect)(()=>{Object.values(u).filter(e=>e.user_id===a.id||!e.user_id).forEach(e=>{const t=Object(B.applyFilters)("woocommerce_admin_queued_notice_filter",e);n(t.status,t.content,{onDismiss:()=>{(e=>{const t={...u};delete t[e],o({[ut]:t})})(t.id)},...t.options||{}})})},[]);const{className:d}=e,m=ne()("woocommerce-transient-notices","components-notices__snackbar",d),p=c.concat(l);return Object(i.createElement)(lt,{notices:p,className:m,onRemove:t,onRemove2:r})}dt.propTypes={className:p.a.string,notices:p.a.array};var mt=dt;Object(U.registerPlugin)("wc-admin-navigation",{render:()=>{const{persistedQuery:e}=Object(s.useSelect)(e=>({persistedQuery:e(D.NAVIGATION_STORE_NAME).getPersistedQuery()}));if(!Object($.f)(window.location.href))return null;const t=Object(q.a)().filter(e=>e.navArgs),n=X().filter(e=>e.navArgs).map(e=>"/analytics/settings"===e.path?{...e,breadcrumbs:[Object(H.__)("Analytics","woocommerce-admin")]}:e);return Object(i.createElement)(i.Fragment,null,n.map(t=>Object(i.createElement)(I.WooNavigationItem,{item:t.navArgs.id,key:t.navArgs.id},Object(i.createElement)(V.Link,{className:"components-button",href:Object(I.getNewPath)(Object(I.pathIsExcluded)(t.path)?{}:e,t.path,{}),type:"wc-admin"},t.breadcrumbs[t.breadcrumbs.length-1]))),t.map(t=>Object(i.createElement)(I.WooNavigationItem,{item:t.navArgs.id,key:t.navArgs.id},Object(i.createElement)(V.Link,{className:"components-button",href:Object(I.getNewPath)(Object(I.pathIsExcluded)(t.report)?{}:e,"/analytics/"+t.report,{}),type:"wc-admin"},t.title))))}});const pt=Object(i.lazy)(()=>Promise.all([n.e(1),n.e(47)]).then(n.bind(null,609))),ft=Object(i.lazy)(()=>n.e(51).then(n.bind(null,515)));class ht extends i.Component{render(){const{children:e}=this.props;return Object(i.createElement)("div",{className:"woocommerce-layout__primary",id:"woocommerce-layout__primary"},window.wcAdminFeatures["store-alerts"]&&Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)(V.Spinner,null)},Object(i.createElement)(pt,null)),Object(i.createElement)(at,null),e)}}class bt extends i.Component{componentDidMount(){this.recordPageViewTrack()}componentDidUpdate(e){const t=Object(M.get)(e,"location.pathname"),n=Object(M.get)(this.props,"location.pathname");t&&n&&t!==n&&this.recordPageViewTrack()}recordPageViewTrack(){const{activePlugins:e,installedPlugins:t,isEmbedded:n,isJetpackConnected:r}=this.props,o={has_navigation:!!window.wcNavigation};if(n){const e=document.location.pathname+document.location.search;return void Object(z.recordPageView)(e,{is_embedded:!0,...o})}const i=Object(M.get)(this.props,"location.pathname");if(!i)return;let a=i.substring(1).replace(/\//g,"_");0===a.length&&(a="home_screen"),Object(z.recordPageView)(a,{jetpack_installed:t.includes("jetpack"),jetpack_active:e.includes("jetpack"),jetpack_connected:r,...o})}getQuery(e){if(!e)return{};const t=e.substring(1);return Object(L.parse)(t)}isWCPaySettingsPage(){const{page:e,section:t,tab:n}=Object(I.getQuery)();return"wc-settings"===e&&"checkout"===n&&"woocommerce_payments"===t}render(){const{isEmbedded:e,...t}=this.props,{location:n,page:r}=this.props,{breadcrumbs:c}=r,s=this.getQuery(n&&n.search);return Object(i.createElement)(a.SlotFillProvider,null,Object(i.createElement)("div",{className:"woocommerce-layout"},Object(i.createElement)(ot,{sections:Object(M.isFunction)(c)?c(this.props):c,isEmbedded:e,query:s}),Object(i.createElement)(mt,null),!e&&Object(i.createElement)(ht,null,Object(i.createElement)("div",{className:"woocommerce-layout__main"},Object(i.createElement)(ee,o()({},t,{query:s})))),e&&this.isWCPaySettingsPage()&&Object(i.createElement)(i.Suspense,{fallback:null},Object(i.createElement)(ft,null))),Object(i.createElement)(U.PluginArea,{scope:"woocommerce-admin"}))}}bt.propTypes={isEmbedded:p.a.bool,page:p.a.shape({container:p.a.oneOfType([p.a.func,p.a.object]),path:p.a.string,breadcrumbs:p.a.oneOfType([p.a.func,p.a.arrayOf(p.a.oneOfType([p.a.arrayOf(p.a.string),p.a.string]))]).isRequired,wpOpenMenu:p.a.string}).isRequired};const vt=Object(c.compose)(Object(D.withPluginsHydration)({...window.wcSettings.plugins||{},jetpackStatus:window.wcSettings.dataEndpoints&&window.wcSettings.dataEndpoints.jetpackStatus||!1}),Object(s.withSelect)((e,{isEmbedded:t})=>{if(t)return;const{getActivePlugins:n,getInstalledPlugins:r,isJetpackConnected:o}=e(D.PLUGINS_STORE_NAME);return{activePlugins:n(),isJetpackConnected:o(),installedPlugins:r()}}))(bt),gt=Object(c.compose)(window.wcSettings.preloadOptions?Object(D.withOptionsHydration)({...window.wcSettings.preloadOptions}):M.identity)(()=>{const{currentUserCan:e}=Object(D.useUser)();return Object(i.createElement)(_,{history:Object(I.getHistory)()},Object(i.createElement)(R,null,X().filter(t=>!t.capability||e(t.capability)).map(e=>Object(i.createElement)(x,{key:e.path,path:e.path,exact:!0,render:t=>Object(i.createElement)(vt,o()({page:e},t))}))))}),yt=Object(c.compose)(window.wcSettings.preloadOptions?Object(D.withOptionsHydration)({...window.wcSettings.preloadOptions}):M.identity)(()=>Object(i.createElement)(vt,{page:{breadcrumbs:Object(F.f)("embedBreadcrumbs",[])},isEmbedded:!0}))},12:function(e,t){e.exports=window.wc.navigation},120:function(e,t){e.exports=window.wc.number},122:function(e,t){e.exports=window.wc.explat},127:function(e,t){e.exports=window.wp.notices},128:function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],u=!1,d=-1;function m(){u&&s&&(u=!1,s.length?l=s.concat(l):d=-1,l.length&&p())}function p(){if(!u){var e=c(m);u=!0;for(var t=l.length;t;){for(s=l,l=[];++d<t;)s&&s[d].run();d=-1,t=l.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||u||c(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},129:function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,m=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,b=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case m:case a:case s:case c:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case v:case b:case l:return e;default:return t}}case i:return t}}}function _(e){return j(e)===m}t.AsyncMode=d,t.ConcurrentMode=m,t.ContextConsumer=u,t.ContextProvider=l,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=v,t.Memo=b,t.Portal=i,t.Profiler=s,t.StrictMode=c,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||j(e)===d},t.isConcurrentMode=_,t.isContextConsumer=function(e){return j(e)===u},t.isContextProvider=function(e){return j(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return j(e)===p},t.isFragment=function(e){return j(e)===a},t.isLazy=function(e){return j(e)===v},t.isMemo=function(e){return j(e)===b},t.isPortal=function(e){return j(e)===i},t.isProfiler=function(e){return j(e)===s},t.isStrictMode=function(e){return j(e)===c},t.isSuspense=function(e){return j(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===m||e===s||e===c||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===b||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===y||e.$$typeof===w||e.$$typeof===O||e.$$typeof===g)},t.typeOf=j},13:function(e,t){e.exports=window.wp.compose},14:function(e,t){e.exports=window.wp.url},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return m})),n.d(t,"e",(function(){return p})),n.d(t,"d",(function(){return f}));var r=n(2);const o=["wcAdminSettings","preloadSettings"],i="object"==typeof wcSettings?wcSettings:{},a=Object.keys(i).reduce((e,t)=>(o.includes(t)||(e[t]=i[t]),e),{}),c=a.adminUrl,s=(a.countries,a.currency),l=a.locale,u=a.orderStatuses;a.siteTitle,a.wcAssetUrl;function d(e,t=!1,n=(e=>e)){if(o.includes(e))throw new Error(Object(r.__)("Mutable settings should be accessed via data store."));return n(a.hasOwnProperty(e)?a[e]:t,t)}function m(e,t,n=(e=>e)){if(o.includes(e))throw new Error(Object(r.__)("Mutable settings should be mutated via data store."));a[e]=n(t)}function p(e){return(c||"")+e}function f(e){return new Promise((t,n)=>{document.querySelector(`#${e.handle}-js`)&&t();const r=document.createElement("script");r.src=e.src,r.id=e.handle+"-js",r.async=!0,r.onload=t,r.onerror=n,document.body.appendChild(r)})}},159:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(35)),i=r(n(291)),a=n(5),c=r(a),s=r(n(292)),l=r(n(294)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function m(e,t){return u.und(e)||u.nul(e)?t:e}function p(e){return u.und(e)?[]:u.arr(e)?e:[e]}function f(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,i(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var i;return u.und(t[r])?o({},n,((i={})[r]=e[r],i)):n}),{});return o({to:t},n)}var b,v,g=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(l(t))}))},t}return s(t,e),t}(g),w=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(l(t))}))},t}s(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function O(e,t){b={fn:e,transform:t}}function j(e){v=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},k=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function S(e){_=e}var x,C=function(){return Date.now()};function T(e){x=e}var A,P,N=function(e){return e.current};function R(e){A=e}var M=Object.freeze({get applyAnimatedValues(){return b},injectApplyAnimatedValues:O,get colorNames(){return v},injectColorNames:j,get requestFrame(){return E},get cancelFrame(){return k},injectFrame:function(e,t){E=e,k=t},get interpolation(){return _},injectStringInterpolator:S,get now(){return C},injectNow:function(e){C=e},get defaultElement(){return x},injectDefaultElement:T,get animatedApi(){return N},injectAnimatedApi:function(e){N=e},get createAnimatedStyle(){return A},injectCreateAnimatedStyle:R,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),L=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:A(t.style)}):t,r.update=n,r.attach(),r}return s(t,e),t}(w),V=!1,I=new Set,F=function e(){if(!V)return!1;var t=C(),n=I,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var i;if(r){if(o>=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}for(var a=i,c=!1,s=0;s<a.configs.length;s++){for(var l=a.configs[s],u=void 0,d=void 0,m=0;m<l.animatedValues.length;m++){var p=l.animatedValues[m];if(!p.done){var f=l.fromValues[m],h=l.toValues[m],b=p.lastPosition,v=h instanceof g,y=Array.isArray(l.initialVelocity)?l.initialVelocity[m]:l.initialVelocity;if(v&&(h=h.getValue()),l.immediate)p.setValue(h),p.done=!0;else if("string"!=typeof f&&"string"!=typeof h){if(void 0!==l.duration)b=f+l.easing((t-p.startTime)/l.duration)*(h-f),u=t>=p.startTime+l.duration;else if(l.decay)b=f+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-p.startTime))),(u=Math.abs(p.lastPosition-b)<.1)&&(h=b);else{d=void 0!==p.lastTime?p.lastTime:t,y=void 0!==p.lastVelocity?p.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var w=Math.floor(t-d),O=0;O<w;++O){b+=1*(y+=1*((-l.tension*(b-h)+-l.friction*y)/l.mass)/1e3)/1e3}var j=!(!l.clamp||0===l.tension)&&(f<h?b>h:b<h),_=Math.abs(y)<=l.precision,k=0===l.tension||Math.abs(h-b)<=l.precision;u=j||_&&k,p.lastVelocity=y,p.lastTime=t}v&&!l.toValues[m].done&&(u=!1),u?(p.value!==h&&(b=h),p.done=!0):c=!0,p.setValue(b),p.lastPosition=b}else p.setValue(h),p.done=!0}}a.props.onFrame&&(a.values[l.name]=l.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),c||(I.delete(a),a.stop(!0))}return I.size?P?P():E(e):V=!1,V};function D(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return D({range:e,output:t,extrapolate:n});if(_&&"string"==typeof e.output[0])return _(e);var r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",c=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,c,s){var l=s?s(e):e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>n){if("identity"===c)return l;"clamp"===c&&(l=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=i(l),r===-1/0?l=-l:o===1/0?l+=r:l=l*(o-r)+r;return l}(e,i[t],i[t+1],o[t],o[t+1],s,a,c,r.map)}}var z=function(e){function t(n,r,o,i){var a;return(a=e.call(this)||this).calc=void 0,a.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],a.calc=D(r,o,i),a}s(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=D(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var U=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}s(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new z(this,e,t,n)},t}(g),B=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new U(e)})),n}s(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new z(this,e,t)},t}(y),H=0,q=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=H++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),n=t.delay,r=void 0===n?0:n,a=t.to,c=i(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},c,{delay:r,to:a}));else if(a){var s={};Object.entries(a).forEach((function(e){var t,n=e[0],i=e[1],a=o({to:(t={},t[n]=i,t),delay:f(r,n)},c),l=s[a.delay]&&s[a.delay].to;s[a.delay]=o({},s[a.delay],a,{to:o({},l,a.to)})})),this.queue=Object.values(s)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(c),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,i=e.to,a=void 0===i?{}:i;u.obj(r)&&(n.merged=o({},r,n.merged)),u.obj(a)&&(n.merged=o({},n.merged,a))}));var r=this.local=++this.guid,a=this.localQueue=this.queue;this.queue=[],a.forEach((function(t,o){var c=t.delay,s=i(t,["delay"]),l=function(t){o===a.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=u.arr(s.to)||u.fun(s.to);c?setTimeout((function(){r===n.guid&&(d?n.runAsync(s,l):n.diff(s).start(l))}),c):d?n.runAsync(s,l):n.diff(s).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,I.has(t)||I.add(t),V||(V=!0,E(P||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,I.has(t)&&I.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,i(e,["delay"])),a=this.local,c=Promise.resolve(void 0);if(u.arr(r.to))for(var s=function(e){var t=e,i=o({},r,h(r.to[t]));u.arr(i.config)&&(i.config=i.config[t]),c=c.then((function(){if(a===n.guid)return new Promise((function(e){return n.diff(i).start(e)}))}))},l=0;l<r.to.length;l++)s(l);else if(u.fun(r.to)){var d,m=0;c=c.then((function(){return r.to((function(e){var t=o({},r,h(e));if(u.arr(t.config)&&(t.config=t.config[m]),m++,a===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}c.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,i=void 0===r?{}:r,a=n.to,c=void 0===a?{}:a,s=n.config,l=void 0===s?{}:s,d=n.reverse,h=n.attach,b=n.reset,g=n.immediate;if(d){var y=[c,i];i=y[0],c=y[1]}this.merged=o({},i,this.merged,c),this.hasChanged=!1;var w=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],a=n[1],c=e[r]||{},s=u.num(a),d=u.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!v[a],h=u.arr(a),y=!s&&!h&&!d,O=u.und(i[r])?a:i[r],j=s||h||d?a:1,E=f(l,r);w&&(j=w.animations[r].parent);var k,S=c.parent,x=c.interpolation,T=p(w?j.getPayload():j),A=a;y&&(A=_({range:[0,1],output:[a,a]})(1));var P,N=x&&x.getValue(),R=!u.und(S)&&c.animatedValues.some((function(e){return!e.done})),M=!u.equ(A,N),L=!u.equ(A,c.previous),V=!u.equ(E,c.config);if(b||L&&M||V){var I;if(s||d)S=x=c.parent||new U(O);else if(h)S=x=c.parent||new B(O);else if(y){var F=c.interpolation&&c.interpolation.calc(c.parent.value);F=void 0===F||b?O:F,c.parent?(S=c.parent).setValue(0,!1):S=new U(0);var D={output:[F,a]};c.interpolation?(x=c.interpolation,c.interpolation.updateConfig(D)):x=S.interpolate(D)}return T=p(w?j.getPayload():j),k=p(S.getPayload()),b&&!y&&S.setValue(O,!1),t.hasChanged=!0,k.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=R?e.lastVelocity:void 0,e.lastTime=R?e.lastTime:void 0,e.startTime=C(),e.done=!1,e.animatedStyles.clear()})),f(g,r)&&S.setValue(y?j:a,!1),o({},e,((I={})[r]=o({},c,{name:r,parent:S,interpolation:x,animatedValues:k,toValues:T,previous:A,config:E,fromValues:p(S.getValue()),immediate:f(g,r),initialVelocity:m(E.velocity,0),clamp:m(E.clamp,!1),precision:m(E.precision,.01),tension:m(E.tension,170),friction:m(E.friction,26),mass:m(E.mass,1),duration:E.duration,easing:m(E.easing,(function(e){return e})),decay:E.decay}),I))}return M?e:(y&&(S.setValue(1,!1),x.updateConfig({output:[A,A]})),S.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:A}),P)))}),this.animations),this.hasChanged)for(var O in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[O]=this.animations[O].interpolation,this.values[O]=this.animations[O].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),$=function(e,t){var n=a.useRef(!1),r=a.useRef(),o=u.fun(t),i=a.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var i=new q,a=o?f(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),c=i[0],s=i[1];r.current=c;a.useImperativeHandle(s,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var l=a.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?f(e,n,t):e[n]),s||t.start()}))}}),[e]);a.useEffect((function(){n.current?o||l(t):s||r.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},W=0,Q=function(e,t){return("function"==typeof t?e.map(t):p(t)).map(String)},G=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,a=i(e,["items","keys"]);return t=p(void 0!==t?t:null),o({items:t,keys:Q(t,r)},a)};function Y(e,t){var n=function(){if(o){if(i>=r.length)return"break";a=r[i++]}else{if((i=r.next()).done)return"break";a=i.value}var n=a.key,c=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(c),e.current.deleted=e.current.deleted.filter(c))},r=e.current.deleted,o=Array.isArray(r),i=0;for(r=o?r:r[Symbol.iterator]();;){var a;if("break"===n())break}e.current.forceUpdate()}var Z=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof g||(t=b.transform(t)),n.payload=t,n}return s(t,e),t}(w),K={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},J="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(J,J,J)),te=new RegExp("rgba"+X(J,J,J,J)),ne=new RegExp("hsl"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",J)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,ce=/^#([0-9a-fA-F]{8})$/;function se(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function le(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=se(o,r,e+1/3),a=se(o,r,e),c=se(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*c)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function me(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function pe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function fe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ae.exec(t))?parseInt(n[1]+"ff",16)>>>0:K.hasOwnProperty(t)?K[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|me(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ce.exec(t))?parseInt(n[1],16)>>>0:(n=ie.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|le(de(n[1]),pe(n[2]),pe(n[3])))>>>0:(n=re.exec(t))?(le(de(n[1]),pe(n[2]),pe(n[3]))|me(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ve=new RegExp("("+Object.keys(K).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return ye.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var Oe={};R((function(e){return new Z(e)})),T("div"),S((function(e){var t=e.output.map((function(e){return e.replace(be,fe)})).map((function(e){return e.replace(ve,fe)})),n=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(he).map((function(t,r){return D(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(he,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),j(K),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,a=t.scrollLeft,c=i(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=we(l,n[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var m in c){var p=s?m:Oe[m]||(Oe[m]=m.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(p)&&e.setAttribute(p,c[m])}}),(function(e){return e}));var je,_e,Ee=(je=function(e){return a.forwardRef((function(t,n){var r=d(),s=a.useRef(!0),l=a.useRef(null),m=a.useRef(null),p=a.useCallback((function(e){var t=l.current;l.current=new L(e,(function(){var e=!1;m.current&&(e=b.fn(m.current,l.current.getAnimatedValue())),m.current&&!1!==e||r()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){s.current=!1,l.current&&l.current.detach()}}),[]),a.useImperativeHandle(n,(function(){return N(m,s,r)})),p(t);var f,h=l.current.getValue(),v=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),g=(f=e,!u.fun(f)||f.prototype instanceof c.Component?function(e){return m.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return c.createElement(e,o({},v,{ref:g}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=je(n),e}),je)}),ke=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=ke,t.a=ke,t.interpolate=function(e,t,n){return e&&new z(e,t,n)},t.Globals=M,t.useSpring=function(e){var t=u.fun(e),n=$(1,t?e:[e]),r=n[0],o=n[1],i=n[2];return t?[r[0],o,i]:r},t.useTrail=function(e,t){var n=a.useRef(!1),r=u.fun(t),i=f(t),c=a.useRef(),s=$(e,(function(e,t){return 0===e&&(c.current=[]),c.current.push(t),o({},i,{config:f(i.config,e),attach:e>0&&function(){return c.current[e-1]}})})),l=s[0],d=s[1],m=s[2],p=a.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,a=c.current[r];return o({},e,{config:f(e.config||i.config,t),attach:a&&function(){return a}})}))}}),[e,i.reverse]);return a.useEffect((function(){n.current&&!r&&p(t)})),a.useEffect((function(){n.current=!0}),[]),r?[l,p,m]:l},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),c=G(r),s=c.lazy,l=void 0!==s&&s,u=(c.unique,c.reset),m=void 0!==u&&u,p=(c.enter,c.leave,c.update,c.onDestroyed),h=(c.keys,c.items,c.onFrame),b=c.onRest,v=c.onStart,g=c.ref,y=i(c,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),w=d(),O=a.useRef(!1),j=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!O.current&&new Map,forceUpdate:w});return a.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(j.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(j.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(j.current.instances).map((function(e){return e[1]}))}}})),j.current=function(e,t){var n=e.first,r=e.prevProps,a=i(e,["first","prevProps"]),c=G(t),s=c.items,l=c.keys,u=c.initial,d=c.from,m=c.enter,p=c.leave,h=c.update,b=c.trail,v=void 0===b?0:b,g=c.unique,y=c.config,w=c.order,O=void 0===w?["enter","leave","update"]:w,j=G(r),_=j.keys,E=j.items,k=o({},a.current),S=[].concat(a.deleted),x=Object.keys(k),C=new Set(x),T=new Set(l),A=l.filter((function(e){return!C.has(e)})),P=a.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),N=l.filter((function(e){return C.has(e)})),R=-v;for(;O.length;){switch(O.shift()){case"enter":A.forEach((function(e,t){g&&S.find((function(t){return t.originalKey===e}))&&(S=S.filter((function(t){return t.originalKey!==e})));var r=l.indexOf(e),o=s[r],i=n&&void 0!==u?"initial":"enter";k[e]={slot:i,originalKey:e,key:g?String(e):W++,item:o,trail:R+=v,config:f(y,o,i),from:f(n&&void 0!==u?u||{}:d,o),to:f(m,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];S.unshift(o({},k[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:R+=v,config:f(y,n,"leave"),to:f(p,n)})),delete k[e]}));break;case"update":N.forEach((function(e){var t=l.indexOf(e),n=s[t];k[e]=o({},k[e],{item:n,slot:"update",trail:R+=v,config:f(y,n,"update"),to:f(h,n)})}))}}var M=l.map((function(e){return k[e]}));return S.forEach((function(e){var t,n=e.left,r=(e.right,i(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[r],M.slice(t))})),o({},a,{changed:A.length||P.length||N.length,first:n&&0===A.length,transitions:M,current:k,deleted:S,prevProps:t})}(j.current,r),j.current.changed&&j.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,i=e.config,a=e.trail,c=e.key,s=e.item;j.current.instances.has(c)||j.current.instances.set(c,new q);var u=j.current.instances.get(c),d=o({},y,{to:r,from:n,config:i,ref:g,onRest:function(n){j.current.mounted&&(e.destroyed&&(g||l||Y(j,c),p&&p(s)),!Array.from(j.current.instances).some((function(e){return!e[1].idle}))&&(g||l)&&j.current.deleted.length>0&&Y(j),b&&b(s,t,n))},onStart:v&&function(){return v(s,t)},onFrame:h&&function(e){return h(s,t,e)},delay:a,reset:m&&"enter"===t});u.update(d),j.current.paused||u.start()})),a.useEffect((function(){return j.current.mounted=O.current=!0,function(){j.current.mounted=O.current=!1,Array.from(j.current.instances).map((function(e){return e[1].destroy()})),j.current.instances.clear()}}),[]),j.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:j.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=a.useRef();a.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var i=e.current;if(i){var a=i.controllers;if(a.length){var c=n*t[r];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+c})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=$},16:function(e,t){e.exports=window.wc.tracks},160:function(e,t,n){"use strict";(function(e){var r=n(5),o=n.n(r),i=n(25),a=n(1),c=n.n(a),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:{};function l(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var u=o.a.createContext||function(e,t){var n,o,a,u="__create-react-context-"+((s[a="__global_unique_id__"]=(s[a]||0)+1)+"__"),d=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=l(t.props.value),t}Object(i.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[u]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof t?t(r,o):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(r.Component);d.childContextTypes=((n={})[u]=c.a.object.isRequired,n);var m=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},r.componentDidMount=function(){this.context[u]&&this.context[u].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},r.componentWillUnmount=function(){this.context[u]&&this.context[u].off(this.onUpdate)},r.getValue=function(){return this.context[u]?this.context[u].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return m.contextTypes=((o={})[u]=c.a.object,o),{Provider:d,Consumer:m}};t.a=u}).call(this,n(78))},161:function(e,t,n){var r=n(296);e.exports=p,e.exports.parse=i,e.exports.compile=function(e,t){return c(i(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=m;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,c="",u=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],m=n[1],p=n.index;if(c+=e.slice(a,p),a=p+d.length,m)c+=m[1];else{var f=e[a],h=n[2],b=n[3],v=n[4],g=n[5],y=n[6],w=n[7];c&&(r.push(c),c="");var O=null!=h&&null!=f&&f!==h,j="+"===y||"*"===y,_="?"===y||"*"===y,E=n[2]||u,k=v||g;r.push({name:b||i++,prefix:h||"",delimiter:E,optional:_,repeat:j,partial:O,asterisk:!!w,pattern:k?l(k):w?".*":"[^"+s(E)+"]+?"})}}return a<e.length&&(c+=e.substr(a)),c&&r.push(c),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function c(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",d(t)));return function(t,o){for(var i="",c=t||{},s=(o||{}).pretty?a:encodeURIComponent,l=0;l<e.length;l++){var u=e[l];if("string"!=typeof u){var d,m=c[u.name];if(null==m){if(u.optional){u.partial&&(i+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(m)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(m)+"`");if(0===m.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var p=0;p<m.length;p++){if(d=s(m[p]),!n[l].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");i+=(0===p?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(m).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(m),!n[l].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');i+=u.prefix+d}}else i+=u}return i}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function m(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<e.length;c++){var l=e[c];if("string"==typeof l)a+=s(l);else{var m=s(l.prefix),p="(?:"+l.pattern+")";t.push(l),l.repeat&&(p+="(?:"+m+p+")*"),a+=p=l.optional?l.partial?m+"("+p+")?":"(?:"+m+"("+p+"))?":m+"("+p+")"}}var f=s(n.delimiter||"/"),h=a.slice(-f.length)===f;return o||(a=(h?a.slice(0,-f.length):a)+"(?:"+f+"(?=$))?"),a+=i?"$":o&&h?"":"(?="+f+"|$)",u(new RegExp("^"+a,d(n)),t)}function p(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(p(e[o],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return m(i(e,n),t,n)}(e,t,n)}},164:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(3);function o(e,t){return Object(r.filter)(e,e=>{const{is_deleted:n,date_created_gmt:r,status:o}=e;if(!n){return(!t||!r||new Date(r+"Z").getTime()>t)&&"unactioned"===o}}).length}function i(e){return Object(r.filter)(e,e=>{const{is_deleted:t}=e;return!t}).length>0}},17:function(e,t){e.exports=window.wp.apiFetch},18:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=c(n(5)),i=c(n(69)),a=c(n(72));function c(e){return e&&e.__esModule?e:{default:e}}var s=void 0;function l(e,t){var n,a,c,u,d,m,p,f,h=[],b={};for(m=0;m<e.length;m++)if("string"!==(d=e[m]).type){if(!t.hasOwnProperty(d.value)||void 0===t[d.value])throw new Error("Invalid interpolation, missing component node: `"+d.value+"`");if("object"!==r(t[d.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+d.value+"`","\n> "+s);if("componentClose"===d.type)throw new Error("Missing opening component token: `"+d.value+"`");if("componentOpen"===d.type){n=t[d.value],c=m;break}h.push(t[d.value])}else h.push(d.value);return n&&(u=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(c,e),p=l(e.slice(c+1,u),t),a=o.default.cloneElement(n,{},p),h.push(a),u<e.length-1&&(f=l(e.slice(u+1),t),h=h.concat(f))),1===h.length?h[0]:(h.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,i.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(s=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,a.default)(t);try{return l(i,n)}catch(e){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},19:function(e,t){e.exports=window.wc.date},2:function(e,t){e.exports=window.wp.i18n},20:function(e,t){e.exports=window.wc.experimental},21:function(e,t){e.exports=window.wc.components},22:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},23:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},25:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return o}))},252:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return p}));var r=n(0),o=n(4),i=n(7),a=n(2),c=n(11),s=n(16);const l=()=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"24",height:"24",viewBox:"3 3 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M13.8053 15.3982C13.8053 15.7965 13.4867 16.1947 13.0089 16.1947H6.79646C6.55752 16.1947 6.39823 16.115 6.23894 15.9558C6.07965 15.7965 6 15.6372 6 15.3982V6.79646C6 6.63717 6.15929 6.39823 6.23894 6.23894C6.39823 6.07965 6.55752 6 6.79646 6H13.0089C13.4071 6 13.8053 6.31858 13.8053 6.79646V15.3982Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(r.createElement)("path",{d:"M23.9203 10.6195C23.9203 11.0177 23.6017 11.4159 23.1238 11.4159H16.9115C16.6725 11.4159 16.5132 11.3363 16.3539 11.177C16.1946 11.0177 16.115 10.8584 16.115 10.6195V6.79646C16.115 6.39823 16.4336 6 16.9115 6H23.1238C23.5221 6 23.9203 6.31858 23.9203 6.79646V10.6195Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(r.createElement)("path",{d:"M13.8053 23.2035C13.8053 23.4424 13.7257 23.6017 13.5664 23.761C13.4071 23.9203 13.2478 23.9999 13.0089 23.9999H6.79646C6.39823 23.9999 6 23.6813 6 23.2035V19.3804C6 19.1415 6.07965 18.9822 6.23894 18.8229C6.39823 18.6636 6.55752 18.584 6.79646 18.584H13.0089C13.4071 18.584 13.8053 18.9026 13.8053 19.3804V23.2035Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(r.createElement)("path",{d:"M16.9912 23.9999C16.7522 23.9999 16.5929 23.9202 16.4336 23.7609C16.2743 23.6016 16.1947 23.4423 16.1947 23.2034V14.6016C16.1947 14.3627 16.2743 14.2034 16.4336 14.0441C16.5929 13.8848 16.7522 13.8052 16.9912 13.8052H23.2036C23.4425 13.8052 23.6018 13.8848 23.7611 14.0441C23.9204 14.2034 24 14.3627 24 14.6016V23.2034C24 23.6016 23.6814 23.9999 23.2036 23.9999H16.9912Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),Object(a.__)("Display","woocommerce-admin")),{Fill:u,Slot:d}=Object(o.createSlotFill)("DisplayOptions");u.Slot=d;const m=[{value:"single_column",label:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(()=>Object(r.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("rect",{x:"0.5",y:"0.5",width:"11",height:"13",strokeWidth:"1"})),null),Object(a.__)("Single column","woocommerce-admin"))},{value:"two_columns",label:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(()=>Object(r.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("rect",{x:"0.5",y:"0.5",width:"7",height:"13",strokeWidth:"1"}),Object(r.createElement)("rect",{x:"9.5",y:"0.5",width:"7",height:"13",strokeWidth:"1"})),null),Object(a.__)("Two columns","woocommerce-admin"))}],p=()=>{const{defaultHomescreenLayout:e,taskListComplete:t,isTaskListHidden:n}=Object(i.useSelect)(e=>{const{getOption:t}=e(c.OPTIONS_STORE_NAME);return{defaultHomescreenLayout:t("woocommerce_default_homepage_layout")||"single_column",taskListComplete:"yes"===t("woocommerce_task_list_complete"),isTaskListHidden:"yes"===t("woocommerce_task_list_hidden")}}),{updateUserPreferences:u,homepage_layout:p}=Object(c.useUserPreferences)(),f=t||n||window.wcAdminFeatures.analytics;return Object(r.createElement)(d,null,t=>0!==t.length||f?Object(r.createElement)(o.DropdownMenu,{icon:Object(r.createElement)(l,null),label:Object(a.__)("Display options","woocommerce-admin"),toggleProps:{className:"woocommerce-layout__activity-panel-tab display-options",onClick:()=>Object(s.recordEvent)("homescreen_display_click")},popoverProps:{className:"woocommerce-layout__activity-panel-popover"}},({onClose:n})=>Object(r.createElement)(r.Fragment,null,t,f?Object(r.createElement)(o.MenuGroup,{className:"woocommerce-layout__homescreen-display-options",label:Object(a.__)("Layout","woocommerce-admin")},Object(r.createElement)(o.MenuItemsChoice,{choices:m,onSelect:e=>{u({homepage_layout:e}),n(),Object(s.recordEvent)("homescreen_display_option",{display_option:e})},value:p||e})):null)):null)}},253:function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return w}));var r=n(0),o=n(2),i=n(20),a=n(16),c=n(21),s=n(7),l=n(11),u=n(494),d=n(8),m=Object(r.createElement)(d.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(d.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})),p=n(495),f=n(4),h=n(65),b=n(102),v=n(59);const g=()=>Object(r.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(r.createElement)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"})),y="AbbreviatedNotification",w=({thingsToDoNextCount:e})=>{const{ordersToProcessCount:t,reviewsToModerateCount:n,stockNoticesCount:d,isSetupTaskListHidden:w,isExtendedTaskListHidden:O}=Object(s.useSelect)(e=>{const{getOption:t}=e(l.OPTIONS_STORE_NAME),n=Object(h.c)(e);return{ordersToProcessCount:Object(h.d)(e,n),reviewsToModerateCount:Object(b.b)(e),stockNoticesCount:Object(h.a)(e),isSetupTaskListHidden:"yes"===t("woocommerce_task_list_hidden"),isExtendedTaskListHidden:"yes"===t("woocommerce_extended_task_list_hidden")}}),j=e=>{Object(a.recordEvent)("activity_panel_click",{task:e})},{Slot:_}=Object(f.createSlotFill)(y),E=Object(v.f)(window.location.href);return Object(r.createElement)("div",{className:"woocommerce-abbreviated-notifications"},e>0&&!O&&Object(r.createElement)(c.AbbreviatedCard,{className:"woocommerce-abbreviated-notification",icon:Object(r.createElement)(g,null),href:"admin.php?page=wc-admin#extended_task_list",onClick:()=>j("thingsToDoNext"),type:E?"wc-admin":"wp-admin"},Object(r.createElement)(i.Text,{as:"h3"},Object(o.__)("Things to do next","woocommerce-admin")),Object(r.createElement)(i.Text,{as:"p"},Object(o.sprintf)(Object(o._n)("You have %d new thing to do","You have %d new things to do",e,"woocommerce-admin"),e))),t>0&&w&&Object(r.createElement)(c.AbbreviatedCard,{className:"woocommerce-abbreviated-notification",icon:u.a,href:"admin.php?page=wc-admin&opened_panel=orders-panel",onClick:()=>j("ordersToProcess"),type:E?"wc-admin":"wp-admin"},Object(r.createElement)(i.Text,{as:"h3"},Object(o.__)("Orders to fulfill","woocommerce-admin")),Object(r.createElement)(i.Text,null,Object(o.sprintf)(Object(o._n)("You have %d order to fulfill","You have %d orders to fulfill",t,"woocommerce-admin"),t))),n>0&&w&&Object(r.createElement)(c.AbbreviatedCard,{className:"woocommerce-abbreviated-notification",icon:m,href:"admin.php?page=wc-admin&opened_panel=reviews-panel",onClick:()=>j("reviewsToModerate"),type:E?"wc-admin":"wp-admin"},Object(r.createElement)(i.Text,{as:"h3"},Object(o.__)("Reviews to moderate","woocommerce-admin")),Object(r.createElement)(i.Text,null,Object(o.sprintf)(Object(o._n)("You have %d review to moderate","You have %d reviews to moderate",n,"woocommerce-admin"),n))),d>0&&w&&Object(r.createElement)(c.AbbreviatedCard,{className:"woocommerce-abbreviated-notification",icon:p.a,href:"admin.php?page=wc-admin&opened_panel=stock-panel",onClick:()=>j("stockNotices"),type:E?"wc-admin":"wp-admin"},Object(r.createElement)(i.Text,{as:"h3"},Object(o.__)("Inventory to review","woocommerce-admin")),Object(r.createElement)(i.Text,null,Object(o.__)("You have inventory to review and update","woocommerce-admin"))),!O&&Object(r.createElement)(_,null))}},254:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return y}));var r=n(0),o=n(2),i=n(30),a=n(18),c=n.n(a),s=n(15),l=n(32),u=n(21),d=n(11),m=n(19);var p=({value:e,onChange:t})=>{const{wcAdminSettings:n}=Object(d.useSettings)("wc_admin",["wcAdminSettings"]),{woocommerce_default_date_range:o}=n,i=Object(l.parse)(e.replace(/&/g,"&")),{period:a,compare:c,before:s,after:p}=Object(m.getDateParamsFromQuery)(i,o),{primary:f,secondary:h}=Object(m.getCurrentDates)(i,o),b={period:a,compare:c,before:s,after:p,primaryDate:f,secondaryDate:h};return Object(r.createElement)(u.DateRangeFilterPicker,{query:i,onRangeSelect:e=>{t({target:{name:"woocommerce_default_date_range",value:Object(l.stringify)(e)}})},dateQuery:b,isoDateFormat:m.isoDateFormat})};const f=["processing","on-hold"],h=["completed","processing","refunded","cancelled","failed","pending","on-hold"],b=Object.keys(s.c).filter(e=>"refunded"!==e).map(e=>({value:e,label:s.c[e],description:Object(o.sprintf)(Object(o.__)("Exclude the %s status from reports","woocommerce-admin"),s.c[e])})),v=Object(s.f)("unregisteredOrderStatuses",{}),g=[{key:"defaultStatuses",options:b.filter(e=>h.includes(e.value))},{key:"customStatuses",label:Object(o.__)("Custom Statuses","woocommerce-admin"),options:b.filter(e=>!h.includes(e.value))},{key:"unregisteredStatuses",label:Object(o.__)("Unregistered Statuses","woocommerce-admin"),options:Object.keys(v).map(e=>({value:e,label:e,description:Object(o.sprintf)(Object(o.__)("Exclude the %s status from reports","woocommerce-admin"),e)}))}],y=Object(i.applyFilters)("woocommerce_admin_analytics_settings",{woocommerce_excluded_report_order_statuses:{label:Object(o.__)("Excluded Statuses:","woocommerce-admin"),inputType:"checkboxGroup",options:g,helpText:c()({mixedString:Object(o.__)("Orders with these statuses are excluded from the totals in your reports. The {{strong}}Refunded{{/strong}} status can not be excluded.","woocommerce-admin"),components:{strong:Object(r.createElement)("strong",null)}}),defaultValue:["pending","cancelled","failed"]},woocommerce_actionable_order_statuses:{label:Object(o.__)("Actionable Statuses:","woocommerce-admin"),inputType:"checkboxGroup",options:g,helpText:Object(o.__)("Orders with these statuses require action on behalf of the store admin. These orders will show up in the Home Screen - Orders task.","woocommerce-admin"),defaultValue:f},woocommerce_default_date_range:{name:"woocommerce_default_date_range",label:Object(o.__)("Default Date Range:","woocommerce-admin"),inputType:"component",component:p,helpText:Object(o.__)("Select a default date range. When no range is selected, reports will be viewed by the default date range.","woocommerce-admin"),defaultValue:"period=month&compare=previous_year"}})},255:function(e,t,n){"use strict";(function(e){var r=n(0),o=n(3),i=n(6),a=n.n(i),c=n(256),s=n(2),l=(n(257),n(4));t.a=Object(r.forwardRef)((function({className:t,children:n,spokenMessage:i=n,politeness:u="polite",actions:d=[],onRemove:m=o.noop,icon:p=null,explicitDismiss:f=!1,onDismiss:h=null},b){function v(e){e&&e.preventDefault&&e.preventDefault(),h(),m()}h=h||o.noop,function(e,t){const n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)(()=>{n&&Object(c.speak)(n,t)},[n,t])}(i,u),Object(r.useEffect)(()=>{const e=setTimeout(()=>{f||(h(),m())},1e4);return()=>clearTimeout(e)},[f,h,m]);const g=a()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!f});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const y=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!p});return Object(r.createElement)("div",{ref:b,className:g,onClick:f?o.noop:v,tabIndex:"0",role:f?"":"button",onKeyPress:f?o.noop:v,"aria-label":f?"":Object(s.__)("Dismiss this notice")},Object(r.createElement)("div",{className:y},p&&Object(r.createElement)("div",{className:"components-snackbar__icon"},p),n,d.map(({label:e,onClick:t,url:n},o)=>Object(r.createElement)(l.Button,{key:o,href:n,isTertiary:!0,onClick:e=>function(e,t){e.stopPropagation(),m(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),f&&Object(r.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:v,onKeyPress:v},"✕")))}))}).call(this,n(128))},256:function(e,t){e.exports=window.wp.a11y},257:function(e,t){e.exports=window.wp.warning},258:function(e,t){e.exports=window.wc.customerEffortScore},268:function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r={};n.r(r),n.d(r,"setCesSurveyQueue",(function(){return O})),n.d(r,"addCesSurvey",(function(){return j})),n.d(r,"addCesSurveyForAnalytics",(function(){return _})),n.d(r,"addCesSurveyForCustomerSearch",(function(){return E}));var o={};n.r(o),n.d(o,"getCesSurveyQueue",(function(){return k}));var i={};n.r(i),n.d(i,"getCesSurveyQueue",(function(){return S}));var a=n(0),c=n(1),s=n.n(c),l=n(16),u=n(258),d=n.n(u),m=n(13),p=n(7),f=n(11),h=n(2);function b({action:e,trackProps:t,label:n,onSubmitLabel:r=Object(h.__)("Thank you for your feedback!","woocommerce-admin"),cesShownForActions:o,allowTracking:i,resolving:c,storeAgeInWeeks:s,updateOptions:u,createNotice:m}){const[p,f]=Object(a.useState)(!1);if(c)return null;if(!i)return null;if(-1!==o.indexOf(e)&&!p)return null;const b=()=>{u({woocommerce_ces_shown_for_actions:[e,...o]})};return Object(a.createElement)(d.a,{recordScoreCallback:(n,o)=>{Object(l.recordEvent)("ces_feedback",{action:e,score:n,comments:o||"",store_age:s,...t}),m("success",r)},label:n,onNoticeShownCallback:()=>{Object(l.recordEvent)("ces_snackbar_view",{action:e,store_age:s,...t})},onNoticeDismissedCallback:()=>{Object(l.recordEvent)("ces_snackbar_dismiss",{action:e,store_age:s,...t}),b()},onModalShownCallback:()=>{f(!0),Object(l.recordEvent)("ces_view",{action:e,store_age:s,...t}),b()},icon:Object(a.createElement)("span",{style:{height:21,width:21},role:"img","aria-label":Object(h.__)("Pencil icon","woocommerce-admin")},"✏️")})}b.propTypes={action:s.a.string.isRequired,trackProps:s.a.object,label:s.a.string.isRequired,onSubmitLabel:s.a.string,cesShownForActions:s.a.arrayOf(s.a.string).isRequired,allowTracking:s.a.bool,resolving:s.a.bool.isRequired,storeAgeInWeeks:s.a.number,updateOptions:s.a.func,createNotice:s.a.func};var v=Object(m.compose)(Object(p.withSelect)(e=>{const{getOption:t,isResolving:n}=e(f.OPTIONS_STORE_NAME),r=t("woocommerce_ces_shown_for_actions")||[],o=function(e){if(0===e)return null;const t=Date.now()-1e3*e;return Math.round(t/f.WEEK)}(t("woocommerce_admin_install_timestamp")||0);return{cesShownForActions:r,allowTracking:"yes"===(t("woocommerce_allow_tracking")||"no"),storeAgeInWeeks:o,resolving:n("getOption",["woocommerce_ces_shown_for_actions"])||null===o||n("getOption",["woocommerce_admin_install_timestamp"])||n("getOption",["woocommerce_allow_tracking"])}}),Object(p.withDispatch)(e=>{const{updateOptions:t}=e(f.OPTIONS_STORE_NAME),{createNotice:n}=e("core/notices");return{updateOptions:t,createNotice:n}}))(b),g=n(53),y=n(10);var w={SET_CES_SURVEY_QUEUE:"SET_CES_SURVEY_QUEUE",ADD_CES_SURVEY:"ADD_CES_SURVEY"};function O(e){return{type:w.SET_CES_SURVEY_QUEUE,queue:e}}function j(e,t,n=window.pagenow,r=window.adminpage,o,i={}){return{type:w.ADD_CES_SURVEY,action:e,label:t,pageNow:n,adminPage:r,onsubmit_label:o,props:i}}function _(){return j("analytics_filtered",Object(h.__)("How easy was it to filter your store analytics?","woocommerce-admin"),"woocommerce_page_wc-admin","woocommerce_page_wc-admin")}function E(){return j("ces_search",Object(h.__)("How easy was it to use search?","woocommerce-admin"),"woocommerce_page_wc-admin","woocommerce_page_wc-admin",void 0,{search_area:"customer"})}function*k(){const e=yield Object(y.apiFetch)({path:`${g.a}/options?options=${g.b}`});if(!e)throw new Error;yield O(e[g.b]||[])}function S(e){return e.queue}const x={queue:[]};var C=(e=x,t)=>{switch(t.type){case w.SET_CES_SURVEY_QUEUE:return{...e,queue:t.queue};case w.ADD_CES_SURVEY:if(e.queue.filter(e=>e.action===t.action).length)return e;const n={action:t.action,label:t.label,pagenow:t.pageNow,adminpage:t.adminPage,onSubmitLabel:t.onSubmitLabel,props:t.props};return{...e,queue:[...e.queue,n]};default:return e}};Object(p.registerStore)(g.c,{actions:r,selectors:i,resolvers:o,controls:y.controls,reducer:C});function T({queue:e,resolving:t,clearQueue:n}){if(t)return null;const r=e.filter(e=>e.pagenow===window.pagenow&&e.adminpage===window.adminpage);return r.length&&n(),Object(a.createElement)(a.Fragment,null,r.map((e,t)=>Object(a.createElement)(v,{key:t,action:e.action,label:e.label,onSubmitLabel:e.onsubmit_label,trackProps:e.props||{}})))}T.propTypes={queue:s.a.arrayOf(s.a.object),resolving:s.a.bool,clearQueue:s.a.func};var A=Object(m.compose)(Object(p.withSelect)(e=>{const{getCesSurveyQueue:t,isResolving:n}=e(g.c);return{queue:t(),resolving:n("getOption",[g.b])}}),Object(p.withDispatch)(e=>{const{updateOptions:t}=e(f.OPTIONS_STORE_NAME);return{clearQueue:()=>{t({woocommerce_clear_ces_tracks_queue_for_page:{pagenow:window.pagenow,adminpage:window.adminpage}})}}}))(T)},269:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(35),o=n.n(r),i=n(0),a=n(30),c=n(32),s=n(7),l=n(11);var u=({children:e})=>{const{currentUserCan:t}=Object(l.useUser)(),n=Object(s.useSelect)(e=>{const{getOption:t,hasFinishedResolution:n}=e(l.OPTIONS_STORE_NAME),r=n("getOption",["woocommerce_show_marketplace_suggestions"]),o="yes"===t("woocommerce_show_marketplace_suggestions");return r&&o});return t("install_plugins")&&n?Object(i.createElement)(i.Fragment,null,e):null};const d=Object(i.lazy)(()=>Promise.all([n.e(3),n.e(44)]).then(n.bind(null,601)));n(297);const m=[({page:e,tab:t,section:n})=>"wc-settings"!==e||"checkout"!==t||n?null:Object(i.createElement)(u,null,Object(i.createElement)(i.Suspense,{fallback:null},Object(i.createElement)(d,null)))],p=()=>{const e=Object(c.parse)(location.search.substring(1));let t={page:"",tab:""};void 0!==e.page&&(t=e);const n=Object(a.applyFilters)("woocommerce_admin_embedded_layout_components",m,t);return Object(i.createElement)("div",{className:"woocommerce-embedded-layout__primary",id:"woocommerce-embedded-layout__primary"},n.map((e,n)=>Object(i.createElement)(e,o()({key:n},t))))}},27:function(e,t){e.exports=window.wp.keycodes},278:function(e,t,n){"use strict";n.r(t),function(e){var t=n(0),r=(n(127),n(11)),o=(n(280),n(119)),i=n(268),a=n(269);n.p=e.wcAdminAssets.path;const c=document.getElementById("root"),s=document.getElementById("woocommerce-embedded-root"),l=window.wcSettings.currentUserData;if(c){let e=Object(r.withSettingsHydration)("wc_admin",window.wcSettings)(o.b);window.wcSettings.preloadSettings&&window.wcSettings.preloadSettings.general&&(e=Object(r.withSettingsHydration)("general",{general:window.wcSettings.preloadSettings.general})(e)),l&&(e=Object(r.withCurrentUserHydration)(l)(e)),Object(t.render)(Object(t.createElement)(e,null),c)}else if(s){let e=Object(r.withSettingsHydration)("wc_admin",window.wcSettings)(o.a);l&&(e=Object(r.withCurrentUserHydration)(l)(e)),Object(t.render)(Object(t.createElement)(e,null),s),s.classList.remove("is-embed-loading");const n=document.getElementById("wpbody-content"),i=n.querySelector(".wrap.woocommerce")||n.querySelector(".wrap"),c=document.createElement("div");Object(t.render)(Object(t.createElement)("div",{className:"woocommerce-layout"},Object(t.createElement)(o.c,null)),n.insertBefore(c,i));const u=document.createElement("div");Object(t.render)(Object(t.createElement)(a.a,null),n.insertBefore(u,i.nextSibling))}window.wcAdminFeatures&&!0===window.wcAdminFeatures["customer-effort-score-tracks"]&&function(){const e=c||s;Object(t.render)(Object(t.createElement)(i.a,null),e.insertBefore(document.createElement("div"),null))}()}.call(this,n(78))},28:function(e,t){e.exports=window.wp.htmlEntities},280:function(e,t,n){},281:function(e,t){e.exports=window.wc.notices},282:function(e,t,n){},283:function(e,t,n){},284:function(e,t,n){},285:function(e,t,n){},286:function(e,t,n){},287:function(e,t,n){},288:function(e,t,n){},289:function(e,t,n){},29:function(e,t){e.exports=window.ReactDOM},290:function(e,t,n){"use strict";var r=n(0),o=n(8),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=i},291:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},292:function(e,t,n){var r=n(293);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},293:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},294:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},295:function(e,t,n){},296:function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},297:function(e,t,n){},3:function(e,t){e.exports=window.lodash},30:function(e,t){e.exports=window.wp.hooks},32:function(e,t,n){"use strict";var r=n(67),o=n(68),i=n(39);e.exports={formats:i,parse:o,stringify:r}},35:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},39:function(e,t,n){"use strict";var r=String.prototype.replace,o=/%20/g,i="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:a}},4:function(e,t){e.exports=window.wp.components},41:function(e,t,n){"use strict";t.a=function(e,t){if(!e)throw new Error("Invariant failed")}},46:function(e,t,n){"use strict";var r=n(47);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},47:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},471:function(e,t){e.exports=window.wc.csvExport},48:function(e,t,n){"use strict";var r=n(39),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],c=Object.keys(a),s=0;s<c.length;++s){var l=c[s],u=a[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,o,i){if(0===e.length)return e;var c=e;if("symbol"==typeof e?c=Symbol.prototype.toString.call(e):"string"!=typeof e&&(c=String(e)),"iso-8859-1"===n)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var s="",l=0;l<c.length;++l){var u=c.charCodeAt(l);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===r.RFC1738&&(40===u||41===u)?s+=c.charAt(l):u<128?s+=a[u]:u<2048?s+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?s+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&c.charCodeAt(l)),s+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return s},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return i(t)&&!i(n)&&(a=c(t,r)),i(t)&&i(n)?(n.forEach((function(n,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var a=n[i];return o.call(t,i)?t[i]=e(t[i],a,r):t[i]=a,t}),a)}}},49:function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},493:function(e,t,n){"use strict";var r=n(0),o=n(8),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},494:function(e,t,n){"use strict";var r=n(0),o=n(8),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));t.a=i},495:function(e,t,n){"use strict";var r=n(0),o=n(8),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{fillRule:"evenodd",d:"M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z",clipRule:"evenodd"}));t.a=i},496:function(e,t,n){"use strict";var r=n(0),o=n(8),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.a=i},5:function(e,t){e.exports=window.React},51:function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"c",(function(){return j})),n.d(t,"b",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"d",(function(){return p}));var r=n(23);function o(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],c=e&&o(e),s=t&&o(t),l=c||s;if(e&&o(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var u=a[a.length-1];n="."===u||".."===u||""===u}else n=!1;for(var d=0,m=a.length;m>=0;m--){var p=a[m];"."===p?i(a,m):".."===p?(i(a,m),d++):d&&(i(a,m),d--)}if(!l)for(;d--;d)a.unshift("..");!l||""===a[0]||a[0]&&o(a[0])||a.unshift("");var f=a.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};function c(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=c(t),o=c(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},l=n(41);function u(e){return"/"===e.charAt(0)?e:"/"+e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function m(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(e,t,n,o){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var v=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(e,t){t(window.confirm(e))}function y(){try{return window.history.state||{}}catch(e){return{}}}function w(e){void 0===e&&(e={}),v||Object(l.a)(!1);var t,n=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,c=a.forceRefresh,s=void 0!==c&&c,h=a.getUserConfirmation,w=void 0===h?g:h,O=a.keyLength,j=void 0===O?6:O,_=e.basename?m(u(e.basename)):"";function E(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return _&&(i=d(i,_)),f(i,r,n)}function k(){return Math.random().toString(36).substr(2,j)}var S=b();function x(e){Object(r.a)(D,e),D.length=n.length,S.notifyListeners(D.location,D.action)}function C(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||P(E(e.state))}function T(){P(E(y()))}var A=!1;function P(e){if(A)A=!1,x();else{S.confirmTransitionTo(e,"POP",w,(function(t){t?x({action:"POP",location:e}):function(e){var t=D.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(A=!0,L(o))}(e)}))}}var N=E(y()),R=[N.key];function M(e){return _+p(e)}function L(e){n.go(e)}var V=0;function I(e){1===(V+=e)&&1===e?(window.addEventListener("popstate",C),i&&window.addEventListener("hashchange",T)):0===V&&(window.removeEventListener("popstate",C),i&&window.removeEventListener("hashchange",T))}var F=!1;var D={length:n.length,action:"POP",location:N,createHref:M,push:function(e,t){var r=f(e,t,k(),D.location);S.confirmTransitionTo(r,"PUSH",w,(function(e){if(e){var t=M(r),i=r.key,a=r.state;if(o)if(n.pushState({key:i,state:a},null,t),s)window.location.href=t;else{var c=R.indexOf(D.location.key),l=R.slice(0,c+1);l.push(r.key),R=l,x({action:"PUSH",location:r})}else window.location.href=t}}))},replace:function(e,t){var r=f(e,t,k(),D.location);S.confirmTransitionTo(r,"REPLACE",w,(function(e){if(e){var t=M(r),i=r.key,a=r.state;if(o)if(n.replaceState({key:i,state:a},null,t),s)window.location.replace(t);else{var c=R.indexOf(D.location.key);-1!==c&&(R[c]=r.key),x({action:"REPLACE",location:r})}else window.location.replace(t)}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(e){void 0===e&&(e=!1);var t=S.setPrompt(e);return F||(I(1),F=!0),function(){return F&&(F=!1,I(-1)),t()}},listen:function(e){var t=S.appendListener(e);return I(1),function(){I(-1),t()}}};return D}function O(e,t,n){return Math.min(Math.max(e,t),n)}function j(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,i=void 0===o?["/"]:o,a=t.initialIndex,c=void 0===a?0:a,s=t.keyLength,l=void 0===s?6:s,u=b();function d(e){Object(r.a)(w,e),w.length=w.entries.length,u.notifyListeners(w.location,w.action)}function m(){return Math.random().toString(36).substr(2,l)}var h=O(c,0,i.length-1),v=i.map((function(e){return f(e,void 0,"string"==typeof e?m():e.key||m())})),g=p;function y(e){var t=O(w.index+e,0,w.entries.length-1),r=w.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?d({action:"POP",location:r,index:t}):d()}))}var w={length:v.length,action:"POP",location:v[h],index:h,entries:v,createHref:g,push:function(e,t){var r=f(e,t,m(),w.location);u.confirmTransitionTo(r,"PUSH",n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,r):n.push(r),d({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=f(e,t,m(),w.location);u.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,d({action:"REPLACE",location:r}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return w}},53:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));const r="wc/customer-effort-score",o="/wc-admin",i="woocommerce_ces_tracks_queue"},57:function(e,t){e.exports=window.wp.date},59:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"f",(function(){return m}));var r=n(28),o=n(3),i=n(15);function a(e){return e?e.split(":")[0]:null}function c(e){let t=a(e);return Object(o.without)(Object(i.f)("onboarding",{euCountries:[]}).euCountries,"GB").includes(t)&&(t="EU"),t}function s(e,t=!1,n){return u(e,t,n).map(e=>e.id||e.product)}function l(e,t){const n={};n.products=u(e,!0,t),n.remainingProducts=u(e,!1,t);const r=[...new Set([...n.products,...n.remainingProducts])];return n.uniqueItemsList=r.map(e=>{let t;return t=e.label?{type:"extension",name:e.label}:{type:"theme",name:e.title},t}),n}function u(e,t=!1,n){const r=Object(i.f)("onboarding",{}),o=[];if(!r.productTypes)return o;(e.product_types||[]).forEach(e=>{r.productTypes[e]&&r.productTypes[e].product&&(t||!n.includes(r.productTypes[e].slug))&&o.push(r.productTypes[e])});const a=r.themes.find(t=>t.slug===e.theme);return a&&a.id&&d(a.price)>0&&(t||!a.is_installed)&&o.push(a),o}function d(e){return Number(Object(r.decodeEntities)(e).replace(/[^0-9.-]+/g,""))}function m(e){return/admin.php\?page=wc-admin/.test(e)}},6:function(e,t,n){!function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&e.push(a)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var c in o)t.call(o,c)&&o[c]&&e.push(c);else e.push(o.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},65:function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return s}));var r=n(11),o=n(254);function i(e,t){const{getItemsTotalCount:n,getItemsError:o,isResolving:i}=e(r.ITEMS_STORE_NAME);if(!t.length)return 0;const a={page:1,per_page:1,status:t,_fields:["id"]},c=n("orders",a,null),s=Boolean(o("orders",a)),l=i("getItemsTotalCount",["orders",a,null]);return s||l?null:c}function a(e){const{getSetting:t}=e(r.SETTINGS_STORE_NAME),{woocommerce_actionable_order_statuses:n=o.a}=t("wc_admin","wcAdminSettings",{});return n}const c={page:1,per_page:1,low_in_stock:!0,status:"publish",_fields:["id"]};function s(e){const{getItemsTotalCount:t,getItemsError:n,isResolving:o}=e(r.ITEMS_STORE_NAME),i=t("products/low-in-stock",c,null),a=Boolean(n("products/low-in-stock",c)),s=o("getItemsTotalCount",["products/low-in-stock",c,null]);return a||s&&null===i?null:i}},67:function(e,t,n){"use strict";var r=n(48),o=n(39),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,s=Array.prototype.push,l=function(e,t){s.apply(e,c(t)?t:[t])},u=Date.prototype.toISOString,d=o.default,m={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:d,formatter:o.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,n,o,i,a,s,u,d,p,f,h,b,v,g){var y,w=t;if("function"==typeof u?w=u(n,w):w instanceof Date?w=f(w):"comma"===o&&c(w)&&(w=r.maybeMap(w,(function(e){return e instanceof Date?f(e):e}))),null===w){if(i)return s&&!v?s(n,m.encoder,g,"key",h):n;w=""}if("string"==typeof(y=w)||"number"==typeof y||"boolean"==typeof y||"symbol"==typeof y||"bigint"==typeof y||r.isBuffer(w))return s?[b(v?n:s(n,m.encoder,g,"key",h))+"="+b(s(w,m.encoder,g,"value",h))]:[b(n)+"="+b(String(w))];var O,j=[];if(void 0===w)return j;if("comma"===o&&c(w))O=[{value:w.length>0?w.join(",")||null:void 0}];else if(c(u))O=u;else{var _=Object.keys(w);O=d?_.sort(d):_}for(var E=0;E<O.length;++E){var k=O[E],S="object"==typeof k&&void 0!==k.value?k.value:w[k];if(!a||null!==S){var x=c(w)?"function"==typeof o?o(n,k):n:n+(p?"."+k:"["+k+"]");l(j,e(S,x,o,i,a,s,u,d,p,f,h,b,v,g))}}return j};e.exports=function(e,t){var n,r=e,s=function(e){if(!e)return m;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],a=m.filter;return("function"==typeof e.filter||c(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===e.allowDots?m.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:a,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"==typeof s.filter?r=(0,s.filter)("",r):c(s.filter)&&(n=s.filter);var u,d=[];if("object"!=typeof r||null===r)return"";u=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=a[u];n||(n=Object.keys(r)),s.sort&&n.sort(s.sort);for(var h=0;h<n.length;++h){var b=n[h];s.skipNulls&&null===r[b]||l(d,p(r[b],b,f,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset))}var v=d.join(s.delimiter),g=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),v.length>0?g+v:""}},68:function(e,t,n){"use strict";var r=n(48),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var d=0;n.depth>0&&null!==(c=a.exec(i))&&d<n.depth;){if(d+=1,!n.plainObjects&&o.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),function(e,t,n,r){for(var o=r?t:s(t,n),i=e.length-1;i>=0;--i){var a,c=e[i];if("[]"===c&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var l="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&c!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=o:a[l]=o:a={0:o}}o=a}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,l={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,m=u.split(t.delimiter,d),p=-1,f=t.charset;if(t.charsetSentinel)for(n=0;n<m.length;++n)0===m[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===m[n]?f="utf-8":"utf8=%26%2310003%3B"===m[n]&&(f="iso-8859-1"),p=n,n=m.length);for(n=0;n<m.length;++n)if(n!==p){var h,b,v=m[n],g=v.indexOf("]="),y=-1===g?v.indexOf("="):g+1;-1===y?(h=t.decoder(v,a.decoder,f,"key"),b=t.strictNullHandling?null:""):(h=t.decoder(v.slice(0,y),a.decoder,f,"key"),b=r.maybeMap(s(v.slice(y+1),t),(function(e){return t.decoder(e,a.decoder,f,"value")}))),b&&t.interpretNumericEntities&&"iso-8859-1"===f&&(b=c(b)),v.indexOf("[]=")>-1&&(b=i(b)?[b]:b),o.call(l,h)?l[h]=r.combine(l[h],b):l[h]=b}return l}(e,n):e,d=n.plainObjects?Object.create(null):{},m=Object.keys(
|