@namiml/web-sdk 3.3.9-dev.202603132131 → 3.3.9-dev.202603141600
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/dist/nami-web.cjs +7 -5
- package/dist/nami-web.mjs +7 -5
- package/dist/nami-web.umd.js +7 -5
- package/package.json +1 -1
package/dist/nami-web.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("lit"),t=require("lit/directives/repeat.js");function n(e,t){this.v=e,this.k=t}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r(e){return new n(e,0)}function o(e,t,n){return t=p(t),w(e,y()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(()=>{if("undefined"==typeof globalThis){var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")();Object.defineProperty(e,"globalThis",{value:e,writable:!0,enumerable:!1,configurable:!0})}})(),"undefined"!=typeof Element&&"function"!=typeof Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var e=this.attributes,t=new Array(e.length),n=0;n<e.length;n+=1)t[n]=e[n].name;return t});var l=0;function d(e){return"__private_"+l+++"_"+e}function h(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_(a.key),a)}}function c(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},f.apply(null,arguments)}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var a=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(a){var i=Object.getOwnPropertyDescriptor(a,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},v.apply(null,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function b(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;n[a]=e[a]}return n}function w(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}function k(){var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,a,i,r){var u=a&&a.prototype instanceof s?a:s,l=Object.create(u.prototype);return M(l,"_invoke",function(n,a,i){var r,s,u,l=0,d=i||[],h=!1,c={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return r=t,s=0,u=e,c.n=n,o}};function m(n,a){for(s=n,u=a,t=0;!h&&l&&!i&&t<d.length;t++){var i,r=d[t],m=c.p,f=r[2];n>3?(i=f===a)&&(u=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=m&&((i=n<2&&m<r[1])?(s=0,c.v=a,c.n=r[1]):m<f&&(i=n<3||r[0]>a||a>f)&&(r[4]=n,r[5]=a,c.n=f,s=0))}if(i||n>1)return o;throw h=!0,a}return function(i,d,f){if(l>1)throw TypeError("Generator is already running");for(h&&1===d&&m(d,f),s=d,u=f;(t=s<2?e:u)||!h;){r||(s?s<3?(s>1&&(c.n=-1),m(s,u)):c.n=u:c.v=u);try{if(l=2,r){if(s||(i="next"),t=r[i]){if(!(t=t.call(r,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);r=e}else if((t=(h=c.n<0)?u:n.call(a,c))!==o)break}catch(t){r=e,s=1,u=t}finally{l=1}}return{value:t,done:h}}}(n,i,r),!0),l}var o={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(M(t={},a,(function(){return this})),t),h=l.prototype=s.prototype=Object.create(d);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,M(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e}return u.prototype=l,M(h,"constructor",l),M(l,"constructor",u),u.displayName="GeneratorFunction",M(l,i,"GeneratorFunction"),M(h),M(h,i,"Generator"),M(h,a,(function(){return this})),M(h,"toString",(function(){return"[object Generator]"})),(k=function(){return{w:r,m:c}})()}function S(e,t,n,a,i){var r=function(e,t,n,a,i){return new E(k().w(e,t,n,a),i||Promise)}(e,t,n,a,i);return r.next().then((function(e){return e.done?e.value:r.next()}))}function E(e,t){function a(i,r,o,s){try{var u=e[i](r),l=u.value;return l instanceof n?t.resolve(l.v).then((function(e){a("next",e,o,s)}),(function(e){a("throw",e,o,s)})):t.resolve(l).then((function(e){u.value=e,o(u)}),(function(e){return a("throw",e,o,s)}))}catch(e){s(e)}}var i;this.next||(M(E.prototype),M(E.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),M(this,"_invoke",(function(e,n,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return i=i?i.then(o,o):o()}),!0)}function M(e,t,n,a){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}M=function(e,t,n,a){function r(t,n){M(e,t,(function(e){return this._invoke(t,n,e)}))}t?i?i(e,t,{value:n,enumerable:!a,configurable:!a,writable:!a}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},M(e,t,n,a)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function T(e,t,n,a){var i=v(p(e.prototype),t,n);return"function"==typeof i?function(e){return i.apply(n,e)}:i}function _(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function D(e){var t="function"==typeof Map?new Map:void 0;return D=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(y())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var i=new(e.bind.apply(e,a));return n&&P(i,n.prototype),i}(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,e)},D(e)}var A,x,C,I,L,F,R,W,N,O,j,$,z=function(){return c((function e(t){s(this,e),this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColSpan="",this.ariaCurrent="",this.ariaDescription="",this.ariaDisabled="",this.ariaExpanded="",this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t}),[{key:"shadowRoot",get:function(){return this.__host.__shadowRoot}},{key:"checkValidity",value:function(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}},{key:"reportValidity",value:function(){return!0}},{key:"setFormValue",value:function(){}},{key:"setValidity",value:function(){}}])}(),B=function(e,t,n,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,n):i?i.value=n:t.set(e,n),n},H=function(e,t,n,a){if("a"===n&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?a:"a"===n?a.call(e):a?a.value:t.get(e)},U=e=>{var t;return"boolean"==typeof e?e:null!==(t=null==e?void 0:e.capture)&&void 0!==t&&t},G=function(){return c((function e(){s(this,e),this.__eventListeners=new Map,this.__captureEventListeners=new Map}),[{key:"addEventListener",value:function(e,t,n){var a;if(null!=t){var i=U(n)?this.__captureEventListeners:this.__eventListeners,r=i.get(e);if(void 0===r)r=new Map,i.set(e,r);else if(r.has(t))return;var o="object"==typeof n&&n?n:{};null===(a=o.signal)||void 0===a||a.addEventListener("abort",(()=>this.removeEventListener(e,t,n))),r.set(t,null!=o?o:{})}}},{key:"removeEventListener",value:function(e,t,n){if(null!=t){var a=U(n)?this.__captureEventListeners:this.__eventListeners,i=a.get(e);void 0!==i&&(i.delete(t),i.size||a.delete(e))}}},{key:"dispatchEvent",value:function(e){var t=[this],n=this.__eventTargetParent;if(e.composed)for(;n;)t.push(n),n=n.__eventTargetParent;else for(;n&&n!==this.__host;)t.push(n),n=n.__eventTargetParent;var a=!1,i=!1,r=0,o=null,s=null,u=null,l=e.stopPropagation,d=e.stopImmediatePropagation;Object.defineProperties(e,{target:f({get:()=>null!=o?o:s},X),srcElement:f({get:()=>e.target},X),currentTarget:f({get:()=>u},X),eventPhase:f({get:()=>r},X),composedPath:f({value:()=>t},X),stopPropagation:f({value:()=>{a=!0,l.call(e)}},X),stopImmediatePropagation:f({value:()=>{i=!0,d.call(e)}},X)});var h=(t,n,a)=>{"function"==typeof t?t(e):"function"==typeof(null==t?void 0:t.handleEvent)&&t.handleEvent(e),n.once&&a.delete(t)},c=()=>(u=null,r=0,!e.defaultPrevented),v=t.slice().reverse();o=this.__host&&e.composed?null:this;for(var p,g=e=>{for(s=this;s.__host&&e.includes(s.__host);)s=s.__host},y=m(v);!(p=y()).done;){var b=p.value;o||s&&s!==b.__host||g(v.slice(v.indexOf(b))),u=b,r=b===e.target?2:1;var w=b.__captureEventListeners.get(e.type);if(w)for(var k,S=m(w);!(k=S()).done;){var E=k.value;if(h(E[0],E[1],w),i)return c()}if(a)return c()}var M=e.bubbles?t:[this];s=null;for(var P,T=m(M);!(P=T()).done;){var _=P.value;o||s&&_!==s.__host||g(M.slice(0,M.indexOf(_)+1)),u=_,r=_===e.target?2:3;var D=_.__eventListeners.get(e.type);if(D)for(var A,x=m(D);!(A=x()).done;){var C=A.value;if(h(C[0],C[1],D),i)return c()}if(a)return c()}return c()}}])}(),V=G,X={__proto__:null,enumerable:!0};Object.freeze(X);var K=(O=function(){return c((function e(t,n={}){if(s(this,e),A.set(this,!1),x.set(this,!1),C.set(this,!1),I.set(this,!1),L.set(this,Date.now()),F.set(this,!1),R.set(this,void 0),W.set(this,void 0),N.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,0===arguments.length)throw new Error("The type argument must be specified");if("object"!=typeof n||!n)throw new Error('The "options" argument must be an object');var a=n.bubbles,i=n.cancelable,r=n.composed;B(this,A,!!i,"f"),B(this,x,!!a,"f"),B(this,C,!!r,"f"),B(this,R,`${t}`,"f"),B(this,W,null,"f"),B(this,N,!1,"f")}),[{key:"initEvent",value:function(e,t,n){throw new Error("Method not implemented.")}},{key:"stopImmediatePropagation",value:function(){this.stopPropagation()}},{key:"preventDefault",value:function(){B(this,I,!0,"f")}},{key:"target",get:function(){return H(this,W,"f")}},{key:"currentTarget",get:function(){return H(this,W,"f")}},{key:"srcElement",get:function(){return H(this,W,"f")}},{key:"type",get:function(){return H(this,R,"f")}},{key:"cancelable",get:function(){return H(this,A,"f")}},{key:"defaultPrevented",get:function(){return H(this,A,"f")&&H(this,I,"f")}},{key:"timeStamp",get:function(){return H(this,L,"f")}},{key:"composedPath",value:function(){return H(this,N,"f")?[H(this,W,"f")]:[]}},{key:"returnValue",get:function(){return!H(this,A,"f")||!H(this,I,"f")}},{key:"bubbles",get:function(){return H(this,x,"f")}},{key:"composed",get:function(){return H(this,C,"f")}},{key:"eventPhase",get:function(){return H(this,N,"f")?O.AT_TARGET:O.NONE}},{key:"cancelBubble",get:function(){return H(this,F,"f")},set:function(e){e&&B(this,F,!0,"f")}},{key:"stopPropagation",value:function(){B(this,F,!0,"f")}},{key:"isTrusted",get:function(){return!1}}])}(),A=new WeakMap,x=new WeakMap,C=new WeakMap,I=new WeakMap,L=new WeakMap,F=new WeakMap,R=new WeakMap,W=new WeakMap,N=new WeakMap,O.NONE=0,O.CAPTURING_PHASE=1,O.AT_TARGET=2,O.BUBBLING_PHASE=3,O);Object.defineProperties(K.prototype,{initEvent:X,stopImmediatePropagation:X,preventDefault:X,target:X,currentTarget:X,srcElement:X,type:X,cancelable:X,defaultPrevented:X,timeStamp:X,composedPath:X,returnValue:X,bubbles:X,composed:X,eventPhase:X,cancelBubble:X,stopPropagation:X,isTrusted:X});var Y=($=function(){function e(t,n={}){var a,i;return s(this,e),i=o(this,e,[t,n]),j.set(i,void 0),B(i,j,null!==(a=null==n?void 0:n.detail)&&void 0!==a?a:null,"f"),i}return g(e,K),c(e,[{key:"initCustomEvent",value:function(e,t,n,a){throw new Error("Method not implemented.")}},{key:"detail",get:function(){return H(this,j,"f")}}])}(),j=new WeakMap,$);Object.defineProperties(Y.prototype,{detail:X});var q,J,Q,Z=K,ee=Y;null!==(q=globalThis.Event)&&void 0!==q||(globalThis.Event=Z),null!==(J=globalThis.CustomEvent)&&void 0!==J||(globalThis.CustomEvent=ee);var te=new WeakMap,ne=e=>{var t=te.get(e);return void 0===t&&te.set(e,t=new Map),t},ae=function(){function e(){var t;return s(this,e),(t=o(this,e,arguments)).__shadowRootMode=null,t.__shadowRoot=null,t.__internals=null,t}return g(e,V),c(e,[{key:"attributes",get:function(){return Array.from(ne(this)).map((([e,t])=>({name:e,value:t})))}},{key:"shadowRoot",get:function(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}},{key:"localName",get:function(){return this.constructor.__localName}},{key:"tagName",get:function(){var e;return null===(e=this.localName)||void 0===e?void 0:e.toUpperCase()}},{key:"setAttribute",value:function(e,t){ne(this).set(e,String(t))}},{key:"removeAttribute",value:function(e){ne(this).delete(e)}},{key:"toggleAttribute",value:function(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}},{key:"hasAttribute",value:function(e){return ne(this).has(e)}},{key:"attachShadow",value:function(e){var t={host:this};return this.__shadowRootMode=e.mode,e&&"open"===e.mode&&(this.__shadowRoot=t),t}},{key:"attachInternals",value:function(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");var e=new z(this);return this.__internals=e,e}},{key:"getAttribute",value:function(e){var t=ne(this).get(e);return null!=t?t:null}}])}(),ie=function(){function e(){return s(this,e),o(this,e,arguments)}return g(e,ae),c(e)}();function re(){var e,t;return{promise:new Promise(((n,a)=>{e=n,t=a})),resolve:e,reject:t}}function oe(e,t,n,a){var i,r=arguments.length,o=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,a);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r<3?i(o):r>3?i(t,n,o):i(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function se(e,t,n,a){if("a"===n&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?a:"a"===n?a.call(e):a?a.value:t.get(e)}function ue(e,t,n,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,n):i?i.value=n:t.set(e,n),n}null!==(Q=globalThis.litServerRoot)&&void 0!==Q||(globalThis.litServerRoot=Object.defineProperty(new ie,"localName",{get:()=>"lit-server-root"})),new(function(){return c((function e(){s(this,e),this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}),[{key:"define",value:function(e,t){var n,a;if(this.__definitions.has(e)){if("development"!==process.env.NODE_ENV)throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`)}if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:null!==(n=t.observedAttributes)&&void 0!==n?n:[]}),this.__reverseDefinitions.set(t,e),null===(a=this.__pendingWhenDefineds.get(e))||void 0===a||a.resolve(t),this.__pendingWhenDefineds.delete(e)}},{key:"get",value:function(e){var t=this.__definitions.get(e);return null==t?void 0:t.ctor}},{key:"getName",value:function(e){var t;return null!==(t=this.__reverseDefinitions.get(e))&&void 0!==t?t:null}},{key:"upgrade",value:function(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}},{key:"whenDefined",value:function(e){var t,n;return S((function(a){for(;;)switch(a.n){case 0:if(!(t=this.__definitions.get(e))){a.n=1;break}return a.a(2,t.ctor);case 1:return(n=this.__pendingWhenDefineds.get(e))||(n=re(),this.__pendingWhenDefineds.set(e,n)),a.a(2,n.promise)}}),null,this,null,Promise)}}])}()),"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=ie),"function"==typeof SuppressedError&&SuppressedError;var le;!function(e){e.SDK="sdk",e.ML="ml",e.THIRD_PARTY_ANALYTICS="third_party_analytics",e.THIRD_PARTY_TRANSACTIONS="third_party_transactions",e.PAYWALL_PERSONALIZATION="paywall_personalization",e.ANONYMOUS_MODE_CAPABILITY="anonymous_allowed",e.LANGUAGE_MANAGEMENT="language_management",e.ENTITLEMENT_MANAGEMENT="entitlement_management"}(le||(le={}));var de,he={},ce=he.NAMI_SDK_VERSION,me=void 0===ce?"3.3.9":ce,fe=he.PLATFORM_ID_REQUIRED,ve=void 0===fe?"Platform ID is required":fe,pe=he.DEVICE_ID_REQUIRED,ge=void 0===pe?"Device ID is required":pe,ye=he.EXTERNAL_ID_REQUIRED,be=void 0===ye?"External ID is required":ye,we=he.SDK_NOT_INITIALIZED,ke=void 0===we?"SDK has not been initialized. Make sure to call Nami.configure() first!":we,Se=he.CAMPAIGN_NOT_AVAILABLE,Ee=void 0===Se?"Campaign is not available":Se,Me=he.FLOW_SCREENS_NOT_AVAILABLE,Pe=void 0===Me?"Flow screens not available":Me,Te=he.UNABLE_TO_UPDATE_CDP_ID,_e=void 0===Te?"Unable to update CDP id in anonymous mode":Te,De=he.ANONYMOUS_MODE_ALREADY_ON,Ae=void 0===De?"Anonymous mode is already turned on.":De,xe=he.ANONYMOUS_MODE_ALREADY_OFF,Ce=void 0===xe?"Anonymous mode is already turned off.":xe,Ie=he.DEVICE_ID_NOT_SET,Le=void 0===Ie?"Nami Device ID is not set":Ie,Fe=he.AUTH_DEVICE,Re=void 0===Fe?"nami_auth_device":Fe,We=he.NAMI_CONFIGURATION,Ne=void 0===We?"nami_configuration":We,Oe=he.NAMI_PROFILE,je=void 0===Oe?"nami_profile":Oe,$e=he.API_CONFIG,ze=void 0===$e?"api_config":$e,Be=he.API_CAMPAIGN_RULES,He=void 0===Be?"api_campaign_rules":Be,Ue=he.API_PAYWALLS,Ge=void 0===Ue?"api_paywalls":Ue,Ve=he.API_PRODUCTS,Xe=void 0===Ve?"api_products":Ve,Ke=he.API_ACTIVE_ENTITLEMENTS,Ye=void 0===Ke?"api_active_entitlements":Ke,qe=he.SERVER_NAMI_ENTITLEMENTS,Je=void 0===qe?"server_active_entitlements":qe,Qe=he.INITIAL_APP_CONFIG,Ze=void 0===Qe?"initial_app_config":Qe,et=he.INITIAL_CAMPAIGN_RULES,tt=void 0===et?"initial_campaign_rules":et,nt=he.INITIAL_PAYWALLS,at=void 0===nt?"initial_paywalls":nt,it=he.INITIAL_PRODUCTS,rt=void 0===it?"initial_products":it,ot=he.LOCAL_NAMI_ENTITLEMENTS,st=void 0===ot?"local_active_entitlements":ot,ut=he.CUSTOMER_ATTRIBUTES_KEY_PREFIX,lt=void 0===ut?"nami_cmr_attributes_":ut,dt=he.NAMI_CUSTOMER_JOURNEY_STATE,ht=void 0===dt?"nami_customer_journey_state":dt,ct=he.ANONYMOUS_MODE,mt=void 0===ct?"nami_anonymous_mode_v2":ct,ft=he.ANONYMOUS_UUID,vt=void 0===ft?"nami_anonymous_uuid":ft,pt=he.KEY_SESSION_COUNTER,gt=void 0===pt?"nami_session_counter":pt,yt=he.INITIAL_SESSION_COUNTER_VALUE,bt=void 0===yt?1:yt,wt=he.NAMI_LAST_IMPRESSION_ID,kt=void 0===wt?"nami_last_impression_id":wt,St=he.NAMI_PURCHASE_IMPRESSION_ID,Et=void 0===St?"nami_purchase_impression_id":St,Mt=he.NAMI_LAUNCH_ID,Pt=void 0===Mt?"nami_launch_id":Mt,Tt=he.NAMI_SESSION_ID,_t=void 0===Tt?"nami_session_id":Tt,Dt=he.NAMI_LANGUAGE_CODE,At=void 0===Dt?"nami_language_code":Dt,xt=he.NAMI_PURCHASE_CHANNEL,Ct=void 0===xt?"nami_purchase_channel":xt,It=he.API_VERSION,Lt=he.BASE_URL_PATH,Ft=void 0===Lt?`sdk/${void 0===It?"v3":It}/platform`:Lt,Rt=he.BASE_URL,Wt=void 0===Rt?"https://app.namiml.com":Rt,Nt=he.BASE_STAGING_URL,Ot=void 0===Nt?"https://app-staging.namiml.com":Nt,jt=he.CUSTOM_HOST_PREFIX,$t=void 0===jt?"namiAPIHost=":jt,zt=he.USE_STAGING_API,Bt=void 0===zt?"useStagingAPI":zt,Ht=he.EXTENDED_CLIENT_INFO_PREFIX,Ut=void 0===Ht?"extendedClientInfo":Ht,Gt=he.EXTENDED_CLIENT_INFO_DELIMITER,Vt=void 0===Gt?":":Gt,Xt=he.VALIDATE_PRODUCT_GROUPS,Kt=void 0===Xt?"validateProductGroups":Xt,Yt=he.API_MAX_CALLS_LIMIT,qt=void 0===Yt?2:Yt,Jt=he.API_RETRY_DELAY_SEC,Qt=void 0===Jt?2:Jt,Zt=he.API_TIMEOUT_LIMIT,en=void 0===Zt?2e4:Zt,tn=he.DEVICE_API_TIMEOUT_LIMIT,nn=void 0===tn?2e3:tn,an=he.STATUS_BAD_REQUEST,rn=void 0===an?400:an,on=he.STATUS_NOT_FOUND,sn=void 0===on?404:on,un=he.STATUS_CONFLICT,ln=void 0===un?409:un,dn=he.STATUS_INTERNAL_SERVER_ERROR,hn=void 0===dn?500:dn,cn=he.INITIAL_SUCCESS,mn=void 0===cn?"Initial success":cn,fn=he.RECONFIG_SUCCESS,vn=void 0===fn?"Reconfig success":fn,pn=he.ALREADY_CONFIGURED,gn=void 0===pn?"Already configured":pn,yn=he.AVAILABLE_CAMPAIGNS_CHANGED,bn=void 0===yn?"AvailableCampaignsChanged":yn,wn=he.PAYWALL_ACTION_EVENT,kn=void 0===wn?"PaywallActionEvent":wn,Sn=he.AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED,En=void 0===Sn?"AvailableActiveEntitlementsChanged":Sn,Mn=he.CUSTOMER_JOURNEY_STATE_CHANGED,Pn=void 0===Mn?"CustomerJourneyStateChanged":Mn,Tn=he.SKU_TEXT_REGEX,_n=void 0===Tn?/\$\{sku\.(\w+)(:\d+)?\}/g:Tn,Dn=he.VAR_REGEX,An=void 0===Dn?/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g:Dn,xn=he.SMART_TEXT_PATTERN,Cn=void 0===xn?"${":xn,In=he.LIQUID_VARIABLE_REGEX,Ln=void 0===In?/\${[A-Za-z0-9.]+}/g:In;exports.LogLevel=void 0,(de=exports.LogLevel||(exports.LogLevel={}))[de.DEBUG=1]="DEBUG",de[de.INFO=2]="INFO",de[de.WARN=3]="WARN",de[de.ERROR=4]="ERROR";var Fn={debug:exports.LogLevel.DEBUG,info:exports.LogLevel.INFO,warn:exports.LogLevel.WARN,error:exports.LogLevel.ERROR},Rn=function(){return c((function e(){s(this,e),this.currentLogLevel=exports.LogLevel.DEBUG,this.setLogger=e=>{this.currentLogLevel=e?Fn[e]:exports.LogLevel.WARN}}),[{key:"debug",value:function(e,...t){this.shouldLog(exports.LogLevel.DEBUG)&&console.debug(this.formatMessage(exports.LogLevel.DEBUG,e,...t))}},{key:"info",value:function(e,...t){this.shouldLog(exports.LogLevel.INFO)&&console.info(this.formatMessage(exports.LogLevel.INFO,e,...t))}},{key:"warn",value:function(e,...t){this.shouldLog(exports.LogLevel.WARN)&&console.warn(this.formatMessage(exports.LogLevel.WARN,e,...t))}},{key:"error",value:function(e,...t){this.shouldLog(exports.LogLevel.ERROR)&&console.error(this.formatMessage(exports.LogLevel.ERROR,e,...t))}},{key:"shouldLog",value:function(e){return e>=this.currentLogLevel}},{key:"formatMessage",value:function(e,t,...n){var a=exports.LogLevel[e];return`[${(new Date).toISOString()}] [${a}] ${t} ${n=n.map((e=>"object"==typeof e?JSON.stringify(e):e))}`}}])}(),Wn=new Rn;function Nn(e){for(var t=-1,n=null==e?0:e.length,a=0,i=[];++t<n;){var r=e[t];r&&(i[a++]=r)}return i}function On(e,t){return e===t||e!=e&&t!=t}function jn(e,t){for(var n=e.length;n--;)if(On(e[n][0],t))return n;return-1}var $n=Array.prototype.splice;function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}zn.prototype.clear=function(){this.__data__=[],this.size=0},zn.prototype.delete=function(e){var t=this.__data__,n=jn(t,e);return!(n<0)&&(n==t.length-1?t.pop():$n.call(t,n,1),--this.size,!0)},zn.prototype.get=function(e){var t=this.__data__,n=jn(t,e);return n<0?void 0:t[n][1]},zn.prototype.has=function(e){return jn(this.__data__,e)>-1},zn.prototype.set=function(e,t){var n=this.__data__,a=jn(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this};var Bn="object"==typeof global&&global&&global.Object===Object&&global,Hn="object"==typeof self&&self&&self.Object===Object&&self,Un=Bn||Hn||Function("return this")(),Gn=Un.Symbol,Vn=Object.prototype,Xn=Vn.hasOwnProperty,Kn=Vn.toString,Yn=Gn?Gn.toStringTag:void 0;var qn=Object.prototype.toString;var Jn="[object Null]",Qn="[object Undefined]",Zn=Gn?Gn.toStringTag:void 0;function ea(e){return null==e?void 0===e?Qn:Jn:Zn&&Zn in Object(e)?function(e){var t=Xn.call(e,Yn),n=e[Yn];try{e[Yn]=void 0;var a=!0}catch(e){}var i=Kn.call(e);return a&&(t?e[Yn]=n:delete e[Yn]),i}(e):function(e){return qn.call(e)}(e)}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var na="[object AsyncFunction]",aa="[object Function]",ia="[object GeneratorFunction]",ra="[object Proxy]";function oa(e){if(!ta(e))return!1;var t=ea(e);return t==aa||t==ia||t==na||t==ra}var sa,ua=Un["__core-js_shared__"],la=(sa=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||""))?"Symbol(src)_1."+sa:"";var da=Function.prototype.toString;function ha(e){if(null!=e){try{return da.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ca=/^\[object .+?Constructor\]$/,ma=Function.prototype,fa=Object.prototype,va=ma.toString,pa=fa.hasOwnProperty,ga=RegExp("^"+va.call(pa).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ya(e){return!(!ta(e)||(t=e,la&&la in t))&&(oa(e)?ga:ca).test(ha(e));var t}function ba(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ya(n)?n:void 0}var wa=ba(Un,"Map"),ka=ba(Object,"create");var Sa=Object.prototype.hasOwnProperty;var Ea=Object.prototype.hasOwnProperty;function Ma(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}function Pa(e,t){var n,a,i=e.__data__;return("string"==(a=typeof(n=t))||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ta(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}Ma.prototype.clear=function(){this.__data__=ka?ka(null):{},this.size=0},Ma.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ma.prototype.get=function(e){var t=this.__data__;if(ka){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Sa.call(t,e)?t[e]:void 0},Ma.prototype.has=function(e){var t=this.__data__;return ka?void 0!==t[e]:Ea.call(t,e)},Ma.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ka&&void 0===t?"__lodash_hash_undefined__":t,this},Ta.prototype.clear=function(){this.size=0,this.__data__={hash:new Ma,map:new(wa||zn),string:new Ma}},Ta.prototype.delete=function(e){var t=Pa(this,e).delete(e);return this.size-=t?1:0,t},Ta.prototype.get=function(e){return Pa(this,e).get(e)},Ta.prototype.has=function(e){return Pa(this,e).has(e)},Ta.prototype.set=function(e,t){var n=Pa(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this};function _a(e){var t=this.__data__=new zn(e);this.size=t.size}_a.prototype.clear=function(){this.__data__=new zn,this.size=0},_a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_a.prototype.get=function(e){return this.__data__.get(e)},_a.prototype.has=function(e){return this.__data__.has(e)},_a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof zn){var a=n.__data__;if(!wa||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ta(a)}return n.set(e,t),this.size=n.size,this};function Da(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ta;++t<n;)this.add(e[t])}function Aa(e,t){for(var n=-1,a=null==e?0:e.length;++n<a;)if(t(e[n],n,e))return!0;return!1}function xa(e,t){return e.has(t)}Da.prototype.add=Da.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Da.prototype.has=function(e){return this.__data__.has(e)};var Ca=1,Ia=2;function La(e,t,n,a,i,r){var o=n&Ca,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=n&Ia?new Da:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(a)var p=o?a(v,f,h,t,e,r):a(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!Aa(t,(function(e,t){if(!xa(m,t)&&(f===e||i(f,e,n,a,r)))return m.push(t)}))){c=!1;break}}else if(f!==v&&!i(f,v,n,a,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var Fa=Un.Uint8Array;function Ra(e){var t=-1,n=Array(e.size);return e.forEach((function(e,a){n[++t]=[a,e]})),n}function Wa(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Na=1,Oa=2,ja="[object Boolean]",$a="[object Date]",za="[object Error]",Ba="[object Map]",Ha="[object Number]",Ua="[object RegExp]",Ga="[object Set]",Va="[object String]",Xa="[object Symbol]",Ka="[object ArrayBuffer]",Ya="[object DataView]",qa=Gn?Gn.prototype:void 0,Ja=qa?qa.valueOf:void 0;function Qa(e,t){for(var n=-1,a=t.length,i=e.length;++n<a;)e[i+n]=t[n];return e}var Za=Array.isArray;function ei(e,t,n){var a=t(e);return Za(e)?a:Qa(a,n(e))}function ti(){return[]}var ni=Object.prototype.propertyIsEnumerable,ai=Object.getOwnPropertySymbols,ii=ai?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,a=null==e?0:e.length,i=0,r=[];++n<a;){var o=e[n];t(o,n,e)&&(r[i++]=o)}return r}(ai(e),(function(t){return ni.call(e,t)})))}:ti;function ri(e){return null!=e&&"object"==typeof e}function oi(e){return ri(e)&&"[object Arguments]"==ea(e)}var si=Object.prototype,ui=si.hasOwnProperty,li=si.propertyIsEnumerable,di=oi(function(){return arguments}())?oi:function(e){return ri(e)&&ui.call(e,"callee")&&!li.call(e,"callee")};var hi="object"==typeof exports&&exports&&!exports.nodeType&&exports,ci=hi&&"object"==typeof module&&module&&!module.nodeType&&module,mi=ci&&ci.exports===hi?Un.Buffer:void 0,fi=(mi?mi.isBuffer:void 0)||function(){return!1},vi=9007199254740991,pi=/^(?:0|[1-9]\d*)$/;function gi(e,t){var n=typeof e;return!!(t=null==t?vi:t)&&("number"==n||"symbol"!=n&&pi.test(e))&&e>-1&&e%1==0&&e<t}var yi=9007199254740991;function bi(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=yi}var wi={};function ki(e){return function(t){return e(t)}}wi["[object Float32Array]"]=wi["[object Float64Array]"]=wi["[object Int8Array]"]=wi["[object Int16Array]"]=wi["[object Int32Array]"]=wi["[object Uint8Array]"]=wi["[object Uint8ClampedArray]"]=wi["[object Uint16Array]"]=wi["[object Uint32Array]"]=!0,wi["[object Arguments]"]=wi["[object Array]"]=wi["[object ArrayBuffer]"]=wi["[object Boolean]"]=wi["[object DataView]"]=wi["[object Date]"]=wi["[object Error]"]=wi["[object Function]"]=wi["[object Map]"]=wi["[object Number]"]=wi["[object Object]"]=wi["[object RegExp]"]=wi["[object Set]"]=wi["[object String]"]=wi["[object WeakMap]"]=!1;var Si="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ei=Si&&"object"==typeof module&&module&&!module.nodeType&&module,Mi=Ei&&Ei.exports===Si&&Bn.process,Pi=function(){try{var e=Ei&&Ei.require&&Ei.require("util").types;return e||Mi&&Mi.binding&&Mi.binding("util")}catch(e){}}(),Ti=Pi&&Pi.isTypedArray,_i=Ti?ki(Ti):function(e){return ri(e)&&bi(e.length)&&!!wi[ea(e)]},Di=Object.prototype.hasOwnProperty;function Ai(e,t){var n=Za(e),a=!n&&di(e),i=!n&&!a&&fi(e),r=!n&&!a&&!i&&_i(e),o=n||a||i||r,s=o?function(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}(e.length,String):[],u=s.length;for(var l in e)!t&&!Di.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||gi(l,u))||s.push(l);return s}var xi=Object.prototype;function Ci(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xi)}function Ii(e,t){return function(n){return e(t(n))}}var Li=Ii(Object.keys,Object),Fi=Object.prototype.hasOwnProperty;function Ri(e){return null!=e&&bi(e.length)&&!oa(e)}function Wi(e){return Ri(e)?Ai(e):function(e){if(!Ci(e))return Li(e);var t=[];for(var n in Object(e))Fi.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}function Ni(e){return ei(e,Wi,ii)}var Oi=1,ji=Object.prototype.hasOwnProperty;var $i=ba(Un,"DataView"),zi=ba(Un,"Promise"),Bi=ba(Un,"Set"),Hi=ba(Un,"WeakMap"),Ui="[object Map]",Gi="[object Promise]",Vi="[object Set]",Xi="[object WeakMap]",Ki="[object DataView]",Yi=ha($i),qi=ha(wa),Ji=ha(zi),Qi=ha(Bi),Zi=ha(Hi),er=ea;($i&&er(new $i(new ArrayBuffer(1)))!=Ki||wa&&er(new wa)!=Ui||zi&&er(zi.resolve())!=Gi||Bi&&er(new Bi)!=Vi||Hi&&er(new Hi)!=Xi)&&(er=function(e){var t=ea(e),n="[object Object]"==t?e.constructor:void 0,a=n?ha(n):"";if(a)switch(a){case Yi:return Ki;case qi:return Ui;case Ji:return Gi;case Qi:return Vi;case Zi:return Xi}return t});var tr=1,nr="[object Arguments]",ar="[object Array]",ir="[object Object]",rr=Object.prototype.hasOwnProperty;function or(e,t,n,a,i,r){var o=Za(e),s=Za(t),u=o?ar:er(e),l=s?ar:er(t),d=(u=u==nr?ir:u)==ir,h=(l=l==nr?ir:l)==ir,c=u==l;if(c&&fi(e)){if(!fi(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new _a),o||_i(e)?La(e,t,n,a,i,r):function(e,t,n,a,i,r,o){switch(n){case Ya:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ka:return!(e.byteLength!=t.byteLength||!r(new Fa(e),new Fa(t)));case ja:case $a:case Ha:return On(+e,+t);case za:return e.name==t.name&&e.message==t.message;case Ua:case Va:return e==t+"";case Ba:var s=Ra;case Ga:var u=a&Na;if(s||(s=Wa),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;a|=Oa,o.set(e,t);var d=La(s(e),s(t),a,i,r,o);return o.delete(e),d;case Xa:if(Ja)return Ja.call(e)==Ja.call(t)}return!1}(e,t,u,n,a,i,r);if(!(n&tr)){var m=d&&rr.call(e,"__wrapped__"),f=h&&rr.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new _a),i(v,p,n,a,r)}}return!!c&&(r||(r=new _a),function(e,t,n,a,i,r){var o=n&Oi,s=Ni(e),u=s.length;if(u!=Ni(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:ji.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(a)var g=o?a(p,v,d,t,e,r):a(v,p,d,e,t,r);if(!(void 0===g?v===p||i(v,p,n,a,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,n,a,i,r))}function sr(e,t,n,a,i){return e===t||(null==e||null==t||!ri(e)&&!ri(t)?e!=e&&t!=t:or(e,t,n,a,sr,i))}var ur=1,lr=2;function dr(e){return e==e&&!ta(e)}function hr(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function cr(e){var t=function(e){for(var t=Wi(e),n=t.length;n--;){var a=t[n],i=e[a];t[n]=[a,i,dr(i)]}return t}(e);return 1==t.length&&t[0][2]?hr(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,a){var i=n.length,r=i;if(null==e)return!r;for(e=Object(e);i--;){var o=n[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<r;){var s=(o=n[i])[0],u=e[s],l=o[1];if(o[2]){if(void 0===u&&!(s in e))return!1}else{var d=new _a;if(!sr(l,u,ur|lr,a,d))return!1}}return!0}(n,0,t)}}var mr="[object Symbol]";function fr(e){return"symbol"==typeof e||ri(e)&&ea(e)==mr}var vr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pr=/^\w*$/;function gr(e,t){if(Za(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!fr(e))||(pr.test(e)||!vr.test(e)||null!=t&&e in Object(t))}var yr="Expected a function";function br(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(yr);var n=function(){var a=arguments,i=t?t.apply(this,a):a[0],r=n.cache;if(r.has(i))return r.get(i);var o=e.apply(this,a);return n.cache=r.set(i,o)||r,o};return n.cache=new(br.Cache||Ta),n}br.Cache=Ta;var wr,kr,Sr,Er=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/\\(\\)?/g,Pr=(wr=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Er,(function(e,n,a,i){t.push(a?i.replace(Mr,"$1"):n||e)})),t},kr=br(wr,(function(e){return 500===Sr.size&&Sr.clear(),e})),Sr=kr.cache,kr);var Tr=1/0,_r=Gn?Gn.prototype:void 0,Dr=_r?_r.toString:void 0;function Ar(e){if("string"==typeof e)return e;if(Za(e))return function(e,t){for(var n=-1,a=null==e?0:e.length,i=Array(a);++n<a;)i[n]=t(e[n],n,e);return i}(e,Ar)+"";if(fr(e))return Dr?Dr.call(e):"";var t=e+"";return"0"==t&&1/e==-Tr?"-0":t}function xr(e){return null==e?"":Ar(e)}function Cr(e,t){return Za(e)?e:gr(e,t)?[e]:Pr(xr(e))}var Ir=1/0;function Lr(e){if("string"==typeof e||fr(e))return e;var t=e+"";return"0"==t&&1/e==-Ir?"-0":t}function Fr(e,t){for(var n=0,a=(t=Cr(t,e)).length;null!=e&&n<a;)e=e[Lr(t[n++])];return n&&n==a?e:void 0}function Rr(e,t){return null!=e&&t in Object(e)}function Wr(e,t){return null!=e&&function(e,t,n){for(var a=-1,i=(t=Cr(t,e)).length,r=!1;++a<i;){var o=Lr(t[a]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||++a!=i?r:!!(i=null==e?0:e.length)&&bi(i)&&gi(o,i)&&(Za(e)||di(e))}(e,t,Rr)}var Nr=1,Or=2;function jr(e,t){return gr(e)&&dr(t)?hr(Lr(e),t):function(n){var a=function(e,t,n){var a=null==e?void 0:Fr(e,t);return void 0===a?n:a}(n,e);return void 0===a&&a===t?Wr(n,e):sr(t,a,Nr|Or)}}function $r(e){return e}function zr(e){return gr(e)?(t=Lr(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Fr(t,e)}}(e);var t}function Br(e){return e!=e}function Hr(e,t){return!!(null==e?0:e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var a=n-1,i=e.length;++a<i;)if(e[a]===t)return a;return-1}(e,t,n):function(e,t,n){for(var a=e.length,i=n+-1;++i<a;)if(t(e[i],i,e))return i;return-1}(e,Br,n)}(e,t,0)>-1}var Ur=Bi&&1/Wa(new Bi([,-0]))[1]==1/0?function(e){return new Bi(e)}:function(){},Gr=200;function Vr(e,t){return e&&e.length?function(e,t,n){var a=-1,i=Hr,r=e.length,o=!0,s=[],u=s;if(r>=Gr){var l=t?null:Ur(e);if(l)return Wa(l);o=!1,i=xa,u=new Da}else u=t?[]:s;e:for(;++a<r;){var d=e[a],h=t?t(d):d;if(d=0!==d?d:0,o&&h==h){for(var c=u.length;c--;)if(u[c]===h)continue e;t&&u.push(h),s.push(d)}else i(u,h,n)||(u!==s&&u.push(h),s.push(d))}return s}(e,"function"==typeof(n=t)?n:null==n?$r:"object"==typeof n?Za(n)?jr(n[0],n[1]):cr(n):zr(n)):[];var n}var Xr=function(){return c((function e(){s(this,e),this.memoryStore={}}),[{key:"setDevice",value:function(e){this.setItem(Re,e)}},{key:"getDevice",value:function(){return this.getItem(Re)}},{key:"resetDevice",value:function(){this.resetItem(Re)}},{key:"getAnonymousMode",value:function(){return this.getItem(mt)||!1}},{key:"setAnonymousMode",value:function(e){this.setItem(mt,e)}},{key:"clearAnonymousMode",value:function(){this.resetItem(mt)}},{key:"setAppConfig",value:function(e,t){this.setItem(e,t)}},{key:"getAppConfig",value:function(e){return this.getItem(e)}},{key:"setLanguageCode",value:function(e){this.setItem(At,e||"en")}},{key:"getLanguageCode",value:function(){return this.getItem(At)||"en"}},{key:"setCampaignRules",value:function(e,t){e!==tt?this.isTtlCacheKey(e)?this.setWithTtl(e,t):this.setItem(e,t):this.memoryStore[tt]=JSON.stringify(t)}},{key:"getCampaignRules",value:function(e){return e===tt?this.memoryStore[tt]?JSON.parse(this.memoryStore[tt]):null:this.isTtlCacheKey(e)?this.getWithTtl(e):this.getItem(e)}},{key:"setPaywalls",value:function(e,t){e!==at?this.isTtlCacheKey(e)?this.setWithTtl(e,t):this.setItem(e,t):this.memoryStore[at]=JSON.stringify(t)}},{key:"getPaywalls",value:function(e){return e===at?this.memoryStore[at]?JSON.parse(this.memoryStore[at]):null:this.isTtlCacheKey(e)?this.getWithTtl(e):this.getItem(e)}},{key:"setActiveEntitlements",value:function(e,t){this.setItem(e,t)}},{key:"getActiveEntitlements",value:function(e){return this.getItem(e)||[]}},{key:"setNamiEntitlements",value:function(e,t){this.setItem(e,t)}},{key:"getNamiEntitlements",value:function(e){return this.getItem(e)||[]}},{key:"setProducts",value:function(e,t){this.setItem(e,t)}},{key:"getProducts",value:function(e){return this.getItem(e)}},{key:"getCachedProducts",value:function(){var e,t,n=null!==(e=this.getItem(Xe))&&void 0!==e?e:[];return Vr(Nn([...null!==(t=this.getItem(rt))&&void 0!==t?t:[],...n]),"sku_ref_id")}},{key:"setNamiConfig",value:function(e){this.setItem(Ne,e)}},{key:"getNamiConfig",value:function(){return this.getItem(Ne)}},{key:"setCustomerAttribute",value:function(e,t){this.setItem(lt+e,t)}},{key:"getCustomerAttribute",value:function(e){return this.getItem(lt+e)}},{key:"getAllCustomerAttributes",value:function(){return Object.entries(localStorage).filter((([e])=>e.includes(lt))).map((([e,t])=>e.replace(lt,"")+":"+t))}},{key:"getAllCustomerAttributesKeys",value:function(){return Object.keys(localStorage).filter((e=>e.includes(lt))).map((e=>e.replace(lt,"")))}},{key:"clearCustomerAttribute",value:function(e){var t=lt+e,n=this.getItem(t);return n&&this.resetItem(t),!!n}},{key:"clearAllCustomerAttributes",value:function(){Object.keys(localStorage).filter((e=>e.includes(lt))).map((e=>this.resetItem(e)))}},{key:"setNamiProfile",value:function(e){this.setItem(je,e)}},{key:"getNamiProfile",value:function(){return this.getItem(je)}},{key:"removeNamiProfile",value:function(){this.resetItem(je)}},{key:"setCustomerJourneyState",value:function(e){this.setItem(ht,e)}},{key:"getCustomerJourneyState",value:function(){return this.getItem(ht)}},{key:"setSessionCounter",value:function(){var e=this.getItem(gt),t=e?parseInt(e):bt||bt;this.setItem(gt,t+1)}},{key:"getSessionCounter",value:function(){var e=this.getItem(gt);return e?parseInt(e):bt}},{key:"setLastImpressionId",value:function(e){this.setItem(kt,e)}},{key:"getLastImpressionId",value:function(){var e;return null!==(e=this.getItem(kt))&&void 0!==e?e:""}},{key:"setPurchaseImpression",value:function(){var e,t=null!==(e=this.getLastImpressionId())&&void 0!==e?e:"";this.setItem(Et,t)}},{key:"getPurchaseImpression",value:function(){var e;return null!==(e=this.getItem(Et))&&void 0!==e?e:""}},{key:"setSessionId",value:function(e){e&&this.setItem(_t,e)}},{key:"getSessionId",value:function(){var e;return null!==(e=this.getItem(_t))&&void 0!==e?e:""}},{key:"clearSessionId",value:function(){this.resetItem(_t)}},{key:"setLaunchId",value:function(e){e&&this.setItem(Pt,e)}},{key:"getLaunchId",value:function(){var e;return null!==(e=this.getItem(Pt))&&void 0!==e?e:""}},{key:"clearLaunchId",value:function(){this.resetItem(Pt)}},{key:"setPurchaseChannel",value:function(e){e&&this.setItem(Ct,e)}},{key:"getPurchaseChannel",value:function(){return this.getItem(Ct)}},{key:"getAnonymousUUID",value:function(){return this.getItem(vt)}},{key:"setAnonymousUUID",value:function(e){this.setItem(vt,e)}},{key:"clearAnonymousUUID",value:function(){this.resetItem(vt)}},{key:"isTtlCacheKey",value:function(e){return e===He||e===Ge}},{key:"getCampaignCacheTtl",value:function(){var e,t=this.getAppConfig(ze)||this.getAppConfig(Ze);return null!==(e=null==t?void 0:t.campaign_cache_ttl)&&void 0!==e?e:null}},{key:"setWithTtl",value:function(e,t){var n=this.getCampaignCacheTtl();0!==n?null!==n&&n>0?this.setItem(e,{data:t,cachedAt:Date.now()}):this.setItem(e,t):this.memoryStore[e]=JSON.stringify(t)}},{key:"isTimestampedCache",value:function(e){return"object"==typeof e&&null!==e&&"cachedAt"in e&&"data"in e}},{key:"getWithTtl",value:function(e){var t=this.getCampaignCacheTtl(),n=this.memoryStore[e];if(null!=n){if(null===t||0===t)return JSON.parse(n);delete this.memoryStore[e]}var a=this.getItem(e);return null===a?null:null===t?this.isTimestampedCache(a)?a.data:a:this.isTimestampedCache(a)?(Date.now()-a.cachedAt)/1e3>=t?(this.resetItem(e),null):a.data:(this.resetItem(e),null)}},{key:"setItem",value:function(e,t){var n;try{n=JSON.stringify(t)}catch(t){return void Wn.error(`Serialization failed for ${e}`,t)}try{localStorage.setItem(e,n)}catch(t){Wn.error("Error setting item in localStorage:",t),this.resetItem(e),this.memoryStore[e]=n}}},{key:"getItem",value:function(e){try{var t=localStorage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){"undefined"!=typeof window&&Wn.error("Error getting item from localStorage:",e,": ",t)}var n=this.memoryStore[e];return null!=n?JSON.parse(n):null}},{key:"resetItem",value:function(e){try{localStorage.removeItem(e)}catch(t){"undefined"!=typeof window&&Wn.error("Error removing item from localStorage:",e,": ",t)}delete this.memoryStore[e]}},{key:"clear",value:function(){try{localStorage.clear()}catch(e){Wn.error("Error clearing localStorage:",e)}this.memoryStore={}}}])}(),Kr=new Xr,Yr=function(){function e(t,n){var a;return s(this,e),(a=o(this,e,[n])).statusCode=t,a.status=t,a.message=`RetryLimitExceededError: ${a.message}`,a}return g(e,D(Error)),c(e)}(),qr=function(){function e(){return s(this,e),o(this,e,arguments)}return g(e,D(Error)),c(e)}(),Jr=function(){function e(){var t;return s(this,e),(t=o(this,e)).status=409,t.name="ConflictError",t.message="ConflictError: Server responded with conflict",t}return g(e,qr),c(e)}(),Qr=function(){function e(){return s(this,e),o(this,e,[ke])}return g(e,D(Error)),c(e)}(),Zr=function(){function e(){return s(this,e),o(this,e,[ve])}return g(e,D(Error)),c(e)}(),eo=function(){function e(){return s(this,e),o(this,e,[ge])}return g(e,D(Error)),c(e)}(),to=function(){function e(){return s(this,e),o(this,e,[be])}return g(e,D(Error)),c(e)}(),no=function(){function e(){return s(this,e),o(this,e,[Ee])}return g(e,D(Error)),c(e)}(),ao=function(){function e(){return s(this,e),o(this,e,[Pe])}return g(e,D(Error)),c(e)}(),io=function(){function e(){return s(this,e),o(this,e,[Ae])}return g(e,D(Error)),c(e)}(),ro=function(){function e(){return s(this,e),o(this,e,[Ce])}return g(e,D(Error)),c(e)}(),oo=function(){function e(){return s(this,e),o(this,e,[Ce])}return g(e,D(Error)),c(e)}(),so=function(){function e(){return s(this,e),o(this,e,[_e])}return g(e,D(Error)),c(e)}(),uo=function(){function e(t){var n;return s(this,e),(n=o(this,e,[t])).message=`BadRequestError: ${n.message}`,n}return g(e,qr),c(e)}(),lo=function(){function e(t){var n;return s(this,e),(n=o(this,e,[t])).message=`NotFoundError: ${n.message}`,n}return g(e,qr),c(e)}(),ho=function(){function e(t,n){var a;return s(this,e),(a=o(this,e,[n])).statusCode=t,a.message=`ClientError: ${a.message}`,a}return g(e,qr),c(e)}(),co=function(){function e(t){var n;return s(this,e),(n=o(this,e,[t])).message=`ServerError: ${n.message}`,n}return g(e,qr),c(e)}(),mo=(e,t)=>{if(e==rn)throw new uo(t);if(e==sn)throw new lo(t);if(e==ln)throw new Jr;if(e>rn&&e<hn)throw new ho(e,t);if(e>=hn)throw new co(t)};function fo(e,t,n=en,a=qt){var i,o,s;return S((function(u){for(;;)switch(u.n){case 0:return i=0,o=()=>{var s,u;return S((function(l){for(;;)switch(l.n){case 0:return l.n=1,r(vo(e,t,n));case 1:if((s=l.v).ok){l.n=5;break}if(s.status!=ln){l.n=2;break}throw new Jr;case 2:if(!(++i<=a)){l.n=4;break}return u=1e3*(i+Qt),l.n=3,r(new Promise((e=>setTimeout(e,u))));case 3:return l.a(2,o());case 4:throw new Yr(s.status,`Request failed after ${a} retries`);case 5:return l.a(2,s)}}),null,null,null,Promise)},u.n=1,r(o());case 1:return s=u.v,u.a(2,s.json())}}),null,null,null,Promise)}function vo(e,t={},n){var a,i,o;return S((function(s){for(;;)switch(s.n){case 0:return a=new AbortController,i=setTimeout((()=>a.abort()),n),t.signal=a.signal,s.n=1,r(fetch(e,t));case 1:return o=s.v,clearTimeout(i),s.a(2,o)}}),null,null,null,Promise)}function po(e){for(var t=e.length;--t>=0;)e[t]=0}po(new Array(576)),po(new Array(60)),po(new Array(512)),po(new Array(256)),po(new Array(29)),po(new Array(30));var go=(e,t,n,a)=>{for(var i=65535&e,r=e>>>16&65535,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{r=r+(i=i+t[a++]|0)|0}while(--o);i%=65521,r%=65521}return i|r<<16},yo=new Uint32Array((()=>{for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),bo=(e,t,n,a)=>{var i=yo,r=a+n;e^=-1;for(var o=a;o<r;o++)e=e>>>8^i[255&(e^t[o])];return~e},wo={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ko={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},So=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Eo={assign:function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var a in n)So(n,a)&&(e[a]=n[a])}}return e},flattenChunks:e=>{for(var t=0,n=0,a=e.length;n<a;n++)t+=e[n].length;for(var i=new Uint8Array(t),r=0,o=0,s=e.length;r<s;r++){var u=e[r];i.set(u,o),o+=u.length}return i}},Mo=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Mo=!1}for(var Po=new Uint8Array(256),To=0;To<256;To++)Po[To]=To>=252?6:To>=248?5:To>=240?4:To>=224?3:To>=192?2:1;Po[254]=Po[254]=1;var _o={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,a,i,r,o=e.length,s=0;for(i=0;i<o;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(a=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(a-56320),i++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),r=0,i=0;r<s;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(a=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(a-56320),i++),n<128?t[r++]=n:n<2048?(t[r++]=192|n>>>6,t[r++]=128|63&n):n<65536?(t[r++]=224|n>>>12,t[r++]=128|n>>>6&63,t[r++]=128|63&n):(t[r++]=240|n>>>18,t[r++]=128|n>>>12&63,t[r++]=128|n>>>6&63,t[r++]=128|63&n);return t},buf2string:(e,t)=>{var n,a,i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var r=new Array(2*i);for(a=0,n=0;n<i;){var o=e[n++];if(o<128)r[a++]=o;else{var s=Po[o];if(s>4)r[a++]=65533,n+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&n<i;)o=o<<6|63&e[n++],s--;s>1?r[a++]=65533:o<65536?r[a++]=o:(o-=65536,r[a++]=55296|o>>10&1023,r[a++]=56320|1023&o)}}}return((e,t)=>{if(t<65534&&e.subarray&&Mo)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n})(r,a)},utf8border:(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);for(var n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Po[e[n]]>t?n:t}};var Do=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ao=16209,xo=function(e,t){var n,a,i,r,o,s,u,l,d,h,c,m,f,v,p,g,y,b,w,k,S,E,M,P,T=e.state;n=e.next_in,M=e.input,a=n+(e.avail_in-5),i=e.next_out,P=e.output,r=i-(t-e.avail_out),o=i+(e.avail_out-257),s=T.dmax,u=T.wsize,l=T.whave,d=T.wnext,h=T.window,c=T.hold,m=T.bits,f=T.lencode,v=T.distcode,p=(1<<T.lenbits)-1,g=(1<<T.distbits)-1;e:do{m<15&&(c+=M[n++]<<m,m+=8,c+=M[n++]<<m,m+=8),y=f[c&p];t:for(;;){if(c>>>=b=y>>>24,m-=b,0===(b=y>>>16&255))P[i++]=65535&y;else{if(!(16&b)){if(64&b){if(32&b){T.mode=16191;break e}e.msg="invalid literal/length code",T.mode=Ao;break e}y=f[(65535&y)+(c&(1<<b)-1)];continue t}for(w=65535&y,(b&=15)&&(m<b&&(c+=M[n++]<<m,m+=8),w+=c&(1<<b)-1,c>>>=b,m-=b),m<15&&(c+=M[n++]<<m,m+=8,c+=M[n++]<<m,m+=8),y=v[c&g];;){if(c>>>=b=y>>>24,m-=b,16&(b=y>>>16&255)){if(k=65535&y,m<(b&=15)&&(c+=M[n++]<<m,(m+=8)<b&&(c+=M[n++]<<m,m+=8)),(k+=c&(1<<b)-1)>s){e.msg="invalid distance too far back",T.mode=Ao;break e}if(c>>>=b,m-=b,k>(b=i-r)){if((b=k-b)>l&&T.sane){e.msg="invalid distance too far back",T.mode=Ao;break e}if(S=0,E=h,0===d){if(S+=u-b,b<w){w-=b;do{P[i++]=h[S++]}while(--b);S=i-k,E=P}}else if(d<b){if(S+=u+d-b,(b-=d)<w){w-=b;do{P[i++]=h[S++]}while(--b);if(S=0,d<w){w-=b=d;do{P[i++]=h[S++]}while(--b);S=i-k,E=P}}}else if(S+=d-b,b<w){w-=b;do{P[i++]=h[S++]}while(--b);S=i-k,E=P}for(;w>2;)P[i++]=E[S++],P[i++]=E[S++],P[i++]=E[S++],w-=3;w&&(P[i++]=E[S++],w>1&&(P[i++]=E[S++]))}else{S=i-k;do{P[i++]=P[S++],P[i++]=P[S++],P[i++]=P[S++],w-=3}while(w>2);w&&(P[i++]=P[S++],w>1&&(P[i++]=P[S++]))}break}if(64&b){e.msg="invalid distance code",T.mode=Ao;break e}y=v[(65535&y)+(c&(1<<b)-1)]}}break}}while(n<a&&i<o);n-=w=m>>3,c&=(1<<(m-=w<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<a?a-n+5:5-(n-a),e.avail_out=i<o?o-i+257:257-(i-o),T.hold=c,T.bits=m},Co=15,Io=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Lo=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Fo=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Ro=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Wo=(e,t,n,a,i,r,o,s)=>{var u,l,d,h,c,m,f,v,p,g=s.bits,y=0,b=0,w=0,k=0,S=0,E=0,M=0,P=0,T=0,_=0,D=null,A=new Uint16Array(16),x=new Uint16Array(16),C=null;for(y=0;y<=Co;y++)A[y]=0;for(b=0;b<a;b++)A[t[n+b]]++;for(S=g,k=Co;k>=1&&0===A[k];k--);if(S>k&&(S=k),0===k)return i[r++]=20971520,i[r++]=20971520,s.bits=1,0;for(w=1;w<k&&0===A[w];w++);for(S<w&&(S=w),P=1,y=1;y<=Co;y++)if(P<<=1,(P-=A[y])<0)return-1;if(P>0&&(0===e||1!==k))return-1;for(x[1]=0,y=1;y<Co;y++)x[y+1]=x[y]+A[y];for(b=0;b<a;b++)0!==t[n+b]&&(o[x[t[n+b]]++]=b);if(0===e?(D=C=o,m=20):1===e?(D=Io,C=Lo,m=257):(D=Fo,C=Ro,m=0),_=0,b=0,y=w,c=r,E=S,M=0,d=-1,h=(T=1<<S)-1,1===e&&T>852||2===e&&T>592)return 1;for(;;){f=y-M,o[b]+1<m?(v=0,p=o[b]):o[b]>=m?(v=C[o[b]-m],p=D[o[b]-m]):(v=96,p=0),u=1<<y-M,w=l=1<<E;do{i[c+(_>>M)+(l-=u)]=f<<24|v<<16|p}while(0!==l);for(u=1<<y-1;_&u;)u>>=1;if(0!==u?(_&=u-1,_+=u):_=0,b++,0==--A[y]){if(y===k)break;y=t[n+o[b]]}if(y>S&&(_&h)!==d){for(0===M&&(M=S),c+=w,P=1<<(E=y-M);E+M<k&&!((P-=A[E+M])<=0);)E++,P<<=1;if(T+=1<<E,1===e&&T>852||2===e&&T>592)return 1;i[d=_&h]=S<<24|E<<16|c-r}}return 0!==_&&(i[c+_]=y-M<<24|64<<16),s.bits=S,0},No=ko.Z_FINISH,Oo=ko.Z_BLOCK,jo=ko.Z_TREES,$o=ko.Z_OK,zo=ko.Z_STREAM_END,Bo=ko.Z_NEED_DICT,Ho=ko.Z_STREAM_ERROR,Uo=ko.Z_DATA_ERROR,Go=ko.Z_MEM_ERROR,Vo=ko.Z_BUF_ERROR,Xo=ko.Z_DEFLATED,Ko=16180,Yo=16190,qo=16191,Jo=16192,Qo=16194,Zo=16199,es=16200,ts=16206,ns=16209,as=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function is(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var rs,os,ss=e=>{if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<Ko||t.mode>16211?1:0},us=e=>{if(ss(e))return Ho;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Ko,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,$o},ls=e=>{if(ss(e))return Ho;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,us(e)},ds=(e,t)=>{var n;if(ss(e))return Ho;var a=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ho:(null!==a.window&&a.wbits!==t&&(a.window=null),a.wrap=n,a.wbits=t,ls(e))},hs=(e,t)=>{if(!e)return Ho;var n=new is;e.state=n,n.strm=e,n.window=null,n.mode=Ko;var a=ds(e,t);return a!==$o&&(e.state=null),a},cs=!0,ms=e=>{if(cs){rs=new Int32Array(512),os=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Wo(1,e.lens,0,288,rs,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Wo(2,e.lens,0,32,os,0,e.work,{bits:5}),cs=!1}e.lencode=rs,e.lenbits=9,e.distcode=os,e.distbits=5},fs=(e,t,n,a)=>{var i,r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),a>=r.wsize?(r.window.set(t.subarray(n-r.wsize,n),0),r.wnext=0,r.whave=r.wsize):((i=r.wsize-r.wnext)>a&&(i=a),r.window.set(t.subarray(n-a,n-a+i),r.wnext),(a-=i)?(r.window.set(t.subarray(n-a,n),0),r.wnext=a,r.whave=r.wsize):(r.wnext+=i,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=i))),0},vs=(e,t)=>{var n,a,i,r,o,s,u,l,d,h,c,m,f,v,p,g,y,b,w,k,S,E,M,P,T=0,_=new Uint8Array(4),D=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ss(e)||!e.output||!e.input&&0!==e.avail_in)return Ho;(n=e.state).mode===qo&&(n.mode=Jo),o=e.next_out,i=e.output,u=e.avail_out,r=e.next_in,a=e.input,s=e.avail_in,l=n.hold,d=n.bits,h=s,c=u,E=$o;e:for(;;)switch(n.mode){case Ko:if(0===n.wrap){n.mode=Jo;break}for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(2&n.wrap&&35615===l){0===n.wbits&&(n.wbits=15),n.check=0,_[0]=255&l,_[1]=l>>>8&255,n.check=bo(n.check,_,2,0),l=0,d=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=ns;break}if((15&l)!==Xo){e.msg="unknown compression method",n.mode=ns;break}if(d-=4,S=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=S),S>15||S>n.wbits){e.msg="invalid window size",n.mode=ns;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:qo,l=0,d=0;break;case 16181:for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(n.flags=l,(255&n.flags)!==Xo){e.msg="unknown compression method",n.mode=ns;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=ns;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=bo(n.check,_,2,0)),l=0,d=0,n.mode=16182;case 16182:for(;d<32;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,_[2]=l>>>16&255,_[3]=l>>>24&255,n.check=bo(n.check,_,4,0)),l=0,d=0,n.mode=16183;case 16183:for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=bo(n.check,_,2,0)),l=0,d=0,n.mode=16184;case 16184:if(1024&n.flags){for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=bo(n.check,_,2,0)),l=0,d=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((m=n.length)>s&&(m=s),m&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(a.subarray(r,r+m),S)),512&n.flags&&4&n.wrap&&(n.check=bo(n.check,a,m,r)),s-=m,r+=m,n.length-=m),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;m=0;do{S=a[r+m++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=bo(n.check,a,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;m=0;do{S=a[r+m++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=bo(n.check,a,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=ns;break}l=0,d=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=qo;break;case 16189:for(;d<32;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}e.adler=n.check=as(l),l=0,d=0,n.mode=Yo;case Yo:if(0===n.havedict)return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,Bo;e.adler=n.check=1,n.mode=qo;case qo:if(t===Oo||t===jo)break e;case Jo:if(n.last){l>>>=7&d,d-=7&d,n.mode=ts;break}for(;d<3;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}switch(n.last=1&l,d-=1,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(ms(n),n.mode=Zo,t===jo){l>>>=2,d-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=ns}l>>>=2,d-=2;break;case 16193:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ns;break}if(n.length=65535&l,l=0,d=0,n.mode=Qo,t===jo)break e;case Qo:n.mode=16195;case 16195:if(m=n.length){if(m>s&&(m=s),m>u&&(m=u),0===m)break e;i.set(a.subarray(r,r+m),o),s-=m,r+=m,u-=m,o+=m,n.length-=m;break}n.mode=qo;break;case 16196:for(;d<14;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(n.nlen=257+(31&l),l>>>=5,d-=5,n.ndist=1+(31&l),l>>>=5,d-=5,n.ncode=4+(15&l),l>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ns;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;d<3;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.lens[D[n.have++]]=7&l,l>>>=3,d-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},E=Wo(0,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,E){e.msg="invalid code lengths set",n.mode=ns;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;g=(T=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&T,!((p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(y<16)l>>>=p,d-=p,n.lens[n.have++]=y;else{if(16===y){for(P=p+2;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(l>>>=p,d-=p,0===n.have){e.msg="invalid bit length repeat",n.mode=ns;break}S=n.lens[n.have-1],m=3+(3&l),l>>>=2,d-=2}else if(17===y){for(P=p+3;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}d-=p,S=0,m=3+(7&(l>>>=p)),l>>>=3,d-=3}else{for(P=p+7;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}d-=p,S=0,m=11+(127&(l>>>=p)),l>>>=7,d-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ns;break}for(;m--;)n.lens[n.have++]=S}}if(n.mode===ns)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=ns;break}if(n.lenbits=9,M={bits:n.lenbits},E=Wo(1,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,E){e.msg="invalid literal/lengths set",n.mode=ns;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},E=Wo(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,E){e.msg="invalid distances set",n.mode=ns;break}if(n.mode=Zo,t===jo)break e;case Zo:n.mode=es;case es:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,xo(e,c),o=e.next_out,i=e.output,u=e.avail_out,r=e.next_in,a=e.input,s=e.avail_in,l=n.hold,d=n.bits,n.mode===qo&&(n.back=-1);break}for(n.back=0;g=(T=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&T,!((p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(g&&!(240&g)){for(b=p,w=g,k=y;g=(T=n.lencode[k+((l&(1<<b+w)-1)>>b)])>>>16&255,y=65535&T,!(b+(p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}l>>>=b,d-=b,n.back+=b}if(l>>>=p,d-=p,n.back+=p,n.length=y,0===g){n.mode=16205;break}if(32&g){n.back=-1,n.mode=qo;break}if(64&g){e.msg="invalid literal/length code",n.mode=ns;break}n.extra=15&g,n.mode=16201;case 16201:if(n.extra){for(P=n.extra;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;g=(T=n.distcode[l&(1<<n.distbits)-1])>>>16&255,y=65535&T,!((p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(!(240&g)){for(b=p,w=g,k=y;g=(T=n.distcode[k+((l&(1<<b+w)-1)>>b)])>>>16&255,y=65535&T,!(b+(p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}l>>>=b,d-=b,n.back+=b}if(l>>>=p,d-=p,n.back+=p,64&g){e.msg="invalid distance code",n.mode=ns;break}n.offset=y,n.extra=15&g,n.mode=16203;case 16203:if(n.extra){for(P=n.extra;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ns;break}n.mode=16204;case 16204:if(0===u)break e;if(m=c-u,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ns;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),v=n.window}else v=i,f=o-n.offset,m=n.length;m>u&&(m=u),u-=m,n.length-=m;do{i[o++]=v[f++]}while(--m);0===n.length&&(n.mode=es);break;case 16205:if(0===u)break e;i[o++]=n.length,u--,n.mode=es;break;case ts:if(n.wrap){for(;d<32;){if(0===s)break e;s--,l|=a[r++]<<d,d+=8}if(c-=u,e.total_out+=c,n.total+=c,4&n.wrap&&c&&(e.adler=n.check=n.flags?bo(n.check,i,c,o-c):go(n.check,i,c,o-c)),c=u,4&n.wrap&&(n.flags?l:as(l))!==n.check){e.msg="incorrect data check",n.mode=ns;break}l=0,d=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;d<32;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=ns;break}l=0,d=0}n.mode=16208;case 16208:E=zo;break e;case ns:E=Uo;break e;case 16210:return Go;default:return Ho}return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,(n.wsize||c!==e.avail_out&&n.mode<ns&&(n.mode<ts||t!==No))&&fs(e,e.output,e.next_out,c-e.avail_out),h-=e.avail_in,c-=e.avail_out,e.total_in+=h,e.total_out+=c,n.total+=c,4&n.wrap&&c&&(e.adler=n.check=n.flags?bo(n.check,i,c,e.next_out-c):go(n.check,i,c,e.next_out-c)),e.data_type=n.bits+(n.last?64:0)+(n.mode===qo?128:0)+(n.mode===Zo||n.mode===Qo?256:0),(0===h&&0===c||t===No)&&E===$o&&(E=Vo),E},ps={inflateReset:ls,inflateReset2:ds,inflateResetKeep:us,inflateInit:e=>hs(e,15),inflateInit2:hs,inflate:vs,inflateEnd:e=>{if(ss(e))return Ho;var t=e.state;return t.window&&(t.window=null),e.state=null,$o},inflateGetHeader:(e,t)=>{if(ss(e))return Ho;var n=e.state;return 2&n.wrap?(n.head=t,t.done=!1,$o):Ho},inflateSetDictionary:(e,t)=>{var n,a=t.length;return ss(e)||0!==(n=e.state).wrap&&n.mode!==Yo?Ho:n.mode===Yo&&go(1,t,a,0)!==n.check?Uo:fs(e,t,a,a)?(n.mode=16210,Go):(n.havedict=1,$o)},inflateInfo:"pako inflate (from Nodeca project)"};var gs=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},ys=Object.prototype.toString,bs=ko.Z_NO_FLUSH,ws=ko.Z_FINISH,ks=ko.Z_OK,Ss=ko.Z_STREAM_END,Es=ko.Z_NEED_DICT,Ms=ko.Z_STREAM_ERROR,Ps=ko.Z_DATA_ERROR,Ts=ko.Z_MEM_ERROR;function _s(e){this.options=Eo.assign({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Do,this.strm.avail_out=0;var n=ps.inflateInit2(this.strm,t.windowBits);if(n!==ks)throw new Error(wo[n]);if(this.header=new gs,ps.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=_o.string2buf(t.dictionary):"[object ArrayBuffer]"===ys.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ps.inflateSetDictionary(this.strm,t.dictionary))!==ks))throw new Error(wo[n])}function Ds(e,t){var n=new _s(t);if(n.push(e),n.err)throw n.msg||wo[n.err];return n.result}_s.prototype.push=function(e,t){var n,a,i,r=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(a=t===~~t?t:!0===t?ws:bs,"[object ArrayBuffer]"===ys.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),(n=ps.inflate(r,a))===Es&&s&&((n=ps.inflateSetDictionary(r,s))===ks?n=ps.inflate(r,a):n===Ps&&(n=Es));r.avail_in>0&&n===Ss&&r.state.wrap>0&&0!==e[r.next_in];)ps.inflateReset(r),n=ps.inflate(r,a);switch(n){case Ms:case Ps:case Es:case Ts:return this.onEnd(n),this.ended=!0,!1}if(i=r.avail_out,r.next_out&&(0===r.avail_out||n===Ss))if("string"===this.options.to){var u=_o.utf8border(r.output,r.next_out),l=r.next_out-u,d=_o.buf2string(r.output,u);r.next_out=l,r.avail_out=o-l,l&&r.output.set(r.output.subarray(u,u+l),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(n!==ks||0!==i){if(n===Ss)return n=ps.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},_s.prototype.onData=function(e){this.chunks.push(e)},_s.prototype.onEnd=function(e){e===ks&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Eo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var As={Inflate:_s,inflate:Ds,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Ds(e,t)},ungzip:Ds,constants:ko}.ungzip,xs=e=>{var t;if(null!=e&&e.includes(Bt))t=Ot;else{var n=null==e?void 0:e.find((e=>e.includes($t)));t=n?n.split("=")[1]:Wt}return(t=t.replace(/\/$/,""))+"/"+Ft},Cs=e=>{var t,n,a=Kr.getAppConfig(ze)||Kr.getAppConfig(Ze);return null!==(t=null==a||null===(n=a.capabilities)||void 0===n?void 0:n.includes(e))&&void 0!==t&&t},Is=e=>{var t=!Cs(le.THIRD_PARTY_TRANSACTIONS);return e&&!t&&Wn.info(`[${e}] Your plan does not have purchase management features.`),t};function Ls(e){try{var t=function(e){if("undefined"!=typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));for(var t=atob(e),n=t.length,a=new Uint8Array(n),i=0;i<n;i++)a[i]=t.charCodeAt(i);return a}(e.trim()),n=As(t),a=(new TextDecoder).decode(n);return JSON.parse(a)}catch(e){return}}function Fs(e,t,n){var a=n.value;return n.value=function(...e){if(!this.platformID)throw new Zr;return a.apply(this,e)},n}function Rs(e,t,n){var a=n.value;return n.value=function(...e){var t=Kr.getDevice();if(null==t||!t.id)throw new eo;return a.apply(this,e)},n}var Ws,Ns=function(){return c((function e(){s(this,e);var t=Kr.getNamiConfig();!this.platformID&&t&&this.configure(t)}),[{key:"deviceID",get:function(){var e;return null===(e=Kr.getDevice())||void 0===e?void 0:e.id}},{key:"configure",value:function(e){this.baseURL=xs(e.namiCommands),this.platformID=e.appPlatformID}},{key:"login",value:function(e){var t,n;return S((function(a){for(;;)switch(a.n){case 0:if(e){a.n=1;break}throw new to;case 1:return t=`device/${this.deviceID}/login/`,n={external_id:e},a.n=2,r(this.requestBodyAPI(t,n,"PUT"));case 2:return a.a(2,a.v)}}),null,this,null,Promise)}},{key:"logout",value:function(){var e;return S((function(t){for(;;)switch(t.n){case 0:return e=`device/${this.deviceID}/logout/`,t.n=1,r(this.requestBodyAPI(e,{},"PUT"));case 1:return t.a(2,t.v)}}),null,this,null,Promise)}},{key:"startSession",value:function(e){var t,n;return S((function(a){for(;;)switch(a.n){case 0:return t=`device/${this.deviceID}/session/`,a.n=1,r(this.requestBodyAPI(t,{start_time:e,app_env:"production"}));case 1:n=a.v,Kr.setSessionCounter(),n.id&&Kr.setSessionId(n.id);case 2:return a.a(2)}}),null,this,null,Promise)}},{key:"postImpression",value:function(e){var t,n;return S((function(a){for(;;)switch(a.n){case 0:return t=`device/${this.deviceID}/impression/`,a.n=1,r(this.requestBodyAPI(t,e,"POST",!0));case 1:(n=a.v).id&&Kr.setLastImpressionId(n.id);case 2:return a.a(2)}}),null,this,null,Promise)}},{key:"postConversion",value:function(e){var t;return S((function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/transaction/`,n.n=1,r(this.requestBodyAPI(t,e,"POST",!0));case 1:return n.a(2)}}),null,this,null,Promise)}},{key:"purchaseValidation",value:function(e){var t;return S((function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/purchase_event/`,n.n=1,r(this.requestBodyAPI(t,e,"PUT"));case 1:return n.a(2)}}),null,this,null,Promise)}},{key:"fetchAPI",value:function(e,t,n){var a;return S((function(i){for(;;)switch(i.n){case 0:return a=`${this.baseURL}/${this.platformID}/`+e,i.n=1,r(fo(a,void 0,t,n));case 1:return i.a(2,i.v)}}),null,this,null,Promise)}},{key:"requestBodyAPI",value:function(e,t,n="POST",a=!1,i,o){var s,u;return S((function(l){for(;;)switch(l.n){case 0:return s=`${this.baseURL}/${this.platformID}/`+e,u={method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:a},l.n=1,r(fo(s,u,i,o));case 1:return l.a(2,l.v)}}),null,this,null,Promise)}}],[{key:"configure",value:function(e){this.instance.configure(e)}}])}();function Os(e){return null!=(null==e?void 0:e.flow)}Ns.instance=new Ns,oe([Rs],Ns.prototype,"login",null),oe([Rs],Ns.prototype,"logout",null),oe([Rs],Ns.prototype,"startSession",null),oe([Rs],Ns.prototype,"postImpression",null),oe([Rs],Ns.prototype,"postConversion",null),oe([Rs],Ns.prototype,"purchaseValidation",null),oe([Fs],Ns.prototype,"fetchAPI",null),oe([Fs],Ns.prototype,"requestBodyAPI",null),exports.NamiCampaignRuleType=void 0,(Ws=exports.NamiCampaignRuleType||(exports.NamiCampaignRuleType={})).DEFAULT="default",Ws.LABEL="label",Ws.UNKNOWN="unknown",Ws.URL="url";var js=()=>{var e;return null!==(e=Kr.getPaywalls(at))&&void 0!==e?e:[]},$s=()=>{var e;return null!==(e=Kr.getPaywalls(Ge))&&void 0!==e?e:[]},zs=()=>Vr(Nn([...$s(),...js()]),"id"),Bs=e=>zs().find((t=>t.id===e)),Hs=e=>{var t=zs(),n=new Set(t.map((e=>e.id)));return e.every((e=>n.has(e)))};function Us(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gs,Vs={exports:{}};var Xs=(Gs||(Gs=1,Vs.exports=function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var a=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,a){void 0===a&&(a=!1);var i=e.getVersionPrecision(t),r=e.getVersionPrecision(n),o=Math.max(i,r),s=0,u=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),a=t+new Array(n+1).join(".0");return e.map(a.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(a&&(s=o-Math.min(i,r)),o-=1;o>=s;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===s)return 0;o-=1}else if(u[0][o]<u[1][o])return-1}},e.map=function(e,t){var n,a=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)a.push(t(e[n]));return a},e.find=function(e,t){var n,a;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,a=e.length;n<a;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,a=e,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(r));var s=function(){var e=r[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){a[t]=e[t]}))};for(t=0,n=r.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return a.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return a.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(91))&&a.__esModule?a:{default:a},r=n(18);function o(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var s=function(){function e(){}var t,n,a;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,a=[{key:"BROWSER_MAP",get:function(){return r.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return r.ENGINE_MAP}},{key:"OS_MAP",get:function(){return r.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return r.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),a&&o(t,a),e}();t.default=s,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var a=u(n(92)),i=u(n(93)),r=u(n(94)),o=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},a=0,i={},r=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,r+=1):"object"==typeof o&&(n[t]=o,a+=1)})),a>0){var o=Object.keys(n),u=s.default.find(o,(function(e){return t.isOS(e)}));if(u){var l=this.satisfies(n[u]);if(void 0!==l)return l}var d=s.default.find(o,(function(e){return t.isPlatform(e)}));if(d){var h=this.satisfies(n[d]);if(void 0!==h)return h}}if(r>0){var c=Object.keys(i),m=s.default.find(c,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(i[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),a=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(a);return t&&i&&(a=i.toLowerCase()),a===n},t.compareVersion=function(e){var t=[0],n=e,a=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(a=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(a=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,a))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=l,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(17))&&a.__esModule?a:{default:a},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(17))&&a.__esModule?a:{default:a},r=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:r.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),a={name:r.OS_MAP.MacOS,version:t};return n&&(a.versionName=n),a}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:r.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),a={name:r.OS_MAP.Android,version:t};return n&&(a.versionName=n),a}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:r.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:r.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:r.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:r.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(17))&&a.__esModule?a:{default:a},r=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:r.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(17))&&a.__esModule?a:{default:a},r=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:r.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:r.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:r.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:r.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:r.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})),Vs.exports),Ks=Us(Xs),Ys="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},qs="function"==typeof Ys.BigInt,Js=qs?Ys.BigInt.bind(Ys):void 0,Qs=qs?Js("0xffffffffffffffffffffffffffffffff"):null,Zs=qs?Js("0x100000000000000000000000000000000"):null,eu=qs?Js(0):null,tu=qs?Js(1):null,nu=qs?Js(8):null,au=qs?Js(1e4):null,iu=16,ru=1/iu,ou={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},su=e=>{if("undefined"==typeof window)return{os_version:"X.X.X",os_name:"Server",browser_name:"Unknown",browser_version:"X.X.X",sdk_client:"web",sdk_version:me,language:"en"};var t=Ks.getParser(window.navigator.userAgent),n=t.getPlatform(),a={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:me,language:window.navigator.language};if(n.type&&(a.form_factor=ou[n.type]),n.model&&(a.device_model=n.model),e&&e.length>0){var i=(e=>{var t=e.find((e=>e.includes(Ut))),n={platform:"",version:""};if(t){var a=t.split(Vt);n.platform=a[1],n.version=a[2]}return n})(e);a.extended_platform=i.platform,a.extended_platform_version=i.version}return a},uu=()=>{var e=Kr.getNamiConfig();if(e&&e.formFactor)return e.formFactor;if("undefined"==typeof window)return ou.desktop;var t=Ks.getParser(window.navigator.userAgent).getPlatform();return t.type?ou[t.type]:ou.desktop},lu={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4};var du=()=>{var e=window,t=e.innerWidth,n=e.innerHeight;return Math.min(t/1920,n/1080)||1};function hu(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function cu(e){if(!qs||!Qs)return vu(e);try{var t=Qs,n=function(e){if(!Js)throw new Error("BigInt is not supported in this environment");var t=e.replace(/-/g,"");return Js("0x"+t)}(e);return Number(n)/Number(t)*100}catch(t){throw Wn.error(`Error calculating audience split position for UUID ${e}`,t),new Error(`Invalid UUID format: ${e}`)}}function mu(e){if(!Js)throw new Error("BigInt is not supported in this environment");var t=e.toString(16).padStart(32,"0");t=t.substring(0,12)+"4"+t.substring(13);var n=3&parseInt(t[16],16)|8;return(t=t.substring(0,16)+n.toString(16)+t.substring(17)).slice(0,8)+"-"+t.slice(8,12)+"-"+t.slice(12,16)+"-"+t.slice(16,20)+"-"+t.slice(20)}function fu(e,t=.5){if(!Number.isFinite(e))throw new Error("Invalid target");if(!Number.isFinite(t))throw new Error("Invalid tolerance");var n=Math.max(0,Math.min(100,e)),a=Math.max(0,Math.min(50,t)),i=e=>Math.round(100*e),r=Math.max(0,i(n-a)),o=Math.min(1e4,i(n+a));if(!(qs&&Qs&&Js&&au))return function(e,t){for(var n=Math.max(0,Math.min(100,e-t)),a=Math.min(100,Math.max(0,e+t)),i=hu(),r=Number.POSITIVE_INFINITY,o=50,s=0;s<o;s++){var u=hu(),l=vu(u);if(l>=n&&l<=a)return u;var d=pu(l,n,a);d<r&&(r=d,i=u)}return i}(n,a);var s=Qs,u=Js,l=au,d=e=>s*u(e)/l,h=d(r),c=d(o);if(c<=h)return mu(h);var f=h+function(e){if(!Js||null===Zs||null===tu||null===eu||null===nu)throw new Error("BigInt is not supported in this environment");var t=Js,n=eu,a=tu,i=nu,r=Zs;if(e<n)throw new Error("n must be non-negative");if(e===n)return n;for(var o=new Uint8Array(16),s=e+a,u=r/s*s-a,l=0;l<10;){crypto.getRandomValues(o);for(var d,h=n,c=m(o);!(d=c()).done;)h=h<<i|t(d.value);if(h<=u)return h%s;l++}try{crypto.getRandomValues(o);for(var f,v=n,p=m(o);!(f=p()).done;)v=v<<i|t(f.value);var g=v%s;return Wn.warn("randomBigInt: reached max rejection attempts, using modulo fallback",{n:e.toString(),attempts:l}),g}catch(e){throw Wn.error("randomBigInt: failed to generate random values",e),new Error("randomBigInt: unable to generate random value")}}(c-h);return mu(f)}function vu(e){var t=function(e){var t=e.replace(/-/g,"").toLowerCase();if(!/^[0-9a-f]{32}$/.test(t))throw new Error(`Invalid UUID format: ${e}`);for(var n=0,a=t.length-1;a>=0;a--){n=(n+parseInt(t[a],iu))*ru}return n}(e);return 100*t}function pu(e,t,n){return e<t?t-e:e>n?e-n:0}var gu,yu=e=>{try{return Boolean(new URL(e))}catch(e){return!1}},bu=(e,t,n)=>e?e.flatMap((e=>{var a;if(a="string"==typeof n?e.segments.filter((e=>e.form_factors.some((e=>e.form_factor===n)))):e.segments,0===a.length)return[];var i=((e,t)=>{for(var n,a=[...e].sort(((e,t)=>e.split-t.split)),i=m(a);!(n=i()).done;){var r=n.value;if(t<=r.split)return r}return a[a.length-1]})(a,t);return{form_factors:i.form_factors,paywall:i.paywall,flow:i.flow,segment:i.segment,split:i.split,conversion_event_type:i.conversion_event_type,conversion_event_url:i.conversion_event_url,rule:e.rule,name:e.name,type:e.type,value:e.value,external_segment:e.external_segment}})):[],wu=()=>{var e,t,n=null!==(e=Kr.getCampaignRules(He))&&void 0!==e?e:[],a=null!==(t=Kr.getCampaignRules(tt))&&void 0!==t?t:[],i=uu(),r=Nn([...n,...a]).filter((e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some((e=>e.form_factor===i))}));return Vr(r,"rule")},ku=e=>{var t,n=null!==(t=Kr.getCampaignRules(e))&&void 0!==t?t:[],a=uu();return Nn(n).filter((e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some((e=>e.form_factor===a))}))},Su=()=>ku(tt),Eu=()=>ku(He),Mu=(e,t,n,a)=>{var i=e().find((e=>a?e.type==a&&e.value==n:e.type==exports.NamiCampaignRuleType.DEFAULT));if(!i)return{};var r=t().find((e=>(null==i?void 0:i.paywall)===e.id));return{campaign:i,paywall:r}},Pu=(e,t)=>{var n=Mu(Eu,$s,e,t);if(n.campaign&&n.paywall)return{campaign:n.campaign,paywall:n.paywall};var a=Mu(Su,js,e,t);return a.campaign&&a.paywall?{campaign:a.campaign,paywall:a.paywall}:n.campaign||n.paywall?{campaign:n.campaign,paywall:n.paywall}:{campaign:a.campaign,paywall:a.paywall}},Tu="object"==typeof Reflect?Reflect:null,_u=Tu&&"function"==typeof Tu.apply?Tu.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};gu=Tu&&"function"==typeof Tu.ownKeys?Tu.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Du=Number.isNaN||function(e){return e!=e};function Au(){Au.init.call(this)}Au.EventEmitter=Au,Au.prototype._events=void 0,Au.prototype._eventsCount=0,Au.prototype._maxListeners=void 0;var xu=10;function Cu(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Iu(e){return void 0===e._maxListeners?Au.defaultMaxListeners:e._maxListeners}function Lu(e,t,n,a){var i,r,o,s;if(Cu(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),o=r[t]),void 0===o)o=r[t]=n,++e._eventsCount;else if("function"==typeof o?o=r[t]=a?[n,o]:[o,n]:a?o.unshift(n):o.push(n),(i=Iu(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,s=u,console&&console.warn&&console.warn(s)}return e}function Fu(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ru(e,t,n){var a={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=Fu.bind(a);return i.listener=n,a.wrapFn=i,i}function Wu(e,t,n){var a=e._events;if(void 0===a)return[];var i=a[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):Ou(i,i.length)}function Nu(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function Ou(e,t){for(var n=new Array(t),a=0;a<t;++a)n[a]=e[a];return n}Object.defineProperty(Au,"defaultMaxListeners",{enumerable:!0,get:function(){return xu},set:function(e){if("number"!=typeof e||e<0||Du(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");xu=e}}),Au.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Au.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Du(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Au.prototype.getMaxListeners=function(){return Iu(this)},Au.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,i=this._events;if(void 0!==i)a=a&&void 0===i.error;else if(!a)return!1;if(a){var r;if(t.length>0&&(r=t[0]),r instanceof Error)throw r;var o=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw o.context=r,o}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)_u(s,this,t);else for(var u=s.length,l=Ou(s,u),d=0;d<u;++d)_u(l[d],this,t);return!0},Au.prototype.addListener=function(e,t){return Lu(this,e,t,!1)},Au.prototype.on=Au.prototype.addListener,Au.prototype.prependListener=function(e,t){return Lu(this,e,t,!0)},Au.prototype.once=function(e,t){return Cu(t),this.on(e,Ru(this,e,t)),this},Au.prototype.prependOnceListener=function(e,t){return Cu(t),this.prependListener(e,Ru(this,e,t)),this},Au.prototype.removeListener=function(e,t){var n,a,i,r,o;if(Cu(t),void 0===(a=this._events))return this;if(void 0===(n=a[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){o=n[r].listener,i=r;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(a[e]=n[0]),void 0!==a.removeListener&&this.emit("removeListener",e,o||t)}return this},Au.prototype.off=Au.prototype.removeListener,Au.prototype.removeAllListeners=function(e){var t,n,a;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,r=Object.keys(n);for(a=0;a<r.length;++a)"removeListener"!==(i=r[a])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(a=t.length-1;a>=0;a--)this.removeListener(e,t[a]);return this},Au.prototype.listeners=function(e){return Wu(this,e,!0)},Au.prototype.rawListeners=function(e){return Wu(this,e,!1)},Au.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Nu.call(e,t)},Au.prototype.listenerCount=Nu,Au.prototype.eventNames=function(){return this._eventsCount>0?gu(this._events):[]};var ju=function(){function e(){s(this,e),this.emitter=new Au}return c(e,[{key:"on",value:function(e,t){this.emitter.on(e,t)}},{key:"off",value:function(e,t){this.emitter.off(e,t)}},{key:"emit",value:function(e,...t){this.emitter.emit(e,...t)}},{key:"addListener",value:function(e,t){this.emitter.addListener(e,t)}},{key:"removeListener",value:function(e,t){this.emitter.removeListener(e,t)}},{key:"removeAllListeners",value:function(e){e?this.emitter.removeAllListeners(e):this.emitter.removeAllListeners()}},{key:"listeners",value:function(e){return this.emitter.listeners(e)}},{key:"listenerCount",value:function(e){return this.emitter.listenerCount(e)}}],[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}])}(),$u=function(){return c((function e(){s(this,e),this.disableCampaignUpdates=!1,this.currentFormFactor=uu()}),[{key:"configure",value:function(e,t,n=[]){this.currentFormFactor=e,this.splitPosition=t,this.disableCampaignUpdates=n.includes("disableCampaignUpdates")}},{key:"fetchCampaignRules",value:function(e){var t,n,a,i;return S((function(o){for(;;)switch(o.n){case 0:if(a=Kr.getDevice(),!this.disableCampaignUpdates){o.n=1;break}return Wn.info("Campaign updates disabled by configuration. Skipping fetch."),o.a(2,[]);case 1:if(null!=a&&a.id){o.n=3;break}return o.n=2,r(this.getAnonymousCampaigns());case 2:i=o.v,o.n=5;break;case 3:return o.n=4,r(this.getCampaigns(a.id));case 4:i=o.v;case 5:return i=null===(t=i)||void 0===t?void 0:t.filter((e=>{var t;return e.paywall&&e.form_factors.some((e=>e.form_factor===this.currentFormFactor))||e.flow&&(null===(t=e.flow)||void 0===t||null===(t=t.object)||void 0===t||null===(t=t.form_factors)||void 0===t?void 0:t.some((e=>e.form_factor===this.currentFormFactor)))})),i=null===(n=i)||void 0===n?void 0:n.filter((t=>{if(t.paywall){var n=e.find((e=>e.id==t.paywall));if(n)return t}else if(t.flow)return t})),Kr.setCampaignRules(He,i),this.invokeAvailableCampaignsResponseHandler(),o.a(2,i)}}),null,this,null,Promise)}},{key:"invokeAvailableCampaignsResponseHandler",value:function(){var e=ju.getInstance().listeners(bn),t=wu();e.forEach((e=>e(t)))}},{key:"getAnonymousCampaigns",value:function(e=me){var t,n,a,i,o;return S((function(s){for(;;)switch(s.p=s.n){case 0:return t=`campaign_rules/?sdk_version=${e}`,s.p=1,s.n=2,r(Ns.instance.fetchAPI(t));case 2:return a=s.v,s.a(2,bu(null!==(n=a.results)&&void 0!==n?n:[],this.splitPosition,this.currentFormFactor));case 3:if(s.p=3,o=s.v,i=this.fallbackData()){s.n=4;break}throw Wn.error(mo(o.status,t)),o;case 4:return s.a(2,i.results)}}),null,this,[[1,3]],Promise)}},{key:"getCampaigns",value:function(e){var t,n,a,i;return S((function(o){for(;;)switch(o.p=o.n){case 0:return n=`device/${e}/campaign_rules/`,o.p=1,o.n=2,r(Ns.instance.fetchAPI(n));case 2:a=o.v,o.n=4;break;case 3:if(o.p=3,i=o.v,a=this.fallbackData()){o.n=4;break}throw Wn.error(mo(i.status,n)),i;case 4:return o.a(2,(null===(t=a)||void 0===t?void 0:t.results)||[])}}),null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Kr.getCampaignRules(He)||Kr.getCampaignRules(tt);return e?{count:e.length,results:e}:null}}])}();function zu(e,t){return sr(e,t)}$u.instance=new $u;var Bu=function(){return c((function e(){s(this,e)}),[{key:"createOrUpdateDevice",value:function(e,t,n){var a=Kr.getDevice();if(null==a||!a.id){var i,r=f({},e,{id:null!==(i=null!=t?t:this.getAnonymousUUID())&&void 0!==i?i:hu()});return{id:r.id,device:this.createDevice(r,n)}}return this.isEqualDevices(a,e)?{id:a.id,device:Promise.resolve(a)}:(this.updateDevice(a.id,e),{id:a.id,device:null})}},{key:"createDevice",value:function(e,t){var n,a;return S((function(i){for(;;)switch(i.p=i.n){case 0:return i.p=0,i.n=1,r(this.requestAPIData("device/",e,void 0,void 0,0));case 1:if(!(n=i.v)){i.n=2;break}Kr.setDevice(n),i.n=3;break;case 2:return Wn.info("Device creation returned null, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),i.a(2,null);case 3:return i.a(2,n);case 4:if(i.p=4,a=i.v,console.error("Error creating device:",a),!(a instanceof Yr)){i.n=5;break}return Wn.info("Retry limit exceeded, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),i.a(2,null);case 5:throw a;case 6:return i.a(2)}}),null,this,[[0,4]],Promise)}},{key:"updateDevice",value:function(e,t){var n;return S((function(a){for(;;)switch(a.n){case 0:return a.n=1,r(this.requestAPIData(`device/${e}/`,t,"PUT"));case 1:return(n=a.v)&&Kr.setDevice(n),a.a(2,n)}}),null,this,null,Promise)}},{key:"updateDeviceField",value:function(e,t){var n,a,i;return S((function(o){for(;;)switch(o.n){case 0:if(n={[e]:t},null!=(a=Kr.getDevice())&&a.id){o.n=1;break}throw new eo;case 1:return o.n=2,r(this.requestAPIData(`device/${a.id}/`,n,"PATCH"));case 2:return(i=o.v)&&Kr.setDevice(i),o.a(2,i)}}),null,this,null,Promise)}},{key:"requestAPIData",value:function(e,t,n="POST",a=nn,i){var o,s;return S((function(u){for(;;)switch(u.p=u.n){case 0:return u.p=0,u.n=1,r(Ns.instance.requestBodyAPI(e,t,n,!1,a,i));case 1:o=u.v,u.n=5;break;case 2:if(u.p=2,!((s=u.v)instanceof Zr)){u.n=3;break}throw s;case 3:if(!("device/"===e&&s instanceof Yr)){u.n=4;break}throw s;case 4:if(o=Kr.getDevice()){u.n=5;break}return Wn.error(mo(s.status,e)),u.a(2,null);case 5:return u.a(2,o)}}),null,null,[[0,2]],Promise)}},{key:"isEqualDevices",value:function(e,t){var n=f({},e,t);return zu(Object.keys(e).reduce(((e,t)=>(e[t]=n[t],e)),{}),e)}},{key:"getOrCreateAnonymousUUID",value:function(){var e=Kr.getAnonymousUUID();return e||(e=hu(),Kr.setAnonymousUUID(e)),e}},{key:"getAnonymousUUID",value:function(){var e=Kr.getAnonymousUUID();return e?(Kr.clearAnonymousUUID(),e):null}}])}();Bu.instance=new Bu;var Hu=function(){return c((function e(){s(this,e)}),[{key:"fetchProducts",value:function(){var e,t,n,a;return S((function(i){for(;;)switch(i.p=i.n){case 0:if(!Cs(le.THIRD_PARTY_TRANSACTIONS)){i.n=1;break}return i.a(2,[]);case 1:return i.p=1,i.n=2,r(Ns.instance.fetchAPI("products/"));case 2:n=i.v,i.n=4;break;case 3:if(i.p=3,a=i.v,n=this.fallbackData()){i.n=4;break}throw Wn.error(mo(a.status,"products/")),a;case 4:return null!==(e=n)&&void 0!==e&&e.results&&Kr.setProducts(Xe,n.results),i.a(2,(null===(t=n)||void 0===t?void 0:t.results)||[])}}),null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Kr.getProducts(Xe)||Kr.getProducts(rt);return e?{count:e.length,results:e}:null}}])}();Hu.instance=new Hu;var Uu=function(){return c((function e(){s(this,e)}),[{key:"fetchPaywalls",value:function(){var e,t;return S((function(n){for(;;)switch(n.n){case 0:if(null!=(e=Kr.getDevice())&&e.id){n.n=2;break}return n.n=1,r(this.getAnonymousPaywalls());case 1:t=n.v,n.n=4;break;case 2:return n.n=3,r(this.getPaywalls(e.id));case 3:t=n.v;case 4:return t&&Kr.setPaywalls(Ge,t),n.a(2,t)}}),null,this,null,Promise)}},{key:"getAnonymousPaywalls",value:function(e=me){var t,n,a,i;return S((function(o){for(;;)switch(o.p=o.n){case 0:return n=`paywalls/?sdk_version=${e}`,a=null,o.p=1,o.n=2,r(Ns.instance.fetchAPI(n));case 2:a=o.v,o.n=4;break;case 3:if(o.p=3,i=o.v,a=this.fallbackData()){o.n=4;break}throw Wn.error(mo(i.status,n)),i;case 4:return o.a(2,(null===(t=a)||void 0===t?void 0:t.results)||[])}}),null,this,[[1,3]],Promise)}},{key:"getPaywalls",value:function(e){var t,n,a,i;return S((function(o){for(;;)switch(o.p=o.n){case 0:return n=`device/${e}/paywalls/`,o.p=1,o.n=2,r(Ns.instance.fetchAPI(n));case 2:a=o.v,o.n=4;break;case 3:if(o.p=3,i=o.v,a=this.fallbackData()){o.n=4;break}throw Wn.error(mo(i.status,n)),i;case 4:return o.a(2,(null===(t=a)||void 0===t?void 0:t.results)||[])}}),null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Kr.getPaywalls(Ge)||Kr.getPaywalls(at);return e?{count:e.length,results:e}:null}}])}();Uu.instance=new Uu;var Gu=function(){return c((function e(){s(this,e)}),[{key:"fetchConfig",value:function(){var e,t;return S((function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,r(Ns.instance.fetchAPI("config/"));case 1:e=n.v,n.n=3;break;case 2:if(n.p=2,t=n.v,e=Kr.getAppConfig(ze)||Kr.getAppConfig(Ze)){n.n=3;break}throw Wn.error(mo(t.status,"config/")),t;case 3:return e&&Kr.setAppConfig(ze,e),n.a(2,e)}}),null,null,[[0,2]],Promise)}}])}();Gu.instance=new Gu;var Vu=null;function Xu(){return!!Kr.getAnonymousMode()||!!Vu&&Vu.isInMemoryAnonymousMode()}var Ku=function(){return c((function e(){s(this,e)}),[{key:"startSession",value:function(){var e;return S((function(t){for(;;)switch(t.p=t.n){case 0:if(!Xu()){t.n=1;break}return Wn.debug("Skipping session start call - anonymous mode"),t.a(2);case 1:return t.p=1,t.n=2,r(Ns.instance.startSession(new Date));case 2:t.n=4;break;case 3:t.p=3,e=t.v,Wn.error("error on start session: ",e);case 4:return t.a(2)}}),null,null,[[1,3]],Promise)}}])}();Ku.instance=new Ku;var Yu=function(){return c((function e(){s(this,e)}),null,[{key:"allPurchases",value:function(){return[]}}])}();Yu.instance=new Yu;var qu={en:{nami_day:"day",nami_day_plural:"days",nami_week:"week",nami_week_plural:"weeks",nami_month:"month",nami_month_plural:"months",nami_year:"year",nami_year_plural:"years",nami_day_abbrev:"day",nami_day_abbrev_plural:"days",nami_week_abbrev:"wk",nami_week_abbrev_plural:"wks",nami_month_abbrev:"mo",nami_month_abbrev_plural:"mos",nami_year_abbrev:"yr",nami_year_abbrev_plural:"yrs",nami_daily:"daily",nami_weekly:"weekly",nami_biweekly:"bi-weekly",nami_monthly:"monthly",nami_bimonthly:"bi-monthly",nami_quarterly:"quarterly",nami_biannually:"bi-annually",nami_yearly:"yearly"},af:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dae",nami_week_abbrev:"week",nami_week_abbrev_plural:"weke",nami_month_abbrev:"ma",nami_month_abbrev_plural:"maande",nami_year_abbrev:"jr",nami_year_abbrev_plural:"jare",nami_daily:"daagliks",nami_weekly:"weekliks",nami_biweekly:"tweeweekliks",nami_monthly:"maandeliks",nami_bimonthly:"tweemaandeliks",nami_quarterly:"kwartaalliks",nami_biannually:"tweejaarliks",nami_yearly:"jaarliks"},am:{nami_day_abbrev:"ቀን",nami_day_abbrev_plural:"ቀናት",nami_week_abbrev:"ሳምንት",nami_week_abbrev_plural:"ሳምንታት",nami_month_abbrev:"ወር",nami_month_abbrev_plural:"ሞስ",nami_year_abbrev:"ዓመት",nami_year_abbrev_plural:"ዓመታት",nami_daily:"በየቀኑ",nami_weekly:"ሳምንታዊ",nami_biweekly:"በየሁለት ሳምንቱ",nami_monthly:"ወርሃዊ",nami_bimonthly:"በየሁለት ወሩ",nami_quarterly:"በየሩብ ዓመቱ",nami_biannually:"በየሁለት ዓመቱ",nami_yearly:"ዓመታዊ"},ar:{nami_day_abbrev:"يوم",nami_day_abbrev_plural:"أيام",nami_week_abbrev:"أسبوع",nami_week_abbrev_plural:"أسابيع",nami_month_abbrev:"شهر",nami_month_abbrev_plural:"موس",nami_year_abbrev:"سنة",nami_year_abbrev_plural:"سنوات",nami_daily:"يوميًا",nami_weekly:"أسبوعي",nami_biweekly:"كل أسبوعين",nami_monthly:"شهريا",nami_bimonthly:"كل شهرين",nami_quarterly:"ربع سنوي",nami_biannually:"مرتين في السنة",nami_yearly:"سنوي"},bg:{nami_day_abbrev:"ден",nami_day_abbrev_plural:"дни",nami_week_abbrev:"седмица",nami_week_abbrev_plural:"седмици",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год.",nami_year_abbrev_plural:"години",nami_daily:"ежедневно",nami_weekly:"седмично",nami_biweekly:"двуседмичен",nami_monthly:"месечно",nami_bimonthly:"двумесечно",nami_quarterly:"тримесечно",nami_biannually:"два пъти годишно",nami_yearly:"годишно"},ca:{nami_day_abbrev:"dia",nami_day_abbrev_plural:"dies",nami_week_abbrev:"setmana",nami_week_abbrev_plural:"setmanes",nami_month_abbrev:"mes",nami_month_abbrev_plural:"mesos",nami_year_abbrev:"any",nami_year_abbrev_plural:"anys",nami_daily:"diàriament",nami_weekly:"setmanal",nami_biweekly:"quinzenal",nami_monthly:"mensual",nami_bimonthly:"bimensual",nami_quarterly:"trimestral",nami_biannually:"bianualment",nami_yearly:"anual"},cs:{nami_day_abbrev:"den",nami_day_abbrev_plural:"dny",nami_week_abbrev:"týden",nami_week_abbrev_plural:"týdny",nami_month_abbrev:"měsíc",nami_month_abbrev_plural:"měsíce",nami_year_abbrev:"rok",nami_year_abbrev_plural:"roky",nami_daily:"denní",nami_weekly:"týdně",nami_biweekly:"dvoutýdenní",nami_monthly:"měsíční",nami_bimonthly:"dvouměsíčník",nami_quarterly:"čtvrtletní",nami_biannually:"pololetně",nami_yearly:"roční"},de:{nami_day_abbrev:"Tag",nami_day_abbrev_plural:"Tage",nami_week_abbrev:"Woche",nami_week_abbrev_plural:"Wochen",nami_month_abbrev:"Monat",nami_month_abbrev_plural:"Monate",nami_year_abbrev:"Jahr",nami_year_abbrev_plural:"Jahre",nami_daily:"täglich",nami_weekly:"wöchentlich",nami_biweekly:"zweiwöchentlich",nami_monthly:"monatlich",nami_bimonthly:"zweimonatlich",nami_quarterly:"vierteljährlich",nami_biannually:"halbjährlich",nami_yearly:"jährlich"},el:{nami_day_abbrev:"ημέρα",nami_day_abbrev_plural:"ημέρες",nami_week_abbrev:"εβδομάδα",nami_week_abbrev_plural:"εβδομάδες",nami_month_abbrev:"μήνα",nami_month_abbrev_plural:"μην",nami_year_abbrev:"έτος",nami_year_abbrev_plural:"χρόνια",nami_daily:"καθημερινά",nami_weekly:"εβδομαδιαίος",nami_biweekly:"ανά δύο εβδομάδες",nami_monthly:"μηνιαίος",nami_bimonthly:"διμηνιαίος",nami_quarterly:"τριμηνιαίος",nami_biannually:"ανά εξάμηνο",nami_yearly:"ετήσια"},es:{nami_day_abbrev:"día",nami_day_abbrev_plural:"días",nami_week_abbrev:"semana",nami_week_abbrev_plural:"semanas",nami_month_abbrev:"mes",nami_month_abbrev_plural:"meses",nami_year_abbrev:"año",nami_year_abbrev_plural:"años",nami_daily:"diario",nami_weekly:"semanal",nami_biweekly:"quincenal",nami_monthly:"mensual",nami_bimonthly:"bimensual",nami_quarterly:"trimestral",nami_biannually:"semestral",nami_yearly:"anual"},et:{nami_day_abbrev:"päev",nami_day_abbrev_plural:"päevad",nami_week_abbrev:"nädal",nami_week_abbrev_plural:"nädalat",nami_month_abbrev:"kuu",nami_month_abbrev_plural:"kuud",nami_year_abbrev:"aasta",nami_year_abbrev_plural:"aastat",nami_daily:"iga päev",nami_weekly:"iganädalane",nami_biweekly:"iga kahe nädala tagant",nami_monthly:"igakuine",nami_bimonthly:"kaks korda kuus",nami_quarterly:"kvartali",nami_biannually:"kaks korda aastas",nami_yearly:"iga-aastane"},fa:{nami_day_abbrev:"روز",nami_day_abbrev_plural:"روزها",nami_week_abbrev:"هفته",nami_week_abbrev_plural:"هفتهها",nami_month_abbrev:"مو",nami_month_abbrev_plural:"موش",nami_year_abbrev:"سال",nami_year_abbrev_plural:"سال",nami_daily:"روزانه",nami_weekly:"هفتگی",nami_biweekly:"دو هفتهای",nami_monthly:"ماهانه",nami_bimonthly:"دوماهه",nami_quarterly:"سه ماهه",nami_biannually:"دوسالانه",nami_yearly:"سالانه"},fi:{nami_day_abbrev:"päivä",nami_day_abbrev_plural:"päivää",nami_week_abbrev:"viikko",nami_week_abbrev_plural:"viikkoa",nami_month_abbrev:"kuukausi",nami_month_abbrev_plural:"kuukaudet",nami_year_abbrev:"vuosi",nami_year_abbrev_plural:"vuotta",nami_daily:"päivittäin",nami_weekly:"viikoittain",nami_biweekly:"joka toinen viikko",nami_monthly:"kuukausittain",nami_bimonthly:"kahdesti kuussa",nami_quarterly:"neljännesvuosittain",nami_biannually:"puolivuosittain",nami_yearly:"vuosittain"},fr:{nami_day_abbrev:"jour",nami_day_abbrev_plural:"jours",nami_week_abbrev:"semaine",nami_week_abbrev_plural:"semaines",nami_month_abbrev:"mois",nami_month_abbrev_plural:"mois",nami_year_abbrev:"année",nami_year_abbrev_plural:"ans",nami_daily:"tous les jours",nami_weekly:"hebdomadaire",nami_biweekly:"bihebdomadaire",nami_monthly:"mensuel",nami_bimonthly:"bimensuel",nami_quarterly:"trimestriel",nami_biannually:"bisannuel",nami_yearly:"annuel"},hi:{nami_day_abbrev:"दिन",nami_day_abbrev_plural:"दिन",nami_week_abbrev:"सप्त",nami_week_abbrev_plural:"सप्त",nami_month_abbrev:"महीना",nami_month_abbrev_plural:"महीने",nami_year_abbrev:"साल",nami_year_abbrev_plural:"वर्षीय",nami_daily:"दैनिक",nami_weekly:"साप्ताहिक",nami_biweekly:"द्वि-साप्ताहिक",nami_monthly:"महीने के",nami_bimonthly:"द्विमासिक",nami_quarterly:"त्रैमासिक",nami_biannually:"द्वि-वार्षिक रूप",nami_yearly:"वार्षिक"},hr:{nami_day_abbrev:"dan",nami_day_abbrev_plural:"dana",nami_week_abbrev:"tjedan",nami_week_abbrev_plural:"tjedni",nami_month_abbrev:"mjesec",nami_month_abbrev_plural:"mjeseca",nami_year_abbrev:"god.",nami_year_abbrev_plural:"godina",nami_daily:"dnevno",nami_weekly:"tjedno",nami_biweekly:"dvotjedno",nami_monthly:"mjesečno",nami_bimonthly:"dvomjesečno",nami_quarterly:"tromjesečno",nami_biannually:"dvogodišnje",nami_yearly:"godišnje"},hu:{nami_day_abbrev:"nap",nami_day_abbrev_plural:"napok",nami_week_abbrev:"hét",nami_week_abbrev_plural:"hetek",nami_month_abbrev:"hónap",nami_month_abbrev_plural:"hónap",nami_year_abbrev:"év",nami_year_abbrev_plural:"év",nami_daily:"napi",nami_weekly:"heti",nami_biweekly:"kéthetente",nami_monthly:"havi",nami_bimonthly:"kéthavonta",nami_quarterly:"negyedévenként",nami_biannually:"félévente",nami_yearly:"évi"},id:{nami_day_abbrev:"hari",nami_day_abbrev_plural:"hari",nami_week_abbrev:"minggu",nami_week_abbrev_plural:"minggu",nami_month_abbrev:"bulan",nami_month_abbrev_plural:"bulan",nami_year_abbrev:"tahun",nami_year_abbrev_plural:"tahun",nami_daily:"sehari-hari",nami_weekly:"mingguan",nami_biweekly:"dua kali seminggu",nami_monthly:"bulanan",nami_bimonthly:"dua bulanan",nami_quarterly:"triwulanan",nami_biannually:"dua tahunan",nami_yearly:"tahunan"},it:{nami_day_abbrev:"giorno",nami_day_abbrev_plural:"giorni",nami_week_abbrev:"settimana",nami_week_abbrev_plural:"settimane",nami_month_abbrev:"mese",nami_month_abbrev_plural:"mesi",nami_year_abbrev:"anno",nami_year_abbrev_plural:"anni",nami_daily:"quotidiano",nami_weekly:"settimanale",nami_biweekly:"bisettimanale",nami_monthly:"mensile",nami_bimonthly:"bimestrale",nami_quarterly:"trimestrale",nami_biannually:"semestralmente",nami_yearly:"annuale"},he:{nami_day_abbrev:"יְוֹם",nami_day_abbrev_plural:"ימים",nami_week_abbrev:"שבוע",nami_week_abbrev_plural:"שבועות",nami_month_abbrev:"מו",nami_month_abbrev_plural:"מוֹס",nami_year_abbrev:"שנה",nami_year_abbrev_plural:"שנים",nami_daily:"יוֹמִי",nami_weekly:"שְׁבוּעִי",nami_biweekly:"דו-שבועי",nami_monthly:"יַרחוֹן",nami_bimonthly:"דו-חודשי",nami_quarterly:"רִבעוֹן",nami_biannually:"דו-שנתי",nami_yearly:"שְׁנָתִי"},ja:{nami_day_abbrev:"日",nami_day_abbrev_plural:"日",nami_week_abbrev:"週",nami_week_abbrev_plural:"週",nami_month_abbrev:"モ",nami_month_abbrev_plural:"モス",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"毎日",nami_weekly:"毎週",nami_biweekly:"隔週",nami_monthly:"毎月",nami_bimonthly:"隔月",nami_quarterly:"四半期ごと",nami_biannually:"半年ごと",nami_yearly:"毎年"},ko:{nami_day_abbrev:"낮",nami_day_abbrev_plural:"날",nami_week_abbrev:"주",nami_week_abbrev_plural:"주",nami_month_abbrev:"모",nami_month_abbrev_plural:"모스",nami_year_abbrev:"년",nami_year_abbrev_plural:"년",nami_daily:"일일",nami_weekly:"주간",nami_biweekly:"격주 간행물",nami_monthly:"월간 간행물",nami_bimonthly:"격월",nami_quarterly:"계간지",nami_biannually:"반년마다",nami_yearly:"매년"},lt:{nami_day_abbrev:"diena",nami_day_abbrev_plural:"dienos",nami_week_abbrev:"savaitė",nami_week_abbrev_plural:"savaitės",nami_month_abbrev:"mėn.",nami_month_abbrev_plural:"mėn.",nami_year_abbrev:"metai",nami_year_abbrev_plural:"metų",nami_daily:"kasdien",nami_weekly:"kas savaitę",nami_biweekly:"kas dvi savaites",nami_monthly:"mėnesinis",nami_bimonthly:"kas du mėnesius",nami_quarterly:"ketvirtinis",nami_biannually:"kas du kartus per metus",nami_yearly:"kasmet"},lv:{nami_day_abbrev:"diena",nami_day_abbrev_plural:"dienas",nami_week_abbrev:"nedēļa",nami_week_abbrev_plural:"nedēļas",nami_month_abbrev:"mēn.",nami_month_abbrev_plural:"mēn.",nami_year_abbrev:"gads",nami_year_abbrev_plural:"gadi",nami_daily:"ikdienas",nami_weekly:"iknedēļas",nami_biweekly:"divreiz nedēļā",nami_monthly:"ikmēneša",nami_bimonthly:"divreiz mēnesī",nami_quarterly:"ceturksnī",nami_biannually:"divreiz gadā",nami_yearly:"katru gadu"},ms:{nami_day_abbrev:"hari",nami_day_abbrev_plural:"hari",nami_week_abbrev:"minggu",nami_week_abbrev_plural:"minggu",nami_month_abbrev:"bulan",nami_month_abbrev_plural:"bulan",nami_year_abbrev:"tahun",nami_year_abbrev_plural:"tahun",nami_daily:"setiap hari",nami_weekly:"mingguan",nami_biweekly:"dua minggu sekali",nami_monthly:"bulanan",nami_bimonthly:"dua kali sebulan",nami_quarterly:"suku tahunan",nami_biannually:"dua kali setahun",nami_yearly:"tahunan"},nl:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dagen",nami_week_abbrev:"week",nami_week_abbrev_plural:"weken",nami_month_abbrev:"maand",nami_month_abbrev_plural:"maanden",nami_year_abbrev:"jaar",nami_year_abbrev_plural:"jaren",nami_daily:"dagelijks",nami_weekly:"wekelijks",nami_biweekly:"tweewekelijks",nami_monthly:"maandelijks",nami_bimonthly:"tweemaandelijks",nami_quarterly:"kwartaal",nami_biannually:"halfjaarlijks",nami_yearly:"jaarlijks"},no:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dager",nami_week_abbrev:"uke",nami_week_abbrev_plural:"uker",nami_month_abbrev:"måned",nami_month_abbrev_plural:"måned",nami_year_abbrev:"år",nami_year_abbrev_plural:"år",nami_daily:"daglig",nami_weekly:"ukentlig",nami_biweekly:"annenhver uke",nami_monthly:"månedlig",nami_bimonthly:"annenhver måned",nami_quarterly:"kvartalsvis",nami_biannually:"to ganger i året",nami_yearly:"årlig"},pl:{nami_day_abbrev:"dzień",nami_day_abbrev_plural:"dni",nami_week_abbrev:"tydzień",nami_week_abbrev_plural:"tygodni",nami_month_abbrev:"miesiąc",nami_month_abbrev_plural:"miesiące",nami_year_abbrev:"rok",nami_year_abbrev_plural:"lat",nami_daily:"codziennie",nami_weekly:"tygodnik",nami_biweekly:"dwutygodniowy",nami_monthly:"miesięczny",nami_bimonthly:"dwumiesięczny",nami_quarterly:"kwartalny",nami_biannually:"dwa razy w roku",nami_yearly:"rocznie"},pt:{nami_day_abbrev:"dia",nami_day_abbrev_plural:"dias",nami_week_abbrev:"semana",nami_week_abbrev_plural:"semanas",nami_month_abbrev:"mês",nami_month_abbrev_plural:"meses",nami_year_abbrev:"ano",nami_year_abbrev_plural:"anos",nami_daily:"diário",nami_weekly:"semanalmente",nami_biweekly:"quinzenal",nami_monthly:"mensal",nami_bimonthly:"bimestral",nami_quarterly:"trimestral",nami_biannually:"bianualmente",nami_yearly:"anual"},ro:{nami_day_abbrev:"zi",nami_day_abbrev_plural:"zile",nami_week_abbrev:"săptămână",nami_week_abbrev_plural:"săptămâni",nami_month_abbrev:"lună",nami_month_abbrev_plural:"luni",nami_year_abbrev:"an",nami_year_abbrev_plural:"ani",nami_daily:"zilnic",nami_weekly:"săptămânal",nami_biweekly:"la două săptămâni",nami_monthly:"lunar",nami_bimonthly:"bilunar",nami_quarterly:"trimestrial",nami_biannually:"bianual",nami_yearly:"anual"},ru:{nami_day_abbrev:"день",nami_day_abbrev_plural:"дни",nami_week_abbrev:"нед",nami_week_abbrev_plural:"недели",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год",nami_year_abbrev_plural:"лет",nami_daily:"ежедневно",nami_weekly:"еженедельный",nami_biweekly:"раз в две недели",nami_monthly:"ежемесячно",nami_bimonthly:"раз в два месяца",nami_quarterly:"ежеквартальный",nami_biannually:"раз в два года",nami_yearly:"ежегодно"},sk:{nami_day_abbrev:"deň",nami_day_abbrev_plural:"dni",nami_week_abbrev:"týždeň",nami_week_abbrev_plural:"týždne",nami_month_abbrev:"mesiac",nami_month_abbrev_plural:"mesiacov",nami_year_abbrev:"rok",nami_year_abbrev_plural:"rokov",nami_daily:"denne",nami_weekly:"týždenne",nami_biweekly:"dvojtýždenne",nami_monthly:"mesačne",nami_bimonthly:"dvojmesačne",nami_quarterly:"štvrťročne",nami_biannually:"polročne",nami_yearly:"ročne"},sl:{nami_day_abbrev:"dan",nami_day_abbrev_plural:"dni",nami_week_abbrev:"teden",nami_week_abbrev_plural:"tedni",nami_month_abbrev:"mesec",nami_month_abbrev_plural:"mesecev",nami_year_abbrev:"leto",nami_year_abbrev_plural:"let",nami_daily:"dnevno",nami_weekly:"tedensko",nami_biweekly:"dvotedensko",nami_monthly:"mesečno",nami_bimonthly:"dvomesečno",nami_quarterly:"četrtletno",nami_biannually:"polletno",nami_yearly:"letno"},sr:{nami_day_abbrev:"дан",nami_day_abbrev_plural:"дана",nami_week_abbrev:"недеља",nami_week_abbrev_plural:"недеље",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год.",nami_year_abbrev_plural:"године",nami_daily:"свакодневно",nami_weekly:"недељно",nami_biweekly:"двонедељно",nami_monthly:"месечно",nami_bimonthly:"двомесечно",nami_quarterly:"квартално",nami_biannually:"два пута годишње",nami_yearly:"годишње"},sv:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dagar",nami_week_abbrev:"vecka",nami_week_abbrev_plural:"veckor",nami_month_abbrev:"mån",nami_month_abbrev_plural:"månader",nami_year_abbrev:"år",nami_year_abbrev_plural:"år",nami_daily:"dagligen",nami_weekly:"varje vecka",nami_biweekly:"som utkommer varannan vecka",nami_monthly:"månatlig",nami_bimonthly:"varannan månad",nami_quarterly:"kvartalsvis",nami_biannually:"vartannat år",nami_yearly:"årlig"},sw:{nami_day_abbrev:"siku",nami_day_abbrev_plural:"siku",nami_week_abbrev:"wiki",nami_week_abbrev_plural:"wiki",nami_month_abbrev:"mwezi",nami_month_abbrev_plural:"miezi",nami_year_abbrev:"mwaka",nami_year_abbrev_plural:"miaka",nami_daily:"kila siku",nami_weekly:"kila wiki",nami_biweekly:"kila wiki mbili",nami_monthly:"kila mwezi",nami_bimonthly:"kila baada ya miezi miwili",nami_quarterly:"robo mwaka",nami_biannually:"kila baada ya miaka miwili",nami_yearly:"kila mwaka"},th:{nami_day_abbrev:"วัน",nami_day_abbrev_plural:"วัน",nami_week_abbrev:"สัปดาห์",nami_week_abbrev_plural:"สัปดาห์",nami_month_abbrev:"โม",nami_month_abbrev_plural:"มอส",nami_year_abbrev:"ปี",nami_year_abbrev_plural:"ปี",nami_daily:"รายวัน",nami_weekly:"รายสัปดาห์",nami_biweekly:"สองสัปดาห์ครั้ง",nami_monthly:"รายเดือน",nami_bimonthly:"สองเดือนครั้ง",nami_quarterly:"ไตรมาส",nami_biannually:"ทุกสองปี",nami_yearly:"ทุกปี"},tr:{nami_day_abbrev:"gün",nami_day_abbrev_plural:"günler",nami_week_abbrev:"hafta",nami_week_abbrev_plural:"haftalar",nami_month_abbrev:"ay",nami_month_abbrev_plural:"aylar",nami_year_abbrev:"yıl",nami_year_abbrev_plural:"yıllar",nami_daily:"günlük",nami_weekly:"haftalık",nami_biweekly:"iki haftada bir",nami_monthly:"aylık",nami_bimonthly:"iki ayda bir",nami_quarterly:"üç aylık",nami_biannually:"iki yılda bir",nami_yearly:"yıllık"},uk:{nami_day_abbrev:"день",nami_day_abbrev_plural:"дні",nami_week_abbrev:"тиждень",nami_week_abbrev_plural:"тижні",nami_month_abbrev:"місяць",nami_month_abbrev_plural:"мос",nami_year_abbrev:"рік",nami_year_abbrev_plural:"років",nami_daily:"щоденно",nami_weekly:"щотижня",nami_biweekly:"раз на два тижні",nami_monthly:"щомісяця",nami_bimonthly:"раз на два місяці",nami_quarterly:"щоквартально",nami_biannually:"раз на півроку",nami_yearly:"щорічно"},vi:{nami_day_abbrev:"ngày",nami_day_abbrev_plural:"ngày",nami_week_abbrev:"tuần",nami_week_abbrev_plural:"tuần",nami_month_abbrev:"tháng",nami_month_abbrev_plural:"tháng",nami_year_abbrev:"năm",nami_year_abbrev_plural:"năm",nami_daily:"hằng ngày",nami_weekly:"hàng tuần",nami_biweekly:"hai tuần một lần",nami_monthly:"hàng tháng",nami_bimonthly:"hai tháng một lần",nami_quarterly:"hàng quý",nami_biannually:"hai năm một lần",nami_yearly:"hàng năm"},"zh-CN":{nami_day_abbrev:"天",nami_day_abbrev_plural:"天",nami_week_abbrev:"周",nami_week_abbrev_plural:"周",nami_month_abbrev:"莫",nami_month_abbrev_plural:"莫斯",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"日常的",nami_weekly:"每周",nami_biweekly:"每两周一次",nami_monthly:"月度",nami_bimonthly:"双月刊",nami_quarterly:"季刊",nami_biannually:"每半年",nami_yearly:"每年"},"zh-TW":{nami_day_abbrev:"天",nami_day_abbrev_plural:"天",nami_week_abbrev:"週",nami_week_abbrev_plural:"週",nami_month_abbrev:"莫",nami_month_abbrev_plural:"莫斯",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"日常的",nami_weekly:"每週",nami_biweekly:"每兩週一次",nami_monthly:"每月",nami_bimonthly:"雙月刊",nami_quarterly:"季刊",nami_biannually:"每半年",nami_yearly:"每年"},zu:{nami_day_abbrev:"usuku",nami_day_abbrev_plural:"izinsuku",nami_week_abbrev:"isonto",nami_week_abbrev_plural:"amasonto",nami_month_abbrev:"inyanga",nami_month_abbrev_plural:"i-mos",nami_year_abbrev:"unyaka",nami_year_abbrev_plural:"iminyaka",nami_daily:"nsuku zonke",nami_weekly:"masonto onke",nami_biweekly:"kabili ngesonto",nami_monthly:"nyanga zonke",nami_bimonthly:"kabili ngenyanga",nami_quarterly:"njalo ngekota",nami_biannually:"kabili ngonyaka",nami_yearly:"minyaka yonke"}},Ju="en";function Qu(e){var t,n,a=function(e){if(!e)return Ju;var t=e.trim();if(qu[t])return t;var n=t.toLowerCase(),a=n.split("-")[0];return qu[a]?a:"zh"===a?n.includes("tw")||n.includes("hk")?"zh-TW":"zh-CN":Ju}(Kr.getLanguageCode()),i=null!==(t=qu[a])&&void 0!==t?t:qu[Ju];return null!==(n=null==i?void 0:i[e])&&void 0!==n?n:e}var Zu=e=>"subscription"===e;function el(e){if(Zu(null==e?void 0:e.product_type)){var t=nl(e);if(t.length>0)return t[0].billingPeriod}return null}function tl(e){var t=function(e){if(!e)return[];var t=e.offers.filter((e=>"promo"===e.offer_type));return al(t,e.subscription_period)}(e).find((e=>0===e.priceAmountMicros));return(null==t?void 0:t.billingPeriod)||null}function nl(e){return e?al(e.offers.filter((e=>"default"===e.offer_type)),e.subscription_period):[]}function al(e,t){return e.map((e=>il(e,t)))}function il(e,t){var n,a,i,r,o,s,u,l;if(!e)return{};var d=null!==(n=null===(a=e.promo_period)||void 0===a?void 0:a.count)&&void 0!==n?n:null==t?void 0:t.count,h=null!==(i=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==i?i:null==t?void 0:t.type,c=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:sl(m).format(c)}}function rl(e,t=!1,n=!1,a=!1,i=!1){if(!e)return null;var r=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!r)return null;var o=r.slice(1).map((e=>parseInt(e))),s=o[0],u=o[1],l=o[2],d=o[3],h=(e,t,n,a,r)=>{var o=(e=>i?`${e}_abbrev`:e)(r),s=(e=>i?`${e}_abbrev_plural`:`${e}_plural`)(r),u=Qu(o),l=Qu(s);return i||u!==o||(u=Qu(`${r}_abbrev`)),i||l!==s||(l=Qu(`${r}_abbrev_plural`)),a?e.toString():n?1===e||t?u:l:1===e||t?`${e} ${u}`:`${e} ${l}`};switch(e.at(-1)){case"D":return h(d,t,n,a,"nami_day");case"W":return h(l,t,n,a,"nami_week");case"M":return h(u,t,n,a,"nami_month");case"Y":return h(s,t,n,a,"nami_year")}return null}function ol(e){var t;if(!e||e.length<2)return!1;var n=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===n||"Y"===n}function sl(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,f({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,f({},t,{style:"currency",currency:"USD"}))}}var ul=(e,t,n)=>e&&t&&n?n.format(e-t):null,ll=(e,t,n,a)=>{if(e&&t&&n&&a){var i=100*(1-e/(n/a*t));return`${Math.round(i)}%`}return null},dl=(e,t)=>{if(""!=t){var n=parseInt(t)-1;return n>=0&&n<(null==e?void 0:e.length)?e[n]:null==e?void 0:e.find((e=>e.sku_ref_id===t))}},hl=e=>ml(e.priceAmountMicros)/cl(e.billingPeriod),cl=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},ml=e=>e/1e6;function fl(e){return parseFloat((Math.round(e)/100).toFixed(2))}var vl=(e,t,n=[])=>({price:()=>yl(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>bl(e),durationSingular:()=>bl(e,!0),period:()=>bl(e,!1,!0),periodNumber:()=>bl(e,!1,!1,!0),freeTrialDuration:()=>wl(e),freeTrialDurationSingular:()=>wl(e,!0),freeTrialPeriod:()=>wl(e,!1,!0),freeTrialPeriodNumber:()=>wl(e,!1,!1,!0),pricePerMonth:()=>kl(e),pricePerMonthRounded:()=>kl(e,!0),periodInMonths:()=>Sl(e),durationInMonths:()=>El(e),durationInMonthsSingular:()=>El(e,!0),periodNumberInMonths:()=>Ml(e),percentagePriceDifferenceFromSku:()=>Pl(e,t,n),priceDifferenceFromSku:()=>Tl(e,t,n),promoEligible:()=>null===_l(e)&&null!==Dl(e,t),freeTrialEligible:()=>null!==_l(e),promo:()=>{var n;return null===(n=Dl(e,t))||void 0===n?void 0:n.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var n;return null===(n=Al(e,t))||void 0===n?void 0:n.formattedPrice},promoPeriod:()=>xl(e,t,!1,!0),promoPeriodNumber:()=>xl(e,t,!1,!1,!0),promoDuration:()=>xl(e,t),promoDurationSingular:()=>xl(e,t,!0),introEligible:()=>!1,pricePerDay:()=>Cl(e),pricePerWeek:()=>Il(e),pricePerWeekRounded:()=>Il(e,!0),introductoryPrice:()=>Ll(e,t),introductoryPeriod:()=>Fl(e,t,!1,!0),introductoryPeriodNumber:()=>Fl(e,t,!1,!1,!0),introductoryDuration:()=>Fl(e,t),introductoryDurationSingular:()=>Fl(e,t,!0),introductoryPricePerMonth:()=>Rl(e,t),introductoryPricePerMonthRounded:()=>Rl(e,t,!0),durationAbbrev:()=>bl(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>wl(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>Fl(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>xl(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>xl(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>El(e,!1,!1,!1,!0),durationSingularAbbrev:()=>bl(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>wl(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>Fl(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>xl(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>xl(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>El(e,!0,!1,!1,!0),periodAbbrev:()=>bl(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>wl(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>Fl(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>xl(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>xl(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>El(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;var t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;var n=t[1],a=t[2],i=t[3],r=t[4],o=void 0!==n?parseInt(n,10):0,s=void 0!==a?parseInt(a,10):0,u=void 0!==i?parseInt(i,10):0;return(void 0!==r?parseInt(r,10):0)>0?null:u>0?1===u?Qu("nami_weekly"):2===u?Qu("nami_biweekly"):null:s>0?Qu(1===s?"nami_monthly":2===s?"nami_bimonthly":3===s?"nami_quarterly":6===s?"nami_biannually":12===s?"nami_yearly":"nami_monthly"):o>0?Qu("nami_yearly"):null}(el(e)),iso_subscription_duration:()=>Nl(e),invalid:()=>!1,unavailable:()=>!1}),pl=()=>Object.keys(vl({})),gl=(e,t,n,a=[])=>{if(!t)return null;var i=vl(t,n,a);return i[e]?i[e]():null},yl=e=>{var t=nl(e);return t&&t.length?t[0].formattedPrice:null},bl=(e,t,n,a,i)=>rl(el(e),t,n,a,i),wl=(e,t,n,a,i)=>rl(tl(e),t,n,a,i),kl=(e,t)=>{var n=nl(e);if(!n||0===n.length)return null;var a=hl(n[0]);return a?sl(n[0].priceCurrencyCode).format(t?Math.round(a):a):null},Sl=(e,t)=>{var n=nl(e);if(!n||0===n.length)return null;var a=n[0].billingPeriod;return ol(a)?rl("P1Y"===a?"P12M":a,!1,!1,!1,t):null},El=(e,t,n,a,i)=>{var r=nl(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return ol(o)?rl("P1Y"===o?"P12M":o,t,n,a,i):null},Ml=e=>{if(!e)return 0;var t=nl(e);return t&&t.length?cl(t[0].billingPeriod):0},Pl=(e,t,n=[])=>{var a,i=nl(e);if(!i||0===i.length)return null;var r=null===(a=dl(n,null!=t?t:""))||void 0===a?void 0:a.product_details;if(!t||!r)return ll(fl(i[0].priceAmountMicros),Ml(e));var o=nl(r);return ll(fl(i[0].priceAmountMicros),Ml(e),(null==o?void 0:o.length)>0?fl(o[0].priceAmountMicros):0,Ml(r))},Tl=(e,t,n=[])=>{var a,i=nl(e);if(!i||0===i.length)return null;var r=null===(a=dl(n,null!=t?t:""))||void 0===a?void 0:a.product_details;if(!t||!r)return ul(hl(i[0]));var o=nl(r);return ul(hl(i[0]),hl(o[0]),sl(o[0].priceCurrencyCode))},_l=e=>tl(e),Dl=(e,t)=>{if(!e)return null;var n=e.offers.filter((e=>"promo"===e.offer_type));if(!t)return n[0]||null;var a=n[parseInt(t)];return a?a||null:n.find((e=>e.offer_ref_id===t))||null},Al=(e,t)=>e?il(Dl(e,t),e.subscription_period):null,xl=(e,t,n,a,i,r)=>{var o=Al(e,t);return rl((null==o?void 0:o.billingPeriod)||null,n,a,i,r)},Cl=(e,t)=>{var n=nl(e);if(!n||0===n.length)return null;var a,i,r=ml(n[0].priceAmountMicros)/(a=n[0].billingPeriod,(i=cl(a))?30.437*i:1);return r?sl(n[0].priceCurrencyCode).format(r):null},Il=(e,t)=>{var n=nl(e);if(!n||0===n.length)return null;var a,i,r=ml(n[0].priceAmountMicros)/(a=n[0].billingPeriod,(i=cl(a))?52*i/12:1);return r?sl(n[0].priceCurrencyCode).format(t?Math.round(r):r):null},Ll=(e,t)=>{var n=Wl(e,t);return(null==n?void 0:n.formattedPrice)||null},Fl=(e,t,n,a,i,r)=>{var o=Wl(e,t);return rl((null==o?void 0:o.billingPeriod)||null,n,a,i,r)},Rl=(e,t,n)=>{var a=Wl(e,t);if(a){var i=ml(a.priceAmountMicros),r=cl(a.billingPeriod),o=n?Math.round(i/r):i/r;return sl(a.priceCurrencyCode).format(o)}},Wl=(e,t)=>{return e?(t?(n=e.offers[parseInt(t)])||(n=e.offers.find((e=>e.offer_ref_id===t))||null):n=e.offers[0],il(n,e.subscription_period)):null;var n},Nl=e=>{var t=el(e);return t?"P7D"===t?"P1W":t:null};function Ol(e,t,n){var a=e.length;return n=void 0===n?a:n,!t&&n>=a?e:function(e,t,n){var a=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(i);++a<i;)r[a]=e[a+t];return r}(e,t,n)}var jl=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function $l(e){return jl.test(e)}var zl="\\ud800-\\udfff",Bl="["+zl+"]",Hl="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ul="\\ud83c[\\udffb-\\udfff]",Gl="[^"+zl+"]",Vl="(?:\\ud83c[\\udde6-\\uddff]){2}",Xl="[\\ud800-\\udbff][\\udc00-\\udfff]",Kl="(?:"+Hl+"|"+Ul+")"+"?",Yl="[\\ufe0e\\ufe0f]?",ql=Yl+Kl+("(?:\\u200d(?:"+[Gl,Vl,Xl].join("|")+")"+Yl+Kl+")*"),Jl="(?:"+[Gl+Hl+"?",Hl,Vl,Xl,Bl].join("|")+")",Ql=RegExp(Ul+"(?="+Ul+")|"+Jl+ql,"g");function Zl(e){return $l(e)?function(e){return e.match(Ql)||[]}(e):function(e){return e.split("")}(e)}var ed,td=(ed="toUpperCase",function(e){var t=$l(e=xr(e))?Zl(e):void 0,n=t?t[0]:e.charAt(0),a=t?Ol(t,1).join(""):e.slice(1);return n[ed]()+a});var nd,ad=(nd={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==nd?void 0:nd[e]}),id=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rd=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var od=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var sd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var ud="\\ud800-\\udfff",ld="\\u2700-\\u27bf",dd="a-z\\xdf-\\xf6\\xf8-\\xff",hd="A-Z\\xc0-\\xd6\\xd8-\\xde",cd="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",md="["+cd+"]",fd="\\d+",vd="["+ld+"]",pd="["+dd+"]",gd="[^"+ud+cd+fd+ld+dd+hd+"]",yd="(?:\\ud83c[\\udde6-\\uddff]){2}",bd="[\\ud800-\\udbff][\\udc00-\\udfff]",wd="["+hd+"]",kd="(?:"+pd+"|"+gd+")",Sd="(?:"+wd+"|"+gd+")",Ed="(?:['’](?:d|ll|m|re|s|t|ve))?",Md="(?:['’](?:D|LL|M|RE|S|T|VE))?",Pd="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Td="[\\ufe0e\\ufe0f]?",_d=Td+Pd+("(?:\\u200d(?:"+["[^"+ud+"]",yd,bd].join("|")+")"+Td+Pd+")*"),Dd="(?:"+[vd,yd,bd].join("|")+")"+_d,Ad=RegExp([wd+"?"+pd+"+"+Ed+"(?="+[md,wd,"$"].join("|")+")",Sd+"+"+Md+"(?="+[md,wd+kd,"$"].join("|")+")",wd+"?"+kd+"+"+Ed,wd+"+"+Md,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fd,Dd].join("|"),"g");function xd(e,t,n){return e=xr(e),void 0===t?function(e){return sd.test(e)}(e)?function(e){return e.match(Ad)||[]}(e):function(e){return e.match(od)||[]}(e):e.match(t)||[]}var Cd=RegExp("['’]","g");var Id,Ld=(Id=function(e,t,n){return t=t.toLowerCase(),e+(n?td(xr(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var a=-1,i=null==e?0:e.length;++a<i;)n=t(n,e[a],a,e);return n}(xd(function(e){return(e=xr(e))&&e.replace(id,ad).replace(rd,"")}(e).replace(Cd,"")),Id,"")});function Fd(e,t,n,a){var i=n.flatMap((e=>e.products)).find((e=>e.id===t.selectedProducts[t.currentGroupId]));return Wd(zd(e,null==i?void 0:i.sku_ref_id),i,a)}function Rd(e,t,n){var a,i,r=null!==(a=null===(i=t.find((e=>e.id===n)))||void 0===i?void 0:i.products)&&void 0!==a?a:[];return r.forEach((t=>{t.product_details=zd(e,t.sku_ref_id||""),t.variables=Wd(t.product_details,t,r)})),r}function Wd(e,t,n){if(!t)return{};var a=t.variables;if(!a)return f({},t);Object.keys(a).forEach((t=>{if(Nd(a[t])){var i=jd(a[t],e,n);a[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(i)}}));var i={};return pl().forEach((t=>{if(void 0===a[t]){var r=gl(t,e,void 0,n);null!==r&&(i[t]=r)}})),f({},t,i,a)}function Nd(e){return"string"==typeof e&&e.includes(Cn)}function Od(e,t,n){return t?(Object.keys(t).forEach((a=>{Nd(t[a])&&(t[a]=t[Ld(a)]=jd(t[a],e,n))})),f({},t)):{}}var jd=(e,t,n)=>e.replace(_n,((a,i)=>{var r,o,s,u,l=(null===(r=_n.exec(e))||void 0===r?void 0:r.slice(1))||[];i=null!==(o=l[0])&&void 0!==o?o:i;var d=null!==(s=null===(u=l[1])||void 0===u?void 0:u.replace(":",""))&&void 0!==s?s:"";return gl(i,t,d,n)}));function $d(e,t){return t.flatMap((e=>e.products)).some((t=>1==gl("freeTrialEligible",zd(e,t.sku_ref_id))))}function zd(e=[],t=""){return e.find((e=>e.product_ref_id===t))||null}var Bd=function(){try{var e=ba(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function Hd(e,t,n){"__proto__"==t&&Bd?Bd(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Ud=Object.prototype.hasOwnProperty;function Gd(e,t,n){var a=e[t];Ud.call(e,t)&&On(a,n)&&(void 0!==n||t in e)||Hd(e,t,n)}function Vd(e,t,n,a){var i=!n;n||(n={});for(var r=-1,o=t.length;++r<o;){var s=t[r],u=void 0;void 0===u&&(u=e[s]),i?Hd(n,s,u):Gd(n,s,u)}return n}var Xd=Object.prototype.hasOwnProperty;function Kd(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ci(e),n=[];for(var a in e)("constructor"!=a||!t&&Xd.call(e,a))&&n.push(a);return n}function Yd(e){return Ri(e)?Ai(e,!0):Kd(e)}var qd="object"==typeof exports&&exports&&!exports.nodeType&&exports,Jd=qd&&"object"==typeof module&&module&&!module.nodeType&&module,Qd=Jd&&Jd.exports===qd?Un.Buffer:void 0,Zd=Qd?Qd.allocUnsafe:void 0;var eh=Ii(Object.getPrototypeOf,Object),th=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Qa(t,ii(e)),e=eh(e);return t}:ti;function nh(e){return ei(e,Yd,th)}var ah=Object.prototype.hasOwnProperty;function ih(e){var t=new e.constructor(e.byteLength);return new Fa(t).set(new Fa(e)),t}var rh=/\w*$/;var oh=Gn?Gn.prototype:void 0,sh=oh?oh.valueOf:void 0;var uh="[object Boolean]",lh="[object Date]",dh="[object Map]",hh="[object Number]",ch="[object RegExp]",mh="[object Set]",fh="[object String]",vh="[object Symbol]",ph="[object ArrayBuffer]",gh="[object DataView]",yh="[object Float32Array]",bh="[object Float64Array]",wh="[object Int8Array]",kh="[object Int16Array]",Sh="[object Int32Array]",Eh="[object Uint8Array]",Mh="[object Uint8ClampedArray]",Ph="[object Uint16Array]",Th="[object Uint32Array]";function _h(e,t,n){var a,i=e.constructor;switch(t){case ph:return ih(e);case uh:case lh:return new i(+e);case gh:return function(e,t){var n=t?ih(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case yh:case bh:case wh:case kh:case Sh:case Eh:case Mh:case Ph:case Th:return function(e,t){var n=t?ih(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case dh:return new i;case hh:case fh:return new i(e);case ch:return function(e){var t=new e.constructor(e.source,rh.exec(e));return t.lastIndex=e.lastIndex,t}(e);case mh:return new i;case vh:return a=e,sh?Object(sh.call(a)):{}}}var Dh=Object.create,Ah=function(){function e(){}return function(t){if(!ta(t))return{};if(Dh)return Dh(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var xh=Pi&&Pi.isMap,Ch=xh?ki(xh):function(e){return ri(e)&&"[object Map]"==er(e)};var Ih=Pi&&Pi.isSet,Lh=Ih?ki(Ih):function(e){return ri(e)&&"[object Set]"==er(e)},Fh=1,Rh=2,Wh=4,Nh="[object Arguments]",Oh="[object Function]",jh="[object GeneratorFunction]",$h="[object Object]",zh={};function Bh(e,t,n,a,i,r){var o,s=t&Fh,u=t&Rh,l=t&Wh;if(void 0!==o)return o;if(!ta(e))return e;var d=Za(e);if(d){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ah.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,a=e.length;for(t||(t=Array(a));++n<a;)t[n]=e[n];return t}(e,o)}else{var h=er(e),c=h==Oh||h==jh;if(fi(e))return function(e,t){if(t)return e.slice();var n=e.length,a=Zd?Zd(n):new e.constructor(n);return e.copy(a),a}(e,s);if(h==$h||h==Nh||c&&!i){if(o=u||c?{}:function(e){return"function"!=typeof e.constructor||Ci(e)?{}:Ah(eh(e))}(e),!s)return u?function(e,t){return Vd(e,th(e),t)}(e,function(e,t){return e&&Vd(t,Yd(t),e)}(o,e)):function(e,t){return Vd(e,ii(e),t)}(e,function(e,t){return e&&Vd(t,Wi(t),e)}(o,e))}else{if(!zh[h])return i?e:{};o=_h(e,h,s)}}r||(r=new _a);var m=r.get(e);if(m)return m;r.set(e,o),Lh(e)?e.forEach((function(a){o.add(Bh(a,t,n,a,e,r))})):Ch(e)&&e.forEach((function(a,i){o.set(i,Bh(a,t,n,i,e,r))}));var f=d?void 0:(l?u?nh:Ni:u?Yd:Wi)(e);return function(e,t){for(var n=-1,a=null==e?0:e.length;++n<a&&!1!==t(e[n],n,e););}(f||e,(function(a,i){f&&(a=e[i=a]),Gd(o,i,Bh(a,t,n,i,e,r))})),o}zh[Nh]=zh["[object Array]"]=zh["[object ArrayBuffer]"]=zh["[object DataView]"]=zh["[object Boolean]"]=zh["[object Date]"]=zh["[object Float32Array]"]=zh["[object Float64Array]"]=zh["[object Int8Array]"]=zh["[object Int16Array]"]=zh["[object Int32Array]"]=zh["[object Map]"]=zh["[object Number]"]=zh[$h]=zh["[object RegExp]"]=zh["[object Set]"]=zh["[object String]"]=zh["[object Symbol]"]=zh["[object Uint8Array]"]=zh["[object Uint8ClampedArray]"]=zh["[object Uint16Array]"]=zh["[object Uint32Array]"]=!0,zh["[object Error]"]=zh[Oh]=zh["[object WeakMap]"]=!1;var Hh=(e,t,n)=>{var a=Object.getOwnPropertyDescriptor(e,t);if(!a||a.configurable)try{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n,writable:!1})}catch(a){try{e[t]=n}catch(e){}}},Uh=function(){return c((function e(){s(this,e),this.listeners=new Map}),[{key:"addEventListener",value:function(e,t,n){var a;if(t){var i=(e=>"boolean"==typeof e?{capture:e}:null!=e?e:{})(n),r=null!==(a=this.listeners.get(e))&&void 0!==a?a:[];if(!r.some((e=>e.listener===t))){var o={listener:t,once:Boolean(i.once)};if(i.signal){if(i.signal.aborted)return;o.signal=i.signal,o.abortHandler=()=>this.removeEventListener(e,t),i.signal.addEventListener("abort",o.abortHandler,{once:!0})}r.push(o),this.listeners.set(e,r)}}}},{key:"removeEventListener",value:function(e,t){if(t){var n=this.listeners.get(e);if(n&&0!==n.length){for(var a=n.length-1;a>=0;a-=1){var i=n[a];i.listener===t&&(i.signal&&i.abortHandler&&i.signal.removeEventListener("abort",i.abortHandler),n.splice(a,1))}0===n.length&&this.listeners.delete(e)}}}},{key:"dispatchEvent",value:function(e){var t,n;if(!e||"string"!=typeof e.type)throw new TypeError('Failed to execute "dispatchEvent": event type must be a string.');var a=this.listeners.get(e.type);if(!a||0===a.length)return!0;Hh(e,"target",this);var i=!1,r=null===(t=e.stopImmediatePropagation)||void 0===t?void 0:t.bind(e),o=null===(n=e.stopPropagation)||void 0===n?void 0:n.bind(e),s=()=>{i=!0,null==r||r()},u=()=>{e.cancelBubble=!0,null==o||o()};e.stopImmediatePropagation=s,e.stopPropagation=u;for(var l,d,h=m(a.slice());!(l=h()).done;){var c=l.value;if(i)break;Hh(e,"currentTarget",this),"function"==typeof c.listener?c.listener.call(this,e):"object"==typeof(d=c.listener)&&null!==d&&"handleEvent"in d&&c.listener.handleEvent.call(c.listener,e),c.once&&this.removeEventListener(e.type,c.listener)}if(r)e.stopImmediatePropagation=r;else try{delete e.stopImmediatePropagation}catch(t){e.stopImmediatePropagation=s}if(o)e.stopPropagation=o;else try{delete e.stopPropagation}catch(t){e.stopPropagation=u}return Hh(e,"currentTarget",null),!e.defaultPrevented}}])}(),Gh=[],Vh={paywallId:"",livePaywalls:[],selectedPaywall:void 0,selectedCampaign:void 0,campaignRules:[],anySkuHasTrialOffer:!1,anySkuHasIntroOffer:!1,anySkuHasPromoOffer:!1,isLoggedIn:!1,darkMode:!1,safeAreaTop:0,groups:[],selectedProducts:{},formStates:{},timerStates:{},currentPage:"page1",currentGroupId:"",currentGroupName:"",fullScreenPresentation:!1,launch:{productGroups:[],customAttributes:{},customObject:{},currentGroup:""},sku:{},orientation:"portrait",focusedState:!1,platformId:"",mediaList:{},skuItems:[],customer:{},hasNotch:!1,purchaseInProgress:!1,formFactor:"desktop",slides:{},userInteractionEnabled:!0,currentSlideIndex:void 0},Xh=function(){function e(t,n,a){var i;s(this,e),(i=o(this,e)).host=null,i.subscribers=new Set,i.productDetails=Gh,i.filteredSkuMenus=[],i.state=Bh(Vh,5);var r=Kr.getNamiProfile();return i.state.isLoggedIn=!(null==r||!r.externalId),i.setPaywall(t,n,a),i.defineDynamicStateProps(),i.subscribers=new Set,i}return g(e,Uh),c(e,[{key:"subscribe",value:function(e){return this.subscribers.add(e),()=>this.unsubscribe(e)}},{key:"unsubscribe",value:function(e){this.subscribers.delete(e)}},{key:"emitEvent",value:function(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))}},{key:"onEvent",value:function(e,t){var n=e=>t(e.detail);return this.addEventListener(e,n),()=>this.removeEventListener(e,n)}},{key:"hostConnected",value:function(){}},{key:"hostDisconnected",value:function(){this.subscribers.clear()}},{key:"defineDynamicStateProps",value:function(){Object.defineProperty(this.state,"tvQuality",{get:this.getTVQuality.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportWidth",{get:this.getViewportWidth.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportHeight",{get:this.getViewportHeight.bind(this),enumerable:!1,configurable:!0})}},{key:"setState",value:function(e){this.state=e,this.defineDynamicStateProps(),this.subscribers.forEach((e=>e())),this.host&&this.host.requestUpdate()}},{key:"setProductDetails",value:function(e){this.productDetails=e}},{key:"getProductDetails",value:function(){return this.productDetails}},{key:"setCurrentGroupData",value:function(e,t){var n=Fd(this.productDetails,this.state,this.filteredSkuMenus,Rd(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(f({},this.state,{currentGroupId:e,currentGroupName:t,sku:n}))}},{key:"setFormState",value:function(e,t){this.setState(f({},this.state,{formStates:f({},this.state.formStates,{[e]:t})}))}},{key:"setTimerState",value:function(e,t,n,a){this.setState(f({},this.state,{timerStates:f({},this.state.timerStates,{[e]:{remainingSeconds:t,savedAt:n,hasEmittedCompletion:a}})}))}},{key:"getTimerState",value:function(e){return this.state.timerStates[e]}},{key:"getCurrentGroupId",value:function(){return this.state.currentGroupId}},{key:"getCurrentGroupName",value:function(){return this.state.currentGroupName}},{key:"setCurrentFormId",value:function(e,t){var n=this.state.formStates||{},a=f({},n,{[e]:t||!n[e]});this.setState(f({},this.state,{formStates:a}))}},{key:"getCurrentFormId",value:function(e){return this.state.formStates[e]}},{key:"setSelectedProducts",value:function(e){var t=Fd(this.productDetails,this.state,this.filteredSkuMenus,Rd(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(f({},this.state,{selectedProducts:e,sku:t}))}},{key:"selectedProducts",value:function(){return this.state.selectedProducts}},{key:"setPaywall",value:function(e,t,n){var a,i,r,o,s,u=f({},this.state,{formFactor:uu(),selectedPaywall:e,selectedCampaign:n}),l=function(e,t,n=[]){var a,i,r=null!==(a=t.productGroups)&&void 0!==a&&a.length?t.productGroups:n.map((e=>e.ref));return{customAttributes:t.customAttributes,productGroups:r,customObject:f({},e.customObject,t.customObject),currentGroup:null!==(i=t.currentGroup)&&void 0!==i?i:""}}((u=f({},u,null===(a=e.template)||void 0===a?void 0:a.initialState)).launch,t,e.sku_menus);(this.filteredSkuMenus=null!==(i=e.sku_menus)&&void 0!==i?i:[],l.productGroups.length&&(this.filteredSkuMenus=this.filteredSkuMenus.filter((e=>l.productGroups.includes(e.ref)))),""!==l.currentGroup&&u.groups.length&&null!==(r=e.template)&&void 0!==r&&r.displaySingleGroup)&&(u.currentGroupId=null!==(o=null===(s=u.groups.find((e=>e.ref==l.currentGroup)))||void 0===s?void 0:s.id)&&void 0!==o?o:"");if(""===u.currentGroupId&&1===this.filteredSkuMenus.length){var d,h=u.groups.find((e=>e.ref==this.filteredSkuMenus[0].ref));u.currentGroupId=null!==(d=null==h?void 0:h.id)&&void 0!==d?d:u.currentGroupId}var c=Rd(this.productDetails,this.filteredSkuMenus,u.currentGroupId);u.skuItems=c,u.launch=l,u.anySkuHasTrialOffer=$d(this.productDetails,this.filteredSkuMenus),u.anySkuHasPromoOffer=function(e,t){return!$d(e,t)&&t.flatMap((e=>e.products)).some((t=>1==gl("promoEligible",zd(e,t.sku_ref_id))))}(this.productDetails,this.filteredSkuMenus),u.paywallId=e.id,u.sku=Fd(this.productDetails,u,this.filteredSkuMenus,c),this.setState(u)}},{key:"getSelectedPaywall",value:function(){return this.state.selectedPaywall}},{key:"getSelectedCampaign",value:function(){return this.state.selectedCampaign}},{key:"getCurrentPlacementLabel",value:function(){var e,t;return null!==(e=this.state.selectedCampaign)&&void 0!==e&&e.value?this.state.selectedCampaign.value:null!==(t=this.flow)&&void 0!==t&&null!==(t=t.campaign)&&void 0!==t&&t.value?this.flow.campaign.value:void 0}},{key:"getPaywallActionEventData",value:function(){var e,t,n,a,i,r,o,s,u,l=this.state.selectedCampaign,d=this.state.selectedPaywall;return{paywallId:null!==(e=null==d?void 0:d.id)&&void 0!==e?e:"",paywallName:null!==(t=null==d?void 0:d.name)&&void 0!==t?t:"",campaignId:null!==(n=null==l?void 0:l.rule)&&void 0!==n?n:"",campaignName:null!==(a=null==l?void 0:l.name)&&void 0!==a?a:"",campaignType:null!==(i=null==l?void 0:l.type)&&void 0!==i?i:"",campaignLabel:null!==(r=null==l?void 0:l.value)&&void 0!==r?r:"",campaignUrl:(null==l?void 0:l.type)===exports.NamiCampaignRuleType.URL&&null!==(o=null==l?void 0:l.value)&&void 0!==o?o:"",segmentId:null!==(s=null==l?void 0:l.segment)&&void 0!==s?s:"",externalSegmentId:null!==(u=null==l?void 0:l.external_segment)&&void 0!==u?u:""}}},{key:"paywallId",value:function(){return this.state.paywallId}},{key:"setCurrentPage",value:function(e){this.setState(f({},this.state,{currentPage:e}))}},{key:"setCustomerAttribute",value:function(e){this.setState(f({},this.state,{customer:f({},this.state.customer,e)}))}},{key:"removeCustomerAttribute",value:function(e){delete this.state.customer[e],this.setState(this.state)}},{key:"setIsLoggedIn",value:function(e){this.setState(f({},this.state,{isLoggedIn:e}))}},{key:"setMediaList",value:function(e){this.setState(f({},this.state,{mediaList:e.reduce(((e,t)=>f({},e,{[t.name]:t})))}))}},{key:"setSafeAreaTop",value:function(e){this.setState(f({},this.state,{safeAreaTop:e}))}},{key:"setFullScreenPresentation",value:function(e){this.setState(f({},this.state,{fullScreenPresentation:e}))}},{key:"setFormFactor",value:function(e){this.setState(f({},this.state,{formFactor:e}))}},{key:"getFormFactor",value:function(){return this.state.formFactor}},{key:"getTVQuality",value:function(){var e,t;if("television"!==this.getFormFactor())return"";var n=window.devicePixelRatio||1,a=window.innerWidth||(null===(e=window.screen)||void 0===e?void 0:e.availWidth),i=window.innerHeight||(null===(t=window.screen)||void 0===t?void 0:t.availHeight);if(!a||!i)return"720p";var r=Math.max(a,i)*n,o=Math.min(a,i)*n;return r>=3840||o>=2160?"4K":r>=1920||o>=1080?"1080p":"720p"}},{key:"getViewportWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}},{key:"getViewportHeight",value:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}},{key:"setPurchaseInProgress",value:function(e){this.setState(f({},this.state,{purchaseInProgress:e}))}},{key:"setPurchase",value:function(e,t){this.setState(f({},this.state,{purchaseInProgress:e,productBeingPurchased:t}))}},{key:"setTimeSpentOnPaywall",value:function(e){this.setState(f({},this.state,{timeSpentOnPaywall:e}))}},{key:"setAppSuppliedVideoDetails",value:function({url:e,name:t}){this.setState(f({},this.state,{appSuppliedVideoUrl:e,appSuppliedVideoName:t}))}},{key:"resetAppSuppliedVideoDetails",value:function(){delete this.state.appSuppliedVideoUrl,delete this.state.appSuppliedVideoName,this.setState(this.state)}},{key:"setLaunchDetails",value:function(e,t){this.setState(f({},this.state,{launchValue:e,launchType:t}))}},{key:"setOpenHeaderIds",value:function(e,t){e=null!=t&&t.skuId?`${e}_${t.skuId}`:e;var n=[...this.state.openHeaderIds],a=n.indexOf(e);-1!==a?n.splice(a,1):n.push(e),this.setState(f({},this.state,{openHeaderIds:n,currentCollapsibleSku:null!=t?t:null}))}},{key:"getCurrentCollapsibleSku",value:function(){return this.state.currentCollapsibleSku}},{key:"setFlow",value:function(e){this.flow=e}},{key:"setUserInteractionEnabled",value:function(e){this.setState(f({},this.state,{userInteractionEnabled:e})),this.emitEvent("user-interaction-changed",{enabled:e})}},{key:"setUserTags",value:function(e){this.setState(f({},this.state,{userTags:f({},this.state.userTags,e)}))}},{key:"setCurrentSlideIndex",value:function(e){this.state.currentSlideIndex=e}}],[{key:"create",value:function(t,n,a){var i=new e(t,n,a);return this.providers.push(i),i}},{key:"remove",value:function(e){this.providers=this.providers.filter((t=>t!==e))}},{key:"currentProvider",get:function(){return e.providers[0]}},{key:"setCustomerAttribute",value:function(e){this.providers.forEach((t=>{t.setCustomerAttribute(e)}))}},{key:"removeCustomerAttribute",value:function(e){this.providers.forEach((t=>{t.removeCustomerAttribute(e)}))}},{key:"setAppSuppliedVideoDetails",value:function(e){this.providers.forEach((t=>{t.setAppSuppliedVideoDetails(e)}))}},{key:"getSelectedPaywall",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.getSelectedPaywall()}},{key:"setUserInteractionEnabled",value:function(e){this.providers.forEach((t=>{t.setUserInteractionEnabled(e)}))}},{key:"setUserTags",value:function(e){this.providers.forEach((t=>{t.setUserTags(e)}))}},{key:"setProductDetails",value:function(e){this.providers.forEach((t=>{t.setProductDetails(e)})),Gh=e}},{key:"setPurchaseInProgress",value:function(e){this.providers.forEach((t=>{t.setPurchaseInProgress(e)}))}},{key:"setIsLoggedIn",value:function(e){this.providers.forEach((t=>{t.setIsLoggedIn(e)}))}},{key:"setPurchase",value:function(e,t){this.providers.forEach((n=>{n.setPurchase(e,t)}))}},{key:"getSelectedSlideIndex",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.state.currentSlideIndex}}])}();Xh.providers=[];var Kh=c((function e(){s(this,e),this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}}));Kh.instance=new Kh;var Yh=()=>Vr(Nn([...Kr.getNamiEntitlements(Je),...Kr.getNamiEntitlements(st)]),"referenceId"),qh=()=>{ju.getInstance().emit(En,Yh())};function Jh(e){return{id:e.id,skuId:e.sku_ref_id,name:e.name,type:e.sku_type||"unknown",entitlements:e.entitlements,productDetails:"product_details"in e?e.product_details:null}}var Qh=function(){return c((function e(){s(this,e)}),[{key:"fetchActiveEntitlements",value:function(){var e,t,n;return S((function(a){for(;;)switch(a.n){case 0:if(e=null,Xu()||Cs(le.THIRD_PARTY_TRANSACTIONS)||!Cs(le.ENTITLEMENT_MANAGEMENT)){a.n=3;break}if(null==(t=Kr.getDevice())||!t.id){a.n=2;break}return a.n=1,r(this.getAPIEntitlements(t.id));case 1:n=a.v,(e=null==n?void 0:n.results)&&(Kr.setActiveEntitlements(Ye,e),this.invokeActiveEntitlementsHandler(e));case 2:a.n=4;break;case 3:Xu()&&Wn.debug("Skipping active entitlements update - anonymous mode"),Cs(le.THIRD_PARTY_TRANSACTIONS)&&Wn.debug("Skipping active entitlements update - paywalls-only mode"),Cs(le.ENTITLEMENT_MANAGEMENT)||Wn.debug("Skipping active entitlements update - no entitlement_management capability");case 4:return a.a(2,e)}}),null,this,null,Promise)}},{key:"getAPIEntitlements",value:function(e){var t,n,a;return S((function(i){for(;;)switch(i.p=i.n){case 0:return t=`device/${e}/active_entitlements/`,n={},i.p=1,i.n=2,r(Ns.instance.fetchAPI(t));case 2:n=i.v,i.n=4;break;case 3:throw i.p=3,a=i.v,Wn.error(mo(a.status,t)),a;case 4:return i.a(2,n)}}),null,null,[[1,3]],Promise)}},{key:"invokeActiveEntitlementsHandler",value:function(e){Is()&&(e=>{Kr.setNamiEntitlements(Je,e);var t=Kr.getNamiEntitlements(st),n=new Set(e.map((e=>e.referenceId))),a=t.filter((e=>{var t=n.has(e.referenceId);return t&&Wn.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t}));a.length!==t.length&&Kr.setNamiEntitlements(st,a),qh()})(e.map((e=>(e=>{var t=e.entitlement_ref_id;return{name:e.name||"",desc:e.description||"",namiId:"",referenceId:t,relatedSkus:Kh.instance.refIdToRelatedSKUs[t]||[],activePurchases:Kh.instance.refIdToActivePurchases[t]||[],purchasedSkus:Kh.instance.refIdToPurchasedSKUs[t]||[],expires:e.expires?new Date(e.expires).valueOf():0}})(e))))}}])}();Qh.instance=new Qh;var Zh=function(){return c((function e(){s(this,e)}),[{key:"fetchCustomerJourneyState",value:function(){var e,t,n,a;return S((function(i){for(;;)switch(i.p=i.n){case 0:if(!Xu()){i.n=1;break}return Wn.debug("Skipping customer journey state update - anonymous mode"),i.a(2,null);case 1:if(null!=(e=Kr.getDevice())&&e.id){i.n=2;break}return i.a(2,null);case 2:return t=`device/${e.id}/profile/`,n=null,i.p=3,i.n=4,r(Ns.instance.fetchAPI(t,void 0,0));case 4:n=i.v,i.n=6;break;case 5:throw i.p=5,a=i.v,Wn.error(mo(a.status,t)),a;case 6:if(!n){i.n=7;break}return Kr.setCustomerJourneyState(n.customer_journey_state),i.a(2,n.customer_journey_state);case 7:return i.a(2,null)}}),null,null,[[3,5]],Promise)}}])}();Zh.instance=new Zh;var ec=function(){return c((function e(){s(this,e),this.inMemoryAnonymousMode=!1,Vu=this}),[{key:"setInMemoryAnonymousMode",value:function(e){this.inMemoryAnonymousMode=e,Wn.info(`In-memory anonymous mode ${e?"enabled":"disabled"} due to failed device registration`)}},{key:"isInMemoryAnonymousMode",value:function(){return this.inMemoryAnonymousMode}},{key:"isAnonymousMode",value:function(){return Kr.getAnonymousMode()||this.inMemoryAnonymousMode}},{key:"init",value:function(e){return S((function(t){for(;;)switch(t.n){case 0:return this.setInitialValues(e),Gu.instance.fetchConfig(),t.n=1,r(this.initAndFetchRequiredData(e));case 1:Ku.instance.startSession();case 2:return t.a(2)}}),null,this,null,Promise)}},{key:"setInitialValues",value:function(e){var t=f({},e);delete t.initialConfig,Kr.clearSessionId(),Kr.setNamiConfig(t),Kr.setLanguageCode(e.namiLanguageCode),Kr.setPurchaseChannel(e.purchaseChannel);var n=e.initialConfig;if(n.appConfig||n.platform_config){var a=(null==n?void 0:n.appConfig)||(null==n?void 0:n.platform_config);a&&Kr.setAppConfig(Ze,a)}null!=n&&n.paywalls&&Kr.setPaywalls(at,n.paywalls),null!=n&&n.products&&Kr.setProducts(rt,n.products)}},{key:"initAnonymousDevice",value:function(){return{deviceId:Bu.instance.getOrCreateAnonymousUUID(),deviceTask:null}}},{key:"initIdentifiedDevice",value:function(e){var t=f({},su(e.namiCommands),e.formFactor?{form_factor:e.formFactor}:{}),n=function(e){if(e){var t=e.find((e=>e.startsWith("splitPosition=")));if(t){var n=t.split("=")[1],a=Number(n);return n&&!isNaN(a)?fu(a):void 0}}}(e.namiCommands),a=Bu.instance.createOrUpdateDevice(t,n,this);return{deviceId:a.id,deviceTask:a.device}}},{key:"initAndFetchRequiredData",value:function(e,t=0,n=1){var a,i,o,s,u,l,d,h,c,m,f;return S((function(v){for(;;)switch(v.n){case 0:if(s=e.initialConfig,u=null!==(a=e.formFactor)&&void 0!==a?a:uu(),l=this.isAnonymousMode(),d=l?this.initAnonymousDevice():this.initIdentifiedDevice(e),h=d.deviceId,c=d.deviceTask,m=cu(h),s.campaign_rules&&Kr.setCampaignRules(tt,bu(s.campaign_rules,m,u)),!c){v.n=1;break}return v.n=1,r(c);case 1:if($u.instance.configure(u,m,e.namiCommands),f=Promise.all([Hu.instance.fetchProducts(),Zh.instance.fetchCustomerJourneyState(),Qh.instance.fetchActiveEntitlements(),Uu.instance.fetchPaywalls().then((e=>$u.instance.fetchCampaignRules(e)))]).catch((a=>{var i;return S((function(o){for(;;)switch(o.n){case 0:if(!(a instanceof Jr)){o.n=3;break}if(Kr.resetDevice(),!(t<n)){o.n=2;break}return i=100*Math.pow(2,t),o.n=1,r(new Promise((e=>setTimeout(e,i))));case 1:return o.a(2,this.initAndFetchRequiredData(e,t+1,n));case 2:if(l){o.n=3;break}return Wn.warn(`Max retries reached for ConflictError. ${a.message}`),this.setInMemoryAnonymousMode(!0),o.a(2,this.initAndFetchRequiredData(e,0,n));case 3:throw a;case 4:return o.a(2)}}),null,this,null,Promise)})),null!==(i=s.campaign_rules)&&void 0!==i&&i.length&&null!==(o=s.paywalls)&&void 0!==o&&o.length){v.n=2;break}return v.n=2,r(f);case 2:f.then((()=>this.reRenderPaywall()));case 3:return v.a(2)}}),null,this,null,Promise)}},{key:"reRenderPaywall",value:function(){if("undefined"!=typeof document){var e=document.querySelector("nami-paywall");null==e||e.setPaywallData()}}}])}();function tc(e){return Array.isArray(e)?e.map(tc):e&&"object"==typeof e?Object.entries(e).reduce(((e,[t,n])=>(void 0!==n&&(e[t]=tc(n)),e)),{}):e}ec.instance=new ec;var nc,ac=!0,ic=!1;function rc(){var e;if("function"==typeof(null===(e=window.VIZIO)||void 0===e||null===(e=e.Chromevox)||void 0===e?void 0:e.isEnabled))try{var t;ac=null===(t=window.VIZIO)||void 0===t||null===(t=t.Chromevox)||void 0===t?void 0:t.isEnabled()}catch(e){}}function oc(){var e;return"undefined"!=typeof window&&void 0!==window.VIZIO&&"function"==typeof(null===(e=window.VIZIO)||void 0===e||null===(e=e.Chromevox)||void 0===e?void 0:e.play)}function sc(e){e.isTrusted&&rc()}function uc(e){e.isTrusted&&(ac=!1)}function lc(e){if(e&&oc()&&ac)try{var t;null===(t=window.VIZIO)||void 0===t||null===(t=t.Chromevox)||void 0===t||t.play(e)}catch(e){}}var dc=function(){function e(){s(this,e),nc.set(this,!1)}return c(e,[{key:"isInitialized",get:function(){return se(this,nc,"f")||null!=Kr.getNamiConfig()}},{key:"initializeSDK",value:function(e){var t,n,a,i,o,s,u;return S((function(l){for(;;)switch(l.n){case 0:if(t=!1,n=!1,a=se(this,nc,"f")?Kr.getNamiConfig():null,Wn.setLogger(e.logLevel),null===a){l.n=3;break}if(delete(i=f({},e)).initialConfig,d=a,!zu(tc(i),tc(d))){l.n=1;break}return Wn.warn("Nami SDK is already configured, ignoring this configure call."),l.a(2,{sdkInitialized:!0,configureState:gn});case 1:n=!0;case 2:o=xs(e.namiCommands),s=xs(a.namiCommands),e.appPlatformID==a.appPlatformID&&o==s||(t=!0),e.namiLanguageCode===a.namiLanguageCode&&e.logLevel==a.logLevel||(n=!0);case 3:return t&&(Wn.info("SDK full reconfigure called"),Kr.resetDevice()),ue(this,nc,!0,"f"),Ns.configure(e),l.n=4,r(ec.instance.init(e));case 4:return Wn.info("SDK successfully initialized!"),u=n||t?vn:mn,!ic&&oc()&&(window.addEventListener("VIZIO_TTS_ENABLED",sc),window.addEventListener("VIZIO_TTS_DISABLED",uc),ic=!0,rc()),l.a(2,{sdkInitialized:!0,configureState:u})}var d}),null,this,null,Promise)}}],[{key:"sdkVersion",value:function(){return me}},{key:"configure",value:function(t){return S((function(n){for(;;)switch(n.n){case 0:if(t.appPlatformID){n.n=1;break}throw new Zr;case 1:return this.setInitialConfig(t),n.n=2,r(e.instance.initializeSDK(t));case 2:return n.a(2,n.v)}}),null,this,null,Promise)}},{key:"setInitialConfig",value:function(e){if(null!=e.initialConfig){if("string"==typeof e.initialConfig){Wn.warn("[DEPRECATED] NamiConfiguration.initialConfig should be an object");var t=function(e){var t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return JSON.parse(t)}catch(e){return}}(e.initialConfig);if(!t)return Wn.error("Failed to parse NamiConfiguration.initialConfig"),void(e.initialConfig={});e.initialConfig=t}if("object"!=typeof e.initialConfig)e.initialConfig={};else if((e=>"object"==typeof e&&"initial_config"in e)(e.initialConfig)){var n=Ls(e.initialConfig.initial_config);n?e.initialConfig=n:(e.initialConfig={},Wn.error("Failed to parse NamiConfiguration.initialConfig as base64-gzipped JSON"))}}else e.initialConfig={}}}])}();nc=new WeakMap,dc.instance=new dc;var hc,cc=new Set(["fullscreen","sheet","compact_sheet","modal"]);exports.NamiPaywallManagerEvents=void 0,(hc=exports.NamiPaywallManagerEvents||(exports.NamiPaywallManagerEvents={})).BuySku="RegisterBuySKU",hc.Close="PaywallCloseRequested",hc.SignIn="PaywallSignInRequested",hc.Restore="PaywallRestoreRequested",hc.DeeplinkAction="PaywallDeeplinkAction";var mc,fc,vc,pc,gc=e.css(mc||(mc=(e=>e)`
|
|
1
|
+
"use strict";var e=require("lit"),t=require("lit/directives/repeat.js");function n(e,t){this.v=e,this.k=t}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r(e){return new n(e,0)}function o(e,t,n){return t=p(t),w(e,y()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(()=>{if("undefined"==typeof globalThis){var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")();Object.defineProperty(e,"globalThis",{value:e,writable:!0,enumerable:!1,configurable:!0})}})(),"undefined"!=typeof Element&&"function"!=typeof Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var e=this.attributes,t=new Array(e.length),n=0;n<e.length;n+=1)t[n]=e[n].name;return t});var l=0;function d(e){return"__private_"+l+++"_"+e}function h(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_(a.key),a)}}function c(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},f.apply(null,arguments)}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var a=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(a){var i=Object.getOwnPropertyDescriptor(a,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},v.apply(null,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function b(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;n[a]=e[a]}return n}function w(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}function k(){var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,a,i,r){var u=a&&a.prototype instanceof s?a:s,l=Object.create(u.prototype);return M(l,"_invoke",function(n,a,i){var r,s,u,l=0,d=i||[],h=!1,c={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return r=t,s=0,u=e,c.n=n,o}};function m(n,a){for(s=n,u=a,t=0;!h&&l&&!i&&t<d.length;t++){var i,r=d[t],m=c.p,f=r[2];n>3?(i=f===a)&&(u=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=m&&((i=n<2&&m<r[1])?(s=0,c.v=a,c.n=r[1]):m<f&&(i=n<3||r[0]>a||a>f)&&(r[4]=n,r[5]=a,c.n=f,s=0))}if(i||n>1)return o;throw h=!0,a}return function(i,d,f){if(l>1)throw TypeError("Generator is already running");for(h&&1===d&&m(d,f),s=d,u=f;(t=s<2?e:u)||!h;){r||(s?s<3?(s>1&&(c.n=-1),m(s,u)):c.n=u:c.v=u);try{if(l=2,r){if(s||(i="next"),t=r[i]){if(!(t=t.call(r,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);r=e}else if((t=(h=c.n<0)?u:n.call(a,c))!==o)break}catch(t){r=e,s=1,u=t}finally{l=1}}return{value:t,done:h}}}(n,i,r),!0),l}var o={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(M(t={},a,(function(){return this})),t),h=l.prototype=s.prototype=Object.create(d);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,M(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e}return u.prototype=l,M(h,"constructor",l),M(l,"constructor",u),u.displayName="GeneratorFunction",M(l,i,"GeneratorFunction"),M(h),M(h,i,"Generator"),M(h,a,(function(){return this})),M(h,"toString",(function(){return"[object Generator]"})),(k=function(){return{w:r,m:c}})()}function S(e,t,n,a,i){var r=function(e,t,n,a,i){return new E(k().w(e,t,n,a),i||Promise)}(e,t,n,a,i);return r.next().then((function(e){return e.done?e.value:r.next()}))}function E(e,t){function a(i,r,o,s){try{var u=e[i](r),l=u.value;return l instanceof n?t.resolve(l.v).then((function(e){a("next",e,o,s)}),(function(e){a("throw",e,o,s)})):t.resolve(l).then((function(e){u.value=e,o(u)}),(function(e){return a("throw",e,o,s)}))}catch(e){s(e)}}var i;this.next||(M(E.prototype),M(E.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),M(this,"_invoke",(function(e,n,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return i=i?i.then(o,o):o()}),!0)}function M(e,t,n,a){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}M=function(e,t,n,a){function r(t,n){M(e,t,(function(e){return this._invoke(t,n,e)}))}t?i?i(e,t,{value:n,enumerable:!a,configurable:!a,writable:!a}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},M(e,t,n,a)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function T(e,t,n,a){var i=v(p(e.prototype),t,n);return"function"==typeof i?function(e){return i.apply(n,e)}:i}function _(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function D(e){var t="function"==typeof Map?new Map:void 0;return D=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(y())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var i=new(e.bind.apply(e,a));return n&&P(i,n.prototype),i}(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,e)},D(e)}var A,x,C,I,L,F,R,W,N,O,j,$,z=function(){return c((function e(t){s(this,e),this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColSpan="",this.ariaCurrent="",this.ariaDescription="",this.ariaDisabled="",this.ariaExpanded="",this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t}),[{key:"shadowRoot",get:function(){return this.__host.__shadowRoot}},{key:"checkValidity",value:function(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}},{key:"reportValidity",value:function(){return!0}},{key:"setFormValue",value:function(){}},{key:"setValidity",value:function(){}}])}(),B=function(e,t,n,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,n):i?i.value=n:t.set(e,n),n},H=function(e,t,n,a){if("a"===n&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?a:"a"===n?a.call(e):a?a.value:t.get(e)},U=e=>{var t;return"boolean"==typeof e?e:null!==(t=null==e?void 0:e.capture)&&void 0!==t&&t},G=function(){return c((function e(){s(this,e),this.__eventListeners=new Map,this.__captureEventListeners=new Map}),[{key:"addEventListener",value:function(e,t,n){var a;if(null!=t){var i=U(n)?this.__captureEventListeners:this.__eventListeners,r=i.get(e);if(void 0===r)r=new Map,i.set(e,r);else if(r.has(t))return;var o="object"==typeof n&&n?n:{};null===(a=o.signal)||void 0===a||a.addEventListener("abort",(()=>this.removeEventListener(e,t,n))),r.set(t,null!=o?o:{})}}},{key:"removeEventListener",value:function(e,t,n){if(null!=t){var a=U(n)?this.__captureEventListeners:this.__eventListeners,i=a.get(e);void 0!==i&&(i.delete(t),i.size||a.delete(e))}}},{key:"dispatchEvent",value:function(e){var t=[this],n=this.__eventTargetParent;if(e.composed)for(;n;)t.push(n),n=n.__eventTargetParent;else for(;n&&n!==this.__host;)t.push(n),n=n.__eventTargetParent;var a=!1,i=!1,r=0,o=null,s=null,u=null,l=e.stopPropagation,d=e.stopImmediatePropagation;Object.defineProperties(e,{target:f({get:()=>null!=o?o:s},X),srcElement:f({get:()=>e.target},X),currentTarget:f({get:()=>u},X),eventPhase:f({get:()=>r},X),composedPath:f({value:()=>t},X),stopPropagation:f({value:()=>{a=!0,l.call(e)}},X),stopImmediatePropagation:f({value:()=>{i=!0,d.call(e)}},X)});var h=(t,n,a)=>{"function"==typeof t?t(e):"function"==typeof(null==t?void 0:t.handleEvent)&&t.handleEvent(e),n.once&&a.delete(t)},c=()=>(u=null,r=0,!e.defaultPrevented),v=t.slice().reverse();o=this.__host&&e.composed?null:this;for(var p,g=e=>{for(s=this;s.__host&&e.includes(s.__host);)s=s.__host},y=m(v);!(p=y()).done;){var b=p.value;o||s&&s!==b.__host||g(v.slice(v.indexOf(b))),u=b,r=b===e.target?2:1;var w=b.__captureEventListeners.get(e.type);if(w)for(var k,S=m(w);!(k=S()).done;){var E=k.value;if(h(E[0],E[1],w),i)return c()}if(a)return c()}var M=e.bubbles?t:[this];s=null;for(var P,T=m(M);!(P=T()).done;){var _=P.value;o||s&&_!==s.__host||g(M.slice(0,M.indexOf(_)+1)),u=_,r=_===e.target?2:3;var D=_.__eventListeners.get(e.type);if(D)for(var A,x=m(D);!(A=x()).done;){var C=A.value;if(h(C[0],C[1],D),i)return c()}if(a)return c()}return c()}}])}(),V=G,X={__proto__:null,enumerable:!0};Object.freeze(X);var K=(O=function(){return c((function e(t,n={}){if(s(this,e),A.set(this,!1),x.set(this,!1),C.set(this,!1),I.set(this,!1),L.set(this,Date.now()),F.set(this,!1),R.set(this,void 0),W.set(this,void 0),N.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,0===arguments.length)throw new Error("The type argument must be specified");if("object"!=typeof n||!n)throw new Error('The "options" argument must be an object');var a=n.bubbles,i=n.cancelable,r=n.composed;B(this,A,!!i,"f"),B(this,x,!!a,"f"),B(this,C,!!r,"f"),B(this,R,`${t}`,"f"),B(this,W,null,"f"),B(this,N,!1,"f")}),[{key:"initEvent",value:function(e,t,n){throw new Error("Method not implemented.")}},{key:"stopImmediatePropagation",value:function(){this.stopPropagation()}},{key:"preventDefault",value:function(){B(this,I,!0,"f")}},{key:"target",get:function(){return H(this,W,"f")}},{key:"currentTarget",get:function(){return H(this,W,"f")}},{key:"srcElement",get:function(){return H(this,W,"f")}},{key:"type",get:function(){return H(this,R,"f")}},{key:"cancelable",get:function(){return H(this,A,"f")}},{key:"defaultPrevented",get:function(){return H(this,A,"f")&&H(this,I,"f")}},{key:"timeStamp",get:function(){return H(this,L,"f")}},{key:"composedPath",value:function(){return H(this,N,"f")?[H(this,W,"f")]:[]}},{key:"returnValue",get:function(){return!H(this,A,"f")||!H(this,I,"f")}},{key:"bubbles",get:function(){return H(this,x,"f")}},{key:"composed",get:function(){return H(this,C,"f")}},{key:"eventPhase",get:function(){return H(this,N,"f")?O.AT_TARGET:O.NONE}},{key:"cancelBubble",get:function(){return H(this,F,"f")},set:function(e){e&&B(this,F,!0,"f")}},{key:"stopPropagation",value:function(){B(this,F,!0,"f")}},{key:"isTrusted",get:function(){return!1}}])}(),A=new WeakMap,x=new WeakMap,C=new WeakMap,I=new WeakMap,L=new WeakMap,F=new WeakMap,R=new WeakMap,W=new WeakMap,N=new WeakMap,O.NONE=0,O.CAPTURING_PHASE=1,O.AT_TARGET=2,O.BUBBLING_PHASE=3,O);Object.defineProperties(K.prototype,{initEvent:X,stopImmediatePropagation:X,preventDefault:X,target:X,currentTarget:X,srcElement:X,type:X,cancelable:X,defaultPrevented:X,timeStamp:X,composedPath:X,returnValue:X,bubbles:X,composed:X,eventPhase:X,cancelBubble:X,stopPropagation:X,isTrusted:X});var Y=($=function(){function e(t,n={}){var a,i;return s(this,e),i=o(this,e,[t,n]),j.set(i,void 0),B(i,j,null!==(a=null==n?void 0:n.detail)&&void 0!==a?a:null,"f"),i}return g(e,K),c(e,[{key:"initCustomEvent",value:function(e,t,n,a){throw new Error("Method not implemented.")}},{key:"detail",get:function(){return H(this,j,"f")}}])}(),j=new WeakMap,$);Object.defineProperties(Y.prototype,{detail:X});var q,J,Q,Z=K,ee=Y;null!==(q=globalThis.Event)&&void 0!==q||(globalThis.Event=Z),null!==(J=globalThis.CustomEvent)&&void 0!==J||(globalThis.CustomEvent=ee);var te=new WeakMap,ne=e=>{var t=te.get(e);return void 0===t&&te.set(e,t=new Map),t},ae=function(){function e(){var t;return s(this,e),(t=o(this,e,arguments)).__shadowRootMode=null,t.__shadowRoot=null,t.__internals=null,t}return g(e,V),c(e,[{key:"attributes",get:function(){return Array.from(ne(this)).map((([e,t])=>({name:e,value:t})))}},{key:"shadowRoot",get:function(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}},{key:"localName",get:function(){return this.constructor.__localName}},{key:"tagName",get:function(){var e;return null===(e=this.localName)||void 0===e?void 0:e.toUpperCase()}},{key:"setAttribute",value:function(e,t){ne(this).set(e,String(t))}},{key:"removeAttribute",value:function(e){ne(this).delete(e)}},{key:"toggleAttribute",value:function(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}},{key:"hasAttribute",value:function(e){return ne(this).has(e)}},{key:"attachShadow",value:function(e){var t={host:this};return this.__shadowRootMode=e.mode,e&&"open"===e.mode&&(this.__shadowRoot=t),t}},{key:"attachInternals",value:function(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");var e=new z(this);return this.__internals=e,e}},{key:"getAttribute",value:function(e){var t=ne(this).get(e);return null!=t?t:null}}])}(),ie=function(){function e(){return s(this,e),o(this,e,arguments)}return g(e,ae),c(e)}();function re(){var e,t;return{promise:new Promise(((n,a)=>{e=n,t=a})),resolve:e,reject:t}}function oe(e,t,n,a){var i,r=arguments.length,o=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,a);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r<3?i(o):r>3?i(t,n,o):i(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function se(e,t,n,a){if("a"===n&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?a:"a"===n?a.call(e):a?a.value:t.get(e)}function ue(e,t,n,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,n):i?i.value=n:t.set(e,n),n}null!==(Q=globalThis.litServerRoot)&&void 0!==Q||(globalThis.litServerRoot=Object.defineProperty(new ie,"localName",{get:()=>"lit-server-root"})),new(function(){return c((function e(){s(this,e),this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}),[{key:"define",value:function(e,t){var n,a;if(this.__definitions.has(e)){if("development"!==process.env.NODE_ENV)throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`)}if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:null!==(n=t.observedAttributes)&&void 0!==n?n:[]}),this.__reverseDefinitions.set(t,e),null===(a=this.__pendingWhenDefineds.get(e))||void 0===a||a.resolve(t),this.__pendingWhenDefineds.delete(e)}},{key:"get",value:function(e){var t=this.__definitions.get(e);return null==t?void 0:t.ctor}},{key:"getName",value:function(e){var t;return null!==(t=this.__reverseDefinitions.get(e))&&void 0!==t?t:null}},{key:"upgrade",value:function(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}},{key:"whenDefined",value:function(e){var t,n;return S((function(a){for(;;)switch(a.n){case 0:if(!(t=this.__definitions.get(e))){a.n=1;break}return a.a(2,t.ctor);case 1:return(n=this.__pendingWhenDefineds.get(e))||(n=re(),this.__pendingWhenDefineds.set(e,n)),a.a(2,n.promise)}}),null,this,null,Promise)}}])}()),"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=ie),"function"==typeof SuppressedError&&SuppressedError;var le;!function(e){e.SDK="sdk",e.ML="ml",e.THIRD_PARTY_ANALYTICS="third_party_analytics",e.THIRD_PARTY_TRANSACTIONS="third_party_transactions",e.PAYWALL_PERSONALIZATION="paywall_personalization",e.ANONYMOUS_MODE_CAPABILITY="anonymous_allowed",e.LANGUAGE_MANAGEMENT="language_management",e.ENTITLEMENT_MANAGEMENT="entitlement_management"}(le||(le={}));var de,he={},ce=he.NAMI_SDK_VERSION,me=void 0===ce?"3.3.9":ce,fe=he.PLATFORM_ID_REQUIRED,ve=void 0===fe?"Platform ID is required":fe,pe=he.DEVICE_ID_REQUIRED,ge=void 0===pe?"Device ID is required":pe,ye=he.EXTERNAL_ID_REQUIRED,be=void 0===ye?"External ID is required":ye,we=he.SDK_NOT_INITIALIZED,ke=void 0===we?"SDK has not been initialized. Make sure to call Nami.configure() first!":we,Se=he.CAMPAIGN_NOT_AVAILABLE,Ee=void 0===Se?"Campaign is not available":Se,Me=he.FLOW_SCREENS_NOT_AVAILABLE,Pe=void 0===Me?"Flow screens not available":Me,Te=he.UNABLE_TO_UPDATE_CDP_ID,_e=void 0===Te?"Unable to update CDP id in anonymous mode":Te,De=he.ANONYMOUS_MODE_ALREADY_ON,Ae=void 0===De?"Anonymous mode is already turned on.":De,xe=he.ANONYMOUS_MODE_ALREADY_OFF,Ce=void 0===xe?"Anonymous mode is already turned off.":xe,Ie=he.DEVICE_ID_NOT_SET,Le=void 0===Ie?"Nami Device ID is not set":Ie,Fe=he.AUTH_DEVICE,Re=void 0===Fe?"nami_auth_device":Fe,We=he.NAMI_CONFIGURATION,Ne=void 0===We?"nami_configuration":We,Oe=he.NAMI_PROFILE,je=void 0===Oe?"nami_profile":Oe,$e=he.API_CONFIG,ze=void 0===$e?"api_config":$e,Be=he.API_CAMPAIGN_RULES,He=void 0===Be?"api_campaign_rules":Be,Ue=he.API_PAYWALLS,Ge=void 0===Ue?"api_paywalls":Ue,Ve=he.API_PRODUCTS,Xe=void 0===Ve?"api_products":Ve,Ke=he.API_ACTIVE_ENTITLEMENTS,Ye=void 0===Ke?"api_active_entitlements":Ke,qe=he.SERVER_NAMI_ENTITLEMENTS,Je=void 0===qe?"server_active_entitlements":qe,Qe=he.INITIAL_APP_CONFIG,Ze=void 0===Qe?"initial_app_config":Qe,et=he.INITIAL_CAMPAIGN_RULES,tt=void 0===et?"initial_campaign_rules":et,nt=he.INITIAL_PAYWALLS,at=void 0===nt?"initial_paywalls":nt,it=he.INITIAL_PRODUCTS,rt=void 0===it?"initial_products":it,ot=he.LOCAL_NAMI_ENTITLEMENTS,st=void 0===ot?"local_active_entitlements":ot,ut=he.CUSTOMER_ATTRIBUTES_KEY_PREFIX,lt=void 0===ut?"nami_cmr_attributes_":ut,dt=he.NAMI_CUSTOMER_JOURNEY_STATE,ht=void 0===dt?"nami_customer_journey_state":dt,ct=he.ANONYMOUS_MODE,mt=void 0===ct?"nami_anonymous_mode_v2":ct,ft=he.ANONYMOUS_UUID,vt=void 0===ft?"nami_anonymous_uuid":ft,pt=he.KEY_SESSION_COUNTER,gt=void 0===pt?"nami_session_counter":pt,yt=he.INITIAL_SESSION_COUNTER_VALUE,bt=void 0===yt?1:yt,wt=he.NAMI_LAST_IMPRESSION_ID,kt=void 0===wt?"nami_last_impression_id":wt,St=he.NAMI_PURCHASE_IMPRESSION_ID,Et=void 0===St?"nami_purchase_impression_id":St,Mt=he.NAMI_LAUNCH_ID,Pt=void 0===Mt?"nami_launch_id":Mt,Tt=he.NAMI_SESSION_ID,_t=void 0===Tt?"nami_session_id":Tt,Dt=he.NAMI_LANGUAGE_CODE,At=void 0===Dt?"nami_language_code":Dt,xt=he.NAMI_PURCHASE_CHANNEL,Ct=void 0===xt?"nami_purchase_channel":xt,It=he.API_VERSION,Lt=he.BASE_URL_PATH,Ft=void 0===Lt?`sdk/${void 0===It?"v3":It}/platform`:Lt,Rt=he.BASE_URL,Wt=void 0===Rt?"https://app.namiml.com":Rt,Nt=he.BASE_STAGING_URL,Ot=void 0===Nt?"https://app-staging.namiml.com":Nt,jt=he.CUSTOM_HOST_PREFIX,$t=void 0===jt?"namiAPIHost=":jt,zt=he.USE_STAGING_API,Bt=void 0===zt?"useStagingAPI":zt,Ht=he.EXTENDED_CLIENT_INFO_PREFIX,Ut=void 0===Ht?"extendedClientInfo":Ht,Gt=he.EXTENDED_CLIENT_INFO_DELIMITER,Vt=void 0===Gt?":":Gt,Xt=he.VALIDATE_PRODUCT_GROUPS,Kt=void 0===Xt?"validateProductGroups":Xt,Yt=he.API_MAX_CALLS_LIMIT,qt=void 0===Yt?2:Yt,Jt=he.API_RETRY_DELAY_SEC,Qt=void 0===Jt?2:Jt,Zt=he.API_TIMEOUT_LIMIT,en=void 0===Zt?2e4:Zt,tn=he.DEVICE_API_TIMEOUT_LIMIT,nn=void 0===tn?2e3:tn,an=he.STATUS_BAD_REQUEST,rn=void 0===an?400:an,on=he.STATUS_NOT_FOUND,sn=void 0===on?404:on,un=he.STATUS_CONFLICT,ln=void 0===un?409:un,dn=he.STATUS_INTERNAL_SERVER_ERROR,hn=void 0===dn?500:dn,cn=he.INITIAL_SUCCESS,mn=void 0===cn?"Initial success":cn,fn=he.RECONFIG_SUCCESS,vn=void 0===fn?"Reconfig success":fn,pn=he.ALREADY_CONFIGURED,gn=void 0===pn?"Already configured":pn,yn=he.AVAILABLE_CAMPAIGNS_CHANGED,bn=void 0===yn?"AvailableCampaignsChanged":yn,wn=he.PAYWALL_ACTION_EVENT,kn=void 0===wn?"PaywallActionEvent":wn,Sn=he.AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED,En=void 0===Sn?"AvailableActiveEntitlementsChanged":Sn,Mn=he.CUSTOMER_JOURNEY_STATE_CHANGED,Pn=void 0===Mn?"CustomerJourneyStateChanged":Mn,Tn=he.SKU_TEXT_REGEX,_n=void 0===Tn?/\$\{sku\.(\w+)(:\d+)?\}/g:Tn,Dn=he.VAR_REGEX,An=void 0===Dn?/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g:Dn,xn=he.SMART_TEXT_PATTERN,Cn=void 0===xn?"${":xn,In=he.LIQUID_VARIABLE_REGEX,Ln=void 0===In?/\${[A-Za-z0-9.]+}/g:In;exports.LogLevel=void 0,(de=exports.LogLevel||(exports.LogLevel={}))[de.DEBUG=1]="DEBUG",de[de.INFO=2]="INFO",de[de.WARN=3]="WARN",de[de.ERROR=4]="ERROR";var Fn={debug:exports.LogLevel.DEBUG,info:exports.LogLevel.INFO,warn:exports.LogLevel.WARN,error:exports.LogLevel.ERROR},Rn=function(){return c((function e(){s(this,e),this.currentLogLevel=exports.LogLevel.DEBUG,this.setLogger=e=>{this.currentLogLevel=e?Fn[e]:exports.LogLevel.WARN}}),[{key:"debug",value:function(e,...t){this.shouldLog(exports.LogLevel.DEBUG)&&console.debug(this.formatMessage(exports.LogLevel.DEBUG,e,...t))}},{key:"info",value:function(e,...t){this.shouldLog(exports.LogLevel.INFO)&&console.info(this.formatMessage(exports.LogLevel.INFO,e,...t))}},{key:"warn",value:function(e,...t){this.shouldLog(exports.LogLevel.WARN)&&console.warn(this.formatMessage(exports.LogLevel.WARN,e,...t))}},{key:"error",value:function(e,...t){this.shouldLog(exports.LogLevel.ERROR)&&console.error(this.formatMessage(exports.LogLevel.ERROR,e,...t))}},{key:"shouldLog",value:function(e){return e>=this.currentLogLevel}},{key:"formatMessage",value:function(e,t,...n){var a=exports.LogLevel[e];return`[${(new Date).toISOString()}] [${a}] ${t} ${n=n.map((e=>"object"==typeof e?JSON.stringify(e):e))}`}}])}(),Wn=new Rn;function Nn(e){for(var t=-1,n=null==e?0:e.length,a=0,i=[];++t<n;){var r=e[t];r&&(i[a++]=r)}return i}function On(e,t){return e===t||e!=e&&t!=t}function jn(e,t){for(var n=e.length;n--;)if(On(e[n][0],t))return n;return-1}var $n=Array.prototype.splice;function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}zn.prototype.clear=function(){this.__data__=[],this.size=0},zn.prototype.delete=function(e){var t=this.__data__,n=jn(t,e);return!(n<0)&&(n==t.length-1?t.pop():$n.call(t,n,1),--this.size,!0)},zn.prototype.get=function(e){var t=this.__data__,n=jn(t,e);return n<0?void 0:t[n][1]},zn.prototype.has=function(e){return jn(this.__data__,e)>-1},zn.prototype.set=function(e,t){var n=this.__data__,a=jn(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this};var Bn="object"==typeof global&&global&&global.Object===Object&&global,Hn="object"==typeof self&&self&&self.Object===Object&&self,Un=Bn||Hn||Function("return this")(),Gn=Un.Symbol,Vn=Object.prototype,Xn=Vn.hasOwnProperty,Kn=Vn.toString,Yn=Gn?Gn.toStringTag:void 0;var qn=Object.prototype.toString;var Jn="[object Null]",Qn="[object Undefined]",Zn=Gn?Gn.toStringTag:void 0;function ea(e){return null==e?void 0===e?Qn:Jn:Zn&&Zn in Object(e)?function(e){var t=Xn.call(e,Yn),n=e[Yn];try{e[Yn]=void 0;var a=!0}catch(e){}var i=Kn.call(e);return a&&(t?e[Yn]=n:delete e[Yn]),i}(e):function(e){return qn.call(e)}(e)}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var na="[object AsyncFunction]",aa="[object Function]",ia="[object GeneratorFunction]",ra="[object Proxy]";function oa(e){if(!ta(e))return!1;var t=ea(e);return t==aa||t==ia||t==na||t==ra}var sa,ua=Un["__core-js_shared__"],la=(sa=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||""))?"Symbol(src)_1."+sa:"";var da=Function.prototype.toString;function ha(e){if(null!=e){try{return da.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ca=/^\[object .+?Constructor\]$/,ma=Function.prototype,fa=Object.prototype,va=ma.toString,pa=fa.hasOwnProperty,ga=RegExp("^"+va.call(pa).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ya(e){return!(!ta(e)||(t=e,la&&la in t))&&(oa(e)?ga:ca).test(ha(e));var t}function ba(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ya(n)?n:void 0}var wa=ba(Un,"Map"),ka=ba(Object,"create");var Sa=Object.prototype.hasOwnProperty;var Ea=Object.prototype.hasOwnProperty;function Ma(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}function Pa(e,t){var n,a,i=e.__data__;return("string"==(a=typeof(n=t))||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ta(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}Ma.prototype.clear=function(){this.__data__=ka?ka(null):{},this.size=0},Ma.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ma.prototype.get=function(e){var t=this.__data__;if(ka){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Sa.call(t,e)?t[e]:void 0},Ma.prototype.has=function(e){var t=this.__data__;return ka?void 0!==t[e]:Ea.call(t,e)},Ma.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ka&&void 0===t?"__lodash_hash_undefined__":t,this},Ta.prototype.clear=function(){this.size=0,this.__data__={hash:new Ma,map:new(wa||zn),string:new Ma}},Ta.prototype.delete=function(e){var t=Pa(this,e).delete(e);return this.size-=t?1:0,t},Ta.prototype.get=function(e){return Pa(this,e).get(e)},Ta.prototype.has=function(e){return Pa(this,e).has(e)},Ta.prototype.set=function(e,t){var n=Pa(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this};function _a(e){var t=this.__data__=new zn(e);this.size=t.size}_a.prototype.clear=function(){this.__data__=new zn,this.size=0},_a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_a.prototype.get=function(e){return this.__data__.get(e)},_a.prototype.has=function(e){return this.__data__.has(e)},_a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof zn){var a=n.__data__;if(!wa||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ta(a)}return n.set(e,t),this.size=n.size,this};function Da(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ta;++t<n;)this.add(e[t])}function Aa(e,t){for(var n=-1,a=null==e?0:e.length;++n<a;)if(t(e[n],n,e))return!0;return!1}function xa(e,t){return e.has(t)}Da.prototype.add=Da.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Da.prototype.has=function(e){return this.__data__.has(e)};var Ca=1,Ia=2;function La(e,t,n,a,i,r){var o=n&Ca,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=n&Ia?new Da:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(a)var p=o?a(v,f,h,t,e,r):a(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!Aa(t,(function(e,t){if(!xa(m,t)&&(f===e||i(f,e,n,a,r)))return m.push(t)}))){c=!1;break}}else if(f!==v&&!i(f,v,n,a,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var Fa=Un.Uint8Array;function Ra(e){var t=-1,n=Array(e.size);return e.forEach((function(e,a){n[++t]=[a,e]})),n}function Wa(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Na=1,Oa=2,ja="[object Boolean]",$a="[object Date]",za="[object Error]",Ba="[object Map]",Ha="[object Number]",Ua="[object RegExp]",Ga="[object Set]",Va="[object String]",Xa="[object Symbol]",Ka="[object ArrayBuffer]",Ya="[object DataView]",qa=Gn?Gn.prototype:void 0,Ja=qa?qa.valueOf:void 0;function Qa(e,t){for(var n=-1,a=t.length,i=e.length;++n<a;)e[i+n]=t[n];return e}var Za=Array.isArray;function ei(e,t,n){var a=t(e);return Za(e)?a:Qa(a,n(e))}function ti(){return[]}var ni=Object.prototype.propertyIsEnumerable,ai=Object.getOwnPropertySymbols,ii=ai?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,a=null==e?0:e.length,i=0,r=[];++n<a;){var o=e[n];t(o,n,e)&&(r[i++]=o)}return r}(ai(e),(function(t){return ni.call(e,t)})))}:ti;function ri(e){return null!=e&&"object"==typeof e}function oi(e){return ri(e)&&"[object Arguments]"==ea(e)}var si=Object.prototype,ui=si.hasOwnProperty,li=si.propertyIsEnumerable,di=oi(function(){return arguments}())?oi:function(e){return ri(e)&&ui.call(e,"callee")&&!li.call(e,"callee")};var hi="object"==typeof exports&&exports&&!exports.nodeType&&exports,ci=hi&&"object"==typeof module&&module&&!module.nodeType&&module,mi=ci&&ci.exports===hi?Un.Buffer:void 0,fi=(mi?mi.isBuffer:void 0)||function(){return!1},vi=9007199254740991,pi=/^(?:0|[1-9]\d*)$/;function gi(e,t){var n=typeof e;return!!(t=null==t?vi:t)&&("number"==n||"symbol"!=n&&pi.test(e))&&e>-1&&e%1==0&&e<t}var yi=9007199254740991;function bi(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=yi}var wi={};function ki(e){return function(t){return e(t)}}wi["[object Float32Array]"]=wi["[object Float64Array]"]=wi["[object Int8Array]"]=wi["[object Int16Array]"]=wi["[object Int32Array]"]=wi["[object Uint8Array]"]=wi["[object Uint8ClampedArray]"]=wi["[object Uint16Array]"]=wi["[object Uint32Array]"]=!0,wi["[object Arguments]"]=wi["[object Array]"]=wi["[object ArrayBuffer]"]=wi["[object Boolean]"]=wi["[object DataView]"]=wi["[object Date]"]=wi["[object Error]"]=wi["[object Function]"]=wi["[object Map]"]=wi["[object Number]"]=wi["[object Object]"]=wi["[object RegExp]"]=wi["[object Set]"]=wi["[object String]"]=wi["[object WeakMap]"]=!1;var Si="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ei=Si&&"object"==typeof module&&module&&!module.nodeType&&module,Mi=Ei&&Ei.exports===Si&&Bn.process,Pi=function(){try{var e=Ei&&Ei.require&&Ei.require("util").types;return e||Mi&&Mi.binding&&Mi.binding("util")}catch(e){}}(),Ti=Pi&&Pi.isTypedArray,_i=Ti?ki(Ti):function(e){return ri(e)&&bi(e.length)&&!!wi[ea(e)]},Di=Object.prototype.hasOwnProperty;function Ai(e,t){var n=Za(e),a=!n&&di(e),i=!n&&!a&&fi(e),r=!n&&!a&&!i&&_i(e),o=n||a||i||r,s=o?function(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}(e.length,String):[],u=s.length;for(var l in e)!t&&!Di.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||gi(l,u))||s.push(l);return s}var xi=Object.prototype;function Ci(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xi)}function Ii(e,t){return function(n){return e(t(n))}}var Li=Ii(Object.keys,Object),Fi=Object.prototype.hasOwnProperty;function Ri(e){return null!=e&&bi(e.length)&&!oa(e)}function Wi(e){return Ri(e)?Ai(e):function(e){if(!Ci(e))return Li(e);var t=[];for(var n in Object(e))Fi.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}function Ni(e){return ei(e,Wi,ii)}var Oi=1,ji=Object.prototype.hasOwnProperty;var $i=ba(Un,"DataView"),zi=ba(Un,"Promise"),Bi=ba(Un,"Set"),Hi=ba(Un,"WeakMap"),Ui="[object Map]",Gi="[object Promise]",Vi="[object Set]",Xi="[object WeakMap]",Ki="[object DataView]",Yi=ha($i),qi=ha(wa),Ji=ha(zi),Qi=ha(Bi),Zi=ha(Hi),er=ea;($i&&er(new $i(new ArrayBuffer(1)))!=Ki||wa&&er(new wa)!=Ui||zi&&er(zi.resolve())!=Gi||Bi&&er(new Bi)!=Vi||Hi&&er(new Hi)!=Xi)&&(er=function(e){var t=ea(e),n="[object Object]"==t?e.constructor:void 0,a=n?ha(n):"";if(a)switch(a){case Yi:return Ki;case qi:return Ui;case Ji:return Gi;case Qi:return Vi;case Zi:return Xi}return t});var tr=1,nr="[object Arguments]",ar="[object Array]",ir="[object Object]",rr=Object.prototype.hasOwnProperty;function or(e,t,n,a,i,r){var o=Za(e),s=Za(t),u=o?ar:er(e),l=s?ar:er(t),d=(u=u==nr?ir:u)==ir,h=(l=l==nr?ir:l)==ir,c=u==l;if(c&&fi(e)){if(!fi(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new _a),o||_i(e)?La(e,t,n,a,i,r):function(e,t,n,a,i,r,o){switch(n){case Ya:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ka:return!(e.byteLength!=t.byteLength||!r(new Fa(e),new Fa(t)));case ja:case $a:case Ha:return On(+e,+t);case za:return e.name==t.name&&e.message==t.message;case Ua:case Va:return e==t+"";case Ba:var s=Ra;case Ga:var u=a&Na;if(s||(s=Wa),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;a|=Oa,o.set(e,t);var d=La(s(e),s(t),a,i,r,o);return o.delete(e),d;case Xa:if(Ja)return Ja.call(e)==Ja.call(t)}return!1}(e,t,u,n,a,i,r);if(!(n&tr)){var m=d&&rr.call(e,"__wrapped__"),f=h&&rr.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new _a),i(v,p,n,a,r)}}return!!c&&(r||(r=new _a),function(e,t,n,a,i,r){var o=n&Oi,s=Ni(e),u=s.length;if(u!=Ni(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:ji.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(a)var g=o?a(p,v,d,t,e,r):a(v,p,d,e,t,r);if(!(void 0===g?v===p||i(v,p,n,a,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,n,a,i,r))}function sr(e,t,n,a,i){return e===t||(null==e||null==t||!ri(e)&&!ri(t)?e!=e&&t!=t:or(e,t,n,a,sr,i))}var ur=1,lr=2;function dr(e){return e==e&&!ta(e)}function hr(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function cr(e){var t=function(e){for(var t=Wi(e),n=t.length;n--;){var a=t[n],i=e[a];t[n]=[a,i,dr(i)]}return t}(e);return 1==t.length&&t[0][2]?hr(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,a){var i=n.length,r=i;if(null==e)return!r;for(e=Object(e);i--;){var o=n[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<r;){var s=(o=n[i])[0],u=e[s],l=o[1];if(o[2]){if(void 0===u&&!(s in e))return!1}else{var d=new _a;if(!sr(l,u,ur|lr,a,d))return!1}}return!0}(n,0,t)}}var mr="[object Symbol]";function fr(e){return"symbol"==typeof e||ri(e)&&ea(e)==mr}var vr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pr=/^\w*$/;function gr(e,t){if(Za(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!fr(e))||(pr.test(e)||!vr.test(e)||null!=t&&e in Object(t))}var yr="Expected a function";function br(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(yr);var n=function(){var a=arguments,i=t?t.apply(this,a):a[0],r=n.cache;if(r.has(i))return r.get(i);var o=e.apply(this,a);return n.cache=r.set(i,o)||r,o};return n.cache=new(br.Cache||Ta),n}br.Cache=Ta;var wr,kr,Sr,Er=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/\\(\\)?/g,Pr=(wr=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Er,(function(e,n,a,i){t.push(a?i.replace(Mr,"$1"):n||e)})),t},kr=br(wr,(function(e){return 500===Sr.size&&Sr.clear(),e})),Sr=kr.cache,kr);var Tr=1/0,_r=Gn?Gn.prototype:void 0,Dr=_r?_r.toString:void 0;function Ar(e){if("string"==typeof e)return e;if(Za(e))return function(e,t){for(var n=-1,a=null==e?0:e.length,i=Array(a);++n<a;)i[n]=t(e[n],n,e);return i}(e,Ar)+"";if(fr(e))return Dr?Dr.call(e):"";var t=e+"";return"0"==t&&1/e==-Tr?"-0":t}function xr(e){return null==e?"":Ar(e)}function Cr(e,t){return Za(e)?e:gr(e,t)?[e]:Pr(xr(e))}var Ir=1/0;function Lr(e){if("string"==typeof e||fr(e))return e;var t=e+"";return"0"==t&&1/e==-Ir?"-0":t}function Fr(e,t){for(var n=0,a=(t=Cr(t,e)).length;null!=e&&n<a;)e=e[Lr(t[n++])];return n&&n==a?e:void 0}function Rr(e,t){return null!=e&&t in Object(e)}function Wr(e,t){return null!=e&&function(e,t,n){for(var a=-1,i=(t=Cr(t,e)).length,r=!1;++a<i;){var o=Lr(t[a]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||++a!=i?r:!!(i=null==e?0:e.length)&&bi(i)&&gi(o,i)&&(Za(e)||di(e))}(e,t,Rr)}var Nr=1,Or=2;function jr(e,t){return gr(e)&&dr(t)?hr(Lr(e),t):function(n){var a=function(e,t,n){var a=null==e?void 0:Fr(e,t);return void 0===a?n:a}(n,e);return void 0===a&&a===t?Wr(n,e):sr(t,a,Nr|Or)}}function $r(e){return e}function zr(e){return gr(e)?(t=Lr(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Fr(t,e)}}(e);var t}function Br(e){return e!=e}function Hr(e,t){return!!(null==e?0:e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var a=n-1,i=e.length;++a<i;)if(e[a]===t)return a;return-1}(e,t,n):function(e,t,n){for(var a=e.length,i=n+-1;++i<a;)if(t(e[i],i,e))return i;return-1}(e,Br,n)}(e,t,0)>-1}var Ur=Bi&&1/Wa(new Bi([,-0]))[1]==1/0?function(e){return new Bi(e)}:function(){},Gr=200;function Vr(e,t){return e&&e.length?function(e,t,n){var a=-1,i=Hr,r=e.length,o=!0,s=[],u=s;if(r>=Gr){var l=t?null:Ur(e);if(l)return Wa(l);o=!1,i=xa,u=new Da}else u=t?[]:s;e:for(;++a<r;){var d=e[a],h=t?t(d):d;if(d=0!==d?d:0,o&&h==h){for(var c=u.length;c--;)if(u[c]===h)continue e;t&&u.push(h),s.push(d)}else i(u,h,n)||(u!==s&&u.push(h),s.push(d))}return s}(e,"function"==typeof(n=t)?n:null==n?$r:"object"==typeof n?Za(n)?jr(n[0],n[1]):cr(n):zr(n)):[];var n}var Xr=function(){return c((function e(){s(this,e),this.memoryStore={}}),[{key:"setDevice",value:function(e){this.setItem(Re,e)}},{key:"getDevice",value:function(){return this.getItem(Re)}},{key:"resetDevice",value:function(){this.resetItem(Re)}},{key:"getAnonymousMode",value:function(){return this.getItem(mt)||!1}},{key:"setAnonymousMode",value:function(e){this.setItem(mt,e)}},{key:"clearAnonymousMode",value:function(){this.resetItem(mt)}},{key:"setAppConfig",value:function(e,t){this.setItem(e,t)}},{key:"getAppConfig",value:function(e){return this.getItem(e)}},{key:"setLanguageCode",value:function(e){this.setItem(At,e||"en")}},{key:"getLanguageCode",value:function(){return this.getItem(At)||"en"}},{key:"setCampaignRules",value:function(e,t){e!==tt?this.isTtlCacheKey(e)?this.setWithTtl(e,t):this.setItem(e,t):this.memoryStore[tt]=JSON.stringify(t)}},{key:"getCampaignRules",value:function(e){return e===tt?this.memoryStore[tt]?JSON.parse(this.memoryStore[tt]):null:this.isTtlCacheKey(e)?this.getWithTtl(e):this.getItem(e)}},{key:"setPaywalls",value:function(e,t){e!==at?this.isTtlCacheKey(e)?this.setWithTtl(e,t):this.setItem(e,t):this.memoryStore[at]=JSON.stringify(t)}},{key:"getPaywalls",value:function(e){return e===at?this.memoryStore[at]?JSON.parse(this.memoryStore[at]):null:this.isTtlCacheKey(e)?this.getWithTtl(e):this.getItem(e)}},{key:"setActiveEntitlements",value:function(e,t){this.setItem(e,t)}},{key:"getActiveEntitlements",value:function(e){return this.getItem(e)||[]}},{key:"setNamiEntitlements",value:function(e,t){this.setItem(e,t)}},{key:"getNamiEntitlements",value:function(e){return this.getItem(e)||[]}},{key:"setProducts",value:function(e,t){this.setItem(e,t)}},{key:"getProducts",value:function(e){return this.getItem(e)}},{key:"getCachedProducts",value:function(){var e,t,n=null!==(e=this.getItem(Xe))&&void 0!==e?e:[];return Vr(Nn([...null!==(t=this.getItem(rt))&&void 0!==t?t:[],...n]),"sku_ref_id")}},{key:"setNamiConfig",value:function(e){this.setItem(Ne,e)}},{key:"getNamiConfig",value:function(){return this.getItem(Ne)}},{key:"setCustomerAttribute",value:function(e,t){this.setItem(lt+e,t)}},{key:"getCustomerAttribute",value:function(e){return this.getItem(lt+e)}},{key:"getAllCustomerAttributes",value:function(){return Object.entries(localStorage).filter((([e])=>e.includes(lt))).map((([e,t])=>e.replace(lt,"")+":"+t))}},{key:"getAllCustomerAttributesKeys",value:function(){return Object.keys(localStorage).filter((e=>e.includes(lt))).map((e=>e.replace(lt,"")))}},{key:"clearCustomerAttribute",value:function(e){var t=lt+e,n=this.getItem(t);return n&&this.resetItem(t),!!n}},{key:"clearAllCustomerAttributes",value:function(){Object.keys(localStorage).filter((e=>e.includes(lt))).map((e=>this.resetItem(e)))}},{key:"setNamiProfile",value:function(e){this.setItem(je,e)}},{key:"getNamiProfile",value:function(){return this.getItem(je)}},{key:"removeNamiProfile",value:function(){this.resetItem(je)}},{key:"setCustomerJourneyState",value:function(e){this.setItem(ht,e)}},{key:"getCustomerJourneyState",value:function(){return this.getItem(ht)}},{key:"setSessionCounter",value:function(){var e=this.getItem(gt),t=e?parseInt(e):bt||bt;this.setItem(gt,t+1)}},{key:"getSessionCounter",value:function(){var e=this.getItem(gt);return e?parseInt(e):bt}},{key:"setLastImpressionId",value:function(e){this.setItem(kt,e)}},{key:"getLastImpressionId",value:function(){var e;return null!==(e=this.getItem(kt))&&void 0!==e?e:""}},{key:"setPurchaseImpression",value:function(){var e,t=null!==(e=this.getLastImpressionId())&&void 0!==e?e:"";this.setItem(Et,t)}},{key:"getPurchaseImpression",value:function(){var e;return null!==(e=this.getItem(Et))&&void 0!==e?e:""}},{key:"setSessionId",value:function(e){e&&this.setItem(_t,e)}},{key:"getSessionId",value:function(){var e;return null!==(e=this.getItem(_t))&&void 0!==e?e:""}},{key:"clearSessionId",value:function(){this.resetItem(_t)}},{key:"setLaunchId",value:function(e){e&&this.setItem(Pt,e)}},{key:"getLaunchId",value:function(){var e;return null!==(e=this.getItem(Pt))&&void 0!==e?e:""}},{key:"clearLaunchId",value:function(){this.resetItem(Pt)}},{key:"setPurchaseChannel",value:function(e){e&&this.setItem(Ct,e)}},{key:"getPurchaseChannel",value:function(){return this.getItem(Ct)}},{key:"getAnonymousUUID",value:function(){return this.getItem(vt)}},{key:"setAnonymousUUID",value:function(e){this.setItem(vt,e)}},{key:"clearAnonymousUUID",value:function(){this.resetItem(vt)}},{key:"isTtlCacheKey",value:function(e){return e===He||e===Ge}},{key:"getCampaignCacheTtl",value:function(){var e,t=this.getAppConfig(ze)||this.getAppConfig(Ze);return null!==(e=null==t?void 0:t.campaign_cache_ttl)&&void 0!==e?e:null}},{key:"setWithTtl",value:function(e,t){var n=this.getCampaignCacheTtl();0!==n?null!==n&&n>0?this.setItem(e,{data:t,cachedAt:Date.now()}):this.setItem(e,t):this.memoryStore[e]=JSON.stringify(t)}},{key:"isTimestampedCache",value:function(e){return"object"==typeof e&&null!==e&&"cachedAt"in e&&"data"in e}},{key:"getWithTtl",value:function(e){var t=this.getCampaignCacheTtl(),n=this.memoryStore[e];if(null!=n){if(null===t||0===t)return JSON.parse(n);delete this.memoryStore[e]}var a=this.getItem(e);return null===a?null:null===t?this.isTimestampedCache(a)?a.data:a:this.isTimestampedCache(a)?(Date.now()-a.cachedAt)/1e3>=t?(this.resetItem(e),null):a.data:a}},{key:"setItem",value:function(e,t){var n;try{n=JSON.stringify(t)}catch(t){return void Wn.error(`Serialization failed for ${e}`,t)}try{localStorage.setItem(e,n)}catch(t){Wn.error("Error setting item in localStorage:",t),this.resetItem(e),this.memoryStore[e]=n}}},{key:"getItem",value:function(e){try{var t=localStorage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){"undefined"!=typeof window&&Wn.error("Error getting item from localStorage:",e,": ",t)}var n=this.memoryStore[e];return null!=n?JSON.parse(n):null}},{key:"resetItem",value:function(e){try{localStorage.removeItem(e)}catch(t){"undefined"!=typeof window&&Wn.error("Error removing item from localStorage:",e,": ",t)}delete this.memoryStore[e]}},{key:"clear",value:function(){try{localStorage.clear()}catch(e){Wn.error("Error clearing localStorage:",e)}this.memoryStore={}}}])}(),Kr=new Xr,Yr=function(){function e(t,n){var a;return s(this,e),(a=o(this,e,[n])).statusCode=t,a.status=t,a.message=`RetryLimitExceededError: ${a.message}`,a}return g(e,D(Error)),c(e)}(),qr=function(){function e(){return s(this,e),o(this,e,arguments)}return g(e,D(Error)),c(e)}(),Jr=function(){function e(){var t;return s(this,e),(t=o(this,e)).status=409,t.name="ConflictError",t.message="ConflictError: Server responded with conflict",t}return g(e,qr),c(e)}(),Qr=function(){function e(){return s(this,e),o(this,e,[ke])}return g(e,D(Error)),c(e)}(),Zr=function(){function e(){return s(this,e),o(this,e,[ve])}return g(e,D(Error)),c(e)}(),eo=function(){function e(){return s(this,e),o(this,e,[ge])}return g(e,D(Error)),c(e)}(),to=function(){function e(){return s(this,e),o(this,e,[be])}return g(e,D(Error)),c(e)}(),no=function(){function e(){return s(this,e),o(this,e,[Ee])}return g(e,D(Error)),c(e)}(),ao=function(){function e(){return s(this,e),o(this,e,[Pe])}return g(e,D(Error)),c(e)}(),io=function(){function e(){return s(this,e),o(this,e,[Ae])}return g(e,D(Error)),c(e)}(),ro=function(){function e(){return s(this,e),o(this,e,[Ce])}return g(e,D(Error)),c(e)}(),oo=function(){function e(){return s(this,e),o(this,e,[Ce])}return g(e,D(Error)),c(e)}(),so=function(){function e(){return s(this,e),o(this,e,[_e])}return g(e,D(Error)),c(e)}(),uo=function(){function e(t){var n;return s(this,e),(n=o(this,e,[t])).message=`BadRequestError: ${n.message}`,n}return g(e,qr),c(e)}(),lo=function(){function e(t){var n;return s(this,e),(n=o(this,e,[t])).message=`NotFoundError: ${n.message}`,n}return g(e,qr),c(e)}(),ho=function(){function e(t,n){var a;return s(this,e),(a=o(this,e,[n])).statusCode=t,a.message=`ClientError: ${a.message}`,a}return g(e,qr),c(e)}(),co=function(){function e(t){var n;return s(this,e),(n=o(this,e,[t])).message=`ServerError: ${n.message}`,n}return g(e,qr),c(e)}(),mo=(e,t)=>{if(e==rn)throw new uo(t);if(e==sn)throw new lo(t);if(e==ln)throw new Jr;if(e>rn&&e<hn)throw new ho(e,t);if(e>=hn)throw new co(t)};function fo(e,t,n=en,a=qt){var i,o,s;return S((function(u){for(;;)switch(u.n){case 0:return i=0,o=()=>{var s,u;return S((function(l){for(;;)switch(l.n){case 0:return l.n=1,r(vo(e,t,n));case 1:if((s=l.v).ok){l.n=5;break}if(s.status!=ln){l.n=2;break}throw new Jr;case 2:if(!(++i<=a)){l.n=4;break}return u=1e3*(i+Qt),l.n=3,r(new Promise((e=>setTimeout(e,u))));case 3:return l.a(2,o());case 4:throw new Yr(s.status,`Request failed after ${a} retries`);case 5:return l.a(2,s)}}),null,null,null,Promise)},u.n=1,r(o());case 1:return s=u.v,u.a(2,s.json())}}),null,null,null,Promise)}function vo(e,t={},n){var a,i,o;return S((function(s){for(;;)switch(s.n){case 0:return a=new AbortController,i=setTimeout((()=>a.abort()),n),t.signal=a.signal,s.n=1,r(fetch(e,t));case 1:return o=s.v,clearTimeout(i),s.a(2,o)}}),null,null,null,Promise)}function po(e){for(var t=e.length;--t>=0;)e[t]=0}po(new Array(576)),po(new Array(60)),po(new Array(512)),po(new Array(256)),po(new Array(29)),po(new Array(30));var go=(e,t,n,a)=>{for(var i=65535&e,r=e>>>16&65535,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{r=r+(i=i+t[a++]|0)|0}while(--o);i%=65521,r%=65521}return i|r<<16},yo=new Uint32Array((()=>{for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),bo=(e,t,n,a)=>{var i=yo,r=a+n;e^=-1;for(var o=a;o<r;o++)e=e>>>8^i[255&(e^t[o])];return~e},wo={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ko={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},So=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Eo={assign:function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var a in n)So(n,a)&&(e[a]=n[a])}}return e},flattenChunks:e=>{for(var t=0,n=0,a=e.length;n<a;n++)t+=e[n].length;for(var i=new Uint8Array(t),r=0,o=0,s=e.length;r<s;r++){var u=e[r];i.set(u,o),o+=u.length}return i}},Mo=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Mo=!1}for(var Po=new Uint8Array(256),To=0;To<256;To++)Po[To]=To>=252?6:To>=248?5:To>=240?4:To>=224?3:To>=192?2:1;Po[254]=Po[254]=1;var _o={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,a,i,r,o=e.length,s=0;for(i=0;i<o;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(a=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(a-56320),i++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),r=0,i=0;r<s;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(a=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(a-56320),i++),n<128?t[r++]=n:n<2048?(t[r++]=192|n>>>6,t[r++]=128|63&n):n<65536?(t[r++]=224|n>>>12,t[r++]=128|n>>>6&63,t[r++]=128|63&n):(t[r++]=240|n>>>18,t[r++]=128|n>>>12&63,t[r++]=128|n>>>6&63,t[r++]=128|63&n);return t},buf2string:(e,t)=>{var n,a,i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var r=new Array(2*i);for(a=0,n=0;n<i;){var o=e[n++];if(o<128)r[a++]=o;else{var s=Po[o];if(s>4)r[a++]=65533,n+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&n<i;)o=o<<6|63&e[n++],s--;s>1?r[a++]=65533:o<65536?r[a++]=o:(o-=65536,r[a++]=55296|o>>10&1023,r[a++]=56320|1023&o)}}}return((e,t)=>{if(t<65534&&e.subarray&&Mo)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n})(r,a)},utf8border:(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);for(var n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Po[e[n]]>t?n:t}};var Do=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ao=16209,xo=function(e,t){var n,a,i,r,o,s,u,l,d,h,c,m,f,v,p,g,y,b,w,k,S,E,M,P,T=e.state;n=e.next_in,M=e.input,a=n+(e.avail_in-5),i=e.next_out,P=e.output,r=i-(t-e.avail_out),o=i+(e.avail_out-257),s=T.dmax,u=T.wsize,l=T.whave,d=T.wnext,h=T.window,c=T.hold,m=T.bits,f=T.lencode,v=T.distcode,p=(1<<T.lenbits)-1,g=(1<<T.distbits)-1;e:do{m<15&&(c+=M[n++]<<m,m+=8,c+=M[n++]<<m,m+=8),y=f[c&p];t:for(;;){if(c>>>=b=y>>>24,m-=b,0===(b=y>>>16&255))P[i++]=65535&y;else{if(!(16&b)){if(64&b){if(32&b){T.mode=16191;break e}e.msg="invalid literal/length code",T.mode=Ao;break e}y=f[(65535&y)+(c&(1<<b)-1)];continue t}for(w=65535&y,(b&=15)&&(m<b&&(c+=M[n++]<<m,m+=8),w+=c&(1<<b)-1,c>>>=b,m-=b),m<15&&(c+=M[n++]<<m,m+=8,c+=M[n++]<<m,m+=8),y=v[c&g];;){if(c>>>=b=y>>>24,m-=b,16&(b=y>>>16&255)){if(k=65535&y,m<(b&=15)&&(c+=M[n++]<<m,(m+=8)<b&&(c+=M[n++]<<m,m+=8)),(k+=c&(1<<b)-1)>s){e.msg="invalid distance too far back",T.mode=Ao;break e}if(c>>>=b,m-=b,k>(b=i-r)){if((b=k-b)>l&&T.sane){e.msg="invalid distance too far back",T.mode=Ao;break e}if(S=0,E=h,0===d){if(S+=u-b,b<w){w-=b;do{P[i++]=h[S++]}while(--b);S=i-k,E=P}}else if(d<b){if(S+=u+d-b,(b-=d)<w){w-=b;do{P[i++]=h[S++]}while(--b);if(S=0,d<w){w-=b=d;do{P[i++]=h[S++]}while(--b);S=i-k,E=P}}}else if(S+=d-b,b<w){w-=b;do{P[i++]=h[S++]}while(--b);S=i-k,E=P}for(;w>2;)P[i++]=E[S++],P[i++]=E[S++],P[i++]=E[S++],w-=3;w&&(P[i++]=E[S++],w>1&&(P[i++]=E[S++]))}else{S=i-k;do{P[i++]=P[S++],P[i++]=P[S++],P[i++]=P[S++],w-=3}while(w>2);w&&(P[i++]=P[S++],w>1&&(P[i++]=P[S++]))}break}if(64&b){e.msg="invalid distance code",T.mode=Ao;break e}y=v[(65535&y)+(c&(1<<b)-1)]}}break}}while(n<a&&i<o);n-=w=m>>3,c&=(1<<(m-=w<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<a?a-n+5:5-(n-a),e.avail_out=i<o?o-i+257:257-(i-o),T.hold=c,T.bits=m},Co=15,Io=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Lo=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Fo=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Ro=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Wo=(e,t,n,a,i,r,o,s)=>{var u,l,d,h,c,m,f,v,p,g=s.bits,y=0,b=0,w=0,k=0,S=0,E=0,M=0,P=0,T=0,_=0,D=null,A=new Uint16Array(16),x=new Uint16Array(16),C=null;for(y=0;y<=Co;y++)A[y]=0;for(b=0;b<a;b++)A[t[n+b]]++;for(S=g,k=Co;k>=1&&0===A[k];k--);if(S>k&&(S=k),0===k)return i[r++]=20971520,i[r++]=20971520,s.bits=1,0;for(w=1;w<k&&0===A[w];w++);for(S<w&&(S=w),P=1,y=1;y<=Co;y++)if(P<<=1,(P-=A[y])<0)return-1;if(P>0&&(0===e||1!==k))return-1;for(x[1]=0,y=1;y<Co;y++)x[y+1]=x[y]+A[y];for(b=0;b<a;b++)0!==t[n+b]&&(o[x[t[n+b]]++]=b);if(0===e?(D=C=o,m=20):1===e?(D=Io,C=Lo,m=257):(D=Fo,C=Ro,m=0),_=0,b=0,y=w,c=r,E=S,M=0,d=-1,h=(T=1<<S)-1,1===e&&T>852||2===e&&T>592)return 1;for(;;){f=y-M,o[b]+1<m?(v=0,p=o[b]):o[b]>=m?(v=C[o[b]-m],p=D[o[b]-m]):(v=96,p=0),u=1<<y-M,w=l=1<<E;do{i[c+(_>>M)+(l-=u)]=f<<24|v<<16|p}while(0!==l);for(u=1<<y-1;_&u;)u>>=1;if(0!==u?(_&=u-1,_+=u):_=0,b++,0==--A[y]){if(y===k)break;y=t[n+o[b]]}if(y>S&&(_&h)!==d){for(0===M&&(M=S),c+=w,P=1<<(E=y-M);E+M<k&&!((P-=A[E+M])<=0);)E++,P<<=1;if(T+=1<<E,1===e&&T>852||2===e&&T>592)return 1;i[d=_&h]=S<<24|E<<16|c-r}}return 0!==_&&(i[c+_]=y-M<<24|64<<16),s.bits=S,0},No=ko.Z_FINISH,Oo=ko.Z_BLOCK,jo=ko.Z_TREES,$o=ko.Z_OK,zo=ko.Z_STREAM_END,Bo=ko.Z_NEED_DICT,Ho=ko.Z_STREAM_ERROR,Uo=ko.Z_DATA_ERROR,Go=ko.Z_MEM_ERROR,Vo=ko.Z_BUF_ERROR,Xo=ko.Z_DEFLATED,Ko=16180,Yo=16190,qo=16191,Jo=16192,Qo=16194,Zo=16199,es=16200,ts=16206,ns=16209,as=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function is(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var rs,os,ss=e=>{if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<Ko||t.mode>16211?1:0},us=e=>{if(ss(e))return Ho;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Ko,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,$o},ls=e=>{if(ss(e))return Ho;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,us(e)},ds=(e,t)=>{var n;if(ss(e))return Ho;var a=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ho:(null!==a.window&&a.wbits!==t&&(a.window=null),a.wrap=n,a.wbits=t,ls(e))},hs=(e,t)=>{if(!e)return Ho;var n=new is;e.state=n,n.strm=e,n.window=null,n.mode=Ko;var a=ds(e,t);return a!==$o&&(e.state=null),a},cs=!0,ms=e=>{if(cs){rs=new Int32Array(512),os=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Wo(1,e.lens,0,288,rs,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Wo(2,e.lens,0,32,os,0,e.work,{bits:5}),cs=!1}e.lencode=rs,e.lenbits=9,e.distcode=os,e.distbits=5},fs=(e,t,n,a)=>{var i,r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),a>=r.wsize?(r.window.set(t.subarray(n-r.wsize,n),0),r.wnext=0,r.whave=r.wsize):((i=r.wsize-r.wnext)>a&&(i=a),r.window.set(t.subarray(n-a,n-a+i),r.wnext),(a-=i)?(r.window.set(t.subarray(n-a,n),0),r.wnext=a,r.whave=r.wsize):(r.wnext+=i,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=i))),0},vs=(e,t)=>{var n,a,i,r,o,s,u,l,d,h,c,m,f,v,p,g,y,b,w,k,S,E,M,P,T=0,_=new Uint8Array(4),D=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ss(e)||!e.output||!e.input&&0!==e.avail_in)return Ho;(n=e.state).mode===qo&&(n.mode=Jo),o=e.next_out,i=e.output,u=e.avail_out,r=e.next_in,a=e.input,s=e.avail_in,l=n.hold,d=n.bits,h=s,c=u,E=$o;e:for(;;)switch(n.mode){case Ko:if(0===n.wrap){n.mode=Jo;break}for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(2&n.wrap&&35615===l){0===n.wbits&&(n.wbits=15),n.check=0,_[0]=255&l,_[1]=l>>>8&255,n.check=bo(n.check,_,2,0),l=0,d=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=ns;break}if((15&l)!==Xo){e.msg="unknown compression method",n.mode=ns;break}if(d-=4,S=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=S),S>15||S>n.wbits){e.msg="invalid window size",n.mode=ns;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:qo,l=0,d=0;break;case 16181:for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(n.flags=l,(255&n.flags)!==Xo){e.msg="unknown compression method",n.mode=ns;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=ns;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=bo(n.check,_,2,0)),l=0,d=0,n.mode=16182;case 16182:for(;d<32;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,_[2]=l>>>16&255,_[3]=l>>>24&255,n.check=bo(n.check,_,4,0)),l=0,d=0,n.mode=16183;case 16183:for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=bo(n.check,_,2,0)),l=0,d=0,n.mode=16184;case 16184:if(1024&n.flags){for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=bo(n.check,_,2,0)),l=0,d=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((m=n.length)>s&&(m=s),m&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(a.subarray(r,r+m),S)),512&n.flags&&4&n.wrap&&(n.check=bo(n.check,a,m,r)),s-=m,r+=m,n.length-=m),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;m=0;do{S=a[r+m++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=bo(n.check,a,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;m=0;do{S=a[r+m++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=bo(n.check,a,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;d<16;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=ns;break}l=0,d=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=qo;break;case 16189:for(;d<32;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}e.adler=n.check=as(l),l=0,d=0,n.mode=Yo;case Yo:if(0===n.havedict)return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,Bo;e.adler=n.check=1,n.mode=qo;case qo:if(t===Oo||t===jo)break e;case Jo:if(n.last){l>>>=7&d,d-=7&d,n.mode=ts;break}for(;d<3;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}switch(n.last=1&l,d-=1,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(ms(n),n.mode=Zo,t===jo){l>>>=2,d-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=ns}l>>>=2,d-=2;break;case 16193:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ns;break}if(n.length=65535&l,l=0,d=0,n.mode=Qo,t===jo)break e;case Qo:n.mode=16195;case 16195:if(m=n.length){if(m>s&&(m=s),m>u&&(m=u),0===m)break e;i.set(a.subarray(r,r+m),o),s-=m,r+=m,u-=m,o+=m,n.length-=m;break}n.mode=qo;break;case 16196:for(;d<14;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(n.nlen=257+(31&l),l>>>=5,d-=5,n.ndist=1+(31&l),l>>>=5,d-=5,n.ncode=4+(15&l),l>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ns;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;d<3;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.lens[D[n.have++]]=7&l,l>>>=3,d-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},E=Wo(0,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,E){e.msg="invalid code lengths set",n.mode=ns;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;g=(T=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&T,!((p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(y<16)l>>>=p,d-=p,n.lens[n.have++]=y;else{if(16===y){for(P=p+2;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(l>>>=p,d-=p,0===n.have){e.msg="invalid bit length repeat",n.mode=ns;break}S=n.lens[n.have-1],m=3+(3&l),l>>>=2,d-=2}else if(17===y){for(P=p+3;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}d-=p,S=0,m=3+(7&(l>>>=p)),l>>>=3,d-=3}else{for(P=p+7;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}d-=p,S=0,m=11+(127&(l>>>=p)),l>>>=7,d-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ns;break}for(;m--;)n.lens[n.have++]=S}}if(n.mode===ns)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=ns;break}if(n.lenbits=9,M={bits:n.lenbits},E=Wo(1,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,E){e.msg="invalid literal/lengths set",n.mode=ns;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},E=Wo(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,E){e.msg="invalid distances set",n.mode=ns;break}if(n.mode=Zo,t===jo)break e;case Zo:n.mode=es;case es:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,xo(e,c),o=e.next_out,i=e.output,u=e.avail_out,r=e.next_in,a=e.input,s=e.avail_in,l=n.hold,d=n.bits,n.mode===qo&&(n.back=-1);break}for(n.back=0;g=(T=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&T,!((p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(g&&!(240&g)){for(b=p,w=g,k=y;g=(T=n.lencode[k+((l&(1<<b+w)-1)>>b)])>>>16&255,y=65535&T,!(b+(p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}l>>>=b,d-=b,n.back+=b}if(l>>>=p,d-=p,n.back+=p,n.length=y,0===g){n.mode=16205;break}if(32&g){n.back=-1,n.mode=qo;break}if(64&g){e.msg="invalid literal/length code",n.mode=ns;break}n.extra=15&g,n.mode=16201;case 16201:if(n.extra){for(P=n.extra;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;g=(T=n.distcode[l&(1<<n.distbits)-1])>>>16&255,y=65535&T,!((p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(!(240&g)){for(b=p,w=g,k=y;g=(T=n.distcode[k+((l&(1<<b+w)-1)>>b)])>>>16&255,y=65535&T,!(b+(p=T>>>24)<=d);){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}l>>>=b,d-=b,n.back+=b}if(l>>>=p,d-=p,n.back+=p,64&g){e.msg="invalid distance code",n.mode=ns;break}n.offset=y,n.extra=15&g,n.mode=16203;case 16203:if(n.extra){for(P=n.extra;d<P;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ns;break}n.mode=16204;case 16204:if(0===u)break e;if(m=c-u,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ns;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),v=n.window}else v=i,f=o-n.offset,m=n.length;m>u&&(m=u),u-=m,n.length-=m;do{i[o++]=v[f++]}while(--m);0===n.length&&(n.mode=es);break;case 16205:if(0===u)break e;i[o++]=n.length,u--,n.mode=es;break;case ts:if(n.wrap){for(;d<32;){if(0===s)break e;s--,l|=a[r++]<<d,d+=8}if(c-=u,e.total_out+=c,n.total+=c,4&n.wrap&&c&&(e.adler=n.check=n.flags?bo(n.check,i,c,o-c):go(n.check,i,c,o-c)),c=u,4&n.wrap&&(n.flags?l:as(l))!==n.check){e.msg="incorrect data check",n.mode=ns;break}l=0,d=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;d<32;){if(0===s)break e;s--,l+=a[r++]<<d,d+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=ns;break}l=0,d=0}n.mode=16208;case 16208:E=zo;break e;case ns:E=Uo;break e;case 16210:return Go;default:return Ho}return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,(n.wsize||c!==e.avail_out&&n.mode<ns&&(n.mode<ts||t!==No))&&fs(e,e.output,e.next_out,c-e.avail_out),h-=e.avail_in,c-=e.avail_out,e.total_in+=h,e.total_out+=c,n.total+=c,4&n.wrap&&c&&(e.adler=n.check=n.flags?bo(n.check,i,c,e.next_out-c):go(n.check,i,c,e.next_out-c)),e.data_type=n.bits+(n.last?64:0)+(n.mode===qo?128:0)+(n.mode===Zo||n.mode===Qo?256:0),(0===h&&0===c||t===No)&&E===$o&&(E=Vo),E},ps={inflateReset:ls,inflateReset2:ds,inflateResetKeep:us,inflateInit:e=>hs(e,15),inflateInit2:hs,inflate:vs,inflateEnd:e=>{if(ss(e))return Ho;var t=e.state;return t.window&&(t.window=null),e.state=null,$o},inflateGetHeader:(e,t)=>{if(ss(e))return Ho;var n=e.state;return 2&n.wrap?(n.head=t,t.done=!1,$o):Ho},inflateSetDictionary:(e,t)=>{var n,a=t.length;return ss(e)||0!==(n=e.state).wrap&&n.mode!==Yo?Ho:n.mode===Yo&&go(1,t,a,0)!==n.check?Uo:fs(e,t,a,a)?(n.mode=16210,Go):(n.havedict=1,$o)},inflateInfo:"pako inflate (from Nodeca project)"};var gs=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},ys=Object.prototype.toString,bs=ko.Z_NO_FLUSH,ws=ko.Z_FINISH,ks=ko.Z_OK,Ss=ko.Z_STREAM_END,Es=ko.Z_NEED_DICT,Ms=ko.Z_STREAM_ERROR,Ps=ko.Z_DATA_ERROR,Ts=ko.Z_MEM_ERROR;function _s(e){this.options=Eo.assign({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Do,this.strm.avail_out=0;var n=ps.inflateInit2(this.strm,t.windowBits);if(n!==ks)throw new Error(wo[n]);if(this.header=new gs,ps.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=_o.string2buf(t.dictionary):"[object ArrayBuffer]"===ys.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ps.inflateSetDictionary(this.strm,t.dictionary))!==ks))throw new Error(wo[n])}function Ds(e,t){var n=new _s(t);if(n.push(e),n.err)throw n.msg||wo[n.err];return n.result}_s.prototype.push=function(e,t){var n,a,i,r=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(a=t===~~t?t:!0===t?ws:bs,"[object ArrayBuffer]"===ys.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),(n=ps.inflate(r,a))===Es&&s&&((n=ps.inflateSetDictionary(r,s))===ks?n=ps.inflate(r,a):n===Ps&&(n=Es));r.avail_in>0&&n===Ss&&r.state.wrap>0&&0!==e[r.next_in];)ps.inflateReset(r),n=ps.inflate(r,a);switch(n){case Ms:case Ps:case Es:case Ts:return this.onEnd(n),this.ended=!0,!1}if(i=r.avail_out,r.next_out&&(0===r.avail_out||n===Ss))if("string"===this.options.to){var u=_o.utf8border(r.output,r.next_out),l=r.next_out-u,d=_o.buf2string(r.output,u);r.next_out=l,r.avail_out=o-l,l&&r.output.set(r.output.subarray(u,u+l),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(n!==ks||0!==i){if(n===Ss)return n=ps.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},_s.prototype.onData=function(e){this.chunks.push(e)},_s.prototype.onEnd=function(e){e===ks&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Eo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var As={Inflate:_s,inflate:Ds,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Ds(e,t)},ungzip:Ds,constants:ko}.ungzip,xs=e=>{var t;if(null!=e&&e.includes(Bt))t=Ot;else{var n=null==e?void 0:e.find((e=>e.includes($t)));t=n?n.split("=")[1]:Wt}return(t=t.replace(/\/$/,""))+"/"+Ft},Cs=e=>{var t,n,a=Kr.getAppConfig(ze)||Kr.getAppConfig(Ze);return null!==(t=null==a||null===(n=a.capabilities)||void 0===n?void 0:n.includes(e))&&void 0!==t&&t},Is=e=>{var t=!Cs(le.THIRD_PARTY_TRANSACTIONS);return e&&!t&&Wn.info(`[${e}] Your plan does not have purchase management features.`),t};function Ls(e){try{var t=function(e){if("undefined"!=typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));for(var t=atob(e),n=t.length,a=new Uint8Array(n),i=0;i<n;i++)a[i]=t.charCodeAt(i);return a}(e.trim()),n=As(t),a=(new TextDecoder).decode(n);return JSON.parse(a)}catch(e){return}}function Fs(e,t,n){var a=n.value;return n.value=function(...e){if(!this.platformID)throw new Zr;return a.apply(this,e)},n}function Rs(e,t,n){var a=n.value;return n.value=function(...e){var t=Kr.getDevice();if(null==t||!t.id)throw new eo;return a.apply(this,e)},n}var Ws,Ns=function(){return c((function e(){s(this,e);var t=Kr.getNamiConfig();!this.platformID&&t&&this.configure(t)}),[{key:"deviceID",get:function(){var e;return null===(e=Kr.getDevice())||void 0===e?void 0:e.id}},{key:"configure",value:function(e){this.baseURL=xs(e.namiCommands),this.platformID=e.appPlatformID}},{key:"login",value:function(e){var t,n;return S((function(a){for(;;)switch(a.n){case 0:if(e){a.n=1;break}throw new to;case 1:return t=`device/${this.deviceID}/login/`,n={external_id:e},a.n=2,r(this.requestBodyAPI(t,n,"PUT"));case 2:return a.a(2,a.v)}}),null,this,null,Promise)}},{key:"logout",value:function(){var e;return S((function(t){for(;;)switch(t.n){case 0:return e=`device/${this.deviceID}/logout/`,t.n=1,r(this.requestBodyAPI(e,{},"PUT"));case 1:return t.a(2,t.v)}}),null,this,null,Promise)}},{key:"startSession",value:function(e){var t,n;return S((function(a){for(;;)switch(a.n){case 0:return t=`device/${this.deviceID}/session/`,a.n=1,r(this.requestBodyAPI(t,{start_time:e,app_env:"production"}));case 1:n=a.v,Kr.setSessionCounter(),n.id&&Kr.setSessionId(n.id);case 2:return a.a(2)}}),null,this,null,Promise)}},{key:"postImpression",value:function(e){var t,n;return S((function(a){for(;;)switch(a.n){case 0:return t=`device/${this.deviceID}/impression/`,a.n=1,r(this.requestBodyAPI(t,e,"POST",!0));case 1:(n=a.v).id&&Kr.setLastImpressionId(n.id);case 2:return a.a(2)}}),null,this,null,Promise)}},{key:"postConversion",value:function(e){var t;return S((function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/transaction/`,n.n=1,r(this.requestBodyAPI(t,e,"POST",!0));case 1:return n.a(2)}}),null,this,null,Promise)}},{key:"purchaseValidation",value:function(e){var t;return S((function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/purchase_event/`,n.n=1,r(this.requestBodyAPI(t,e,"PUT"));case 1:return n.a(2)}}),null,this,null,Promise)}},{key:"fetchAPI",value:function(e,t,n){var a;return S((function(i){for(;;)switch(i.n){case 0:return a=`${this.baseURL}/${this.platformID}/`+e,i.n=1,r(fo(a,void 0,t,n));case 1:return i.a(2,i.v)}}),null,this,null,Promise)}},{key:"requestBodyAPI",value:function(e,t,n="POST",a=!1,i,o){var s,u;return S((function(l){for(;;)switch(l.n){case 0:return s=`${this.baseURL}/${this.platformID}/`+e,u={method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:a},l.n=1,r(fo(s,u,i,o));case 1:return l.a(2,l.v)}}),null,this,null,Promise)}}],[{key:"configure",value:function(e){this.instance.configure(e)}}])}();function Os(e){return null!=(null==e?void 0:e.flow)}Ns.instance=new Ns,oe([Rs],Ns.prototype,"login",null),oe([Rs],Ns.prototype,"logout",null),oe([Rs],Ns.prototype,"startSession",null),oe([Rs],Ns.prototype,"postImpression",null),oe([Rs],Ns.prototype,"postConversion",null),oe([Rs],Ns.prototype,"purchaseValidation",null),oe([Fs],Ns.prototype,"fetchAPI",null),oe([Fs],Ns.prototype,"requestBodyAPI",null),exports.NamiCampaignRuleType=void 0,(Ws=exports.NamiCampaignRuleType||(exports.NamiCampaignRuleType={})).DEFAULT="default",Ws.LABEL="label",Ws.UNKNOWN="unknown",Ws.URL="url";var js=()=>{var e;return null!==(e=Kr.getPaywalls(at))&&void 0!==e?e:[]},$s=()=>{var e;return null!==(e=Kr.getPaywalls(Ge))&&void 0!==e?e:[]},zs=()=>Vr(Nn([...$s(),...js()]),"id"),Bs=e=>zs().find((t=>t.id===e)),Hs=e=>{var t=zs(),n=new Set(t.map((e=>e.id)));return e.every((e=>n.has(e)))};function Us(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gs,Vs={exports:{}};var Xs=(Gs||(Gs=1,Vs.exports=function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var a=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,a){void 0===a&&(a=!1);var i=e.getVersionPrecision(t),r=e.getVersionPrecision(n),o=Math.max(i,r),s=0,u=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),a=t+new Array(n+1).join(".0");return e.map(a.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(a&&(s=o-Math.min(i,r)),o-=1;o>=s;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===s)return 0;o-=1}else if(u[0][o]<u[1][o])return-1}},e.map=function(e,t){var n,a=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)a.push(t(e[n]));return a},e.find=function(e,t){var n,a;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,a=e.length;n<a;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,a=e,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(r));var s=function(){var e=r[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){a[t]=e[t]}))};for(t=0,n=r.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return a.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return a.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(91))&&a.__esModule?a:{default:a},r=n(18);function o(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var s=function(){function e(){}var t,n,a;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,a=[{key:"BROWSER_MAP",get:function(){return r.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return r.ENGINE_MAP}},{key:"OS_MAP",get:function(){return r.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return r.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),a&&o(t,a),e}();t.default=s,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var a=u(n(92)),i=u(n(93)),r=u(n(94)),o=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},a=0,i={},r=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,r+=1):"object"==typeof o&&(n[t]=o,a+=1)})),a>0){var o=Object.keys(n),u=s.default.find(o,(function(e){return t.isOS(e)}));if(u){var l=this.satisfies(n[u]);if(void 0!==l)return l}var d=s.default.find(o,(function(e){return t.isPlatform(e)}));if(d){var h=this.satisfies(n[d]);if(void 0!==h)return h}}if(r>0){var c=Object.keys(i),m=s.default.find(c,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(i[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),a=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(a);return t&&i&&(a=i.toLowerCase()),a===n},t.compareVersion=function(e){var t=[0],n=e,a=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(a=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(a=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,a))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=l,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(17))&&a.__esModule?a:{default:a},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(r,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(17))&&a.__esModule?a:{default:a},r=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:r.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),a={name:r.OS_MAP.MacOS,version:t};return n&&(a.versionName=n),a}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:r.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),a={name:r.OS_MAP.Android,version:t};return n&&(a.versionName=n),a}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:r.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:r.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:r.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:r.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(17))&&a.__esModule?a:{default:a},r=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:r.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var a,i=(a=n(17))&&a.__esModule?a:{default:a},r=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:r.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:r.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:r.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:r.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:r.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})),Vs.exports),Ks=Us(Xs),Ys="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},qs="function"==typeof Ys.BigInt,Js=qs?Ys.BigInt.bind(Ys):void 0,Qs=qs?Js("0xffffffffffffffffffffffffffffffff"):null,Zs=qs?Js("0x100000000000000000000000000000000"):null,eu=qs?Js(0):null,tu=qs?Js(1):null,nu=qs?Js(8):null,au=qs?Js(1e4):null,iu=16,ru=1/iu,ou={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},su=e=>{if("undefined"==typeof window)return{os_version:"X.X.X",os_name:"Server",browser_name:"Unknown",browser_version:"X.X.X",sdk_client:"web",sdk_version:me,language:"en"};var t=Ks.getParser(window.navigator.userAgent),n=t.getPlatform(),a={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:me,language:window.navigator.language};if(n.type&&(a.form_factor=ou[n.type]),n.model&&(a.device_model=n.model),e&&e.length>0){var i=(e=>{var t=e.find((e=>e.includes(Ut))),n={platform:"",version:""};if(t){var a=t.split(Vt);n.platform=a[1],n.version=a[2]}return n})(e);a.extended_platform=i.platform,a.extended_platform_version=i.version}return a},uu=()=>{var e=Kr.getNamiConfig();if(e&&e.formFactor)return e.formFactor;if("undefined"==typeof window)return ou.desktop;var t=Ks.getParser(window.navigator.userAgent).getPlatform();return t.type?ou[t.type]:ou.desktop},lu={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4};var du=()=>{var e=window,t=e.innerWidth,n=e.innerHeight;return Math.min(t/1920,n/1080)||1};function hu(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function cu(e){if(!qs||!Qs)return vu(e);try{var t=Qs,n=function(e){if(!Js)throw new Error("BigInt is not supported in this environment");var t=e.replace(/-/g,"");return Js("0x"+t)}(e);return Number(n)/Number(t)*100}catch(t){throw Wn.error(`Error calculating audience split position for UUID ${e}`,t),new Error(`Invalid UUID format: ${e}`)}}function mu(e){if(!Js)throw new Error("BigInt is not supported in this environment");var t=e.toString(16).padStart(32,"0");t=t.substring(0,12)+"4"+t.substring(13);var n=3&parseInt(t[16],16)|8;return(t=t.substring(0,16)+n.toString(16)+t.substring(17)).slice(0,8)+"-"+t.slice(8,12)+"-"+t.slice(12,16)+"-"+t.slice(16,20)+"-"+t.slice(20)}function fu(e,t=.5){if(!Number.isFinite(e))throw new Error("Invalid target");if(!Number.isFinite(t))throw new Error("Invalid tolerance");var n=Math.max(0,Math.min(100,e)),a=Math.max(0,Math.min(50,t)),i=e=>Math.round(100*e),r=Math.max(0,i(n-a)),o=Math.min(1e4,i(n+a));if(!(qs&&Qs&&Js&&au))return function(e,t){for(var n=Math.max(0,Math.min(100,e-t)),a=Math.min(100,Math.max(0,e+t)),i=hu(),r=Number.POSITIVE_INFINITY,o=50,s=0;s<o;s++){var u=hu(),l=vu(u);if(l>=n&&l<=a)return u;var d=pu(l,n,a);d<r&&(r=d,i=u)}return i}(n,a);var s=Qs,u=Js,l=au,d=e=>s*u(e)/l,h=d(r),c=d(o);if(c<=h)return mu(h);var f=h+function(e){if(!Js||null===Zs||null===tu||null===eu||null===nu)throw new Error("BigInt is not supported in this environment");var t=Js,n=eu,a=tu,i=nu,r=Zs;if(e<n)throw new Error("n must be non-negative");if(e===n)return n;for(var o=new Uint8Array(16),s=e+a,u=r/s*s-a,l=0;l<10;){crypto.getRandomValues(o);for(var d,h=n,c=m(o);!(d=c()).done;)h=h<<i|t(d.value);if(h<=u)return h%s;l++}try{crypto.getRandomValues(o);for(var f,v=n,p=m(o);!(f=p()).done;)v=v<<i|t(f.value);var g=v%s;return Wn.warn("randomBigInt: reached max rejection attempts, using modulo fallback",{n:e.toString(),attempts:l}),g}catch(e){throw Wn.error("randomBigInt: failed to generate random values",e),new Error("randomBigInt: unable to generate random value")}}(c-h);return mu(f)}function vu(e){var t=function(e){var t=e.replace(/-/g,"").toLowerCase();if(!/^[0-9a-f]{32}$/.test(t))throw new Error(`Invalid UUID format: ${e}`);for(var n=0,a=t.length-1;a>=0;a--){n=(n+parseInt(t[a],iu))*ru}return n}(e);return 100*t}function pu(e,t,n){return e<t?t-e:e>n?e-n:0}var gu,yu=e=>{try{return Boolean(new URL(e))}catch(e){return!1}},bu=(e,t,n)=>e?e.flatMap((e=>{var a;if(a="string"==typeof n?e.segments.filter((e=>e.form_factors.some((e=>e.form_factor===n)))):e.segments,0===a.length)return[];var i=((e,t)=>{for(var n,a=[...e].sort(((e,t)=>e.split-t.split)),i=m(a);!(n=i()).done;){var r=n.value;if(t<=r.split)return r}return a[a.length-1]})(a,t);return{form_factors:i.form_factors,paywall:i.paywall,flow:i.flow,segment:i.segment,split:i.split,conversion_event_type:i.conversion_event_type,conversion_event_url:i.conversion_event_url,rule:e.rule,name:e.name,type:e.type,value:e.value,external_segment:e.external_segment}})):[],wu=()=>{var e,t,n=null!==(e=Kr.getCampaignRules(He))&&void 0!==e?e:[],a=null!==(t=Kr.getCampaignRules(tt))&&void 0!==t?t:[],i=uu(),r=Nn([...n,...a]).filter((e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some((e=>e.form_factor===i))}));return Vr(r,"rule")},ku=e=>{var t,n=null!==(t=Kr.getCampaignRules(e))&&void 0!==t?t:[],a=uu();return Nn(n).filter((e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some((e=>e.form_factor===a))}))},Su=()=>ku(tt),Eu=()=>ku(He),Mu=(e,t,n,a)=>{var i=e().find((e=>a?e.type==a&&e.value==n:e.type==exports.NamiCampaignRuleType.DEFAULT));if(!i)return{};var r=t().find((e=>(null==i?void 0:i.paywall)===e.id));return{campaign:i,paywall:r}},Pu=(e,t)=>{var n=Mu(Eu,$s,e,t);if(n.campaign&&n.paywall)return{campaign:n.campaign,paywall:n.paywall};var a=Mu(Su,js,e,t);return a.campaign&&a.paywall?{campaign:a.campaign,paywall:a.paywall}:n.campaign||n.paywall?{campaign:n.campaign,paywall:n.paywall}:{campaign:a.campaign,paywall:a.paywall}},Tu="object"==typeof Reflect?Reflect:null,_u=Tu&&"function"==typeof Tu.apply?Tu.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};gu=Tu&&"function"==typeof Tu.ownKeys?Tu.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Du=Number.isNaN||function(e){return e!=e};function Au(){Au.init.call(this)}Au.EventEmitter=Au,Au.prototype._events=void 0,Au.prototype._eventsCount=0,Au.prototype._maxListeners=void 0;var xu=10;function Cu(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Iu(e){return void 0===e._maxListeners?Au.defaultMaxListeners:e._maxListeners}function Lu(e,t,n,a){var i,r,o,s;if(Cu(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),o=r[t]),void 0===o)o=r[t]=n,++e._eventsCount;else if("function"==typeof o?o=r[t]=a?[n,o]:[o,n]:a?o.unshift(n):o.push(n),(i=Iu(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,s=u,console&&console.warn&&console.warn(s)}return e}function Fu(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ru(e,t,n){var a={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=Fu.bind(a);return i.listener=n,a.wrapFn=i,i}function Wu(e,t,n){var a=e._events;if(void 0===a)return[];var i=a[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):Ou(i,i.length)}function Nu(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function Ou(e,t){for(var n=new Array(t),a=0;a<t;++a)n[a]=e[a];return n}Object.defineProperty(Au,"defaultMaxListeners",{enumerable:!0,get:function(){return xu},set:function(e){if("number"!=typeof e||e<0||Du(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");xu=e}}),Au.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Au.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Du(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Au.prototype.getMaxListeners=function(){return Iu(this)},Au.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,i=this._events;if(void 0!==i)a=a&&void 0===i.error;else if(!a)return!1;if(a){var r;if(t.length>0&&(r=t[0]),r instanceof Error)throw r;var o=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw o.context=r,o}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)_u(s,this,t);else for(var u=s.length,l=Ou(s,u),d=0;d<u;++d)_u(l[d],this,t);return!0},Au.prototype.addListener=function(e,t){return Lu(this,e,t,!1)},Au.prototype.on=Au.prototype.addListener,Au.prototype.prependListener=function(e,t){return Lu(this,e,t,!0)},Au.prototype.once=function(e,t){return Cu(t),this.on(e,Ru(this,e,t)),this},Au.prototype.prependOnceListener=function(e,t){return Cu(t),this.prependListener(e,Ru(this,e,t)),this},Au.prototype.removeListener=function(e,t){var n,a,i,r,o;if(Cu(t),void 0===(a=this._events))return this;if(void 0===(n=a[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){o=n[r].listener,i=r;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(a[e]=n[0]),void 0!==a.removeListener&&this.emit("removeListener",e,o||t)}return this},Au.prototype.off=Au.prototype.removeListener,Au.prototype.removeAllListeners=function(e){var t,n,a;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,r=Object.keys(n);for(a=0;a<r.length;++a)"removeListener"!==(i=r[a])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(a=t.length-1;a>=0;a--)this.removeListener(e,t[a]);return this},Au.prototype.listeners=function(e){return Wu(this,e,!0)},Au.prototype.rawListeners=function(e){return Wu(this,e,!1)},Au.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Nu.call(e,t)},Au.prototype.listenerCount=Nu,Au.prototype.eventNames=function(){return this._eventsCount>0?gu(this._events):[]};var ju=function(){function e(){s(this,e),this.emitter=new Au}return c(e,[{key:"on",value:function(e,t){this.emitter.on(e,t)}},{key:"off",value:function(e,t){this.emitter.off(e,t)}},{key:"emit",value:function(e,...t){this.emitter.emit(e,...t)}},{key:"addListener",value:function(e,t){this.emitter.addListener(e,t)}},{key:"removeListener",value:function(e,t){this.emitter.removeListener(e,t)}},{key:"removeAllListeners",value:function(e){e?this.emitter.removeAllListeners(e):this.emitter.removeAllListeners()}},{key:"listeners",value:function(e){return this.emitter.listeners(e)}},{key:"listenerCount",value:function(e){return this.emitter.listenerCount(e)}}],[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}])}(),$u=function(){return c((function e(){s(this,e),this.disableCampaignUpdates=!1,this.currentFormFactor=uu()}),[{key:"configure",value:function(e,t,n=[]){this.currentFormFactor=e,this.splitPosition=t,this.disableCampaignUpdates=n.includes("disableCampaignUpdates")}},{key:"fetchCampaignRules",value:function(e){var t,n,a,i;return S((function(o){for(;;)switch(o.n){case 0:if(a=Kr.getDevice(),!this.disableCampaignUpdates){o.n=1;break}return Wn.info("Campaign updates disabled by configuration. Skipping fetch."),o.a(2,[]);case 1:if(null!=a&&a.id){o.n=3;break}return o.n=2,r(this.getAnonymousCampaigns());case 2:i=o.v,o.n=5;break;case 3:return o.n=4,r(this.getCampaigns(a.id));case 4:i=o.v;case 5:return i=null===(t=i)||void 0===t?void 0:t.filter((e=>{var t;return e.paywall&&e.form_factors.some((e=>e.form_factor===this.currentFormFactor))||e.flow&&(null===(t=e.flow)||void 0===t||null===(t=t.object)||void 0===t||null===(t=t.form_factors)||void 0===t?void 0:t.some((e=>e.form_factor===this.currentFormFactor)))})),i=null===(n=i)||void 0===n?void 0:n.filter((t=>{if(t.paywall){var n=e.find((e=>e.id==t.paywall));if(n)return t}else if(t.flow)return t})),Kr.setCampaignRules(He,i),this.invokeAvailableCampaignsResponseHandler(),o.a(2,i)}}),null,this,null,Promise)}},{key:"invokeAvailableCampaignsResponseHandler",value:function(){var e=ju.getInstance().listeners(bn),t=wu();e.forEach((e=>e(t)))}},{key:"getAnonymousCampaigns",value:function(e=me){var t,n,a,i,o;return S((function(s){for(;;)switch(s.p=s.n){case 0:return t=`campaign_rules/?sdk_version=${e}`,s.p=1,s.n=2,r(Ns.instance.fetchAPI(t));case 2:return a=s.v,s.a(2,bu(null!==(n=a.results)&&void 0!==n?n:[],this.splitPosition,this.currentFormFactor));case 3:if(s.p=3,o=s.v,i=this.fallbackData()){s.n=4;break}throw Wn.error(mo(o.status,t)),o;case 4:return s.a(2,i.results)}}),null,this,[[1,3]],Promise)}},{key:"getCampaigns",value:function(e){var t,n,a,i;return S((function(o){for(;;)switch(o.p=o.n){case 0:return n=`device/${e}/campaign_rules/`,o.p=1,o.n=2,r(Ns.instance.fetchAPI(n));case 2:a=o.v,o.n=4;break;case 3:if(o.p=3,i=o.v,a=this.fallbackData()){o.n=4;break}throw Wn.error(mo(i.status,n)),i;case 4:return o.a(2,(null===(t=a)||void 0===t?void 0:t.results)||[])}}),null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Kr.getCampaignRules(He)||Kr.getCampaignRules(tt);return e?{count:e.length,results:e}:null}}])}();function zu(e,t){return sr(e,t)}$u.instance=new $u;var Bu=function(){return c((function e(){s(this,e)}),[{key:"createOrUpdateDevice",value:function(e,t,n){var a=Kr.getDevice();if(null==a||!a.id){var i,r=f({},e,{id:null!==(i=null!=t?t:this.getAnonymousUUID())&&void 0!==i?i:hu()});return{id:r.id,device:this.createDevice(r,n)}}return this.isEqualDevices(a,e)?{id:a.id,device:Promise.resolve(a)}:(this.updateDevice(a.id,e),{id:a.id,device:null})}},{key:"createDevice",value:function(e,t){var n,a;return S((function(i){for(;;)switch(i.p=i.n){case 0:return i.p=0,i.n=1,r(this.requestAPIData("device/",e,void 0,void 0,0));case 1:if(!(n=i.v)){i.n=2;break}Kr.setDevice(n),i.n=3;break;case 2:return Wn.info("Device creation returned null, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),i.a(2,null);case 3:return i.a(2,n);case 4:if(i.p=4,a=i.v,console.error("Error creating device:",a),!(a instanceof Yr)){i.n=5;break}return Wn.info("Retry limit exceeded, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),i.a(2,null);case 5:throw a;case 6:return i.a(2)}}),null,this,[[0,4]],Promise)}},{key:"updateDevice",value:function(e,t){var n;return S((function(a){for(;;)switch(a.n){case 0:return a.n=1,r(this.requestAPIData(`device/${e}/`,t,"PUT"));case 1:return(n=a.v)&&Kr.setDevice(n),a.a(2,n)}}),null,this,null,Promise)}},{key:"updateDeviceField",value:function(e,t){var n,a,i;return S((function(o){for(;;)switch(o.n){case 0:if(n={[e]:t},null!=(a=Kr.getDevice())&&a.id){o.n=1;break}throw new eo;case 1:return o.n=2,r(this.requestAPIData(`device/${a.id}/`,n,"PATCH"));case 2:return(i=o.v)&&Kr.setDevice(i),o.a(2,i)}}),null,this,null,Promise)}},{key:"requestAPIData",value:function(e,t,n="POST",a=nn,i){var o,s;return S((function(u){for(;;)switch(u.p=u.n){case 0:return u.p=0,u.n=1,r(Ns.instance.requestBodyAPI(e,t,n,!1,a,i));case 1:o=u.v,u.n=5;break;case 2:if(u.p=2,!((s=u.v)instanceof Zr)){u.n=3;break}throw s;case 3:if(!("device/"===e&&s instanceof Yr)){u.n=4;break}throw s;case 4:if(o=Kr.getDevice()){u.n=5;break}return Wn.error(mo(s.status,e)),u.a(2,null);case 5:return u.a(2,o)}}),null,null,[[0,2]],Promise)}},{key:"isEqualDevices",value:function(e,t){var n=f({},e,t);return zu(Object.keys(e).reduce(((e,t)=>(e[t]=n[t],e)),{}),e)}},{key:"getOrCreateAnonymousUUID",value:function(){var e=Kr.getAnonymousUUID();return e||(e=hu(),Kr.setAnonymousUUID(e)),e}},{key:"getAnonymousUUID",value:function(){var e=Kr.getAnonymousUUID();return e?(Kr.clearAnonymousUUID(),e):null}}])}();Bu.instance=new Bu;var Hu=function(){return c((function e(){s(this,e)}),[{key:"fetchProducts",value:function(){var e,t,n,a;return S((function(i){for(;;)switch(i.p=i.n){case 0:if(!Cs(le.THIRD_PARTY_TRANSACTIONS)){i.n=1;break}return i.a(2,[]);case 1:return i.p=1,i.n=2,r(Ns.instance.fetchAPI("products/"));case 2:n=i.v,i.n=4;break;case 3:if(i.p=3,a=i.v,n=this.fallbackData()){i.n=4;break}throw Wn.error(mo(a.status,"products/")),a;case 4:return null!==(e=n)&&void 0!==e&&e.results&&Kr.setProducts(Xe,n.results),i.a(2,(null===(t=n)||void 0===t?void 0:t.results)||[])}}),null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Kr.getProducts(Xe)||Kr.getProducts(rt);return e?{count:e.length,results:e}:null}}])}();Hu.instance=new Hu;var Uu=function(){return c((function e(){s(this,e)}),[{key:"fetchPaywalls",value:function(){var e,t;return S((function(n){for(;;)switch(n.n){case 0:if(null!=(e=Kr.getDevice())&&e.id){n.n=2;break}return n.n=1,r(this.getAnonymousPaywalls());case 1:t=n.v,n.n=4;break;case 2:return n.n=3,r(this.getPaywalls(e.id));case 3:t=n.v;case 4:return t&&Kr.setPaywalls(Ge,t),n.a(2,t)}}),null,this,null,Promise)}},{key:"getAnonymousPaywalls",value:function(e=me){var t,n,a,i;return S((function(o){for(;;)switch(o.p=o.n){case 0:return n=`paywalls/?sdk_version=${e}`,a=null,o.p=1,o.n=2,r(Ns.instance.fetchAPI(n));case 2:a=o.v,o.n=4;break;case 3:if(o.p=3,i=o.v,a=this.fallbackData()){o.n=4;break}throw Wn.error(mo(i.status,n)),i;case 4:return o.a(2,(null===(t=a)||void 0===t?void 0:t.results)||[])}}),null,this,[[1,3]],Promise)}},{key:"getPaywalls",value:function(e){var t,n,a,i;return S((function(o){for(;;)switch(o.p=o.n){case 0:return n=`device/${e}/paywalls/`,o.p=1,o.n=2,r(Ns.instance.fetchAPI(n));case 2:a=o.v,o.n=4;break;case 3:if(o.p=3,i=o.v,a=this.fallbackData()){o.n=4;break}throw Wn.error(mo(i.status,n)),i;case 4:return o.a(2,(null===(t=a)||void 0===t?void 0:t.results)||[])}}),null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Kr.getPaywalls(Ge)||Kr.getPaywalls(at);return e?{count:e.length,results:e}:null}}])}();Uu.instance=new Uu;var Gu=function(){return c((function e(){s(this,e)}),[{key:"fetchConfig",value:function(){var e,t;return S((function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,r(Ns.instance.fetchAPI("config/"));case 1:e=n.v,n.n=3;break;case 2:if(n.p=2,t=n.v,e=Kr.getAppConfig(ze)||Kr.getAppConfig(Ze)){n.n=3;break}throw Wn.error(mo(t.status,"config/")),t;case 3:return e&&Kr.setAppConfig(ze,e),n.a(2,e)}}),null,null,[[0,2]],Promise)}}])}();Gu.instance=new Gu;var Vu=null;function Xu(){return!!Kr.getAnonymousMode()||!!Vu&&Vu.isInMemoryAnonymousMode()}var Ku=function(){return c((function e(){s(this,e)}),[{key:"startSession",value:function(){var e;return S((function(t){for(;;)switch(t.p=t.n){case 0:if(!Xu()){t.n=1;break}return Wn.debug("Skipping session start call - anonymous mode"),t.a(2);case 1:return t.p=1,t.n=2,r(Ns.instance.startSession(new Date));case 2:t.n=4;break;case 3:t.p=3,e=t.v,Wn.error("error on start session: ",e);case 4:return t.a(2)}}),null,null,[[1,3]],Promise)}}])}();Ku.instance=new Ku;var Yu=function(){return c((function e(){s(this,e)}),null,[{key:"allPurchases",value:function(){return[]}}])}();Yu.instance=new Yu;var qu={en:{nami_day:"day",nami_day_plural:"days",nami_week:"week",nami_week_plural:"weeks",nami_month:"month",nami_month_plural:"months",nami_year:"year",nami_year_plural:"years",nami_day_abbrev:"day",nami_day_abbrev_plural:"days",nami_week_abbrev:"wk",nami_week_abbrev_plural:"wks",nami_month_abbrev:"mo",nami_month_abbrev_plural:"mos",nami_year_abbrev:"yr",nami_year_abbrev_plural:"yrs",nami_daily:"daily",nami_weekly:"weekly",nami_biweekly:"bi-weekly",nami_monthly:"monthly",nami_bimonthly:"bi-monthly",nami_quarterly:"quarterly",nami_biannually:"bi-annually",nami_yearly:"yearly"},af:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dae",nami_week_abbrev:"week",nami_week_abbrev_plural:"weke",nami_month_abbrev:"ma",nami_month_abbrev_plural:"maande",nami_year_abbrev:"jr",nami_year_abbrev_plural:"jare",nami_daily:"daagliks",nami_weekly:"weekliks",nami_biweekly:"tweeweekliks",nami_monthly:"maandeliks",nami_bimonthly:"tweemaandeliks",nami_quarterly:"kwartaalliks",nami_biannually:"tweejaarliks",nami_yearly:"jaarliks"},am:{nami_day_abbrev:"ቀን",nami_day_abbrev_plural:"ቀናት",nami_week_abbrev:"ሳምንት",nami_week_abbrev_plural:"ሳምንታት",nami_month_abbrev:"ወር",nami_month_abbrev_plural:"ሞስ",nami_year_abbrev:"ዓመት",nami_year_abbrev_plural:"ዓመታት",nami_daily:"በየቀኑ",nami_weekly:"ሳምንታዊ",nami_biweekly:"በየሁለት ሳምንቱ",nami_monthly:"ወርሃዊ",nami_bimonthly:"በየሁለት ወሩ",nami_quarterly:"በየሩብ ዓመቱ",nami_biannually:"በየሁለት ዓመቱ",nami_yearly:"ዓመታዊ"},ar:{nami_day_abbrev:"يوم",nami_day_abbrev_plural:"أيام",nami_week_abbrev:"أسبوع",nami_week_abbrev_plural:"أسابيع",nami_month_abbrev:"شهر",nami_month_abbrev_plural:"موس",nami_year_abbrev:"سنة",nami_year_abbrev_plural:"سنوات",nami_daily:"يوميًا",nami_weekly:"أسبوعي",nami_biweekly:"كل أسبوعين",nami_monthly:"شهريا",nami_bimonthly:"كل شهرين",nami_quarterly:"ربع سنوي",nami_biannually:"مرتين في السنة",nami_yearly:"سنوي"},bg:{nami_day_abbrev:"ден",nami_day_abbrev_plural:"дни",nami_week_abbrev:"седмица",nami_week_abbrev_plural:"седмици",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год.",nami_year_abbrev_plural:"години",nami_daily:"ежедневно",nami_weekly:"седмично",nami_biweekly:"двуседмичен",nami_monthly:"месечно",nami_bimonthly:"двумесечно",nami_quarterly:"тримесечно",nami_biannually:"два пъти годишно",nami_yearly:"годишно"},ca:{nami_day_abbrev:"dia",nami_day_abbrev_plural:"dies",nami_week_abbrev:"setmana",nami_week_abbrev_plural:"setmanes",nami_month_abbrev:"mes",nami_month_abbrev_plural:"mesos",nami_year_abbrev:"any",nami_year_abbrev_plural:"anys",nami_daily:"diàriament",nami_weekly:"setmanal",nami_biweekly:"quinzenal",nami_monthly:"mensual",nami_bimonthly:"bimensual",nami_quarterly:"trimestral",nami_biannually:"bianualment",nami_yearly:"anual"},cs:{nami_day_abbrev:"den",nami_day_abbrev_plural:"dny",nami_week_abbrev:"týden",nami_week_abbrev_plural:"týdny",nami_month_abbrev:"měsíc",nami_month_abbrev_plural:"měsíce",nami_year_abbrev:"rok",nami_year_abbrev_plural:"roky",nami_daily:"denní",nami_weekly:"týdně",nami_biweekly:"dvoutýdenní",nami_monthly:"měsíční",nami_bimonthly:"dvouměsíčník",nami_quarterly:"čtvrtletní",nami_biannually:"pololetně",nami_yearly:"roční"},de:{nami_day_abbrev:"Tag",nami_day_abbrev_plural:"Tage",nami_week_abbrev:"Woche",nami_week_abbrev_plural:"Wochen",nami_month_abbrev:"Monat",nami_month_abbrev_plural:"Monate",nami_year_abbrev:"Jahr",nami_year_abbrev_plural:"Jahre",nami_daily:"täglich",nami_weekly:"wöchentlich",nami_biweekly:"zweiwöchentlich",nami_monthly:"monatlich",nami_bimonthly:"zweimonatlich",nami_quarterly:"vierteljährlich",nami_biannually:"halbjährlich",nami_yearly:"jährlich"},el:{nami_day_abbrev:"ημέρα",nami_day_abbrev_plural:"ημέρες",nami_week_abbrev:"εβδομάδα",nami_week_abbrev_plural:"εβδομάδες",nami_month_abbrev:"μήνα",nami_month_abbrev_plural:"μην",nami_year_abbrev:"έτος",nami_year_abbrev_plural:"χρόνια",nami_daily:"καθημερινά",nami_weekly:"εβδομαδιαίος",nami_biweekly:"ανά δύο εβδομάδες",nami_monthly:"μηνιαίος",nami_bimonthly:"διμηνιαίος",nami_quarterly:"τριμηνιαίος",nami_biannually:"ανά εξάμηνο",nami_yearly:"ετήσια"},es:{nami_day_abbrev:"día",nami_day_abbrev_plural:"días",nami_week_abbrev:"semana",nami_week_abbrev_plural:"semanas",nami_month_abbrev:"mes",nami_month_abbrev_plural:"meses",nami_year_abbrev:"año",nami_year_abbrev_plural:"años",nami_daily:"diario",nami_weekly:"semanal",nami_biweekly:"quincenal",nami_monthly:"mensual",nami_bimonthly:"bimensual",nami_quarterly:"trimestral",nami_biannually:"semestral",nami_yearly:"anual"},et:{nami_day_abbrev:"päev",nami_day_abbrev_plural:"päevad",nami_week_abbrev:"nädal",nami_week_abbrev_plural:"nädalat",nami_month_abbrev:"kuu",nami_month_abbrev_plural:"kuud",nami_year_abbrev:"aasta",nami_year_abbrev_plural:"aastat",nami_daily:"iga päev",nami_weekly:"iganädalane",nami_biweekly:"iga kahe nädala tagant",nami_monthly:"igakuine",nami_bimonthly:"kaks korda kuus",nami_quarterly:"kvartali",nami_biannually:"kaks korda aastas",nami_yearly:"iga-aastane"},fa:{nami_day_abbrev:"روز",nami_day_abbrev_plural:"روزها",nami_week_abbrev:"هفته",nami_week_abbrev_plural:"هفتهها",nami_month_abbrev:"مو",nami_month_abbrev_plural:"موش",nami_year_abbrev:"سال",nami_year_abbrev_plural:"سال",nami_daily:"روزانه",nami_weekly:"هفتگی",nami_biweekly:"دو هفتهای",nami_monthly:"ماهانه",nami_bimonthly:"دوماهه",nami_quarterly:"سه ماهه",nami_biannually:"دوسالانه",nami_yearly:"سالانه"},fi:{nami_day_abbrev:"päivä",nami_day_abbrev_plural:"päivää",nami_week_abbrev:"viikko",nami_week_abbrev_plural:"viikkoa",nami_month_abbrev:"kuukausi",nami_month_abbrev_plural:"kuukaudet",nami_year_abbrev:"vuosi",nami_year_abbrev_plural:"vuotta",nami_daily:"päivittäin",nami_weekly:"viikoittain",nami_biweekly:"joka toinen viikko",nami_monthly:"kuukausittain",nami_bimonthly:"kahdesti kuussa",nami_quarterly:"neljännesvuosittain",nami_biannually:"puolivuosittain",nami_yearly:"vuosittain"},fr:{nami_day_abbrev:"jour",nami_day_abbrev_plural:"jours",nami_week_abbrev:"semaine",nami_week_abbrev_plural:"semaines",nami_month_abbrev:"mois",nami_month_abbrev_plural:"mois",nami_year_abbrev:"année",nami_year_abbrev_plural:"ans",nami_daily:"tous les jours",nami_weekly:"hebdomadaire",nami_biweekly:"bihebdomadaire",nami_monthly:"mensuel",nami_bimonthly:"bimensuel",nami_quarterly:"trimestriel",nami_biannually:"bisannuel",nami_yearly:"annuel"},hi:{nami_day_abbrev:"दिन",nami_day_abbrev_plural:"दिन",nami_week_abbrev:"सप्त",nami_week_abbrev_plural:"सप्त",nami_month_abbrev:"महीना",nami_month_abbrev_plural:"महीने",nami_year_abbrev:"साल",nami_year_abbrev_plural:"वर्षीय",nami_daily:"दैनिक",nami_weekly:"साप्ताहिक",nami_biweekly:"द्वि-साप्ताहिक",nami_monthly:"महीने के",nami_bimonthly:"द्विमासिक",nami_quarterly:"त्रैमासिक",nami_biannually:"द्वि-वार्षिक रूप",nami_yearly:"वार्षिक"},hr:{nami_day_abbrev:"dan",nami_day_abbrev_plural:"dana",nami_week_abbrev:"tjedan",nami_week_abbrev_plural:"tjedni",nami_month_abbrev:"mjesec",nami_month_abbrev_plural:"mjeseca",nami_year_abbrev:"god.",nami_year_abbrev_plural:"godina",nami_daily:"dnevno",nami_weekly:"tjedno",nami_biweekly:"dvotjedno",nami_monthly:"mjesečno",nami_bimonthly:"dvomjesečno",nami_quarterly:"tromjesečno",nami_biannually:"dvogodišnje",nami_yearly:"godišnje"},hu:{nami_day_abbrev:"nap",nami_day_abbrev_plural:"napok",nami_week_abbrev:"hét",nami_week_abbrev_plural:"hetek",nami_month_abbrev:"hónap",nami_month_abbrev_plural:"hónap",nami_year_abbrev:"év",nami_year_abbrev_plural:"év",nami_daily:"napi",nami_weekly:"heti",nami_biweekly:"kéthetente",nami_monthly:"havi",nami_bimonthly:"kéthavonta",nami_quarterly:"negyedévenként",nami_biannually:"félévente",nami_yearly:"évi"},id:{nami_day_abbrev:"hari",nami_day_abbrev_plural:"hari",nami_week_abbrev:"minggu",nami_week_abbrev_plural:"minggu",nami_month_abbrev:"bulan",nami_month_abbrev_plural:"bulan",nami_year_abbrev:"tahun",nami_year_abbrev_plural:"tahun",nami_daily:"sehari-hari",nami_weekly:"mingguan",nami_biweekly:"dua kali seminggu",nami_monthly:"bulanan",nami_bimonthly:"dua bulanan",nami_quarterly:"triwulanan",nami_biannually:"dua tahunan",nami_yearly:"tahunan"},it:{nami_day_abbrev:"giorno",nami_day_abbrev_plural:"giorni",nami_week_abbrev:"settimana",nami_week_abbrev_plural:"settimane",nami_month_abbrev:"mese",nami_month_abbrev_plural:"mesi",nami_year_abbrev:"anno",nami_year_abbrev_plural:"anni",nami_daily:"quotidiano",nami_weekly:"settimanale",nami_biweekly:"bisettimanale",nami_monthly:"mensile",nami_bimonthly:"bimestrale",nami_quarterly:"trimestrale",nami_biannually:"semestralmente",nami_yearly:"annuale"},he:{nami_day_abbrev:"יְוֹם",nami_day_abbrev_plural:"ימים",nami_week_abbrev:"שבוע",nami_week_abbrev_plural:"שבועות",nami_month_abbrev:"מו",nami_month_abbrev_plural:"מוֹס",nami_year_abbrev:"שנה",nami_year_abbrev_plural:"שנים",nami_daily:"יוֹמִי",nami_weekly:"שְׁבוּעִי",nami_biweekly:"דו-שבועי",nami_monthly:"יַרחוֹן",nami_bimonthly:"דו-חודשי",nami_quarterly:"רִבעוֹן",nami_biannually:"דו-שנתי",nami_yearly:"שְׁנָתִי"},ja:{nami_day_abbrev:"日",nami_day_abbrev_plural:"日",nami_week_abbrev:"週",nami_week_abbrev_plural:"週",nami_month_abbrev:"モ",nami_month_abbrev_plural:"モス",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"毎日",nami_weekly:"毎週",nami_biweekly:"隔週",nami_monthly:"毎月",nami_bimonthly:"隔月",nami_quarterly:"四半期ごと",nami_biannually:"半年ごと",nami_yearly:"毎年"},ko:{nami_day_abbrev:"낮",nami_day_abbrev_plural:"날",nami_week_abbrev:"주",nami_week_abbrev_plural:"주",nami_month_abbrev:"모",nami_month_abbrev_plural:"모스",nami_year_abbrev:"년",nami_year_abbrev_plural:"년",nami_daily:"일일",nami_weekly:"주간",nami_biweekly:"격주 간행물",nami_monthly:"월간 간행물",nami_bimonthly:"격월",nami_quarterly:"계간지",nami_biannually:"반년마다",nami_yearly:"매년"},lt:{nami_day_abbrev:"diena",nami_day_abbrev_plural:"dienos",nami_week_abbrev:"savaitė",nami_week_abbrev_plural:"savaitės",nami_month_abbrev:"mėn.",nami_month_abbrev_plural:"mėn.",nami_year_abbrev:"metai",nami_year_abbrev_plural:"metų",nami_daily:"kasdien",nami_weekly:"kas savaitę",nami_biweekly:"kas dvi savaites",nami_monthly:"mėnesinis",nami_bimonthly:"kas du mėnesius",nami_quarterly:"ketvirtinis",nami_biannually:"kas du kartus per metus",nami_yearly:"kasmet"},lv:{nami_day_abbrev:"diena",nami_day_abbrev_plural:"dienas",nami_week_abbrev:"nedēļa",nami_week_abbrev_plural:"nedēļas",nami_month_abbrev:"mēn.",nami_month_abbrev_plural:"mēn.",nami_year_abbrev:"gads",nami_year_abbrev_plural:"gadi",nami_daily:"ikdienas",nami_weekly:"iknedēļas",nami_biweekly:"divreiz nedēļā",nami_monthly:"ikmēneša",nami_bimonthly:"divreiz mēnesī",nami_quarterly:"ceturksnī",nami_biannually:"divreiz gadā",nami_yearly:"katru gadu"},ms:{nami_day_abbrev:"hari",nami_day_abbrev_plural:"hari",nami_week_abbrev:"minggu",nami_week_abbrev_plural:"minggu",nami_month_abbrev:"bulan",nami_month_abbrev_plural:"bulan",nami_year_abbrev:"tahun",nami_year_abbrev_plural:"tahun",nami_daily:"setiap hari",nami_weekly:"mingguan",nami_biweekly:"dua minggu sekali",nami_monthly:"bulanan",nami_bimonthly:"dua kali sebulan",nami_quarterly:"suku tahunan",nami_biannually:"dua kali setahun",nami_yearly:"tahunan"},nl:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dagen",nami_week_abbrev:"week",nami_week_abbrev_plural:"weken",nami_month_abbrev:"maand",nami_month_abbrev_plural:"maanden",nami_year_abbrev:"jaar",nami_year_abbrev_plural:"jaren",nami_daily:"dagelijks",nami_weekly:"wekelijks",nami_biweekly:"tweewekelijks",nami_monthly:"maandelijks",nami_bimonthly:"tweemaandelijks",nami_quarterly:"kwartaal",nami_biannually:"halfjaarlijks",nami_yearly:"jaarlijks"},no:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dager",nami_week_abbrev:"uke",nami_week_abbrev_plural:"uker",nami_month_abbrev:"måned",nami_month_abbrev_plural:"måned",nami_year_abbrev:"år",nami_year_abbrev_plural:"år",nami_daily:"daglig",nami_weekly:"ukentlig",nami_biweekly:"annenhver uke",nami_monthly:"månedlig",nami_bimonthly:"annenhver måned",nami_quarterly:"kvartalsvis",nami_biannually:"to ganger i året",nami_yearly:"årlig"},pl:{nami_day_abbrev:"dzień",nami_day_abbrev_plural:"dni",nami_week_abbrev:"tydzień",nami_week_abbrev_plural:"tygodni",nami_month_abbrev:"miesiąc",nami_month_abbrev_plural:"miesiące",nami_year_abbrev:"rok",nami_year_abbrev_plural:"lat",nami_daily:"codziennie",nami_weekly:"tygodnik",nami_biweekly:"dwutygodniowy",nami_monthly:"miesięczny",nami_bimonthly:"dwumiesięczny",nami_quarterly:"kwartalny",nami_biannually:"dwa razy w roku",nami_yearly:"rocznie"},pt:{nami_day_abbrev:"dia",nami_day_abbrev_plural:"dias",nami_week_abbrev:"semana",nami_week_abbrev_plural:"semanas",nami_month_abbrev:"mês",nami_month_abbrev_plural:"meses",nami_year_abbrev:"ano",nami_year_abbrev_plural:"anos",nami_daily:"diário",nami_weekly:"semanalmente",nami_biweekly:"quinzenal",nami_monthly:"mensal",nami_bimonthly:"bimestral",nami_quarterly:"trimestral",nami_biannually:"bianualmente",nami_yearly:"anual"},ro:{nami_day_abbrev:"zi",nami_day_abbrev_plural:"zile",nami_week_abbrev:"săptămână",nami_week_abbrev_plural:"săptămâni",nami_month_abbrev:"lună",nami_month_abbrev_plural:"luni",nami_year_abbrev:"an",nami_year_abbrev_plural:"ani",nami_daily:"zilnic",nami_weekly:"săptămânal",nami_biweekly:"la două săptămâni",nami_monthly:"lunar",nami_bimonthly:"bilunar",nami_quarterly:"trimestrial",nami_biannually:"bianual",nami_yearly:"anual"},ru:{nami_day_abbrev:"день",nami_day_abbrev_plural:"дни",nami_week_abbrev:"нед",nami_week_abbrev_plural:"недели",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год",nami_year_abbrev_plural:"лет",nami_daily:"ежедневно",nami_weekly:"еженедельный",nami_biweekly:"раз в две недели",nami_monthly:"ежемесячно",nami_bimonthly:"раз в два месяца",nami_quarterly:"ежеквартальный",nami_biannually:"раз в два года",nami_yearly:"ежегодно"},sk:{nami_day_abbrev:"deň",nami_day_abbrev_plural:"dni",nami_week_abbrev:"týždeň",nami_week_abbrev_plural:"týždne",nami_month_abbrev:"mesiac",nami_month_abbrev_plural:"mesiacov",nami_year_abbrev:"rok",nami_year_abbrev_plural:"rokov",nami_daily:"denne",nami_weekly:"týždenne",nami_biweekly:"dvojtýždenne",nami_monthly:"mesačne",nami_bimonthly:"dvojmesačne",nami_quarterly:"štvrťročne",nami_biannually:"polročne",nami_yearly:"ročne"},sl:{nami_day_abbrev:"dan",nami_day_abbrev_plural:"dni",nami_week_abbrev:"teden",nami_week_abbrev_plural:"tedni",nami_month_abbrev:"mesec",nami_month_abbrev_plural:"mesecev",nami_year_abbrev:"leto",nami_year_abbrev_plural:"let",nami_daily:"dnevno",nami_weekly:"tedensko",nami_biweekly:"dvotedensko",nami_monthly:"mesečno",nami_bimonthly:"dvomesečno",nami_quarterly:"četrtletno",nami_biannually:"polletno",nami_yearly:"letno"},sr:{nami_day_abbrev:"дан",nami_day_abbrev_plural:"дана",nami_week_abbrev:"недеља",nami_week_abbrev_plural:"недеље",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год.",nami_year_abbrev_plural:"године",nami_daily:"свакодневно",nami_weekly:"недељно",nami_biweekly:"двонедељно",nami_monthly:"месечно",nami_bimonthly:"двомесечно",nami_quarterly:"квартално",nami_biannually:"два пута годишње",nami_yearly:"годишње"},sv:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dagar",nami_week_abbrev:"vecka",nami_week_abbrev_plural:"veckor",nami_month_abbrev:"mån",nami_month_abbrev_plural:"månader",nami_year_abbrev:"år",nami_year_abbrev_plural:"år",nami_daily:"dagligen",nami_weekly:"varje vecka",nami_biweekly:"som utkommer varannan vecka",nami_monthly:"månatlig",nami_bimonthly:"varannan månad",nami_quarterly:"kvartalsvis",nami_biannually:"vartannat år",nami_yearly:"årlig"},sw:{nami_day_abbrev:"siku",nami_day_abbrev_plural:"siku",nami_week_abbrev:"wiki",nami_week_abbrev_plural:"wiki",nami_month_abbrev:"mwezi",nami_month_abbrev_plural:"miezi",nami_year_abbrev:"mwaka",nami_year_abbrev_plural:"miaka",nami_daily:"kila siku",nami_weekly:"kila wiki",nami_biweekly:"kila wiki mbili",nami_monthly:"kila mwezi",nami_bimonthly:"kila baada ya miezi miwili",nami_quarterly:"robo mwaka",nami_biannually:"kila baada ya miaka miwili",nami_yearly:"kila mwaka"},th:{nami_day_abbrev:"วัน",nami_day_abbrev_plural:"วัน",nami_week_abbrev:"สัปดาห์",nami_week_abbrev_plural:"สัปดาห์",nami_month_abbrev:"โม",nami_month_abbrev_plural:"มอส",nami_year_abbrev:"ปี",nami_year_abbrev_plural:"ปี",nami_daily:"รายวัน",nami_weekly:"รายสัปดาห์",nami_biweekly:"สองสัปดาห์ครั้ง",nami_monthly:"รายเดือน",nami_bimonthly:"สองเดือนครั้ง",nami_quarterly:"ไตรมาส",nami_biannually:"ทุกสองปี",nami_yearly:"ทุกปี"},tr:{nami_day_abbrev:"gün",nami_day_abbrev_plural:"günler",nami_week_abbrev:"hafta",nami_week_abbrev_plural:"haftalar",nami_month_abbrev:"ay",nami_month_abbrev_plural:"aylar",nami_year_abbrev:"yıl",nami_year_abbrev_plural:"yıllar",nami_daily:"günlük",nami_weekly:"haftalık",nami_biweekly:"iki haftada bir",nami_monthly:"aylık",nami_bimonthly:"iki ayda bir",nami_quarterly:"üç aylık",nami_biannually:"iki yılda bir",nami_yearly:"yıllık"},uk:{nami_day_abbrev:"день",nami_day_abbrev_plural:"дні",nami_week_abbrev:"тиждень",nami_week_abbrev_plural:"тижні",nami_month_abbrev:"місяць",nami_month_abbrev_plural:"мос",nami_year_abbrev:"рік",nami_year_abbrev_plural:"років",nami_daily:"щоденно",nami_weekly:"щотижня",nami_biweekly:"раз на два тижні",nami_monthly:"щомісяця",nami_bimonthly:"раз на два місяці",nami_quarterly:"щоквартально",nami_biannually:"раз на півроку",nami_yearly:"щорічно"},vi:{nami_day_abbrev:"ngày",nami_day_abbrev_plural:"ngày",nami_week_abbrev:"tuần",nami_week_abbrev_plural:"tuần",nami_month_abbrev:"tháng",nami_month_abbrev_plural:"tháng",nami_year_abbrev:"năm",nami_year_abbrev_plural:"năm",nami_daily:"hằng ngày",nami_weekly:"hàng tuần",nami_biweekly:"hai tuần một lần",nami_monthly:"hàng tháng",nami_bimonthly:"hai tháng một lần",nami_quarterly:"hàng quý",nami_biannually:"hai năm một lần",nami_yearly:"hàng năm"},"zh-CN":{nami_day_abbrev:"天",nami_day_abbrev_plural:"天",nami_week_abbrev:"周",nami_week_abbrev_plural:"周",nami_month_abbrev:"莫",nami_month_abbrev_plural:"莫斯",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"日常的",nami_weekly:"每周",nami_biweekly:"每两周一次",nami_monthly:"月度",nami_bimonthly:"双月刊",nami_quarterly:"季刊",nami_biannually:"每半年",nami_yearly:"每年"},"zh-TW":{nami_day_abbrev:"天",nami_day_abbrev_plural:"天",nami_week_abbrev:"週",nami_week_abbrev_plural:"週",nami_month_abbrev:"莫",nami_month_abbrev_plural:"莫斯",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"日常的",nami_weekly:"每週",nami_biweekly:"每兩週一次",nami_monthly:"每月",nami_bimonthly:"雙月刊",nami_quarterly:"季刊",nami_biannually:"每半年",nami_yearly:"每年"},zu:{nami_day_abbrev:"usuku",nami_day_abbrev_plural:"izinsuku",nami_week_abbrev:"isonto",nami_week_abbrev_plural:"amasonto",nami_month_abbrev:"inyanga",nami_month_abbrev_plural:"i-mos",nami_year_abbrev:"unyaka",nami_year_abbrev_plural:"iminyaka",nami_daily:"nsuku zonke",nami_weekly:"masonto onke",nami_biweekly:"kabili ngesonto",nami_monthly:"nyanga zonke",nami_bimonthly:"kabili ngenyanga",nami_quarterly:"njalo ngekota",nami_biannually:"kabili ngonyaka",nami_yearly:"minyaka yonke"}},Ju="en";function Qu(e){var t,n,a=function(e){if(!e)return Ju;var t=e.trim();if(qu[t])return t;var n=t.toLowerCase(),a=n.split("-")[0];return qu[a]?a:"zh"===a?n.includes("tw")||n.includes("hk")?"zh-TW":"zh-CN":Ju}(Kr.getLanguageCode()),i=null!==(t=qu[a])&&void 0!==t?t:qu[Ju];return null!==(n=null==i?void 0:i[e])&&void 0!==n?n:e}var Zu=e=>"subscription"===e;function el(e){if(Zu(null==e?void 0:e.product_type)){var t=nl(e);if(t.length>0)return t[0].billingPeriod}return null}function tl(e){var t=function(e){if(!e)return[];var t=e.offers.filter((e=>"promo"===e.offer_type));return al(t,e.subscription_period)}(e).find((e=>0===e.priceAmountMicros));return(null==t?void 0:t.billingPeriod)||null}function nl(e){return e?al(e.offers.filter((e=>"default"===e.offer_type)),e.subscription_period):[]}function al(e,t){return e.map((e=>il(e,t)))}function il(e,t){var n,a,i,r,o,s,u,l;if(!e)return{};var d=null!==(n=null===(a=e.promo_period)||void 0===a?void 0:a.count)&&void 0!==n?n:null==t?void 0:t.count,h=null!==(i=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==i?i:null==t?void 0:t.type,c=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:sl(m).format(c)}}function rl(e,t=!1,n=!1,a=!1,i=!1){if(!e)return null;var r=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!r)return null;var o=r.slice(1).map((e=>parseInt(e))),s=o[0],u=o[1],l=o[2],d=o[3],h=(e,t,n,a,r)=>{var o=(e=>i?`${e}_abbrev`:e)(r),s=(e=>i?`${e}_abbrev_plural`:`${e}_plural`)(r),u=Qu(o),l=Qu(s);return i||u!==o||(u=Qu(`${r}_abbrev`)),i||l!==s||(l=Qu(`${r}_abbrev_plural`)),a?e.toString():n?1===e||t?u:l:1===e||t?`${e} ${u}`:`${e} ${l}`};switch(e.at(-1)){case"D":return h(d,t,n,a,"nami_day");case"W":return h(l,t,n,a,"nami_week");case"M":return h(u,t,n,a,"nami_month");case"Y":return h(s,t,n,a,"nami_year")}return null}function ol(e){var t;if(!e||e.length<2)return!1;var n=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===n||"Y"===n}function sl(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,f({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,f({},t,{style:"currency",currency:"USD"}))}}var ul=(e,t,n)=>e&&t&&n?n.format(e-t):null,ll=(e,t,n,a)=>{if(e&&t&&n&&a){var i=100*(1-e/(n/a*t));return`${Math.round(i)}%`}return null},dl=(e,t)=>{if(""!=t){var n=parseInt(t)-1;return n>=0&&n<(null==e?void 0:e.length)?e[n]:null==e?void 0:e.find((e=>e.sku_ref_id===t))}},hl=e=>ml(e.priceAmountMicros)/cl(e.billingPeriod),cl=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},ml=e=>e/1e6;function fl(e){return parseFloat((Math.round(e)/100).toFixed(2))}var vl=(e,t,n=[])=>({price:()=>yl(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>bl(e),durationSingular:()=>bl(e,!0),period:()=>bl(e,!1,!0),periodNumber:()=>bl(e,!1,!1,!0),freeTrialDuration:()=>wl(e),freeTrialDurationSingular:()=>wl(e,!0),freeTrialPeriod:()=>wl(e,!1,!0),freeTrialPeriodNumber:()=>wl(e,!1,!1,!0),pricePerMonth:()=>kl(e),pricePerMonthRounded:()=>kl(e,!0),periodInMonths:()=>Sl(e),durationInMonths:()=>El(e),durationInMonthsSingular:()=>El(e,!0),periodNumberInMonths:()=>Ml(e),percentagePriceDifferenceFromSku:()=>Pl(e,t,n),priceDifferenceFromSku:()=>Tl(e,t,n),promoEligible:()=>null===_l(e)&&null!==Dl(e,t),freeTrialEligible:()=>null!==_l(e),promo:()=>{var n;return null===(n=Dl(e,t))||void 0===n?void 0:n.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var n;return null===(n=Al(e,t))||void 0===n?void 0:n.formattedPrice},promoPeriod:()=>xl(e,t,!1,!0),promoPeriodNumber:()=>xl(e,t,!1,!1,!0),promoDuration:()=>xl(e,t),promoDurationSingular:()=>xl(e,t,!0),introEligible:()=>!1,pricePerDay:()=>Cl(e),pricePerWeek:()=>Il(e),pricePerWeekRounded:()=>Il(e,!0),introductoryPrice:()=>Ll(e,t),introductoryPeriod:()=>Fl(e,t,!1,!0),introductoryPeriodNumber:()=>Fl(e,t,!1,!1,!0),introductoryDuration:()=>Fl(e,t),introductoryDurationSingular:()=>Fl(e,t,!0),introductoryPricePerMonth:()=>Rl(e,t),introductoryPricePerMonthRounded:()=>Rl(e,t,!0),durationAbbrev:()=>bl(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>wl(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>Fl(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>xl(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>xl(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>El(e,!1,!1,!1,!0),durationSingularAbbrev:()=>bl(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>wl(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>Fl(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>xl(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>xl(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>El(e,!0,!1,!1,!0),periodAbbrev:()=>bl(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>wl(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>Fl(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>xl(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>xl(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>El(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;var t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;var n=t[1],a=t[2],i=t[3],r=t[4],o=void 0!==n?parseInt(n,10):0,s=void 0!==a?parseInt(a,10):0,u=void 0!==i?parseInt(i,10):0;return(void 0!==r?parseInt(r,10):0)>0?null:u>0?1===u?Qu("nami_weekly"):2===u?Qu("nami_biweekly"):null:s>0?Qu(1===s?"nami_monthly":2===s?"nami_bimonthly":3===s?"nami_quarterly":6===s?"nami_biannually":12===s?"nami_yearly":"nami_monthly"):o>0?Qu("nami_yearly"):null}(el(e)),iso_subscription_duration:()=>Nl(e),invalid:()=>!1,unavailable:()=>!1}),pl=()=>Object.keys(vl({})),gl=(e,t,n,a=[])=>{if(!t)return null;var i=vl(t,n,a);return i[e]?i[e]():null},yl=e=>{var t=nl(e);return t&&t.length?t[0].formattedPrice:null},bl=(e,t,n,a,i)=>rl(el(e),t,n,a,i),wl=(e,t,n,a,i)=>rl(tl(e),t,n,a,i),kl=(e,t)=>{var n=nl(e);if(!n||0===n.length)return null;var a=hl(n[0]);return a?sl(n[0].priceCurrencyCode).format(t?Math.round(a):a):null},Sl=(e,t)=>{var n=nl(e);if(!n||0===n.length)return null;var a=n[0].billingPeriod;return ol(a)?rl("P1Y"===a?"P12M":a,!1,!1,!1,t):null},El=(e,t,n,a,i)=>{var r=nl(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return ol(o)?rl("P1Y"===o?"P12M":o,t,n,a,i):null},Ml=e=>{if(!e)return 0;var t=nl(e);return t&&t.length?cl(t[0].billingPeriod):0},Pl=(e,t,n=[])=>{var a,i=nl(e);if(!i||0===i.length)return null;var r=null===(a=dl(n,null!=t?t:""))||void 0===a?void 0:a.product_details;if(!t||!r)return ll(fl(i[0].priceAmountMicros),Ml(e));var o=nl(r);return ll(fl(i[0].priceAmountMicros),Ml(e),(null==o?void 0:o.length)>0?fl(o[0].priceAmountMicros):0,Ml(r))},Tl=(e,t,n=[])=>{var a,i=nl(e);if(!i||0===i.length)return null;var r=null===(a=dl(n,null!=t?t:""))||void 0===a?void 0:a.product_details;if(!t||!r)return ul(hl(i[0]));var o=nl(r);return ul(hl(i[0]),hl(o[0]),sl(o[0].priceCurrencyCode))},_l=e=>tl(e),Dl=(e,t)=>{if(!e)return null;var n=e.offers.filter((e=>"promo"===e.offer_type));if(!t)return n[0]||null;var a=n[parseInt(t)];return a?a||null:n.find((e=>e.offer_ref_id===t))||null},Al=(e,t)=>e?il(Dl(e,t),e.subscription_period):null,xl=(e,t,n,a,i,r)=>{var o=Al(e,t);return rl((null==o?void 0:o.billingPeriod)||null,n,a,i,r)},Cl=(e,t)=>{var n=nl(e);if(!n||0===n.length)return null;var a,i,r=ml(n[0].priceAmountMicros)/(a=n[0].billingPeriod,(i=cl(a))?30.437*i:1);return r?sl(n[0].priceCurrencyCode).format(r):null},Il=(e,t)=>{var n=nl(e);if(!n||0===n.length)return null;var a,i,r=ml(n[0].priceAmountMicros)/(a=n[0].billingPeriod,(i=cl(a))?52*i/12:1);return r?sl(n[0].priceCurrencyCode).format(t?Math.round(r):r):null},Ll=(e,t)=>{var n=Wl(e,t);return(null==n?void 0:n.formattedPrice)||null},Fl=(e,t,n,a,i,r)=>{var o=Wl(e,t);return rl((null==o?void 0:o.billingPeriod)||null,n,a,i,r)},Rl=(e,t,n)=>{var a=Wl(e,t);if(a){var i=ml(a.priceAmountMicros),r=cl(a.billingPeriod),o=n?Math.round(i/r):i/r;return sl(a.priceCurrencyCode).format(o)}},Wl=(e,t)=>{return e?(t?(n=e.offers[parseInt(t)])||(n=e.offers.find((e=>e.offer_ref_id===t))||null):n=e.offers[0],il(n,e.subscription_period)):null;var n},Nl=e=>{var t=el(e);return t?"P7D"===t?"P1W":t:null};function Ol(e,t,n){var a=e.length;return n=void 0===n?a:n,!t&&n>=a?e:function(e,t,n){var a=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(i);++a<i;)r[a]=e[a+t];return r}(e,t,n)}var jl=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function $l(e){return jl.test(e)}var zl="\\ud800-\\udfff",Bl="["+zl+"]",Hl="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ul="\\ud83c[\\udffb-\\udfff]",Gl="[^"+zl+"]",Vl="(?:\\ud83c[\\udde6-\\uddff]){2}",Xl="[\\ud800-\\udbff][\\udc00-\\udfff]",Kl="(?:"+Hl+"|"+Ul+")"+"?",Yl="[\\ufe0e\\ufe0f]?",ql=Yl+Kl+("(?:\\u200d(?:"+[Gl,Vl,Xl].join("|")+")"+Yl+Kl+")*"),Jl="(?:"+[Gl+Hl+"?",Hl,Vl,Xl,Bl].join("|")+")",Ql=RegExp(Ul+"(?="+Ul+")|"+Jl+ql,"g");function Zl(e){return $l(e)?function(e){return e.match(Ql)||[]}(e):function(e){return e.split("")}(e)}var ed,td=(ed="toUpperCase",function(e){var t=$l(e=xr(e))?Zl(e):void 0,n=t?t[0]:e.charAt(0),a=t?Ol(t,1).join(""):e.slice(1);return n[ed]()+a});var nd,ad=(nd={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==nd?void 0:nd[e]}),id=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rd=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var od=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var sd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var ud="\\ud800-\\udfff",ld="\\u2700-\\u27bf",dd="a-z\\xdf-\\xf6\\xf8-\\xff",hd="A-Z\\xc0-\\xd6\\xd8-\\xde",cd="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",md="["+cd+"]",fd="\\d+",vd="["+ld+"]",pd="["+dd+"]",gd="[^"+ud+cd+fd+ld+dd+hd+"]",yd="(?:\\ud83c[\\udde6-\\uddff]){2}",bd="[\\ud800-\\udbff][\\udc00-\\udfff]",wd="["+hd+"]",kd="(?:"+pd+"|"+gd+")",Sd="(?:"+wd+"|"+gd+")",Ed="(?:['’](?:d|ll|m|re|s|t|ve))?",Md="(?:['’](?:D|LL|M|RE|S|T|VE))?",Pd="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Td="[\\ufe0e\\ufe0f]?",_d=Td+Pd+("(?:\\u200d(?:"+["[^"+ud+"]",yd,bd].join("|")+")"+Td+Pd+")*"),Dd="(?:"+[vd,yd,bd].join("|")+")"+_d,Ad=RegExp([wd+"?"+pd+"+"+Ed+"(?="+[md,wd,"$"].join("|")+")",Sd+"+"+Md+"(?="+[md,wd+kd,"$"].join("|")+")",wd+"?"+kd+"+"+Ed,wd+"+"+Md,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fd,Dd].join("|"),"g");function xd(e,t,n){return e=xr(e),void 0===t?function(e){return sd.test(e)}(e)?function(e){return e.match(Ad)||[]}(e):function(e){return e.match(od)||[]}(e):e.match(t)||[]}var Cd=RegExp("['’]","g");var Id,Ld=(Id=function(e,t,n){return t=t.toLowerCase(),e+(n?td(xr(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var a=-1,i=null==e?0:e.length;++a<i;)n=t(n,e[a],a,e);return n}(xd(function(e){return(e=xr(e))&&e.replace(id,ad).replace(rd,"")}(e).replace(Cd,"")),Id,"")});function Fd(e,t,n,a){var i=n.flatMap((e=>e.products)).find((e=>e.id===t.selectedProducts[t.currentGroupId]));return Wd(zd(e,null==i?void 0:i.sku_ref_id),i,a)}function Rd(e,t,n){var a,i,r=null!==(a=null===(i=t.find((e=>e.id===n)))||void 0===i?void 0:i.products)&&void 0!==a?a:[];return r.forEach((t=>{t.product_details=zd(e,t.sku_ref_id||""),t.variables=Wd(t.product_details,t,r)})),r}function Wd(e,t,n){if(!t)return{};var a=t.variables;if(!a)return f({},t);Object.keys(a).forEach((t=>{if(Nd(a[t])){var i=jd(a[t],e,n);a[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(i)}}));var i={};return pl().forEach((t=>{if(void 0===a[t]){var r=gl(t,e,void 0,n);null!==r&&(i[t]=r)}})),f({},t,i,a)}function Nd(e){return"string"==typeof e&&e.includes(Cn)}function Od(e,t,n){return t?(Object.keys(t).forEach((a=>{Nd(t[a])&&(t[a]=t[Ld(a)]=jd(t[a],e,n))})),f({},t)):{}}var jd=(e,t,n)=>e.replace(_n,((a,i)=>{var r,o,s,u,l=(null===(r=_n.exec(e))||void 0===r?void 0:r.slice(1))||[];i=null!==(o=l[0])&&void 0!==o?o:i;var d=null!==(s=null===(u=l[1])||void 0===u?void 0:u.replace(":",""))&&void 0!==s?s:"";return gl(i,t,d,n)}));function $d(e,t){return t.flatMap((e=>e.products)).some((t=>1==gl("freeTrialEligible",zd(e,t.sku_ref_id))))}function zd(e=[],t=""){return e.find((e=>e.product_ref_id===t))||null}var Bd=function(){try{var e=ba(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function Hd(e,t,n){"__proto__"==t&&Bd?Bd(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Ud=Object.prototype.hasOwnProperty;function Gd(e,t,n){var a=e[t];Ud.call(e,t)&&On(a,n)&&(void 0!==n||t in e)||Hd(e,t,n)}function Vd(e,t,n,a){var i=!n;n||(n={});for(var r=-1,o=t.length;++r<o;){var s=t[r],u=void 0;void 0===u&&(u=e[s]),i?Hd(n,s,u):Gd(n,s,u)}return n}var Xd=Object.prototype.hasOwnProperty;function Kd(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ci(e),n=[];for(var a in e)("constructor"!=a||!t&&Xd.call(e,a))&&n.push(a);return n}function Yd(e){return Ri(e)?Ai(e,!0):Kd(e)}var qd="object"==typeof exports&&exports&&!exports.nodeType&&exports,Jd=qd&&"object"==typeof module&&module&&!module.nodeType&&module,Qd=Jd&&Jd.exports===qd?Un.Buffer:void 0,Zd=Qd?Qd.allocUnsafe:void 0;var eh=Ii(Object.getPrototypeOf,Object),th=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Qa(t,ii(e)),e=eh(e);return t}:ti;function nh(e){return ei(e,Yd,th)}var ah=Object.prototype.hasOwnProperty;function ih(e){var t=new e.constructor(e.byteLength);return new Fa(t).set(new Fa(e)),t}var rh=/\w*$/;var oh=Gn?Gn.prototype:void 0,sh=oh?oh.valueOf:void 0;var uh="[object Boolean]",lh="[object Date]",dh="[object Map]",hh="[object Number]",ch="[object RegExp]",mh="[object Set]",fh="[object String]",vh="[object Symbol]",ph="[object ArrayBuffer]",gh="[object DataView]",yh="[object Float32Array]",bh="[object Float64Array]",wh="[object Int8Array]",kh="[object Int16Array]",Sh="[object Int32Array]",Eh="[object Uint8Array]",Mh="[object Uint8ClampedArray]",Ph="[object Uint16Array]",Th="[object Uint32Array]";function _h(e,t,n){var a,i=e.constructor;switch(t){case ph:return ih(e);case uh:case lh:return new i(+e);case gh:return function(e,t){var n=t?ih(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case yh:case bh:case wh:case kh:case Sh:case Eh:case Mh:case Ph:case Th:return function(e,t){var n=t?ih(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case dh:return new i;case hh:case fh:return new i(e);case ch:return function(e){var t=new e.constructor(e.source,rh.exec(e));return t.lastIndex=e.lastIndex,t}(e);case mh:return new i;case vh:return a=e,sh?Object(sh.call(a)):{}}}var Dh=Object.create,Ah=function(){function e(){}return function(t){if(!ta(t))return{};if(Dh)return Dh(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var xh=Pi&&Pi.isMap,Ch=xh?ki(xh):function(e){return ri(e)&&"[object Map]"==er(e)};var Ih=Pi&&Pi.isSet,Lh=Ih?ki(Ih):function(e){return ri(e)&&"[object Set]"==er(e)},Fh=1,Rh=2,Wh=4,Nh="[object Arguments]",Oh="[object Function]",jh="[object GeneratorFunction]",$h="[object Object]",zh={};function Bh(e,t,n,a,i,r){var o,s=t&Fh,u=t&Rh,l=t&Wh;if(void 0!==o)return o;if(!ta(e))return e;var d=Za(e);if(d){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ah.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,a=e.length;for(t||(t=Array(a));++n<a;)t[n]=e[n];return t}(e,o)}else{var h=er(e),c=h==Oh||h==jh;if(fi(e))return function(e,t){if(t)return e.slice();var n=e.length,a=Zd?Zd(n):new e.constructor(n);return e.copy(a),a}(e,s);if(h==$h||h==Nh||c&&!i){if(o=u||c?{}:function(e){return"function"!=typeof e.constructor||Ci(e)?{}:Ah(eh(e))}(e),!s)return u?function(e,t){return Vd(e,th(e),t)}(e,function(e,t){return e&&Vd(t,Yd(t),e)}(o,e)):function(e,t){return Vd(e,ii(e),t)}(e,function(e,t){return e&&Vd(t,Wi(t),e)}(o,e))}else{if(!zh[h])return i?e:{};o=_h(e,h,s)}}r||(r=new _a);var m=r.get(e);if(m)return m;r.set(e,o),Lh(e)?e.forEach((function(a){o.add(Bh(a,t,n,a,e,r))})):Ch(e)&&e.forEach((function(a,i){o.set(i,Bh(a,t,n,i,e,r))}));var f=d?void 0:(l?u?nh:Ni:u?Yd:Wi)(e);return function(e,t){for(var n=-1,a=null==e?0:e.length;++n<a&&!1!==t(e[n],n,e););}(f||e,(function(a,i){f&&(a=e[i=a]),Gd(o,i,Bh(a,t,n,i,e,r))})),o}zh[Nh]=zh["[object Array]"]=zh["[object ArrayBuffer]"]=zh["[object DataView]"]=zh["[object Boolean]"]=zh["[object Date]"]=zh["[object Float32Array]"]=zh["[object Float64Array]"]=zh["[object Int8Array]"]=zh["[object Int16Array]"]=zh["[object Int32Array]"]=zh["[object Map]"]=zh["[object Number]"]=zh[$h]=zh["[object RegExp]"]=zh["[object Set]"]=zh["[object String]"]=zh["[object Symbol]"]=zh["[object Uint8Array]"]=zh["[object Uint8ClampedArray]"]=zh["[object Uint16Array]"]=zh["[object Uint32Array]"]=!0,zh["[object Error]"]=zh[Oh]=zh["[object WeakMap]"]=!1;var Hh=(e,t,n)=>{var a=Object.getOwnPropertyDescriptor(e,t);if(!a||a.configurable)try{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n,writable:!1})}catch(a){try{e[t]=n}catch(e){}}},Uh=function(){return c((function e(){s(this,e),this.listeners=new Map}),[{key:"addEventListener",value:function(e,t,n){var a;if(t){var i=(e=>"boolean"==typeof e?{capture:e}:null!=e?e:{})(n),r=null!==(a=this.listeners.get(e))&&void 0!==a?a:[];if(!r.some((e=>e.listener===t))){var o={listener:t,once:Boolean(i.once)};if(i.signal){if(i.signal.aborted)return;o.signal=i.signal,o.abortHandler=()=>this.removeEventListener(e,t),i.signal.addEventListener("abort",o.abortHandler,{once:!0})}r.push(o),this.listeners.set(e,r)}}}},{key:"removeEventListener",value:function(e,t){if(t){var n=this.listeners.get(e);if(n&&0!==n.length){for(var a=n.length-1;a>=0;a-=1){var i=n[a];i.listener===t&&(i.signal&&i.abortHandler&&i.signal.removeEventListener("abort",i.abortHandler),n.splice(a,1))}0===n.length&&this.listeners.delete(e)}}}},{key:"dispatchEvent",value:function(e){var t,n;if(!e||"string"!=typeof e.type)throw new TypeError('Failed to execute "dispatchEvent": event type must be a string.');var a=this.listeners.get(e.type);if(!a||0===a.length)return!0;Hh(e,"target",this);var i=!1,r=null===(t=e.stopImmediatePropagation)||void 0===t?void 0:t.bind(e),o=null===(n=e.stopPropagation)||void 0===n?void 0:n.bind(e),s=()=>{i=!0,null==r||r()},u=()=>{e.cancelBubble=!0,null==o||o()};e.stopImmediatePropagation=s,e.stopPropagation=u;for(var l,d,h=m(a.slice());!(l=h()).done;){var c=l.value;if(i)break;Hh(e,"currentTarget",this),"function"==typeof c.listener?c.listener.call(this,e):"object"==typeof(d=c.listener)&&null!==d&&"handleEvent"in d&&c.listener.handleEvent.call(c.listener,e),c.once&&this.removeEventListener(e.type,c.listener)}if(r)e.stopImmediatePropagation=r;else try{delete e.stopImmediatePropagation}catch(t){e.stopImmediatePropagation=s}if(o)e.stopPropagation=o;else try{delete e.stopPropagation}catch(t){e.stopPropagation=u}return Hh(e,"currentTarget",null),!e.defaultPrevented}}])}(),Gh=[],Vh={paywallId:"",livePaywalls:[],selectedPaywall:void 0,selectedCampaign:void 0,campaignRules:[],anySkuHasTrialOffer:!1,anySkuHasIntroOffer:!1,anySkuHasPromoOffer:!1,isLoggedIn:!1,darkMode:!1,safeAreaTop:0,groups:[],selectedProducts:{},formStates:{},timerStates:{},currentPage:"page1",currentGroupId:"",currentGroupName:"",fullScreenPresentation:!1,launch:{productGroups:[],customAttributes:{},customObject:{},currentGroup:""},sku:{},orientation:"portrait",focusedState:!1,platformId:"",mediaList:{},skuItems:[],customer:{},hasNotch:!1,purchaseInProgress:!1,formFactor:"desktop",slides:{},userInteractionEnabled:!0,currentSlideIndex:void 0},Xh=function(){function e(t,n,a){var i;s(this,e),(i=o(this,e)).host=null,i.subscribers=new Set,i.productDetails=Gh,i.filteredSkuMenus=[],i.state=Bh(Vh,5);var r=Kr.getNamiProfile();return i.state.isLoggedIn=!(null==r||!r.externalId),i.setPaywall(t,n,a),i.defineDynamicStateProps(),i.subscribers=new Set,i}return g(e,Uh),c(e,[{key:"subscribe",value:function(e){return this.subscribers.add(e),()=>this.unsubscribe(e)}},{key:"unsubscribe",value:function(e){this.subscribers.delete(e)}},{key:"emitEvent",value:function(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))}},{key:"onEvent",value:function(e,t){var n=e=>t(e.detail);return this.addEventListener(e,n),()=>this.removeEventListener(e,n)}},{key:"hostConnected",value:function(){}},{key:"hostDisconnected",value:function(){this.subscribers.clear()}},{key:"defineDynamicStateProps",value:function(){Object.defineProperty(this.state,"tvQuality",{get:this.getTVQuality.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportWidth",{get:this.getViewportWidth.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportHeight",{get:this.getViewportHeight.bind(this),enumerable:!1,configurable:!0})}},{key:"setState",value:function(e){this.state=e,this.defineDynamicStateProps(),this.subscribers.forEach((e=>e())),this.host&&this.host.requestUpdate()}},{key:"setProductDetails",value:function(e){this.productDetails=e}},{key:"getProductDetails",value:function(){return this.productDetails}},{key:"setCurrentGroupData",value:function(e,t){var n=Fd(this.productDetails,this.state,this.filteredSkuMenus,Rd(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(f({},this.state,{currentGroupId:e,currentGroupName:t,sku:n}))}},{key:"setFormState",value:function(e,t){this.setState(f({},this.state,{formStates:f({},this.state.formStates,{[e]:t})}))}},{key:"setTimerState",value:function(e,t,n,a){this.setState(f({},this.state,{timerStates:f({},this.state.timerStates,{[e]:{remainingSeconds:t,savedAt:n,hasEmittedCompletion:a}})}))}},{key:"getTimerState",value:function(e){return this.state.timerStates[e]}},{key:"getCurrentGroupId",value:function(){return this.state.currentGroupId}},{key:"getCurrentGroupName",value:function(){return this.state.currentGroupName}},{key:"setCurrentFormId",value:function(e,t){var n=this.state.formStates||{},a=f({},n,{[e]:t||!n[e]});this.setState(f({},this.state,{formStates:a}))}},{key:"getCurrentFormId",value:function(e){return this.state.formStates[e]}},{key:"setSelectedProducts",value:function(e){var t=Fd(this.productDetails,this.state,this.filteredSkuMenus,Rd(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(f({},this.state,{selectedProducts:e,sku:t}))}},{key:"selectedProducts",value:function(){return this.state.selectedProducts}},{key:"setPaywall",value:function(e,t,n){var a,i,r,o,s,u=f({},this.state,{formFactor:uu(),selectedPaywall:e,selectedCampaign:n}),l=function(e,t,n=[]){var a,i,r=null!==(a=t.productGroups)&&void 0!==a&&a.length?t.productGroups:n.map((e=>e.ref));return{customAttributes:t.customAttributes,productGroups:r,customObject:f({},e.customObject,t.customObject),currentGroup:null!==(i=t.currentGroup)&&void 0!==i?i:""}}((u=f({},u,null===(a=e.template)||void 0===a?void 0:a.initialState)).launch,t,e.sku_menus);(this.filteredSkuMenus=null!==(i=e.sku_menus)&&void 0!==i?i:[],l.productGroups.length&&(this.filteredSkuMenus=this.filteredSkuMenus.filter((e=>l.productGroups.includes(e.ref)))),""!==l.currentGroup&&u.groups.length&&null!==(r=e.template)&&void 0!==r&&r.displaySingleGroup)&&(u.currentGroupId=null!==(o=null===(s=u.groups.find((e=>e.ref==l.currentGroup)))||void 0===s?void 0:s.id)&&void 0!==o?o:"");if(""===u.currentGroupId&&1===this.filteredSkuMenus.length){var d,h=u.groups.find((e=>e.ref==this.filteredSkuMenus[0].ref));u.currentGroupId=null!==(d=null==h?void 0:h.id)&&void 0!==d?d:u.currentGroupId}var c=Rd(this.productDetails,this.filteredSkuMenus,u.currentGroupId);u.skuItems=c,u.launch=l,u.anySkuHasTrialOffer=$d(this.productDetails,this.filteredSkuMenus),u.anySkuHasPromoOffer=function(e,t){return!$d(e,t)&&t.flatMap((e=>e.products)).some((t=>1==gl("promoEligible",zd(e,t.sku_ref_id))))}(this.productDetails,this.filteredSkuMenus),u.paywallId=e.id,u.sku=Fd(this.productDetails,u,this.filteredSkuMenus,c),this.setState(u)}},{key:"getSelectedPaywall",value:function(){return this.state.selectedPaywall}},{key:"getSelectedCampaign",value:function(){return this.state.selectedCampaign}},{key:"getCurrentPlacementLabel",value:function(){var e,t;return null!==(e=this.state.selectedCampaign)&&void 0!==e&&e.value?this.state.selectedCampaign.value:null!==(t=this.flow)&&void 0!==t&&null!==(t=t.campaign)&&void 0!==t&&t.value?this.flow.campaign.value:void 0}},{key:"getPaywallActionEventData",value:function(){var e,t,n,a,i,r,o,s,u,l=this.state.selectedCampaign,d=this.state.selectedPaywall;return{paywallId:null!==(e=null==d?void 0:d.id)&&void 0!==e?e:"",paywallName:null!==(t=null==d?void 0:d.name)&&void 0!==t?t:"",campaignId:null!==(n=null==l?void 0:l.rule)&&void 0!==n?n:"",campaignName:null!==(a=null==l?void 0:l.name)&&void 0!==a?a:"",campaignType:null!==(i=null==l?void 0:l.type)&&void 0!==i?i:"",campaignLabel:null!==(r=null==l?void 0:l.value)&&void 0!==r?r:"",campaignUrl:(null==l?void 0:l.type)===exports.NamiCampaignRuleType.URL&&null!==(o=null==l?void 0:l.value)&&void 0!==o?o:"",segmentId:null!==(s=null==l?void 0:l.segment)&&void 0!==s?s:"",externalSegmentId:null!==(u=null==l?void 0:l.external_segment)&&void 0!==u?u:""}}},{key:"paywallId",value:function(){return this.state.paywallId}},{key:"setCurrentPage",value:function(e){this.setState(f({},this.state,{currentPage:e}))}},{key:"setCustomerAttribute",value:function(e){this.setState(f({},this.state,{customer:f({},this.state.customer,e)}))}},{key:"removeCustomerAttribute",value:function(e){delete this.state.customer[e],this.setState(this.state)}},{key:"setIsLoggedIn",value:function(e){this.setState(f({},this.state,{isLoggedIn:e}))}},{key:"setMediaList",value:function(e){this.setState(f({},this.state,{mediaList:e.reduce(((e,t)=>f({},e,{[t.name]:t})))}))}},{key:"setSafeAreaTop",value:function(e){this.setState(f({},this.state,{safeAreaTop:e}))}},{key:"setFullScreenPresentation",value:function(e){this.setState(f({},this.state,{fullScreenPresentation:e}))}},{key:"setFormFactor",value:function(e){this.setState(f({},this.state,{formFactor:e}))}},{key:"getFormFactor",value:function(){return this.state.formFactor}},{key:"getTVQuality",value:function(){var e,t;if("television"!==this.getFormFactor())return"";var n=window.devicePixelRatio||1,a=window.innerWidth||(null===(e=window.screen)||void 0===e?void 0:e.availWidth),i=window.innerHeight||(null===(t=window.screen)||void 0===t?void 0:t.availHeight);if(!a||!i)return"720p";var r=Math.max(a,i)*n,o=Math.min(a,i)*n;return r>=3840||o>=2160?"4K":r>=1920||o>=1080?"1080p":"720p"}},{key:"getViewportWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}},{key:"getViewportHeight",value:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}},{key:"setPurchaseInProgress",value:function(e){this.setState(f({},this.state,{purchaseInProgress:e}))}},{key:"setPurchase",value:function(e,t){this.setState(f({},this.state,{purchaseInProgress:e,productBeingPurchased:t}))}},{key:"setTimeSpentOnPaywall",value:function(e){this.setState(f({},this.state,{timeSpentOnPaywall:e}))}},{key:"setAppSuppliedVideoDetails",value:function({url:e,name:t}){this.setState(f({},this.state,{appSuppliedVideoUrl:e,appSuppliedVideoName:t}))}},{key:"resetAppSuppliedVideoDetails",value:function(){delete this.state.appSuppliedVideoUrl,delete this.state.appSuppliedVideoName,this.setState(this.state)}},{key:"setLaunchDetails",value:function(e,t){this.setState(f({},this.state,{launchValue:e,launchType:t}))}},{key:"setOpenHeaderIds",value:function(e,t){e=null!=t&&t.skuId?`${e}_${t.skuId}`:e;var n=[...this.state.openHeaderIds],a=n.indexOf(e);-1!==a?n.splice(a,1):n.push(e),this.setState(f({},this.state,{openHeaderIds:n,currentCollapsibleSku:null!=t?t:null}))}},{key:"getCurrentCollapsibleSku",value:function(){return this.state.currentCollapsibleSku}},{key:"setFlow",value:function(e){this.flow=e}},{key:"setUserInteractionEnabled",value:function(e){this.setState(f({},this.state,{userInteractionEnabled:e})),this.emitEvent("user-interaction-changed",{enabled:e})}},{key:"setUserTags",value:function(e){this.setState(f({},this.state,{userTags:f({},this.state.userTags,e)}))}},{key:"setCurrentSlideIndex",value:function(e){this.state.currentSlideIndex=e}}],[{key:"create",value:function(t,n,a){var i=new e(t,n,a);return this.providers.push(i),i}},{key:"remove",value:function(e){this.providers=this.providers.filter((t=>t!==e))}},{key:"currentProvider",get:function(){return e.providers[0]}},{key:"setCustomerAttribute",value:function(e){this.providers.forEach((t=>{t.setCustomerAttribute(e)}))}},{key:"removeCustomerAttribute",value:function(e){this.providers.forEach((t=>{t.removeCustomerAttribute(e)}))}},{key:"setAppSuppliedVideoDetails",value:function(e){this.providers.forEach((t=>{t.setAppSuppliedVideoDetails(e)}))}},{key:"getSelectedPaywall",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.getSelectedPaywall()}},{key:"setUserInteractionEnabled",value:function(e){this.providers.forEach((t=>{t.setUserInteractionEnabled(e)}))}},{key:"setUserTags",value:function(e){this.providers.forEach((t=>{t.setUserTags(e)}))}},{key:"setProductDetails",value:function(e){this.providers.forEach((t=>{t.setProductDetails(e)})),Gh=e}},{key:"setPurchaseInProgress",value:function(e){this.providers.forEach((t=>{t.setPurchaseInProgress(e)}))}},{key:"setIsLoggedIn",value:function(e){this.providers.forEach((t=>{t.setIsLoggedIn(e)}))}},{key:"setPurchase",value:function(e,t){this.providers.forEach((n=>{n.setPurchase(e,t)}))}},{key:"getSelectedSlideIndex",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.state.currentSlideIndex}}])}();Xh.providers=[];var Kh=c((function e(){s(this,e),this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}}));Kh.instance=new Kh;var Yh=()=>Vr(Nn([...Kr.getNamiEntitlements(Je),...Kr.getNamiEntitlements(st)]),"referenceId"),qh=()=>{ju.getInstance().emit(En,Yh())};function Jh(e){return{id:e.id,skuId:e.sku_ref_id,name:e.name,type:e.sku_type||"unknown",entitlements:e.entitlements,productDetails:"product_details"in e?e.product_details:null}}var Qh=function(){return c((function e(){s(this,e)}),[{key:"fetchActiveEntitlements",value:function(){var e,t,n;return S((function(a){for(;;)switch(a.n){case 0:if(e=null,Xu()||Cs(le.THIRD_PARTY_TRANSACTIONS)||!Cs(le.ENTITLEMENT_MANAGEMENT)){a.n=3;break}if(null==(t=Kr.getDevice())||!t.id){a.n=2;break}return a.n=1,r(this.getAPIEntitlements(t.id));case 1:n=a.v,(e=null==n?void 0:n.results)&&(Kr.setActiveEntitlements(Ye,e),this.invokeActiveEntitlementsHandler(e));case 2:a.n=4;break;case 3:Xu()&&Wn.debug("Skipping active entitlements update - anonymous mode"),Cs(le.THIRD_PARTY_TRANSACTIONS)&&Wn.debug("Skipping active entitlements update - paywalls-only mode"),Cs(le.ENTITLEMENT_MANAGEMENT)||Wn.debug("Skipping active entitlements update - no entitlement_management capability");case 4:return a.a(2,e)}}),null,this,null,Promise)}},{key:"getAPIEntitlements",value:function(e){var t,n,a;return S((function(i){for(;;)switch(i.p=i.n){case 0:return t=`device/${e}/active_entitlements/`,n={},i.p=1,i.n=2,r(Ns.instance.fetchAPI(t));case 2:n=i.v,i.n=4;break;case 3:throw i.p=3,a=i.v,Wn.error(mo(a.status,t)),a;case 4:return i.a(2,n)}}),null,null,[[1,3]],Promise)}},{key:"invokeActiveEntitlementsHandler",value:function(e){Is()&&(e=>{Kr.setNamiEntitlements(Je,e);var t=Kr.getNamiEntitlements(st),n=new Set(e.map((e=>e.referenceId))),a=t.filter((e=>{var t=n.has(e.referenceId);return t&&Wn.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t}));a.length!==t.length&&Kr.setNamiEntitlements(st,a),qh()})(e.map((e=>(e=>{var t=e.entitlement_ref_id;return{name:e.name||"",desc:e.description||"",namiId:"",referenceId:t,relatedSkus:Kh.instance.refIdToRelatedSKUs[t]||[],activePurchases:Kh.instance.refIdToActivePurchases[t]||[],purchasedSkus:Kh.instance.refIdToPurchasedSKUs[t]||[],expires:e.expires?new Date(e.expires).valueOf():0}})(e))))}}])}();Qh.instance=new Qh;var Zh=function(){return c((function e(){s(this,e)}),[{key:"fetchCustomerJourneyState",value:function(){var e,t,n,a;return S((function(i){for(;;)switch(i.p=i.n){case 0:if(!Xu()){i.n=1;break}return Wn.debug("Skipping customer journey state update - anonymous mode"),i.a(2,null);case 1:if(null!=(e=Kr.getDevice())&&e.id){i.n=2;break}return i.a(2,null);case 2:return t=`device/${e.id}/profile/`,n=null,i.p=3,i.n=4,r(Ns.instance.fetchAPI(t,void 0,0));case 4:n=i.v,i.n=6;break;case 5:throw i.p=5,a=i.v,Wn.error(mo(a.status,t)),a;case 6:if(!n){i.n=7;break}return Kr.setCustomerJourneyState(n.customer_journey_state),i.a(2,n.customer_journey_state);case 7:return i.a(2,null)}}),null,null,[[3,5]],Promise)}}])}();Zh.instance=new Zh;var ec=function(){return c((function e(){s(this,e),this.inMemoryAnonymousMode=!1,Vu=this}),[{key:"setInMemoryAnonymousMode",value:function(e){this.inMemoryAnonymousMode=e,Wn.info(`In-memory anonymous mode ${e?"enabled":"disabled"} due to failed device registration`)}},{key:"isInMemoryAnonymousMode",value:function(){return this.inMemoryAnonymousMode}},{key:"isAnonymousMode",value:function(){return Kr.getAnonymousMode()||this.inMemoryAnonymousMode}},{key:"init",value:function(e){return S((function(t){for(;;)switch(t.n){case 0:return this.setInitialValues(e),Gu.instance.fetchConfig(),t.n=1,r(this.initAndFetchRequiredData(e));case 1:Ku.instance.startSession();case 2:return t.a(2)}}),null,this,null,Promise)}},{key:"setInitialValues",value:function(e){var t=f({},e);delete t.initialConfig,Kr.clearSessionId(),Kr.setNamiConfig(t),Kr.setLanguageCode(e.namiLanguageCode),Kr.setPurchaseChannel(e.purchaseChannel);var n=e.initialConfig;if(n.appConfig||n.platform_config){var a=(null==n?void 0:n.appConfig)||(null==n?void 0:n.platform_config);a&&Kr.setAppConfig(Ze,a)}null!=n&&n.paywalls&&Kr.setPaywalls(at,n.paywalls),null!=n&&n.products&&Kr.setProducts(rt,n.products)}},{key:"initAnonymousDevice",value:function(){return{deviceId:Bu.instance.getOrCreateAnonymousUUID(),deviceTask:null}}},{key:"initIdentifiedDevice",value:function(e){var t=f({},su(e.namiCommands),e.formFactor?{form_factor:e.formFactor}:{}),n=function(e){if(e){var t=e.find((e=>e.startsWith("splitPosition=")));if(t){var n=t.split("=")[1],a=Number(n);return n&&!isNaN(a)?fu(a):void 0}}}(e.namiCommands),a=Bu.instance.createOrUpdateDevice(t,n,this);return{deviceId:a.id,deviceTask:a.device}}},{key:"initAndFetchRequiredData",value:function(e,t=0,n=1){var a,i,o,s,u,l,d,h,c,m,f;return S((function(v){for(;;)switch(v.n){case 0:if(s=e.initialConfig,u=null!==(a=e.formFactor)&&void 0!==a?a:uu(),l=this.isAnonymousMode(),d=l?this.initAnonymousDevice():this.initIdentifiedDevice(e),h=d.deviceId,c=d.deviceTask,m=cu(h),s.campaign_rules&&Kr.setCampaignRules(tt,bu(s.campaign_rules,m,u)),!c){v.n=1;break}return v.n=1,r(c);case 1:if($u.instance.configure(u,m,e.namiCommands),f=Promise.all([Hu.instance.fetchProducts(),Zh.instance.fetchCustomerJourneyState(),Qh.instance.fetchActiveEntitlements(),Uu.instance.fetchPaywalls().then((e=>$u.instance.fetchCampaignRules(e)))]).catch((a=>{var i;return S((function(o){for(;;)switch(o.n){case 0:if(!(a instanceof Jr)){o.n=3;break}if(Kr.resetDevice(),!(t<n)){o.n=2;break}return i=100*Math.pow(2,t),o.n=1,r(new Promise((e=>setTimeout(e,i))));case 1:return o.a(2,this.initAndFetchRequiredData(e,t+1,n));case 2:if(l){o.n=3;break}return Wn.warn(`Max retries reached for ConflictError. ${a.message}`),this.setInMemoryAnonymousMode(!0),o.a(2,this.initAndFetchRequiredData(e,0,n));case 3:throw a;case 4:return o.a(2)}}),null,this,null,Promise)})),null!==(i=s.campaign_rules)&&void 0!==i&&i.length&&null!==(o=s.paywalls)&&void 0!==o&&o.length){v.n=2;break}return v.n=2,r(f);case 2:f.then((()=>this.reRenderPaywall()));case 3:return v.a(2)}}),null,this,null,Promise)}},{key:"reRenderPaywall",value:function(){if("undefined"!=typeof document){var e=document.querySelector("nami-paywall");null==e||e.setPaywallData()}}}])}();function tc(e){return Array.isArray(e)?e.map(tc):e&&"object"==typeof e?Object.entries(e).reduce(((e,[t,n])=>(void 0!==n&&(e[t]=tc(n)),e)),{}):e}ec.instance=new ec;var nc,ac=!0,ic=!1;function rc(){var e;if("function"==typeof(null===(e=window.VIZIO)||void 0===e||null===(e=e.Chromevox)||void 0===e?void 0:e.isEnabled))try{var t;ac=null===(t=window.VIZIO)||void 0===t||null===(t=t.Chromevox)||void 0===t?void 0:t.isEnabled()}catch(e){}}function oc(){var e;return"undefined"!=typeof window&&void 0!==window.VIZIO&&"function"==typeof(null===(e=window.VIZIO)||void 0===e||null===(e=e.Chromevox)||void 0===e?void 0:e.play)}function sc(e){e.isTrusted&&rc()}function uc(e){e.isTrusted&&(ac=!1)}function lc(e){if(e&&oc()&&ac)try{var t;null===(t=window.VIZIO)||void 0===t||null===(t=t.Chromevox)||void 0===t||t.play(e)}catch(e){}}var dc=function(){function e(){s(this,e),nc.set(this,!1)}return c(e,[{key:"isInitialized",get:function(){return se(this,nc,"f")||null!=Kr.getNamiConfig()}},{key:"initializeSDK",value:function(e){var t,n,a,i,o,s,u;return S((function(l){for(;;)switch(l.n){case 0:if(t=!1,n=!1,a=se(this,nc,"f")?Kr.getNamiConfig():null,Wn.setLogger(e.logLevel),null===a){l.n=3;break}if(delete(i=f({},e)).initialConfig,d=a,!zu(tc(i),tc(d))){l.n=1;break}return Wn.warn("Nami SDK is already configured, ignoring this configure call."),l.a(2,{sdkInitialized:!0,configureState:gn});case 1:n=!0;case 2:o=xs(e.namiCommands),s=xs(a.namiCommands),e.appPlatformID==a.appPlatformID&&o==s||(t=!0),e.namiLanguageCode===a.namiLanguageCode&&e.logLevel==a.logLevel||(n=!0);case 3:return t&&(Wn.info("SDK full reconfigure called"),Kr.resetDevice()),ue(this,nc,!0,"f"),Ns.configure(e),l.n=4,r(ec.instance.init(e));case 4:return Wn.info("SDK successfully initialized!"),u=n||t?vn:mn,!ic&&oc()&&(window.addEventListener("VIZIO_TTS_ENABLED",sc),window.addEventListener("VIZIO_TTS_DISABLED",uc),ic=!0,rc()),l.a(2,{sdkInitialized:!0,configureState:u})}var d}),null,this,null,Promise)}}],[{key:"sdkVersion",value:function(){return me}},{key:"configure",value:function(t){return S((function(n){for(;;)switch(n.n){case 0:if(t.appPlatformID){n.n=1;break}throw new Zr;case 1:return this.setInitialConfig(t),n.n=2,r(e.instance.initializeSDK(t));case 2:return n.a(2,n.v)}}),null,this,null,Promise)}},{key:"setInitialConfig",value:function(e){if(null!=e.initialConfig){if("string"==typeof e.initialConfig){Wn.warn("[DEPRECATED] NamiConfiguration.initialConfig should be an object");var t=function(e){var t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return JSON.parse(t)}catch(e){return}}(e.initialConfig);if(!t)return Wn.error("Failed to parse NamiConfiguration.initialConfig"),void(e.initialConfig={});e.initialConfig=t}if("object"!=typeof e.initialConfig)e.initialConfig={};else if((e=>"object"==typeof e&&"initial_config"in e)(e.initialConfig)){var n=Ls(e.initialConfig.initial_config);n?e.initialConfig=n:(e.initialConfig={},Wn.error("Failed to parse NamiConfiguration.initialConfig as base64-gzipped JSON"))}}else e.initialConfig={}}}])}();nc=new WeakMap,dc.instance=new dc;var hc,cc=new Set(["fullscreen","sheet","compact_sheet","modal"]);exports.NamiPaywallManagerEvents=void 0,(hc=exports.NamiPaywallManagerEvents||(exports.NamiPaywallManagerEvents={})).BuySku="RegisterBuySKU",hc.Close="PaywallCloseRequested",hc.SignIn="PaywallSignInRequested",hc.Restore="PaywallRestoreRequested",hc.DeeplinkAction="PaywallDeeplinkAction";var mc,fc,vc,pc,gc=e.css(mc||(mc=(e=>e)`
|
|
2
2
|
/* ——— keyframes ——— */
|
|
3
3
|
@keyframes nami-slide-up {
|
|
4
4
|
from { transform: translateY(100%); }
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
padding-top: 0;
|
|
89
89
|
padding-bottom: 0;
|
|
90
90
|
}
|
|
91
|
-
`)),yc=e=>(t,n)=>{void 0!==n?n.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},bc=globalThis,wc=bc.ShadowRoot&&(void 0===bc.ShadyCSS||bc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,kc=Symbol(),Sc=new WeakMap,Ec=function(){return c((function e(t,n,a){if(s(this,e),this._$cssResult$=!0,a!==kc)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}),[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(wc&&void 0===e){var n=void 0!==t&&1===t.length;n&&(e=Sc.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Sc.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Mc=(e,t)=>{if(wc)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(var n,a=m(t);!(n=a()).done;){var i=n.value,r=document.createElement("style"),o=bc.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=i.cssText,e.appendChild(r)}},Pc=wc?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,n="",a=m(e.cssRules);!(t=a()).done;){n+=t.value.cssText}return(e=>new Ec("string"==typeof e?e:e+"",void 0,kc))(n)})(e):e,Tc=Object.is,_c=Object.defineProperty,Dc=Object.getOwnPropertyDescriptor,Ac=Object.getOwnPropertyNames,xc=Object.getOwnPropertySymbols,Cc=Object.getPrototypeOf,Ic=globalThis,Lc=Ic.trustedTypes,Fc=Lc?Lc.emptyScript:"",Rc=Ic.reactiveElementPolyfillSupport,Wc=(e,t)=>e,Nc={toAttribute(e,t){switch(t){case Boolean:e=e?Fc:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Oc=(e,t)=>!Tc(e,t),jc={attribute:!0,type:String,converter:Nc,reflect:!1,useDefault:!1,hasChanged:Oc};null!==(fc=Symbol.metadata)&&void 0!==fc||(Symbol.metadata=Symbol("metadata")),null!==(vc=Ic.litPropertyMetadata)&&void 0!==vc||(Ic.litPropertyMetadata=new WeakMap);var $c=function(){function e(){var t;return s(this,e),(t=o(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return g(e,D(HTMLElement)),c(e,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach((e=>e(this)))}},{key:"addController",value:function(e){var t,n;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,n=m(this.constructor.elementProperties.keys());!(e=n()).done;){var a=e.value;this.hasOwnProperty(a)&&(t.set(a,this[a]),delete this[a])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return Mc(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}},{key:"attributeChangedCallback",value:function(e,t,n){this._$AK(e,n)}},{key:"_$ET",value:function(e,t){var n=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,n);if(void 0!==a&&!0===n.reflect){var i,r=(void 0!==(null===(i=n.converter)||void 0===i?void 0:i.toAttribute)?n.converter:Nc).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(a):this.setAttribute(a,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var n=this.constructor,a=n._$Eh.get(e);if(void 0!==a&&this._$Em!==a){var i,r,o,s=n.getPropertyOptions(a),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(i=s.converter)||void 0===i?void 0:i.fromAttribute)?s.converter:Nc;this._$Em=a;var l=u.fromAttribute(t,s.type);this[a]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(a))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,n){if(void 0!==e){var a,i,r=this.constructor,o=this[e];if(null!=n||(n=r.getPropertyOptions(e)),!((null!==(a=n.hasChanged)&&void 0!==a?a:Oc)(o,t)||n.useDefault&&n.reflect&&o===(null===(i=this._$Ej)||void 0===i?void 0:i.get(e))&&!this.hasAttribute(r._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:n,reflect:a,wrapped:i},r){var o,s,u;n&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==i||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===a&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return S((function(n){for(;;)switch(n.p=n.n){case 0:return this.isUpdatePending=!0,n.p=1,n.n=2,r(this._$ES);case 2:n.n=4;break;case 3:n.p=3,t=n.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){n.n=5;break}return n.n=5,r(e);case 5:return n.a(2,!this.isUpdatePending)}}),null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,n=m(this._$Ep);!(t=n()).done;){var a=t.value,i=a[0],r=a[1];this[i]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=m(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],c=h.wrapped,f=this[d];!0!==c||this._$AL.has(d)||void 0===f||this.C(d,void 0,h,f)}}var v=!1,p=this._$AL;try{var g;(v=this.shouldUpdate(p))?(this.willUpdate(p),null!==(g=this._$EO)&&void 0!==g&&g.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(p)):this._$EM()}catch(p){throw v=!1,this._$EM(),p}v&&this._$AE(p)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=jc){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var n=Symbol(),a=this.getPropertyDescriptor(e,n,t);void 0!==a&&_c(this.prototype,e,a)}}},{key:"getPropertyDescriptor",value:function(e,t,n){var a,i=null!==(a=Dc(this.prototype,e))&&void 0!==a?a:{get(){return this[t]},set(e){this[t]=e}},r=i.get,o=i.set;return{get:r,set(t){var a=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:jc}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Wc("elementProperties"))){var e=Cc(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Wc("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Wc("properties")))for(var e=this.properties,t=0,n=[...Ac(e),...xc(e)];t<n.length;t++){var a=n[t];this.createProperty(a,e[a])}var i=this[Symbol.metadata];if(null!==i){var r=litPropertyMetadata.get(i);if(void 0!==r)for(var o,s=m(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var h,c=m(this.elementProperties);!(h=c()).done;){var f=h.value,v=f[0],p=f[1],g=this._$Eu(v,p);void 0!==g&&this._$Eh.set(g,v)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var n,a=m(new Set(e.flat(1/0).reverse()));!(n=a()).done;){var i=n.value;t.unshift(Pc(i))}else void 0!==e&&t.push(Pc(e));return t}},{key:"_$Eu",value:function(e,t){var n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}}])}();$c.elementStyles=[],$c.shadowRootOptions={mode:"open"},$c[Wc("elementProperties")]=new Map,$c[Wc("finalized")]=new Map,null!=Rc&&Rc({ReactiveElement:$c}),(null!==(pc=Ic.reactiveElementVersions)&&void 0!==pc?pc:Ic.reactiveElementVersions=[]).push("2.1.1");var zc={attribute:!0,type:String,converter:Nc,reflect:!1,hasChanged:Oc},Bc=(e=zc,t,n)=>{var a=n.kind,i=n.metadata,r=globalThis.litPropertyMetadata.get(i);if(void 0===r&&globalThis.litPropertyMetadata.set(i,r=new Map),"setter"===a&&((e=Object.create(e)).wrapped=!0),r.set(n.name,e),"accessor"===a){var o=n.name;return{set(n){var a=t.get.call(this);t.set.call(this,n),this.requestUpdate(o,a,e)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===a){var s=n.name;return function(n){var a=this[s];t.call(this,n),this.requestUpdate(s,a,e)}}throw Error("Unsupported decorator location: "+a)};function Hc(e){return(t,n)=>"object"==typeof n?Bc(e,t,n):((e,t,n)=>{var a=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),a?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function Uc(e){return Hc(f({},e,{state:!0,attribute:!1}))}function Gc(e){return!e||"object"==typeof e&&0==Object.keys(e).length}var Vc,Xc="entry",Kc="screen",Yc="branch",qc="exit",Jc="unknown";!function(e){e.NAVIGATE="flowNav",e.BACK="flowPrev",e.NEXT="flowNext",e.FINISHED="flowDone",e.DISMISS="flowDismiss",e.EXIT="flowExit",e.HANDOFF="flowHandoff",e.TRACK="trackEvent",e.LOG="logEvent",e.SET_VIDEO="setVideo",e.FLOW_EVENT="flowEvent",e.BLOCK_BACK="blockBackToStep",e.FLOW_ENABLED="flowInteractionEnabled",e.FLOW_DISABLED="flowInteractionDisabled",e.SET_TAGS="setTags",e.PAUSE="flowPause",e.RESUME="flowResume"}(Vc||(Vc={}));var Qc="__handoff_sequence__",Zc="__buy_sku__",em="__default__",tm="__appear__",nm="__disappear__",am="__login_success__",im="__login_failure__",rm="__logout_success__",om="__logout_failure__",sm="__purchase_success__",um="__remoteback__",lm="__tag_update__",dm="and",hm="or",cm="i_contains",mm="equals",fm="i_equals",vm="not_equals",pm="not_i_equals",gm="not_contains",ym="set",bm="notSet",wm=function(){function e(){s(this,e),this.resolvers=new Map,this.namespaceResolvers=new Map}return c(e,[{key:"registerNamespaceResolver",value:function(e,t){this.namespaceResolvers.set(e,t)}},{key:"resetResolvers",value:function(){this.resolvers.clear()}},{key:"evaluate",value:function(e){var t,n=null!==(t=e.filter)&&void 0!==t?t:[];if(0===n.length)return!0;var a=n.map((e=>this.evaluateFilter(e)));switch(e.operator){case dm:return a.every((e=>e));case hm:return a.some((e=>e));default:return a.every((e=>e))}}},{key:"evaluateOrdered",value:function(e){var t;if(!e)return!0;var n=null!==(t=e.filter)&&void 0!==t?t:[];if(0===n.length)return!0;switch(e.operator){case dm:for(var a,i=m(n);!(a=i()).done;){var r=a.value;if(!this.evaluateFilter(r))return!1}return!0;case hm:for(var o,s=m(n);!(o=s()).done;){var u=o.value;if(this.evaluateFilter(u))return!0}return!1;default:for(var l,d=m(n);!(l=d()).done;){var h=l.value;if(!this.evaluateFilter(h))return!1}return!0}}},{key:"evaluateFilter",value:function(e){var t=this.resolve(e.identifier);if(e.operator===ym)return null!=t;if(e.operator===bm)return null==t;if(null==t)return!![vm,pm,gm].includes(e.operator);switch(e.operator){case cm:return Array.isArray(t)?e.values.some((e=>t.some((t=>0===t.localeCompare(e,void 0,{sensitivity:"accent"}))))):(this.log("Resolved value is not an array of strings for i_contains."),!1);case mm:return e.values.some((e=>{if("string"==typeof t)return t===e;if("boolean"==typeof t){var n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for equals comparison: "+typeof t),!1}));case fm:return e.values.some((e=>{if("string"==typeof t)return 0===t.localeCompare(e,void 0,{sensitivity:"accent"});if("boolean"==typeof t){var n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for i_equals comparison: "+typeof t),!1}));case vm:return e.values.every((e=>"string"!=typeof t||t!==e));case pm:return e.values.every((e=>"string"!=typeof t||0!==t.localeCompare(e,void 0,{sensitivity:"accent"})));case gm:return e.values.every((e=>"string"!=typeof t||!t.includes(e)));default:return this.log(`Unsupported operator: ${e.operator}`),!1}}},{key:"resolve",value:function(e){var t=this.resolveRaw(e);if(void 0!==t)return t;var n=e.lastIndexOf(".");if(-1!==n){var a=e.slice(0,n),i=e.slice(n+1),r=this.resolveRaw(a);return void 0!==r?this.extractProperty(i,r):void this.log(`Could not resolve base identifier: ${a}`)}}},{key:"resolveRaw",value:function(e){for(var t,n=[...this.namespaceResolvers.keys()].sort(((e,t)=>t.length-e.length)),a=m(n);!(t=a()).done;){var i=t.value;if(e.startsWith(i)){var r=this.namespaceResolvers.get(i);if(r)return r(e)}}}},{key:"extractProperty",value:function(e,t){switch(e){case"last":if(Array.isArray(t))return t[t.length-1];break;case"first":if(Array.isArray(t))return t[0];break;case"count":if(Array.isArray(t))return t.length;if(t&&"object"==typeof t)return Object.keys(t).length;break;default:return}this.log(`Could not extract .${e} from type ${typeof t}`)}},{key:"log",value:function(e){Wn.debug(`[NamiConditionEvaluator] ${e}`)}}],[{key:"shared",get:function(){return e.instance||(e.instance=new e),e.instance}}])}(),km=function(){return c((function e(){s(this,e)}),[{key:"register",value:function(){wm.shared.registerNamespaceResolver(this.namespace,(e=>{var t=e.replace(new RegExp(`^${this.namespace}\\.`),"");return this.resolveValue(t)}))}},{key:"resolveKeyPath",value:function(e,t){for(var n,a=t,i=m(e.replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean));!(n=i()).done;){var r=n.value;if(null==a||"object"!=typeof a)return;a=a[r]}return a}}])}(),Sm=function(){function e(t){var n;return s(this,e),(n=o(this,e)).namespace="LaunchContext",n.context=t,n.register(),n}return g(e,km),c(e,[{key:"resolveValue",value:function(e){if(e.startsWith("customAttributes.")){var t=e.substring(17);return this.resolveKeyPath(t,this.context.customAttributes)}if(e.startsWith("customObject.")){var n=e.substring(13);return this.resolveKeyPath(n,this.context.customObject)}return this.resolveKeyPath(e,{customAttributes:this.context.customAttributes,customObject:this.context.customObject,productGroups:this.context.productGroups})}}])}(),Em=function(){function e(){var t,n,a,i;s(this,e),(i=o(this,e)).namespace="Device";var r=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[1]||"",u=Intl.DateTimeFormat().resolvedOptions().timeZone,l=su();return i.context={osName:l.os_name,osVersion:l.os_version,appVersion:l.extended_platform_version,sdkVersion:l.sdk_version,deviceModel:l.device_model,screenWidth:window.innerWidth,screenHeight:window.innerHeight,formFactor:l.form_factor,tvQuality:i.tvQuality(null!==(t=l.form_factor)&&void 0!==t?t:"desktop"),tvResolution:i.tvResolution(null!==(n=l.form_factor)&&void 0!==n?n:"desktop"),screenSize:i.screenSizeTier(null!==(a=l.form_factor)&&void 0!==a?a:"desktop"),language:l.language,country:r,timezone:u},i.register(),i}return g(e,km),c(e,[{key:"screenSizeTier",value:function(e){var t=window.screen.width,n=window.screen.height,a=window.devicePixelRatio||1,i=Math.round(t*a),r=Math.round(n*a),o=Math.max(i,r);switch(e){case"phone":return o<1136?"tiny":o<1334?"small":o<1920?"medium":o<2560?"large":"huge";case"tablet":return o<2048?"medium":o<2732?"large":"huge";case"television":return o<1920?"medium":o<3840?"large":"huge";case"desktop":return o<1440?"small":o<2560?"medium":o<3840?"large":"huge";default:return"medium"}}},{key:"tvQuality",value:function(e){if("television"!==e)return"";var t=window.screen.width,n=window.screen.height,a=window.devicePixelRatio||1,i=Math.round(t*a),r=Math.round(n*a),o=Math.max(i,r),s=Math.min(i,r);return o>=3840||s>=2160?"4K":o>=1920||s>=1080?"1080p":"720p"}},{key:"tvResolution",value:function(e){if("television"!==e)return"";var t=window.screen.width,n=window.screen.height,a=window.devicePixelRatio||1,i=Math.round(t*a),r=Math.round(n*a),o=Math.max(i,r),s=Math.min(i,r);return s<720&&o<1280?"SD":s>=720&&s<1080&&o>=1280&&o<1920?"720p":s>=1080&&s<1440&&o>=1920&&o<2560?"1080p":s>=1440&&s<2160&&o>=2560&&o<3840?"1440p":s>=2160&&s<3e3&&o>=3840&&o<5e3?"4K":s>=3e3&&o>=5e3?"8K":"Unknown"}},{key:"resolveValue",value:function(e){return this.resolveKeyPath(e,this.context)}}])}(),Mm=[/(^|_)api(_|$)?key/i,/^key$/i,/^token$/i,/id[_-]?token/i,/access[_-]?token/i,/^auth/i,/password/i,/secret/i,/signature/i,/hmac/i,/^jwt$/i,/^code$/i,/redirect[_-]?uri/i,/return[_-]?url/i,/^state$/i,/^session$/i,/^sid$/i,/^sso$/i,/assertion/i],Pm=function(){function e(){s(this,e),this.params={},"undefined"!=typeof window&&this.setSearchParams()}return c(e,[{key:"setSearchParams",value:function(){this.params=this.extractSafeParams()}},{key:"safeValue",value:function(e){if(!e)return null;try{var t=decodeURIComponent(e).trim();return!t||/^null|undefined$/i.test(t)||((e=>e.includes("://")||/^\/.*\?/.test(e))(t)||(e=>/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+$/.test(e))(t)||(e=>/^[A-Za-z0-9_-]{40,}$/.test(e)||/^[A-Fa-f0-9]{40,}$/.test(e)||/^ya29\./.test(e)||/^sk_/.test(e)||/^ghp_/.test(e))(t))?null:((e,t=128)=>e.length>t?e.slice(0,t):e)(t)}catch(e){return null}}},{key:"extractSafeParams",value:function(){var e=window.location,t={},n=new Set;try{for(var a,i=new URLSearchParams(e.search),r=(e,a)=>{var i=(e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[-\s]/g,"_").toLowerCase())(e);if(!(n.size>=10||(e=>Mm.some((t=>t.test(e))))(i))){var r=this.safeValue(a);r&&(t[i]=r,n.add(i))}},o=m(i.entries());!(a=o()).done;){var s=a.value;r(s[0],s[1])}}catch(e){}return t}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"refresh",value:function(){"undefined"!=typeof window&&this.instance.setSearchParams()}}])}();Pm._instance=null;var Tm,_m=()=>Pm.instance.params,Dm=/\{\{\s*([^}]+?)\s*\}\}/g,Am=function(){return c((function e(t){s(this,e),this.flowManager=t,this.urlParams=_m()}),[{key:"resolve",value:function(e){var t,n,a,i,r,o,s,u,l,d,h,c,m=this.flowManager.currentFlow,f=null==m?void 0:m.component;if(e.startsWith("launchContext.")){var v,p=null===(v=this.flowManager.currentFlow)||void 0===v?void 0:v.context;if(p){var g=e.substring(14),y=new Sm(p).resolveValue(g);return null==y?void 0:y.toString()}}else switch(e){case"campaignId":return null==f||null===(t=f.campaign)||void 0===t?void 0:t.rule;case"campaignName":return null==f||null===(n=f.campaign)||void 0===n?void 0:n.name;case"campaignLabel":case"campaignPlacement":return null!==(a=null==f||null===(i=f.campaign)||void 0===i?void 0:i.value)&&void 0!==a?a:void 0;case"campaignSegment":case"campaignSegmentId":return null==f||null===(r=f.campaign)||void 0===r?void 0:r.segment;case"campaignExternalSegment":case"campaignExternalSegmentId":return null!==(o=null==f||null===(s=f.campaign)||void 0===s?void 0:s.external_segment)&&void 0!==o?o:void 0;case"pageName":return null==f||null===(u=f.paywall)||void 0===u?void 0:u.name;case"pageId":return null==f||null===(l=f.paywall)||void 0===l?void 0:l.id;case"flowName":return null==m?void 0:m.name;case"flowId":return null==m?void 0:m.id;case"objectId":return null==f||null===(d=f.campaign)||void 0===d||null===(d=d.flow)||void 0===d?void 0:d.object_id;case"stepName":return null==m||null===(h=m.currentFlowStep)||void 0===h?void 0:h.name;case"buttonText":return null==m||null===(c=m.currentButton)||void 0===c?void 0:c.firstTextValue();case"slideNumber":var b=null==f?void 0:f.getSelectedSlideIndexForCurrentCarousel();return null!=b?`${b+1}`:void 0;default:return}}},{key:"interpolateLiquidVariables",value:function(e){return e.replace(Dm,((e,t)=>{var n,a=null!==(n=this.resolve(t))&&void 0!==n?n:this.urlParams[t];return null!=a?a:""}))}},{key:"interpolateDeep",value:function(e){return"string"==typeof e?this.interpolateLiquidVariables(e):Array.isArray(e)?e.map((e=>this.interpolateDeep(e))):e&&"object"==typeof e?Object.entries(e).reduce(((e,[t,n])=>f({},e,{[t]:this.interpolateDeep(n)})),{}):e}}])}(),xm=function(){function e(){var t;return s(this,e),(t=o(this,e)).namespace="urlParams",t.context=_m(),t.register(),t}return g(e,km),c(e,[{key:"resolveValue",value:function(e){return Wn.debug("[URLParamsResolver]","Resolving keyPath",e),this.resolveKeyPath(e,this.context)}}])}(),Cm=function(){function e(){var t;return s(this,e),(t=o(this,e)).namespace="state",t.register(),t}return g(e,km),c(e,[{key:"getContextProvider",value:function(){var e=Xh.providers;if(0!==e.length){var t=e.find((e=>e.flow));return t||e[e.length-1]}}},{key:"resolveValue",value:function(e){var t=this.getContextProvider();if(t){if(e.startsWith("formStates.")){var n=e.substring(11);return t.getCurrentFormId(n)}return this.resolveKeyPath(e,t.state)}}}])}(),Im=function(){function e(t){var n;return s(this,e),(n=o(this,e)).namespace="Placement",n.campaign=t,n.register(),n}return g(e,km),c(e,[{key:"resolveValue",value:function(e){var t;if("label"===e){if(this.campaign&&void 0!==this.campaign.value&&null!==this.campaign.value)return this.campaign.value;var n=Xh.providers;if(0!==n.length){var a=n.find((e=>e.flow));return a?a.getCurrentPlacementLabel():null===(t=n[n.length-1])||void 0===t?void 0:t.getCurrentPlacementLabel()}}}}])}(),Lm=function(){return c((function e(){s(this,e),this.load()}),[{key:"setExternalId",value:function(e){return this.externalId=e,this}},{key:"getExternalId",value:function(){return this.externalId}},{key:"isLoggedIn",value:function(){return!!this.externalId}},{key:"save",value:function(){return this.externalId?Kr.setNamiProfile({externalId:this.externalId}):Kr.removeNamiProfile(),this}},{key:"load",value:function(){var e=Kr.getNamiProfile();e&&(this.externalId=e.externalId),Xh.setIsLoggedIn(!!this.externalId)}},{key:"login",value:function(e){var t;return S((function(n){for(;;)switch(n.n){case 0:return n.n=1,r(Ns.instance.login(e));case 1:(t=n.v).external_id&&Xh.setIsLoggedIn(!0),this.setExternalId(t.external_id).save();case 2:return n.a(2)}}),null,this,null,Promise)}},{key:"logout",value:function(){return S((function(e){for(;;)switch(e.n){case 0:return e.n=1,r(Ns.instance.logout());case 1:Xh.setIsLoggedIn(!1),this.setExternalId(void 0).save();case 2:return e.a(2)}}),null,this,null,Promise)}}])}();Lm.instance=new Lm,function(e){e.LOGIN="login",e.LOGOUT="logout",e.ADVERTISING_ID_SET="advertising_id_set",e.ADVERTISING_ID_CLEARED="advertising_id_cleared",e.VENDOR_ID_SET="vendor_id_set",e.VENDOR_ID_CLEARED="vendor_id_cleared",e.CUSTOMER_DATA_PLATFORM_ID_SET="customer_data_platform_id_set",e.CUSTOMER_DATA_PLATFORM_ID_CLEARED="customer_data_platform_id_cleared",e.ANONYMOUS_MODE_ON="anonymous_mode_on",e.ANONYMOUS_MODE_OFF="anonymous_mode_off",e.NAMI_DEVICE_ID_SET="nami_device_id_set",e.NAMI_DEVICE_ID_CLEARED="nami_device_id_cleared"}(Tm||(Tm={}));var Fm=function(){return c((function e(){s(this,e),this.emitter=ju.getInstance(),wm.shared.registerNamespaceResolver("UserTags",(t=>{var n=t.replace("UserTags.",""),a=e.getCustomerAttribute(n);if(null!=a){var i=a.toLowerCase();return"true"===i||"false"===i?"true"===i:isNaN(Number(a))?a:parseInt(a,10)}return null}))}),[{key:"isSDKInitialized",get:function(){return dc.instance.isInitialized}}],[{key:"isLoggedIn",value:function(){return Lm.instance.isLoggedIn()}},{key:"loggedInId",value:function(){return this.instance.isSDKInitialized||Wn.debug(ke),Lm.instance.getExternalId()}},{key:"login",value:function(e){var t,n,a,i,o,s,u;return S((function(l){for(;;)switch(l.p=l.n){case 0:if(this.instance.isSDKInitialized){l.n=1;break}throw t=new Qr,this.invokeStateHandler(Tm.LOGIN,!1,t),t;case 1:if(!this.inAnonymousMode()){l.n=2;break}throw n=new oo,this.invokeStateHandler(Tm.LOGIN,!1,n),n;case 2:return l.p=2,l.n=3,r(Lm.instance.login(e));case 3:return l.n=4,r(Qh.instance.fetchActiveEntitlements());case 4:this.invokeStateHandler(Tm.LOGIN,!0),Nm.instance.flowOpen&&(a=Nm.instance.currentFlow,(i=null==a?void 0:a.currentFlowStep)&&a.executeLifecycle(i,am)),l.n=6;break;case 5:throw l.p=5,u=l.v,this.invokeStateHandler(Tm.LOGIN,!1,u),Nm.instance.flowOpen&&(o=Nm.instance.currentFlow,(s=null==o?void 0:o.currentFlowStep)&&o.executeLifecycle(s,im)),u;case 6:return l.a(2)}}),null,this,[[2,5]],Promise)}},{key:"logout",value:function(){var e,t,n,a,i,o,s;return S((function(u){for(;;)switch(u.p=u.n){case 0:if(this.instance.isSDKInitialized){u.n=1;break}throw e=new Qr,this.invokeStateHandler(Tm.LOGOUT,!1,e),e;case 1:if(!this.inAnonymousMode()){u.n=2;break}throw t=new oo,this.invokeStateHandler(Tm.LOGOUT,!1,t),t;case 2:return u.p=2,u.n=3,r(Lm.instance.logout());case 3:return u.n=4,r(Qh.instance.fetchActiveEntitlements());case 4:this.invokeStateHandler(Tm.LOGOUT,!0),Nm.instance.flowOpen&&(n=Nm.instance.currentFlow,(a=null==n?void 0:n.currentFlowStep)&&n.executeLifecycle(a,rm)),u.n=6;break;case 5:throw u.p=5,s=u.v,this.invokeStateHandler(Tm.LOGOUT,!1,s),Nm.instance.flowOpen&&(i=Nm.instance.currentFlow,(o=null==i?void 0:i.currentFlowStep)&&i.executeLifecycle(o,om)),s;case 6:return u.a(2)}}),null,this,[[2,5]],Promise)}},{key:"setCustomerDataPlatformId",value:function(e){return S((function(t){for(;;)switch(t.n){case 0:return t.n=1,r(this.updateCustomerDataPlatformId(e));case 1:return t.a(2)}}),null,this,null,Promise)}},{key:"clearCustomerDataPlatformId",value:function(){return S((function(e){for(;;)switch(e.n){case 0:return e.n=1,r(this.updateCustomerDataPlatformId(null));case 1:return e.a(2)}}),null,this,null,Promise)}},{key:"registerAccountStateHandler",value:function(e){return this.instance.emitter.on("accountStateChange",e),()=>{this.instance.emitter.off("accountStateChange",e)}}},{key:"setAnonymousMode",value:function(e){var t,n,a,i,o;return S((function(s){for(;;)switch(s.n){case 0:if(t=e?Tm.ANONYMOUS_MODE_ON:Tm.ANONYMOUS_MODE_OFF,this.instance.isSDKInitialized){s.n=1;break}throw n=new Qr,this.invokeStateHandler(t,!1,n),n;case 1:if(this.anonymousModeCapability()){s.n=2;break}return Wn.warn("Anonymous mode feature is not enabled for your Nami account. Contact support@nami.ml for details."),s.a(2);case 2:if(this.inAnonymousMode()!==e){s.n=3;break}return a=e?new io:new ro,this.invokeStateHandler(t,!1,a),s.a(2);case 3:if(!e){s.n=4;break}Kr.setAnonymousMode(e),Kr.resetDevice(),this.refetchConfig(),this.invokeStateHandler(Tm.ANONYMOUS_MODE_ON,!0),s.n=6;break;case 4:return Kr.clearAnonymousMode(),o=null===(i=Kr.getNamiConfig())||void 0===i?void 0:i.namiCommands,s.n=5,r(Bu.instance.createOrUpdateDevice(su(o)));case 5:Kr.clearAnonymousUUID(),this.refetchConfig(),this.invokeStateHandler(Tm.ANONYMOUS_MODE_OFF,!0);case 6:return s.a(2)}}),null,this,null,Promise)}},{key:"inAnonymousMode",value:function(){return!!this.instance.isSDKInitialized&&Xu()}},{key:"setCustomerAttribute",value:function(e,t){if(!this.instance.isSDKInitialized)throw new Qr;if(Kr.setCustomerAttribute(e,t),Cs(le.PAYWALL_PERSONALIZATION)?(Xh.setCustomerAttribute({[e]:t}),Wn.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${e}`)):Wn.warn(`The customer attribute ${e} is not available for using on a paywall, because your account's plan does not include paywall personalization. Contact support@nami.ml for details.`),Nm.instance.flowOpen){var n=Nm.instance.currentFlow;if(n){var a=n.currentFlowStep;a&&n.executeLifecycle(a,lm)}}}},{key:"getCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new Qr;var t=Kr.getCustomerAttribute(e);return null!=t?Cs(le.PAYWALL_PERSONALIZATION)?Wn.debug(`Found customer attribute. ${e} is available for paywall personalization on this device.`):Wn.warn(`Found customer attribute. ${e} is not available for use on a paywall because paywall personalization is not included in your account's plan. Contact support@nami.ml for details.`):Wn.warn(`No ${e} customer attribute found.`),t}},{key:"getAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new Qr;return Kr.getAllCustomerAttributes()}},{key:"clearCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new Qr;Kr.clearCustomerAttribute(e)?(Xh.removeCustomerAttribute(e),Wn.warn(`This customer attribute has been cleared. ${e} is no longer available for paywall personalization on this device. A default value will be used if set in the Nami Control Center.`)):Wn.warn(`No value to clear for attribute ${e}.`)}},{key:"clearAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new Qr;Kr.getAllCustomerAttributesKeys().forEach((e=>{Xh.removeCustomerAttribute(e)})),Kr.clearAllCustomerAttributes(),Wn.warn("All customer attribute have been cleared. customer's smart text will no longer be personalized for this device. A default value will be used if set in the Nami Control Center.")}},{key:"journeyState",value:function(){if(!this.instance.isSDKInitialized)throw new Qr;return Kr.getCustomerJourneyState()}},{key:"deviceId",value:function(){var e,t;return this.instance.isSDKInitialized&&null!==(e=null===(t=Kr.getDevice())||void 0===t?void 0:t.id)&&void 0!==e?e:Le}},{key:"registerJourneyStateHandler",value:function(e){if(Is("NamiCustomerManager.registerJourneyStateHandler"))return this.instance.emitter.addListener(Pn,e),()=>{this.instance.emitter.removeListener(Pn,e)}}},{key:"invokeStateHandler",value:function(e,t,n){this.instance.emitter.emit("accountStateChange",e,t,n)}},{key:"updateCustomerDataPlatformId",value:function(e){var t,n,a,i;return S((function(o){for(;;)switch(o.p=o.n){case 0:if(this.instance.isSDKInitialized){o.n=1;break}throw t=new Qr,this.invokeStateHandler(Tm.CUSTOMER_DATA_PLATFORM_ID_SET,!1,t),t;case 1:if(this.inAnonymousMode()){o.n=6;break}return o.p=2,o.n=3,r(Bu.instance.updateDeviceField("customer_data_platform_id",e));case 3:this.invokeStateHandler(Tm.CUSTOMER_DATA_PLATFORM_ID_SET,!0),o.n=5;break;case 4:o.p=4,i=o.v,this.invokeStateHandler(Tm.CUSTOMER_DATA_PLATFORM_ID_SET,!1,i);case 5:o.n=7;break;case 6:return Wn.info("Unable to set CDP ID in anonymous mode",{deviceId:null===(n=Kr.getDevice())||void 0===n?void 0:n.id,anonymousMode:!0}),a=new so,this.invokeStateHandler(Tm.CUSTOMER_DATA_PLATFORM_ID_SET,!1,a),o.a(2);case 7:return o.a(2)}}),null,this,[[2,4]],Promise)}},{key:"anonymousModeCapability",value:function(){if(!this.instance.isSDKInitialized)return!1;var e=Cs(le.ANONYMOUS_MODE_CAPABILITY),t=Cs(le.THIRD_PARTY_TRANSACTIONS);return e&&t}},{key:"refetchConfig",value:function(){return S((function(e){for(;;)switch(e.n){case 0:if(!this.instance.isSDKInitialized){e.n=1;break}return e.n=1,r(Promise.all([Hu.instance.fetchProducts(),Uu.instance.fetchPaywalls().then((e=>$u.instance.fetchCampaignRules(e)))]));case 1:return e.a(2)}}),null,this,null,Promise)}}])}();Fm.instance=new Fm;var Rm=function(){return c((function e(t={}){var n,a,i,r,o;s(this,e),this.id=null!==(n=t.id)&&void 0!==n?n:"",this.name=null!==(a=t.name)&&void 0!==a?a:"",this.steps=null!==(i=t.steps)&&void 0!==i?i:[],this.screens=null!==(r=t.screens)&&void 0!==r?r:[],this.resumeFromBookmark=Boolean(t.resume_from_bookmark),this.transition=null!==(o=t.transition)&&void 0!==o?o:"none"}),[{key:"allScreensAvailable",get:function(){return this.screens.length>0&&Hs(this.screens)}}])}(),Wm=function(){function e(t,n,a,i){var r,u;s(this,e),(u=o(this,e,[null!==(r=t.flow.object)&&void 0!==r?r:{}])).stepcrumbs=[],u.branchcrumbs=[],u.activeHandoffSequence=null,u.currentScreenState=null,u.isPaused=!1,u.timerStates={},u.campaign=t,u.component=n,u.context=i,u.manager=a,u.branchcrumbs=[],u.stepcrumbs=[],u.registerResolvers(i);var l=u.findStepByType(Xc);return l&&u.forward(l.id),u}return g(e,Rm),c(e,[{key:"registerResolvers",value:function(e){e&&new Sm(e),new Em,new xm,new Cm,new Im(this.campaign),wm.shared.registerNamespaceResolver("Flow",(e=>{switch(e){case"Flow.stepcrumbs":return this.stepcrumbs.map((e=>e.id));case"Flow.branchcrumbs":return this.branchcrumbs;default:return}}))}},{key:"currentFlowStep",get:function(){return this.stepcrumbs.at(-1)}},{key:"nextStepAvailable",get:function(){return void 0!==this.nextFlowStep}},{key:"previousStepAvailable",get:function(){var e,t=!!this.previousFlowStep,n=!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to),a=this.stepcrumbs.slice(0,-1).some((e=>"screen"===e.type));return t&&n&&a}},{key:"previousFlowStep",get:function(){var e=this.stepcrumbs.length-2;return e>=0?this.stepcrumbs[e]:void 0}},{key:"nextFlowStep",get:function(){return this.nextStep(this.currentFlowStep)}},{key:"getStep",value:function(e){return this.steps.find((t=>t.id===e))}},{key:"findStepByType",value:function(e){return this.steps.find((t=>t.type===e))}},{key:"isStepActive",value:function(e){return!e.branch_tags||!e.branch_tags.length||e.branch_tags.some((e=>this.branchcrumbs.includes(e)))}},{key:"finished",value:function(){this.manager.finishFlow()}},{key:"back",value:function(){this.previousStepAvailable?this.backToPreviousScreenStep():Wn.debug("No previous step available")}},{key:"next",value:function(){var e=this.nextFlowStep;e&&this.forward(e.id)}},{key:"backToPreviousScreenStep",value:function(){var e;if(!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to)){for(var t=this.stepcrumbs.length-2;t>=0;t--){var n=this.stepcrumbs[t];if(this.stepcrumbs.pop(),"branch"===n.type&&this.branchcrumbs.length>0&&this.branchcrumbs.pop(),"screen"===n.type&&n.screen){var a,i,r=Bs(n.screen);return r&&this.component.flowNavigateToScreen(r,{transition:this.transition,direction:"backward"}),void(this.currentScreenState=null!==(a=null===(i=Xh.currentProvider)||void 0===i?void 0:i.state)&&void 0!==a?a:null)}}Wn.warn("No previous screen step found to return to")}else Wn.warn(`Not allowed to go back to ${this.previousFlowStep.id}`)}},{key:"forward",value:function(e){var t=this.getStep(e);if(t){if(this.isStepActive(t))switch(t.type){case Xc:case qc:return this.stepcrumbs.push(t),void this.executeLifecycle(t,em);case Yc:return void this.handleBranchStep(t);case Kc:return void this.handleScreenStep(t);case Jc:return}}else Wn.error(`No step found with id: ${e}`)}},{key:"pause",value:function(){var e;this.isPaused?Wn.info("Flow is already paused"):(this.isPaused=!0,this.pausedStepID=null===(e=this.currentFlowStep)||void 0===e?void 0:e.id,Wn.info("Flow paused"))}},{key:"resumeFromPause",value:function(){if(this.isPaused)if(this.isPaused=!1,this.pausedStepID){var e=this.pausedStepID;this.pausedStepID=void 0,Wn.info(`Flow resumed from step ${e}`),this.forward(e)}else Wn.warn("No step to resume from");else Wn.info("Flow is not paused")}},{key:"executeLifecycle",value:function(e,t,n){var a=e.actions[t];a&&this.executeFullLifecycles(a,n)}},{key:"lifecycles",value:function(e){if(this.currentFlowStep){var t=this.currentFlowStep.actions[e];if(t)return t;Wn.info(`No actions found for button ${e} on step ${this.currentFlowStep.id}`)}}},{key:"triggerActions",value:function(e,t,n){var a=this.lifecycles(e);a&&(this.currentButton=t,this.executeFullLifecycles(a,n))}},{key:"executeFullLifecycles",value:function(e,t){for(var n,a=m(e);!(n=a()).done;){var i=n.value;[i.before,i.action,i.after].forEach((e=>null==e?void 0:e.forEach((e=>this.shouldRun(e)&&this.performAction(e,t)))))}}},{key:"triggerBeforeActions",value:function(e,t,n){var a=this.lifecycles(e);if(a){this.currentButton=t;for(var i,r=m(a);!(i=r()).done;){var o;null===(o=i.value.before)||void 0===o||o.forEach((e=>this.shouldRun(e)&&this.performAction(e,n)))}}}},{key:"triggerAfterActions",value:function(e,t,n){var a=this.lifecycles(e);if(a){this.currentButton=t;for(var i,r=m(a);!(i=r()).done;){var o;null===(o=i.value.after)||void 0===o||o.forEach((e=>this.shouldRun(e)&&this.performAction(e,n)))}}}},{key:"currentStepHasHoistedPrimaryActions",value:function(e){var t=this.lifecycles(e);return!!t&&t.some((e=>{var t;return null===(t=e.action)||void 0===t?void 0:t.length}))}},{key:"shouldRun",value:function(e){return!e.conditions||e.conditions.every((e=>wm.shared.evaluate(e)))}},{key:"performAction",value:function(e,t){var n;if(this.currentFlowStep){var a=(null!==(n=e.parameters)&&void 0!==n&&n.delay?+e.parameters.delay:0)||0,i=n=>{var a,i,r,o,s,u,l;if((null===(a=this.currentFlowStep)||void 0===a?void 0:a.id)===n)switch(e.function){case Vc.BACK:this.back();break;case Vc.NEXT:null!==(i=e.parameters)&&void 0!==i&&i.step?this.forward(e.parameters.step):this.next();break;case Vc.NAVIGATE:var d;if(null!==(r=e.parameters)&&void 0!==r&&r.step)(null===(d=this.previousFlowStep)||void 0===d?void 0:d.id)===e.parameters.step?this.back():this.forward(e.parameters.step);else this.next();break;case Vc.FINISHED:case Vc.DISMISS:this.finished();break;case Vc.EXIT:var h=this.steps.find((e=>e.type===qc));h&&this.forward(h.id);break;case Vc.PAUSE:this.pause();break;case Vc.RESUME:this.resumeFromPause();break;case Vc.HANDOFF:if(null!==(o=e.parameters)&&void 0!==o&&o.handoffTag)if(this.manager.handoffStepHandler)if(e.parameters.handoffData)Wn.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(e.parameters.handoffData)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,e.parameters.handoffData);else if(t)Wn.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(t)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,t);else if(e.parameters.handoffFormId){var c=this.getFormData();e.parameters.handoffTag===Qc?this.flowHandoffFormSequence():this.manager.handoffStepHandler(e.parameters.handoffTag,c)}else Wn.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} and no data`),this.manager.handoffStepHandler(e.parameters.handoffTag);else Wn.debug("No handoffStepHandler found",e);break;case Vc.LOG:var m;if(null!==(s=e.parameters)&&void 0!==s&&s.eventName)Wn.info(`logEvent → ${e.parameters.eventName}`);else Wn.warn(`Missing 'eventName' in logEvent action ${null!==(m=e.id)&&void 0!==m?m:"unknown"}`);break;case Vc.TRACK:var f;if(null!==(u=e.parameters)&&void 0!==u&&u.eventName)Wn.info(`trackEvent → ${e.parameters.eventName}`);else Wn.warn(`Missing 'eventName' in logEvent action ${null!==(f=e.id)&&void 0!==f?f:"unknown"}`);break;case Vc.SET_VIDEO:null!==(l=e.parameters)&&void 0!==l&&l.name&&e.parameters.url?Xh.setAppSuppliedVideoDetails({name:e.parameters.name,url:e.parameters.url}):Wn.warn("Missing name, url for setting video details");break;case Vc.BLOCK_BACK:var v,p=null===(v=e.parameters)||void 0===v?void 0:v.step,g=p?this.getStep(p):void 0;g?g.allow_back_to=!1:this.currentFlowStep?this.currentFlowStep.allow_back_to=!1:Wn.warn("Missing step for blocking back");break;case Vc.FLOW_EVENT:var y,b=new Am(this.manager),w=Object.fromEntries(Object.entries(null!==(y=e.parameters)&&void 0!==y?y:{}).map((([e,t])=>[e,b.interpolateDeep(t)])));this.manager.eventHandler?this.manager.eventHandler(w):Wn.warn("Missing event handler",w);break;case Vc.FLOW_ENABLED:Xh.setUserInteractionEnabled(!0);break;case Vc.FLOW_DISABLED:Xh.setUserInteractionEnabled(!1);break;case Vc.SET_TAGS:e.parameters&&(Xh.setUserTags(e.parameters),Object.entries(e.parameters).forEach((([e,t])=>{Fm.setCustomerAttribute(e,t)})));break;default:Wn.warn(`Missing action handler for ${e.function}`,e)}else Wn.debug(`Skipped action for stale flow step ${n}`)};a?setTimeout(i.bind(this,this.currentFlowStep.id),a):i(this.currentFlowStep.id)}else Wn.warn("No current flow step")}},{key:"nextStep",value:function(e){if(e){var t=this.steps.findIndex((t=>t.id===e.id));if(-1!==t){for(var n,a=m(this.steps.slice(t+1));!(n=a()).done;){var i=n.value;if(this.isStepActive(i))return i}Wn.debug(`No active next step found after ${e.id}`)}else Wn.error(`Could not find next step for step ${e.id}`)}else Wn.error("Next step not found")}},{key:"handleScreenStep",value:function(e){var t,n=Bs(null!==(t=e.screen)&&void 0!==t?t:"");e.screen&&n&&this.campaign?(this.stepcrumbs.push(e),this.component.flowNavigateToScreen(n,{transition:this.transition,direction:"forward"})):Wn.error("No paywall or campaign found for next step")}},{key:"handleBranchStep",value:function(e){this.stepcrumbs.push(e);for(var t=0,n=Object.entries(e.actions);t<n.length;t++){var a=n[t],i=a[0],r=a[1];if(r)for(var o,s=m(r);!(o=s()).done;){var u=o.value;if(u.action)for(var l,d=m(u.action);!(l=d()).done;){var h,c,f=l.value;if(this.shouldRun(f))return this.branchcrumbs.push(i),null===(h=u.before)||void 0===h||h.forEach((e=>{this.performAction(e)})),u.action.forEach((e=>{this.shouldRun(e)&&this.performAction(e)})),void(null===(c=u.after)||void 0===c||c.forEach((e=>{this.performAction(e)})))}else Wn.warn(`No actions defined for branch tag ${i}`)}}Wn.warn(`No matching branch condition matched for step ${e.id}`)}},{key:"getFormData",value:function(){var e,t;return f({},null!==(e=null===(t=Xh.currentProvider)||void 0===t||null===(t=t.state)||void 0===t?void 0:t.formStates)&&void 0!==e?e:{})}},{key:"flowHandoffFormSequence",value:function(){var e,t=null===(e=this.currentScreenState)||void 0===e?void 0:e.formStates;if(t){var n=Object.keys(t).sort();if(0!==n.length){var a=n.filter((e=>!0===t[e]));if(0===a.length)return Wn.info("No eligible handoff keys after filtering"),void this.manager.resume();this.activeHandoffSequence={formStates:f({},t),remainingKeys:[...a]},this.resumeNextHandoff()}else Wn.warn("formStates is empty, no handoffs to perform")}else Wn.warn("No formStates available for handoff sequence")}},{key:"resumeNextHandoff",value:function(){var e,t,n=this.activeHandoffSequence;if(!n)return Wn.warn("No active handoff sequence to resume"),void this.manager.resume();if(0===n.remainingKeys.length)return Wn.info("All handoffs in the sequence are complete"),this.activeHandoffSequence=null,void this.manager.resume();var a=n.remainingKeys.shift(),i=n.formStates[a];Wn.debug(`Starting handoff for ${a} → ${String(i)}`),this.activeHandoffSequence=n;var r=`${a}`;null===(e=(t=this.manager).handoffStepHandler)||void 0===e||e.call(t,r,void 0)}}])}(),Nm=function(){function e(){s(this,e),this.flowOpen=!1,this.lastAnimatedFlowProgress=new Map,this.navGraphCache=new WeakMap}return c(e,[{key:"resume",value:function(){e.resume()}},{key:"presentFlow",value:function(e,t,n){var a=new Wm(e,t,this,n);return this.flowOpen=!0,this.currentFlow=a,a}},{key:"finishFlow",value:function(){this.flowOpen=!1,this.currentFlow=void 0,this.lastAnimatedFlowProgress.clear()}},{key:"getLastAnimatedFlowProgress",value:function(e){var t;return null!==(t=this.lastAnimatedFlowProgress.get(e))&&void 0!==t?t:0}},{key:"setLastAnimatedFlowProgress",value:function(e,t){this.currentFlow&&this.lastAnimatedFlowProgress.set(e,t)}},{key:"getCurrentFlowProgress",value:function(e){if(!this.currentFlow)return 1;if(!this.currentFlow.currentFlowStep)return 0;var t=this.currentFlow.steps.filter((e=>e.type===Kc));if(0===t.length)return 0;var n=this.currentFlow.stepcrumbs.filter((e=>e.type===Kc));if(0===n.length)return 0;var a=this.buildNavGraph(this.currentFlow),i=this.currentFlow.currentFlowStep,r=this.findBranchPoint(t,a),o=0;if(r)o=this.calculateBranchingProgress(n,t,i,r,a);else{var s=t.findIndex((e=>e.id===i.id));o=s>=0?(s+1)/t.length:0}return o=Math.max(0,Math.min(1,o)),e&&this.setLastAnimatedFlowProgress(e,o),o}},{key:"findBranchPoint",value:function(e,t){for(var n,a=m(e);!(n=a()).done;){var i=n.value;if(this.hasBranching(i,e,t))return i}return null}},{key:"calculateBranchingProgress",value:function(e,t,n,a,i){var r=e.length,o=t.findIndex((e=>e.id===a.id)),s=e.findIndex((e=>e.id===a.id)),u=t.findIndex((e=>e.id===n.id));if(-1===s||n.id===a.id)return(u+1)/(o+2);var l=this.countForwardScreens(n,t,i),d=r+l;return Wn.debug(`Branching progress: visited=${r}, remaining=${l}, total=${d}, step=${n.id}`),r/d}},{key:"countForwardScreens",value:function(e,t,n){var a=t.findIndex((t=>t.id===e.id));if(-1===a)return 0;var i=new Set,r=0,o=(e,s)=>{if(!i.has(e)){i.add(e);var u=(n.get(e)||[]).filter((e=>{var n=t.findIndex((t=>t.id===e));return n>a}));if(0!==u.length)for(var l,d=m(u);!(l=d()).done;){var h=l.value;o(h,s+1)}else r=Math.max(r,s)}};return o(e.id,0),r}},{key:"hasBranching",value:function(e,t,n){var a=t.findIndex((t=>t.id===e.id));if(-1===a)return!1;var i=(n.get(e.id)||[]).filter((e=>{var n=t.findIndex((t=>t.id===e));return n>a}));return i.length>1}},{key:"buildNavGraph",value:function(e){var t=this.navGraphCache.get(e);if(t)return t;var n=new Map;e.steps.forEach((e=>{e.actions&&Object.values(e.actions).forEach((t=>{Array.isArray(t)&&t.forEach((t=>{t.action&&t.action.forEach((t=>{if("flowNav"===t.function){var a,i=null===(a=t.parameters)||void 0===a?void 0:a.step;i&&(n.has(e.id)||n.set(e.id,new Set),n.get(e.id).add(i))}}))}))}))}));var a=new Map;return n.forEach(((e,t)=>{a.set(t,Array.from(e))})),this.navGraphCache.set(e,a),a}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){var e,t,n=null===(e=this.currentFlow)||void 0===e?void 0:e.currentFlowStep;if(!n)return null;var a=null===(t=n.actions)||void 0===t?void 0:t[tm];if(!a)return null;for(var i,r=m(a);!(i=r()).done;)for(var o,s,u=m(null!==(o=i.value.action)&&void 0!==o?o:[]);!(s=u()).done;){var l,d=s.value;if((d.function===Vc.NAVIGATE||d.function===Vc.NEXT)&&null!=(null===(l=d.parameters)||void 0===l?void 0:l.delay)){var h=d.parameters.delay,c=Number(h);if(!isNaN(c)&&c>0)return c/1e3}}return null}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"registerStepHandoff",value:function(e){this.instance.handoffStepHandler=e}},{key:"registerEventHandler",value:function(e){this.instance.eventHandler=e}},{key:"resume",value:function(){var t=e.instance,n=t.flowOpen,a=t.currentFlow;if(n&&a&&a.currentFlowStep){if(a.activeHandoffSequence)return Wn.debug(`Resuming flow at handoff sequence ${a.currentFlowStep.id}`),void a.resumeNextHandoff();Wn.debug(`Resuming flow at step ${a.currentFlowStep.id}`),a.executeLifecycle(a.currentFlowStep,"__resume__")}else Wn.warn("Cannot resume: no active flow or current step")}},{key:"finish",value:function(){var t=e.instance,n=t.flowOpen,a=t.currentFlow;n&&a&&a.currentFlowStep?(Wn.debug(`Finishing flow programmatically at step ${a.currentFlowStep.id}`),a.finished()):Wn.debug("Cannot finish: no active flow or current step")}},{key:"pause",value:function(){var t=e.instance,n=t.flowOpen,a=t.currentFlow;n&&a&&a.currentFlowStep?!0===a.resumeFromBookmark?a.pause():Wn.warn("This flow cannot be paused"):Wn.warn("Cannot pause: no active flow or current step")}},{key:"isFlowOpen",value:function(){return e.instance.flowOpen}},{key:"getLastAnimatedFlowProgress",value:function(e){return this.instance.getLastAnimatedFlowProgress(e)}},{key:"setLastAnimatedFlowProgress",value:function(e,t){this.instance.setLastAnimatedFlowProgress(e,t)}},{key:"getCurrentFlowProgress",value:function(e){return this.instance.getCurrentFlowProgress(e)}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){return this.instance.getCurrentFlowStepAutoAdvanceDelay()}}])}();var Om=e=>{var t;return S((function(n){for(;;)if(0===n.n)return t=new Set(Array.from(document.fonts.values()).map((e=>e.family))),e.forEach((e=>{var n=jm(e);if(!t.has(n)){var a=new FontFace(n,`url(${e.file})`);document.fonts.add(a)}})),n.a(2,document.fonts.ready.then())}),null,null,null,Promise)};function jm(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function $m(e,t,n){var a,i,r,o,s,u,l,d;if("undefined"==typeof window||!e||!t)return Wn.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var h={minDistance:null!==(a=null==n?void 0:n.minDistance)&&void 0!==a?a:30,maxDuration:null!==(i=null==n?void 0:n.maxDuration)&&void 0!==i?i:600,lockAxis:null===(r=null==n?void 0:n.lockAxis)||void 0===r||r,preventScrollOnSwipe:null!==(o=null==n?void 0:n.preventScrollOnSwipe)&&void 0!==o&&o,pointerTypes:null!==(s=null==n?void 0:n.pointerTypes)&&void 0!==s?s:["touch"],passiveListeners:null===(u=null==n?void 0:n.passiveListeners)||void 0===u||u,axisHint:null!==(l=null==n?void 0:n.axisHint)&&void 0!==l?l:"y",edgeLeakThreshold:null!==(d=null==n?void 0:n.edgeLeakThreshold)&&void 0!==d?d:24},c=e.style.touchAction;h.preventScrollOnSwipe&&(e.style.touchAction="none");var m=null,f=0,v=0,p=0,g=0,y=0,b=null,w=null,k=!1,S=!1,E=!1,M=e=>{try{var t=window.getComputedStyle(e);if(!t)return!1;var n=t.overflowY;if("auto"!==n&&"scroll"!==n)return!1;var a=e;return a.scrollHeight>a.clientHeight}catch(e){return!1}},P=e=>h.pointerTypes.includes(e.pointerType),T=t=>{var n=t.composedPath?t.composedPath()[0]:t.target;if(P(t)&&null===m){m=t.pointerId,f=p=t.clientX,v=g=t.clientY,y=performance.now(),b=null,E=!1,k=!1,S=!1,(w="y"===h.axisHint?((e,t)=>{for(var n=e;n&&n!==t&&n instanceof HTMLElement;){var a,i;if(M(n))return n;n=n.parentElement||(null!==(a=null===(i=n.parentNode)||void 0===i?void 0:i.host)&&void 0!==a?a:null)}return null})(n,e):null)||(S=!0);try{var a;null==e||null===(a=e.setPointerCapture)||void 0===a||a.call(e,t.pointerId)}catch(e){try{var i;null==n||null===(i=n.setPointerCapture)||void 0===i||i.call(n,t.pointerId)}catch(e){}}}},_=e=>{if(e.pointerId===m&&P(e)){if(p=e.clientX,g=e.clientY,h.lockAxis&&!b){var n=Math.abs(p-f),a=Math.abs(g-v);(n>2||a>2)&&(b=a>=n?"y":"x")}if("y"===h.axisHint&&("y"===b||!h.lockAxis)){var i=g-v,r=i<0?"up":"down",o=Math.abs(i),s=performance.now()-y,u=o/Math.max(s,1),l=o>=h.minDistance||u>.5;if(w)if(l)S=!0;else if(((e,t)=>!!e&&("down"===t?e.scrollTop>0:e.scrollTop+e.clientHeight<e.scrollHeight-1))(w,r)){if(!(("down"===r&&w.scrollTop<=50||"up"===r&&w.scrollTop+w.clientHeight>=w.scrollHeight-50)&&u>.3))return void(k=!0);S=!0}else S=!0;var d=!w||o>=h.edgeLeakThreshold;if(!E&&!k&&S&&d&&o>=h.minDistance){E=!0;var c=performance.now(),M={direction:"up"===r?"up":"down",distanceX:p-f,distanceY:i,absX:Math.abs(p-f),absY:o,duration:c-y,velocity:o/Math.max(c-y,1),startX:f,startY:v,endX:p,endY:g,startedAt:y,endedAt:c,originalEvent:e};t(M)}}}},D=e=>{if(e.pointerId===m)if(P(e))if(w)A();else if(E||k)A();else{var n,a=performance.now(),i=a-y,r=p-f,o=g-v,s=Math.abs(r),u=Math.abs(o),l="x"===(n=h.lockAxis&&b?b:"x"===h.axisHint?"x":"y"===h.axisHint?"y":s>=u?"x":"y")?s:u,d=i<=h.maxDuration,c=h.minDistance;if(w&&"y"===n&&S&&(c+=h.edgeLeakThreshold),d&&l>=c){var M;M="x"===n?r>0?"right":"left":o>0?"down":"up";var T=l/Math.max(i,1);t({direction:M,distanceX:r,distanceY:o,absX:s,absY:u,duration:i,velocity:T,startX:f,startY:v,endX:p,endY:g,startedAt:y,endedAt:a,originalEvent:e})}A()}else A()},A=()=>{m=null,b=null,y=0,w=null,S=!1,k=!1,E=!1},x=!!h.passiveListeners&&{passive:!0},C=h.passiveListeners?{passive:!0,capture:!0}:{capture:!0};e.addEventListener("pointerdown",T,C),e.addEventListener("pointermove",_,x),e.addEventListener("pointerup",D,x),e.addEventListener("pointercancel",D,x),e.addEventListener("lostpointercapture",D,x);return{destroy:()=>{e.removeEventListener("pointerdown",T,C),e.removeEventListener("pointermove",_,x),e.removeEventListener("pointerup",D,x),e.removeEventListener("pointercancel",D,x),e.removeEventListener("lostpointercapture",D,x),h.preventScrollOnSwipe&&(e.style.touchAction=c),A()},updateOptions:t=>{Object.assign(h,t),"boolean"==typeof t.preventScrollOnSwipe&&(t.preventScrollOnSwipe?e.style.touchAction="none":e.style.touchAction=c)}}}var zm,Bm,Hm,Um,Gm,Vm,Xm,Km,Ym,qm,Jm,Qm=e=>e,Zm=function(){function n(e,t,a){var i;return s(this,n),(i=o(this,n)).pages=[],i.currentOffset=0,i.presentationStyle="fullscreen",i.formFactor=uu(),i.timeSpentOnPaywall=0,i.animation={transition:"none",direction:"forward"},i._originalBodyStyles={},i._originalDocumentStyles={},i._savedScrollY=0,i._sheetDragStartY=0,i._sheetIsDragging=!1,i._dismissThreshold=100,i.type=e,i.value=t,i.context=a,i.setPaywallData(),w(i,i)}return g(n,e.LitElement),c(n,[{key:"setPaywallData",value:function(){var e=Pu(this.value,this.type);this.paywall=e.paywall,this.campaign=e.campaign}},{key:"getPresentationStyle",value:function(e){var t,n,a=null==e||null===(t=e.template)||void 0===t||null===(t=t.initialState)||void 0===t?void 0:t.presentation_style;return(n=a)&&cc.has(n)?"sheet"===n?"fullscreen":n:"fullscreen"}},{key:"isHalfSheet",get:function(){return"compact_sheet"===this.presentationStyle}},{key:"connectedCallback",value:function(){var e;T(n,"connectedCallback",this)([]),null!==(e=window.TVJS)&&void 0!==e&&e.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),document.addEventListener("keydown",this.handleKeyDownEvent.bind(this)),this._swipeHandler=$m(this,this.handleSwipeEvent.bind(this),{axisHint:"y",lockAxis:!0,minDistance:25,edgeLeakThreshold:15,preventScrollOnSwipe:!1,pointerTypes:["touch"]}),this.presentationStyle=this.getPresentationStyle(this.paywall),this.setOriginalStyles()}},{key:"disconnectedCallback",value:function(){var e,t;T(n,"disconnectedCallback",this)([]),Kr.clearLaunchId(),null!==(e=window.TVJS)&&void 0!==e&&e.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this.handleKeyDownEvent.bind(this)),ju.getInstance().removeAllListeners(kn),this.restoreStyles(),null===(t=this._halfSheetAbortController)||void 0===t||t.abort(),this._swipeHandler.destroy()}},{key:"setOriginalStyles",value:function(){"television"===this.formFactor&&(this._originalBodyStyles.overflow=document.body.style.overflow,document.body.style.overflow="hidden"),this._originalBodyStyles.background=document.body.style.background,"phone"===this.formFactor&&(this._originalBodyStyles["overscroll-behavior"]=document.body.style.overscrollBehavior?document.body.style.overscrollBehavior:null,this._originalDocumentStyles["overscroll-behavior"]=document.documentElement.style.overscrollBehavior?document.documentElement.style.overscrollBehavior:null,document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none"),this.isHalfSheet&&(this._savedScrollY=window.scrollY,this._originalBodyStyles.position=document.body.style.position||null,this._originalBodyStyles.top=document.body.style.top||null,this._originalBodyStyles.width=document.body.style.width||null,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%")}},{key:"restoreStyles",value:function(){Object.entries(this._originalBodyStyles).forEach((([e,t])=>{null!==t?document.body.style.setProperty(e,t):document.body.style.removeProperty(e)})),Object.entries(this._originalDocumentStyles).forEach((([e,t])=>{null!==t?document.documentElement.style.setProperty(e,t):document.documentElement.style.removeProperty(e)})),this._savedScrollY>0&&(window.scrollTo(0,this._savedScrollY),this._savedScrollY=0)}},{key:"handleKeyDownEvent",value:function(e){!this.flow||10009!==e.keyCode&&"Backspace"!==e.key&&"GoBack"!==e.key||this.flow.triggerActions(um)}},{key:"handleSwipeEvent",value:function({direction:e}){var t;if("down"===e)null===(t=this.flow)||void 0===t||t.triggerActions("__swipe_down__");else if("up"===e){var n;null===(n=this.flow)||void 0===n||n.triggerActions("__swipe_up__")}}},{key:"setupHalfSheetDragTracking",value:function(){var e,t,n;null===(e=this._halfSheetAbortController)||void 0===e||e.abort(),this._halfSheetAbortController=new AbortController;var a=this._halfSheetAbortController.signal,i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"),r=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelector(".nami-half-sheet-content");if(i&&r){i.addEventListener("touchstart",(e=>{r.scrollTop>0||(this._sheetDragStartY=e.touches[0].clientY,this._sheetIsDragging=!0)}),{passive:!0,signal:a}),i.addEventListener("touchmove",(e=>{if(this._sheetIsDragging){var t=e.touches[0].clientY-this._sheetDragStartY;t>0&&(i.style.transform=`translateY(${t}px)`,i.style.transition="none",e.preventDefault())}}),{passive:!1,signal:a}),i.addEventListener("touchend",(()=>{if(this._sheetIsDragging){this._sheetIsDragging=!1;var e,t,n=i.style.transform.match(/translateY\((\d+(?:\.\d+)?)px\)/);if((n?parseFloat(n[1]):0)>this._dismissThreshold)if(null!==(e=null===(t=this.flow)||void 0===t?void 0:t.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==e&&e){var a;i.style.transform="translateY(0)",i.style.transition="transform 0.2s ease-out",null===(a=this.flow)||void 0===a||a.triggerActions("__swipe_down__")}else{var r;i.style.transform="translateY(100%)",i.style.transition="transform 0.2s ease-in";var o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(".nami-half-sheet-backdrop");o&&o.classList.add("nami-dismissing"),setTimeout((()=>{var e;null===(e=this.flow)||void 0===e||e.finished()}),200)}else i.style.transform="translateY(0)",i.style.transition="transform 0.2s ease-out"}}),{signal:a})}}},{key:"setupHalfSheetFocusTrap",value:function(){var e,t,n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".nami-half-sheet-container");if(n){n.focus();var a=null===(t=this._halfSheetAbortController)||void 0===t?void 0:t.signal;n.addEventListener("keydown",(e=>{if("Tab"===e.key){var t=n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0!==t.length){var a,i,r=t[0],o=t[t.length-1];if(e.shiftKey)document.activeElement!==r&&(null===(a=this.shadowRoot)||void 0===a?void 0:a.activeElement)!==r||(e.preventDefault(),o.focus());else document.activeElement!==o&&(null===(i=this.shadowRoot)||void 0===i?void 0:i.activeElement)!==o||(e.preventDefault(),r.focus())}}}),a?{signal:a}:void 0)}}},{key:"firstUpdated",value:function(){this.timeSpentOnPaywall=Date.now(),Os(this.campaign)&&(this.flow=Nm.instance.presentFlow(this.campaign,this,this.context)),this.isHalfSheet&&this.updateComplete.then((()=>{this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()}))}},{key:"updated",value:function(e){T(n,"updated",this)([e]),this.isHalfSheet&&e.has("presentationStyle")&&(this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap())}},{key:"getAnimationStyles",value:function(e){var t="backward"===this.animation.direction?-1:1;switch(this.animation.transition){case"verticalSlide":return`transform: translateY(${100*(e-this.currentOffset)*t}vh);`;case"slide":return`transform: translateX(${100*(e-this.currentOffset)*t}vw);`;case"fade":return`opacity: ${e===this.currentOffset?1:0};`;default:return""}}},{key:"updatePages",value:function(e){var t;return S((function(n){for(;;)switch(n.n){case 0:if(0!==this.pages.length&&"none"!==this.animation.transition){n.n=1;break}return this.pages=[e],n.a(2);case 1:if((null==(t=this.pages[this.pages.length-1])?void 0:t.id)!==e.id){n.n=2;break}return n.a(2);case 2:return this.pages=[t,e],this.currentOffset=0,n.n=3,r(this.updateComplete);case 3:requestAnimationFrame((()=>{this.currentOffset=1,setTimeout((()=>{this.pages=[e],this.currentOffset=0,this.paywall=e}),250)}));case 4:return n.a(2)}}),null,this,null,Promise)}},{key:"flowNavigateToScreen",value:function(e,t){var n,a,i,o;return S((function(s){for(;;)switch(s.n){case 0:if(null!==(n=this.flow)&&void 0!==n&&n.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,nm),i=this.presentationStyle,o=this.getPresentationStyle(e),"fullscreen"!==i||"compact_sheet"!==o){s.n=1;break}console.warn("Unsupported transition: fullscreen → compact_sheet. Presenting as fullscreen."),s.n=4;break;case 1:if("compact_sheet"!==i||"fullscreen"!==o&&"sheet"!==o){s.n=3;break}return s.n=2,r(this.animateHalfSheetExpand());case 2:this.presentationStyle="fullscreen",s.n=4;break;case 3:this.presentationStyle=o;case 4:return this.animation=t,s.n=5,r(this.updatePages(e));case 5:null!==(a=this.flow)&&void 0!==a&&a.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,tm);case 6:return s.a(2)}}),null,this,null,Promise)}},{key:"animateHalfSheetExpand",value:function(){var e,t;return S((function(n){for(;;)switch(n.n){case 0:if(t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".nami-half-sheet-container")){n.n=1;break}return n.a(2);case 1:return t.classList.add("nami-expanding"),n.n=2,r(new Promise((e=>setTimeout(e,300))));case 2:return n.a(2)}}),null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return Xh.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?e.html(zm||(zm=Qm``)):this.isHalfSheet?this.renderHalfSheet():e.html(Bm||(Bm=Qm`
|
|
91
|
+
`)),yc=e=>(t,n)=>{void 0!==n?n.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},bc=globalThis,wc=bc.ShadowRoot&&(void 0===bc.ShadyCSS||bc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,kc=Symbol(),Sc=new WeakMap,Ec=function(){return c((function e(t,n,a){if(s(this,e),this._$cssResult$=!0,a!==kc)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}),[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(wc&&void 0===e){var n=void 0!==t&&1===t.length;n&&(e=Sc.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Sc.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Mc=(e,t)=>{if(wc)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(var n,a=m(t);!(n=a()).done;){var i=n.value,r=document.createElement("style"),o=bc.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=i.cssText,e.appendChild(r)}},Pc=wc?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,n="",a=m(e.cssRules);!(t=a()).done;){n+=t.value.cssText}return(e=>new Ec("string"==typeof e?e:e+"",void 0,kc))(n)})(e):e,Tc=Object.is,_c=Object.defineProperty,Dc=Object.getOwnPropertyDescriptor,Ac=Object.getOwnPropertyNames,xc=Object.getOwnPropertySymbols,Cc=Object.getPrototypeOf,Ic=globalThis,Lc=Ic.trustedTypes,Fc=Lc?Lc.emptyScript:"",Rc=Ic.reactiveElementPolyfillSupport,Wc=(e,t)=>e,Nc={toAttribute(e,t){switch(t){case Boolean:e=e?Fc:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Oc=(e,t)=>!Tc(e,t),jc={attribute:!0,type:String,converter:Nc,reflect:!1,useDefault:!1,hasChanged:Oc};null!==(fc=Symbol.metadata)&&void 0!==fc||(Symbol.metadata=Symbol("metadata")),null!==(vc=Ic.litPropertyMetadata)&&void 0!==vc||(Ic.litPropertyMetadata=new WeakMap);var $c=function(){function e(){var t;return s(this,e),(t=o(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return g(e,D(HTMLElement)),c(e,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach((e=>e(this)))}},{key:"addController",value:function(e){var t,n;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,n=m(this.constructor.elementProperties.keys());!(e=n()).done;){var a=e.value;this.hasOwnProperty(a)&&(t.set(a,this[a]),delete this[a])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return Mc(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}},{key:"attributeChangedCallback",value:function(e,t,n){this._$AK(e,n)}},{key:"_$ET",value:function(e,t){var n=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,n);if(void 0!==a&&!0===n.reflect){var i,r=(void 0!==(null===(i=n.converter)||void 0===i?void 0:i.toAttribute)?n.converter:Nc).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(a):this.setAttribute(a,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var n=this.constructor,a=n._$Eh.get(e);if(void 0!==a&&this._$Em!==a){var i,r,o,s=n.getPropertyOptions(a),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(i=s.converter)||void 0===i?void 0:i.fromAttribute)?s.converter:Nc;this._$Em=a;var l=u.fromAttribute(t,s.type);this[a]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(a))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,n){if(void 0!==e){var a,i,r=this.constructor,o=this[e];if(null!=n||(n=r.getPropertyOptions(e)),!((null!==(a=n.hasChanged)&&void 0!==a?a:Oc)(o,t)||n.useDefault&&n.reflect&&o===(null===(i=this._$Ej)||void 0===i?void 0:i.get(e))&&!this.hasAttribute(r._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:n,reflect:a,wrapped:i},r){var o,s,u;n&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==i||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===a&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return S((function(n){for(;;)switch(n.p=n.n){case 0:return this.isUpdatePending=!0,n.p=1,n.n=2,r(this._$ES);case 2:n.n=4;break;case 3:n.p=3,t=n.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){n.n=5;break}return n.n=5,r(e);case 5:return n.a(2,!this.isUpdatePending)}}),null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,n=m(this._$Ep);!(t=n()).done;){var a=t.value,i=a[0],r=a[1];this[i]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=m(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],c=h.wrapped,f=this[d];!0!==c||this._$AL.has(d)||void 0===f||this.C(d,void 0,h,f)}}var v=!1,p=this._$AL;try{var g;(v=this.shouldUpdate(p))?(this.willUpdate(p),null!==(g=this._$EO)&&void 0!==g&&g.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(p)):this._$EM()}catch(p){throw v=!1,this._$EM(),p}v&&this._$AE(p)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=jc){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var n=Symbol(),a=this.getPropertyDescriptor(e,n,t);void 0!==a&&_c(this.prototype,e,a)}}},{key:"getPropertyDescriptor",value:function(e,t,n){var a,i=null!==(a=Dc(this.prototype,e))&&void 0!==a?a:{get(){return this[t]},set(e){this[t]=e}},r=i.get,o=i.set;return{get:r,set(t){var a=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:jc}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Wc("elementProperties"))){var e=Cc(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Wc("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Wc("properties")))for(var e=this.properties,t=0,n=[...Ac(e),...xc(e)];t<n.length;t++){var a=n[t];this.createProperty(a,e[a])}var i=this[Symbol.metadata];if(null!==i){var r=litPropertyMetadata.get(i);if(void 0!==r)for(var o,s=m(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var h,c=m(this.elementProperties);!(h=c()).done;){var f=h.value,v=f[0],p=f[1],g=this._$Eu(v,p);void 0!==g&&this._$Eh.set(g,v)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var n,a=m(new Set(e.flat(1/0).reverse()));!(n=a()).done;){var i=n.value;t.unshift(Pc(i))}else void 0!==e&&t.push(Pc(e));return t}},{key:"_$Eu",value:function(e,t){var n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}}])}();$c.elementStyles=[],$c.shadowRootOptions={mode:"open"},$c[Wc("elementProperties")]=new Map,$c[Wc("finalized")]=new Map,null!=Rc&&Rc({ReactiveElement:$c}),(null!==(pc=Ic.reactiveElementVersions)&&void 0!==pc?pc:Ic.reactiveElementVersions=[]).push("2.1.1");var zc={attribute:!0,type:String,converter:Nc,reflect:!1,hasChanged:Oc},Bc=(e=zc,t,n)=>{var a=n.kind,i=n.metadata,r=globalThis.litPropertyMetadata.get(i);if(void 0===r&&globalThis.litPropertyMetadata.set(i,r=new Map),"setter"===a&&((e=Object.create(e)).wrapped=!0),r.set(n.name,e),"accessor"===a){var o=n.name;return{set(n){var a=t.get.call(this);t.set.call(this,n),this.requestUpdate(o,a,e)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===a){var s=n.name;return function(n){var a=this[s];t.call(this,n),this.requestUpdate(s,a,e)}}throw Error("Unsupported decorator location: "+a)};function Hc(e){return(t,n)=>"object"==typeof n?Bc(e,t,n):((e,t,n)=>{var a=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),a?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function Uc(e){return Hc(f({},e,{state:!0,attribute:!1}))}function Gc(e){return!e||"object"==typeof e&&0==Object.keys(e).length}var Vc,Xc="entry",Kc="screen",Yc="branch",qc="exit",Jc="unknown";!function(e){e.NAVIGATE="flowNav",e.BACK="flowPrev",e.NEXT="flowNext",e.FINISHED="flowDone",e.DISMISS="flowDismiss",e.EXIT="flowExit",e.HANDOFF="flowHandoff",e.TRACK="trackEvent",e.LOG="logEvent",e.SET_VIDEO="setVideo",e.FLOW_EVENT="flowEvent",e.BLOCK_BACK="blockBackToStep",e.FLOW_ENABLED="flowInteractionEnabled",e.FLOW_DISABLED="flowInteractionDisabled",e.SET_TAGS="setTags",e.PAUSE="flowPause",e.RESUME="flowResume"}(Vc||(Vc={}));var Qc="__handoff_sequence__",Zc="__buy_sku__",em="__default__",tm="__appear__",nm="__disappear__",am="__login_success__",im="__login_failure__",rm="__logout_success__",om="__logout_failure__",sm="__purchase_success__",um="__remoteback__",lm="__tag_update__",dm="and",hm="or",cm="i_contains",mm="equals",fm="i_equals",vm="not_equals",pm="not_i_equals",gm="not_contains",ym="set",bm="notSet",wm=function(){function e(){s(this,e),this.resolvers=new Map,this.namespaceResolvers=new Map}return c(e,[{key:"registerNamespaceResolver",value:function(e,t){this.namespaceResolvers.set(e,t)}},{key:"resetResolvers",value:function(){this.resolvers.clear()}},{key:"evaluate",value:function(e){var t,n=null!==(t=e.filter)&&void 0!==t?t:[];if(0===n.length)return!0;var a=n.map((e=>this.evaluateFilter(e)));switch(e.operator){case dm:return a.every((e=>e));case hm:return a.some((e=>e));default:return a.every((e=>e))}}},{key:"evaluateOrdered",value:function(e){var t;if(!e)return!0;var n=null!==(t=e.filter)&&void 0!==t?t:[];if(0===n.length)return!0;switch(e.operator){case dm:for(var a,i=m(n);!(a=i()).done;){var r=a.value;if(!this.evaluateFilter(r))return!1}return!0;case hm:for(var o,s=m(n);!(o=s()).done;){var u=o.value;if(this.evaluateFilter(u))return!0}return!1;default:for(var l,d=m(n);!(l=d()).done;){var h=l.value;if(!this.evaluateFilter(h))return!1}return!0}}},{key:"evaluateFilter",value:function(e){var t=this.resolve(e.identifier);if(e.operator===ym)return null!=t;if(e.operator===bm)return null==t;if(null==t)return!![vm,pm,gm].includes(e.operator);switch(e.operator){case cm:return Array.isArray(t)?e.values.some((e=>t.some((t=>0===t.localeCompare(e,void 0,{sensitivity:"accent"}))))):(this.log("Resolved value is not an array of strings for i_contains."),!1);case mm:return e.values.some((e=>{if("string"==typeof t)return t===e;if("boolean"==typeof t){var n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for equals comparison: "+typeof t),!1}));case fm:return e.values.some((e=>{if("string"==typeof t)return 0===t.localeCompare(e,void 0,{sensitivity:"accent"});if("boolean"==typeof t){var n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for i_equals comparison: "+typeof t),!1}));case vm:return e.values.every((e=>"string"!=typeof t||t!==e));case pm:return e.values.every((e=>"string"!=typeof t||0!==t.localeCompare(e,void 0,{sensitivity:"accent"})));case gm:return e.values.every((e=>"string"!=typeof t||!t.includes(e)));default:return this.log(`Unsupported operator: ${e.operator}`),!1}}},{key:"resolve",value:function(e){var t=this.resolveRaw(e);if(void 0!==t)return t;var n=e.lastIndexOf(".");if(-1!==n){var a=e.slice(0,n),i=e.slice(n+1),r=this.resolveRaw(a);return void 0!==r?this.extractProperty(i,r):void this.log(`Could not resolve base identifier: ${a}`)}}},{key:"resolveRaw",value:function(e){for(var t,n=[...this.namespaceResolvers.keys()].sort(((e,t)=>t.length-e.length)),a=m(n);!(t=a()).done;){var i=t.value;if(e.startsWith(i)){var r=this.namespaceResolvers.get(i);if(r)return r(e)}}}},{key:"extractProperty",value:function(e,t){switch(e){case"last":if(Array.isArray(t))return t[t.length-1];break;case"first":if(Array.isArray(t))return t[0];break;case"count":if(Array.isArray(t))return t.length;if(t&&"object"==typeof t)return Object.keys(t).length;break;default:return}this.log(`Could not extract .${e} from type ${typeof t}`)}},{key:"log",value:function(e){Wn.debug(`[NamiConditionEvaluator] ${e}`)}}],[{key:"shared",get:function(){return e.instance||(e.instance=new e),e.instance}}])}(),km=function(){return c((function e(){s(this,e)}),[{key:"register",value:function(){wm.shared.registerNamespaceResolver(this.namespace,(e=>{var t=e.replace(new RegExp(`^${this.namespace}\\.`),"");return this.resolveValue(t)}))}},{key:"resolveKeyPath",value:function(e,t){for(var n,a=t,i=m(e.replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean));!(n=i()).done;){var r=n.value;if(null==a||"object"!=typeof a)return;a=a[r]}return a}}])}(),Sm=function(){function e(t){var n;return s(this,e),(n=o(this,e)).namespace="LaunchContext",n.context=t,n.register(),n}return g(e,km),c(e,[{key:"resolveValue",value:function(e){if(e.startsWith("customAttributes.")){var t=e.substring(17);return this.resolveKeyPath(t,this.context.customAttributes)}if(e.startsWith("customObject.")){var n=e.substring(13);return this.resolveKeyPath(n,this.context.customObject)}return this.resolveKeyPath(e,{customAttributes:this.context.customAttributes,customObject:this.context.customObject,productGroups:this.context.productGroups})}}])}(),Em=function(){function e(){var t,n,a,i;s(this,e),(i=o(this,e)).namespace="Device";var r=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[1]||"",u=Intl.DateTimeFormat().resolvedOptions().timeZone,l=su();return i.context={osName:l.os_name,osVersion:l.os_version,appVersion:l.extended_platform_version,sdkVersion:l.sdk_version,deviceModel:l.device_model,screenWidth:window.innerWidth,screenHeight:window.innerHeight,formFactor:l.form_factor,tvQuality:i.tvQuality(null!==(t=l.form_factor)&&void 0!==t?t:"desktop"),tvResolution:i.tvResolution(null!==(n=l.form_factor)&&void 0!==n?n:"desktop"),screenSize:i.screenSizeTier(null!==(a=l.form_factor)&&void 0!==a?a:"desktop"),language:l.language,country:r,timezone:u},i.register(),i}return g(e,km),c(e,[{key:"screenSizeTier",value:function(e){var t=window.screen.width,n=window.screen.height,a=window.devicePixelRatio||1,i=Math.round(t*a),r=Math.round(n*a),o=Math.max(i,r);switch(e){case"phone":return o<1136?"tiny":o<1334?"small":o<1920?"medium":o<2560?"large":"huge";case"tablet":return o<2048?"medium":o<2732?"large":"huge";case"television":return o<1920?"medium":o<3840?"large":"huge";case"desktop":return o<1440?"small":o<2560?"medium":o<3840?"large":"huge";default:return"medium"}}},{key:"tvQuality",value:function(e){if("television"!==e)return"";var t=window.screen.width,n=window.screen.height,a=window.devicePixelRatio||1,i=Math.round(t*a),r=Math.round(n*a),o=Math.max(i,r),s=Math.min(i,r);return o>=3840||s>=2160?"4K":o>=1920||s>=1080?"1080p":"720p"}},{key:"tvResolution",value:function(e){if("television"!==e)return"";var t=window.screen.width,n=window.screen.height,a=window.devicePixelRatio||1,i=Math.round(t*a),r=Math.round(n*a),o=Math.max(i,r),s=Math.min(i,r);return s<720&&o<1280?"SD":s>=720&&s<1080&&o>=1280&&o<1920?"720p":s>=1080&&s<1440&&o>=1920&&o<2560?"1080p":s>=1440&&s<2160&&o>=2560&&o<3840?"1440p":s>=2160&&s<3e3&&o>=3840&&o<5e3?"4K":s>=3e3&&o>=5e3?"8K":"Unknown"}},{key:"resolveValue",value:function(e){return this.resolveKeyPath(e,this.context)}}])}(),Mm=[/(^|_)api(_|$)?key/i,/^key$/i,/^token$/i,/id[_-]?token/i,/access[_-]?token/i,/^auth/i,/password/i,/secret/i,/signature/i,/hmac/i,/^jwt$/i,/^code$/i,/redirect[_-]?uri/i,/return[_-]?url/i,/^state$/i,/^session$/i,/^sid$/i,/^sso$/i,/assertion/i],Pm=function(){function e(){s(this,e),this.params={},"undefined"!=typeof window&&this.setSearchParams()}return c(e,[{key:"setSearchParams",value:function(){this.params=this.extractSafeParams()}},{key:"safeValue",value:function(e){if(!e)return null;try{var t=decodeURIComponent(e).trim();return!t||/^null|undefined$/i.test(t)||((e=>e.includes("://")||/^\/.*\?/.test(e))(t)||(e=>/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+$/.test(e))(t)||(e=>/^[A-Za-z0-9_-]{40,}$/.test(e)||/^[A-Fa-f0-9]{40,}$/.test(e)||/^ya29\./.test(e)||/^sk_/.test(e)||/^ghp_/.test(e))(t))?null:((e,t=128)=>e.length>t?e.slice(0,t):e)(t)}catch(e){return null}}},{key:"extractSafeParams",value:function(){var e=window.location,t={},n=new Set;try{for(var a,i=new URLSearchParams(e.search),r=(e,a)=>{var i=(e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[-\s]/g,"_").toLowerCase())(e);if(!(n.size>=10||(e=>Mm.some((t=>t.test(e))))(i))){var r=this.safeValue(a);r&&(t[i]=r,n.add(i))}},o=m(i.entries());!(a=o()).done;){var s=a.value;r(s[0],s[1])}}catch(e){}return t}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"refresh",value:function(){"undefined"!=typeof window&&this.instance.setSearchParams()}}])}();Pm._instance=null;var Tm,_m=()=>Pm.instance.params,Dm=/\{\{\s*([^}]+?)\s*\}\}/g,Am=function(){return c((function e(t){s(this,e),this.flowManager=t,this.urlParams=_m()}),[{key:"resolve",value:function(e){var t,n,a,i,r,o,s,u,l,d,h,c,m=this.flowManager.currentFlow,f=null==m?void 0:m.component;if(e.startsWith("launchContext.")){var v,p=null===(v=this.flowManager.currentFlow)||void 0===v?void 0:v.context;if(p){var g=e.substring(14),y=new Sm(p).resolveValue(g);return null==y?void 0:y.toString()}}else switch(e){case"campaignId":return null==f||null===(t=f.campaign)||void 0===t?void 0:t.rule;case"campaignName":return null==f||null===(n=f.campaign)||void 0===n?void 0:n.name;case"campaignLabel":case"campaignPlacement":return null!==(a=null==f||null===(i=f.campaign)||void 0===i?void 0:i.value)&&void 0!==a?a:void 0;case"campaignSegment":case"campaignSegmentId":return null==f||null===(r=f.campaign)||void 0===r?void 0:r.segment;case"campaignExternalSegment":case"campaignExternalSegmentId":return null!==(o=null==f||null===(s=f.campaign)||void 0===s?void 0:s.external_segment)&&void 0!==o?o:void 0;case"pageName":return null==f||null===(u=f.paywall)||void 0===u?void 0:u.name;case"pageId":return null==f||null===(l=f.paywall)||void 0===l?void 0:l.id;case"flowName":return null==m?void 0:m.name;case"flowId":return null==m?void 0:m.id;case"objectId":return null==f||null===(d=f.campaign)||void 0===d||null===(d=d.flow)||void 0===d?void 0:d.object_id;case"stepName":return null==m||null===(h=m.currentFlowStep)||void 0===h?void 0:h.name;case"buttonText":return null==m||null===(c=m.currentButton)||void 0===c?void 0:c.firstTextValue();case"slideNumber":var b=null==f?void 0:f.getSelectedSlideIndexForCurrentCarousel();return null!=b?`${b+1}`:void 0;default:return}}},{key:"interpolateLiquidVariables",value:function(e){return e.replace(Dm,((e,t)=>{var n,a=null!==(n=this.resolve(t))&&void 0!==n?n:this.urlParams[t];return null!=a?a:""}))}},{key:"interpolateDeep",value:function(e){return"string"==typeof e?this.interpolateLiquidVariables(e):Array.isArray(e)?e.map((e=>this.interpolateDeep(e))):e&&"object"==typeof e?Object.entries(e).reduce(((e,[t,n])=>f({},e,{[t]:this.interpolateDeep(n)})),{}):e}}])}(),xm=function(){function e(){var t;return s(this,e),(t=o(this,e)).namespace="urlParams",t.context=_m(),t.register(),t}return g(e,km),c(e,[{key:"resolveValue",value:function(e){return Wn.debug("[URLParamsResolver]","Resolving keyPath",e),this.resolveKeyPath(e,this.context)}}])}(),Cm=function(){function e(){var t;return s(this,e),(t=o(this,e)).namespace="state",t.register(),t}return g(e,km),c(e,[{key:"getContextProvider",value:function(){var e=Xh.providers;if(0!==e.length){var t=e.find((e=>e.flow));return t||e[e.length-1]}}},{key:"resolveValue",value:function(e){var t=this.getContextProvider();if(t){if(e.startsWith("formStates.")){var n=e.substring(11);return t.getCurrentFormId(n)}return this.resolveKeyPath(e,t.state)}}}])}(),Im=function(){function e(t){var n;return s(this,e),(n=o(this,e)).namespace="Placement",n.campaign=t,n.register(),n}return g(e,km),c(e,[{key:"resolveValue",value:function(e){var t;if("label"===e){if(this.campaign&&void 0!==this.campaign.value&&null!==this.campaign.value)return this.campaign.value;var n=Xh.providers;if(0!==n.length){var a=n.find((e=>e.flow));return a?a.getCurrentPlacementLabel():null===(t=n[n.length-1])||void 0===t?void 0:t.getCurrentPlacementLabel()}}}}])}(),Lm=function(){return c((function e(){s(this,e),this.load()}),[{key:"setExternalId",value:function(e){return this.externalId=e,this}},{key:"getExternalId",value:function(){return this.externalId}},{key:"isLoggedIn",value:function(){return!!this.externalId}},{key:"save",value:function(){return this.externalId?Kr.setNamiProfile({externalId:this.externalId}):Kr.removeNamiProfile(),this}},{key:"load",value:function(){var e=Kr.getNamiProfile();e&&(this.externalId=e.externalId),Xh.setIsLoggedIn(!!this.externalId)}},{key:"login",value:function(e){var t;return S((function(n){for(;;)switch(n.n){case 0:return n.n=1,r(Ns.instance.login(e));case 1:(t=n.v).external_id&&Xh.setIsLoggedIn(!0),this.setExternalId(t.external_id).save();case 2:return n.a(2)}}),null,this,null,Promise)}},{key:"logout",value:function(){return S((function(e){for(;;)switch(e.n){case 0:return e.n=1,r(Ns.instance.logout());case 1:Xh.setIsLoggedIn(!1),this.setExternalId(void 0).save();case 2:return e.a(2)}}),null,this,null,Promise)}}])}();Lm.instance=new Lm,function(e){e.LOGIN="login",e.LOGOUT="logout",e.ADVERTISING_ID_SET="advertising_id_set",e.ADVERTISING_ID_CLEARED="advertising_id_cleared",e.VENDOR_ID_SET="vendor_id_set",e.VENDOR_ID_CLEARED="vendor_id_cleared",e.CUSTOMER_DATA_PLATFORM_ID_SET="customer_data_platform_id_set",e.CUSTOMER_DATA_PLATFORM_ID_CLEARED="customer_data_platform_id_cleared",e.ANONYMOUS_MODE_ON="anonymous_mode_on",e.ANONYMOUS_MODE_OFF="anonymous_mode_off",e.NAMI_DEVICE_ID_SET="nami_device_id_set",e.NAMI_DEVICE_ID_CLEARED="nami_device_id_cleared"}(Tm||(Tm={}));var Fm=function(){return c((function e(){s(this,e),this.emitter=ju.getInstance(),wm.shared.registerNamespaceResolver("UserTags",(t=>{var n=t.replace("UserTags.",""),a=e.getCustomerAttribute(n);if(null!=a){var i=a.toLowerCase();return"true"===i||"false"===i?"true"===i:isNaN(Number(a))?a:parseInt(a,10)}return null}))}),[{key:"isSDKInitialized",get:function(){return dc.instance.isInitialized}}],[{key:"isLoggedIn",value:function(){return Lm.instance.isLoggedIn()}},{key:"loggedInId",value:function(){return this.instance.isSDKInitialized||Wn.debug(ke),Lm.instance.getExternalId()}},{key:"login",value:function(e){var t,n,a,i,o,s,u;return S((function(l){for(;;)switch(l.p=l.n){case 0:if(this.instance.isSDKInitialized){l.n=1;break}throw t=new Qr,this.invokeStateHandler(Tm.LOGIN,!1,t),t;case 1:if(!this.inAnonymousMode()){l.n=2;break}throw n=new oo,this.invokeStateHandler(Tm.LOGIN,!1,n),n;case 2:return l.p=2,l.n=3,r(Lm.instance.login(e));case 3:return l.n=4,r(Qh.instance.fetchActiveEntitlements());case 4:this.invokeStateHandler(Tm.LOGIN,!0),Nm.instance.flowOpen&&(a=Nm.instance.currentFlow,(i=null==a?void 0:a.currentFlowStep)&&a.executeLifecycle(i,am)),l.n=6;break;case 5:throw l.p=5,u=l.v,this.invokeStateHandler(Tm.LOGIN,!1,u),Nm.instance.flowOpen&&(o=Nm.instance.currentFlow,(s=null==o?void 0:o.currentFlowStep)&&o.executeLifecycle(s,im)),u;case 6:return l.a(2)}}),null,this,[[2,5]],Promise)}},{key:"logout",value:function(){var e,t,n,a,i,o,s;return S((function(u){for(;;)switch(u.p=u.n){case 0:if(this.instance.isSDKInitialized){u.n=1;break}throw e=new Qr,this.invokeStateHandler(Tm.LOGOUT,!1,e),e;case 1:if(!this.inAnonymousMode()){u.n=2;break}throw t=new oo,this.invokeStateHandler(Tm.LOGOUT,!1,t),t;case 2:return u.p=2,u.n=3,r(Lm.instance.logout());case 3:return u.n=4,r(Qh.instance.fetchActiveEntitlements());case 4:this.invokeStateHandler(Tm.LOGOUT,!0),Nm.instance.flowOpen&&(n=Nm.instance.currentFlow,(a=null==n?void 0:n.currentFlowStep)&&n.executeLifecycle(a,rm)),u.n=6;break;case 5:throw u.p=5,s=u.v,this.invokeStateHandler(Tm.LOGOUT,!1,s),Nm.instance.flowOpen&&(i=Nm.instance.currentFlow,(o=null==i?void 0:i.currentFlowStep)&&i.executeLifecycle(o,om)),s;case 6:return u.a(2)}}),null,this,[[2,5]],Promise)}},{key:"setCustomerDataPlatformId",value:function(e){return S((function(t){for(;;)switch(t.n){case 0:return t.n=1,r(this.updateCustomerDataPlatformId(e));case 1:return t.a(2)}}),null,this,null,Promise)}},{key:"clearCustomerDataPlatformId",value:function(){return S((function(e){for(;;)switch(e.n){case 0:return e.n=1,r(this.updateCustomerDataPlatformId(null));case 1:return e.a(2)}}),null,this,null,Promise)}},{key:"registerAccountStateHandler",value:function(e){return this.instance.emitter.on("accountStateChange",e),()=>{this.instance.emitter.off("accountStateChange",e)}}},{key:"setAnonymousMode",value:function(e){var t,n,a,i,o;return S((function(s){for(;;)switch(s.n){case 0:if(t=e?Tm.ANONYMOUS_MODE_ON:Tm.ANONYMOUS_MODE_OFF,this.instance.isSDKInitialized){s.n=1;break}throw n=new Qr,this.invokeStateHandler(t,!1,n),n;case 1:if(this.anonymousModeCapability()){s.n=2;break}return Wn.warn("Anonymous mode feature is not enabled for your Nami account. Contact support@nami.ml for details."),s.a(2);case 2:if(this.inAnonymousMode()!==e){s.n=3;break}return a=e?new io:new ro,this.invokeStateHandler(t,!1,a),s.a(2);case 3:if(!e){s.n=4;break}Kr.setAnonymousMode(e),Kr.resetDevice(),this.refetchConfig(),this.invokeStateHandler(Tm.ANONYMOUS_MODE_ON,!0),s.n=6;break;case 4:return Kr.clearAnonymousMode(),o=null===(i=Kr.getNamiConfig())||void 0===i?void 0:i.namiCommands,s.n=5,r(Bu.instance.createOrUpdateDevice(su(o)));case 5:Kr.clearAnonymousUUID(),this.refetchConfig(),this.invokeStateHandler(Tm.ANONYMOUS_MODE_OFF,!0);case 6:return s.a(2)}}),null,this,null,Promise)}},{key:"inAnonymousMode",value:function(){return!!this.instance.isSDKInitialized&&Xu()}},{key:"setCustomerAttribute",value:function(e,t){if(!this.instance.isSDKInitialized)throw new Qr;if(Kr.setCustomerAttribute(e,t),Cs(le.PAYWALL_PERSONALIZATION)?(Xh.setCustomerAttribute({[e]:t}),Wn.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${e}`)):Wn.warn(`The customer attribute ${e} is not available for using on a paywall, because your account's plan does not include paywall personalization. Contact support@nami.ml for details.`),Nm.instance.flowOpen){var n=Nm.instance.currentFlow;if(n){var a=n.currentFlowStep;a&&n.executeLifecycle(a,lm)}}}},{key:"getCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new Qr;var t=Kr.getCustomerAttribute(e);return null!=t?Cs(le.PAYWALL_PERSONALIZATION)?Wn.debug(`Found customer attribute. ${e} is available for paywall personalization on this device.`):Wn.warn(`Found customer attribute. ${e} is not available for use on a paywall because paywall personalization is not included in your account's plan. Contact support@nami.ml for details.`):Wn.warn(`No ${e} customer attribute found.`),t}},{key:"getAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new Qr;return Kr.getAllCustomerAttributes()}},{key:"clearCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new Qr;Kr.clearCustomerAttribute(e)?(Xh.removeCustomerAttribute(e),Wn.warn(`This customer attribute has been cleared. ${e} is no longer available for paywall personalization on this device. A default value will be used if set in the Nami Control Center.`)):Wn.warn(`No value to clear for attribute ${e}.`)}},{key:"clearAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new Qr;Kr.getAllCustomerAttributesKeys().forEach((e=>{Xh.removeCustomerAttribute(e)})),Kr.clearAllCustomerAttributes(),Wn.warn("All customer attribute have been cleared. customer's smart text will no longer be personalized for this device. A default value will be used if set in the Nami Control Center.")}},{key:"journeyState",value:function(){if(!this.instance.isSDKInitialized)throw new Qr;return Kr.getCustomerJourneyState()}},{key:"deviceId",value:function(){var e,t;return this.instance.isSDKInitialized&&null!==(e=null===(t=Kr.getDevice())||void 0===t?void 0:t.id)&&void 0!==e?e:Le}},{key:"registerJourneyStateHandler",value:function(e){if(Is("NamiCustomerManager.registerJourneyStateHandler"))return this.instance.emitter.addListener(Pn,e),()=>{this.instance.emitter.removeListener(Pn,e)}}},{key:"invokeStateHandler",value:function(e,t,n){this.instance.emitter.emit("accountStateChange",e,t,n)}},{key:"updateCustomerDataPlatformId",value:function(e){var t,n,a,i;return S((function(o){for(;;)switch(o.p=o.n){case 0:if(this.instance.isSDKInitialized){o.n=1;break}throw t=new Qr,this.invokeStateHandler(Tm.CUSTOMER_DATA_PLATFORM_ID_SET,!1,t),t;case 1:if(this.inAnonymousMode()){o.n=6;break}return o.p=2,o.n=3,r(Bu.instance.updateDeviceField("customer_data_platform_id",e));case 3:this.invokeStateHandler(Tm.CUSTOMER_DATA_PLATFORM_ID_SET,!0),o.n=5;break;case 4:o.p=4,i=o.v,this.invokeStateHandler(Tm.CUSTOMER_DATA_PLATFORM_ID_SET,!1,i);case 5:o.n=7;break;case 6:return Wn.info("Unable to set CDP ID in anonymous mode",{deviceId:null===(n=Kr.getDevice())||void 0===n?void 0:n.id,anonymousMode:!0}),a=new so,this.invokeStateHandler(Tm.CUSTOMER_DATA_PLATFORM_ID_SET,!1,a),o.a(2);case 7:return o.a(2)}}),null,this,[[2,4]],Promise)}},{key:"anonymousModeCapability",value:function(){if(!this.instance.isSDKInitialized)return!1;var e=Cs(le.ANONYMOUS_MODE_CAPABILITY),t=Cs(le.THIRD_PARTY_TRANSACTIONS);return e&&t}},{key:"refetchConfig",value:function(){return S((function(e){for(;;)switch(e.n){case 0:if(!this.instance.isSDKInitialized){e.n=1;break}return e.n=1,r(Promise.all([Hu.instance.fetchProducts(),Uu.instance.fetchPaywalls().then((e=>$u.instance.fetchCampaignRules(e)))]));case 1:return e.a(2)}}),null,this,null,Promise)}}])}();Fm.instance=new Fm;var Rm=function(){return c((function e(t={}){var n,a,i,r,o;s(this,e),this.id=null!==(n=t.id)&&void 0!==n?n:"",this.name=null!==(a=t.name)&&void 0!==a?a:"",this.steps=null!==(i=t.steps)&&void 0!==i?i:[],this.screens=null!==(r=t.screens)&&void 0!==r?r:[],this.resumeFromBookmark=Boolean(t.resume_from_bookmark),this.transition=null!==(o=t.transition)&&void 0!==o?o:"none"}),[{key:"allScreensAvailable",get:function(){return this.screens.length>0&&Hs(this.screens)}}])}(),Wm=function(){function e(t,n,a,i){var r,u;s(this,e),(u=o(this,e,[null!==(r=t.flow.object)&&void 0!==r?r:{}])).stepcrumbs=[],u.branchcrumbs=[],u.activeHandoffSequence=null,u.currentScreenState=null,u.isPaused=!1,u.timerStates={},u.campaign=t,u.component=n,u.context=i,u.manager=a,u.branchcrumbs=[],u.stepcrumbs=[],u.registerResolvers(i);var l=u.findStepByType(Xc);return l&&u.forward(l.id),u}return g(e,Rm),c(e,[{key:"registerResolvers",value:function(e){e&&new Sm(e),new Em,new xm,new Cm,new Im(this.campaign),wm.shared.registerNamespaceResolver("Flow",(e=>{switch(e){case"Flow.stepcrumbs":return this.stepcrumbs.map((e=>e.id));case"Flow.branchcrumbs":return this.branchcrumbs;default:return}}))}},{key:"currentFlowStep",get:function(){return this.stepcrumbs.at(-1)}},{key:"nextStepAvailable",get:function(){return void 0!==this.nextFlowStep}},{key:"previousStepAvailable",get:function(){var e,t=!!this.previousFlowStep,n=!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to),a=this.stepcrumbs.slice(0,-1).some((e=>"screen"===e.type));return t&&n&&a}},{key:"previousFlowStep",get:function(){var e=this.stepcrumbs.length-2;return e>=0?this.stepcrumbs[e]:void 0}},{key:"nextFlowStep",get:function(){return this.nextStep(this.currentFlowStep)}},{key:"getStep",value:function(e){return this.steps.find((t=>t.id===e))}},{key:"findStepByType",value:function(e){return this.steps.find((t=>t.type===e))}},{key:"isStepActive",value:function(e){return!e.branch_tags||!e.branch_tags.length||e.branch_tags.some((e=>this.branchcrumbs.includes(e)))}},{key:"finished",value:function(){this.manager.finishFlow()}},{key:"back",value:function(){this.previousStepAvailable?this.backToPreviousScreenStep():Wn.debug("No previous step available")}},{key:"next",value:function(){var e=this.nextFlowStep;e&&this.forward(e.id)}},{key:"backToPreviousScreenStep",value:function(){var e;if(!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to)){for(var t=this.stepcrumbs.length-2;t>=0;t--){var n=this.stepcrumbs[t];if(this.stepcrumbs.pop(),"branch"===n.type&&this.branchcrumbs.length>0&&this.branchcrumbs.pop(),"screen"===n.type&&n.screen){var a,i,r=Bs(n.screen);return r&&this.component.flowNavigateToScreen(r,{transition:this.transition,direction:"backward"}),void(this.currentScreenState=null!==(a=null===(i=Xh.currentProvider)||void 0===i?void 0:i.state)&&void 0!==a?a:null)}}Wn.warn("No previous screen step found to return to")}else Wn.warn(`Not allowed to go back to ${this.previousFlowStep.id}`)}},{key:"forward",value:function(e){var t=this.getStep(e);if(t){if(this.isStepActive(t))switch(t.type){case Xc:case qc:return this.stepcrumbs.push(t),void this.executeLifecycle(t,em);case Yc:return void this.handleBranchStep(t);case Kc:return void this.handleScreenStep(t);case Jc:return}}else Wn.error(`No step found with id: ${e}`)}},{key:"pause",value:function(){var e;this.isPaused?Wn.info("Flow is already paused"):(this.isPaused=!0,this.pausedStepID=null===(e=this.currentFlowStep)||void 0===e?void 0:e.id,Wn.info("Flow paused"))}},{key:"resumeFromPause",value:function(){if(this.isPaused)if(this.isPaused=!1,this.pausedStepID){var e=this.pausedStepID;this.pausedStepID=void 0,Wn.info(`Flow resumed from step ${e}`),this.forward(e)}else Wn.warn("No step to resume from");else Wn.info("Flow is not paused")}},{key:"executeLifecycle",value:function(e,t,n){var a=e.actions[t];a&&this.executeFullLifecycles(a,n)}},{key:"lifecycles",value:function(e){if(this.currentFlowStep){var t=this.currentFlowStep.actions[e];if(t)return t;Wn.info(`No actions found for button ${e} on step ${this.currentFlowStep.id}`)}}},{key:"triggerActions",value:function(e,t,n){var a=this.lifecycles(e);a&&(this.currentButton=t,this.executeFullLifecycles(a,n))}},{key:"executeFullLifecycles",value:function(e,t){for(var n,a=m(e);!(n=a()).done;){var i=n.value;[i.before,i.action,i.after].forEach((e=>null==e?void 0:e.forEach((e=>this.shouldRun(e)&&this.performAction(e,t)))))}}},{key:"triggerBeforeActions",value:function(e,t,n){var a=this.lifecycles(e);if(a){this.currentButton=t;for(var i,r=m(a);!(i=r()).done;){var o;null===(o=i.value.before)||void 0===o||o.forEach((e=>this.shouldRun(e)&&this.performAction(e,n)))}}}},{key:"triggerAfterActions",value:function(e,t,n){var a=this.lifecycles(e);if(a){this.currentButton=t;for(var i,r=m(a);!(i=r()).done;){var o;null===(o=i.value.after)||void 0===o||o.forEach((e=>this.shouldRun(e)&&this.performAction(e,n)))}}}},{key:"currentStepHasHoistedPrimaryActions",value:function(e){var t=this.lifecycles(e);return!!t&&t.some((e=>{var t;return null===(t=e.action)||void 0===t?void 0:t.length}))}},{key:"shouldRun",value:function(e){return!e.conditions||e.conditions.every((e=>wm.shared.evaluate(e)))}},{key:"performAction",value:function(e,t){var n;if(this.currentFlowStep){var a=(null!==(n=e.parameters)&&void 0!==n&&n.delay?+e.parameters.delay:0)||0,i=n=>{var a,i,r,o,s,u,l;if((null===(a=this.currentFlowStep)||void 0===a?void 0:a.id)===n)switch(e.function){case Vc.BACK:this.back();break;case Vc.NEXT:null!==(i=e.parameters)&&void 0!==i&&i.step?this.forward(e.parameters.step):this.next();break;case Vc.NAVIGATE:var d;if(null!==(r=e.parameters)&&void 0!==r&&r.step)(null===(d=this.previousFlowStep)||void 0===d?void 0:d.id)===e.parameters.step?this.back():this.forward(e.parameters.step);else this.next();break;case Vc.FINISHED:case Vc.DISMISS:this.finished();break;case Vc.EXIT:var h=this.steps.find((e=>e.type===qc));h&&this.forward(h.id);break;case Vc.PAUSE:this.pause();break;case Vc.RESUME:this.resumeFromPause();break;case Vc.HANDOFF:if(null!==(o=e.parameters)&&void 0!==o&&o.handoffTag)if(this.manager.handoffStepHandler)if(e.parameters.handoffData)Wn.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(e.parameters.handoffData)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,e.parameters.handoffData);else if(t)Wn.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(t)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,t);else if(e.parameters.handoffFormId){var c=this.getFormData();e.parameters.handoffTag===Qc?this.flowHandoffFormSequence():this.manager.handoffStepHandler(e.parameters.handoffTag,c)}else Wn.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} and no data`),this.manager.handoffStepHandler(e.parameters.handoffTag);else Wn.debug("No handoffStepHandler found",e);break;case Vc.LOG:var m;if(null!==(s=e.parameters)&&void 0!==s&&s.eventName)Wn.info(`logEvent → ${e.parameters.eventName}`);else Wn.warn(`Missing 'eventName' in logEvent action ${null!==(m=e.id)&&void 0!==m?m:"unknown"}`);break;case Vc.TRACK:var f;if(null!==(u=e.parameters)&&void 0!==u&&u.eventName)Wn.info(`trackEvent → ${e.parameters.eventName}`);else Wn.warn(`Missing 'eventName' in logEvent action ${null!==(f=e.id)&&void 0!==f?f:"unknown"}`);break;case Vc.SET_VIDEO:null!==(l=e.parameters)&&void 0!==l&&l.name&&e.parameters.url?Xh.setAppSuppliedVideoDetails({name:e.parameters.name,url:e.parameters.url}):Wn.warn("Missing name, url for setting video details");break;case Vc.BLOCK_BACK:var v,p=null===(v=e.parameters)||void 0===v?void 0:v.step,g=p?this.getStep(p):void 0;g?g.allow_back_to=!1:this.currentFlowStep?this.currentFlowStep.allow_back_to=!1:Wn.warn("Missing step for blocking back");break;case Vc.FLOW_EVENT:var y,b=new Am(this.manager),w=Object.fromEntries(Object.entries(null!==(y=e.parameters)&&void 0!==y?y:{}).map((([e,t])=>[e,b.interpolateDeep(t)])));this.manager.eventHandler?this.manager.eventHandler(w):Wn.warn("Missing event handler",w);break;case Vc.FLOW_ENABLED:Xh.setUserInteractionEnabled(!0);break;case Vc.FLOW_DISABLED:Xh.setUserInteractionEnabled(!1);break;case Vc.SET_TAGS:e.parameters&&(Xh.setUserTags(e.parameters),Object.entries(e.parameters).forEach((([e,t])=>{Fm.setCustomerAttribute(e,t)})));break;default:Wn.warn(`Missing action handler for ${e.function}`,e)}else Wn.debug(`Skipped action for stale flow step ${n}`)};a?setTimeout(i.bind(this,this.currentFlowStep.id),a):i(this.currentFlowStep.id)}else Wn.warn("No current flow step")}},{key:"nextStep",value:function(e){if(e){var t=this.steps.findIndex((t=>t.id===e.id));if(-1!==t){for(var n,a=m(this.steps.slice(t+1));!(n=a()).done;){var i=n.value;if(this.isStepActive(i))return i}Wn.debug(`No active next step found after ${e.id}`)}else Wn.error(`Could not find next step for step ${e.id}`)}else Wn.error("Next step not found")}},{key:"handleScreenStep",value:function(e){var t,n=Bs(null!==(t=e.screen)&&void 0!==t?t:"");e.screen&&n&&this.campaign?(this.stepcrumbs.push(e),this.component.flowNavigateToScreen(n,{transition:this.transition,direction:"forward"})):Wn.error("No paywall or campaign found for next step")}},{key:"handleBranchStep",value:function(e){this.stepcrumbs.push(e);for(var t=0,n=Object.entries(e.actions);t<n.length;t++){var a=n[t],i=a[0],r=a[1];if(r)for(var o,s=m(r);!(o=s()).done;){var u=o.value;if(u.action)for(var l,d=m(u.action);!(l=d()).done;){var h,c,f=l.value;if(this.shouldRun(f))return this.branchcrumbs.push(i),null===(h=u.before)||void 0===h||h.forEach((e=>{this.performAction(e)})),u.action.forEach((e=>{this.shouldRun(e)&&this.performAction(e)})),void(null===(c=u.after)||void 0===c||c.forEach((e=>{this.performAction(e)})))}else Wn.warn(`No actions defined for branch tag ${i}`)}}Wn.warn(`No matching branch condition matched for step ${e.id}`)}},{key:"getFormData",value:function(){var e,t;return f({},null!==(e=null===(t=Xh.currentProvider)||void 0===t||null===(t=t.state)||void 0===t?void 0:t.formStates)&&void 0!==e?e:{})}},{key:"flowHandoffFormSequence",value:function(){var e,t=null===(e=this.currentScreenState)||void 0===e?void 0:e.formStates;if(t){var n=Object.keys(t).sort();if(0!==n.length){var a=n.filter((e=>!0===t[e]));if(0===a.length)return Wn.info("No eligible handoff keys after filtering"),void this.manager.resume();this.activeHandoffSequence={formStates:f({},t),remainingKeys:[...a]},this.resumeNextHandoff()}else Wn.warn("formStates is empty, no handoffs to perform")}else Wn.warn("No formStates available for handoff sequence")}},{key:"resumeNextHandoff",value:function(){var e,t,n=this.activeHandoffSequence;if(!n)return Wn.warn("No active handoff sequence to resume"),void this.manager.resume();if(0===n.remainingKeys.length)return Wn.info("All handoffs in the sequence are complete"),this.activeHandoffSequence=null,void this.manager.resume();var a=n.remainingKeys.shift(),i=n.formStates[a];Wn.debug(`Starting handoff for ${a} → ${String(i)}`),this.activeHandoffSequence=n;var r=`${a}`;null===(e=(t=this.manager).handoffStepHandler)||void 0===e||e.call(t,r,void 0)}}])}(),Nm=function(){function e(){s(this,e),this.flowOpen=!1,this.lastAnimatedFlowProgress=new Map,this.navGraphCache=new WeakMap}return c(e,[{key:"resume",value:function(){e.resume()}},{key:"presentFlow",value:function(e,t,n){var a=new Wm(e,t,this,n);return this.flowOpen=!0,this.currentFlow=a,a}},{key:"finishFlow",value:function(){this.flowOpen=!1,this.currentFlow=void 0,this.lastAnimatedFlowProgress.clear()}},{key:"getLastAnimatedFlowProgress",value:function(e){var t;return null!==(t=this.lastAnimatedFlowProgress.get(e))&&void 0!==t?t:0}},{key:"setLastAnimatedFlowProgress",value:function(e,t){this.currentFlow&&this.lastAnimatedFlowProgress.set(e,t)}},{key:"getCurrentFlowProgress",value:function(e){if(!this.currentFlow)return 1;if(!this.currentFlow.currentFlowStep)return 0;var t=this.currentFlow.steps.filter((e=>e.type===Kc));if(0===t.length)return 0;var n=this.currentFlow.stepcrumbs.filter((e=>e.type===Kc));if(0===n.length)return 0;var a=this.buildNavGraph(this.currentFlow),i=this.currentFlow.currentFlowStep,r=this.findBranchPoint(t,a),o=0;if(r)o=this.calculateBranchingProgress(n,t,i,r,a);else{var s=t.findIndex((e=>e.id===i.id));o=s>=0?(s+1)/t.length:0}return o=Math.max(0,Math.min(1,o)),e&&this.setLastAnimatedFlowProgress(e,o),o}},{key:"findBranchPoint",value:function(e,t){for(var n,a=m(e);!(n=a()).done;){var i=n.value;if(this.hasBranching(i,e,t))return i}return null}},{key:"calculateBranchingProgress",value:function(e,t,n,a,i){var r=e.length,o=t.findIndex((e=>e.id===a.id)),s=e.findIndex((e=>e.id===a.id)),u=t.findIndex((e=>e.id===n.id));if(-1===s||n.id===a.id)return(u+1)/(o+2);var l=this.countForwardScreens(n,t,i),d=r+l;return Wn.debug(`Branching progress: visited=${r}, remaining=${l}, total=${d}, step=${n.id}`),r/d}},{key:"countForwardScreens",value:function(e,t,n){var a=t.findIndex((t=>t.id===e.id));if(-1===a)return 0;var i=new Set,r=0,o=(e,s)=>{if(!i.has(e)){i.add(e);var u=(n.get(e)||[]).filter((e=>{var n=t.findIndex((t=>t.id===e));return n>a}));if(0!==u.length)for(var l,d=m(u);!(l=d()).done;){var h=l.value;o(h,s+1)}else r=Math.max(r,s)}};return o(e.id,0),r}},{key:"hasBranching",value:function(e,t,n){var a=t.findIndex((t=>t.id===e.id));if(-1===a)return!1;var i=(n.get(e.id)||[]).filter((e=>{var n=t.findIndex((t=>t.id===e));return n>a}));return i.length>1}},{key:"buildNavGraph",value:function(e){var t=this.navGraphCache.get(e);if(t)return t;var n=new Map;e.steps.forEach((e=>{e.actions&&Object.values(e.actions).forEach((t=>{Array.isArray(t)&&t.forEach((t=>{t.action&&t.action.forEach((t=>{if("flowNav"===t.function){var a,i=null===(a=t.parameters)||void 0===a?void 0:a.step;i&&(n.has(e.id)||n.set(e.id,new Set),n.get(e.id).add(i))}}))}))}))}));var a=new Map;return n.forEach(((e,t)=>{a.set(t,Array.from(e))})),this.navGraphCache.set(e,a),a}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){var e,t,n=null===(e=this.currentFlow)||void 0===e?void 0:e.currentFlowStep;if(!n)return null;var a=null===(t=n.actions)||void 0===t?void 0:t[tm];if(!a)return null;for(var i,r=m(a);!(i=r()).done;)for(var o,s,u=m(null!==(o=i.value.action)&&void 0!==o?o:[]);!(s=u()).done;){var l,d=s.value;if((d.function===Vc.NAVIGATE||d.function===Vc.NEXT)&&null!=(null===(l=d.parameters)||void 0===l?void 0:l.delay)){var h=d.parameters.delay,c=Number(h);if(!isNaN(c)&&c>0)return c/1e3}}return null}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"registerStepHandoff",value:function(e){this.instance.handoffStepHandler=e}},{key:"registerEventHandler",value:function(e){this.instance.eventHandler=e}},{key:"resume",value:function(){var t=e.instance,n=t.flowOpen,a=t.currentFlow;if(n&&a&&a.currentFlowStep){if(a.activeHandoffSequence)return Wn.debug(`Resuming flow at handoff sequence ${a.currentFlowStep.id}`),void a.resumeNextHandoff();Wn.debug(`Resuming flow at step ${a.currentFlowStep.id}`),a.executeLifecycle(a.currentFlowStep,"__resume__")}else Wn.warn("Cannot resume: no active flow or current step")}},{key:"finish",value:function(){var t=e.instance,n=t.flowOpen,a=t.currentFlow;n&&a&&a.currentFlowStep?(Wn.debug(`Finishing flow programmatically at step ${a.currentFlowStep.id}`),a.finished()):Wn.debug("Cannot finish: no active flow or current step")}},{key:"pause",value:function(){var t=e.instance,n=t.flowOpen,a=t.currentFlow;n&&a&&a.currentFlowStep?!0===a.resumeFromBookmark?a.pause():Wn.warn("This flow cannot be paused"):Wn.warn("Cannot pause: no active flow or current step")}},{key:"isFlowOpen",value:function(){return e.instance.flowOpen}},{key:"getLastAnimatedFlowProgress",value:function(e){return this.instance.getLastAnimatedFlowProgress(e)}},{key:"setLastAnimatedFlowProgress",value:function(e,t){this.instance.setLastAnimatedFlowProgress(e,t)}},{key:"getCurrentFlowProgress",value:function(e){return this.instance.getCurrentFlowProgress(e)}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){return this.instance.getCurrentFlowStepAutoAdvanceDelay()}}])}();var Om=e=>{var t;return S((function(n){for(;;)if(0===n.n)return t=new Set(Array.from(document.fonts.values()).map((e=>e.family))),e.forEach((e=>{var n=jm(e);if(!t.has(n)){var a=new FontFace(n,`url(${e.file})`);document.fonts.add(a)}})),n.a(2,document.fonts.ready.then())}),null,null,null,Promise)};function jm(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function $m(e,t,n){var a,i,r,o,s,u,l,d;if("undefined"==typeof window||!e||!t)return Wn.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var h={minDistance:null!==(a=null==n?void 0:n.minDistance)&&void 0!==a?a:30,maxDuration:null!==(i=null==n?void 0:n.maxDuration)&&void 0!==i?i:600,lockAxis:null===(r=null==n?void 0:n.lockAxis)||void 0===r||r,preventScrollOnSwipe:null!==(o=null==n?void 0:n.preventScrollOnSwipe)&&void 0!==o&&o,pointerTypes:null!==(s=null==n?void 0:n.pointerTypes)&&void 0!==s?s:["touch"],passiveListeners:null===(u=null==n?void 0:n.passiveListeners)||void 0===u||u,axisHint:null!==(l=null==n?void 0:n.axisHint)&&void 0!==l?l:"y",edgeLeakThreshold:null!==(d=null==n?void 0:n.edgeLeakThreshold)&&void 0!==d?d:24},c=e.style.touchAction;h.preventScrollOnSwipe&&(e.style.touchAction="none");var m=null,f=0,v=0,p=0,g=0,y=0,b=null,w=null,k=!1,S=!1,E=!1,M=e=>{try{var t=window.getComputedStyle(e);if(!t)return!1;var n=t.overflowY;if("auto"!==n&&"scroll"!==n)return!1;var a=e;return a.scrollHeight>a.clientHeight}catch(e){return!1}},P=e=>h.pointerTypes.includes(e.pointerType),T=t=>{var n=t.composedPath?t.composedPath()[0]:t.target;if(P(t)&&null===m){m=t.pointerId,f=p=t.clientX,v=g=t.clientY,y=performance.now(),b=null,E=!1,k=!1,S=!1,(w="y"===h.axisHint?((e,t)=>{for(var n=e;n&&n!==t&&n instanceof HTMLElement;){var a,i;if(M(n))return n;n=n.parentElement||(null!==(a=null===(i=n.parentNode)||void 0===i?void 0:i.host)&&void 0!==a?a:null)}return null})(n,e):null)||(S=!0);try{var a;null==e||null===(a=e.setPointerCapture)||void 0===a||a.call(e,t.pointerId)}catch(e){try{var i;null==n||null===(i=n.setPointerCapture)||void 0===i||i.call(n,t.pointerId)}catch(e){}}}},_=e=>{if(e.pointerId===m&&P(e)){if(p=e.clientX,g=e.clientY,h.lockAxis&&!b){var n=Math.abs(p-f),a=Math.abs(g-v);(n>2||a>2)&&(b=a>=n?"y":"x")}if("y"===h.axisHint&&("y"===b||!h.lockAxis)){var i=g-v,r=i<0?"up":"down",o=Math.abs(i),s=performance.now()-y,u=o/Math.max(s,1),l=o>=h.minDistance||u>.5;if(w)if(l)S=!0;else if(((e,t)=>!!e&&("down"===t?e.scrollTop>0:e.scrollTop+e.clientHeight<e.scrollHeight-1))(w,r)){if(!(("down"===r&&w.scrollTop<=50||"up"===r&&w.scrollTop+w.clientHeight>=w.scrollHeight-50)&&u>.3))return void(k=!0);S=!0}else S=!0;var d=!w||o>=h.edgeLeakThreshold;if(!E&&!k&&S&&d&&o>=h.minDistance){E=!0;var c=performance.now(),M={direction:"up"===r?"up":"down",distanceX:p-f,distanceY:i,absX:Math.abs(p-f),absY:o,duration:c-y,velocity:o/Math.max(c-y,1),startX:f,startY:v,endX:p,endY:g,startedAt:y,endedAt:c,originalEvent:e};t(M)}}}},D=e=>{if(e.pointerId===m)if(P(e))if(w)A();else if(E||k)A();else{var n,a=performance.now(),i=a-y,r=p-f,o=g-v,s=Math.abs(r),u=Math.abs(o),l="x"===(n=h.lockAxis&&b?b:"x"===h.axisHint?"x":"y"===h.axisHint?"y":s>=u?"x":"y")?s:u,d=i<=h.maxDuration,c=h.minDistance;if(w&&"y"===n&&S&&(c+=h.edgeLeakThreshold),d&&l>=c){var M;M="x"===n?r>0?"right":"left":o>0?"down":"up";var T=l/Math.max(i,1);t({direction:M,distanceX:r,distanceY:o,absX:s,absY:u,duration:i,velocity:T,startX:f,startY:v,endX:p,endY:g,startedAt:y,endedAt:a,originalEvent:e})}A()}else A()},A=()=>{m=null,b=null,y=0,w=null,S=!1,k=!1,E=!1},x=!!h.passiveListeners&&{passive:!0},C=h.passiveListeners?{passive:!0,capture:!0}:{capture:!0};e.addEventListener("pointerdown",T,C),e.addEventListener("pointermove",_,x),e.addEventListener("pointerup",D,x),e.addEventListener("pointercancel",D,x),e.addEventListener("lostpointercapture",D,x);return{destroy:()=>{e.removeEventListener("pointerdown",T,C),e.removeEventListener("pointermove",_,x),e.removeEventListener("pointerup",D,x),e.removeEventListener("pointercancel",D,x),e.removeEventListener("lostpointercapture",D,x),h.preventScrollOnSwipe&&(e.style.touchAction=c),A()},updateOptions:t=>{Object.assign(h,t),"boolean"==typeof t.preventScrollOnSwipe&&(t.preventScrollOnSwipe?e.style.touchAction="none":e.style.touchAction=c)}}}var zm,Bm,Hm,Um,Gm,Vm,Xm,Km,Ym,qm,Jm,Qm=e=>e,Zm=function(){function n(e,t,a){var i;return s(this,n),(i=o(this,n)).pages=[],i.currentOffset=0,i.presentationStyle="fullscreen",i.formFactor=uu(),i.timeSpentOnPaywall=0,i.animation={transition:"none",direction:"forward"},i._originalBodyStyles={},i._originalDocumentStyles={},i._savedScrollY=0,i._sheetDragStartY=0,i._sheetIsDragging=!1,i._dismissThreshold=100,i.type=e,i.value=t,i.context=a,i.setPaywallData(),w(i,i)}return g(n,e.LitElement),c(n,[{key:"setPaywallData",value:function(){var e=Pu(this.value,this.type);this.paywall=e.paywall,this.campaign=e.campaign}},{key:"getPresentationStyle",value:function(e){var t,n,a=null==e||null===(t=e.template)||void 0===t||null===(t=t.initialState)||void 0===t?void 0:t.presentation_style;return(n=a)&&cc.has(n)?"sheet"===n?"fullscreen":n:"fullscreen"}},{key:"isHalfSheet",get:function(){return"compact_sheet"===this.presentationStyle}},{key:"connectedCallback",value:function(){var e;T(n,"connectedCallback",this)([]),null!==(e=window.TVJS)&&void 0!==e&&e.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),document.addEventListener("keydown",this.handleKeyDownEvent.bind(this)),this._swipeHandler=$m(this,this.handleSwipeEvent.bind(this),{axisHint:"y",lockAxis:!0,minDistance:25,edgeLeakThreshold:15,preventScrollOnSwipe:!1,pointerTypes:["touch"]}),this.presentationStyle=this.getPresentationStyle(this.paywall),this.setOriginalStyles()}},{key:"disconnectedCallback",value:function(){var e,t;T(n,"disconnectedCallback",this)([]),Kr.clearLaunchId(),null!==(e=window.TVJS)&&void 0!==e&&e.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this.handleKeyDownEvent.bind(this)),ju.getInstance().removeAllListeners(kn),this.restoreStyles(),null===(t=this._halfSheetAbortController)||void 0===t||t.abort(),this._swipeHandler.destroy()}},{key:"setOriginalStyles",value:function(){"television"===this.formFactor&&(this._originalBodyStyles.overflow=document.body.style.overflow,document.body.style.overflow="hidden"),this._originalBodyStyles.background=document.body.style.background,"phone"===this.formFactor&&(this._originalBodyStyles["overscroll-behavior"]=document.body.style.overscrollBehavior?document.body.style.overscrollBehavior:null,this._originalDocumentStyles["overscroll-behavior"]=document.documentElement.style.overscrollBehavior?document.documentElement.style.overscrollBehavior:null,document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none",this.isHalfSheet||(this._originalBodyStyles.overflow=document.body.style.overflow,document.body.style.overflow="hidden")),this.isHalfSheet&&(this._savedScrollY=window.scrollY,this._originalBodyStyles.position=document.body.style.position||null,this._originalBodyStyles.top=document.body.style.top||null,this._originalBodyStyles.width=document.body.style.width||null,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%")}},{key:"restoreStyles",value:function(){Object.entries(this._originalBodyStyles).forEach((([e,t])=>{null!==t?document.body.style.setProperty(e,t):document.body.style.removeProperty(e)})),Object.entries(this._originalDocumentStyles).forEach((([e,t])=>{null!==t?document.documentElement.style.setProperty(e,t):document.documentElement.style.removeProperty(e)})),this._savedScrollY>0&&(window.scrollTo(0,this._savedScrollY),this._savedScrollY=0)}},{key:"handleKeyDownEvent",value:function(e){!this.flow||10009!==e.keyCode&&"Backspace"!==e.key&&"GoBack"!==e.key||this.flow.triggerActions(um)}},{key:"handleSwipeEvent",value:function({direction:e}){var t;if("down"===e)null===(t=this.flow)||void 0===t||t.triggerActions("__swipe_down__");else if("up"===e){var n;null===(n=this.flow)||void 0===n||n.triggerActions("__swipe_up__")}}},{key:"setupHalfSheetDragTracking",value:function(){var e,t,n;null===(e=this._halfSheetAbortController)||void 0===e||e.abort(),this._halfSheetAbortController=new AbortController;var a=this._halfSheetAbortController.signal,i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"),r=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelector(".nami-half-sheet-content");if(i&&r){i.addEventListener("touchstart",(e=>{r.scrollTop>0||(this._sheetDragStartY=e.touches[0].clientY,this._sheetIsDragging=!0)}),{passive:!0,signal:a}),i.addEventListener("touchmove",(e=>{if(this._sheetIsDragging){var t=e.touches[0].clientY-this._sheetDragStartY;t>0&&(i.style.transform=`translateY(${t}px)`,i.style.transition="none",e.preventDefault())}}),{passive:!1,signal:a}),i.addEventListener("touchend",(()=>{if(this._sheetIsDragging){this._sheetIsDragging=!1;var e,t,n=i.style.transform.match(/translateY\((\d+(?:\.\d+)?)px\)/);if((n?parseFloat(n[1]):0)>this._dismissThreshold)if(null!==(e=null===(t=this.flow)||void 0===t?void 0:t.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==e&&e){var a;i.style.transform="translateY(0)",i.style.transition="transform 0.2s ease-out",null===(a=this.flow)||void 0===a||a.triggerActions("__swipe_down__")}else{var r;i.style.transform="translateY(100%)",i.style.transition="transform 0.2s ease-in";var o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(".nami-half-sheet-backdrop");o&&o.classList.add("nami-dismissing"),setTimeout((()=>{var e;null===(e=this.flow)||void 0===e||e.finished()}),200)}else i.style.transform="translateY(0)",i.style.transition="transform 0.2s ease-out"}}),{signal:a})}}},{key:"setupHalfSheetFocusTrap",value:function(){var e,t,n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".nami-half-sheet-container");if(n){n.focus();var a=null===(t=this._halfSheetAbortController)||void 0===t?void 0:t.signal;n.addEventListener("keydown",(e=>{if("Tab"===e.key){var t=n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0!==t.length){var a,i,r=t[0],o=t[t.length-1];if(e.shiftKey)document.activeElement!==r&&(null===(a=this.shadowRoot)||void 0===a?void 0:a.activeElement)!==r||(e.preventDefault(),o.focus());else document.activeElement!==o&&(null===(i=this.shadowRoot)||void 0===i?void 0:i.activeElement)!==o||(e.preventDefault(),r.focus())}}}),a?{signal:a}:void 0)}}},{key:"firstUpdated",value:function(){this.timeSpentOnPaywall=Date.now(),Os(this.campaign)&&(this.flow=Nm.instance.presentFlow(this.campaign,this,this.context)),this.isHalfSheet&&this.updateComplete.then((()=>{this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()}))}},{key:"updated",value:function(e){T(n,"updated",this)([e]),this.isHalfSheet&&e.has("presentationStyle")&&(this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap())}},{key:"getAnimationStyles",value:function(e){var t="backward"===this.animation.direction?-1:1;switch(this.animation.transition){case"verticalSlide":return`transform: translateY(${100*(e-this.currentOffset)*t}vh);`;case"slide":return`transform: translateX(${100*(e-this.currentOffset)*t}vw);`;case"fade":return`opacity: ${e===this.currentOffset?1:0};`;default:return""}}},{key:"updatePages",value:function(e){var t;return S((function(n){for(;;)switch(n.n){case 0:if(0!==this.pages.length&&"none"!==this.animation.transition){n.n=1;break}return this.pages=[e],n.a(2);case 1:if((null==(t=this.pages[this.pages.length-1])?void 0:t.id)!==e.id){n.n=2;break}return n.a(2);case 2:return this.pages=[t,e],this.currentOffset=0,n.n=3,r(this.updateComplete);case 3:requestAnimationFrame((()=>{this.currentOffset=1,setTimeout((()=>{this.pages=[e],this.currentOffset=0,this.paywall=e}),250)}));case 4:return n.a(2)}}),null,this,null,Promise)}},{key:"flowNavigateToScreen",value:function(e,t){var n,a,i,o;return S((function(s){for(;;)switch(s.n){case 0:if(null!==(n=this.flow)&&void 0!==n&&n.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,nm),i=this.presentationStyle,o=this.getPresentationStyle(e),"fullscreen"!==i||"compact_sheet"!==o){s.n=1;break}console.warn("Unsupported transition: fullscreen → compact_sheet. Presenting as fullscreen."),s.n=4;break;case 1:if("compact_sheet"!==i||"fullscreen"!==o&&"sheet"!==o){s.n=3;break}return s.n=2,r(this.animateHalfSheetExpand());case 2:this.presentationStyle="fullscreen",s.n=4;break;case 3:this.presentationStyle=o;case 4:return this.animation=t,s.n=5,r(this.updatePages(e));case 5:null!==(a=this.flow)&&void 0!==a&&a.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,tm);case 6:return s.a(2)}}),null,this,null,Promise)}},{key:"animateHalfSheetExpand",value:function(){var e,t;return S((function(n){for(;;)switch(n.n){case 0:if(t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".nami-half-sheet-container")){n.n=1;break}return n.a(2);case 1:return t.classList.add("nami-expanding"),n.n=2,r(new Promise((e=>setTimeout(e,300))));case 2:return n.a(2)}}),null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return Xh.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?e.html(zm||(zm=Qm``)):this.isHalfSheet?this.renderHalfSheet():e.html(Bm||(Bm=Qm`
|
|
92
92
|
<div class="nami-flow-container">
|
|
93
93
|
${0}
|
|
94
94
|
</div>
|
|
@@ -123,6 +123,8 @@
|
|
|
123
123
|
:host {
|
|
124
124
|
box-sizing: border-box;
|
|
125
125
|
width: 100%;
|
|
126
|
+
height: 100vh;
|
|
127
|
+
height: 100dvh;
|
|
126
128
|
display: block;
|
|
127
129
|
}
|
|
128
130
|
:host(.nami-disabled) {
|
|
@@ -130,8 +132,8 @@
|
|
|
130
132
|
}
|
|
131
133
|
.nami-flow-container {
|
|
132
134
|
position: relative;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
height: 100vh;
|
|
136
|
+
height: 100dvh;
|
|
135
137
|
overflow: hidden;
|
|
136
138
|
|
|
137
139
|
/* Safe area support for iOS */
|
|
@@ -262,7 +264,7 @@
|
|
|
262
264
|
`),t,t,t,function(e){return db[e]||db.CheckCircleOutlined}(t))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();oe([Hc({type:Object})],ex.prototype,"component",void 0),oe([Hc({type:Boolean})],ex.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],ex.prototype,"scaleFactor",void 0),ex=oe([yc("nami-symbol")],ex);var tx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Df),c(t,[{key:"styles",value:function(){var t=this.component,n=this.scaleFactor,a=this.inFocusedState,i=t.hidden,r=t.fontSize,o=t.alignment,s=t.strikethrough,u=t.spacing;return e.unsafeCSS(`\n :host {\n line-height: ${qA(r,n)}px;\n display: ${i?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${Gf(t,a)}\n ${JA(t,a)}\n font-size: ${(null!=r?r:YA)*n}px;\n text-align: ${o||"center"};\n ${nv("string"!=typeof s&&s)}\n ${av(t.fontName)}\n ${iv(t,n,a)}\n ${KA(t)}\n ${Vf(t)}\n ${function({alignment:e,horizontalAlignment:t}){return Lf("justify-content",t&&Cf[t]?Cf[t]:e&&Cf[e]?Cf[e]:"center")}(t)}\n }\n :host > :not(:first-child) {\n margin-top: ${u||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n line-height: ${qA(r,n)}px;\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${Gf(t,a)}\n ${JA(t,a)}\n font-size: ${(null!=r?r:YA)*n}px;\n text-align: ${o||"center"};\n ${nv("string"!=typeof s&&s)}\n ${av(t.fontName)}\n }\n ${KA(t,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n line-height: ${qA(r,n)}px;\n }\n `)}},{key:"render",value:function(){var t=this.component,n=t.fontColor,a=t.fontSize,i=t.activeFontColor,r=t.bulletComponent,o=t.texts,s=t.spacing,u=r?f({fontColor:n,fontSize:a,activeFontColor:i,spacing:s},r):null;if(!Array.isArray(o))return e.html(BA||(BA=XA``));var l=o.map((t=>t?e.html(HA||(HA=XA`<nami-text-list-item-wrapper .component=${0} .scaleFactor=${0}>
|
|
263
265
|
${0}
|
|
264
266
|
<div class="bullet-text-wrapper" .innerHTML="${0}"></div>
|
|
265
|
-
</nami-text-list-item-wrapper>`),this.component,this.scaleFactor,u&&e.html(UA||(UA=XA`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),uy(t)):null));return e.html(GA||(GA=XA`${0}`),l)}}])}();oe([Hc({type:Object})],tx.prototype,"component",void 0),oe([Hc({type:Boolean})],tx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],tx.prototype,"scaleFactor",void 0),tx=oe([yc("nami-text-list")],tx);(()=>{var e,t=!0;try{new RegExp("","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var n=null===(e=uy.Lexer)||void 0===e?void 0:e.rules,a=null==n?void 0:n.inline;a&&Object.values(a).forEach((e=>{e&&Object.keys(e).forEach((t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",n=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),a=e.flags.replace(/u/g,"");return new RegExp(n,a)})(e[t])}))}))}})();var nx=function(){function t(){var e;return s(this,t),(e=o(this,t)).inFocusedState=!1,e.scaleFactor=1,e.handleFocusIn=()=>e.setFocusState(!0),e.handleFocusOut=t=>{var n,a,i=null!==(n=t.relatedTarget)&&void 0!==n?n:null;if(!i)return e.setFocusState(!1);i===e||null!==(a=e.shadowRoot)&&void 0!==a&&a.contains(i)||e.setFocusState(!1)},e.handleFocusChanged=t=>{var n=t.detail;e.setFocusState(!0===(null==n?void 0:n.inFocusedState))},e.addEventListener("focusin",e.handleFocusIn),e.addEventListener("focusout",e.handleFocusOut),e.addEventListener("focus-changed",e.handleFocusChanged),e}return g(t,Df),c(t,[{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var t=this.component,n=this.scaleFactor,a=this.minSDKVersion,i=t.backgroundBlur,r="vertical"===t.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=t.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${t.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(Gf(t,!1));return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${t.hidden?"none":"flex"};\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${u};\n ${ov(t.position)}\n ${Vf(t)}\n ${iv(t,n,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Gf(t,!0)}\n ${iv(t,n,!0)}\n }\n :host(:focus-visible){\n ${dv(t)}\n }\n :host > * {\n ${Kf(a,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${t.spacing?t.spacing*n:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>Qv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}},{key:"setFocusState",value:function(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();oe([Hc({type:Object})],nx.prototype,"component",void 0),oe([Hc({type:Boolean})],nx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],nx.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],nx.prototype,"minSDKVersion",void 0),nx=oe([yc("nami-container")],nx);var ax=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Df),c(t,[{key:"styles",value:function(){var t=this.component.backgroundBlur,n="vertical"===this.component.direction,a=n?"width":"height",i=n?"margin-top":"margin-left",r=this.component.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(Gf(this.component,!1));return e.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${t?`backdrop-filter: blur(${t}px);`:""}\n ${ov(this.component.position)}\n ${Vf(this.component)}\n ${iv(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${i}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Gf(this.component,!0)}\n ${iv(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${dv(this.component)}\n }\n :host > * {\n ${a}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;zu(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,n=this.contextProvider.state,a=n.mediaList,i=n.currentGroupId,r=n.selectedPaywall,o=n.formFactor,s=Rd(this.contextProvider.productDetails,null!==(e=null==r?void 0:r.sku_menus)&&void 0!==e?e:[],(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||i);return pv(this.contextProvider,s,this.component,a).map((([e,t])=>(this.inFocusedState="television"==o?e:this.inFocusedState,t.map((e=>Qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))))}}])}();oe([Hc({type:Object})],ax.prototype,"component",void 0),oe([Hc({type:Boolean})],ax.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],ax.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],ax.prototype,"minSDKVersion",void 0),ax=oe([yc("nami-product-container")],ax);var ix,rx,ox=e=>e,sx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Df),c(t,[{key:"styles",value:function(){var t,n,a=this.component,i=a.imageCropping,r=a.alignment,o=a.height,s=a.width,u=a.rightMargin,l=a.spacing,d=a.hidden,h=a.blur,c="fit"===i,m=this.contextConsumer.state.formFactor;return e.unsafeCSS(`\n :host {\n display: ${"television"===m?"flex":"inline-block"};\n ${d?"display:none;":""}\n position: relative;\n height: ${zf(null!=o?o:"100%",this.scaleFactor)};\n width: ${zf(null!==(t="fitContent"==s?o:s)&&void 0!==t?t:"100%",this.scaleFactor)};\n }\n :host img {\n transition: all 0.3s;\n object-fit: ${c?"contain":"cover"};\n object-position: ${r} center;\n height: ${zf(null!=o?o:"100%",this.scaleFactor)};\n width: ${zf(null!==(n="fitContent"==s?o:s)&&void 0!==n?n:"100%",this.scaleFactor)};\n margin-right: ${u||l||0}px;\n ${h?`filter: blur(${h}px);`:""}\n flex-shrink: ${"number"==typeof s?0:1};\n }\n `)}},{key:"render",value:function(){var t,n=this.component,a=n.url,i=n.alt,r=n.title,o=n.focusedBorderColor,s=n.focusedFillColor,u=n.fillColor;return a?(!o&&qv(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(t=null!=i?i:r)&&void 0!==t?t:"",e.html(ix||(ix=ox`<img src="${0}" alt="${0}" />`),a,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,e.html(rx||(rx=ox``)))}}])}();oe([Hc({type:Object})],sx.prototype,"component",void 0),oe([Hc({type:Boolean})],sx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],sx.prototype,"scaleFactor",void 0),sx=oe([yc("nami-image")],sx);var ux=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).fullscreen=!1,e.inFocusedState=!1,e.scaleFactor=1,e}return g(t,Df),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this)([]),document.body.style.background=this.component.fillColor||"transparent"}},{key:"styles",value:function(){var t;if(!this.contextConsumer||!this.component)return e.unsafeCSS("");var n=this.component,a=this.scaleFactor,i=this.contextConsumer.state.formFactor,r=n.backgroundBlur,o="vertical"===n.direction?"margin-top":"margin-left";return e.unsafeCSS(`\n :host {\n max-height: ${"television"===i?"100vh":""};\n display: ${n.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Xf(n)}\n position: fixed;\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(t=n.zIndex)&&void 0!==t?t:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${Gf(n,!1)}\n transition: all 0.3s;\n ${qf(n,a)}\n }\n :host(:focus){\n ${Gf(n,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${n.spacing?n.spacing*a:0}px;\n }\n `)}},{key:"updated",value:function(){var e,t,n=Array.from(document.getElementsByTagName("nami-paywall")),a=null===(e=this.component.fillColor)||void 0===e?void 0:e.includes("gradient"),i=null===(t=this.shadowRoot)||void 0===t?void 0:t.innerHTML.includes("nami-image");n[0]&&(n[0].style.position=!i||a?"relative":"","undefined"!=typeof window&&"undefined"!=typeof CSS&&CSS.supports("height: 100dvh")?n[0].style.minHeight=!i||a?"100dvh":"100%":n[0].style.minHeight=!i||a?"100vh":"100%")}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>Qv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}}])}();oe([Hc({type:Object})],ux.prototype,"component",void 0),oe([Hc({type:Boolean})],ux.prototype,"fullscreen",void 0),oe([Hc({type:Boolean})],ux.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],ux.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],ux.prototype,"minSDKVersion",void 0),ux=oe([yc("nami-background-container")],ux);var lx,dx=e=>e,hx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).zIndex=2,e.inFocusedState=!1,e.scaleFactor=1,e}return g(t,Df),c(t,[{key:"styles",value:function(){var t=this.contextConsumer,n=this.component,a=this.zIndex,i=this.scaleFactor;if(!t)return e.css(lx||(lx=dx``));var r=t.state.formFactor,o=n.backgroundBlur,s="phone"!==r?"width: 100%;":"",u="vertical"===n.direction?"margin-top":"margin-left";return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Vf(n)}\n ${Zf(n,i)}\n ${s}\n align-items: center;\n justify-content: flex-start;\n justify-content: start;\n ${o?`backdrop-filter: blur(${o}px);`:""}\n z-index: ${a};\n transition: all 0.3s;\n overflow-y: ${"television"===r?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${qf(n,i)}\n ${Gf(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Gf(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${u}: ${n.spacing?n.spacing*i:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map((e=>Qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))||[]}}])}();oe([Hc({type:Object})],hx.prototype,"component",void 0),oe([Hc({type:Number})],hx.prototype,"zIndex",void 0),oe([Hc({type:Boolean})],hx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],hx.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],hx.prototype,"minSDKVersion",void 0),hx=oe([yc("nami-content-container")],hx);var cx,mx=e=>e,fx=function(){function t(){var e;return s(this,t),(e=o(this,t)).inFocusedState=!1,e.scaleFactor=1,e._handleClick=t=>{t.preventDefault(),Cp({contextProvider:e.contextProvider,onTap:e.component.onTap})},e.addEventListener("click",e._handleClick),e}return g(t,Df),c(t,[{key:"styles",value:function(){var t,n,a=sv("active",this.component.components[0]),i=sv("inactive",this.component.components[0]);return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Vf(this.component)}\n ${Gf(this.component,!1)}\n ${iv(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Gf(this.component,!0)}\n ${iv(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${dv(this.component)}\n }\n .toggle{\n ${t=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${$f(n,t.topPadding)}px;\n bottom: ${$f(n,t.bottomPadding)}px;\n width: calc(50% - ${$f(n,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${uv(i,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${uv(a,this.scaleFactor,!0)}\n }\n \n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${Gf(a,!0)}\n ${lv(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${Gf(a,!0)}\n ${lv(a,this.scaleFactor)}\n `)}},{key:"render",value:function(){this.role="tablist";var t=this.component.components.map((e=>Qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)));return e.html(cx||(cx=mx`${0}<div class="toggle"></div>`),t)}}])}();oe([Hc({type:Object})],fx.prototype,"component",void 0),oe([Hc({type:Boolean})],fx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],fx.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],fx.prototype,"minSDKVersion",void 0),fx=oe([yc("nami-segment-picker")],fx);var vx,px=e=>e,gx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e._handleFocus=()=>{e.inFocusedState=!0,e._announceButtonLabel()},e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||e._handleClick()},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return g(t,Df),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_announceButtonLabel",value:function(){var e=this.component.text||"";e&&lc(e)}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var n=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(n.formId){var a=this._getParentFormId();a&&this.contextProvider.state.formStates[a]&&(this._isActive=this.contextProvider.state.formStates[a]===n.formId)}else this._isActive=zu(n.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var i=this.getRootNode();if(i instanceof ShadowRoot)i.querySelectorAll("nami-segment-picker-item").forEach((e=>{e!==this&&e.requestUpdate("component",e)}))}}}},{key:"styles",value:function(){var t,n,a=sv("active",this.component),i=sv("inactive",this.component);return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${uv(f({},i,this.component),this.scaleFactor,this.inFocusedState)}\n ${tv(null!==(t=this.component.inactiveDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${lv(f({},a,this.component),this.scaleFactor)}\n ${tv(null!==(n=this.component.activeDropShadow)&&void 0!==n?n:this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",e.html(vx||(vx=px`<input type="radio"
|
|
267
|
+
</nami-text-list-item-wrapper>`),this.component,this.scaleFactor,u&&e.html(UA||(UA=XA`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),uy(t)):null));return e.html(GA||(GA=XA`${0}`),l)}}])}();oe([Hc({type:Object})],tx.prototype,"component",void 0),oe([Hc({type:Boolean})],tx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],tx.prototype,"scaleFactor",void 0),tx=oe([yc("nami-text-list")],tx);(()=>{var e,t=!0;try{new RegExp("","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var n=null===(e=uy.Lexer)||void 0===e?void 0:e.rules,a=null==n?void 0:n.inline;a&&Object.values(a).forEach((e=>{e&&Object.keys(e).forEach((t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",n=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),a=e.flags.replace(/u/g,"");return new RegExp(n,a)})(e[t])}))}))}})();var nx=function(){function t(){var e;return s(this,t),(e=o(this,t)).inFocusedState=!1,e.scaleFactor=1,e.handleFocusIn=()=>e.setFocusState(!0),e.handleFocusOut=t=>{var n,a,i=null!==(n=t.relatedTarget)&&void 0!==n?n:null;if(!i)return e.setFocusState(!1);i===e||null!==(a=e.shadowRoot)&&void 0!==a&&a.contains(i)||e.setFocusState(!1)},e.handleFocusChanged=t=>{var n=t.detail;e.setFocusState(!0===(null==n?void 0:n.inFocusedState))},e.addEventListener("focusin",e.handleFocusIn),e.addEventListener("focusout",e.handleFocusOut),e.addEventListener("focus-changed",e.handleFocusChanged),e}return g(t,Df),c(t,[{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var t=this.component,n=this.scaleFactor,a=this.minSDKVersion,i=t.backgroundBlur,r="vertical"===t.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=t.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${t.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(Gf(t,!1));return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${t.hidden?"none":"flex"};\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${u};\n ${ov(t.position)}\n ${Vf(t)}\n ${iv(t,n,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Gf(t,!0)}\n ${iv(t,n,!0)}\n }\n :host(:focus-visible){\n ${dv(t)}\n }\n :host > * {\n ${Kf(a,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${t.spacing?t.spacing*n:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>Qv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}},{key:"setFocusState",value:function(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();oe([Hc({type:Object})],nx.prototype,"component",void 0),oe([Hc({type:Boolean})],nx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],nx.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],nx.prototype,"minSDKVersion",void 0),nx=oe([yc("nami-container")],nx);var ax=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Df),c(t,[{key:"styles",value:function(){var t=this.component.backgroundBlur,n="vertical"===this.component.direction,a=n?"width":"height",i=n?"margin-top":"margin-left",r=this.component.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(Gf(this.component,!1));return e.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${t?`backdrop-filter: blur(${t}px);`:""}\n ${ov(this.component.position)}\n ${Vf(this.component)}\n ${iv(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${i}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Gf(this.component,!0)}\n ${iv(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${dv(this.component)}\n }\n :host > * {\n ${a}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;zu(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,n=this.contextProvider.state,a=n.mediaList,i=n.currentGroupId,r=n.selectedPaywall,o=n.formFactor,s=Rd(this.contextProvider.productDetails,null!==(e=null==r?void 0:r.sku_menus)&&void 0!==e?e:[],(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||i);return pv(this.contextProvider,s,this.component,a).map((([e,t])=>(this.inFocusedState="television"==o?e:this.inFocusedState,t.map((e=>Qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))))}}])}();oe([Hc({type:Object})],ax.prototype,"component",void 0),oe([Hc({type:Boolean})],ax.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],ax.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],ax.prototype,"minSDKVersion",void 0),ax=oe([yc("nami-product-container")],ax);var ix,rx,ox=e=>e,sx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Df),c(t,[{key:"styles",value:function(){var t,n,a=this.component,i=a.imageCropping,r=a.alignment,o=a.height,s=a.width,u=a.rightMargin,l=a.spacing,d=a.hidden,h=a.blur,c="fit"===i,m=this.contextConsumer.state.formFactor;return e.unsafeCSS(`\n :host {\n display: ${"television"===m?"flex":"inline-block"};\n ${d?"display:none;":""}\n position: relative;\n height: ${zf(null!=o?o:"100%",this.scaleFactor)};\n width: ${zf(null!==(t="fitContent"==s?o:s)&&void 0!==t?t:"100%",this.scaleFactor)};\n }\n :host img {\n transition: all 0.3s;\n object-fit: ${c?"contain":"cover"};\n object-position: ${r} center;\n height: ${zf(null!=o?o:"100%",this.scaleFactor)};\n width: ${zf(null!==(n="fitContent"==s?o:s)&&void 0!==n?n:"100%",this.scaleFactor)};\n margin-right: ${u||l||0}px;\n ${h?`filter: blur(${h}px);`:""}\n flex-shrink: ${"number"==typeof s?0:1};\n }\n `)}},{key:"render",value:function(){var t,n=this.component,a=n.url,i=n.alt,r=n.title,o=n.focusedBorderColor,s=n.focusedFillColor,u=n.fillColor;return a?(!o&&qv(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(t=null!=i?i:r)&&void 0!==t?t:"",e.html(ix||(ix=ox`<img src="${0}" alt="${0}" />`),a,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,e.html(rx||(rx=ox``)))}}])}();oe([Hc({type:Object})],sx.prototype,"component",void 0),oe([Hc({type:Boolean})],sx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],sx.prototype,"scaleFactor",void 0),sx=oe([yc("nami-image")],sx);var ux=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).fullscreen=!1,e.inFocusedState=!1,e.scaleFactor=1,e}return g(t,Df),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this)([]),document.body.style.background=this.component.fillColor||"transparent"}},{key:"styles",value:function(){var t;if(!this.contextConsumer||!this.component)return e.unsafeCSS("");var n=this.component,a=this.scaleFactor,i=this.contextConsumer.state.formFactor,r=n.backgroundBlur,o="vertical"===n.direction?"margin-top":"margin-left";return e.unsafeCSS(`\n :host {\n max-height: ${"television"===i?"100vh":""};\n display: ${n.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Xf(n)}\n position: fixed;\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(t=n.zIndex)&&void 0!==t?t:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${Gf(n,!1)}\n transition: all 0.3s;\n ${qf(n,a)}\n }\n :host(:focus){\n ${Gf(n,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${n.spacing?n.spacing*a:0}px;\n }\n `)}},{key:"updated",value:function(){var e,t,n=Array.from(document.getElementsByTagName("nami-paywall")),a=null===(e=this.component.fillColor)||void 0===e?void 0:e.includes("gradient"),i=null===(t=this.shadowRoot)||void 0===t?void 0:t.innerHTML.includes("nami-image");n[0]&&(n[0].style.position=!i||a?"relative":"","undefined"!=typeof window&&"undefined"!=typeof CSS&&CSS.supports("height: 100dvh")?n[0].style.minHeight=!i||a?"100dvh":"100%":n[0].style.minHeight=!i||a?"100vh":"100%")}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>Qv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}}])}();oe([Hc({type:Object})],ux.prototype,"component",void 0),oe([Hc({type:Boolean})],ux.prototype,"fullscreen",void 0),oe([Hc({type:Boolean})],ux.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],ux.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],ux.prototype,"minSDKVersion",void 0),ux=oe([yc("nami-background-container")],ux);var lx,dx=e=>e,hx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).zIndex=2,e.inFocusedState=!1,e.scaleFactor=1,e}return g(t,Df),c(t,[{key:"styles",value:function(){var t,n=this.contextConsumer,a=this.component,i=this.zIndex,r=this.scaleFactor;if(!n)return e.css(lx||(lx=dx``));var o=n.state.formFactor,s=a.backgroundBlur,u="phone"!==o?"width: 100%;":"",l=null!==(t=a.width)&&void 0!==t?t:a.fixedWidth,d="phone"===o?"max-width:100%; "+(void 0!==l?`width: ${zf(l,r)};`:""):Zf(a,r),h="vertical"===a.direction?"margin-top":"margin-left";return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${a.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Vf(a)}\n ${d}\n ${u}\n align-items: center;\n justify-content: flex-start;\n justify-content: start;\n ${s?`backdrop-filter: blur(${s}px);`:""}\n z-index: ${i};\n transition: all 0.3s;\n overflow-y: ${"television"===o?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${qf(a,r)}\n ${Gf(a,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Gf(a,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${h}: ${a.spacing?a.spacing*r:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map((e=>Qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))||[]}}])}();oe([Hc({type:Object})],hx.prototype,"component",void 0),oe([Hc({type:Number})],hx.prototype,"zIndex",void 0),oe([Hc({type:Boolean})],hx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],hx.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],hx.prototype,"minSDKVersion",void 0),hx=oe([yc("nami-content-container")],hx);var cx,mx=e=>e,fx=function(){function t(){var e;return s(this,t),(e=o(this,t)).inFocusedState=!1,e.scaleFactor=1,e._handleClick=t=>{t.preventDefault(),Cp({contextProvider:e.contextProvider,onTap:e.component.onTap})},e.addEventListener("click",e._handleClick),e}return g(t,Df),c(t,[{key:"styles",value:function(){var t,n,a=sv("active",this.component.components[0]),i=sv("inactive",this.component.components[0]);return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Vf(this.component)}\n ${Gf(this.component,!1)}\n ${iv(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Gf(this.component,!0)}\n ${iv(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${dv(this.component)}\n }\n .toggle{\n ${t=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${$f(n,t.topPadding)}px;\n bottom: ${$f(n,t.bottomPadding)}px;\n width: calc(50% - ${$f(n,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${uv(i,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${uv(a,this.scaleFactor,!0)}\n }\n \n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${Gf(a,!0)}\n ${lv(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${Gf(a,!0)}\n ${lv(a,this.scaleFactor)}\n `)}},{key:"render",value:function(){this.role="tablist";var t=this.component.components.map((e=>Qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)));return e.html(cx||(cx=mx`${0}<div class="toggle"></div>`),t)}}])}();oe([Hc({type:Object})],fx.prototype,"component",void 0),oe([Hc({type:Boolean})],fx.prototype,"inFocusedState",void 0),oe([Hc({type:Number})],fx.prototype,"scaleFactor",void 0),oe([Hc({type:Object})],fx.prototype,"minSDKVersion",void 0),fx=oe([yc("nami-segment-picker")],fx);var vx,px=e=>e,gx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e._handleFocus=()=>{e.inFocusedState=!0,e._announceButtonLabel()},e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||e._handleClick()},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return g(t,Df),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_announceButtonLabel",value:function(){var e=this.component.text||"";e&&lc(e)}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var n=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(n.formId){var a=this._getParentFormId();a&&this.contextProvider.state.formStates[a]&&(this._isActive=this.contextProvider.state.formStates[a]===n.formId)}else this._isActive=zu(n.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var i=this.getRootNode();if(i instanceof ShadowRoot)i.querySelectorAll("nami-segment-picker-item").forEach((e=>{e!==this&&e.requestUpdate("component",e)}))}}}},{key:"styles",value:function(){var t,n,a=sv("active",this.component),i=sv("inactive",this.component);return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${uv(f({},i,this.component),this.scaleFactor,this.inFocusedState)}\n ${tv(null!==(t=this.component.inactiveDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${lv(f({},a,this.component),this.scaleFactor)}\n ${tv(null!==(n=this.component.activeDropShadow)&&void 0!==n?n:this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",e.html(vx||(vx=px`<input type="radio"
|
|
266
268
|
autocomplete="off"
|
|
267
269
|
id="${0}"
|
|
268
270
|
name="${0}"
|