@shopify/app-bridge-react 2.0.19 → 2.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.20](https://github.com/Shopify/app-bridge/compare/v2.0.19...v2.0.20) (2022-03-23)
7
+
8
+ **Note:** Version bump only for package @shopify/app-bridge-react
9
+
10
+
11
+
12
+
13
+
6
14
  ## [2.0.19](https://github.com/Shopify/app-bridge/compare/v2.0.17...v2.0.19) (2022-03-15)
7
15
 
8
16
  **Note:** Version bump only for package @shopify/app-bridge-react
@@ -0,0 +1,13 @@
1
+ import type { ContextAction, DiscardAction } from '@shopify/app-bridge/actions/ContextualSaveBar';
2
+ export interface Props {
3
+ discardAction: DiscardAction & {
4
+ onAction(): void;
5
+ };
6
+ saveAction: ContextAction & {
7
+ onAction(): void;
8
+ };
9
+ fullWidth?: boolean;
10
+ leaveConfirmationDisable?: boolean;
11
+ visible?: boolean;
12
+ }
13
+ export default function ContextualSaveBar({ discardAction, saveAction, fullWidth, leaveConfirmationDisable, visible, }: Props): null;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var react_1 = require("react");
15
+ var actions_1 = require("@shopify/app-bridge/actions");
16
+ var useAppBridge_1 = require("../../useAppBridge");
17
+ var Action = actions_1.ContextualSaveBar.Action, create = actions_1.ContextualSaveBar.create;
18
+ function ContextualSaveBar(_a) {
19
+ var discardAction = _a.discardAction, saveAction = _a.saveAction, fullWidth = _a.fullWidth, leaveConfirmationDisable = _a.leaveConfirmationDisable, visible = _a.visible;
20
+ var app = useAppBridge_1.useAppBridge();
21
+ var onSaveAction = saveAction.onAction, saveActionProps = __rest(saveAction, ["onAction"]);
22
+ var onDiscardAction = discardAction.onAction, discardActionProps = __rest(discardAction, ["onAction"]);
23
+ var contextualSaveBar = react_1.useMemo(function () {
24
+ return create(app, {
25
+ saveAction: saveActionProps,
26
+ discardAction: discardActionProps,
27
+ fullWidth: fullWidth,
28
+ leaveConfirmationDisable: leaveConfirmationDisable,
29
+ });
30
+ }, [app]);
31
+ react_1.useEffect(function () {
32
+ contextualSaveBar.set({
33
+ saveAction: saveActionProps,
34
+ discardAction: discardActionProps,
35
+ fullWidth: fullWidth,
36
+ leaveConfirmationDisable: leaveConfirmationDisable,
37
+ }, visible);
38
+ }, [
39
+ app,
40
+ contextualSaveBar,
41
+ saveActionProps,
42
+ discardActionProps,
43
+ fullWidth,
44
+ leaveConfirmationDisable,
45
+ visible,
46
+ ]);
47
+ react_1.useEffect(function () {
48
+ contextualSaveBar.subscribe(Action.DISCARD, onDiscardAction);
49
+ contextualSaveBar.subscribe(Action.SAVE, onSaveAction);
50
+ return function () {
51
+ contextualSaveBar.unsubscribe();
52
+ };
53
+ }, [contextualSaveBar]);
54
+ react_1.useEffect(function () {
55
+ if (visible) {
56
+ contextualSaveBar.dispatch(Action.SHOW);
57
+ }
58
+ else {
59
+ contextualSaveBar.dispatch(Action.HIDE);
60
+ }
61
+ }, [contextualSaveBar, visible]);
62
+ return null;
63
+ }
64
+ exports.default = ContextualSaveBar;
@@ -0,0 +1,3 @@
1
+ import ContextualSaveBar, { Props } from './ContextualSaveBar';
2
+ export default ContextualSaveBar;
3
+ export { Props };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var ContextualSaveBar_1 = __importDefault(require("./ContextualSaveBar"));
7
+ exports.default = ContextualSaveBar_1.default;
@@ -1,3 +1,4 @@
1
+ export { default as ContextualSaveBar, Props as ContextualSaveBarProps } from './ContextualSaveBar';
1
2
  export { default as Provider, Props as ProviderProps } from './Provider';
2
3
  export { default as Loading } from './Loading';
3
4
  export { default as Toast, Props as ToastProps } from './Toast';
@@ -10,6 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
+ var ContextualSaveBar_1 = require("./ContextualSaveBar");
14
+ Object.defineProperty(exports, "ContextualSaveBar", { enumerable: true, get: function () { return ContextualSaveBar_1.default; } });
13
15
  var Provider_1 = require("./Provider");
14
16
  Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return Provider_1.default; } });
15
17
  var Loading_1 = require("./Loading");
package/hooks/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ export { useContextualSaveBar } from './useContextualSaveBar';
1
2
  export { useNavigationHistory } from './useNavigationHistory';
2
3
  export { useToast } from './useToast';
package/hooks/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var useContextualSaveBar_1 = require("./useContextualSaveBar");
4
+ Object.defineProperty(exports, "useContextualSaveBar", { enumerable: true, get: function () { return useContextualSaveBar_1.useContextualSaveBar; } });
3
5
  var useNavigationHistory_1 = require("./useNavigationHistory");
4
6
  Object.defineProperty(exports, "useNavigationHistory", { enumerable: true, get: function () { return useNavigationHistory_1.useNavigationHistory; } });
5
7
  var useToast_1 = require("./useToast");
@@ -0,0 +1 @@
1
+ export { useContextualSaveBar } from './useContextualSaveBar';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var useContextualSaveBar_1 = require("./useContextualSaveBar");
4
+ Object.defineProperty(exports, "useContextualSaveBar", { enumerable: true, get: function () { return useContextualSaveBar_1.useContextualSaveBar; } });
@@ -0,0 +1,13 @@
1
+ import type { ContextAction, DiscardAction } from '@shopify/app-bridge/actions/ContextualSaveBar';
2
+ export interface Props {
3
+ discardAction: DiscardAction & {
4
+ onAction(): void;
5
+ };
6
+ saveAction: ContextAction & {
7
+ onAction(): void;
8
+ };
9
+ fullWidth?: boolean;
10
+ leaveConfirmationDisable?: boolean;
11
+ visible?: boolean;
12
+ }
13
+ export declare function useContextualSaveBar({ discardAction, saveAction, fullWidth, leaveConfirmationDisable, visible, }: Props): null;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.useContextualSaveBar = void 0;
15
+ var react_1 = require("react");
16
+ var ContextualSaveBar_1 = require("@shopify/app-bridge/actions/ContextualSaveBar");
17
+ var useAppBridge_1 = require("../../useAppBridge");
18
+ function useContextualSaveBar(_a) {
19
+ var discardAction = _a.discardAction, saveAction = _a.saveAction, fullWidth = _a.fullWidth, leaveConfirmationDisable = _a.leaveConfirmationDisable, visible = _a.visible;
20
+ var app = useAppBridge_1.useAppBridge();
21
+ var onSaveAction = saveAction.onAction, saveActionProps = __rest(saveAction, ["onAction"]);
22
+ var onDiscardAction = discardAction.onAction, discardActionProps = __rest(discardAction, ["onAction"]);
23
+ /* We want to reuse the same ContextualSaveBar instance, even when props change
24
+ * (so we don't include all the props in the dependency array).
25
+ * Instead of recreating the component on every change, we use the set method,
26
+ * in the useEffect block below, to dispatch updates when props change.
27
+ */
28
+ var contextualSaveBar = react_1.useMemo(function () {
29
+ return ContextualSaveBar_1.create(app, {
30
+ saveAction: saveActionProps,
31
+ discardAction: discardActionProps,
32
+ fullWidth: fullWidth,
33
+ leaveConfirmationDisable: leaveConfirmationDisable,
34
+ });
35
+ }, [app]);
36
+ react_1.useEffect(function () {
37
+ contextualSaveBar.set({
38
+ saveAction: saveActionProps,
39
+ discardAction: discardActionProps,
40
+ fullWidth: fullWidth,
41
+ leaveConfirmationDisable: leaveConfirmationDisable,
42
+ }, Boolean(visible));
43
+ }, [
44
+ contextualSaveBar,
45
+ saveActionProps,
46
+ discardActionProps,
47
+ fullWidth,
48
+ leaveConfirmationDisable,
49
+ visible,
50
+ ]);
51
+ react_1.useEffect(function () {
52
+ contextualSaveBar.subscribe(ContextualSaveBar_1.Action.DISCARD, onDiscardAction);
53
+ contextualSaveBar.subscribe(ContextualSaveBar_1.Action.SAVE, onSaveAction);
54
+ return function () {
55
+ contextualSaveBar.unsubscribe();
56
+ };
57
+ }, [contextualSaveBar]);
58
+ react_1.useEffect(function () {
59
+ if (visible) {
60
+ contextualSaveBar.dispatch(ContextualSaveBar_1.Action.SHOW);
61
+ }
62
+ else {
63
+ contextualSaveBar.dispatch(ContextualSaveBar_1.Action.HIDE);
64
+ }
65
+ }, [contextualSaveBar, visible]);
66
+ return null;
67
+ }
68
+ exports.useContextualSaveBar = useContextualSaveBar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/app-bridge-react",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "types": "index.d.ts",
5
5
  "main": "index.js",
6
6
  "unpkg": "umd/index.js",
@@ -45,7 +45,7 @@
45
45
  }
46
46
  ],
47
47
  "dependencies": {
48
- "@shopify/app-bridge": "^2.0.19"
48
+ "@shopify/app-bridge": "^2.0.20"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/react": "^17.0.38",
@@ -55,5 +55,5 @@
55
55
  "peerDependencies": {
56
56
  "react": "^16.0.0 || ^17.0.0"
57
57
  },
58
- "gitHead": "7b9604f253934c22ef88630eaa3eb891bdfc6f7a"
58
+ "gitHead": "ecdf8bddd4cc9f3b40ad20c1029794e114e0e69a"
59
59
  }
package/umd/index.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("app-bridge-react",[],e):"object"==typeof exports?exports["app-bridge-react"]=e():t["app-bridge-react"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=35)}([function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NonSnakeCaseGroup=e.findMatchInEnum=e.forEachInEnum=e.getMergedProps=e.updateActionFromPayload=e.isValidOptionalString=e.isValidOptionalNumber=e.getEventNameSpace=e.getVersion=e.actionWrapper=void 0;var i=n(21),a=o(n(42)),u=n(1),s=n(43);function c(){return s.version}function p(t,e){var n=a.default(t,e);return n||Object.assign(t,e)}e.actionWrapper=function(t){return r(r({},t),{version:c(),clientInterface:{name:s.name,version:c()}})},e.getVersion=c,e.getEventNameSpace=function(t,n,r){if(n.startsWith(""+i.PREFIX+i.SEPARATOR))return n;var o=function(t){if(e.NonSnakeCaseGroup.includes(t))return t.toUpperCase();return(n=t,n.replace(/([A-Z])/g,(function(t,e,n){return(0===n?"":"_")+t[0].toLowerCase()}))).toUpperCase();var n}(t);if(r){var a=r.subgroups,u=r.type;a&&a.length>0&&(o+=o.length>0?i.SEPARATOR:"",a.forEach((function(t,e){o+=""+t.toUpperCase()+(e<a.length-1?i.SEPARATOR:"")}))),u!==t&&u&&(o+=""+(o.length>0?i.SEPARATOR:"")+u.toUpperCase())}return o&&(o+=""+(o.length>0?i.SEPARATOR:"")+n.toUpperCase()),""+i.PREFIX+i.SEPARATOR+o},e.isValidOptionalNumber=function(t){return null==t||"number"==typeof t},e.isValidOptionalString=function(t){return null==t||"string"==typeof t},e.updateActionFromPayload=function(t,e){return t.id===e.id&&(Object.assign(t,p(t,e)),!0)},e.getMergedProps=p,e.forEachInEnum=function(t,e){Object.keys(t).forEach((function(n){e(t[n])}))},e.findMatchInEnum=function(t,e){var n=Object.keys(t).find((function(n){return e===t[n]}));return n?t[n]:void 0},e.NonSnakeCaseGroup=[u.Group.AuthCode,u.Group.Button,u.Group.ButtonGroup,u.Group.Cart,u.Group.Error,u.Group.Features,u.Group.Fullscreen,u.Group.Link,u.Group.Loading,u.Group.Menu,u.Group.Modal,u.Group.Navigation,u.Group.Pos,u.Group.Print,u.Group.ResourcePicker,u.Group.Scanner,u.Group.SessionToken,u.Group.Share,u.Group.TitleBar,u.Group.Toast]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentType=e.Group=void 0,function(t){t.AuthCode="AuthCode",t.Button="Button",t.ButtonGroup="ButtonGroup",t.Cart="Cart",t.Client="Client",t.ContextualSaveBar="ContextualSaveBar",t.Error="Error",t.Features="Features",t.FeedbackModal="FeedbackModal",t.Fullscreen="Fullscreen",t.LeaveConfirmation="LeaveConfirmation",t.Link="Link",t.Loading="Loading",t.Menu="Menu",t.Modal="Modal",t.Navigation="Navigation",t.Performance="Performance",t.Pos="Pos",t.Print="Print",t.ResourcePicker="Resource_Picker",t.Scanner="Scanner",t.SessionToken="SessionToken",t.Share="Share",t.TitleBar="TitleBar",t.Toast="Toast",t.MarketingExternalActivityTopBar="MarketingExternalActivityTopBar"}(e.Group||(e.Group={})),function(t){t.Button="Button",t.ButtonGroup="ButtonGroup"}(e.ComponentType||(e.ComponentType={}))},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ActionSetWithChildren=e.ActionSet=void 0;var s=n(7),c=n(11),p=n(6),f=n(1),d=u(n(52)),l=n(0),h=function(){function t(t,e,n,r){var o=this;this.app=t,this.type=e,this.group=n,this.subgroups=[],this.subscriptions=[],t||p.throwError(p.Action.INVALID_ACTION,"Missing required `app`"),this.id=r||d.default(),this.defaultGroup=n;var i=this.set;this.set=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.app.hooks?(t=o.app.hooks).run.apply(t,a([s.LifecycleHook.UpdateAction,i,o],e)):i.apply(o,e)}}return t.prototype.set=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},Object.defineProperty(t.prototype,"component",{get:function(){return{id:this.id,subgroups:this.subgroups,type:this.type}},enumerable:!1,configurable:!0}),t.prototype.updateSubscription=function(t,e,n){var r,o=t.eventType,i=t.callback,a=t.component;return(r=this.subscriptions.findIndex((function(e){return e===t})))>=0?this.subscriptions[r].unsubscribe():r=void 0,this.group=e,this.subgroups=n,Object.assign(a,{subgroups:this.subgroups}),this.subscribe(o,i,a,r)},t.prototype.error=function(t){var e=this,n=[];return l.forEachInEnum(p.Action,(function(r){n.push(e.subscriptions.length),e.subscribe(r,t)})),function(){n.map((function(t){return e.subscriptions[t]})).forEach((function(t){c.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))}},t.prototype.subscribe=function(t,e,n,r){var o,a=this,u=n||this.component,s=t.toUpperCase(),c="number"==typeof r?e:e.bind(this);o=p.isErrorEventName(t)?l.getEventNameSpace(f.Group.Error,t,i(i({},u),{type:""})):l.getEventNameSpace(this.group,t,u);var d=this.app.subscribe(o,c,n?n.id:this.id),h={eventType:s,unsubscribe:d,callback:c,component:u,updateSubscribe:function(t,e){return a.updateSubscription(h,t,e)}};return"number"==typeof r&&r>=0&&r<this.subscriptions.length?this.subscriptions[r]=h:this.subscriptions.push(h),d},t.prototype.unsubscribe=function(t){return void 0===t&&(t=!1),A(this.subscriptions,this.defaultGroup,t),this},t}();e.ActionSet=h;var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.children=[],e}return o(e,t),e.prototype.unsubscribe=function(t,n){return void 0===t&&(t=!0),void 0===n&&(n=!1),A(this.subscriptions,this.defaultGroup,n),this.children.forEach((function(n){n instanceof e?n.unsubscribe(t,!t):n.unsubscribe(!t)})),this},e.prototype.getChild=function(t){var e=this.children.findIndex((function(e){return e.id===t}));return e>=0?this.children[e]:void 0},e.prototype.getChildIndex=function(t){return this.children.findIndex((function(e){return e.id===t}))},e.prototype.getChildSubscriptions=function(t,e){return this.subscriptions.filter((function(n){return n.component.id===t&&(!e||e===n.eventType)}))},e.prototype.addChild=function(t,n,r){var o=this,i=t.subscriptions;return this.getChild(t.id)||this.children.push(t),!i||n===t.group&&r===t.subgroups||(i.forEach((function(t){(0,t.updateSubscribe)(n,r)})),Object.assign(t,{group:n,subgroups:r}),t instanceof e&&t.children.forEach((function(t){return o.addChild(t,n,r)}))),this},e.prototype.removeChild=function(t){var e=this;return c.removeFromCollection(this.children,this.getChild(t),(function(){e.subscriptions.filter((function(e){return e.component.id===t})).forEach((function(t){c.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))})),this},e.prototype.subscribeToChild=function(t,e,n){var r=this,o=n.bind(this);if(e instanceof Array)return e.forEach((function(e){return r.subscribeToChild(t,e,n)})),this;if("string"!=typeof e)return this;var i=e.toUpperCase(),a=this.getChildSubscriptions(t.id,i);if(a.length>0)a.forEach((function(e){return e.updateSubscribe(r.group,t.subgroups)}));else{var u={id:t.id,subgroups:t.subgroups,type:t.type};this.subscribe(i,o,u)}return this},e.prototype.getUpdatedChildActions=function(t,e){if(0!==t.length){for(var n=t.filter((function(t,e,n){return e===n.indexOf(t)})),r=n.map((function(t){return t.id})),o=e.filter((function(t){return r.indexOf(t.id)<0}));o.length>0;){if(!(i=o.pop()))break;this.removeChild(i.id)}return n}for(;e.length>0;){var i;if(!(i=e.pop()))break;this.removeChild(i.id)}},e}(h);function A(t,e,n){void 0===n&&(n=!1),t.forEach((function(t){n?(0,t.updateSubscribe)(e,[]):(0,t.unsubscribe)()})),n||(t.length=0)}e.ActionSetWithChildren=y},function(t,e,n){"use strict";t.exports=n(38)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppBridgeContext=void 0;var r=n(3);e.AppBridgeContext=r.createContext(null)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},a=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.Performance=e.Pos=e.AppLink=e.ChannelMenu=e.NavigationMenu=e.Share=e.ContextualSaveBar=e.MarketingExternalActivityTopBar=e.TitleBar=e.SessionToken=e.ResourcePicker=e.Redirect=e.Print=e.ModalContent=e.Modal=e.Loading=e.LeaveConfirmation=e.History=e.Toast=e.Fullscreen=e.FeedbackModal=e.Features=e.Flash=e.Error=e.Client=e.Cart=e.Scanner=e.ButtonGroup=e.Button=e.AuthCode=void 0;var u=i(n(51));e.AuthCode=u;var s=i(n(8));e.Button=s;var c=i(n(12));e.ButtonGroup=c;var p=i(n(53));e.Cart=p;var f=i(n(25));e.Client=f;var d=i(n(6));e.Error=d;var l=i(n(54));e.Flash=l;var h=i(n(56));e.Features=h;var y=i(n(58));e.FeedbackModal=y;var A=i(n(59));e.Fullscreen=A;var _=i(n(60));e.LeaveConfirmation=_;var P=i(n(61));e.Loading=P;var v=i(n(28));e.Modal=v;var O=i(n(62));e.ModalContent=O;var b=i(n(63));e.History=b;var E=i(n(29));e.Redirect=E;var g=i(n(22));e.Print=g;var T=i(n(64));e.ResourcePicker=T;var m=i(n(65));e.Scanner=m;var S=i(n(66));e.SessionToken=S;var C=i(n(67));e.TitleBar=C;var R=i(n(13));e.Toast=R;var I=i(n(69));e.ContextualSaveBar=I;var M=i(n(70));e.Share=M;var D=i(n(71));e.NavigationMenu=D;var N=i(n(72));e.ChannelMenu=N;var j=i(n(14));e.AppLink=j;var w=i(n(73));e.Pos=w;var U=i(n(74));e.MarketingExternalActivityTopBar=U;var L=i(n(75));e.Performance=L;var B=n(23);Object.defineProperty(e,"isAppBridgeAction",{enumerable:!0,get:function(){return B.isAppBridgeAction}}),a(n(1),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=e.fromAction=e.AppBridgeError=e.invalidOriginAction=e.isErrorEventName=e.permissionAction=e.networkAction=e.persistenceAction=e.unsupportedOperationAction=e.unexpectedAction=e.invalidAction=e.invalidActionType=e.invalidPayload=e.Message=e.AppActionType=e.Action=void 0;var r,o=n(0),i=n(1);function a(t,e,n){var r=e.payload;return o.actionWrapper({type:t,group:i.Group.Error,payload:{action:e,message:n,type:t,id:r&&r.id?r.id:void 0}})}!function(t){t.INVALID_ACTION="APP::ERROR::INVALID_ACTION",t.INVALID_ACTION_TYPE="APP::ERROR::INVALID_ACTION_TYPE",t.INVALID_PAYLOAD="APP::ERROR::INVALID_PAYLOAD",t.INVALID_OPTIONS="APP::ERROR::INVALID_OPTIONS",t.UNEXPECTED_ACTION="APP::ERROR::UNEXPECTED_ACTION",t.PERSISTENCE="APP::ERROR::PERSISTENCE",t.UNSUPPORTED_OPERATION="APP::ERROR::UNSUPPORTED_OPERATION",t.NETWORK="APP::ERROR::NETWORK",t.PERMISSION="APP::ERROR::PERMISSION",t.FAILED_AUTHENTICATION="APP::ERROR::FAILED_AUTHENTICATION",t.INVALID_ORIGIN="APP::ERROR::INVALID_ORIGIN"}(r=e.Action||(e.Action={})),function(t){t.INVALID_CONFIG="APP::ERROR::INVALID_CONFIG",t.MISSING_CONFIG="APP::APP_ERROR::MISSING_CONFIG",t.MISSING_APP_BRIDGE_MIDDLEWARE="APP::APP_ERROR::MISSING_APP_BRIDGE_MIDDLEWARE",t.WINDOW_UNDEFINED="APP::APP_ERROR::WINDOW_UNDEFINED",t.REDUX_REINSTANTIATED="APP::APP_ERROR::REDUX_REINSTANTIATED",t.MISSING_LOCAL_ORIGIN="APP::APP_ERROR::MISSING_LOCAL_ORIGIN",t.MISSING_HOST_PROVIDER="APP::APP_ERROR::MISSING_HOST_PROVIDER",t.MISSING_ROUTER_CONTEXT="APP::APP_ERROR::MISSING_ROUTER_CONTEXT",t.MISSING_HISTORY_BLOCK="APP::APP_ERROR::MISSING_HISTORY_BLOCK"}(e.AppActionType||(e.AppActionType={})),function(t){t.MISSING_PAYLOAD="Missing payload",t.INVALID_PAYLOAD_ID="Id in payload is missing or invalid"}(e.Message||(e.Message={})),e.invalidPayload=function(t,e){return a(r.INVALID_PAYLOAD,t,e||"The action's payload is missing required properties or has invalid properties")},e.invalidActionType=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"The action type is invalid or unsupported",type:r.INVALID_ACTION_TYPE},type:r.INVALID_ACTION_TYPE})},e.invalidAction=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"The action's has missing/invalid values for `group`, `type` or `version`",type:r.INVALID_ACTION},type:r.INVALID_ACTION})},e.unexpectedAction=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"Action cannot be called at this time",type:r.UNEXPECTED_ACTION},type:r.UNEXPECTED_ACTION})},e.unsupportedOperationAction=function(t,e){return a(r.UNSUPPORTED_OPERATION,t,e||"The action type is unsupported")},e.persistenceAction=function(t,e){return a(r.PERSISTENCE,t,e||"Action cannot be persisted on server")},e.networkAction=function(t,e){return a(r.NETWORK,t,e||"Network error")},e.permissionAction=function(t,e){return a(r.PERMISSION,t,e||"Action is not permitted")},e.isErrorEventName=function(t){return"string"==typeof o.findMatchInEnum(r,t)},e.invalidOriginAction=function(t){return o.actionWrapper({group:i.Group.Error,payload:{message:t,type:r.INVALID_ORIGIN},type:r.INVALID_ORIGIN})};var u=function(t){this.name="AppBridgeError",this.message=t,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(this.message).stack};function s(t,e,n){var r=new u(t?e+": "+t:e);return r.action=n,r.type=e,r}e.AppBridgeError=u,u.prototype=Object.create(Error.prototype),e.fromAction=s,e.throwError=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r,o=t[0];throw"string"==typeof t[1]?n=t[1]:(r=t[1],n=t[2]||""),s(n,o,r)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LifecycleHook=e.MessageType=e.PermissionType=e.isV1Config=void 0,e.isV1Config=function(t){return void 0!==t.shopOrigin},function(t){t.Dispatch="Dispatch",t.Subscribe="Subscribe"}(e.PermissionType||(e.PermissionType={})),function(t){t.GetState="getState",t.Dispatch="dispatch",t.Subscribe="subscribe",t.Unsubscribe="unsubscribe"}(e.MessageType||(e.MessageType={})),function(t){t.UpdateAction="UpdateAction",t.DispatchAction="DispatchAction"}(e.LifecycleHook||(e.LifecycleHook={}))},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Button=e.isValidButtonProps=e.update=e.clickButton=e.Style=e.Icon=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t,e,n){var r=e.id,o=u.getEventNameSpace(t,a.CLICK,e),i={id:r,payload:n};return u.actionWrapper({type:o,group:t,payload:i})}function f(t,e,n){var r=e.id,o=n.label,s=u.getEventNameSpace(t,a.UPDATE,e),c=i(i({},n),{id:r,label:o});return u.actionWrapper({type:s,group:t,payload:c})}!function(t){t.CLICK="CLICK",t.UPDATE="UPDATE"}(a=e.Action||(e.Action={})),function(t){t.Print="print"}(e.Icon||(e.Icon={})),function(t){t.Danger="danger"}(e.Style||(e.Style={})),e.clickButton=p,e.update=f,e.isValidButtonProps=function(t){return"string"==typeof t.id&&"string"==typeof t.label};var d=function(t){function e(e,n){var r=t.call(this,e,c.ComponentType.Button,c.Group.Button)||this;return r.disabled=!1,r.loading=!1,r.plain=!1,r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{disabled:this.disabled,icon:this.icon,label:this.label,style:this.style,loading:this.loading,plain:this.plain}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=u.getMergedProps(this.options,t),r=n.label,o=n.disabled,i=n.icon,s=n.style,c=n.loading,p=n.plain;return this.label=r,this.disabled=Boolean(o),this.icon=i,this.style=s,this.loading=Boolean(c),this.plain=Boolean(p),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case a.CLICK:this.app.dispatch(p(this.group,this.component,e));break;case a.UPDATE:var n=f(this.group,this.component,this.payload);this.app.dispatch(n)}return this},e}(s.ActionSet);e.Button=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingleButton=void 0;var r=n(8);e.getSingleButton=function(t,e,n,o){return t.addChild(e,t.group,n),t.subscribeToChild(e,r.Action.UPDATE,o),e.payload}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTransportListener=e.fromWindow=e.fromFrame=e.Context=void 0;var r=n(6),o=n(23),i=n(7),a=n(11),u=n(24);!function(t){t.Modal="Modal",t.Main="Main"}(e.Context||(e.Context={})),e.fromFrame=function(t,e,n){var i=[],s=t.host,c=t.window;if(!s)throw r.fromAction("App frame is undefined",r.AppActionType.WINDOW_UNDEFINED);return u.isUnframed&&window&&window.MobileWebView&&Object.assign(window.MobileWebView,{postMessageToIframe:function(t,e){null==c||c.postMessage(t,e)}}),s.addEventListener("message",(function(t){if(o.isAppMessage(t))if(t.origin===e)if(u.isUnframed&&window&&window.MobileWebView){s=JSON.stringify({id:"unframed://fromClient",origin:e,data:t.data});window.MobileWebView.postMessage(s)}else for(var n=0,a=i;n<a.length;n++){(0,a[n])(t)}else{var s,p="Message origin '"+t.origin+"' does not match app origin '"+e+"'.",f={type:"dispatch",payload:s=r.invalidOriginAction(p)};null==c||c.postMessage(f,t.origin)}})),{context:n,localOrigin:e,frameWindow:c,hostFrame:s,dispatch:function(t){null==c||c.postMessage(t,e)},subscribe:function(t){return a.addAndRemoveFromCollection(i,t)}}},e.fromWindow=function(t,e){var n=[];return void 0!==typeof window&&window.addEventListener("message",(function(e){if((window!==t||u.isUnframed)&&e.source===t&&(o.isAppBridgeAction(e.data.payload)||o.isAppMessage(e)))for(var r=0,i=n;r<i.length;r++){(0,i[r])(e)}})),{localOrigin:e,hostFrame:t,dispatch:function(n){var r;if(null===(r=n.source)||void 0===r?void 0:r.host)if(u.isUnframed&&window&&window.MobileWebView){var o=JSON.stringify({id:"unframed://fromClient",origin:e,data:n});window.MobileWebView.postMessage(o)}else{var i=new URL("https://"+n.source.host).origin;t.postMessage(n,i)}},subscribe:function(t){return a.addAndRemoveFromCollection(n,t)}}},e.createTransportListener=function(){var t=[],e={};return{createSubscribeHandler:function(n){return function(){if(arguments.length<2)return a.addAndRemoveFromCollection(t,{callback:arguments[0]});var r=Array.from(arguments),o=r[0],u=r[1],s=r[2],c={callback:u,id:s},p={type:o,id:s};return Object.prototype.hasOwnProperty.call(e,o)||(e[o]=[]),n&&n(i.MessageType.Subscribe,p),a.addAndRemoveFromCollection(e[o],c,(function(){n&&n(i.MessageType.Unsubscribe,p)}))}},handleMessage:function(e){t.forEach((function(t){return t.callback(e)}))},handleActionDispatch:function(t){var n=t.type,r=t.payload,o=!1;if(Object.prototype.hasOwnProperty.call(e,n))for(var i=0,a=e[n];i<a.length;i++){var u=a[i],s=u.id,c=u.callback;!(r&&r.id===s)&&s||(c(r),o=!0)}return o}}}},function(t,e,n){"use strict";function r(t,e,n){var r=t.findIndex((function(t){return t===e}));return r>=0&&(t.splice(r,1),n&&n(e),!0)}Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromCollection=e.addAndRemoveFromCollection=void 0,e.addAndRemoveFromCollection=function(t,e,n){return t.push(e),function(){return r(t,e,n)}},e.removeFromCollection=r},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ButtonGroup=e.isGroupedButtonPayload=e.isGroupedButton=e.update=e.Action=void 0;var a,u=n(9),s=n(0),c=n(2),p=n(1);function f(t,e,n){return function(t,e,n,r,o){var a=e.id,u=r.label,c=s.getEventNameSpace(t,n,e),p=i(i({},r),{id:a,label:u,payload:o});return s.actionWrapper({type:c,group:t,payload:p})}(t,e,a.UPDATE,n)}!function(t){t.UPDATE="UPDATE"}(a=e.Action||(e.Action={})),e.update=f,e.isGroupedButton=function(t){var e=t;return e.buttons&&e.buttons.length>0&&void 0!==e.label},e.isGroupedButtonPayload=function(t){var e=t;return Array.isArray(e.buttons)&&"string"==typeof e.id&&"string"==typeof e.label};var d=function(t){function e(e,n){var r=t.call(this,e,p.ComponentType.ButtonGroup,p.Group.ButtonGroup)||this;return r.disabled=!1,r.plain=!1,r.buttonsOptions=[],r.buttons=[],r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{buttons:this.buttonsOptions,disabled:this.disabled,label:this.label,plain:this.plain}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.label,o=n.disabled,i=n.buttons,u=n.plain;return this.label=r,this.disabled=Boolean(o),this.buttons=this.getButtons(i),this.plain=Boolean(u),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:var e=f(this.group,this.component,this.payload);this.app.dispatch(e)}return this},e.prototype.updateButtons=function(t){if(this.buttons&&0!==this.buttons.length){for(var e,n=0,r=this.buttons;n<r.length;n++){var o=r[n];if(e=s.updateActionFromPayload(o,t))break}e&&this.dispatch(a.UPDATE)}},e.prototype.getSingleButton=function(t){return u.getSingleButton(this,t,this.subgroups,this.updateButtons)},e.prototype.getButtons=function(t){var e=this,n=[];return t?(t.forEach((function(t){var r=u.getSingleButton(e,t,e.subgroups,e.updateButtons);n.push(r)})),this.buttonsOptions=t,n):[]},e}(c.ActionSetWithChildren);e.ButtonGroup=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Toast=e.clear=e.show=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return u.actionWrapper({group:c.Group.Toast,payload:t,type:a.SHOW})}function f(t){return u.actionWrapper({payload:t,group:c.Group.Toast,type:a.CLEAR})}!function(t){t.SHOW="APP::TOAST::SHOW",t.CLEAR="APP::TOAST::CLEAR"}(a=e.Action||(e.Action={})),e.show=p,e.clear=f;var d=function(t){function e(e,n){var r=t.call(this,e,c.Group.Toast,c.Group.Toast)||this;return r.message="",r.duration=5e3,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{duration:this.duration,isError:this.isError,message:this.message}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){var e=u.getMergedProps(this.options,t),n=e.message,r=e.duration,o=e.isError;return this.message=n,this.duration=r,this.isError=o,this},e.prototype.dispatch=function(t){switch(t){case a.SHOW:var e=p(this.payload);this.app.dispatch(e);break;case a.CLEAR:this.app.dispatch(f({id:this.id}))}return this},e}(s.ActionSet);e.Toast=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.AppLink=e.update=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1),p=n(29);function f(t,e,n){var r=e.id,o=n.label,s=n.destination,c=i(i({},n),{id:r,label:o,destination:s});return u.actionWrapper({group:t,type:u.getEventNameSpace(t,a.UPDATE,e),payload:c})}!function(t){t.UPDATE="UPDATE"}(a=e.Action||(e.Action={})),e.update=f;var d=function(t){function e(e,n){var r=t.call(this,e,c.Group.Link,c.Group.Link)||this;return r.label="",r.destination="",r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{label:this.label,destination:this.destination,redirectType:p.Action.APP}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){var t=this.options,e=t.label,n=t.destination,r=t.redirectType,o=n;return{id:this.id,label:e,destination:{path:o},redirectType:r}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=u.getMergedProps(this.options,t),r=n.label,o=n.destination;return this.label=r,this.destination=o,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:var e=f(this.group,this.component,this.payload);this.app.dispatch(e)}return this},e}(s.ActionSet);e.AppLink=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.updateHistory=void 0;var i=n(10),a=n(5),u=n(84),s=["hmac","locale","protocol","session","shop","timestamp","host"];e.updateHistory=function(t,e){return r(this,void 0,void 0,(function(){var n,r,c,p,f,d,l,h,y;return o(this,(function(o){switch(o.label){case 0:return n=u.getSelfWindow(),r=u.getTopWindow(),c=n===r,[4,t.getState("context").then((function(t){return t===i.Context.Main}))];case 1:return p=o.sent(),c||!p?[2]:(f=function(t){var e=u.getOrigin();if("string"==typeof t)return new URL(t,e);var n=t.pathname,r=t.search,o=t.hash;return new URL(""+n+r+o,e)}(e),s.forEach((function(t){return f.searchParams.delete(t)})),d=f.pathname,l=f.search,h=f.hash,y=""+d+l+h,a.History.create(t).dispatch(a.History.Action.REPLACE,y),[2])}}))}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useAppBridge=void 0;var r=n(3),o=n(4);e.useAppBridge=function(){var t=r.useContext(o.AppBridgeContext);if(!t)throw new Error("No AppBridge context provided. Your component must be wrapped in the <Provider> component from App Bridge React.");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleRouteChange=void 0;var r=n(5);e.handleRouteChange=function(t,e){return t.subscribe(r.Redirect.Action.APP,(function(t){var n=t.path;e.replace(n)}))}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.setClientInterfaceHook=void 0;var c=s(n(3)),p=u(n(40)),f=n(4),d=n(48),l=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.app=e.appInstance,e}return o(n,t),Object.defineProperty(n.prototype,"appInstance",{get:function(){return this.app||(this.app=p.default(this.props.config),this.app&&this.app.hooks&&this.app.hooks.set(p.LifecycleHook.DispatchAction,e.setClientInterfaceHook)),this.app},enumerable:!1,configurable:!0}),n.prototype.render=function(){return c.default.createElement(f.AppBridgeContext.Provider,{value:this.appInstance},this.props.children)},n}(c.default.Component);e.default=l,e.setClientInterfaceHook=function(t){return function(e){return e.clientInterface={name:"@shopify/app-bridge-react",version:d.version},t(e)}}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(20);o(n(7),e),o(n(20),e),e.default=i.createClientApp},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createApp=e.createAppWrapper=e.createClientApp=e.WINDOW_UNDEFINED_MESSAGE=void 0;var a=n(0),u=n(22),s=n(6),c=n(10),p=n(45),f=n(24),d=n(25),l=n(46),h=n(26),y=n(7),A=i(n(47));function _(t,n,r){if(void 0===r&&(r=[]),!t)throw s.fromAction(e.WINDOW_UNDEFINED_MESSAGE,s.AppActionType.WINDOW_UNDEFINED);var o=h.getLocation(),i=n||o&&o.origin;if(!i)throw s.fromAction("local origin cannot be blank",s.AppActionType.MISSING_LOCAL_ORIGIN);var a=c.fromWindow(t,i);return e.createClientApp(a,r)}function P(t){var e=h.getWindow();return e?_(e.top)(t):p.serverAppBridge}e.WINDOW_UNDEFINED_MESSAGE="window is not defined. Running an app outside a browser is not supported",e.createClientApp=function(t,e){void 0===e&&(e=[]);var n=[],i=c.createTransportListener();return t.subscribe((function(t){var e=t.data,r=e.type,o=e.payload;switch(r){case"getState":n.splice(0).forEach((function(t){return t(o)}));break;case"dispatch":if(i.handleMessage(o),i.handleActionDispatch(o))return;var u=a.findMatchInEnum(s.Action,o.type);u&&s.throwError(u,o)}})),function(c){if(!c.host)throw s.fromAction("host must be provided",s.AppActionType.INVALID_CONFIG);if(!c.apiKey)throw s.fromAction("apiKey must be provided",s.AppActionType.INVALID_CONFIG);var p;try{p=function(t){var e;return r(r({},t),{host:atob(null===(e=t.host)||void 0===e?void 0:e.replace(/_/g,"/").replace(/-/g,"+"))})}(c)}catch(t){throw s.fromAction("not a valid host, please use the value provided by Shopify",s.AppActionType.INVALID_CONFIG)}var _=function(t,e){return function(n,r){t.dispatch({payload:r,source:e,type:n})}}(t,p),P=i.createSubscribeHandler(_);function v(t){return _(y.MessageType.Dispatch,t),t}_(y.MessageType.Unsubscribe),function(t,e){var n=e.apiKey,r=e.host,o=e.forceRedirect,i=void 0===o?!f.isDevelopmentClient:o,a=h.getLocation();if(!f.isUnframed&&a&&n&&r&&i&&h.shouldRedirect(t)){var u="https://"+r+"/apps/"+n+a.pathname+(a.search||"");h.redirect(u)}}(t.hostFrame,p);for(var O=new A.default,b={localOrigin:t.localOrigin,hooks:O,dispatch:function(t){return b.hooks?b.hooks.run(y.LifecycleHook.DispatchAction,v,b,t):v(t)},featuresAvailable:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=Array.isArray(n)?o(n):t;return b.getState("features").then((function(t){return r.length?r.reduce((function(e,n){return Object.keys(t).includes(n)&&(e[n]=t[n]),e}),{}):t}))},getState:function(t){return t&&"string"!=typeof t?Promise.resolve(void 0):new Promise((function(t){n.push(t),_(y.MessageType.GetState)})).then((function(e){var n=e;if(t)for(var r=0,o=t.split(".");r<o.length;r++){var i=o[r];if(null==n||"object"!=typeof n||Array.isArray(n)||!Object.keys(n).includes(i))return;n=n[i]}return n}))},subscribe:P,error:function(t,e){var n=[];return a.forEachInEnum(s.Action,(function(r){n.push(P(r,t,e))})),function(){n.forEach((function(t){return t()}))}}},E=0,g=e;E<g.length;E++){(0,g[E])(O,b)}return function(t){t.subscribe(u.Action.APP,l.handleAppPrint),t.dispatch(d.initialize())}(b),b}},e.createAppWrapper=_,e.createApp=P,e.default=P},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SEPARATOR=e.PREFIX=void 0,e.PREFIX="APP",e.SEPARATOR="::"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.app=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.APP="APP::PRINT::APP"}(r=e.Action||(e.Action={})),e.app=function(){return o.actionWrapper({group:i.Group.Print,type:r.APP})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAppMessage=e.isPermitted=e.getPermissionKey=e.isFromApp=e.isAppBridgeAction=void 0;var r=n(7),o=n(21),i=n(0);function a(t){return t.replace(new RegExp("^"+o.PREFIX+o.SEPARATOR+"\\w+"+o.SEPARATOR),"")}e.isAppBridgeAction=function(t){return t instanceof Object&&Object.prototype.hasOwnProperty.call(t,"type")&&t.type.toString().startsWith(o.PREFIX)},e.isFromApp=function(t){return"object"==typeof t&&"object"==typeof t.source&&"string"==typeof t.source.apiKey},e.getPermissionKey=a,e.isPermitted=function(t,e,n){var r=e.group,o=e.type;if(!r||!Object.prototype.hasOwnProperty.call(t,r))return!1;var i=t[r];if(!i)return!1;var u=a(o);return!!i[u]&&!0===i[u][n]},e.isAppMessage=function(t){if("object"!=typeof t||!t.data||"object"!=typeof t.data)return!1;var e=t.data;return Object.prototype.hasOwnProperty.call(e,"type")&&void 0!==i.findMatchInEnum(r.MessageType,e.type)}},function(t,e,n){"use strict";(function(t){var n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.isUnframed=e.isDevelopmentClient=e.isProduction=e.isDevelopment=e.isClient=e.isServer=void 0,e.isServer="undefined"==typeof window,e.isClient=!e.isServer,e.isDevelopment=void 0!==t&&t.env&&!1,e.isProduction=!e.isDevelopment,e.isDevelopmentClient=e.isDevelopment&&e.isClient,e.isUnframed=e.isClient&&(null===(r=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===r?void 0:r.indexOf("Unframed"))>0}).call(this,n(44))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=e.Action=void 0;var r,o=n(1),i=n(0);!function(t){t.INITIALIZE="APP::CLIENT::INITIALIZE"}(r=e.Action||(e.Action={})),e.initialize=function(){return i.actionWrapper({group:o.Group.Client,type:r.INITIALIZE})}},function(t,e,n){"use strict";function r(){return o()?window.location:void 0}function o(){return"undefined"!=typeof window}Object.defineProperty(e,"__esModule",{value:!0}),e.getWindow=e.getLocation=e.redirect=e.shouldRedirect=void 0,e.shouldRedirect=function(t){return t===window},e.redirect=function(t){var e=r();e&&e.assign(t)},e.getLocation=r,e.getWindow=function(){return o()?window:void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0,function(t){t.UPDATE="APP::FEATURES::UPDATE",t.REQUEST="APP::FEATURES::REQUEST",t.REQUEST_UPDATE="APP::FEATURES::REQUEST::UPDATE"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ModalIframe=e.ModalMessage=e.Modal=e.isMessageModal=e.isIframeModal=e.data=e.update=e.clickFooterButton=e.updateModalSize=e.closeModal=e.openModal=e.Size=e.Action=void 0;var a,u,s=n(9),c=n(0),p=n(2),f=n(1),d=n(8);!function(t){t.OPEN="APP::MODAL::OPEN",t.CLOSE="APP::MODAL::CLOSE",t.UPDATE="APP::MODAL::UPDATE",t.UPDATE_CONTENT="APP::MODAL::CONTENT::UPDATE",t.FOOTER_BUTTON_CLICK="APP::MODAL::FOOTER::BUTTON::CLICK",t.FOOTER_BUTTON_UPDATE="APP::MODAL::FOOTER::BUTTON::UPDATE",t.UPDATE_SIZE="APP::MODAL::UPDATE_SIZE",t.DATA="APP::MODAL::DATA"}(a=e.Action||(e.Action={})),function(t){t.Small="small",t.Medium="medium",t.Large="large",t.Full="full",t.Auto="auto"}(u=e.Size||(e.Size={}));var l={group:f.Group.Modal,subgroups:["Footer"],type:f.ComponentType.Button};function h(t){return c.actionWrapper({group:f.Group.Modal,payload:t,type:a.OPEN})}function y(t){return c.actionWrapper({group:f.Group.Modal,payload:t,type:a.CLOSE})}function A(t){return c.actionWrapper({payload:t,group:f.Group.Modal,type:a.UPDATE})}function _(t){return c.actionWrapper({payload:t,group:f.Group.Modal,type:a.DATA})}function P(t){return"string"==typeof t.url||"string"==typeof t.path}e.openModal=h,e.closeModal=y,e.updateModalSize=function(t){return c.actionWrapper({group:f.Group.Modal,payload:t,type:a.UPDATE_SIZE})},e.clickFooterButton=function(t,e){var n=i({id:t},l);return d.clickButton(f.Group.Modal,n,e)},e.update=A,e.data=_,e.isIframeModal=P,e.isMessageModal=function(t){return"string"==typeof t.message};var v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=u.Small,e}return o(e,t),Object.defineProperty(e.prototype,"footer",{get:function(){if(this.footerPrimary||this.footerSecondary)return{buttons:{primary:this.footerPrimary,secondary:this.footerSecondary}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"footerOptions",{get:function(){if(this.footerPrimaryOptions||this.footerSecondaryOptions)return{buttons:{primary:this.footerPrimaryOptions,secondary:this.footerSecondaryOptions}}},enumerable:!1,configurable:!0}),e.prototype.close=function(){this.app.dispatch(y({id:this.id}))},e.prototype.setFooterPrimaryButton=function(t,e){var n=this,r=l.subgroups;this.footerPrimaryOptions=this.getChildButton(t,this.footerPrimaryOptions),this.footerPrimary=this.footerPrimaryOptions?s.getSingleButton(this,this.footerPrimaryOptions,r,(function(t){n.updatePrimaryFooterButton(t,e)})):void 0},e.prototype.setFooterSecondaryButtons=function(t,e){var n=this,r=l.subgroups,o=t||[],i=this.footerOptions&&this.footerOptions.buttons.secondary||[];this.footerSecondaryOptions=this.getUpdatedChildActions(o,i),this.footerSecondary=this.footerSecondaryOptions?this.footerSecondaryOptions.map((function(t){return s.getSingleButton(n,t,r,(function(t){n.updateSecondaryFooterButton(t,e)}))})):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e.prototype.updatePrimaryFooterButton=function(t,e){this.footer&&this.footer.buttons.primary&&c.updateActionFromPayload(this.footer.buttons.primary,t)&&e()},e.prototype.updateSecondaryFooterButton=function(t,e){if(this.footer&&this.footer.buttons&&this.footer.buttons.secondary){for(var n,r=0,o=this.footer.buttons.secondary;r<o.length;r++){var i=o[r];if(n=c.updateActionFromPayload(i,t))break}n&&e()}},e}(p.ActionSetWithChildren);e.Modal=v;var O=function(t){function e(e,n){var r=t.call(this,e,f.Group.Modal,f.Group.Modal)||this;return r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,message:this.message,size:this.size,title:this.title}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var r=c.getMergedProps(this.options,t),o=r.title,i=r.footer,u=r.message,s=r.size;return this.title=o,this.message=u,this.size=s,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(a.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(a.UPDATE)})),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.OPEN:this.app.dispatch(h(this.payload));break;case a.CLOSE:this.close();break;case a.UPDATE:this.app.dispatch(A(this.payload))}return this},e}(v);e.ModalMessage=O;var b=function(t){function e(e,n){var r=t.call(this,e,f.Group.Modal,f.Group.Modal)||this;return r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,path:this.path,size:this.size,title:this.title,url:this.url,loading:this.loading}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var r=c.getMergedProps(this.options,t),o=r.title,i=r.footer,u=r.path,s=r.url,p=r.size,f=r.loading;return this.title=o,this.url=s,this.path=u,this.size=p,this.loading=f,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(a.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(a.UPDATE)})),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case a.OPEN:this.app.dispatch(h(this.payload));break;case a.CLOSE:this.close();break;case a.UPDATE:this.app.dispatch(A(this.payload));break;case a.DATA:this.app.dispatch(_(e||{}))}return this},e}(v);e.ModalIframe=b,e.create=function(t,e){return P(e)?new b(t,e):new O(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Redirect=e.isRemotePayload=e.isAdminSectionPayload=e.isAdminPathPayload=e.isAppPayload=e.toDestination=e.toApp=e.toRemote=e.toAdminSection=e.toAdminPath=e.isProductVariantCreateResourcePayload=e.isProductVariantResourcePayload=e.isCreateResourcePayload=e.isResourcePayload=e.ResourceType=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return!0===t.create}function f(t){var e=t;return void 0!==e.id&&void 0!==e.variant}function d(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.ADMIN_PATH})}function l(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.ADMIN_SECTION})}function h(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.REMOTE})}function y(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.APP})}function A(t,e,n){switch(t){case a.APP:var r=_(e)?e:{path:e};return y(i({id:n},r));case a.ADMIN_PATH:var o=P(e)?e:{path:e};return d(i({id:n},o));case a.ADMIN_SECTION:var u=v(e)?e:{section:e};return l(i({id:n},u));case a.REMOTE:var s=O(e)?e:{url:e};return h(i({id:n},s))}}function _(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"path")}function P(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"path")}function v(t){return"object"==typeof t&&"object"==typeof t.section&&Object.prototype.hasOwnProperty.call(t.section,"name")}function O(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"url")}!function(t){t.ADMIN_SECTION="APP::NAVIGATION::REDIRECT::ADMIN::SECTION",t.ADMIN_PATH="APP::NAVIGATION::REDIRECT::ADMIN::PATH",t.REMOTE="APP::NAVIGATION::REDIRECT::REMOTE",t.APP="APP::NAVIGATION::REDIRECT::APP"}(a=e.Action||(e.Action={})),function(t){t.Product="products",t.Collection="collections",t.Order="orders",t.Customer="customers",t.Discount="discounts"}(e.ResourceType||(e.ResourceType={})),e.isResourcePayload=function(t){return"string"==typeof t.id},e.isCreateResourcePayload=p,e.isProductVariantResourcePayload=f,e.isProductVariantCreateResourcePayload=function(t){return!!f(t)&&p(t.variant)},e.toAdminPath=d,e.toAdminSection=l,e.toRemote=h,e.toApp=y,e.toDestination=A,e.isAppPayload=_,e.isAdminPathPayload=P,e.isAdminSectionPayload=v,e.isRemotePayload=O;var b=function(t){function e(e){return t.call(this,e,"Redirect",c.Group.Navigation)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=A(t,e,this.payload.id);return this.app.dispatch(n),this},e}(s.ActionSet);e.Redirect=b,e.create=function(t){return new b(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_TOAST_DURATION=void 0;var a=i(n(3)),u=n(5),s=n(4);e.DEFAULT_TOAST_DURATION=5e3;var c=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.componentDidMount=function(){var t=this.context,n=this.props,r=n.error,o=n.content,i=n.duration,a=void 0===i?e.DEFAULT_TOAST_DURATION:i,s=n.onDismiss;this.toast=u.Toast.create(t,{message:o,duration:a,isError:r}),this.toast.subscribe(u.Toast.Action.CLEAR,s),this.toast.dispatch(u.Toast.Action.SHOW)},n.prototype.componentWillUnmount=function(){this.toast.unsubscribe()},n.prototype.render=function(){return null},n.contextType=s.AppBridgeContext,n}(a.default.PureComponent);e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(5),s=n(32),c=n(4),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.titleBar=u.TitleBar.create(t,this.transformProps())},e.prototype.componentDidUpdate=function(){this.titleBar.unsubscribe(),this.titleBar.set(this.transformProps())},e.prototype.componentWillUnmount=function(){this.titleBar.unsubscribe()},e.prototype.render=function(){return null},e.prototype.transformProps=function(){var t=this.context,e=this.props,n=e.title,r=e.primaryAction,o=e.secondaryActions,i=e.actionGroups;return{title:n,buttons:s.transformActions(t,{primaryAction:r,secondaryActions:o,actionGroups:i}),breadcrumbs:this.transformBreadcrumbs()}},e.prototype.transformBreadcrumbs=function(){var t=this.context,e=this.props.breadcrumbs;if(null!=e&&0!==e.length){var n=e[e.length-1],r=n.url,o=n.onAction,i=n.target,a=n.content,c=u.Button.create(t,{label:a||""}),p=s.generateRedirect(t,r,i);return null!=p&&c.subscribe(u.Button.Action.CLICK,p),null!=o&&c.subscribe(u.Button.Action.CLICK,o),c}},e.contextType=c.AppBridgeContext,e}(a.default.PureComponent);e.default=p},function(t,e,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.transformActions=e.generateRedirect=void 0;var o=n(5);function i(t,e,n,r){if(void 0===n&&(n="APP"),null!=e){var i=o.Redirect.create(t),a=!0===r?{url:e,newContext:!0}:e;return function(){i.dispatch(function(t,e){if(!0===e)return o.Redirect.Action.REMOTE;return o.Redirect.Action[t]}(n,r),a)}}}function a(t,e){var n=!0===e.destructive?o.Button.Style.Danger:void 0,r=o.Button.create(t,{label:e.content||"",disabled:e.disabled,loading:e.loading,plain:e.plain,style:n});e.onAction&&r.subscribe(o.Button.Action.CLICK,e.onAction);var a=i(t,e.url,e.target,e.external);return null!=a&&r.subscribe(o.Button.Action.CLICK,a),r}e.generateRedirect=i,e.transformActions=function(t,e){var n=e.primaryAction,i=e.secondaryActions,u=e.actionGroups;return{primary:function(t,e){if(null==e)return;return a(t,e)}(t,n),secondary:r(function(t,e){void 0===e&&(e=[]);return r(e.map((function(e){return a(t,e)})))}(t,i),function(t,e){void 0===e&&(e=[]);return r(e.map((function(e){var n=e.actions.map((function(e){return a(t,e)}));return o.ButtonGroup.create(t,{label:e.title,plain:e.plain,buttons:n})})))}(t,u))}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=a(n(3)),s=n(5),c=n(32),p=n(4),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.focusReturnPoint=null,e}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.open,n=t.onClose,r=this.context;this.modal=s.Modal.create(r,this.transformProps()),null!=n&&this.modal.subscribe(s.Modal.Action.CLOSE,n),e&&(this.focusReturnPoint=document.activeElement,this.modal.dispatch(s.Modal.Action.OPEN))},e.prototype.componentDidUpdate=function(t){var e,n=this.props,r=n.open,o=n.onClose,i=t.open,a=this.transformProps(i);this.modal.unsubscribe(),"string"==typeof(e=a).url||e.path,this.modal.set(a,r),null!=o&&this.modal.subscribe(s.Modal.Action.CLOSE,o),i!==r&&(r?this.modal.dispatch(s.Modal.Action.OPEN):this.modal.dispatch(s.Modal.Action.CLOSE)),!i&&r?this.focusReturnPoint=document.activeElement:i&&!r&&null!=this.focusReturnPoint&&document.contains(this.focusReturnPoint)&&(this.focusReturnPoint.focus(),this.focusReturnPoint=null)},e.prototype.componentWillUnmount=function(){this.modal.unsubscribe(),this.props.open&&this.modal.dispatch(s.Modal.Action.CLOSE)},e.prototype.render=function(){return null},e.prototype.transformProps=function(t){var e=this.props,n=e.title,r=e.size,o=e.message,a=e.src,u=e.primaryAction,p=e.secondaryActions,f=e.loading,d=this.context,l=null==r?void 0:s.Modal.Size[r],h={};return null!=a&&(a.match("^https?://")?h.url=a:h.path=a),i(i({title:n,message:o,size:l},h),{footer:{buttons:c.transformActions(d,{primaryAction:u,secondaryActions:p})},loading:t?void 0:f})},e.contextType=p.AppBridgeContext,e}(u.default.PureComponent);e.default=f},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=a(n(3)),s=n(5),c=n(4),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.focusReturnPoint=null,e}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.open,n=t.resourceType,r=t.onSelection,o=t.onCancel,i=this.context;this.picker=s.ResourcePicker.create(i,{resourceType:s.ResourcePicker.ResourceType[n],options:this.getActionOptions()}),null!=r&&this.picker.subscribe(s.ResourcePicker.Action.SELECT,r),null!=o&&this.picker.subscribe(s.ResourcePicker.Action.CANCEL,o),e&&(this.focusReturnPoint=document.activeElement,this.picker.dispatch(s.ResourcePicker.Action.OPEN))},e.prototype.componentDidUpdate=function(t){var e=t.open,n=this.props,r=n.open,o=n.onCancel,i=n.onSelection;this.picker.unsubscribe(),this.picker.set(this.getActionOptions()),null!=i&&this.picker.subscribe(s.ResourcePicker.Action.SELECT,i),null!=o&&this.picker.subscribe(s.ResourcePicker.Action.CANCEL,o),e!==r&&(r?this.picker.dispatch(s.ResourcePicker.Action.OPEN):this.picker.dispatch(s.ResourcePicker.Action.CLOSE)),!e&&r?this.focusReturnPoint=document.activeElement:e&&!r&&null!=this.focusReturnPoint&&document.contains(this.focusReturnPoint)&&(this.focusReturnPoint.focus(),this.focusReturnPoint=null)},e.prototype.componentWillUnmount=function(){this.picker.unsubscribe()},e.prototype.render=function(){return null},e.prototype.getActionOptions=function(){var t=this.props,e=t.initialQuery,n=t.initialSelectionIds,r=t.showHidden,o=t.allowMultiple,a=t.selectMultiple,u={initialQuery:e,initialSelectionIds:n,showHidden:r,selectMultiple:null!=a?a:o,actionVerb:t.actionVerb},s=u;if("Product"===this.props.resourceType){var c=this.props,p={showVariants:c.showVariants,showDraft:c.showDraft,showArchived:c.showArchived,showDraftBadge:c.showDraftBadge,showArchivedBadge:c.showArchivedBadge};s=i(i({},u),p)}return s},e.contextType=c.AppBridgeContext,e.ActionVerb=s.ResourcePicker.ActionVerb,e}(u.default.PureComponent);e.default=p},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(36),e);var i=n(4);Object.defineProperty(e,"Context",{enumerable:!0,get:function(){return i.AppBridgeContext}});var a=n(16);Object.defineProperty(e,"useAppBridge",{enumerable:!0,get:function(){return a.useAppBridge}})},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(37);Object.defineProperty(e,"Provider",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"ProviderProps",{enumerable:!0,get:function(){return i.Props}});var a=n(49);Object.defineProperty(e,"Loading",{enumerable:!0,get:function(){return a.default}});var u=n(76);Object.defineProperty(e,"Toast",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"ToastProps",{enumerable:!0,get:function(){return u.Props}});var s=n(77);Object.defineProperty(e,"TitleBar",{enumerable:!0,get:function(){return s.default}});var c=n(78);Object.defineProperty(e,"Modal",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"ModalProps",{enumerable:!0,get:function(){return c.Props}}),Object.defineProperty(e,"ModalContent",{enumerable:!0,get:function(){return c.ModalContent}});var p=n(81);Object.defineProperty(e,"ResourcePicker",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"ResourcePickerProps",{enumerable:!0,get:function(){return p.Props}}),o(n(82),e),o(n(86),e)},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(18)),i=n(18);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("app-bridge-react",[],e):"object"==typeof exports?exports["app-bridge-react"]=e():t["app-bridge-react"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=35)}([function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NonSnakeCaseGroup=e.findMatchInEnum=e.forEachInEnum=e.getMergedProps=e.updateActionFromPayload=e.isValidOptionalString=e.isValidOptionalNumber=e.getEventNameSpace=e.getVersion=e.actionWrapper=void 0;var i=n(18),a=o(n(42)),u=n(1),s=n(43);function c(){return s.version}function p(t,e){var n=a.default(t,e);return n||Object.assign(t,e)}e.actionWrapper=function(t){return r(r({},t),{version:c(),clientInterface:{name:s.name,version:c()}})},e.getVersion=c,e.getEventNameSpace=function(t,n,r){if(n.startsWith(""+i.PREFIX+i.SEPARATOR))return n;var o=function(t){if(e.NonSnakeCaseGroup.includes(t))return t.toUpperCase();return(n=t,n.replace(/([A-Z])/g,(function(t,e,n){return(0===n?"":"_")+t[0].toLowerCase()}))).toUpperCase();var n}(t);if(r){var a=r.subgroups,u=r.type;a&&a.length>0&&(o+=o.length>0?i.SEPARATOR:"",a.forEach((function(t,e){o+=""+t.toUpperCase()+(e<a.length-1?i.SEPARATOR:"")}))),u!==t&&u&&(o+=""+(o.length>0?i.SEPARATOR:"")+u.toUpperCase())}return o&&(o+=""+(o.length>0?i.SEPARATOR:"")+n.toUpperCase()),""+i.PREFIX+i.SEPARATOR+o},e.isValidOptionalNumber=function(t){return null==t||"number"==typeof t},e.isValidOptionalString=function(t){return null==t||"string"==typeof t},e.updateActionFromPayload=function(t,e){return t.id===e.id&&(Object.assign(t,p(t,e)),!0)},e.getMergedProps=p,e.forEachInEnum=function(t,e){Object.keys(t).forEach((function(n){e(t[n])}))},e.findMatchInEnum=function(t,e){var n=Object.keys(t).find((function(n){return e===t[n]}));return n?t[n]:void 0},e.NonSnakeCaseGroup=[u.Group.AuthCode,u.Group.Button,u.Group.ButtonGroup,u.Group.Cart,u.Group.Error,u.Group.Features,u.Group.Fullscreen,u.Group.Link,u.Group.Loading,u.Group.Menu,u.Group.Modal,u.Group.Navigation,u.Group.Pos,u.Group.Print,u.Group.ResourcePicker,u.Group.Scanner,u.Group.SessionToken,u.Group.Share,u.Group.TitleBar,u.Group.Toast]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentType=e.Group=void 0,function(t){t.AuthCode="AuthCode",t.Button="Button",t.ButtonGroup="ButtonGroup",t.Cart="Cart",t.Client="Client",t.ContextualSaveBar="ContextualSaveBar",t.Error="Error",t.Features="Features",t.FeedbackModal="FeedbackModal",t.Fullscreen="Fullscreen",t.LeaveConfirmation="LeaveConfirmation",t.Link="Link",t.Loading="Loading",t.Menu="Menu",t.Modal="Modal",t.Navigation="Navigation",t.Performance="Performance",t.Pos="Pos",t.Print="Print",t.ResourcePicker="Resource_Picker",t.Scanner="Scanner",t.SessionToken="SessionToken",t.Share="Share",t.TitleBar="TitleBar",t.Toast="Toast",t.MarketingExternalActivityTopBar="MarketingExternalActivityTopBar"}(e.Group||(e.Group={})),function(t){t.Button="Button",t.ButtonGroup="ButtonGroup"}(e.ComponentType||(e.ComponentType={}))},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ActionSetWithChildren=e.ActionSet=void 0;var s=n(7),c=n(11),p=n(8),f=n(1),d=u(n(44)),l=n(0),h=function(){function t(t,e,n,r){var o=this;this.app=t,this.type=e,this.group=n,this.subgroups=[],this.subscriptions=[],t||p.throwError(p.Action.INVALID_ACTION,"Missing required `app`"),this.id=r||d.default(),this.defaultGroup=n;var i=this.set;this.set=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.app.hooks?(t=o.app.hooks).run.apply(t,a([s.LifecycleHook.UpdateAction,i,o],e)):i.apply(o,e)}}return t.prototype.set=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},Object.defineProperty(t.prototype,"component",{get:function(){return{id:this.id,subgroups:this.subgroups,type:this.type}},enumerable:!1,configurable:!0}),t.prototype.updateSubscription=function(t,e,n){var r,o=t.eventType,i=t.callback,a=t.component;return(r=this.subscriptions.findIndex((function(e){return e===t})))>=0?this.subscriptions[r].unsubscribe():r=void 0,this.group=e,this.subgroups=n,Object.assign(a,{subgroups:this.subgroups}),this.subscribe(o,i,a,r)},t.prototype.error=function(t){var e=this,n=[];return l.forEachInEnum(p.Action,(function(r){n.push(e.subscriptions.length),e.subscribe(r,t)})),function(){n.map((function(t){return e.subscriptions[t]})).forEach((function(t){c.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))}},t.prototype.subscribe=function(t,e,n,r){var o,a=this,u=n||this.component,s=t.toUpperCase(),c="number"==typeof r?e:e.bind(this);o=p.isErrorEventName(t)?l.getEventNameSpace(f.Group.Error,t,i(i({},u),{type:""})):l.getEventNameSpace(this.group,t,u);var d=this.app.subscribe(o,c,n?n.id:this.id),h={eventType:s,unsubscribe:d,callback:c,component:u,updateSubscribe:function(t,e){return a.updateSubscription(h,t,e)}};return"number"==typeof r&&r>=0&&r<this.subscriptions.length?this.subscriptions[r]=h:this.subscriptions.push(h),d},t.prototype.unsubscribe=function(t){return void 0===t&&(t=!1),A(this.subscriptions,this.defaultGroup,t),this},t}();e.ActionSet=h;var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.children=[],e}return o(e,t),e.prototype.unsubscribe=function(t,n){return void 0===t&&(t=!0),void 0===n&&(n=!1),A(this.subscriptions,this.defaultGroup,n),this.children.forEach((function(n){n instanceof e?n.unsubscribe(t,!t):n.unsubscribe(!t)})),this},e.prototype.getChild=function(t){var e=this.children.findIndex((function(e){return e.id===t}));return e>=0?this.children[e]:void 0},e.prototype.getChildIndex=function(t){return this.children.findIndex((function(e){return e.id===t}))},e.prototype.getChildSubscriptions=function(t,e){return this.subscriptions.filter((function(n){return n.component.id===t&&(!e||e===n.eventType)}))},e.prototype.addChild=function(t,n,r){var o=this,i=t.subscriptions;return this.getChild(t.id)||this.children.push(t),!i||n===t.group&&r===t.subgroups||(i.forEach((function(t){(0,t.updateSubscribe)(n,r)})),Object.assign(t,{group:n,subgroups:r}),t instanceof e&&t.children.forEach((function(t){return o.addChild(t,n,r)}))),this},e.prototype.removeChild=function(t){var e=this;return c.removeFromCollection(this.children,this.getChild(t),(function(){e.subscriptions.filter((function(e){return e.component.id===t})).forEach((function(t){c.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))})),this},e.prototype.subscribeToChild=function(t,e,n){var r=this,o=n.bind(this);if(e instanceof Array)return e.forEach((function(e){return r.subscribeToChild(t,e,n)})),this;if("string"!=typeof e)return this;var i=e.toUpperCase(),a=this.getChildSubscriptions(t.id,i);if(a.length>0)a.forEach((function(e){return e.updateSubscribe(r.group,t.subgroups)}));else{var u={id:t.id,subgroups:t.subgroups,type:t.type};this.subscribe(i,o,u)}return this},e.prototype.getUpdatedChildActions=function(t,e){if(0!==t.length){for(var n=t.filter((function(t,e,n){return e===n.indexOf(t)})),r=n.map((function(t){return t.id})),o=e.filter((function(t){return r.indexOf(t.id)<0}));o.length>0;){if(!(i=o.pop()))break;this.removeChild(i.id)}return n}for(;e.length>0;){var i;if(!(i=e.pop()))break;this.removeChild(i.id)}},e}(h);function A(t,e,n){void 0===n&&(n=!1),t.forEach((function(t){n?(0,t.updateSubscribe)(e,[]):(0,t.unsubscribe)()})),n||(t.length=0)}e.ActionSetWithChildren=y},function(t,e,n){"use strict";t.exports=n(39)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppBridgeContext=void 0;var r=n(3);e.AppBridgeContext=r.createContext(null)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},a=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.Performance=e.Pos=e.AppLink=e.ChannelMenu=e.NavigationMenu=e.Share=e.ContextualSaveBar=e.MarketingExternalActivityTopBar=e.TitleBar=e.SessionToken=e.ResourcePicker=e.Redirect=e.Print=e.ModalContent=e.Modal=e.Loading=e.LeaveConfirmation=e.History=e.Toast=e.Fullscreen=e.FeedbackModal=e.Features=e.Flash=e.Error=e.Client=e.Cart=e.Scanner=e.ButtonGroup=e.Button=e.AuthCode=void 0;var u=i(n(41));e.AuthCode=u;var s=i(n(6));e.Button=s;var c=i(n(12));e.ButtonGroup=c;var p=i(n(45));e.Cart=p;var f=i(n(19));e.Client=f;var d=i(n(8));e.Error=d;var l=i(n(46));e.Flash=l;var h=i(n(48));e.Features=h;var y=i(n(50));e.FeedbackModal=y;var A=i(n(51));e.Fullscreen=A;var _=i(n(52));e.LeaveConfirmation=_;var P=i(n(53));e.Loading=P;var v=i(n(21));e.Modal=v;var O=i(n(54));e.ModalContent=O;var b=i(n(55));e.History=b;var E=i(n(22));e.Redirect=E;var g=i(n(23));e.Print=g;var m=i(n(56));e.ResourcePicker=m;var T=i(n(57));e.Scanner=T;var S=i(n(58));e.SessionToken=S;var C=i(n(59));e.TitleBar=C;var R=i(n(13));e.Toast=R;var I=i(n(61));e.ContextualSaveBar=I;var M=i(n(62));e.Share=M;var D=i(n(63));e.NavigationMenu=D;var N=i(n(64));e.ChannelMenu=N;var j=i(n(14));e.AppLink=j;var w=i(n(65));e.Pos=w;var U=i(n(66));e.MarketingExternalActivityTopBar=U;var L=i(n(67));e.Performance=L;var B=n(24);Object.defineProperty(e,"isAppBridgeAction",{enumerable:!0,get:function(){return B.isAppBridgeAction}}),a(n(1),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Button=e.isValidButtonProps=e.update=e.clickButton=e.Style=e.Icon=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t,e,n){var r=e.id,o=u.getEventNameSpace(t,a.CLICK,e),i={id:r,payload:n};return u.actionWrapper({type:o,group:t,payload:i})}function f(t,e,n){var r=e.id,o=n.label,s=u.getEventNameSpace(t,a.UPDATE,e),c=i(i({},n),{id:r,label:o});return u.actionWrapper({type:s,group:t,payload:c})}!function(t){t.CLICK="CLICK",t.UPDATE="UPDATE"}(a=e.Action||(e.Action={})),function(t){t.Print="print"}(e.Icon||(e.Icon={})),function(t){t.Danger="danger"}(e.Style||(e.Style={})),e.clickButton=p,e.update=f,e.isValidButtonProps=function(t){return"string"==typeof t.id&&"string"==typeof t.label};var d=function(t){function e(e,n){var r=t.call(this,e,c.ComponentType.Button,c.Group.Button)||this;return r.disabled=!1,r.loading=!1,r.plain=!1,r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{disabled:this.disabled,icon:this.icon,label:this.label,style:this.style,loading:this.loading,plain:this.plain}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=u.getMergedProps(this.options,t),r=n.label,o=n.disabled,i=n.icon,s=n.style,c=n.loading,p=n.plain;return this.label=r,this.disabled=Boolean(o),this.icon=i,this.style=s,this.loading=Boolean(c),this.plain=Boolean(p),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case a.CLICK:this.app.dispatch(p(this.group,this.component,e));break;case a.UPDATE:var n=f(this.group,this.component,this.payload);this.app.dispatch(n)}return this},e}(s.ActionSet);e.Button=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LifecycleHook=e.MessageType=e.PermissionType=e.isV1Config=void 0,e.isV1Config=function(t){return void 0!==t.shopOrigin},function(t){t.Dispatch="Dispatch",t.Subscribe="Subscribe"}(e.PermissionType||(e.PermissionType={})),function(t){t.GetState="getState",t.Dispatch="dispatch",t.Subscribe="subscribe",t.Unsubscribe="unsubscribe"}(e.MessageType||(e.MessageType={})),function(t){t.UpdateAction="UpdateAction",t.DispatchAction="DispatchAction"}(e.LifecycleHook||(e.LifecycleHook={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=e.fromAction=e.AppBridgeError=e.invalidOriginAction=e.isErrorEventName=e.permissionAction=e.networkAction=e.persistenceAction=e.unsupportedOperationAction=e.unexpectedAction=e.invalidAction=e.invalidActionType=e.invalidPayload=e.Message=e.AppActionType=e.Action=void 0;var r,o=n(0),i=n(1);function a(t,e,n){var r=e.payload;return o.actionWrapper({type:t,group:i.Group.Error,payload:{action:e,message:n,type:t,id:r&&r.id?r.id:void 0}})}!function(t){t.INVALID_ACTION="APP::ERROR::INVALID_ACTION",t.INVALID_ACTION_TYPE="APP::ERROR::INVALID_ACTION_TYPE",t.INVALID_PAYLOAD="APP::ERROR::INVALID_PAYLOAD",t.INVALID_OPTIONS="APP::ERROR::INVALID_OPTIONS",t.UNEXPECTED_ACTION="APP::ERROR::UNEXPECTED_ACTION",t.PERSISTENCE="APP::ERROR::PERSISTENCE",t.UNSUPPORTED_OPERATION="APP::ERROR::UNSUPPORTED_OPERATION",t.NETWORK="APP::ERROR::NETWORK",t.PERMISSION="APP::ERROR::PERMISSION",t.FAILED_AUTHENTICATION="APP::ERROR::FAILED_AUTHENTICATION",t.INVALID_ORIGIN="APP::ERROR::INVALID_ORIGIN"}(r=e.Action||(e.Action={})),function(t){t.INVALID_CONFIG="APP::ERROR::INVALID_CONFIG",t.MISSING_CONFIG="APP::APP_ERROR::MISSING_CONFIG",t.MISSING_APP_BRIDGE_MIDDLEWARE="APP::APP_ERROR::MISSING_APP_BRIDGE_MIDDLEWARE",t.WINDOW_UNDEFINED="APP::APP_ERROR::WINDOW_UNDEFINED",t.REDUX_REINSTANTIATED="APP::APP_ERROR::REDUX_REINSTANTIATED",t.MISSING_LOCAL_ORIGIN="APP::APP_ERROR::MISSING_LOCAL_ORIGIN",t.MISSING_HOST_PROVIDER="APP::APP_ERROR::MISSING_HOST_PROVIDER",t.MISSING_ROUTER_CONTEXT="APP::APP_ERROR::MISSING_ROUTER_CONTEXT",t.MISSING_HISTORY_BLOCK="APP::APP_ERROR::MISSING_HISTORY_BLOCK"}(e.AppActionType||(e.AppActionType={})),function(t){t.MISSING_PAYLOAD="Missing payload",t.INVALID_PAYLOAD_ID="Id in payload is missing or invalid"}(e.Message||(e.Message={})),e.invalidPayload=function(t,e){return a(r.INVALID_PAYLOAD,t,e||"The action's payload is missing required properties or has invalid properties")},e.invalidActionType=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"The action type is invalid or unsupported",type:r.INVALID_ACTION_TYPE},type:r.INVALID_ACTION_TYPE})},e.invalidAction=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"The action's has missing/invalid values for `group`, `type` or `version`",type:r.INVALID_ACTION},type:r.INVALID_ACTION})},e.unexpectedAction=function(t,e){return o.actionWrapper({group:i.Group.Error,payload:{action:t,message:e||"Action cannot be called at this time",type:r.UNEXPECTED_ACTION},type:r.UNEXPECTED_ACTION})},e.unsupportedOperationAction=function(t,e){return a(r.UNSUPPORTED_OPERATION,t,e||"The action type is unsupported")},e.persistenceAction=function(t,e){return a(r.PERSISTENCE,t,e||"Action cannot be persisted on server")},e.networkAction=function(t,e){return a(r.NETWORK,t,e||"Network error")},e.permissionAction=function(t,e){return a(r.PERMISSION,t,e||"Action is not permitted")},e.isErrorEventName=function(t){return"string"==typeof o.findMatchInEnum(r,t)},e.invalidOriginAction=function(t){return o.actionWrapper({group:i.Group.Error,payload:{message:t,type:r.INVALID_ORIGIN},type:r.INVALID_ORIGIN})};var u=function(t){this.name="AppBridgeError",this.message=t,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(this.message).stack};function s(t,e,n){var r=new u(t?e+": "+t:e);return r.action=n,r.type=e,r}e.AppBridgeError=u,u.prototype=Object.create(Error.prototype),e.fromAction=s,e.throwError=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r,o=t[0];throw"string"==typeof t[1]?n=t[1]:(r=t[1],n=t[2]||""),s(n,o,r)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingleButton=void 0;var r=n(6);e.getSingleButton=function(t,e,n,o){return t.addChild(e,t.group,n),t.subscribeToChild(e,r.Action.UPDATE,o),e.payload}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useAppBridge=void 0;var r=n(3),o=n(4);e.useAppBridge=function(){var t=r.useContext(o.AppBridgeContext);if(!t)throw new Error("No AppBridge context provided. Your component must be wrapped in the <Provider> component from App Bridge React.");return t}},function(t,e,n){"use strict";function r(t,e,n){var r=t.findIndex((function(t){return t===e}));return r>=0&&(t.splice(r,1),n&&n(e),!0)}Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromCollection=e.addAndRemoveFromCollection=void 0,e.addAndRemoveFromCollection=function(t,e,n){return t.push(e),function(){return r(t,e,n)}},e.removeFromCollection=r},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ButtonGroup=e.isGroupedButtonPayload=e.isGroupedButton=e.update=e.Action=void 0;var a,u=n(9),s=n(0),c=n(2),p=n(1);function f(t,e,n){return function(t,e,n,r,o){var a=e.id,u=r.label,c=s.getEventNameSpace(t,n,e),p=i(i({},r),{id:a,label:u,payload:o});return s.actionWrapper({type:c,group:t,payload:p})}(t,e,a.UPDATE,n)}!function(t){t.UPDATE="UPDATE"}(a=e.Action||(e.Action={})),e.update=f,e.isGroupedButton=function(t){var e=t;return e.buttons&&e.buttons.length>0&&void 0!==e.label},e.isGroupedButtonPayload=function(t){var e=t;return Array.isArray(e.buttons)&&"string"==typeof e.id&&"string"==typeof e.label};var d=function(t){function e(e,n){var r=t.call(this,e,p.ComponentType.ButtonGroup,p.Group.ButtonGroup)||this;return r.disabled=!1,r.plain=!1,r.buttonsOptions=[],r.buttons=[],r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{buttons:this.buttonsOptions,disabled:this.disabled,label:this.label,plain:this.plain}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.label,o=n.disabled,i=n.buttons,u=n.plain;return this.label=r,this.disabled=Boolean(o),this.buttons=this.getButtons(i),this.plain=Boolean(u),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:var e=f(this.group,this.component,this.payload);this.app.dispatch(e)}return this},e.prototype.updateButtons=function(t){if(this.buttons&&0!==this.buttons.length){for(var e,n=0,r=this.buttons;n<r.length;n++){var o=r[n];if(e=s.updateActionFromPayload(o,t))break}e&&this.dispatch(a.UPDATE)}},e.prototype.getSingleButton=function(t){return u.getSingleButton(this,t,this.subgroups,this.updateButtons)},e.prototype.getButtons=function(t){var e=this,n=[];return t?(t.forEach((function(t){var r=u.getSingleButton(e,t,e.subgroups,e.updateButtons);n.push(r)})),this.buttonsOptions=t,n):[]},e}(c.ActionSetWithChildren);e.ButtonGroup=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Toast=e.clear=e.show=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return u.actionWrapper({group:c.Group.Toast,payload:t,type:a.SHOW})}function f(t){return u.actionWrapper({payload:t,group:c.Group.Toast,type:a.CLEAR})}!function(t){t.SHOW="APP::TOAST::SHOW",t.CLEAR="APP::TOAST::CLEAR"}(a=e.Action||(e.Action={})),e.show=p,e.clear=f;var d=function(t){function e(e,n){var r=t.call(this,e,c.Group.Toast,c.Group.Toast)||this;return r.message="",r.duration=5e3,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{duration:this.duration,isError:this.isError,message:this.message}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){var e=u.getMergedProps(this.options,t),n=e.message,r=e.duration,o=e.isError;return this.message=n,this.duration=r,this.isError=o,this},e.prototype.dispatch=function(t){switch(t){case a.SHOW:var e=p(this.payload);this.app.dispatch(e);break;case a.CLEAR:this.app.dispatch(f({id:this.id}))}return this},e}(s.ActionSet);e.Toast=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.AppLink=e.update=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1),p=n(22);function f(t,e,n){var r=e.id,o=n.label,s=n.destination,c=i(i({},n),{id:r,label:o,destination:s});return u.actionWrapper({group:t,type:u.getEventNameSpace(t,a.UPDATE,e),payload:c})}!function(t){t.UPDATE="UPDATE"}(a=e.Action||(e.Action={})),e.update=f;var d=function(t){function e(e,n){var r=t.call(this,e,c.Group.Link,c.Group.Link)||this;return r.label="",r.destination="",r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{label:this.label,destination:this.destination,redirectType:p.Action.APP}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){var t=this.options,e=t.label,n=t.destination,r=t.redirectType,o=n;return{id:this.id,label:e,destination:{path:o},redirectType:r}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=u.getMergedProps(this.options,t),r=n.label,o=n.destination;return this.label=r,this.destination=o,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:var e=f(this.group,this.component,this.payload);this.app.dispatch(e)}return this},e}(s.ActionSet);e.AppLink=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTransportListener=e.fromWindow=e.fromFrame=e.Context=void 0;var r=n(8),o=n(24),i=n(7),a=n(11),u=n(28);!function(t){t.Modal="Modal",t.Main="Main"}(e.Context||(e.Context={})),e.fromFrame=function(t,e,n){var i=[],s=t.host,c=t.window;if(!s)throw r.fromAction("App frame is undefined",r.AppActionType.WINDOW_UNDEFINED);return u.isUnframed&&window&&window.MobileWebView&&Object.assign(window.MobileWebView,{postMessageToIframe:function(t,e){null==c||c.postMessage(t,e)}}),s.addEventListener("message",(function(t){if(o.isAppMessage(t))if(t.origin===e)if(u.isUnframed&&window&&window.MobileWebView){s=JSON.stringify({id:"unframed://fromClient",origin:e,data:t.data});window.MobileWebView.postMessage(s)}else for(var n=0,a=i;n<a.length;n++){(0,a[n])(t)}else{var s,p="Message origin '"+t.origin+"' does not match app origin '"+e+"'.",f={type:"dispatch",payload:s=r.invalidOriginAction(p)};null==c||c.postMessage(f,t.origin)}})),{context:n,localOrigin:e,frameWindow:c,hostFrame:s,dispatch:function(t){null==c||c.postMessage(t,e)},subscribe:function(t){return a.addAndRemoveFromCollection(i,t)}}},e.fromWindow=function(t,e){var n=[];return void 0!==typeof window&&window.addEventListener("message",(function(e){if((window!==t||u.isUnframed)&&e.source===t&&(o.isAppBridgeAction(e.data.payload)||o.isAppMessage(e)))for(var r=0,i=n;r<i.length;r++){(0,i[r])(e)}})),{localOrigin:e,hostFrame:t,dispatch:function(n){var r;if(null===(r=n.source)||void 0===r?void 0:r.host)if(u.isUnframed&&window&&window.MobileWebView){var o=JSON.stringify({id:"unframed://fromClient",origin:e,data:n});window.MobileWebView.postMessage(o)}else{var i=new URL("https://"+n.source.host).origin;t.postMessage(n,i)}},subscribe:function(t){return a.addAndRemoveFromCollection(n,t)}}},e.createTransportListener=function(){var t=[],e={};return{createSubscribeHandler:function(n){return function(){if(arguments.length<2)return a.addAndRemoveFromCollection(t,{callback:arguments[0]});var r=Array.from(arguments),o=r[0],u=r[1],s=r[2],c={callback:u,id:s},p={type:o,id:s};return Object.prototype.hasOwnProperty.call(e,o)||(e[o]=[]),n&&n(i.MessageType.Subscribe,p),a.addAndRemoveFromCollection(e[o],c,(function(){n&&n(i.MessageType.Unsubscribe,p)}))}},handleMessage:function(e){t.forEach((function(t){return t.callback(e)}))},handleActionDispatch:function(t){var n=t.type,r=t.payload,o=!1;if(Object.prototype.hasOwnProperty.call(e,n))for(var i=0,a=e[n];i<a.length;i++){var u=a[i],s=u.id,c=u.callback;!(r&&r.id===s)&&s||(c(r),o=!0)}return o}}}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.updateHistory=void 0;var i=n(15),a=n(5),u=n(86),s=["hmac","locale","protocol","session","shop","timestamp","host"];e.updateHistory=function(t,e){return r(this,void 0,void 0,(function(){var n,r,c,p,f,d,l,h,y;return o(this,(function(o){switch(o.label){case 0:return n=u.getSelfWindow(),r=u.getTopWindow(),c=n===r,[4,t.getState("context").then((function(t){return t===i.Context.Main}))];case 1:return p=o.sent(),c||!p?[2]:(f=function(t){var e=u.getOrigin();if("string"==typeof t)return new URL(t,e);var n=t.pathname,r=t.search,o=t.hash;return new URL(""+n+r+o,e)}(e),s.forEach((function(t){return f.searchParams.delete(t)})),d=f.pathname,l=f.search,h=f.hash,y=""+d+l+h,a.History.create(t).dispatch(a.History.Action.REPLACE,y),[2])}}))}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleRouteChange=void 0;var r=n(5);e.handleRouteChange=function(t,e){return t.subscribe(r.Redirect.Action.APP,(function(t){var n=t.path;e.replace(n)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SEPARATOR=e.PREFIX=void 0,e.PREFIX="APP",e.SEPARATOR="::"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=e.Action=void 0;var r,o=n(1),i=n(0);!function(t){t.INITIALIZE="APP::CLIENT::INITIALIZE"}(r=e.Action||(e.Action={})),e.initialize=function(){return i.actionWrapper({group:o.Group.Client,type:r.INITIALIZE})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0,function(t){t.UPDATE="APP::FEATURES::UPDATE",t.REQUEST="APP::FEATURES::REQUEST",t.REQUEST_UPDATE="APP::FEATURES::REQUEST::UPDATE"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ModalIframe=e.ModalMessage=e.Modal=e.isMessageModal=e.isIframeModal=e.data=e.update=e.clickFooterButton=e.updateModalSize=e.closeModal=e.openModal=e.Size=e.Action=void 0;var a,u,s=n(9),c=n(0),p=n(2),f=n(1),d=n(6);!function(t){t.OPEN="APP::MODAL::OPEN",t.CLOSE="APP::MODAL::CLOSE",t.UPDATE="APP::MODAL::UPDATE",t.UPDATE_CONTENT="APP::MODAL::CONTENT::UPDATE",t.FOOTER_BUTTON_CLICK="APP::MODAL::FOOTER::BUTTON::CLICK",t.FOOTER_BUTTON_UPDATE="APP::MODAL::FOOTER::BUTTON::UPDATE",t.UPDATE_SIZE="APP::MODAL::UPDATE_SIZE",t.DATA="APP::MODAL::DATA"}(a=e.Action||(e.Action={})),function(t){t.Small="small",t.Medium="medium",t.Large="large",t.Full="full",t.Auto="auto"}(u=e.Size||(e.Size={}));var l={group:f.Group.Modal,subgroups:["Footer"],type:f.ComponentType.Button};function h(t){return c.actionWrapper({group:f.Group.Modal,payload:t,type:a.OPEN})}function y(t){return c.actionWrapper({group:f.Group.Modal,payload:t,type:a.CLOSE})}function A(t){return c.actionWrapper({payload:t,group:f.Group.Modal,type:a.UPDATE})}function _(t){return c.actionWrapper({payload:t,group:f.Group.Modal,type:a.DATA})}function P(t){return"string"==typeof t.url||"string"==typeof t.path}e.openModal=h,e.closeModal=y,e.updateModalSize=function(t){return c.actionWrapper({group:f.Group.Modal,payload:t,type:a.UPDATE_SIZE})},e.clickFooterButton=function(t,e){var n=i({id:t},l);return d.clickButton(f.Group.Modal,n,e)},e.update=A,e.data=_,e.isIframeModal=P,e.isMessageModal=function(t){return"string"==typeof t.message};var v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=u.Small,e}return o(e,t),Object.defineProperty(e.prototype,"footer",{get:function(){if(this.footerPrimary||this.footerSecondary)return{buttons:{primary:this.footerPrimary,secondary:this.footerSecondary}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"footerOptions",{get:function(){if(this.footerPrimaryOptions||this.footerSecondaryOptions)return{buttons:{primary:this.footerPrimaryOptions,secondary:this.footerSecondaryOptions}}},enumerable:!1,configurable:!0}),e.prototype.close=function(){this.app.dispatch(y({id:this.id}))},e.prototype.setFooterPrimaryButton=function(t,e){var n=this,r=l.subgroups;this.footerPrimaryOptions=this.getChildButton(t,this.footerPrimaryOptions),this.footerPrimary=this.footerPrimaryOptions?s.getSingleButton(this,this.footerPrimaryOptions,r,(function(t){n.updatePrimaryFooterButton(t,e)})):void 0},e.prototype.setFooterSecondaryButtons=function(t,e){var n=this,r=l.subgroups,o=t||[],i=this.footerOptions&&this.footerOptions.buttons.secondary||[];this.footerSecondaryOptions=this.getUpdatedChildActions(o,i),this.footerSecondary=this.footerSecondaryOptions?this.footerSecondaryOptions.map((function(t){return s.getSingleButton(n,t,r,(function(t){n.updateSecondaryFooterButton(t,e)}))})):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e.prototype.updatePrimaryFooterButton=function(t,e){this.footer&&this.footer.buttons.primary&&c.updateActionFromPayload(this.footer.buttons.primary,t)&&e()},e.prototype.updateSecondaryFooterButton=function(t,e){if(this.footer&&this.footer.buttons&&this.footer.buttons.secondary){for(var n,r=0,o=this.footer.buttons.secondary;r<o.length;r++){var i=o[r];if(n=c.updateActionFromPayload(i,t))break}n&&e()}},e}(p.ActionSetWithChildren);e.Modal=v;var O=function(t){function e(e,n){var r=t.call(this,e,f.Group.Modal,f.Group.Modal)||this;return r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,message:this.message,size:this.size,title:this.title}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var r=c.getMergedProps(this.options,t),o=r.title,i=r.footer,u=r.message,s=r.size;return this.title=o,this.message=u,this.size=s,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(a.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(a.UPDATE)})),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.OPEN:this.app.dispatch(h(this.payload));break;case a.CLOSE:this.close();break;case a.UPDATE:this.app.dispatch(A(this.payload))}return this},e}(v);e.ModalMessage=O;var b=function(t){function e(e,n){var r=t.call(this,e,f.Group.Modal,f.Group.Modal)||this;return r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,path:this.path,size:this.size,title:this.title,url:this.url,loading:this.loading}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var r=c.getMergedProps(this.options,t),o=r.title,i=r.footer,u=r.path,s=r.url,p=r.size,f=r.loading;return this.title=o,this.url=s,this.path=u,this.size=p,this.loading=f,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(a.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(a.UPDATE)})),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case a.OPEN:this.app.dispatch(h(this.payload));break;case a.CLOSE:this.close();break;case a.UPDATE:this.app.dispatch(A(this.payload));break;case a.DATA:this.app.dispatch(_(e||{}))}return this},e}(v);e.ModalIframe=b,e.create=function(t,e){return P(e)?new b(t,e):new O(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Redirect=e.isRemotePayload=e.isAdminSectionPayload=e.isAdminPathPayload=e.isAppPayload=e.toDestination=e.toApp=e.toRemote=e.toAdminSection=e.toAdminPath=e.isProductVariantCreateResourcePayload=e.isProductVariantResourcePayload=e.isCreateResourcePayload=e.isResourcePayload=e.ResourceType=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return!0===t.create}function f(t){var e=t;return void 0!==e.id&&void 0!==e.variant}function d(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.ADMIN_PATH})}function l(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.ADMIN_SECTION})}function h(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.REMOTE})}function y(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.APP})}function A(t,e,n){switch(t){case a.APP:var r=_(e)?e:{path:e};return y(i({id:n},r));case a.ADMIN_PATH:var o=P(e)?e:{path:e};return d(i({id:n},o));case a.ADMIN_SECTION:var u=v(e)?e:{section:e};return l(i({id:n},u));case a.REMOTE:var s=O(e)?e:{url:e};return h(i({id:n},s))}}function _(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"path")}function P(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"path")}function v(t){return"object"==typeof t&&"object"==typeof t.section&&Object.prototype.hasOwnProperty.call(t.section,"name")}function O(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"url")}!function(t){t.ADMIN_SECTION="APP::NAVIGATION::REDIRECT::ADMIN::SECTION",t.ADMIN_PATH="APP::NAVIGATION::REDIRECT::ADMIN::PATH",t.REMOTE="APP::NAVIGATION::REDIRECT::REMOTE",t.APP="APP::NAVIGATION::REDIRECT::APP"}(a=e.Action||(e.Action={})),function(t){t.Product="products",t.Collection="collections",t.Order="orders",t.Customer="customers",t.Discount="discounts"}(e.ResourceType||(e.ResourceType={})),e.isResourcePayload=function(t){return"string"==typeof t.id},e.isCreateResourcePayload=p,e.isProductVariantResourcePayload=f,e.isProductVariantCreateResourcePayload=function(t){return!!f(t)&&p(t.variant)},e.toAdminPath=d,e.toAdminSection=l,e.toRemote=h,e.toApp=y,e.toDestination=A,e.isAppPayload=_,e.isAdminPathPayload=P,e.isAdminSectionPayload=v,e.isRemotePayload=O;var b=function(t){function e(e){return t.call(this,e,"Redirect",c.Group.Navigation)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=A(t,e,this.payload.id);return this.app.dispatch(n),this},e}(s.ActionSet);e.Redirect=b,e.create=function(t){return new b(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.app=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.APP="APP::PRINT::APP"}(r=e.Action||(e.Action={})),e.app=function(){return o.actionWrapper({group:i.Group.Print,type:r.APP})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAppMessage=e.isPermitted=e.getPermissionKey=e.isFromApp=e.isAppBridgeAction=void 0;var r=n(7),o=n(18),i=n(0);function a(t){return t.replace(new RegExp("^"+o.PREFIX+o.SEPARATOR+"\\w+"+o.SEPARATOR),"")}e.isAppBridgeAction=function(t){return t instanceof Object&&Object.prototype.hasOwnProperty.call(t,"type")&&t.type.toString().startsWith(o.PREFIX)},e.isFromApp=function(t){return"object"==typeof t&&"object"==typeof t.source&&"string"==typeof t.source.apiKey},e.getPermissionKey=a,e.isPermitted=function(t,e,n){var r=e.group,o=e.type;if(!r||!Object.prototype.hasOwnProperty.call(t,r))return!1;var i=t[r];if(!i)return!1;var u=a(o);return!!i[u]&&!0===i[u][n]},e.isAppMessage=function(t){if("object"!=typeof t||!t.data||"object"!=typeof t.data)return!1;var e=t.data;return Object.prototype.hasOwnProperty.call(e,"type")&&void 0!==i.findMatchInEnum(r.MessageType,e.type)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.setClientInterfaceHook=void 0;var c=s(n(3)),p=u(n(69)),f=n(4),d=n(75),l=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.app=e.appInstance,e}return o(n,t),Object.defineProperty(n.prototype,"appInstance",{get:function(){return this.app||(this.app=p.default(this.props.config),this.app&&this.app.hooks&&this.app.hooks.set(p.LifecycleHook.DispatchAction,e.setClientInterfaceHook)),this.app},enumerable:!1,configurable:!0}),n.prototype.render=function(){return c.default.createElement(f.AppBridgeContext.Provider,{value:this.appInstance},this.props.children)},n}(c.default.Component);e.default=l,e.setClientInterfaceHook=function(t){return function(e){return e.clientInterface={name:"@shopify/app-bridge-react",version:d.version},t(e)}}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27);o(n(7),e),o(n(27),e),e.default=i.createClientApp},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createApp=e.createAppWrapper=e.createClientApp=e.WINDOW_UNDEFINED_MESSAGE=void 0;var a=n(0),u=n(23),s=n(8),c=n(15),p=n(72),f=n(28),d=n(19),l=n(73),h=n(29),y=n(7),A=i(n(74));function _(t,n,r){if(void 0===r&&(r=[]),!t)throw s.fromAction(e.WINDOW_UNDEFINED_MESSAGE,s.AppActionType.WINDOW_UNDEFINED);var o=h.getLocation(),i=n||o&&o.origin;if(!i)throw s.fromAction("local origin cannot be blank",s.AppActionType.MISSING_LOCAL_ORIGIN);var a=c.fromWindow(t,i);return e.createClientApp(a,r)}function P(t){var e=h.getWindow();return e?_(e.top)(t):p.serverAppBridge}e.WINDOW_UNDEFINED_MESSAGE="window is not defined. Running an app outside a browser is not supported",e.createClientApp=function(t,e){void 0===e&&(e=[]);var n=[],i=c.createTransportListener();return t.subscribe((function(t){var e=t.data,r=e.type,o=e.payload;switch(r){case"getState":n.splice(0).forEach((function(t){return t(o)}));break;case"dispatch":if(i.handleMessage(o),i.handleActionDispatch(o))return;var u=a.findMatchInEnum(s.Action,o.type);u&&s.throwError(u,o)}})),function(c){if(!c.host)throw s.fromAction("host must be provided",s.AppActionType.INVALID_CONFIG);if(!c.apiKey)throw s.fromAction("apiKey must be provided",s.AppActionType.INVALID_CONFIG);var p;try{p=function(t){var e;return r(r({},t),{host:atob(null===(e=t.host)||void 0===e?void 0:e.replace(/_/g,"/").replace(/-/g,"+"))})}(c)}catch(t){throw s.fromAction("not a valid host, please use the value provided by Shopify",s.AppActionType.INVALID_CONFIG)}var _=function(t,e){return function(n,r){t.dispatch({payload:r,source:e,type:n})}}(t,p),P=i.createSubscribeHandler(_);function v(t){return _(y.MessageType.Dispatch,t),t}_(y.MessageType.Unsubscribe),function(t,e){var n=e.apiKey,r=e.host,o=e.forceRedirect,i=void 0===o?!f.isDevelopmentClient:o,a=h.getLocation();if(!f.isUnframed&&a&&n&&r&&i&&h.shouldRedirect(t)){var u="https://"+r+"/apps/"+n+a.pathname+(a.search||"");h.redirect(u)}}(t.hostFrame,p);for(var O=new A.default,b={localOrigin:t.localOrigin,hooks:O,dispatch:function(t){return b.hooks?b.hooks.run(y.LifecycleHook.DispatchAction,v,b,t):v(t)},featuresAvailable:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=Array.isArray(n)?o(n):t;return b.getState("features").then((function(t){return r.length?r.reduce((function(e,n){return Object.keys(t).includes(n)&&(e[n]=t[n]),e}),{}):t}))},getState:function(t){return t&&"string"!=typeof t?Promise.resolve(void 0):new Promise((function(t){n.push(t),_(y.MessageType.GetState)})).then((function(e){var n=e;if(t)for(var r=0,o=t.split(".");r<o.length;r++){var i=o[r];if(null==n||"object"!=typeof n||Array.isArray(n)||!Object.keys(n).includes(i))return;n=n[i]}return n}))},subscribe:P,error:function(t,e){var n=[];return a.forEachInEnum(s.Action,(function(r){n.push(P(r,t,e))})),function(){n.forEach((function(t){return t()}))}}},E=0,g=e;E<g.length;E++){(0,g[E])(O,b)}return function(t){t.subscribe(u.Action.APP,l.handleAppPrint),t.dispatch(d.initialize())}(b),b}},e.createAppWrapper=_,e.createApp=P,e.default=P},function(t,e,n){"use strict";(function(t){var n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.isUnframed=e.isDevelopmentClient=e.isProduction=e.isDevelopment=e.isClient=e.isServer=void 0,e.isServer="undefined"==typeof window,e.isClient=!e.isServer,e.isDevelopment=void 0!==t&&t.env&&!1,e.isProduction=!e.isDevelopment,e.isDevelopmentClient=e.isDevelopment&&e.isClient,e.isUnframed=e.isClient&&(null===(r=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===r?void 0:r.indexOf("Unframed"))>0}).call(this,n(71))},function(t,e,n){"use strict";function r(){return o()?window.location:void 0}function o(){return"undefined"!=typeof window}Object.defineProperty(e,"__esModule",{value:!0}),e.getWindow=e.getLocation=e.redirect=e.shouldRedirect=void 0,e.shouldRedirect=function(t){return t===window},e.redirect=function(t){var e=r();e&&e.assign(t)},e.getLocation=r,e.getWindow=function(){return o()?window:void 0}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_TOAST_DURATION=void 0;var a=i(n(3)),u=n(5),s=n(4);e.DEFAULT_TOAST_DURATION=5e3;var c=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.componentDidMount=function(){var t=this.context,n=this.props,r=n.error,o=n.content,i=n.duration,a=void 0===i?e.DEFAULT_TOAST_DURATION:i,s=n.onDismiss;this.toast=u.Toast.create(t,{message:o,duration:a,isError:r}),this.toast.subscribe(u.Toast.Action.CLEAR,s),this.toast.dispatch(u.Toast.Action.SHOW)},n.prototype.componentWillUnmount=function(){this.toast.unsubscribe()},n.prototype.render=function(){return null},n.contextType=s.AppBridgeContext,n}(a.default.PureComponent);e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(5),s=n(32),c=n(4),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.titleBar=u.TitleBar.create(t,this.transformProps())},e.prototype.componentDidUpdate=function(){this.titleBar.unsubscribe(),this.titleBar.set(this.transformProps())},e.prototype.componentWillUnmount=function(){this.titleBar.unsubscribe()},e.prototype.render=function(){return null},e.prototype.transformProps=function(){var t=this.context,e=this.props,n=e.title,r=e.primaryAction,o=e.secondaryActions,i=e.actionGroups;return{title:n,buttons:s.transformActions(t,{primaryAction:r,secondaryActions:o,actionGroups:i}),breadcrumbs:this.transformBreadcrumbs()}},e.prototype.transformBreadcrumbs=function(){var t=this.context,e=this.props.breadcrumbs;if(null!=e&&0!==e.length){var n=e[e.length-1],r=n.url,o=n.onAction,i=n.target,a=n.content,c=u.Button.create(t,{label:a||""}),p=s.generateRedirect(t,r,i);return null!=p&&c.subscribe(u.Button.Action.CLICK,p),null!=o&&c.subscribe(u.Button.Action.CLICK,o),c}},e.contextType=c.AppBridgeContext,e}(a.default.PureComponent);e.default=p},function(t,e,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.transformActions=e.generateRedirect=void 0;var o=n(5);function i(t,e,n,r){if(void 0===n&&(n="APP"),null!=e){var i=o.Redirect.create(t),a=!0===r?{url:e,newContext:!0}:e;return function(){i.dispatch(function(t,e){if(!0===e)return o.Redirect.Action.REMOTE;return o.Redirect.Action[t]}(n,r),a)}}}function a(t,e){var n=!0===e.destructive?o.Button.Style.Danger:void 0,r=o.Button.create(t,{label:e.content||"",disabled:e.disabled,loading:e.loading,plain:e.plain,style:n});e.onAction&&r.subscribe(o.Button.Action.CLICK,e.onAction);var a=i(t,e.url,e.target,e.external);return null!=a&&r.subscribe(o.Button.Action.CLICK,a),r}e.generateRedirect=i,e.transformActions=function(t,e){var n=e.primaryAction,i=e.secondaryActions,u=e.actionGroups;return{primary:function(t,e){if(null==e)return;return a(t,e)}(t,n),secondary:r(function(t,e){void 0===e&&(e=[]);return r(e.map((function(e){return a(t,e)})))}(t,i),function(t,e){void 0===e&&(e=[]);return r(e.map((function(e){var n=e.actions.map((function(e){return a(t,e)}));return o.ButtonGroup.create(t,{label:e.title,plain:e.plain,buttons:n})})))}(t,u))}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=a(n(3)),s=n(5),c=n(32),p=n(4),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.focusReturnPoint=null,e}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.open,n=t.onClose,r=this.context;this.modal=s.Modal.create(r,this.transformProps()),null!=n&&this.modal.subscribe(s.Modal.Action.CLOSE,n),e&&(this.focusReturnPoint=document.activeElement,this.modal.dispatch(s.Modal.Action.OPEN))},e.prototype.componentDidUpdate=function(t){var e,n=this.props,r=n.open,o=n.onClose,i=t.open,a=this.transformProps(i);this.modal.unsubscribe(),"string"==typeof(e=a).url||e.path,this.modal.set(a,r),null!=o&&this.modal.subscribe(s.Modal.Action.CLOSE,o),i!==r&&(r?this.modal.dispatch(s.Modal.Action.OPEN):this.modal.dispatch(s.Modal.Action.CLOSE)),!i&&r?this.focusReturnPoint=document.activeElement:i&&!r&&null!=this.focusReturnPoint&&document.contains(this.focusReturnPoint)&&(this.focusReturnPoint.focus(),this.focusReturnPoint=null)},e.prototype.componentWillUnmount=function(){this.modal.unsubscribe(),this.props.open&&this.modal.dispatch(s.Modal.Action.CLOSE)},e.prototype.render=function(){return null},e.prototype.transformProps=function(t){var e=this.props,n=e.title,r=e.size,o=e.message,a=e.src,u=e.primaryAction,p=e.secondaryActions,f=e.loading,d=this.context,l=null==r?void 0:s.Modal.Size[r],h={};return null!=a&&(a.match("^https?://")?h.url=a:h.path=a),i(i({title:n,message:o,size:l},h),{footer:{buttons:c.transformActions(d,{primaryAction:u,secondaryActions:p})},loading:t?void 0:f})},e.contextType=p.AppBridgeContext,e}(u.default.PureComponent);e.default=f},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=a(n(3)),s=n(5),c=n(4),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.focusReturnPoint=null,e}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.open,n=t.resourceType,r=t.onSelection,o=t.onCancel,i=this.context;this.picker=s.ResourcePicker.create(i,{resourceType:s.ResourcePicker.ResourceType[n],options:this.getActionOptions()}),null!=r&&this.picker.subscribe(s.ResourcePicker.Action.SELECT,r),null!=o&&this.picker.subscribe(s.ResourcePicker.Action.CANCEL,o),e&&(this.focusReturnPoint=document.activeElement,this.picker.dispatch(s.ResourcePicker.Action.OPEN))},e.prototype.componentDidUpdate=function(t){var e=t.open,n=this.props,r=n.open,o=n.onCancel,i=n.onSelection;this.picker.unsubscribe(),this.picker.set(this.getActionOptions()),null!=i&&this.picker.subscribe(s.ResourcePicker.Action.SELECT,i),null!=o&&this.picker.subscribe(s.ResourcePicker.Action.CANCEL,o),e!==r&&(r?this.picker.dispatch(s.ResourcePicker.Action.OPEN):this.picker.dispatch(s.ResourcePicker.Action.CLOSE)),!e&&r?this.focusReturnPoint=document.activeElement:e&&!r&&null!=this.focusReturnPoint&&document.contains(this.focusReturnPoint)&&(this.focusReturnPoint.focus(),this.focusReturnPoint=null)},e.prototype.componentWillUnmount=function(){this.picker.unsubscribe()},e.prototype.render=function(){return null},e.prototype.getActionOptions=function(){var t=this.props,e=t.initialQuery,n=t.initialSelectionIds,r=t.showHidden,o=t.allowMultiple,a=t.selectMultiple,u={initialQuery:e,initialSelectionIds:n,showHidden:r,selectMultiple:null!=a?a:o,actionVerb:t.actionVerb},s=u;if("Product"===this.props.resourceType){var c=this.props,p={showVariants:c.showVariants,showDraft:c.showDraft,showArchived:c.showArchived,showDraftBadge:c.showDraftBadge,showArchivedBadge:c.showArchivedBadge};s=i(i({},u),p)}return s},e.contextType=c.AppBridgeContext,e.ActionVerb=s.ResourcePicker.ActionVerb,e}(u.default.PureComponent);e.default=p},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(36),e);var i=n(4);Object.defineProperty(e,"Context",{enumerable:!0,get:function(){return i.AppBridgeContext}});var a=n(10);Object.defineProperty(e,"useAppBridge",{enumerable:!0,get:function(){return a.useAppBridge}})},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(37);Object.defineProperty(e,"ContextualSaveBar",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"ContextualSaveBarProps",{enumerable:!0,get:function(){return i.Props}});var a=n(68);Object.defineProperty(e,"Provider",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"ProviderProps",{enumerable:!0,get:function(){return a.Props}});var u=n(76);Object.defineProperty(e,"Loading",{enumerable:!0,get:function(){return u.default}});var s=n(78);Object.defineProperty(e,"Toast",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ToastProps",{enumerable:!0,get:function(){return s.Props}});var c=n(79);Object.defineProperty(e,"TitleBar",{enumerable:!0,get:function(){return c.default}});var p=n(80);Object.defineProperty(e,"Modal",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"ModalProps",{enumerable:!0,get:function(){return p.Props}}),Object.defineProperty(e,"ModalContent",{enumerable:!0,get:function(){return p.ModalContent}});var f=n(83);Object.defineProperty(e,"ResourcePicker",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"ResourcePickerProps",{enumerable:!0,get:function(){return f.Props}}),o(n(84),e),o(n(88),e)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;var a=i(n(38));Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return a.Props}}),e.default=a.default},function(t,e,n){"use strict";var r=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0});var o=n(3),i=n(5),a=n(10),u=i.ContextualSaveBar.Action,s=i.ContextualSaveBar.create;e.default=function(t){var e=t.discardAction,n=t.saveAction,i=t.fullWidth,c=t.leaveConfirmationDisable,p=t.visible,f=a.useAppBridge(),d=n.onAction,l=r(n,["onAction"]),h=e.onAction,y=r(e,["onAction"]),A=o.useMemo((function(){return s(f,{saveAction:l,discardAction:y,fullWidth:i,leaveConfirmationDisable:c})}),[f]);return o.useEffect((function(){A.set({saveAction:l,discardAction:y,fullWidth:i,leaveConfirmationDisable:c},p)}),[f,A,l,y,i,c,p]),o.useEffect((function(){return A.subscribe(u.DISCARD,h),A.subscribe(u.SAVE,d),function(){A.unsubscribe()}}),[A]),o.useEffect((function(){p?A.dispatch(u.SHOW):A.dispatch(u.HIDE)}),[A,p]),null}},function(t,e,n){"use strict";
2
2
  /** @license React v17.0.2
3
3
  * react.production.min.js
4
4
  *
@@ -6,9 +6,9 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var r=n(39),o=60103,i=60106;e.Fragment=60107,e.StrictMode=60108,e.Profiler=60114;var a=60109,u=60110,s=60112;e.Suspense=60113;var c=60115,p=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),e.Fragment=f("react.fragment"),e.StrictMode=f("react.strict_mode"),e.Profiler=f("react.profiler"),a=f("react.provider"),u=f("react.context"),s=f("react.forward_ref"),e.Suspense=f("react.suspense"),c=f("react.memo"),p=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function l(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function A(t,e,n){this.props=t,this.context=e,this.refs=y,this.updater=n||h}function _(){}function P(t,e,n){this.props=t,this.context=e,this.refs=y,this.updater=n||h}A.prototype.isReactComponent={},A.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error(l(85));this.updater.enqueueSetState(this,t,e,"setState")},A.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},_.prototype=A.prototype;var v=P.prototype=new _;v.constructor=P,r(v,A.prototype),v.isPureReactComponent=!0;var O={current:null},b=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function g(t,e,n){var r,i={},a=null,u=null;if(null!=e)for(r in void 0!==e.ref&&(u=e.ref),void 0!==e.key&&(a=""+e.key),e)b.call(e,r)&&!E.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var c=Array(s),p=0;p<s;p++)c[p]=arguments[p+2];i.children=c}if(t&&t.defaultProps)for(r in s=t.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:o,type:t,key:a,ref:u,props:i,_owner:O.current}}function T(t){return"object"==typeof t&&null!==t&&t.$$typeof===o}var m=/\/+/g;function S(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function C(t,e,n,r,a){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case o:case i:s=!0}}if(s)return a=a(s=t),t=""===r?"."+S(s,0):r,Array.isArray(a)?(n="",null!=t&&(n=t.replace(m,"$&/")+"/"),C(a,e,n,"",(function(t){return t}))):null!=a&&(T(a)&&(a=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(a,n+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(m,"$&/")+"/")+t)),e.push(a)),1;if(s=0,r=""===r?".":r+":",Array.isArray(t))for(var c=0;c<t.length;c++){var p=r+S(u=t[c],c);s+=C(u,e,n,p,a)}else if("function"==typeof(p=function(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=d&&t[d]||t["@@iterator"])?t:null}(t)))for(t=p.call(t),c=0;!(u=t.next()).done;)s+=C(u=u.value,e,n,p=r+S(u,c++),a);else if("object"===u)throw e=""+t,Error(l(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e));return s}function R(t,e,n){if(null==t)return t;var r=[],o=0;return C(t,r,"","",(function(t){return e.call(n,t,o++)})),r}function I(t){if(-1===t._status){var e=t._result;e=e(),t._status=0,t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}if(1===t._status)return t._result;throw t._result}var M={current:null};function D(){var t=M.current;if(null===t)throw Error(l(321));return t}var N={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:O,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:R,forEach:function(t,e,n){R(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return R(t,(function(){e++})),e},toArray:function(t){return R(t,(function(t){return t}))||[]},only:function(t){if(!T(t))throw Error(l(143));return t}},e.Component=A,e.PureComponent=P,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,e.cloneElement=function(t,e,n){if(null==t)throw Error(l(267,t));var i=r({},t.props),a=t.key,u=t.ref,s=t._owner;if(null!=e){if(void 0!==e.ref&&(u=e.ref,s=O.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(p in e)b.call(e,p)&&!E.hasOwnProperty(p)&&(i[p]=void 0===e[p]&&void 0!==c?c[p]:e[p])}var p=arguments.length-2;if(1===p)i.children=n;else if(1<p){c=Array(p);for(var f=0;f<p;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:t.type,key:a,ref:u,props:i,_owner:s}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:u,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:t},t.Consumer=t},e.createElement=g,e.createFactory=function(t){var e=g.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:s,render:t}},e.isValidElement=T,e.lazy=function(t){return{$$typeof:p,_payload:{_status:-1,_result:t},_init:I}},e.memo=function(t,e){return{$$typeof:c,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return D().useCallback(t,e)},e.useContext=function(t,e){return D().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return D().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return D().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return D().useLayoutEffect(t,e)},e.useMemo=function(t,e){return D().useMemo(t,e)},e.useReducer=function(t,e,n){return D().useReducer(t,e,n)},e.useRef=function(t){return D().useRef(t)},e.useState=function(t){return D().useState(t)},e.version="17.0.2"},function(t,e,n){"use strict";
9
+ */var r=n(40),o=60103,i=60106;e.Fragment=60107,e.StrictMode=60108,e.Profiler=60114;var a=60109,u=60110,s=60112;e.Suspense=60113;var c=60115,p=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),e.Fragment=f("react.fragment"),e.StrictMode=f("react.strict_mode"),e.Profiler=f("react.profiler"),a=f("react.provider"),u=f("react.context"),s=f("react.forward_ref"),e.Suspense=f("react.suspense"),c=f("react.memo"),p=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function l(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function A(t,e,n){this.props=t,this.context=e,this.refs=y,this.updater=n||h}function _(){}function P(t,e,n){this.props=t,this.context=e,this.refs=y,this.updater=n||h}A.prototype.isReactComponent={},A.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error(l(85));this.updater.enqueueSetState(this,t,e,"setState")},A.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},_.prototype=A.prototype;var v=P.prototype=new _;v.constructor=P,r(v,A.prototype),v.isPureReactComponent=!0;var O={current:null},b=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function g(t,e,n){var r,i={},a=null,u=null;if(null!=e)for(r in void 0!==e.ref&&(u=e.ref),void 0!==e.key&&(a=""+e.key),e)b.call(e,r)&&!E.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var c=Array(s),p=0;p<s;p++)c[p]=arguments[p+2];i.children=c}if(t&&t.defaultProps)for(r in s=t.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:o,type:t,key:a,ref:u,props:i,_owner:O.current}}function m(t){return"object"==typeof t&&null!==t&&t.$$typeof===o}var T=/\/+/g;function S(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function C(t,e,n,r,a){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case o:case i:s=!0}}if(s)return a=a(s=t),t=""===r?"."+S(s,0):r,Array.isArray(a)?(n="",null!=t&&(n=t.replace(T,"$&/")+"/"),C(a,e,n,"",(function(t){return t}))):null!=a&&(m(a)&&(a=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(a,n+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(T,"$&/")+"/")+t)),e.push(a)),1;if(s=0,r=""===r?".":r+":",Array.isArray(t))for(var c=0;c<t.length;c++){var p=r+S(u=t[c],c);s+=C(u,e,n,p,a)}else if("function"==typeof(p=function(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=d&&t[d]||t["@@iterator"])?t:null}(t)))for(t=p.call(t),c=0;!(u=t.next()).done;)s+=C(u=u.value,e,n,p=r+S(u,c++),a);else if("object"===u)throw e=""+t,Error(l(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e));return s}function R(t,e,n){if(null==t)return t;var r=[],o=0;return C(t,r,"","",(function(t){return e.call(n,t,o++)})),r}function I(t){if(-1===t._status){var e=t._result;e=e(),t._status=0,t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}if(1===t._status)return t._result;throw t._result}var M={current:null};function D(){var t=M.current;if(null===t)throw Error(l(321));return t}var N={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:O,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:R,forEach:function(t,e,n){R(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return R(t,(function(){e++})),e},toArray:function(t){return R(t,(function(t){return t}))||[]},only:function(t){if(!m(t))throw Error(l(143));return t}},e.Component=A,e.PureComponent=P,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,e.cloneElement=function(t,e,n){if(null==t)throw Error(l(267,t));var i=r({},t.props),a=t.key,u=t.ref,s=t._owner;if(null!=e){if(void 0!==e.ref&&(u=e.ref,s=O.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(p in e)b.call(e,p)&&!E.hasOwnProperty(p)&&(i[p]=void 0===e[p]&&void 0!==c?c[p]:e[p])}var p=arguments.length-2;if(1===p)i.children=n;else if(1<p){c=Array(p);for(var f=0;f<p;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:t.type,key:a,ref:u,props:i,_owner:s}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:u,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:t},t.Consumer=t},e.createElement=g,e.createFactory=function(t){var e=g.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:s,render:t}},e.isValidElement=m,e.lazy=function(t){return{$$typeof:p,_payload:{_status:-1,_result:t},_init:I}},e.memo=function(t,e){return{$$typeof:c,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return D().useCallback(t,e)},e.useContext=function(t,e){return D().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return D().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return D().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return D().useLayoutEffect(t,e)},e.useMemo=function(t,e){return D().useMemo(t,e)},e.useReducer=function(t,e,n){return D().useReducer(t,e,n)},e.useRef=function(t){return D().useRef(t)},e.useState=function(t){return D().useState(t)},e.version="17.0.2"},function(t,e,n){"use strict";
10
10
  /*
11
11
  object-assign
12
12
  (c) Sindre Sorhus
13
13
  @license MIT
14
- */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,s=a(t),c=1;c<arguments.length;c++){for(var p in n=Object(arguments[c]))o.call(n,p)&&(s[p]=n[p]);if(r){u=r(n);for(var f=0;f<u.length;f++)i.call(n,u[f])&&(s[u[f]]=n[u[f]])}}return s}},function(t,e,n){t.exports=n(41)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(19);Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.createApp}}),o(n(10),e),o(n(19),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){if(null==n)return n;if(void 0===e||!Object.prototype.isPrototypeOf.call(Object.getPrototypeOf(e),n)||"Object"!==n.constructor.name&&"Array"!==n.constructor.name)return n;var r={};return Object.keys(n).forEach((function(o){Object.prototype.hasOwnProperty.call(e,o)?"object"!=typeof e[o]||Array.isArray(e[o])?r[o]=n[o]:r[o]=t(e[o],n[o]):r[o]=n[o]})),Object.keys(e).forEach((function(t){Object.prototype.hasOwnProperty.call(n,t)||(r[t]=e[t])})),Object.setPrototypeOf(r,Object.getPrototypeOf(e)),r}},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge","version":"2.0.19","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/actions/","/client/","/umd/","/util/","/validate/","/development.d.ts","/development.js","/index.d.ts","/index.js","/MessageTransport.d.ts","/MessageTransport.js","/production.d.ts","/production.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:npm && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","build:npm":"shx cp -r ./npm/index.js ./index.js","check":"tsc","clean":"cat package.json | node -pe \\"JSON.parse(require(\'fs\').readFileSync(\'/dev/stdin\').toString()).files.map(f => \'./\'+f).join(\' \')\\" | xargs rm -rf","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"17 KB","path":"production.js"}],"dependencies":{"base64url":"^3.0.1"},"devDependencies":{"@types/node":"^10.12.5","shx":"^0.3.3"}}')},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,c=[],p=!1,f=-1;function d(){p&&s&&(p=!1,s.length?c=s.concat(c):f=-1,c.length&&l())}function l(){if(!p){var t=u(d);p=!0;for(var e=c.length;e;){for(s=c,c=[];++f<e;)s&&s[f].run();f=-1,e=c.length}s=null,p=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new h(t,e)),1!==c.length||p||u(l)},h.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=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serverAppBridge=void 0;var r=n(6),o=function(){};e.serverAppBridge={dispatch:function(){return{}},error:function(){return o},featuresAvailable:function(){return Promise.reject(r.fromAction("Feature detection is only available on the client side.",r.AppActionType.WINDOW_UNDEFINED))},getState:function(){return Promise.reject(r.fromAction("State is only available on the client side.",r.AppActionType.WINDOW_UNDEFINED))},localOrigin:"",subscribe:function(){return o}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleAppPrint=void 0;var r=n(26);function o(){r.getWindow()&&window.print()}function i(){var t=function(){var t=r.getWindow();if(t&&t.document&&t.document.body){var e=window.document.createElement("input");return e.style.display="none",window.document.body.appendChild(e),e}}();t&&(t.select(),o(),t.remove())}e.handleAppPrint=function(){navigator.userAgent.indexOf("iOS")>=0?i():o()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),o=function(){function t(){this.map={}}return t.prototype.set=function(t,e){Object.prototype.hasOwnProperty.call(this.map,t)||(this.map[t]=[]);var n={handler:e,remove:function(){}},o=r.addAndRemoveFromCollection(this.map[t],n);return n={handler:e,remove:o},o},t.prototype.get=function(t){var e=this.map[t];return e?e.map((function(t){return t.handler})):void 0},t.prototype.run=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=0,a=this.get(t)||[];function u(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=a[i++];return o?o(u).apply(n,t):e.apply(n,t)}return u.apply(n,r)},t}();e.default=o},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge-react","version":"2.0.19","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/components/","/umd/","/hooks/","/utilities/","/context.d.ts","/context.js","/index.d.ts","/index.js","/types.d.ts","/types.js","/useAppBridge.d.ts","/useAppBridge.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge/react-components","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","check":"tsc","clean":"cat package.json | node -pe \\"JSON.parse(require(\'fs\').readFileSync(\'/dev/stdin\').toString()).files.map(f => \'./\'+f).join(\' \')\\" | xargs rm -rf","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"30 KB","path":"index.js"}],"dependencies":{"@shopify/app-bridge":"^2.0.19"},"devDependencies":{"@types/react":"^17.0.38","enzyme":"3.11.0","react-dom":"^17.0.2"},"peerDependencies":{"react":"^16.0.0 || ^17.0.0"}}')},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(50));e.default=o.default},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(5),s=n(4),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.loading=u.Loading.create(t),null!=this.loading&&this.loading.dispatch(u.Loading.Action.START)},e.prototype.componentWillUnmount=function(){null!=this.loading&&this.loading.dispatch(u.Loading.Action.STOP)},e.prototype.render=function(){return null},e.contextType=s.AppBridgeContext,e}(a.default.Component);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.REQUEST="APP::AUTH_CODE::REQUEST",t.RESPOND="APP::AUTH_CODE::RESPOND"}(r=e.Action||(e.Action={})),e.request=function(t){return o.actionWrapper({group:i.Group.AuthCode,type:r.REQUEST,payload:{id:t}})},e.respond=function(t){return o.actionWrapper({payload:t,group:i.Group.AuthCode,type:r.RESPOND})}},function(t,e,n){"use strict";function r(t){return Array.from(t).map((function(t){return("00"+t.toString(16)).slice(-2)})).join("")}function o(t){if("function"==typeof Uint8Array&&"object"==typeof window&&window.crypto){var e=new Uint8Array(t),n=window.crypto.getRandomValues(e);if(n)return n}return Array.from(new Array(t),(function(){return 255*Math.random()|0}))}function i(){var t=o(1),e=o(2);return t[0]&=191,e[0]&=79,[r(o(4)),"-",r(o(2)),"-",r(e),"-",r(t),r(o(1)),"-",r(o(6))].join("")}Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0,e.generateUuid=i,e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Cart=e.setLineItemProperties=e.removeLineItemDiscount=e.setLineItemDiscount=e.removeLineItem=e.updateLineItem=e.addLineItem=e.removeProperties=e.setProperties=e.setDiscount=e.updateCustomerAddress=e.addCustomerAddress=e.setCustomer=e.update=e.fetch=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t,e){return void 0===e&&(e={}),u.actionWrapper({group:c.Group.Cart,type:t,payload:e})}!function(t){t.FETCH="APP::CART::FETCH",t.UPDATE="APP::CART::UPDATE",t.SET_CUSTOMER="APP::CART::SET_CUSTOMER",t.REMOVE_CUSTOMER="APP::CART::REMOVE_CUSTOMER",t.ADD_CUSTOMER_ADDRESS="APP::CART::ADD_CUSTOMER_ADDRESS",t.UPDATE_CUSTOMER_ADDRESS="APP::CART::UPDATE_CUSTOMER_ADDRESS",t.SET_DISCOUNT="APP::CART::SET_DISCOUNT",t.REMOVE_DISCOUNT="APP::CART::REMOVE_DISCOUNT",t.SET_PROPERTIES="APP::CART::SET_PROPERTIES",t.REMOVE_PROPERTIES="APP::CART::REMOVE_PROPERTIES",t.CLEAR="APP::CART::CLEAR",t.ADD_LINE_ITEM="APP::CART::ADD_LINE_ITEM",t.UPDATE_LINE_ITEM="APP::CART::UPDATE_LINE_ITEM",t.REMOVE_LINE_ITEM="APP::CART::REMOVE_LINE_ITEM",t.SET_LINE_ITEM_DISCOUNT="APP::CART::SET_LINE_ITEM_DISCOUNT",t.REMOVE_LINE_ITEM_DISCOUNT="APP::CART::REMOVE_LINE_ITEM_DISCOUNT",t.SET_LINE_ITEM_PROPERTIES="APP::CART::SET_LINE_ITEM_PROPERTIES",t.REMOVE_LINE_ITEM_PROPERTIES="APP::CART::REMOVE_LINE_ITEM_PROPERTIES"}(a=e.Action||(e.Action={})),e.fetch=function(){return p(a.FETCH)},e.update=function(t){return p(a.UPDATE,t)},e.setCustomer=function(t){return p(a.SET_CUSTOMER,t)},e.addCustomerAddress=function(t){return p(a.ADD_CUSTOMER_ADDRESS,t)},e.updateCustomerAddress=function(t){return p(a.UPDATE_CUSTOMER_ADDRESS,t)},e.setDiscount=function(t){return p(a.SET_DISCOUNT,t)},e.setProperties=function(t){return p(a.SET_PROPERTIES,t)},e.removeProperties=function(t){return p(a.REMOVE_PROPERTIES,t)},e.addLineItem=function(t){return p(a.ADD_LINE_ITEM,t)},e.updateLineItem=function(t){return p(a.UPDATE_LINE_ITEM,t)},e.removeLineItem=function(t){return p(a.REMOVE_LINE_ITEM,t)},e.setLineItemDiscount=function(t){return p(a.SET_LINE_ITEM_DISCOUNT,t)},e.removeLineItemDiscount=function(t){return p(a.REMOVE_LINE_ITEM_DISCOUNT,t)},e.setLineItemProperties=function(t){return p(a.SET_LINE_ITEM_PROPERTIES,t)};var f=function(t){function e(e,n){return t.call(this,e,c.Group.Cart,c.Group.Cart,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case a.FETCH:this.dispatchCartAction(a.FETCH);break;case a.UPDATE:this.dispatchCartAction(a.UPDATE,e);break;case a.SET_CUSTOMER:this.dispatchCartAction(a.SET_CUSTOMER,e);break;case a.REMOVE_CUSTOMER:this.dispatchCartAction(a.REMOVE_CUSTOMER,e);break;case a.ADD_CUSTOMER_ADDRESS:this.dispatchCartAction(a.ADD_CUSTOMER_ADDRESS,e);break;case a.UPDATE_CUSTOMER_ADDRESS:this.dispatchCartAction(a.UPDATE_CUSTOMER_ADDRESS,e);break;case a.SET_DISCOUNT:this.dispatchCartAction(a.SET_DISCOUNT,e);break;case a.REMOVE_DISCOUNT:this.dispatchCartAction(a.REMOVE_DISCOUNT,e);break;case a.SET_PROPERTIES:this.dispatchCartAction(a.SET_PROPERTIES,e);break;case a.REMOVE_PROPERTIES:this.dispatchCartAction(a.REMOVE_PROPERTIES,e);break;case a.CLEAR:this.dispatchCartAction(a.CLEAR,e);break;case a.ADD_LINE_ITEM:this.dispatchCartAction(a.ADD_LINE_ITEM,e);break;case a.UPDATE_LINE_ITEM:this.dispatchCartAction(a.UPDATE_LINE_ITEM,e);break;case a.REMOVE_LINE_ITEM:this.dispatchCartAction(a.REMOVE_LINE_ITEM,e);break;case a.SET_LINE_ITEM_DISCOUNT:this.dispatchCartAction(a.SET_LINE_ITEM_DISCOUNT,e);break;case a.REMOVE_LINE_ITEM_DISCOUNT:this.dispatchCartAction(a.REMOVE_LINE_ITEM_DISCOUNT,e);break;case a.SET_LINE_ITEM_PROPERTIES:this.dispatchCartAction(a.SET_LINE_ITEM_PROPERTIES,e);break;case a.REMOVE_LINE_ITEM_PROPERTIES:this.dispatchCartAction(a.REMOVE_LINE_ITEM_PROPERTIES,e)}return this},e.prototype.dispatchCartAction=function(t,e){this.app.dispatch(p(t,i(i({},e),{id:this.id})))},e}(s.ActionSet);e.Cart=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(55),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Flash=void 0;var i=n(13),a=n(13);Object.defineProperty(e,"clear",{enumerable:!0,get:function(){return a.clear}}),Object.defineProperty(e,"show",{enumerable:!0,get:function(){return a.show}});var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i.Toast);e.Flash=u,e.create=function(t,e){return new u(t,e)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(57),e),o(n(27),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Features=void 0;var a=n(0),u=n(2),s=n(1),c=n(27),p=function(t){function e(e,n){return t.call(this,e,s.Group.Features,s.Group.Features,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case c.Action.REQUEST:this.dispatchFeaturesAction(c.Action.REQUEST,e)}return this},e.prototype.dispatchFeaturesAction=function(t,e){this.app.dispatch(a.actionWrapper({group:s.Group.Features,type:t,payload:i(i({},e||{}),{id:this.id})}))},e}(u.ActionSet);e.Features=p,e.create=function(t,e){return new p(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.FeedbackModal=e.close=e.open=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return u.actionWrapper({group:c.Group.FeedbackModal,payload:t,type:a.OPEN})}function f(t){return u.actionWrapper({group:c.Group.FeedbackModal,payload:t,type:a.CLOSE})}!function(t){t.OPEN="APP::FEEDBACK_MODAL::OPEN",t.CLOSE="APP::FEEDBACK_MODAL::CLOSE"}(a=e.Action||(e.Action={})),e.open=p,e.close=f;var d=function(t){function e(e,n){var r=t.call(this,e,c.Group.FeedbackModal,c.Group.FeedbackModal)||this;return r.options=n,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=u.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case a.OPEN:var e=p(this.payload);this.app.dispatch(e);break;case a.CLOSE:var n=f(this.payload);this.app.dispatch(n)}return this},e}(s.ActionSet);e.FeedbackModal=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Fullscreen=e.exit=e.enter=e.Action=void 0;var i,a=n(0),u=n(2),s=n(1);!function(t){t.ENTER="APP::FULLSCREEN::ENTER",t.EXIT="APP::FULLSCREEN::EXIT"}(i=e.Action||(e.Action={})),e.enter=function(){return a.actionWrapper({group:s.Group.Fullscreen,type:i.ENTER})},e.exit=function(){return a.actionWrapper({group:s.Group.Fullscreen,type:i.EXIT})};var c=function(t){function e(e){return t.call(this,e,s.Group.Fullscreen,s.Group.Fullscreen)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){return this.app.dispatch(a.actionWrapper({group:this.group,type:t,payload:this.payload})),this},e}(u.ActionSet);e.Fullscreen=c,e.create=function(t){return new c(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.LeaveConfirmation=e.confirm=e.disable=e.enable=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return void 0===t&&(t={}),u.actionWrapper({group:c.Group.LeaveConfirmation,payload:t,type:a.ENABLE})}function f(t){return void 0===t&&(t={}),u.actionWrapper({group:c.Group.LeaveConfirmation,payload:t,type:a.DISABLE})}function d(t){return void 0===t&&(t={}),u.actionWrapper({group:c.Group.LeaveConfirmation,payload:t,type:a.CONFIRM})}!function(t){t.ENABLE="APP::LEAVE_CONFIRMATION::ENABLE",t.DISABLE="APP::LEAVE_CONFIRMATION::DISABLE",t.CONFIRM="APP::LEAVE_CONFIRMATION::CONFIRM"}(a=e.Action||(e.Action={})),e.enable=p,e.disable=f,e.confirm=d;var l=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,c.Group.LeaveConfirmation,c.Group.LeaveConfirmation)||this;return r.options=n,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=u.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case a.ENABLE:var e=p(this.payload);this.app.dispatch(e);break;case a.DISABLE:var n=f(this.payload);this.app.dispatch(n);break;case a.CONFIRM:var r=d(this.payload);this.app.dispatch(r)}return this},e}(s.ActionSet);e.LeaveConfirmation=l,e.create=function(t,e){return void 0===e&&(e={}),new l(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Loading=e.stop=e.start=e.Action=void 0;var i,a=n(0),u=n(2),s=n(1);function c(t){return a.actionWrapper({payload:t,group:s.Group.Loading,type:i.START})}function p(t){return a.actionWrapper({payload:t,group:s.Group.Loading,type:i.STOP})}!function(t){t.START="APP::LOADING::START",t.STOP="APP::LOADING::STOP"}(i=e.Action||(e.Action={})),e.start=c,e.stop=p;var f=function(t){function e(e){return t.call(this,e,s.Group.Loading,s.Group.Loading)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){switch(t){case i.START:this.app.dispatch(c(this.payload));break;case i.STOP:this.app.dispatch(p(this.payload))}return this},e}(u.ActionSet);e.Loading=f,e.create=function(t){return new f(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ModalContent=e.Action=void 0;var s,c=n(0),p=n(2),f=n(1),d=n(28);!function(t){t.LOADING="LOADING",t.LOADED="LOADED"}(s=e.Action||(e.Action={}));var l=function(t){function e(e,n){return t.call(this,e,f.Group.Modal,f.Group.Modal,n?n.id:void 0)||this}return o(e,t),e.prototype.loaded=function(){this.dispatch(s.LOADED)},e.prototype.loading=function(){this.dispatch(s.LOADING)},e.prototype.dispatch=function(t){switch(t){case s.LOADED:this.dispatchModalAction(d.Action.UPDATE_CONTENT,{loading:!1});break;case s.LOADING:this.dispatchModalAction(d.Action.UPDATE_CONTENT,{loading:!0})}return this},e.prototype.dispatchModalAction=function(t,e){return a(this,void 0,void 0,(function(){var n;return u(this,(function(r){return n=c.actionWrapper({type:t,group:f.Group.Modal,payload:i({},e)}),this.app.dispatch(n),[2]}))}))},e}(p.ActionSet);e.ModalContent=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.History=e.replace=e.push=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.PUSH})}function f(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.REPLACE})}!function(t){t.PUSH="APP::NAVIGATION::HISTORY::PUSH",t.REPLACE="APP::NAVIGATION::HISTORY::REPLACE"}(a=e.Action||(e.Action={})),e.push=p,e.replace=f;var d=function(t){function e(e){return t.call(this,e,"History",c.Group.Navigation)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=i(i({},this.payload),{path:e});switch(t){case a.PUSH:this.app.dispatch(p(n));break;case a.REPLACE:this.app.dispatch(f(n))}return this},e}(s.ActionSet);e.History=d,e.create=function(t){return new d(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ResourcePicker=e.update=e.close=e.cancel=e.open=e.select=e.ActionVerb=e.ResourceType=e.ProductStatus=e.ProductVariantInventoryManagement=e.ProductVariantInventoryPolicy=e.WeightUnit=e.FulfillmentServiceType=e.CollectionSortOrder=e.Action=void 0;var a,u,s,c=n(0),p=n(2),f=n(1);function d(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.SELECT})}function l(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.OPEN})}function h(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.CANCEL})}function y(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.UPDATE})}!function(t){t.OPEN="APP::RESOURCE_PICKER::OPEN",t.SELECT="APP::RESOURCE_PICKER::SELECT",t.CLOSE="APP::RESOURCE_PICKER::CLOSE",t.UPDATE="APP::RESOURCE_PICKER::UPDATE",t.CANCEL="APP::RESOURCE_PICKER::CANCEL"}(a=e.Action||(e.Action={})),function(t){t.Manual="MANUAL",t.BestSelling="BEST_SELLING",t.AlphaAsc="ALPHA_ASC",t.AlphaDesc="ALPHA_DESC",t.PriceDesc="PRICE_DESC",t.PriceAsc="PRICE_ASC",t.CreatedDesc="CREATED_DESC",t.Created="CREATED"}(e.CollectionSortOrder||(e.CollectionSortOrder={})),function(t){t.GiftCard="GIFT_CARD",t.Manual="MANUAL",t.ThirdParty="THIRD_PARTY"}(e.FulfillmentServiceType||(e.FulfillmentServiceType={})),function(t){t.Kilograms="KILOGRAMS",t.Grams="GRAMS",t.Pounds="POUNDS",t.Ounces="OUNCES"}(e.WeightUnit||(e.WeightUnit={})),function(t){t.Deny="DENY",t.Continue="CONTINUE"}(e.ProductVariantInventoryPolicy||(e.ProductVariantInventoryPolicy={})),function(t){t.Shopify="SHOPIFY",t.NotManaged="NOT_MANAGED",t.FulfillmentService="FULFILLMENT_SERVICE"}(e.ProductVariantInventoryManagement||(e.ProductVariantInventoryManagement={})),function(t){t.Active="ACTIVE",t.Archived="ARCHIVED",t.Draft="DRAFT"}(e.ProductStatus||(e.ProductStatus={})),function(t){t.Product="product",t.ProductVariant="variant",t.Collection="collection"}(u=e.ResourceType||(e.ResourceType={})),function(t){t.Add="add",t.Select="select"}(s=e.ActionVerb||(e.ActionVerb={})),e.select=d,e.open=l,e.cancel=h,e.close=function(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.CANCEL})},e.update=y;var A=function(t){function e(e,n,r){var o=t.call(this,e,f.Group.ResourcePicker,f.Group.ResourcePicker)||this;return o.initialSelectionIds=[],o.selection=[],o.resourceType=r,o.set(n,!1),o}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id,resourceType:this.resourceType})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var t={initialQuery:this.initialQuery,selectMultiple:this.selectMultiple,initialSelectionIds:this.initialSelectionIds,showHidden:this.showHidden,actionVerb:this.actionVerb};return this.resourceType===u.Product?i(i({},t),{showVariants:this.showVariants,showDraft:this.showDraft,showArchived:this.showArchived,showDraftBadge:this.showDraftBadge,showArchivedBadge:this.showArchivedBadge}):t},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.initialQuery,o=n.initialSelectionIds,i=void 0===o?[]:o,a=n.showHidden,u=void 0===a||a,p=n.showVariants,f=void 0===p||p,d=n.showDraft,l=void 0===d||d,h=n.showArchived,y=void 0===h||h,A=n.showDraftBadge,_=void 0!==A&&A,P=n.showArchivedBadge,v=void 0!==P&&P,O=n.selectMultiple,b=void 0===O||O,E=n.actionVerb,g=void 0===E?s.Add:E;return this.initialQuery=r,this.initialSelectionIds=i,this.showHidden=u,this.showVariants=f,this.showDraft=l,this.showArchived=y,this.showDraftBadge=_,this.showArchivedBadge=v,this.selectMultiple=b,this.actionVerb=g,e&&this.update(),this},e.prototype.dispatch=function(t,e){return t===a.OPEN?this.open():t===a.UPDATE?this.update():t===a.CLOSE||t===a.CANCEL?this.cancel():t===a.SELECT&&(this.selection=e,this.app.dispatch(d({id:this.id,selection:this.selection}))),this},e.prototype.update=function(){this.app.dispatch(y(this.payload))},e.prototype.open=function(){this.app.dispatch(l(this.payload))},e.prototype.cancel=function(){this.app.dispatch(h({id:this.id}))},e.prototype.close=function(){this.cancel()},e}(p.ActionSet);e.ResourcePicker=A,e.create=function(t,e){var n=e.resourceType,r=e.options;return new A(t,void 0===r?{}:r,n)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.capture=e.openCamera=e.create=e.Scanner=e.Action=void 0;var i,a=n(0),u=n(2),s=n(1);!function(t){t.OPEN_CAMERA="APP::SCANNER::OPEN::CAMERA",t.CAPTURE="APP::SCANNER::CAPTURE"}(i=e.Action||(e.Action={}));var c=function(t){function e(e,n){return t.call(this,e,s.Group.Scanner,s.Group.Scanner,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t){switch(t){case i.OPEN_CAMERA:this.dispatchScannerAction(i.OPEN_CAMERA)}return this},e.prototype.dispatchScannerAction=function(t){this.app.dispatch(a.actionWrapper({type:t,group:s.Group.Scanner,payload:{id:this.id}}))},e}(u.ActionSet);e.Scanner=c,e.create=function(t,e){return new c(t,e)},e.openCamera=function(){return a.actionWrapper({group:s.Group.Scanner,type:i.OPEN_CAMERA})},e.capture=function(t){return a.actionWrapper({group:s.Group.Scanner,type:i.CAPTURE,payload:t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.REQUEST="APP::SESSION_TOKEN::REQUEST",t.RESPOND="APP::SESSION_TOKEN::RESPOND"}(r=e.Action||(e.Action={})),e.request=function(){return o.actionWrapper({group:i.Group.SessionToken,type:r.REQUEST})},e.respond=function(t){return o.actionWrapper({payload:t,group:i.Group.SessionToken,type:r.RESPOND})}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.TitleBar=e.update=e.clickBreadcrumb=e.clickActionButton=e.Action=void 0;var a,u=n(8),s=n(12),c=n(68),p=n(9),f=n(0),d=n(2),l=n(1);!function(t){t.UPDATE="APP::TITLEBAR::UPDATE",t.BUTTON_CLICK="APP::TITLEBAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::TITLEBAR::BUTTONS::BUTTON::UPDATE",t.BUTTON_GROUP_UPDATE="APP::TITLEBAR::BUTTONS::BUTTONGROUP::UPDATE",t.BREADCRUMBS_CLICK="APP::TITLEBAR::BREADCRUMBS::BUTTON::CLICK",t.BREADCRUMBS_UPDATE="APP::TITLEBAR::BREADCRUMBS::BUTTON::UPDATE"}(a=e.Action||(e.Action={}));var h={group:l.Group.TitleBar,subgroups:["Buttons"]},y={group:l.Group.TitleBar,subgroups:["Breadcrumbs"],type:l.ComponentType.Button};function A(t){return f.actionWrapper({payload:t,group:l.Group.TitleBar,type:a.UPDATE})}e.clickActionButton=function(t,e){var n=l.ComponentType.Button,r=i({id:t,type:n},h);return u.clickButton(l.Group.TitleBar,r,e)},e.clickBreadcrumb=function(t,e){var n=i({id:t},y);return u.clickButton(l.Group.TitleBar,n,e)},e.update=A;var _=function(t){function e(e,n){var r=t.call(this,e,l.Group.TitleBar,l.Group.TitleBar)||this;return r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{breadcrumbs:this.breadcrumbsOption,buttons:this.buttonsOptions,title:this.title}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{breadcrumbs:this.breadcrumb,buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=f.getMergedProps(this.options,t),r=n.title,o=n.buttons,i=n.breadcrumbs;return this.title=r,this.setBreadcrumbs(i),this.setPrimaryButton(o?o.primary:void 0),this.setSecondaryButton(o?o.secondary:void 0),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(A(this.payload))}return this},e.prototype.getButton=function(t,e,n){return t instanceof s.ButtonGroup?c.getGroupedButton(this,t,e,n):p.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&f.updateActionFromPayload(this.primary,t)&&this.dispatch(a.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e){(s.isGroupedButtonPayload(t),f.updateActionFromPayload(e,t))&&this.dispatch(a.UPDATE)}}},e.prototype.updateBreadcrumbButton=function(t){this.breadcrumb&&f.updateActionFromPayload(this.breadcrumb,t)&&this.dispatch(a.UPDATE)},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,h.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButton=function(t){var e=this,n=t||[],r=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,r),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,h.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.setBreadcrumbs=function(t){this.breadcrumbsOption=this.getChildButton(t,this.breadcrumbsOption),this.breadcrumb=this.breadcrumbsOption?this.getButton(this.breadcrumbsOption,y.subgroups,this.updateBreadcrumbButton):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e}(d.ActionSetWithChildren);e.TitleBar=_,e.create=function(t,e){return new _(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getGroupedButton=void 0;var r=n(12);e.getGroupedButton=function(t,e,n,o){t.addChild(e,t.group,n);var i=e.id,a=e.label,u=e.disabled,s=e.buttons,c=e.plain;return t.subscribeToChild(e,r.Action.UPDATE,o),{id:i,label:a,buttons:s,disabled:u,plain:c}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ContextualSaveBar=e.discard=e.save=e.hide=e.show=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t,e){return u.actionWrapper({group:c.Group.ContextualSaveBar,type:t,payload:e})}!function(t){t.DISCARD="APP::CONTEXTUAL_SAVE_BAR::DISCARD",t.SAVE="APP::CONTEXTUAL_SAVE_BAR::SAVE",t.SHOW="APP::CONTEXTUAL_SAVE_BAR::SHOW",t.HIDE="APP::CONTEXTUAL_SAVE_BAR::HIDE",t.UPDATE="APP::CONTEXTUAL_SAVE_BAR::UPDATE"}(a=e.Action||(e.Action={})),e.show=function(t){return p(a.SHOW,t)},e.hide=function(t){return p(a.HIDE,t)},e.save=function(t){return p(a.SAVE,t)},e.discard=function(t){return p(a.DISCARD,t)};var f=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,c.Group.ContextualSaveBar,c.Group.ContextualSaveBar)||this;return r.options=n,r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=u.getMergedProps(this.options,t);return this.options=n,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){return this.app.dispatch(p(t,this.payload)),this},e}(s.ActionSet);e.ContextualSaveBar=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.close=e.show=e.create=e.Share=e.Action=void 0;var a,u=n(1),s=n(0),c=n(2);!function(t){t.SHOW="APP::SHARE::SHOW",t.CLOSE="APP::SHARE::CLOSE"}(a=e.Action||(e.Action={}));var p=function(t){function e(e){return t.call(this,e,u.Group.Share,u.Group.Share)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case a.SHOW:this.dispatchShareAction(a.SHOW,e);break;default:throw new Error("Action: "+t+" not supported")}return this},e.prototype.dispatchShareAction=function(t,e){this.app.dispatch(s.actionWrapper({type:t,group:u.Group.Share,payload:i({id:this.id},e)}))},e}(c.ActionSet);e.Share=p,e.create=function(t){return new p(t)},e.show=function(){return s.actionWrapper({group:u.Group.Share,type:a.SHOW})},e.close=function(){return s.actionWrapper({group:u.Group.Share,type:a.CLOSE})}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.NavigationMenu=e.update=e.Action=void 0;var a,u=n(14),s=n(0),c=n(2),p=n(1),f=["Navigation_Menu"];function d(t){return s.actionWrapper({payload:t,group:p.Group.Menu,type:a.UPDATE})}!function(t){t.UPDATE="APP::MENU::NAVIGATION_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::NAVIGATION_MENU::LINK::UPDATE"}(a=e.Action||(e.Action={})),e.update=d;var l=function(t){function e(e,n){var r=t.call(this,e,"Navigation_Menu",p.Group.Menu)||this;return r.items=[],r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.items,o=n.active;return this.setItems(r),this.activeOptions=o,this.active=o&&o.id,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(d(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&s.updateActionFromPayload(e,t)&&this.dispatch(a.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],r=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,r),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,f),e.subscribeToChild(t,u.Action.UPDATE,e.updateItem),t.payload})):[]},e}(c.ActionSetWithChildren);e.NavigationMenu=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ChannelMenu=e.update=e.Action=void 0;var a,u=n(14),s=n(0),c=n(2),p=n(1),f=["Channel_Menu"];function d(t){return s.actionWrapper({payload:t,group:p.Group.Menu,type:a.UPDATE})}!function(t){t.UPDATE="APP::MENU::CHANNEL_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::CHANNEL_MENU::LINK::UPDATE"}(a=e.Action||(e.Action={})),e.update=d;var l=function(t){function e(e,n){var r=t.call(this,e,"Channel_Menu",p.Group.Menu)||this;return r.items=[],r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.items,o=n.active;return this.setItems(r),this.activeOptions=o,this.active=o&&o.id,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(d(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&s.updateActionFromPayload(e,t)&&this.dispatch(a.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],r=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,r),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,f),e.subscribeToChild(t,u.Action.UPDATE,e.updateItem),t.payload})):[]},e}(c.ActionSetWithChildren);e.ChannelMenu=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Pos=e.close=e.Action=void 0;var i,a=n(0),u=n(2),s=n(1);function c(){return a.actionWrapper({group:s.Group.Pos,type:i.CLOSE})}!function(t){t.CLOSE="APP::POS::CLOSE",t.LOCATION_UPDATE="APP::POS::LOCATION::UPDATE",t.USER_UPDATE="APP::POS::USER::UPDATE",t.DEVICE_UPDATE="APP::POS::DEVICE::UPDATE"}(i=e.Action||(e.Action={})),e.close=c;var p=function(t){function e(e){return t.call(this,e,s.Group.Pos,s.Group.Pos)||this}return o(e,t),e.prototype.dispatch=function(t){switch(t){case i.CLOSE:this.app.dispatch(c())}return this},e}(u.ActionSet);e.Pos=p,e.create=function(t){return new p(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.MarketingExternalActivityTopBar=e.update=e.clickActionButton=e.MarketingActivityStatusBadgeType=e.Action=void 0;var a,u=n(8),s=n(9),c=n(0),p=n(2),f=n(1);!function(t){t.UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::UPDATE",t.BUTTON_CLICK="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::UPDATE"}(a=e.Action||(e.Action={})),function(t){t.Default="DEFAULT",t.Success="SUCCESS",t.Attention="ATTENTION",t.Warning="WARNING",t.Info="INFO"}(e.MarketingActivityStatusBadgeType||(e.MarketingActivityStatusBadgeType={}));var d={group:f.Group.MarketingExternalActivityTopBar,subgroups:["Buttons"]};function l(t){return c.actionWrapper({payload:t,group:f.Group.MarketingExternalActivityTopBar,type:a.UPDATE})}e.clickActionButton=function(t,e){var n=f.ComponentType.Button,r=i({id:t,type:n},d);return u.clickButton(f.Group.MarketingExternalActivityTopBar,r,e)},e.update=l;var h=function(t){function e(e,n){var r=t.call(this,e,f.Group.MarketingExternalActivityTopBar,f.Group.MarketingExternalActivityTopBar)||this;return r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{title:this.title,status:this.status,saving:this.saving,saved:this.saved,buttons:this.buttonsOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.title,o=n.buttons,i=n.saved,u=n.saving,s=n.status;return this.title=r,this.saving=u,this.saved=i,this.status=s,this.setPrimaryButton(o?o.primary:void 0),this.setSecondaryButtons(o?o.secondary:void 0),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(l(this.payload))}return this},e.prototype.getButton=function(t,e,n){return s.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&c.updateActionFromPayload(this.primary,t)&&this.dispatch(a.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e)c.updateActionFromPayload(e,t)&&this.dispatch(a.UPDATE)}},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,d.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButtons=function(t){var e=this,n=t||[],r=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,r),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,d.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.updateSaving=function(t){this.saving=t,this.dispatch(a.UPDATE)},e.prototype.updateSaved=function(t){this.saved=t,this.dispatch(a.UPDATE)},e.prototype.updateStatus=function(t){this.status=t,this.dispatch(a.UPDATE)},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e}(p.ActionSetWithChildren);e.MarketingExternalActivityTopBar=h,e.create=function(t,e){return new h(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fullPageLoad=e.skeletonPageLoad=e.Action=void 0;var r,o=n(1),i=n(0);!function(t){t.SKELETON_PAGE_LOAD="APP::PERFORMANCE::SKELETON_PAGE_LOAD",t.FULL_PAGE_LOAD="APP::PERFORMANCE::FULL_PAGE_LOAD"}(r=e.Action||(e.Action={})),e.skeletonPageLoad=function(){return i.actionWrapper({group:o.Group.Performance,type:r.SKELETON_PAGE_LOAD})},e.fullPageLoad=function(){return i.actionWrapper({group:o.Group.Performance,type:r.FULL_PAGE_LOAD})}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(30)),i=n(30);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(31)),i=n(31);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(33)),i=n(79);Object.defineProperty(e,"ModalContent",{enumerable:!0,get:function(){return i.default}});var a=n(33);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return a.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(80));e.default=o.default},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(5),s=n(4),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.modalContent=u.ModalContent.create(t),this.syncLoadingStatus()},e.prototype.componentDidUpdate=function(){this.syncLoadingStatus()},e.prototype.syncLoadingStatus=function(){this.modalContent&&(this.props.loading?this.modalContent.loading():this.modalContent.loaded())},e.prototype.render=function(){return null},e.contextType=s.AppBridgeContext,e}(a.default.Component);e.default=c},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(34)),i=n(34);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(83);Object.defineProperty(e,"RoutePropagator",{enumerable:!0,get:function(){return r.default}});var o=n(85);Object.defineProperty(e,"useRoutePropagation",{enumerable:!0,get:function(){return o.default}});var i=n(15);Object.defineProperty(e,"LocationOrHref",{enumerable:!0,get:function(){return i.LocationOrHref}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(4),s=n(15),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props.location;s.updateHistory(this.context,t)},e.prototype.componentDidUpdate=function(t){var e=t.location,n=this.props.location;n!==e&&s.updateHistory(this.context,n)},e.prototype.render=function(){return null},e.contextType=u.AppBridgeContext,e}(a.default.Component);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOrigin=e.getTopWindow=e.getSelfWindow=void 0,e.getSelfWindow=function(){return window.self},e.getTopWindow=function(){return window.top},e.getOrigin=function(){return location.origin}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=n(16),i=n(15);e.default=function(t){var e=o.useAppBridge();r.useEffect((function(){i.updateHistory(e,t)}),[e,t])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(87);Object.defineProperty(e,"ClientRouter",{enumerable:!0,get:function(){return r.default}});var o=n(88);Object.defineProperty(e,"useClientRouting",{enumerable:!0,get:function(){return o.default}});var i=n(17);Object.defineProperty(e,"History",{enumerable:!0,get:function(){return i.History}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(4),s=n(17),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props.history;this.unsubscribe=s.handleRouteChange(this.context,t)},e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function(){return null},e.contextType=u.AppBridgeContext,e}(a.default.Component);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=n(16),i=n(17);e.default=function(t){var e=o.useAppBridge();r.useEffect((function(){return i.handleRouteChange(e,t)}),[e,t])}}])}));
14
+ */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,s=a(t),c=1;c<arguments.length;c++){for(var p in n=Object(arguments[c]))o.call(n,p)&&(s[p]=n[p]);if(r){u=r(n);for(var f=0;f<u.length;f++)i.call(n,u[f])&&(s[u[f]]=n[u[f]])}}return s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.REQUEST="APP::AUTH_CODE::REQUEST",t.RESPOND="APP::AUTH_CODE::RESPOND"}(r=e.Action||(e.Action={})),e.request=function(t){return o.actionWrapper({group:i.Group.AuthCode,type:r.REQUEST,payload:{id:t}})},e.respond=function(t){return o.actionWrapper({payload:t,group:i.Group.AuthCode,type:r.RESPOND})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){if(null==n)return n;if(void 0===e||!Object.prototype.isPrototypeOf.call(Object.getPrototypeOf(e),n)||"Object"!==n.constructor.name&&"Array"!==n.constructor.name)return n;var r={};return Object.keys(n).forEach((function(o){Object.prototype.hasOwnProperty.call(e,o)?"object"!=typeof e[o]||Array.isArray(e[o])?r[o]=n[o]:r[o]=t(e[o],n[o]):r[o]=n[o]})),Object.keys(e).forEach((function(t){Object.prototype.hasOwnProperty.call(n,t)||(r[t]=e[t])})),Object.setPrototypeOf(r,Object.getPrototypeOf(e)),r}},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge","version":"2.0.20","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/actions/","/client/","/umd/","/util/","/validate/","/development.d.ts","/development.js","/index.d.ts","/index.js","/MessageTransport.d.ts","/MessageTransport.js","/production.d.ts","/production.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:npm && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","build:npm":"shx cp -r ./npm/index.js ./index.js","check":"tsc","clean":"cat package.json | node -pe \\"JSON.parse(require(\'fs\').readFileSync(\'/dev/stdin\').toString()).files.map(f => \'./\'+f).join(\' \')\\" | xargs rm -rf","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"17 KB","path":"production.js"}],"dependencies":{"base64url":"^3.0.1"},"devDependencies":{"@types/node":"^10.12.5","shx":"^0.3.3"}}')},function(t,e,n){"use strict";function r(t){return Array.from(t).map((function(t){return("00"+t.toString(16)).slice(-2)})).join("")}function o(t){if("function"==typeof Uint8Array&&"object"==typeof window&&window.crypto){var e=new Uint8Array(t),n=window.crypto.getRandomValues(e);if(n)return n}return Array.from(new Array(t),(function(){return 255*Math.random()|0}))}function i(){var t=o(1),e=o(2);return t[0]&=191,e[0]&=79,[r(o(4)),"-",r(o(2)),"-",r(e),"-",r(t),r(o(1)),"-",r(o(6))].join("")}Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0,e.generateUuid=i,e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Cart=e.setLineItemProperties=e.removeLineItemDiscount=e.setLineItemDiscount=e.removeLineItem=e.updateLineItem=e.addLineItem=e.removeProperties=e.setProperties=e.setDiscount=e.updateCustomerAddress=e.addCustomerAddress=e.setCustomer=e.update=e.fetch=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t,e){return void 0===e&&(e={}),u.actionWrapper({group:c.Group.Cart,type:t,payload:e})}!function(t){t.FETCH="APP::CART::FETCH",t.UPDATE="APP::CART::UPDATE",t.SET_CUSTOMER="APP::CART::SET_CUSTOMER",t.REMOVE_CUSTOMER="APP::CART::REMOVE_CUSTOMER",t.ADD_CUSTOMER_ADDRESS="APP::CART::ADD_CUSTOMER_ADDRESS",t.UPDATE_CUSTOMER_ADDRESS="APP::CART::UPDATE_CUSTOMER_ADDRESS",t.SET_DISCOUNT="APP::CART::SET_DISCOUNT",t.REMOVE_DISCOUNT="APP::CART::REMOVE_DISCOUNT",t.SET_PROPERTIES="APP::CART::SET_PROPERTIES",t.REMOVE_PROPERTIES="APP::CART::REMOVE_PROPERTIES",t.CLEAR="APP::CART::CLEAR",t.ADD_LINE_ITEM="APP::CART::ADD_LINE_ITEM",t.UPDATE_LINE_ITEM="APP::CART::UPDATE_LINE_ITEM",t.REMOVE_LINE_ITEM="APP::CART::REMOVE_LINE_ITEM",t.SET_LINE_ITEM_DISCOUNT="APP::CART::SET_LINE_ITEM_DISCOUNT",t.REMOVE_LINE_ITEM_DISCOUNT="APP::CART::REMOVE_LINE_ITEM_DISCOUNT",t.SET_LINE_ITEM_PROPERTIES="APP::CART::SET_LINE_ITEM_PROPERTIES",t.REMOVE_LINE_ITEM_PROPERTIES="APP::CART::REMOVE_LINE_ITEM_PROPERTIES"}(a=e.Action||(e.Action={})),e.fetch=function(){return p(a.FETCH)},e.update=function(t){return p(a.UPDATE,t)},e.setCustomer=function(t){return p(a.SET_CUSTOMER,t)},e.addCustomerAddress=function(t){return p(a.ADD_CUSTOMER_ADDRESS,t)},e.updateCustomerAddress=function(t){return p(a.UPDATE_CUSTOMER_ADDRESS,t)},e.setDiscount=function(t){return p(a.SET_DISCOUNT,t)},e.setProperties=function(t){return p(a.SET_PROPERTIES,t)},e.removeProperties=function(t){return p(a.REMOVE_PROPERTIES,t)},e.addLineItem=function(t){return p(a.ADD_LINE_ITEM,t)},e.updateLineItem=function(t){return p(a.UPDATE_LINE_ITEM,t)},e.removeLineItem=function(t){return p(a.REMOVE_LINE_ITEM,t)},e.setLineItemDiscount=function(t){return p(a.SET_LINE_ITEM_DISCOUNT,t)},e.removeLineItemDiscount=function(t){return p(a.REMOVE_LINE_ITEM_DISCOUNT,t)},e.setLineItemProperties=function(t){return p(a.SET_LINE_ITEM_PROPERTIES,t)};var f=function(t){function e(e,n){return t.call(this,e,c.Group.Cart,c.Group.Cart,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case a.FETCH:this.dispatchCartAction(a.FETCH);break;case a.UPDATE:this.dispatchCartAction(a.UPDATE,e);break;case a.SET_CUSTOMER:this.dispatchCartAction(a.SET_CUSTOMER,e);break;case a.REMOVE_CUSTOMER:this.dispatchCartAction(a.REMOVE_CUSTOMER,e);break;case a.ADD_CUSTOMER_ADDRESS:this.dispatchCartAction(a.ADD_CUSTOMER_ADDRESS,e);break;case a.UPDATE_CUSTOMER_ADDRESS:this.dispatchCartAction(a.UPDATE_CUSTOMER_ADDRESS,e);break;case a.SET_DISCOUNT:this.dispatchCartAction(a.SET_DISCOUNT,e);break;case a.REMOVE_DISCOUNT:this.dispatchCartAction(a.REMOVE_DISCOUNT,e);break;case a.SET_PROPERTIES:this.dispatchCartAction(a.SET_PROPERTIES,e);break;case a.REMOVE_PROPERTIES:this.dispatchCartAction(a.REMOVE_PROPERTIES,e);break;case a.CLEAR:this.dispatchCartAction(a.CLEAR,e);break;case a.ADD_LINE_ITEM:this.dispatchCartAction(a.ADD_LINE_ITEM,e);break;case a.UPDATE_LINE_ITEM:this.dispatchCartAction(a.UPDATE_LINE_ITEM,e);break;case a.REMOVE_LINE_ITEM:this.dispatchCartAction(a.REMOVE_LINE_ITEM,e);break;case a.SET_LINE_ITEM_DISCOUNT:this.dispatchCartAction(a.SET_LINE_ITEM_DISCOUNT,e);break;case a.REMOVE_LINE_ITEM_DISCOUNT:this.dispatchCartAction(a.REMOVE_LINE_ITEM_DISCOUNT,e);break;case a.SET_LINE_ITEM_PROPERTIES:this.dispatchCartAction(a.SET_LINE_ITEM_PROPERTIES,e);break;case a.REMOVE_LINE_ITEM_PROPERTIES:this.dispatchCartAction(a.REMOVE_LINE_ITEM_PROPERTIES,e)}return this},e.prototype.dispatchCartAction=function(t,e){this.app.dispatch(p(t,i(i({},e),{id:this.id})))},e}(s.ActionSet);e.Cart=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(47),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Flash=void 0;var i=n(13),a=n(13);Object.defineProperty(e,"clear",{enumerable:!0,get:function(){return a.clear}}),Object.defineProperty(e,"show",{enumerable:!0,get:function(){return a.show}});var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i.Toast);e.Flash=u,e.create=function(t,e){return new u(t,e)}},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(49),e),o(n(20),e)},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Features=void 0;var a=n(0),u=n(2),s=n(1),c=n(20),p=function(t){function e(e,n){return t.call(this,e,s.Group.Features,s.Group.Features,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case c.Action.REQUEST:this.dispatchFeaturesAction(c.Action.REQUEST,e)}return this},e.prototype.dispatchFeaturesAction=function(t,e){this.app.dispatch(a.actionWrapper({group:s.Group.Features,type:t,payload:i(i({},e||{}),{id:this.id})}))},e}(u.ActionSet);e.Features=p,e.create=function(t,e){return new p(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.FeedbackModal=e.close=e.open=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return u.actionWrapper({group:c.Group.FeedbackModal,payload:t,type:a.OPEN})}function f(t){return u.actionWrapper({group:c.Group.FeedbackModal,payload:t,type:a.CLOSE})}!function(t){t.OPEN="APP::FEEDBACK_MODAL::OPEN",t.CLOSE="APP::FEEDBACK_MODAL::CLOSE"}(a=e.Action||(e.Action={})),e.open=p,e.close=f;var d=function(t){function e(e,n){var r=t.call(this,e,c.Group.FeedbackModal,c.Group.FeedbackModal)||this;return r.options=n,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=u.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case a.OPEN:var e=p(this.payload);this.app.dispatch(e);break;case a.CLOSE:var n=f(this.payload);this.app.dispatch(n)}return this},e}(s.ActionSet);e.FeedbackModal=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Fullscreen=e.exit=e.enter=e.Action=void 0;var i,a=n(0),u=n(2),s=n(1);!function(t){t.ENTER="APP::FULLSCREEN::ENTER",t.EXIT="APP::FULLSCREEN::EXIT"}(i=e.Action||(e.Action={})),e.enter=function(){return a.actionWrapper({group:s.Group.Fullscreen,type:i.ENTER})},e.exit=function(){return a.actionWrapper({group:s.Group.Fullscreen,type:i.EXIT})};var c=function(t){function e(e){return t.call(this,e,s.Group.Fullscreen,s.Group.Fullscreen)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){return this.app.dispatch(a.actionWrapper({group:this.group,type:t,payload:this.payload})),this},e}(u.ActionSet);e.Fullscreen=c,e.create=function(t){return new c(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.LeaveConfirmation=e.confirm=e.disable=e.enable=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return void 0===t&&(t={}),u.actionWrapper({group:c.Group.LeaveConfirmation,payload:t,type:a.ENABLE})}function f(t){return void 0===t&&(t={}),u.actionWrapper({group:c.Group.LeaveConfirmation,payload:t,type:a.DISABLE})}function d(t){return void 0===t&&(t={}),u.actionWrapper({group:c.Group.LeaveConfirmation,payload:t,type:a.CONFIRM})}!function(t){t.ENABLE="APP::LEAVE_CONFIRMATION::ENABLE",t.DISABLE="APP::LEAVE_CONFIRMATION::DISABLE",t.CONFIRM="APP::LEAVE_CONFIRMATION::CONFIRM"}(a=e.Action||(e.Action={})),e.enable=p,e.disable=f,e.confirm=d;var l=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,c.Group.LeaveConfirmation,c.Group.LeaveConfirmation)||this;return r.options=n,r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=u.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case a.ENABLE:var e=p(this.payload);this.app.dispatch(e);break;case a.DISABLE:var n=f(this.payload);this.app.dispatch(n);break;case a.CONFIRM:var r=d(this.payload);this.app.dispatch(r)}return this},e}(s.ActionSet);e.LeaveConfirmation=l,e.create=function(t,e){return void 0===e&&(e={}),new l(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Loading=e.stop=e.start=e.Action=void 0;var i,a=n(0),u=n(2),s=n(1);function c(t){return a.actionWrapper({payload:t,group:s.Group.Loading,type:i.START})}function p(t){return a.actionWrapper({payload:t,group:s.Group.Loading,type:i.STOP})}!function(t){t.START="APP::LOADING::START",t.STOP="APP::LOADING::STOP"}(i=e.Action||(e.Action={})),e.start=c,e.stop=p;var f=function(t){function e(e){return t.call(this,e,s.Group.Loading,s.Group.Loading)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){switch(t){case i.START:this.app.dispatch(c(this.payload));break;case i.STOP:this.app.dispatch(p(this.payload))}return this},e}(u.ActionSet);e.Loading=f,e.create=function(t){return new f(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ModalContent=e.Action=void 0;var s,c=n(0),p=n(2),f=n(1),d=n(21);!function(t){t.LOADING="LOADING",t.LOADED="LOADED"}(s=e.Action||(e.Action={}));var l=function(t){function e(e,n){return t.call(this,e,f.Group.Modal,f.Group.Modal,n?n.id:void 0)||this}return o(e,t),e.prototype.loaded=function(){this.dispatch(s.LOADED)},e.prototype.loading=function(){this.dispatch(s.LOADING)},e.prototype.dispatch=function(t){switch(t){case s.LOADED:this.dispatchModalAction(d.Action.UPDATE_CONTENT,{loading:!1});break;case s.LOADING:this.dispatchModalAction(d.Action.UPDATE_CONTENT,{loading:!0})}return this},e.prototype.dispatchModalAction=function(t,e){return a(this,void 0,void 0,(function(){var n;return u(this,(function(r){return n=c.actionWrapper({type:t,group:f.Group.Modal,payload:i({},e)}),this.app.dispatch(n),[2]}))}))},e}(p.ActionSet);e.ModalContent=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.History=e.replace=e.push=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.PUSH})}function f(t){return u.actionWrapper({payload:t,group:c.Group.Navigation,type:a.REPLACE})}!function(t){t.PUSH="APP::NAVIGATION::HISTORY::PUSH",t.REPLACE="APP::NAVIGATION::HISTORY::REPLACE"}(a=e.Action||(e.Action={})),e.push=p,e.replace=f;var d=function(t){function e(e){return t.call(this,e,"History",c.Group.Navigation)||this}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=i(i({},this.payload),{path:e});switch(t){case a.PUSH:this.app.dispatch(p(n));break;case a.REPLACE:this.app.dispatch(f(n))}return this},e}(s.ActionSet);e.History=d,e.create=function(t){return new d(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ResourcePicker=e.update=e.close=e.cancel=e.open=e.select=e.ActionVerb=e.ResourceType=e.ProductStatus=e.ProductVariantInventoryManagement=e.ProductVariantInventoryPolicy=e.WeightUnit=e.FulfillmentServiceType=e.CollectionSortOrder=e.Action=void 0;var a,u,s,c=n(0),p=n(2),f=n(1);function d(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.SELECT})}function l(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.OPEN})}function h(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.CANCEL})}function y(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.UPDATE})}!function(t){t.OPEN="APP::RESOURCE_PICKER::OPEN",t.SELECT="APP::RESOURCE_PICKER::SELECT",t.CLOSE="APP::RESOURCE_PICKER::CLOSE",t.UPDATE="APP::RESOURCE_PICKER::UPDATE",t.CANCEL="APP::RESOURCE_PICKER::CANCEL"}(a=e.Action||(e.Action={})),function(t){t.Manual="MANUAL",t.BestSelling="BEST_SELLING",t.AlphaAsc="ALPHA_ASC",t.AlphaDesc="ALPHA_DESC",t.PriceDesc="PRICE_DESC",t.PriceAsc="PRICE_ASC",t.CreatedDesc="CREATED_DESC",t.Created="CREATED"}(e.CollectionSortOrder||(e.CollectionSortOrder={})),function(t){t.GiftCard="GIFT_CARD",t.Manual="MANUAL",t.ThirdParty="THIRD_PARTY"}(e.FulfillmentServiceType||(e.FulfillmentServiceType={})),function(t){t.Kilograms="KILOGRAMS",t.Grams="GRAMS",t.Pounds="POUNDS",t.Ounces="OUNCES"}(e.WeightUnit||(e.WeightUnit={})),function(t){t.Deny="DENY",t.Continue="CONTINUE"}(e.ProductVariantInventoryPolicy||(e.ProductVariantInventoryPolicy={})),function(t){t.Shopify="SHOPIFY",t.NotManaged="NOT_MANAGED",t.FulfillmentService="FULFILLMENT_SERVICE"}(e.ProductVariantInventoryManagement||(e.ProductVariantInventoryManagement={})),function(t){t.Active="ACTIVE",t.Archived="ARCHIVED",t.Draft="DRAFT"}(e.ProductStatus||(e.ProductStatus={})),function(t){t.Product="product",t.ProductVariant="variant",t.Collection="collection"}(u=e.ResourceType||(e.ResourceType={})),function(t){t.Add="add",t.Select="select"}(s=e.ActionVerb||(e.ActionVerb={})),e.select=d,e.open=l,e.cancel=h,e.close=function(t){return c.actionWrapper({payload:t,group:f.Group.ResourcePicker,type:a.CANCEL})},e.update=y;var A=function(t){function e(e,n,r){var o=t.call(this,e,f.Group.ResourcePicker,f.Group.ResourcePicker)||this;return o.initialSelectionIds=[],o.selection=[],o.resourceType=r,o.set(n,!1),o}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id,resourceType:this.resourceType})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var t={initialQuery:this.initialQuery,selectMultiple:this.selectMultiple,initialSelectionIds:this.initialSelectionIds,showHidden:this.showHidden,actionVerb:this.actionVerb};return this.resourceType===u.Product?i(i({},t),{showVariants:this.showVariants,showDraft:this.showDraft,showArchived:this.showArchived,showDraftBadge:this.showDraftBadge,showArchivedBadge:this.showArchivedBadge}):t},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.initialQuery,o=n.initialSelectionIds,i=void 0===o?[]:o,a=n.showHidden,u=void 0===a||a,p=n.showVariants,f=void 0===p||p,d=n.showDraft,l=void 0===d||d,h=n.showArchived,y=void 0===h||h,A=n.showDraftBadge,_=void 0!==A&&A,P=n.showArchivedBadge,v=void 0!==P&&P,O=n.selectMultiple,b=void 0===O||O,E=n.actionVerb,g=void 0===E?s.Add:E;return this.initialQuery=r,this.initialSelectionIds=i,this.showHidden=u,this.showVariants=f,this.showDraft=l,this.showArchived=y,this.showDraftBadge=_,this.showArchivedBadge=v,this.selectMultiple=b,this.actionVerb=g,e&&this.update(),this},e.prototype.dispatch=function(t,e){return t===a.OPEN?this.open():t===a.UPDATE?this.update():t===a.CLOSE||t===a.CANCEL?this.cancel():t===a.SELECT&&(this.selection=e,this.app.dispatch(d({id:this.id,selection:this.selection}))),this},e.prototype.update=function(){this.app.dispatch(y(this.payload))},e.prototype.open=function(){this.app.dispatch(l(this.payload))},e.prototype.cancel=function(){this.app.dispatch(h({id:this.id}))},e.prototype.close=function(){this.cancel()},e}(p.ActionSet);e.ResourcePicker=A,e.create=function(t,e){var n=e.resourceType,r=e.options;return new A(t,void 0===r?{}:r,n)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.capture=e.openCamera=e.create=e.Scanner=e.Action=void 0;var i,a=n(0),u=n(2),s=n(1);!function(t){t.OPEN_CAMERA="APP::SCANNER::OPEN::CAMERA",t.CAPTURE="APP::SCANNER::CAPTURE"}(i=e.Action||(e.Action={}));var c=function(t){function e(e,n){return t.call(this,e,s.Group.Scanner,s.Group.Scanner,n?n.id:void 0)||this}return o(e,t),e.prototype.dispatch=function(t){switch(t){case i.OPEN_CAMERA:this.dispatchScannerAction(i.OPEN_CAMERA)}return this},e.prototype.dispatchScannerAction=function(t){this.app.dispatch(a.actionWrapper({type:t,group:s.Group.Scanner,payload:{id:this.id}}))},e}(u.ActionSet);e.Scanner=c,e.create=function(t,e){return new c(t,e)},e.openCamera=function(){return a.actionWrapper({group:s.Group.Scanner,type:i.OPEN_CAMERA})},e.capture=function(t){return a.actionWrapper({group:s.Group.Scanner,type:i.CAPTURE,payload:t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=void 0;var r,o=n(0),i=n(1);!function(t){t.REQUEST="APP::SESSION_TOKEN::REQUEST",t.RESPOND="APP::SESSION_TOKEN::RESPOND"}(r=e.Action||(e.Action={})),e.request=function(){return o.actionWrapper({group:i.Group.SessionToken,type:r.REQUEST})},e.respond=function(t){return o.actionWrapper({payload:t,group:i.Group.SessionToken,type:r.RESPOND})}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.TitleBar=e.update=e.clickBreadcrumb=e.clickActionButton=e.Action=void 0;var a,u=n(6),s=n(12),c=n(60),p=n(9),f=n(0),d=n(2),l=n(1);!function(t){t.UPDATE="APP::TITLEBAR::UPDATE",t.BUTTON_CLICK="APP::TITLEBAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::TITLEBAR::BUTTONS::BUTTON::UPDATE",t.BUTTON_GROUP_UPDATE="APP::TITLEBAR::BUTTONS::BUTTONGROUP::UPDATE",t.BREADCRUMBS_CLICK="APP::TITLEBAR::BREADCRUMBS::BUTTON::CLICK",t.BREADCRUMBS_UPDATE="APP::TITLEBAR::BREADCRUMBS::BUTTON::UPDATE"}(a=e.Action||(e.Action={}));var h={group:l.Group.TitleBar,subgroups:["Buttons"]},y={group:l.Group.TitleBar,subgroups:["Breadcrumbs"],type:l.ComponentType.Button};function A(t){return f.actionWrapper({payload:t,group:l.Group.TitleBar,type:a.UPDATE})}e.clickActionButton=function(t,e){var n=l.ComponentType.Button,r=i({id:t,type:n},h);return u.clickButton(l.Group.TitleBar,r,e)},e.clickBreadcrumb=function(t,e){var n=i({id:t},y);return u.clickButton(l.Group.TitleBar,n,e)},e.update=A;var _=function(t){function e(e,n){var r=t.call(this,e,l.Group.TitleBar,l.Group.TitleBar)||this;return r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{breadcrumbs:this.breadcrumbsOption,buttons:this.buttonsOptions,title:this.title}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{breadcrumbs:this.breadcrumb,buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=f.getMergedProps(this.options,t),r=n.title,o=n.buttons,i=n.breadcrumbs;return this.title=r,this.setBreadcrumbs(i),this.setPrimaryButton(o?o.primary:void 0),this.setSecondaryButton(o?o.secondary:void 0),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(A(this.payload))}return this},e.prototype.getButton=function(t,e,n){return t instanceof s.ButtonGroup?c.getGroupedButton(this,t,e,n):p.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&f.updateActionFromPayload(this.primary,t)&&this.dispatch(a.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e){(s.isGroupedButtonPayload(t),f.updateActionFromPayload(e,t))&&this.dispatch(a.UPDATE)}}},e.prototype.updateBreadcrumbButton=function(t){this.breadcrumb&&f.updateActionFromPayload(this.breadcrumb,t)&&this.dispatch(a.UPDATE)},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,h.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButton=function(t){var e=this,n=t||[],r=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,r),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,h.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.setBreadcrumbs=function(t){this.breadcrumbsOption=this.getChildButton(t,this.breadcrumbsOption),this.breadcrumb=this.breadcrumbsOption?this.getButton(this.breadcrumbsOption,y.subgroups,this.updateBreadcrumbButton):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e}(d.ActionSetWithChildren);e.TitleBar=_,e.create=function(t,e){return new _(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getGroupedButton=void 0;var r=n(12);e.getGroupedButton=function(t,e,n,o){t.addChild(e,t.group,n);var i=e.id,a=e.label,u=e.disabled,s=e.buttons,c=e.plain;return t.subscribeToChild(e,r.Action.UPDATE,o),{id:i,label:a,buttons:s,disabled:u,plain:c}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ContextualSaveBar=e.discard=e.save=e.hide=e.show=e.Action=void 0;var a,u=n(0),s=n(2),c=n(1);function p(t,e){return u.actionWrapper({group:c.Group.ContextualSaveBar,type:t,payload:e})}!function(t){t.DISCARD="APP::CONTEXTUAL_SAVE_BAR::DISCARD",t.SAVE="APP::CONTEXTUAL_SAVE_BAR::SAVE",t.SHOW="APP::CONTEXTUAL_SAVE_BAR::SHOW",t.HIDE="APP::CONTEXTUAL_SAVE_BAR::HIDE",t.UPDATE="APP::CONTEXTUAL_SAVE_BAR::UPDATE"}(a=e.Action||(e.Action={})),e.show=function(t){return p(a.SHOW,t)},e.hide=function(t){return p(a.HIDE,t)},e.save=function(t){return p(a.SAVE,t)},e.discard=function(t){return p(a.DISCARD,t)};var f=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,e,c.Group.ContextualSaveBar,c.Group.ContextualSaveBar)||this;return r.options=n,r.set(n,!1),r}return o(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=u.getMergedProps(this.options,t);return this.options=n,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){return this.app.dispatch(p(t,this.payload)),this},e}(s.ActionSet);e.ContextualSaveBar=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.close=e.show=e.create=e.Share=e.Action=void 0;var a,u=n(1),s=n(0),c=n(2);!function(t){t.SHOW="APP::SHARE::SHOW",t.CLOSE="APP::SHARE::CLOSE"}(a=e.Action||(e.Action={}));var p=function(t){function e(e){return t.call(this,e,u.Group.Share,u.Group.Share)||this}return o(e,t),e.prototype.dispatch=function(t,e){switch(t){case a.SHOW:this.dispatchShareAction(a.SHOW,e);break;default:throw new Error("Action: "+t+" not supported")}return this},e.prototype.dispatchShareAction=function(t,e){this.app.dispatch(s.actionWrapper({type:t,group:u.Group.Share,payload:i({id:this.id},e)}))},e}(c.ActionSet);e.Share=p,e.create=function(t){return new p(t)},e.show=function(){return s.actionWrapper({group:u.Group.Share,type:a.SHOW})},e.close=function(){return s.actionWrapper({group:u.Group.Share,type:a.CLOSE})}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.NavigationMenu=e.update=e.Action=void 0;var a,u=n(14),s=n(0),c=n(2),p=n(1),f=["Navigation_Menu"];function d(t){return s.actionWrapper({payload:t,group:p.Group.Menu,type:a.UPDATE})}!function(t){t.UPDATE="APP::MENU::NAVIGATION_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::NAVIGATION_MENU::LINK::UPDATE"}(a=e.Action||(e.Action={})),e.update=d;var l=function(t){function e(e,n){var r=t.call(this,e,"Navigation_Menu",p.Group.Menu)||this;return r.items=[],r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.items,o=n.active;return this.setItems(r),this.activeOptions=o,this.active=o&&o.id,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(d(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&s.updateActionFromPayload(e,t)&&this.dispatch(a.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],r=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,r),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,f),e.subscribeToChild(t,u.Action.UPDATE,e.updateItem),t.payload})):[]},e}(c.ActionSetWithChildren);e.NavigationMenu=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ChannelMenu=e.update=e.Action=void 0;var a,u=n(14),s=n(0),c=n(2),p=n(1),f=["Channel_Menu"];function d(t){return s.actionWrapper({payload:t,group:p.Group.Menu,type:a.UPDATE})}!function(t){t.UPDATE="APP::MENU::CHANNEL_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::CHANNEL_MENU::LINK::UPDATE"}(a=e.Action||(e.Action={})),e.update=d;var l=function(t){function e(e,n){var r=t.call(this,e,"Channel_Menu",p.Group.Menu)||this;return r.items=[],r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),r=n.items,o=n.active;return this.setItems(r),this.activeOptions=o,this.active=o&&o.id,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(d(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&s.updateActionFromPayload(e,t)&&this.dispatch(a.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],r=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,r),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,f),e.subscribeToChild(t,u.Action.UPDATE,e.updateItem),t.payload})):[]},e}(c.ActionSetWithChildren);e.ChannelMenu=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Pos=e.close=e.Action=void 0;var i,a=n(0),u=n(2),s=n(1);function c(){return a.actionWrapper({group:s.Group.Pos,type:i.CLOSE})}!function(t){t.CLOSE="APP::POS::CLOSE",t.LOCATION_UPDATE="APP::POS::LOCATION::UPDATE",t.USER_UPDATE="APP::POS::USER::UPDATE",t.DEVICE_UPDATE="APP::POS::DEVICE::UPDATE"}(i=e.Action||(e.Action={})),e.close=c;var p=function(t){function e(e){return t.call(this,e,s.Group.Pos,s.Group.Pos)||this}return o(e,t),e.prototype.dispatch=function(t){switch(t){case i.CLOSE:this.app.dispatch(c())}return this},e}(u.ActionSet);e.Pos=p,e.create=function(t){return new p(t)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.MarketingExternalActivityTopBar=e.update=e.clickActionButton=e.MarketingActivityStatusBadgeType=e.Action=void 0;var a,u=n(6),s=n(9),c=n(0),p=n(2),f=n(1);!function(t){t.UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::UPDATE",t.BUTTON_CLICK="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::UPDATE"}(a=e.Action||(e.Action={})),function(t){t.Default="DEFAULT",t.Success="SUCCESS",t.Attention="ATTENTION",t.Warning="WARNING",t.Info="INFO"}(e.MarketingActivityStatusBadgeType||(e.MarketingActivityStatusBadgeType={}));var d={group:f.Group.MarketingExternalActivityTopBar,subgroups:["Buttons"]};function l(t){return c.actionWrapper({payload:t,group:f.Group.MarketingExternalActivityTopBar,type:a.UPDATE})}e.clickActionButton=function(t,e){var n=f.ComponentType.Button,r=i({id:t,type:n},d);return u.clickButton(f.Group.MarketingExternalActivityTopBar,r,e)},e.update=l;var h=function(t){function e(e,n){var r=t.call(this,e,f.Group.MarketingExternalActivityTopBar,f.Group.MarketingExternalActivityTopBar)||this;return r.set(n),r}return o(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{title:this.title,status:this.status,saving:this.saving,saved:this.saved,buttons:this.buttonsOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),r=n.title,o=n.buttons,i=n.saved,u=n.saving,s=n.status;return this.title=r,this.saving=u,this.saved=i,this.status=s,this.setPrimaryButton(o?o.primary:void 0),this.setSecondaryButtons(o?o.secondary:void 0),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(l(this.payload))}return this},e.prototype.getButton=function(t,e,n){return s.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&c.updateActionFromPayload(this.primary,t)&&this.dispatch(a.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e)c.updateActionFromPayload(e,t)&&this.dispatch(a.UPDATE)}},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,d.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButtons=function(t){var e=this,n=t||[],r=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,r),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,d.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.updateSaving=function(t){this.saving=t,this.dispatch(a.UPDATE)},e.prototype.updateSaved=function(t){this.saved=t,this.dispatch(a.UPDATE)},e.prototype.updateStatus=function(t){this.status=t,this.dispatch(a.UPDATE)},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],r=e?[e]:[],o=this.getUpdatedChildActions(n,r);return o?o[0]:void 0},e}(p.ActionSetWithChildren);e.MarketingExternalActivityTopBar=h,e.create=function(t,e){return new h(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fullPageLoad=e.skeletonPageLoad=e.Action=void 0;var r,o=n(1),i=n(0);!function(t){t.SKELETON_PAGE_LOAD="APP::PERFORMANCE::SKELETON_PAGE_LOAD",t.FULL_PAGE_LOAD="APP::PERFORMANCE::FULL_PAGE_LOAD"}(r=e.Action||(e.Action={})),e.skeletonPageLoad=function(){return i.actionWrapper({group:o.Group.Performance,type:r.SKELETON_PAGE_LOAD})},e.fullPageLoad=function(){return i.actionWrapper({group:o.Group.Performance,type:r.FULL_PAGE_LOAD})}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(25)),i=n(25);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){t.exports=n(70)},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(26);Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.createApp}}),o(n(15),e),o(n(26),e)},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,c=[],p=!1,f=-1;function d(){p&&s&&(p=!1,s.length?c=s.concat(c):f=-1,c.length&&l())}function l(){if(!p){var t=u(d);p=!0;for(var e=c.length;e;){for(s=c,c=[];++f<e;)s&&s[f].run();f=-1,e=c.length}s=null,p=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new h(t,e)),1!==c.length||p||u(l)},h.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=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serverAppBridge=void 0;var r=n(8),o=function(){};e.serverAppBridge={dispatch:function(){return{}},error:function(){return o},featuresAvailable:function(){return Promise.reject(r.fromAction("Feature detection is only available on the client side.",r.AppActionType.WINDOW_UNDEFINED))},getState:function(){return Promise.reject(r.fromAction("State is only available on the client side.",r.AppActionType.WINDOW_UNDEFINED))},localOrigin:"",subscribe:function(){return o}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleAppPrint=void 0;var r=n(29);function o(){r.getWindow()&&window.print()}function i(){var t=function(){var t=r.getWindow();if(t&&t.document&&t.document.body){var e=window.document.createElement("input");return e.style.display="none",window.document.body.appendChild(e),e}}();t&&(t.select(),o(),t.remove())}e.handleAppPrint=function(){navigator.userAgent.indexOf("iOS")>=0?i():o()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),o=function(){function t(){this.map={}}return t.prototype.set=function(t,e){Object.prototype.hasOwnProperty.call(this.map,t)||(this.map[t]=[]);var n={handler:e,remove:function(){}},o=r.addAndRemoveFromCollection(this.map[t],n);return n={handler:e,remove:o},o},t.prototype.get=function(t){var e=this.map[t];return e?e.map((function(t){return t.handler})):void 0},t.prototype.run=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=0,a=this.get(t)||[];function u(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=a[i++];return o?o(u).apply(n,t):e.apply(n,t)}return u.apply(n,r)},t}();e.default=o},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge-react","version":"2.0.20","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/components/","/umd/","/hooks/","/utilities/","/context.d.ts","/context.js","/index.d.ts","/index.js","/types.d.ts","/types.js","/useAppBridge.d.ts","/useAppBridge.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge/react-components","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","check":"tsc","clean":"cat package.json | node -pe \\"JSON.parse(require(\'fs\').readFileSync(\'/dev/stdin\').toString()).files.map(f => \'./\'+f).join(\' \')\\" | xargs rm -rf","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"30 KB","path":"index.js"}],"dependencies":{"@shopify/app-bridge":"^2.0.20"},"devDependencies":{"@types/react":"^17.0.38","enzyme":"3.11.0","react-dom":"^17.0.2"},"peerDependencies":{"react":"^16.0.0 || ^17.0.0"}}')},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(77));e.default=o.default},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(5),s=n(4),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.loading=u.Loading.create(t),null!=this.loading&&this.loading.dispatch(u.Loading.Action.START)},e.prototype.componentWillUnmount=function(){null!=this.loading&&this.loading.dispatch(u.Loading.Action.STOP)},e.prototype.render=function(){return null},e.contextType=s.AppBridgeContext,e}(a.default.Component);e.default=c},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(30)),i=n(30);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(31)),i=n(31);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(33)),i=n(81);Object.defineProperty(e,"ModalContent",{enumerable:!0,get:function(){return i.default}});var a=n(33);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return a.Props}}),e.default=o.default},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(82));e.default=o.default},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(5),s=n(4),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.modalContent=u.ModalContent.create(t),this.syncLoadingStatus()},e.prototype.componentDidUpdate=function(){this.syncLoadingStatus()},e.prototype.syncLoadingStatus=function(){this.modalContent&&(this.props.loading?this.modalContent.loading():this.modalContent.loaded())},e.prototype.render=function(){return null},e.contextType=s.AppBridgeContext,e}(a.default.Component);e.default=c},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(34)),i=n(34);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(85);Object.defineProperty(e,"RoutePropagator",{enumerable:!0,get:function(){return r.default}});var o=n(87);Object.defineProperty(e,"useRoutePropagation",{enumerable:!0,get:function(){return o.default}});var i=n(16);Object.defineProperty(e,"LocationOrHref",{enumerable:!0,get:function(){return i.LocationOrHref}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(4),s=n(16),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props.location;s.updateHistory(this.context,t)},e.prototype.componentDidUpdate=function(t){var e=t.location,n=this.props.location;n!==e&&s.updateHistory(this.context,n)},e.prototype.render=function(){return null},e.contextType=u.AppBridgeContext,e}(a.default.Component);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOrigin=e.getTopWindow=e.getSelfWindow=void 0,e.getSelfWindow=function(){return window.self},e.getTopWindow=function(){return window.top},e.getOrigin=function(){return location.origin}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=n(10),i=n(16);e.default=function(t){var e=o.useAppBridge();r.useEffect((function(){i.updateHistory(e,t)}),[e,t])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(89);Object.defineProperty(e,"ClientRouter",{enumerable:!0,get:function(){return r.default}});var o=n(90);Object.defineProperty(e,"useClientRouting",{enumerable:!0,get:function(){return o.default}});var i=n(17);Object.defineProperty(e,"History",{enumerable:!0,get:function(){return i.History}})},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(3)),u=n(4),s=n(17),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentDidMount=function(){var t=this.props.history;this.unsubscribe=s.handleRouteChange(this.context,t)},e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function(){return null},e.contextType=u.AppBridgeContext,e}(a.default.Component);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=n(10),i=n(17);e.default=function(t){var e=o.useAppBridge();r.useEffect((function(){return i.handleRouteChange(e,t)}),[e,t])}}])}));