@namiml/web-sdk 3.3.10 → 3.3.11

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.
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).NamiWebSdk={})}(this,(function(e){"use strict";(()=>{if("undefined"!=typeof globalThis)return;const 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(){const e=this.attributes,t=new Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=e[n].name;return t});const t=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(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=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var n,i,a,r,o,s,l,d,u,c,h,m,f=function(e,t,n,i,a){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?a.call(e,n):a?a.value=n:t.set(e,n),n},p=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};const g=e=>"boolean"==typeof e?e:e?.capture??!1;const v=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,t,n){if(null==t)return;const i=g(n)?this.__captureEventListeners:this.__eventListeners;let a=i.get(e);if(void 0===a)a=new Map,i.set(e,a);else if(a.has(t))return;const r="object"==typeof n&&n?n:{};r.signal?.addEventListener("abort",(()=>this.removeEventListener(e,t,n))),a.set(t,r??{})}removeEventListener(e,t,n){if(null==t)return;const i=g(n)?this.__captureEventListeners:this.__eventListeners,a=i.get(e);void 0!==a&&(a.delete(t),a.size||i.delete(e))}dispatchEvent(e){const t=[this];let 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;let i=!1,a=!1,r=0,o=null,s=null,l=null;const d=e.stopPropagation,u=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get:()=>o??s,...y},srcElement:{get:()=>e.target,...y},currentTarget:{get:()=>l,...y},eventPhase:{get:()=>r,...y},composedPath:{value:()=>t,...y},stopPropagation:{value:()=>{i=!0,d.call(e)},...y},stopImmediatePropagation:{value:()=>{a=!0,u.call(e)},...y}});const c=(t,n,i)=>{"function"==typeof t?t(e):"function"==typeof t?.handleEvent&&t.handleEvent(e),n.once&&i.delete(t)},h=()=>(l=null,r=0,!e.defaultPrevented),m=t.slice().reverse();o=this.__host&&e.composed?null:this;const f=e=>{for(s=this;s.__host&&e.includes(s.__host);)s=s.__host};for(const t of m){o||s&&s!==t.__host||f(m.slice(m.indexOf(t))),l=t,r=t===e.target?2:1;const n=t.__captureEventListeners.get(e.type);if(n)for(const[e,t]of n)if(c(e,t,n),a)return h();if(i)return h()}const p=e.bubbles?t:[this];s=null;for(const t of p){o||s&&t!==s.__host||f(p.slice(0,p.indexOf(t)+1)),l=t,r=t===e.target?2:3;const n=t.__eventListeners.get(e.type);if(n)for(const[e,t]of n)if(c(e,t,n),a)return h();if(i)return h()}return h()}},y={__proto__:null,enumerable:!0};Object.freeze(y);const b=(c=class{constructor(e,t={}){if(n.set(this,!1),i.set(this,!1),a.set(this,!1),r.set(this,!1),o.set(this,Date.now()),s.set(this,!1),l.set(this,void 0),d.set(this,void 0),u.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 t||!t)throw new Error('The "options" argument must be an object');const{bubbles:c,cancelable:h,composed:m}=t;f(this,n,!!h,"f"),f(this,i,!!c,"f"),f(this,a,!!m,"f"),f(this,l,`${e}`,"f"),f(this,d,null,"f"),f(this,u,!1,"f")}initEvent(e,t,n){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){f(this,r,!0,"f")}get target(){return p(this,d,"f")}get currentTarget(){return p(this,d,"f")}get srcElement(){return p(this,d,"f")}get type(){return p(this,l,"f")}get cancelable(){return p(this,n,"f")}get defaultPrevented(){return p(this,n,"f")&&p(this,r,"f")}get timeStamp(){return p(this,o,"f")}composedPath(){return p(this,u,"f")?[p(this,d,"f")]:[]}get returnValue(){return!p(this,n,"f")||!p(this,r,"f")}get bubbles(){return p(this,i,"f")}get composed(){return p(this,a,"f")}get eventPhase(){return p(this,u,"f")?c.AT_TARGET:c.NONE}get cancelBubble(){return p(this,s,"f")}set cancelBubble(e){e&&f(this,s,!0,"f")}stopPropagation(){f(this,s,!0,"f")}get isTrusted(){return!1}},n=new WeakMap,i=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,s=new WeakMap,l=new WeakMap,d=new WeakMap,u=new WeakMap,c.NONE=0,c.CAPTURING_PHASE=1,c.AT_TARGET=2,c.BUBBLING_PHASE=3,c);Object.defineProperties(b.prototype,{initEvent:y,stopImmediatePropagation:y,preventDefault:y,target:y,currentTarget:y,srcElement:y,type:y,cancelable:y,defaultPrevented:y,timeStamp:y,composedPath:y,returnValue:y,bubbles:y,composed:y,eventPhase:y,cancelBubble:y,stopPropagation:y,isTrusted:y});const w=(m=class extends b{constructor(e,t={}){super(e,t),h.set(this,void 0),f(this,h,t?.detail??null,"f")}initCustomEvent(e,t,n,i){throw new Error("Method not implemented.")}get detail(){return p(this,h,"f")}},h=new WeakMap,m);Object.defineProperties(w.prototype,{detail:y});const k=b,S=w;globalThis.Event??=k,globalThis.CustomEvent??=S;const _=new WeakMap,M=e=>{let t=_.get(e);return void 0===t&&_.set(e,t=new Map),t},E=class extends v{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(M(this)).map((([e,t])=>({name:e,value:t})))}get shadowRoot(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){M(this).set(e,String(t))}removeAttribute(e){M(this).delete(e)}toggleAttribute(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}hasAttribute(e){return M(this).has(e)}attachShadow(e){const t={host:this};return this.__shadowRootMode=e.mode,e&&"open"===e.mode&&(this.__shadowRoot=t),t}attachInternals(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");const e=new t(this);return this.__internals=e,e}getAttribute(e){return M(this).get(e)??null}},P=class extends E{};function T(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function x(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}globalThis.litServerRoot??=Object.defineProperty(new P,"localName",{get:()=>"lit-server-root"}),"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=P),"function"==typeof SuppressedError&&SuppressedError;var A;!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"}(A||(A={}));const{NAMI_SDK_VERSION:C="3.3.10",NAMI_SDK_PACKAGE_VERSION:L="3.3.10",PRODUCTION:I="production",DEVELOPMENT:D="development",PLATFORM_ID_REQUIRED:R="Platform ID is required",DEVICE_ID_REQUIRED:N="Device ID is required",EXTERNAL_ID_REQUIRED:W="External ID is required",SDK_NOT_INITIALIZED:F="SDK has not been initialized. Make sure to call Nami.configure() first!",CAMPAIGN_NOT_AVAILABLE:O="Campaign is not available",FLOW_SCREENS_NOT_AVAILABLE:$="Flow screens not available",UNABLE_TO_UPDATE_CDP_ID:j="Unable to update CDP id in anonymous mode",ANONYMOUS_MODE_ALREADY_ON:z="Anonymous mode is already turned on.",ANONYMOUS_MODE_ALREADY_OFF:H="Anonymous mode is already turned off.",ANONYMOUS_MODE_LOGIN_NOT_ALLOWED:B="Login/logout are not available in anonymous mode",SESSION_REQUIRED:U="Session is required",DEVICE_ID_NOT_SET:G="Nami Device ID is not set",AUTH_DEVICE:V="nami_auth_device",NAMI_CONFIGURATION:X="nami_configuration",NAMI_PROFILE:K="nami_profile",API_CONFIG:Y="api_config",API_CAMPAIGN_RULES:q="api_campaign_rules",API_PAYWALLS:J="api_paywalls",API_CAMPAIGN_SESSION_TIMESTAMP:Q="api_campaign_session_timestamp",API_PRODUCTS:Z="api_products",API_ACTIVE_ENTITLEMENTS:ee="api_active_entitlements",SERVER_NAMI_ENTITLEMENTS:te="server_active_entitlements",INITIAL_APP_CONFIG:ne="initial_app_config",INITIAL_CAMPAIGN_RULES:ie="initial_campaign_rules",INITIAL_PAYWALLS:ae="initial_paywalls",INITIAL_PRODUCTS:re="initial_products",LOCAL_NAMI_ENTITLEMENTS:oe="local_active_entitlements",CUSTOMER_ATTRIBUTES_KEY_PREFIX:se="nami_cmr_attributes_",NAMI_CUSTOMER_JOURNEY_STATE:le="nami_customer_journey_state",ANONYMOUS_MODE:de="nami_anonymous_mode_v2",ANONYMOUS_UUID:ue="nami_anonymous_uuid",KEY_SESSION_COUNTER:ce="nami_session_counter",INITIAL_SESSION_COUNTER_VALUE:he=1,NAMI_LAST_IMPRESSION_ID:me="nami_last_impression_id",NAMI_PURCHASE_IMPRESSION_ID:fe="nami_purchase_impression_id",NAMI_LAUNCH_ID:pe="nami_launch_id",NAMI_SESSION_ID:ge="nami_session_id",NAMI_LANGUAGE_CODE:ve="nami_language_code",NAMI_PURCHASE_CHANNEL:ye="nami_purchase_channel",API_VERSION:be="v3",BASE_URL_PATH:we=`sdk/${be}/platform`,BASE_URL:ke="https://app.namiml.com",BASE_STAGING_URL:Se="https://app-staging.namiml.com",CUSTOM_HOST_PREFIX:_e="namiAPIHost=",USE_STAGING_API:Me="useStagingAPI",EXTENDED_CLIENT_INFO_PREFIX:Ee="extendedClientInfo",EXTENDED_CLIENT_INFO_DELIMITER:Pe=":",VALIDATE_PRODUCT_GROUPS:Te="validateProductGroups",EXTENDED_PLATFORM:xe="extended-platform",EXTENDED_PLATFORM_VERSION:Ae="extended-platform-version",API_MAX_CALLS_LIMIT:Ce=2,API_RETRY_DELAY_SEC:Le=2,API_TIMEOUT_LIMIT:Ie=2e4,DEVICE_API_TIMEOUT_LIMIT:De=2e3,STATUS_SUCCESS:Re=200,STATUS_BAD_REQUEST:Ne=400,STATUS_NOT_FOUND:We=404,STATUS_CONFLICT:Fe=409,STATUS_INTERNAL_SERVER_ERROR:Oe=500,INITIAL_SUCCESS:$e="Initial success",RECONFIG_SUCCESS:je="Reconfig success",ALREADY_CONFIGURED:ze="Already configured",AVAILABLE_CAMPAIGNS_CHANGED:He="AvailableCampaignsChanged",PAYWALL_ACTION_EVENT:Be="PaywallActionEvent",AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED:Ue="AvailableActiveEntitlementsChanged",CUSTOMER_JOURNEY_STATE_CHANGED:Ge="CustomerJourneyStateChanged",SKU_TEXT_REGEX:Ve=/\$\{sku\.(\w+)(:\d+)?\}/g,VAR_REGEX:Xe=/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g,HTML_REGEX:Ke=/<\/?[a-z][\s\S]*>/i,SMART_TEXT_PATTERN:Ye="${",LIQUID_VARIABLE_REGEX:qe=/\${[A-Za-z0-9.]+}/g}={};var Je;e.LogLevel=void 0,(Je=e.LogLevel||(e.LogLevel={}))[Je.DEBUG=1]="DEBUG",Je[Je.INFO=2]="INFO",Je[Je.WARN=3]="WARN",Je[Je.ERROR=4]="ERROR";const Qe={debug:e.LogLevel.DEBUG,info:e.LogLevel.INFO,warn:e.LogLevel.WARN,error:e.LogLevel.ERROR};const Ze=new class{constructor(){this.currentLogLevel=e.LogLevel.DEBUG,this.setLogger=t=>{this.currentLogLevel=t?Qe[t]:e.LogLevel.WARN}}debug(t,...n){this.shouldLog(e.LogLevel.DEBUG)&&console.debug(this.formatMessage(e.LogLevel.DEBUG,t,...n))}info(t,...n){this.shouldLog(e.LogLevel.INFO)&&console.info(this.formatMessage(e.LogLevel.INFO,t,...n))}warn(t,...n){this.shouldLog(e.LogLevel.WARN)&&console.warn(this.formatMessage(e.LogLevel.WARN,t,...n))}error(t,...n){this.shouldLog(e.LogLevel.ERROR)&&console.error(this.formatMessage(e.LogLevel.ERROR,t,...n))}shouldLog(e){return e>=this.currentLogLevel}formatMessage(t,n,...i){const a=e.LogLevel[t];return`[${(new Date).toISOString()}] [${a}] ${n} ${i=i.map((e=>"object"==typeof e?JSON.stringify(e):e))}`}};function et(e){for(var t=-1,n=null==e?0:e.length,i=0,a=[];++t<n;){var r=e[t];r&&(a[i++]=r)}return a}function tt(e,t){return e===t||e!=e&&t!=t}function nt(e,t){for(var n=e.length;n--;)if(tt(e[n][0],t))return n;return-1}var it=Array.prototype.splice;function at(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}at.prototype.clear=function(){this.__data__=[],this.size=0},at.prototype.delete=function(e){var t=this.__data__,n=nt(t,e);return!(n<0)&&(n==t.length-1?t.pop():it.call(t,n,1),--this.size,!0)},at.prototype.get=function(e){var t=this.__data__,n=nt(t,e);return n<0?void 0:t[n][1]},at.prototype.has=function(e){return nt(this.__data__,e)>-1},at.prototype.set=function(e,t){var n=this.__data__,i=nt(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var rt="object"==typeof global&&global&&global.Object===Object&&global,ot="object"==typeof self&&self&&self.Object===Object&&self,st=rt||ot||Function("return this")(),lt=st.Symbol,dt=Object.prototype,ut=dt.hasOwnProperty,ct=dt.toString,ht=lt?lt.toStringTag:void 0;var mt=Object.prototype.toString;var ft="[object Null]",pt="[object Undefined]",gt=lt?lt.toStringTag:void 0;function vt(e){return null==e?void 0===e?pt:ft:gt&&gt in Object(e)?function(e){var t=ut.call(e,ht),n=e[ht];try{e[ht]=void 0;var i=!0}catch(e){}var a=ct.call(e);return i&&(t?e[ht]=n:delete e[ht]),a}(e):function(e){return mt.call(e)}(e)}function yt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var bt="[object AsyncFunction]",wt="[object Function]",kt="[object GeneratorFunction]",St="[object Proxy]";function _t(e){if(!yt(e))return!1;var t=vt(e);return t==wt||t==kt||t==bt||t==St}var Mt,Et=st["__core-js_shared__"],Pt=(Mt=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||""))?"Symbol(src)_1."+Mt:"";var Tt=Function.prototype.toString;function xt(e){if(null!=e){try{return Tt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var At=/^\[object .+?Constructor\]$/,Ct=Function.prototype,Lt=Object.prototype,It=Ct.toString,Dt=Lt.hasOwnProperty,Rt=RegExp("^"+It.call(Dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nt(e){return!(!yt(e)||(t=e,Pt&&Pt in t))&&(_t(e)?Rt:At).test(xt(e));var t}function Wt(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Nt(n)?n:void 0}var Ft=Wt(st,"Map"),Ot=Wt(Object,"create");var $t=Object.prototype.hasOwnProperty;var jt=Object.prototype.hasOwnProperty;function zt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ht(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Bt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}zt.prototype.clear=function(){this.__data__=Ot?Ot(null):{},this.size=0},zt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zt.prototype.get=function(e){var t=this.__data__;if(Ot){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return $t.call(t,e)?t[e]:void 0},zt.prototype.has=function(e){var t=this.__data__;return Ot?void 0!==t[e]:jt.call(t,e)},zt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ot&&void 0===t?"__lodash_hash_undefined__":t,this},Bt.prototype.clear=function(){this.size=0,this.__data__={hash:new zt,map:new(Ft||at),string:new zt}},Bt.prototype.delete=function(e){var t=Ht(this,e).delete(e);return this.size-=t?1:0,t},Bt.prototype.get=function(e){return Ht(this,e).get(e)},Bt.prototype.has=function(e){return Ht(this,e).has(e)},Bt.prototype.set=function(e,t){var n=Ht(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};function Ut(e){var t=this.__data__=new at(e);this.size=t.size}Ut.prototype.clear=function(){this.__data__=new at,this.size=0},Ut.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ut.prototype.get=function(e){return this.__data__.get(e)},Ut.prototype.has=function(e){return this.__data__.has(e)},Ut.prototype.set=function(e,t){var n=this.__data__;if(n instanceof at){var i=n.__data__;if(!Ft||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bt(i)}return n.set(e,t),this.size=n.size,this};function Gt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Bt;++t<n;)this.add(e[t])}function Vt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function Xt(e,t){return e.has(t)}Gt.prototype.add=Gt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Gt.prototype.has=function(e){return this.__data__.has(e)};var Kt=1,Yt=2;function qt(e,t,n,i,a,r){var o=n&Kt,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var d=r.get(e),u=r.get(t);if(d&&u)return d==t&&u==e;var c=-1,h=!0,m=n&Yt?new Gt:void 0;for(r.set(e,t),r.set(t,e);++c<s;){var f=e[c],p=t[c];if(i)var g=o?i(p,f,c,t,e,r):i(f,p,c,e,t,r);if(void 0!==g){if(g)continue;h=!1;break}if(m){if(!Vt(t,(function(e,t){if(!Xt(m,t)&&(f===e||a(f,e,n,i,r)))return m.push(t)}))){h=!1;break}}else if(f!==p&&!a(f,p,n,i,r)){h=!1;break}}return r.delete(e),r.delete(t),h}var Jt=st.Uint8Array;function Qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function Zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var en=1,tn=2,nn="[object Boolean]",an="[object Date]",rn="[object Error]",on="[object Map]",sn="[object Number]",ln="[object RegExp]",dn="[object Set]",un="[object String]",cn="[object Symbol]",hn="[object ArrayBuffer]",mn="[object DataView]",fn=lt?lt.prototype:void 0,pn=fn?fn.valueOf:void 0;function gn(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}var vn=Array.isArray;function yn(e,t,n){var i=t(e);return vn(e)?i:gn(i,n(e))}function bn(){return[]}var wn=Object.prototype.propertyIsEnumerable,kn=Object.getOwnPropertySymbols,Sn=kn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,a=0,r=[];++n<i;){var o=e[n];t(o,n,e)&&(r[a++]=o)}return r}(kn(e),(function(t){return wn.call(e,t)})))}:bn;function _n(e){return null!=e&&"object"==typeof e}function Mn(e){return _n(e)&&"[object Arguments]"==vt(e)}var En=Object.prototype,Pn=En.hasOwnProperty,Tn=En.propertyIsEnumerable,xn=Mn(function(){return arguments}())?Mn:function(e){return _n(e)&&Pn.call(e,"callee")&&!Tn.call(e,"callee")};var An="object"==typeof e&&e&&!e.nodeType&&e,Cn=An&&"object"==typeof module&&module&&!module.nodeType&&module,Ln=Cn&&Cn.exports===An?st.Buffer:void 0,In=(Ln?Ln.isBuffer:void 0)||function(){return!1},Dn=9007199254740991,Rn=/^(?:0|[1-9]\d*)$/;function Nn(e,t){var n=typeof e;return!!(t=null==t?Dn:t)&&("number"==n||"symbol"!=n&&Rn.test(e))&&e>-1&&e%1==0&&e<t}var Wn=9007199254740991;function Fn(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Wn}var On={};function $n(e){return function(t){return e(t)}}On["[object Float32Array]"]=On["[object Float64Array]"]=On["[object Int8Array]"]=On["[object Int16Array]"]=On["[object Int32Array]"]=On["[object Uint8Array]"]=On["[object Uint8ClampedArray]"]=On["[object Uint16Array]"]=On["[object Uint32Array]"]=!0,On["[object Arguments]"]=On["[object Array]"]=On["[object ArrayBuffer]"]=On["[object Boolean]"]=On["[object DataView]"]=On["[object Date]"]=On["[object Error]"]=On["[object Function]"]=On["[object Map]"]=On["[object Number]"]=On["[object Object]"]=On["[object RegExp]"]=On["[object Set]"]=On["[object String]"]=On["[object WeakMap]"]=!1;var jn="object"==typeof e&&e&&!e.nodeType&&e,zn=jn&&"object"==typeof module&&module&&!module.nodeType&&module,Hn=zn&&zn.exports===jn&&rt.process,Bn=function(){try{var e=zn&&zn.require&&zn.require("util").types;return e||Hn&&Hn.binding&&Hn.binding("util")}catch(e){}}(),Un=Bn&&Bn.isTypedArray,Gn=Un?$n(Un):function(e){return _n(e)&&Fn(e.length)&&!!On[vt(e)]},Vn=Object.prototype.hasOwnProperty;function Xn(e,t){var n=vn(e),i=!n&&xn(e),a=!n&&!i&&In(e),r=!n&&!i&&!a&&Gn(e),o=n||i||a||r,s=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],l=s.length;for(var d in e)!t&&!Vn.call(e,d)||o&&("length"==d||a&&("offset"==d||"parent"==d)||r&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Nn(d,l))||s.push(d);return s}var Kn=Object.prototype;function Yn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Kn)}function qn(e,t){return function(n){return e(t(n))}}var Jn=qn(Object.keys,Object),Qn=Object.prototype.hasOwnProperty;function Zn(e){return null!=e&&Fn(e.length)&&!_t(e)}function ei(e){return Zn(e)?Xn(e):function(e){if(!Yn(e))return Jn(e);var t=[];for(var n in Object(e))Qn.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}function ti(e){return yn(e,ei,Sn)}var ni=1,ii=Object.prototype.hasOwnProperty;var ai=Wt(st,"DataView"),ri=Wt(st,"Promise"),oi=Wt(st,"Set"),si=Wt(st,"WeakMap"),li="[object Map]",di="[object Promise]",ui="[object Set]",ci="[object WeakMap]",hi="[object DataView]",mi=xt(ai),fi=xt(Ft),pi=xt(ri),gi=xt(oi),vi=xt(si),yi=vt;(ai&&yi(new ai(new ArrayBuffer(1)))!=hi||Ft&&yi(new Ft)!=li||ri&&yi(ri.resolve())!=di||oi&&yi(new oi)!=ui||si&&yi(new si)!=ci)&&(yi=function(e){var t=vt(e),n="[object Object]"==t?e.constructor:void 0,i=n?xt(n):"";if(i)switch(i){case mi:return hi;case fi:return li;case pi:return di;case gi:return ui;case vi:return ci}return t});var bi=1,wi="[object Arguments]",ki="[object Array]",Si="[object Object]",_i=Object.prototype.hasOwnProperty;function Mi(e,t,n,i,a,r){var o=vn(e),s=vn(t),l=o?ki:yi(e),d=s?ki:yi(t),u=(l=l==wi?Si:l)==Si,c=(d=d==wi?Si:d)==Si,h=l==d;if(h&&In(e)){if(!In(t))return!1;o=!0,u=!1}if(h&&!u)return r||(r=new Ut),o||Gn(e)?qt(e,t,n,i,a,r):function(e,t,n,i,a,r,o){switch(n){case mn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case hn:return!(e.byteLength!=t.byteLength||!r(new Jt(e),new Jt(t)));case nn:case an:case sn:return tt(+e,+t);case rn:return e.name==t.name&&e.message==t.message;case ln:case un:return e==t+"";case on:var s=Qt;case dn:var l=i&en;if(s||(s=Zt),e.size!=t.size&&!l)return!1;var d=o.get(e);if(d)return d==t;i|=tn,o.set(e,t);var u=qt(s(e),s(t),i,a,r,o);return o.delete(e),u;case cn:if(pn)return pn.call(e)==pn.call(t)}return!1}(e,t,l,n,i,a,r);if(!(n&bi)){var m=u&&_i.call(e,"__wrapped__"),f=c&&_i.call(t,"__wrapped__");if(m||f){var p=m?e.value():e,g=f?t.value():t;return r||(r=new Ut),a(p,g,n,i,r)}}return!!h&&(r||(r=new Ut),function(e,t,n,i,a,r){var o=n&ni,s=ti(e),l=s.length;if(l!=ti(t).length&&!o)return!1;for(var d=l;d--;){var u=s[d];if(!(o?u in t:ii.call(t,u)))return!1}var c=r.get(e),h=r.get(t);if(c&&h)return c==t&&h==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++d<l;){var p=e[u=s[d]],g=t[u];if(i)var v=o?i(g,p,u,t,e,r):i(p,g,u,e,t,r);if(!(void 0===v?p===g||a(p,g,n,i,r):v)){m=!1;break}f||(f="constructor"==u)}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,i,a,r))}function Ei(e,t,n,i,a){return e===t||(null==e||null==t||!_n(e)&&!_n(t)?e!=e&&t!=t:Mi(e,t,n,i,Ei,a))}var Pi=1,Ti=2;function xi(e){return e==e&&!yt(e)}function Ai(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Ci(e){var t=function(e){for(var t=ei(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,xi(a)]}return t}(e);return 1==t.length&&t[0][2]?Ai(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var a=n.length,r=a;if(null==e)return!r;for(e=Object(e);a--;){var o=n[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<r;){var s=(o=n[a])[0],l=e[s],d=o[1];if(o[2]){if(void 0===l&&!(s in e))return!1}else{var u=new Ut;if(!Ei(d,l,Pi|Ti,i,u))return!1}}return!0}(n,0,t)}}var Li="[object Symbol]";function Ii(e){return"symbol"==typeof e||_n(e)&&vt(e)==Li}var Di=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ri=/^\w*$/;function Ni(e,t){if(vn(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ii(e))||(Ri.test(e)||!Di.test(e)||null!=t&&e in Object(t))}var Wi="Expected a function";function Fi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(Wi);var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=n.cache;if(r.has(a))return r.get(a);var o=e.apply(this,i);return n.cache=r.set(a,o)||r,o};return n.cache=new(Fi.Cache||Bt),n}Fi.Cache=Bt;var Oi,$i,ji,zi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hi=/\\(\\)?/g,Bi=(Oi=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(zi,(function(e,n,i,a){t.push(i?a.replace(Hi,"$1"):n||e)})),t},$i=Fi(Oi,(function(e){return 500===ji.size&&ji.clear(),e})),ji=$i.cache,$i);var Ui=1/0,Gi=lt?lt.prototype:void 0,Vi=Gi?Gi.toString:void 0;function Xi(e){if("string"==typeof e)return e;if(vn(e))return function(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}(e,Xi)+"";if(Ii(e))return Vi?Vi.call(e):"";var t=e+"";return"0"==t&&1/e==-Ui?"-0":t}function Ki(e){return null==e?"":Xi(e)}function Yi(e,t){return vn(e)?e:Ni(e,t)?[e]:Bi(Ki(e))}var qi=1/0;function Ji(e){if("string"==typeof e||Ii(e))return e;var t=e+"";return"0"==t&&1/e==-qi?"-0":t}function Qi(e,t){for(var n=0,i=(t=Yi(t,e)).length;null!=e&&n<i;)e=e[Ji(t[n++])];return n&&n==i?e:void 0}function Zi(e,t){return null!=e&&t in Object(e)}function ea(e,t){return null!=e&&function(e,t,n){for(var i=-1,a=(t=Yi(t,e)).length,r=!1;++i<a;){var o=Ji(t[i]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||++i!=a?r:!!(a=null==e?0:e.length)&&Fn(a)&&Nn(o,a)&&(vn(e)||xn(e))}(e,t,Zi)}var ta=1,na=2;function ia(e,t){return Ni(e)&&xi(t)?Ai(Ji(e),t):function(n){var i=function(e,t,n){var i=null==e?void 0:Qi(e,t);return void 0===i?n:i}(n,e);return void 0===i&&i===t?ea(n,e):Ei(t,i,ta|na)}}function aa(e){return e}function ra(e){return Ni(e)?(t=Ji(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Qi(t,e)}}(e);var t}function oa(e){return e!=e}function sa(e,t){return!!(null==e?0:e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===t)return i;return-1}(e,t,n):function(e,t,n){for(var i=e.length,a=n+-1;++a<i;)if(t(e[a],a,e))return a;return-1}(e,oa,n)}(e,t,0)>-1}var la=oi&&1/Zt(new oi([,-0]))[1]==1/0?function(e){return new oi(e)}:function(){},da=200;function ua(e,t){return e&&e.length?function(e,t,n){var i=-1,a=sa,r=e.length,o=!0,s=[],l=s;if(r>=da){var d=t?null:la(e);if(d)return Zt(d);o=!1,a=Xt,l=new Gt}else l=t?[]:s;e:for(;++i<r;){var u=e[i],c=t?t(u):u;if(u=0!==u?u:0,o&&c==c){for(var h=l.length;h--;)if(l[h]===c)continue e;t&&l.push(c),s.push(u)}else a(l,c,n)||(l!==s&&l.push(c),s.push(u))}return s}(e,"function"==typeof(n=t)?n:null==n?aa:"object"==typeof n?vn(n)?ia(n[0],n[1]):Ci(n):ra(n)):[];var n}const ca=new class{constructor(){this.memoryStore={}}setDevice(e){this.setItem(V,e)}getDevice(){return this.getItem(V)}resetDevice(){this.resetItem(V)}getAnonymousMode(){return this.getItem(de)||!1}setAnonymousMode(e){this.setItem(de,e)}clearAnonymousMode(){this.resetItem(de)}setAppConfig(e,t){this.setItem(e,t)}getAppConfig(e){return this.getItem(e)}setLanguageCode(e){this.setItem(ve,e||"en")}getLanguageCode(){return this.getItem(ve)||"en"}setCampaignRules(e,t){e!==ie?e!==q||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[q]=JSON.stringify(t):this.memoryStore[ie]=JSON.stringify(t)}getCampaignRules(e){if(e===ie)return this.memoryStore[ie]?JSON.parse(this.memoryStore[ie]):null;if(e===q){const e=this.memoryStore[q];if(null!=e)return JSON.parse(e);let t=this.getItem(q);if(null===t)return null;if("string"==typeof t)try{t=JSON.parse(t)}catch{return t}return this.isLegacyTimestampedCache(t)?t.data:t}return this.getItem(e)}setPaywalls(e,t){e!==ae?e!==J||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[J]=JSON.stringify(t):this.memoryStore[ae]=JSON.stringify(t)}getPaywalls(e){if(e===ae)return this.memoryStore[ae]?JSON.parse(this.memoryStore[ae]):null;if(e===J){const e=this.memoryStore[J];if(null!=e)return JSON.parse(e);let t=this.getItem(J);if(null===t)return null;if("string"==typeof t)try{t=JSON.parse(t)}catch{return t}return this.isLegacyTimestampedCache(t)?t.data:t}return this.getItem(e)}setActiveEntitlements(e,t){this.setItem(e,t)}getActiveEntitlements(e){return this.getItem(e)||[]}setNamiEntitlements(e,t){this.setItem(e,t)}getNamiEntitlements(e){return this.getItem(e)||[]}setProducts(e,t){this.setItem(e,t)}getProducts(e){return this.getItem(e)}getCachedProducts(){const e=this.getItem(Z)??[];return ua(et([...this.getItem(re)??[],...e]),"sku_ref_id")}setNamiConfig(e){this.setItem(X,e)}getNamiConfig(){return this.getItem(X)}setCustomerAttribute(e,t){this.setItem(se+e,t)}getCustomerAttribute(e){return this.getItem(se+e)}getAllCustomerAttributes(){return Object.entries(localStorage).filter((([e])=>e.includes(se))).map((([e,t])=>e.replace(se,"")+":"+t))}getAllCustomerAttributesKeys(){return Object.keys(localStorage).filter((e=>e.includes(se))).map((e=>e.replace(se,"")))}clearCustomerAttribute(e){const t=se+e,n=this.getItem(t);return n&&this.resetItem(t),!!n}clearAllCustomerAttributes(){Object.keys(localStorage).filter((e=>e.includes(se))).map((e=>this.resetItem(e)))}setNamiProfile(e){this.setItem(K,e)}getNamiProfile(){return this.getItem(K)}removeNamiProfile(){this.resetItem(K)}setCustomerJourneyState(e){this.setItem(le,e)}getCustomerJourneyState(){return this.getItem(le)}setSessionCounter(){const e=this.getItem(ce),t=e?parseInt(e):he||he;this.setItem(ce,t+1)}getSessionCounter(){const e=this.getItem(ce);return e?parseInt(e):he}setLastImpressionId(e){this.setItem(me,e)}getLastImpressionId(){return this.getItem(me)??""}setPurchaseImpression(){const e=this.getLastImpressionId()??"";this.setItem(fe,e)}getPurchaseImpression(){return this.getItem(fe)??""}setSessionId(e){e&&this.setItem(ge,e)}getSessionId(){return this.getItem(ge)??""}clearSessionId(){this.resetItem(ge)}setLaunchId(e){e&&this.setItem(pe,e)}getLaunchId(){return this.getItem(pe)??""}clearLaunchId(){this.resetItem(pe)}setPurchaseChannel(e){e&&this.setItem(ye,e)}getPurchaseChannel(){return this.getItem(ye)}getAnonymousUUID(){return this.getItem(ue)}setAnonymousUUID(e){this.setItem(ue,e)}clearAnonymousUUID(){this.resetItem(ue)}setApiCampaignSessionTimestamp(){this.setItem(Q,Date.now())}getApiCampaignSessionTimestamp(){return this.getItem(Q)}purgeApiCampaignCache(){this.resetItem(J),this.resetItem(q),this.resetItem(Q)}getCampaignCacheTtl(){const e=this.getAppConfig(Y)||this.getAppConfig(ne);return e?.campaign_cache_ttl??null}isLegacyTimestampedCache(e){return"object"==typeof e&&null!==e&&"cachedAt"in e&&"data"in e}setItem(e,t){let n;try{n=JSON.stringify(t)}catch(t){return void Ze.error(`Serialization failed for ${e}`,t)}try{localStorage.setItem(e,n)}catch(t){Ze.error("Error setting item in localStorage:",t),this.resetItem(e),this.memoryStore[e]=n}}getItem(e){try{const t=localStorage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){"undefined"!=typeof window&&Ze.error("Error getting item from localStorage:",e,": ",t)}const t=this.memoryStore[e];return null!=t?JSON.parse(t):null}resetItem(e){try{localStorage.removeItem(e)}catch(t){"undefined"!=typeof window&&Ze.error("Error removing item from localStorage:",e,": ",t)}delete this.memoryStore[e]}clear(){try{localStorage.clear()}catch(e){Ze.error("Error clearing localStorage:",e)}this.memoryStore={}}};class ha extends Error{constructor(e,t){super(t),this.statusCode=e,this.status=e,this.message=`RetryLimitExceededError: ${this.message}`}}class ma extends Error{}class fa extends ma{constructor(){super(),this.status=409,this.name="ConflictError",this.message="ConflictError: Server responded with conflict"}}class pa extends Error{constructor(){super(F)}}class ga extends Error{constructor(){super(R)}}class va extends Error{constructor(){super(N)}}class ya extends Error{constructor(){super(W)}}class ba extends Error{constructor(){super(O)}}class wa extends Error{constructor(){super($)}}class ka extends Error{constructor(){super(z)}}class Sa extends Error{constructor(){super(H)}}class _a extends Error{constructor(){super(H)}}class Ma extends Error{constructor(){super(j)}}class Ea extends ma{constructor(e){super(e),this.message=`BadRequestError: ${this.message}`}}class Pa extends ma{constructor(e){super(e),this.message=`NotFoundError: ${this.message}`}}class Ta extends ma{constructor(e,t){super(t),this.statusCode=e,this.message=`ClientError: ${this.message}`}}class xa extends ma{constructor(e){super(e),this.message=`ServerError: ${this.message}`}}const Aa=(e,t)=>{if(e==Ne)throw new Ea(t);if(e==We)throw new Pa(t);if(e==Fe)throw new fa;if(e>Ne&&e<Oe)throw new Ta(e,t);if(e>=Oe)throw new xa(t)};async function Ca(e,t,n=Ie,i=Ce){let a=0;const r=async()=>{const o=await async function(e,t={},n){const i=new AbortController,a=setTimeout((()=>i.abort()),n);t.signal=i.signal;const r=await fetch(e,t);return clearTimeout(a),r}(e,t,n);if(!o.ok){if(o.status==Fe)throw new fa;if(a++,a<=i){const e=1e3*(a+Le);return await new Promise((t=>setTimeout(t,e))),r()}throw new ha(o.status,`Request failed after ${i} retries`)}return o};return(await r()).json()}function La(e){let t=e.length;for(;--t>=0;)e[t]=0}const Ia=256,Da=286,Ra=30,Na=15,Wa=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Fa=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Oa=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),$a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ja=new Array(576);La(ja);const za=new Array(60);La(za);const Ha=new Array(512);La(Ha);const Ba=new Array(256);La(Ba);const Ua=new Array(29);La(Ua);const Ga=new Array(Ra);function Va(e,t,n,i,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=a,this.has_stree=e&&e.length}let Xa,Ka,Ya;function qa(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}La(Ga);const Ja=e=>e<256?Ha[e]:Ha[256+(e>>>7)],Qa=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Za=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,Qa(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},er=(e,t,n)=>{Za(e,n[2*t],n[2*t+1])},tr=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},nr=(e,t,n)=>{const i=new Array(16);let a,r,o=0;for(a=1;a<=Na;a++)o=o+n[a-1]<<1,i[a]=o;for(r=0;r<=t;r++){let t=e[2*r+1];0!==t&&(e[2*r]=tr(i[t]++,t))}},ir=e=>{let t;for(t=0;t<Da;t++)e.dyn_ltree[2*t]=0;for(t=0;t<Ra;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},ar=e=>{e.bi_valid>8?Qa(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},rr=(e,t,n,i)=>{const a=2*t,r=2*n;return e[a]<e[r]||e[a]===e[r]&&i[t]<=i[n]},or=(e,t,n)=>{const i=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a<e.heap_len&&rr(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!rr(t,i,e.heap[a],e.depth));)e.heap[n]=e.heap[a],n=a,a<<=1;e.heap[n]=i},sr=(e,t,n)=>{let i,a,r,o,s=0;if(0!==e.sym_next)do{i=255&e.pending_buf[e.sym_buf+s++],i+=(255&e.pending_buf[e.sym_buf+s++])<<8,a=e.pending_buf[e.sym_buf+s++],0===i?er(e,a,t):(r=Ba[a],er(e,r+Ia+1,t),o=Wa[r],0!==o&&(a-=Ua[r],Za(e,a,o)),i--,r=Ja(i),er(e,r,n),o=Fa[r],0!==o&&(i-=Ga[r],Za(e,i,o)))}while(s<e.sym_next);er(e,256,t)},lr=(e,t)=>{const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,r=t.stat_desc.elems;let o,s,l,d=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<r;o++)0!==n[2*o]?(e.heap[++e.heap_len]=d=o,e.depth[o]=0):n[2*o+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=d<2?++d:0,n[2*l]=1,e.depth[l]=0,e.opt_len--,a&&(e.static_len-=i[2*l+1]);for(t.max_code=d,o=e.heap_len>>1;o>=1;o--)or(e,n,o);l=r;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],or(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[2*l]=n[2*o]+n[2*s],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[2*o+1]=n[2*s+1]=l,e.heap[1]=l++,or(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,i=t.max_code,a=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let d,u,c,h,m,f,p=0;for(h=0;h<=Na;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,d=e.heap_max+1;d<573;d++)u=e.heap[d],h=n[2*n[2*u+1]+1]+1,h>l&&(h=l,p++),n[2*u+1]=h,u>i||(e.bl_count[h]++,m=0,u>=s&&(m=o[u-s]),f=n[2*u],e.opt_len+=f*(h+m),r&&(e.static_len+=f*(a[2*u+1]+m)));if(0!==p){do{for(h=l-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,p-=2}while(p>0);for(h=l;0!==h;h--)for(u=e.bl_count[h];0!==u;)c=e.heap[--d],c>i||(n[2*c+1]!==h&&(e.opt_len+=(h-n[2*c+1])*n[2*c],n[2*c+1]=h),u--)}})(e,t),nr(n,d,e.bl_count)},dr=(e,t,n)=>{let i,a,r=-1,o=t[1],s=0,l=7,d=4;for(0===o&&(l=138,d=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)a=o,o=t[2*(i+1)+1],++s<l&&a===o||(s<d?e.bl_tree[2*a]+=s:0!==a?(a!==r&&e.bl_tree[2*a]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,r=a,0===o?(l=138,d=3):a===o?(l=6,d=3):(l=7,d=4))},ur=(e,t,n)=>{let i,a,r=-1,o=t[1],s=0,l=7,d=4;for(0===o&&(l=138,d=3),i=0;i<=n;i++)if(a=o,o=t[2*(i+1)+1],!(++s<l&&a===o)){if(s<d)do{er(e,a,e.bl_tree)}while(0!=--s);else 0!==a?(a!==r&&(er(e,a,e.bl_tree),s--),er(e,16,e.bl_tree),Za(e,s-3,2)):s<=10?(er(e,17,e.bl_tree),Za(e,s-3,3)):(er(e,18,e.bl_tree),Za(e,s-11,7));s=0,r=a,0===o?(l=138,d=3):a===o?(l=6,d=3):(l=7,d=4)}};let cr=!1;const hr=(e,t,n,i)=>{Za(e,0+(i?1:0),3),ar(e),Qa(e,n),Qa(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var mr=e=>{cr||((()=>{let e,t,n,i,a;const r=new Array(16);for(n=0,i=0;i<28;i++)for(Ua[i]=n,e=0;e<1<<Wa[i];e++)Ba[n++]=i;for(Ba[n-1]=i,a=0,i=0;i<16;i++)for(Ga[i]=a,e=0;e<1<<Fa[i];e++)Ha[a++]=i;for(a>>=7;i<Ra;i++)for(Ga[i]=a<<7,e=0;e<1<<Fa[i]-7;e++)Ha[256+a++]=i;for(t=0;t<=Na;t++)r[t]=0;for(e=0;e<=143;)ja[2*e+1]=8,e++,r[8]++;for(;e<=255;)ja[2*e+1]=9,e++,r[9]++;for(;e<=279;)ja[2*e+1]=7,e++,r[7]++;for(;e<=287;)ja[2*e+1]=8,e++,r[8]++;for(nr(ja,287,r),e=0;e<Ra;e++)za[2*e+1]=5,za[2*e]=tr(e,5);Xa=new Va(ja,Wa,257,Da,Na),Ka=new Va(za,Fa,0,Ra,Na),Ya=new Va(new Array(0),Oa,0,19,7)})(),cr=!0),e.l_desc=new qa(e.dyn_ltree,Xa),e.d_desc=new qa(e.dyn_dtree,Ka),e.bl_desc=new qa(e.bl_tree,Ya),e.bi_buf=0,e.bi_valid=0,ir(e)},fr=(e,t,n,i)=>{let a,r,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<Ia;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),lr(e,e.l_desc),lr(e,e.d_desc),o=(e=>{let t;for(dr(e,e.dyn_ltree,e.l_desc.max_code),dr(e,e.dyn_dtree,e.d_desc.max_code),lr(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*$a[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!==t?hr(e,t,n,i):4===e.strategy||r===a?(Za(e,2+(i?1:0),3),sr(e,ja,za)):(Za(e,4+(i?1:0),3),((e,t,n,i)=>{let a;for(Za(e,t-257,5),Za(e,n-1,5),Za(e,i-4,4),a=0;a<i;a++)Za(e,e.bl_tree[2*$a[a]+1],3);ur(e,e.dyn_ltree,t-1),ur(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),sr(e,e.dyn_ltree,e.dyn_dtree)),ir(e),i&&ar(e)},pr=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Ba[n]+Ia+1)]++,e.dyn_dtree[2*Ja(t)]++),e.sym_next===e.sym_end),gr=e=>{Za(e,2,3),er(e,256,ja),(e=>{16===e.bi_valid?(Qa(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)},vr={_tr_init:mr,_tr_stored_block:hr,_tr_flush_block:fr,_tr_tally:pr,_tr_align:gr};var yr=(e,t,n,i)=>{let a=65535&e,r=e>>>16&65535,o=0;for(;0!==n;){o=n>2e3?2e3:n,n-=o;do{a=a+t[i++]|0,r=r+a|0}while(--o);a%=65521,r%=65521}return a|r<<16};const br=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var wr=(e,t,n,i)=>{const a=br,r=i+n;e^=-1;for(let n=i;n<r;n++)e=e>>>8^a[255&(e^t[n])];return~e},kr={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"},Sr={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};const{_tr_init:_r,_tr_stored_block:Mr,_tr_flush_block:Er,_tr_tally:Pr,_tr_align:Tr}=vr,{Z_NO_FLUSH:xr,Z_PARTIAL_FLUSH:Ar,Z_FULL_FLUSH:Cr,Z_FINISH:Lr,Z_BLOCK:Ir,Z_OK:Dr,Z_STREAM_END:Rr,Z_STREAM_ERROR:Nr,Z_DATA_ERROR:Wr,Z_BUF_ERROR:Fr,Z_DEFAULT_COMPRESSION:Or,Z_FILTERED:$r,Z_HUFFMAN_ONLY:jr,Z_RLE:zr,Z_FIXED:Hr,Z_DEFAULT_STRATEGY:Br,Z_UNKNOWN:Ur,Z_DEFLATED:Gr}=Sr,Vr=258,Xr=262,Kr=42,Yr=113,qr=666,Jr=(e,t)=>(e.msg=kr[t],t),Qr=e=>2*e-(e>4?9:0),Zr=e=>{let t=e.length;for(;--t>=0;)e[t]=0},eo=e=>{let t,n,i,a=e.w_size;t=e.hash_size,i=t;do{n=e.head[--i],e.head[i]=n>=a?n-a:0}while(--t);t=a,i=t;do{n=e.prev[--i],e.prev[i]=n>=a?n-a:0}while(--t)};let to=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const no=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},io=(e,t)=>{Er(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,no(e.strm)},ao=(e,t)=>{e.pending_buf[e.pending++]=t},ro=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},oo=(e,t,n,i)=>{let a=e.avail_in;return a>i&&(a=i),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=yr(e.adler,t,a,n):2===e.state.wrap&&(e.adler=wr(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},so=(e,t)=>{let n,i,a=e.max_chain_length,r=e.strstart,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-Xr?e.strstart-(e.w_size-Xr):0,d=e.window,u=e.w_mask,c=e.prev,h=e.strstart+Vr;let m=d[r+o-1],f=d[r+o];e.prev_length>=e.good_match&&(a>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,d[n+o]===f&&d[n+o-1]===m&&d[n]===d[r]&&d[++n]===d[r+1]){r+=2,n++;do{}while(d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&r<h);if(i=Vr-(h-r),r=h-Vr,i>o){if(e.match_start=t,o=i,i>=s)break;m=d[r+o-1],f=d[r+o]}}}while((t=c[t&u])>l&&0!=--a);return o<=e.lookahead?o:e.lookahead},lo=e=>{const t=e.w_size;let n,i,a;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Xr)&&(e.window.set(e.window.subarray(t,t+t-i),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),eo(e),i+=t),0===e.strm.avail_in)break;if(n=oo(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=to(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=to(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<Xr&&0!==e.strm.avail_in)},uo=(e,t)=>{let n,i,a,r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,s=e.strm.avail_in;do{if(n=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a)break;if(a=e.strm.avail_out-a,i=e.strstart-e.block_start,n>i+e.strm.avail_in&&(n=i+e.strm.avail_in),n>a&&(n=a),n<r&&(0===n&&t!==Lr||t===xr||n!==i+e.strm.avail_in))break;o=t===Lr&&n===i+e.strm.avail_in?1:0,Mr(e,0,0,o),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,no(e.strm),i&&(i>n&&(i=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,n-=i),n&&(oo(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===o);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==xr&&t!==Lr&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(oo(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,r=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=r||(i||t===Lr)&&t!==xr&&0===e.strm.avail_in&&i<=a)&&(n=i>a?a:i,o=t===Lr&&0===e.strm.avail_in&&n===i?1:0,Mr(e,e.block_start,n,o),e.block_start+=n,no(e.strm)),o?3:1)},co=(e,t)=>{let n,i;for(;;){if(e.lookahead<Xr){if(lo(e),e.lookahead<Xr&&t===xr)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=to(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-Xr&&(e.match_length=so(e,n)),e.match_length>=3)if(i=Pr(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=to(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=to(e,e.ins_h,e.window[e.strstart+1]);else i=Pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(io(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Lr?(io(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(io(e,!1),0===e.strm.avail_out)?1:2},ho=(e,t)=>{let n,i,a;for(;;){if(e.lookahead<Xr){if(lo(e),e.lookahead<Xr&&t===xr)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=to(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Xr&&(e.match_length=so(e,n),e.match_length<=5&&(e.strategy===$r||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,i=Pr(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=to(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(io(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=Pr(e,0,e.window[e.strstart-1]),i&&io(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=Pr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Lr?(io(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(io(e,!1),0===e.strm.avail_out)?1:2};function mo(e,t,n,i,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=i,this.func=a}const fo=[new mo(0,0,0,0,uo),new mo(4,4,8,4,co),new mo(4,5,16,8,co),new mo(4,6,32,32,co),new mo(4,4,16,16,ho),new mo(8,16,32,32,ho),new mo(8,16,128,128,ho),new mo(8,32,128,256,ho),new mo(32,128,258,1024,ho),new mo(32,258,258,4096,ho)];function po(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Gr,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Zr(this.dyn_ltree),Zr(this.dyn_dtree),Zr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Zr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Zr(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const go=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Kr&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Yr&&t.status!==qr?1:0},vo=e=>{if(go(e))return Jr(e,Nr);e.total_in=e.total_out=0,e.data_type=Ur;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Kr:Yr,e.adler=2===t.wrap?0:1,t.last_flush=-2,_r(t),Dr},yo=e=>{const t=vo(e);return t===Dr&&(e=>{e.window_size=2*e.w_size,Zr(e.head),e.max_lazy_match=fo[e.level].max_lazy,e.good_match=fo[e.level].good_length,e.nice_match=fo[e.level].nice_length,e.max_chain_length=fo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},bo=(e,t,n,i,a,r)=>{if(!e)return Nr;let o=1;if(t===Or&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),a<1||a>9||n!==Gr||i<8||i>15||t<0||t>9||r<0||r>Hr||8===i&&1!==o)return Jr(e,Nr);8===i&&(i=9);const s=new po;return e.state=s,s.strm=e,s.status=Kr,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=a+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<a+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=3*(s.lit_bufsize-1),s.level=t,s.strategy=r,s.method=n,yo(e)};var wo=(e,t)=>{if(go(e)||t>Ir||t<0)return e?Jr(e,Nr):Nr;const n=e.state;if(!e.output||0!==e.avail_in&&!e.input||n.status===qr&&t!==Lr)return Jr(e,0===e.avail_out?Fr:Nr);const i=n.last_flush;if(n.last_flush=t,0!==n.pending){if(no(e),0===e.avail_out)return n.last_flush=-1,Dr}else if(0===e.avail_in&&Qr(t)<=Qr(i)&&t!==Lr)return Jr(e,Fr);if(n.status===qr&&0!==e.avail_in)return Jr(e,Fr);if(n.status===Kr&&0===n.wrap&&(n.status=Yr),n.status===Kr){let t=Gr+(n.w_bits-8<<4)<<8,i=-1;if(i=n.strategy>=jr||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=i<<6,0!==n.strstart&&(t|=32),t+=31-t%31,ro(n,t),0!==n.strstart&&(ro(n,e.adler>>>16),ro(n,65535&e.adler)),e.adler=1,n.status=Yr,no(e),0!==n.pending)return n.last_flush=-1,Dr}if(57===n.status)if(e.adler=0,ao(n,31),ao(n,139),ao(n,8),n.gzhead)ao(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),ao(n,255&n.gzhead.time),ao(n,n.gzhead.time>>8&255),ao(n,n.gzhead.time>>16&255),ao(n,n.gzhead.time>>24&255),ao(n,9===n.level?2:n.strategy>=jr||n.level<2?4:0),ao(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(ao(n,255&n.gzhead.extra.length),ao(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=wr(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(ao(n,0),ao(n,0),ao(n,0),ao(n,0),ao(n,0),ao(n,9===n.level?2:n.strategy>=jr||n.level<2?4:0),ao(n,3),n.status=Yr,no(e),0!==n.pending)return n.last_flush=-1,Dr;if(69===n.status){if(n.gzhead.extra){let t=n.pending,i=(65535&n.gzhead.extra.length)-n.gzindex;for(;n.pending+i>n.pending_buf_size;){let a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=wr(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=a,no(e),0!==n.pending)return n.last_flush=-1,Dr;t=0,i-=a}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending+=i,n.gzhead.hcrc&&n.pending>t&&(e.adler=wr(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){let t,i=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=wr(e.adler,n.pending_buf,n.pending-i,i)),no(e),0!==n.pending)return n.last_flush=-1,Dr;i=0}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,ao(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>i&&(e.adler=wr(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){let t,i=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=wr(e.adler,n.pending_buf,n.pending-i,i)),no(e),0!==n.pending)return n.last_flush=-1,Dr;i=0}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,ao(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>i&&(e.adler=wr(e.adler,n.pending_buf,n.pending-i,i))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(no(e),0!==n.pending))return n.last_flush=-1,Dr;ao(n,255&e.adler),ao(n,e.adler>>8&255),e.adler=0}if(n.status=Yr,no(e),0!==n.pending)return n.last_flush=-1,Dr}if(0!==e.avail_in||0!==n.lookahead||t!==xr&&n.status!==qr){let i=0===n.level?uo(n,t):n.strategy===jr?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(lo(e),0===e.lookahead)){if(t===xr)return 1;break}if(e.match_length=0,n=Pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(io(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Lr?(io(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(io(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===zr?((e,t)=>{let n,i,a,r;const o=e.window;for(;;){if(e.lookahead<=Vr){if(lo(e),e.lookahead<=Vr&&t===xr)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,i=o[a],i===o[++a]&&i===o[++a]&&i===o[++a])){r=e.strstart+Vr;do{}while(i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&a<r);e.match_length=Vr-(r-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=Pr(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(io(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Lr?(io(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(io(e,!1),0===e.strm.avail_out)?1:2})(n,t):fo[n.level].func(n,t);if(3!==i&&4!==i||(n.status=qr),1===i||3===i)return 0===e.avail_out&&(n.last_flush=-1),Dr;if(2===i&&(t===Ar?Tr(n):t!==Ir&&(Mr(n,0,0,!1),t===Cr&&(Zr(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),no(e),0===e.avail_out))return n.last_flush=-1,Dr}return t!==Lr?Dr:n.wrap<=0?Rr:(2===n.wrap?(ao(n,255&e.adler),ao(n,e.adler>>8&255),ao(n,e.adler>>16&255),ao(n,e.adler>>24&255),ao(n,255&e.total_in),ao(n,e.total_in>>8&255),ao(n,e.total_in>>16&255),ao(n,e.total_in>>24&255)):(ro(n,e.adler>>>16),ro(n,65535&e.adler)),no(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?Dr:Rr)},ko=(e,t)=>{let n=t.length;if(go(e))return Nr;const i=e.state,a=i.wrap;if(2===a||1===a&&i.status!==Kr||i.lookahead)return Nr;if(1===a&&(e.adler=yr(e.adler,t,n,0)),i.wrap=0,n>=i.w_size){0===a&&(Zr(i.head),i.strstart=0,i.block_start=0,i.insert=0);let e=new Uint8Array(i.w_size);e.set(t.subarray(n-i.w_size,n),0),t=e,n=i.w_size}const r=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,lo(i);i.lookahead>=3;){let e=i.strstart,t=i.lookahead-2;do{i.ins_h=to(i,i.ins_h,i.window[e+3-1]),i.prev[e&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=e,e++}while(--t);i.strstart=e,i.lookahead=2,lo(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=o,e.input=s,e.avail_in=r,i.wrap=a,Dr},So={deflateInit:(e,t)=>bo(e,t,Gr,15,8,Br),deflateInit2:bo,deflateReset:yo,deflateResetKeep:vo,deflateSetHeader:(e,t)=>go(e)||2!==e.state.wrap?Nr:(e.state.gzhead=t,Dr),deflate:wo,deflateEnd:e=>{if(go(e))return Nr;const t=e.state.status;return e.state=null,t===Yr?Jr(e,Wr):Dr},deflateSetDictionary:ko,deflateInfo:"pako deflate (from Nodeca project)"};const _o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Mo={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)_o(n,t)&&(e[t]=n[t])}}return e},flattenChunks:e=>{let t=0;for(let n=0,i=e.length;n<i;n++)t+=e[n].length;const n=new Uint8Array(t);for(let t=0,i=0,a=e.length;t<a;t++){let a=e[t];n.set(a,i),i+=a.length}return n}};let Eo=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Eo=!1}const Po=new Uint8Array(256);for(let e=0;e<256;e++)Po[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Po[254]=Po[254]=1;var To={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,i,a,r,o=e.length,s=0;for(a=0;a<o;a++)n=e.charCodeAt(a),55296==(64512&n)&&a+1<o&&(i=e.charCodeAt(a+1),56320==(64512&i)&&(n=65536+(n-55296<<10)+(i-56320),a++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),r=0,a=0;r<s;a++)n=e.charCodeAt(a),55296==(64512&n)&&a+1<o&&(i=e.charCodeAt(a+1),56320==(64512&i)&&(n=65536+(n-55296<<10)+(i-56320),a++)),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)=>{const n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let i,a;const r=new Array(2*n);for(a=0,i=0;i<n;){let t=e[i++];if(t<128){r[a++]=t;continue}let o=Po[t];if(o>4)r[a++]=65533,i+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&i<n;)t=t<<6|63&e[i++],o--;o>1?r[a++]=65533:t<65536?r[a++]=t:(t-=65536,r[a++]=55296|t>>10&1023,r[a++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Eo)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n})(r,a)},utf8border:(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Po[e[n]]>t?n:t}};var xo=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};const Ao=Object.prototype.toString,{Z_NO_FLUSH:Co,Z_SYNC_FLUSH:Lo,Z_FULL_FLUSH:Io,Z_FINISH:Do,Z_OK:Ro,Z_STREAM_END:No,Z_DEFAULT_COMPRESSION:Wo,Z_DEFAULT_STRATEGY:Fo,Z_DEFLATED:Oo}=Sr;function $o(e){this.options=Mo.assign({level:Wo,method:Oo,chunkSize:16384,windowBits:15,memLevel:8,strategy:Fo},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new xo,this.strm.avail_out=0;let n=So.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Ro)throw new Error(kr[n]);if(t.header&&So.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?To.string2buf(t.dictionary):"[object ArrayBuffer]"===Ao.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=So.deflateSetDictionary(this.strm,e),n!==Ro)throw new Error(kr[n]);this._dict_set=!0}}$o.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize;let a,r;if(this.ended)return!1;for(r=t===~~t?t:!0===t?Do:Co,"string"==typeof e?n.input=To.string2buf(e):"[object ArrayBuffer]"===Ao.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),(r===Lo||r===Io)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=So.deflate(n,r),a===No)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=So.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Ro;if(0!==n.avail_out){if(r>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},$o.prototype.onData=function(e){this.chunks.push(e)},$o.prototype.onEnd=function(e){e===Ro&&(this.result=Mo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const jo=16209;var zo=function(e,t){let n,i,a,r,o,s,l,d,u,c,h,m,f,p,g,v,y,b,w,k,S,_,M,E;const P=e.state;n=e.next_in,M=e.input,i=n+(e.avail_in-5),a=e.next_out,E=e.output,r=a-(t-e.avail_out),o=a+(e.avail_out-257),s=P.dmax,l=P.wsize,d=P.whave,u=P.wnext,c=P.window,h=P.hold,m=P.bits,f=P.lencode,p=P.distcode,g=(1<<P.lenbits)-1,v=(1<<P.distbits)-1;e:do{m<15&&(h+=M[n++]<<m,m+=8,h+=M[n++]<<m,m+=8),y=f[h&g];t:for(;;){if(b=y>>>24,h>>>=b,m-=b,b=y>>>16&255,0===b)E[a++]=65535&y;else{if(!(16&b)){if(64&b){if(32&b){P.mode=16191;break e}e.msg="invalid literal/length code",P.mode=jo;break e}y=f[(65535&y)+(h&(1<<b)-1)];continue t}for(w=65535&y,b&=15,b&&(m<b&&(h+=M[n++]<<m,m+=8),w+=h&(1<<b)-1,h>>>=b,m-=b),m<15&&(h+=M[n++]<<m,m+=8,h+=M[n++]<<m,m+=8),y=p[h&v];;){if(b=y>>>24,h>>>=b,m-=b,b=y>>>16&255,16&b){if(k=65535&y,b&=15,m<b&&(h+=M[n++]<<m,m+=8,m<b&&(h+=M[n++]<<m,m+=8)),k+=h&(1<<b)-1,k>s){e.msg="invalid distance too far back",P.mode=jo;break e}if(h>>>=b,m-=b,b=a-r,k>b){if(b=k-b,b>d&&P.sane){e.msg="invalid distance too far back",P.mode=jo;break e}if(S=0,_=c,0===u){if(S+=l-b,b<w){w-=b;do{E[a++]=c[S++]}while(--b);S=a-k,_=E}}else if(u<b){if(S+=l+u-b,b-=u,b<w){w-=b;do{E[a++]=c[S++]}while(--b);if(S=0,u<w){b=u,w-=b;do{E[a++]=c[S++]}while(--b);S=a-k,_=E}}}else if(S+=u-b,b<w){w-=b;do{E[a++]=c[S++]}while(--b);S=a-k,_=E}for(;w>2;)E[a++]=_[S++],E[a++]=_[S++],E[a++]=_[S++],w-=3;w&&(E[a++]=_[S++],w>1&&(E[a++]=_[S++]))}else{S=a-k;do{E[a++]=E[S++],E[a++]=E[S++],E[a++]=E[S++],w-=3}while(w>2);w&&(E[a++]=E[S++],w>1&&(E[a++]=E[S++]))}break}if(64&b){e.msg="invalid distance code",P.mode=jo;break e}y=p[(65535&y)+(h&(1<<b)-1)]}}break}}while(n<i&&a<o);w=m>>3,n-=w,m-=w<<3,h&=(1<<m)-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<o?o-a+257:257-(a-o),P.hold=h,P.bits=m};const Ho=15,Bo=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]),Uo=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]),Go=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]),Vo=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]);var Xo=(e,t,n,i,a,r,o,s)=>{const l=s.bits;let d,u,c,h,m,f,p=0,g=0,v=0,y=0,b=0,w=0,k=0,S=0,_=0,M=0,E=null;const P=new Uint16Array(16),T=new Uint16Array(16);let x,A,C,L=null;for(p=0;p<=Ho;p++)P[p]=0;for(g=0;g<i;g++)P[t[n+g]]++;for(b=l,y=Ho;y>=1&&0===P[y];y--);if(b>y&&(b=y),0===y)return a[r++]=20971520,a[r++]=20971520,s.bits=1,0;for(v=1;v<y&&0===P[v];v++);for(b<v&&(b=v),S=1,p=1;p<=Ho;p++)if(S<<=1,S-=P[p],S<0)return-1;if(S>0&&(0===e||1!==y))return-1;for(T[1]=0,p=1;p<Ho;p++)T[p+1]=T[p]+P[p];for(g=0;g<i;g++)0!==t[n+g]&&(o[T[t[n+g]]++]=g);if(0===e?(E=L=o,f=20):1===e?(E=Bo,L=Uo,f=257):(E=Go,L=Vo,f=0),M=0,g=0,p=v,m=r,w=b,k=0,c=-1,_=1<<b,h=_-1,1===e&&_>852||2===e&&_>592)return 1;for(;;){x=p-k,o[g]+1<f?(A=0,C=o[g]):o[g]>=f?(A=L[o[g]-f],C=E[o[g]-f]):(A=96,C=0),d=1<<p-k,u=1<<w,v=u;do{u-=d,a[m+(M>>k)+u]=x<<24|A<<16|C}while(0!==u);for(d=1<<p-1;M&d;)d>>=1;if(0!==d?(M&=d-1,M+=d):M=0,g++,0==--P[p]){if(p===y)break;p=t[n+o[g]]}if(p>b&&(M&h)!==c){for(0===k&&(k=b),m+=v,w=p-k,S=1<<w;w+k<y&&(S-=P[w+k],!(S<=0));)w++,S<<=1;if(_+=1<<w,1===e&&_>852||2===e&&_>592)return 1;c=M&h,a[c]=b<<24|w<<16|m-r}}return 0!==M&&(a[m+M]=p-k<<24|64<<16),s.bits=b,0};const{Z_FINISH:Ko,Z_BLOCK:Yo,Z_TREES:qo,Z_OK:Jo,Z_STREAM_END:Qo,Z_NEED_DICT:Zo,Z_STREAM_ERROR:es,Z_DATA_ERROR:ts,Z_MEM_ERROR:ns,Z_BUF_ERROR:is,Z_DEFLATED:as}=Sr,rs=16180,os=16190,ss=16191,ls=16192,ds=16194,us=16199,cs=16200,hs=16206,ms=16209,fs=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function ps(){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}const gs=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<rs||t.mode>16211?1:0},vs=e=>{if(gs(e))return es;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=rs,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,Jo},ys=e=>{if(gs(e))return es;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,vs(e)},bs=(e,t)=>{let n;if(gs(e))return es;const i=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?es:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,ys(e))},ws=(e,t)=>{if(!e)return es;const n=new ps;e.state=n,n.strm=e,n.window=null,n.mode=rs;const i=bs(e,t);return i!==Jo&&(e.state=null),i};let ks,Ss,_s=!0;const Ms=e=>{if(_s){ks=new Int32Array(512),Ss=new Int32Array(32);let t=0;for(;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(Xo(1,e.lens,0,288,ks,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Xo(2,e.lens,0,32,Ss,0,e.work,{bits:5}),_s=!1}e.lencode=ks,e.lenbits=9,e.distcode=Ss,e.distbits=5},Es=(e,t,n,i)=>{let a;const r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),i>=r.wsize?(r.window.set(t.subarray(n-r.wsize,n),0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>i&&(a=i),r.window.set(t.subarray(n-i,n-i+a),r.wnext),(i-=a)?(r.window.set(t.subarray(n-i,n),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0};var Ps=(e,t)=>{let n,i,a,r,o,s,l,d,u,c,h,m,f,p,g,v,y,b,w,k,S,_,M=0;const E=new Uint8Array(4);let P,T;const x=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(gs(e)||!e.output||!e.input&&0!==e.avail_in)return es;n=e.state,n.mode===ss&&(n.mode=ls),o=e.next_out,a=e.output,l=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,d=n.hold,u=n.bits,c=s,h=l,_=Jo;e:for(;;)switch(n.mode){case rs:if(0===n.wrap){n.mode=ls;break}for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(2&n.wrap&&35615===d){0===n.wbits&&(n.wbits=15),n.check=0,E[0]=255&d,E[1]=d>>>8&255,n.check=wr(n.check,E,2,0),d=0,u=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",n.mode=ms;break}if((15&d)!==as){e.msg="unknown compression method",n.mode=ms;break}if(d>>>=4,u-=4,S=8+(15&d),0===n.wbits&&(n.wbits=S),S>15||S>n.wbits){e.msg="invalid window size",n.mode=ms;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&d?16189:ss,d=0,u=0;break;case 16181:for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(n.flags=d,(255&n.flags)!==as){e.msg="unknown compression method",n.mode=ms;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=ms;break}n.head&&(n.head.text=d>>8&1),512&n.flags&&4&n.wrap&&(E[0]=255&d,E[1]=d>>>8&255,n.check=wr(n.check,E,2,0)),d=0,u=0,n.mode=16182;case 16182:for(;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.head&&(n.head.time=d),512&n.flags&&4&n.wrap&&(E[0]=255&d,E[1]=d>>>8&255,E[2]=d>>>16&255,E[3]=d>>>24&255,n.check=wr(n.check,E,4,0)),d=0,u=0,n.mode=16183;case 16183:for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.head&&(n.head.xflags=255&d,n.head.os=d>>8),512&n.flags&&4&n.wrap&&(E[0]=255&d,E[1]=d>>>8&255,n.check=wr(n.check,E,2,0)),d=0,u=0,n.mode=16184;case 16184:if(1024&n.flags){for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.length=d,n.head&&(n.head.extra_len=d),512&n.flags&&4&n.wrap&&(E[0]=255&d,E[1]=d>>>8&255,n.check=wr(n.check,E,2,0)),d=0,u=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(m=n.length,m>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(i.subarray(r,r+m),S)),512&n.flags&&4&n.wrap&&(n.check=wr(n.check,i,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=i[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=wr(n.check,i,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=i[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=wr(n.check,i,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(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(4&n.wrap&&d!==(65535&n.check)){e.msg="header crc mismatch",n.mode=ms;break}d=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ss;break;case 16189:for(;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}e.adler=n.check=fs(d),d=0,u=0,n.mode=os;case os:if(0===n.havedict)return e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,n.hold=d,n.bits=u,Zo;e.adler=n.check=1,n.mode=ss;case ss:if(t===Yo||t===qo)break e;case ls:if(n.last){d>>>=7&u,u-=7&u,n.mode=hs;break}for(;u<3;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}switch(n.last=1&d,d>>>=1,u-=1,3&d){case 0:n.mode=16193;break;case 1:if(Ms(n),n.mode=us,t===qo){d>>>=2,u-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=ms}d>>>=2,u-=2;break;case 16193:for(d>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if((65535&d)!=(d>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ms;break}if(n.length=65535&d,d=0,u=0,n.mode=ds,t===qo)break e;case ds:n.mode=16195;case 16195:if(m=n.length,m){if(m>s&&(m=s),m>l&&(m=l),0===m)break e;a.set(i.subarray(r,r+m),o),s-=m,r+=m,l-=m,o+=m,n.length-=m;break}n.mode=ss;break;case 16196:for(;u<14;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(n.nlen=257+(31&d),d>>>=5,u-=5,n.ndist=1+(31&d),d>>>=5,u-=5,n.ncode=4+(15&d),d>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ms;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;u<3;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.lens[x[n.have++]]=7&d,d>>>=3,u-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},_=Xo(0,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,_){e.msg="invalid code lengths set",n.mode=ms;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;M=n.lencode[d&(1<<n.lenbits)-1],g=M>>>24,v=M>>>16&255,y=65535&M,!(g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(y<16)d>>>=g,u-=g,n.lens[n.have++]=y;else{if(16===y){for(T=g+2;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(d>>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=ms;break}S=n.lens[n.have-1],m=3+(3&d),d>>>=2,u-=2}else if(17===y){for(T=g+3;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=g,u-=g,S=0,m=3+(7&d),d>>>=3,u-=3}else{for(T=g+7;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=g,u-=g,S=0,m=11+(127&d),d>>>=7,u-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ms;break}for(;m--;)n.lens[n.have++]=S}}if(n.mode===ms)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=ms;break}if(n.lenbits=9,P={bits:n.lenbits},_=Xo(1,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,_){e.msg="invalid literal/lengths set",n.mode=ms;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},_=Xo(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,_){e.msg="invalid distances set",n.mode=ms;break}if(n.mode=us,t===qo)break e;case us:n.mode=cs;case cs:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,n.hold=d,n.bits=u,zo(e,h),o=e.next_out,a=e.output,l=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,d=n.hold,u=n.bits,n.mode===ss&&(n.back=-1);break}for(n.back=0;M=n.lencode[d&(1<<n.lenbits)-1],g=M>>>24,v=M>>>16&255,y=65535&M,!(g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(v&&!(240&v)){for(b=g,w=v,k=y;M=n.lencode[k+((d&(1<<b+w)-1)>>b)],g=M>>>24,v=M>>>16&255,y=65535&M,!(b+g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=b,u-=b,n.back+=b}if(d>>>=g,u-=g,n.back+=g,n.length=y,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=ss;break}if(64&v){e.msg="invalid literal/length code",n.mode=ms;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(T=n.extra;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.length+=d&(1<<n.extra)-1,d>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;M=n.distcode[d&(1<<n.distbits)-1],g=M>>>24,v=M>>>16&255,y=65535&M,!(g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(!(240&v)){for(b=g,w=v,k=y;M=n.distcode[k+((d&(1<<b+w)-1)>>b)],g=M>>>24,v=M>>>16&255,y=65535&M,!(b+g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=b,u-=b,n.back+=b}if(d>>>=g,u-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=ms;break}n.offset=y,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(T=n.extra;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.offset+=d&(1<<n.extra)-1,d>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ms;break}n.mode=16204;case 16204:if(0===l)break e;if(m=h-l,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ms;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=o-n.offset,m=n.length;m>l&&(m=l),l-=m,n.length-=m;do{a[o++]=p[f++]}while(--m);0===n.length&&(n.mode=cs);break;case 16205:if(0===l)break e;a[o++]=n.length,l--,n.mode=cs;break;case hs:if(n.wrap){for(;u<32;){if(0===s)break e;s--,d|=i[r++]<<u,u+=8}if(h-=l,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?wr(n.check,a,h,o-h):yr(n.check,a,h,o-h)),h=l,4&n.wrap&&(n.flags?d:fs(d))!==n.check){e.msg="incorrect data check",n.mode=ms;break}d=0,u=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(4&n.wrap&&d!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=ms;break}d=0,u=0}n.mode=16208;case 16208:_=Qo;break e;case ms:_=ts;break e;case 16210:return ns;default:return es}return e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,n.hold=d,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<ms&&(n.mode<hs||t!==Ko))&&Es(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?wr(n.check,a,h,e.next_out-h):yr(n.check,a,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ss?128:0)+(n.mode===us||n.mode===ds?256:0),(0===c&&0===h||t===Ko)&&_===Jo&&(_=is),_},Ts={inflateReset:ys,inflateReset2:bs,inflateResetKeep:vs,inflateInit:e=>ws(e,15),inflateInit2:ws,inflate:Ps,inflateEnd:e=>{if(gs(e))return es;let t=e.state;return t.window&&(t.window=null),e.state=null,Jo},inflateGetHeader:(e,t)=>{if(gs(e))return es;const n=e.state;return 2&n.wrap?(n.head=t,t.done=!1,Jo):es},inflateSetDictionary:(e,t)=>{const n=t.length;let i,a,r;return gs(e)?es:(i=e.state,0!==i.wrap&&i.mode!==os?es:i.mode===os&&(a=1,a=yr(a,t,n,0),a!==i.check)?ts:(r=Es(e,t,n,n),r?(i.mode=16210,ns):(i.havedict=1,Jo)))},inflateInfo:"pako inflate (from Nodeca project)"};var xs=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};const As=Object.prototype.toString,{Z_NO_FLUSH:Cs,Z_FINISH:Ls,Z_OK:Is,Z_STREAM_END:Ds,Z_NEED_DICT:Rs,Z_STREAM_ERROR:Ns,Z_DATA_ERROR:Ws,Z_MEM_ERROR:Fs}=Sr;function Os(e){this.options=Mo.assign({chunkSize:65536,windowBits:15,to:""},e||{});const 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 xo,this.strm.avail_out=0;let n=Ts.inflateInit2(this.strm,t.windowBits);if(n!==Is)throw new Error(kr[n]);if(this.header=new xs,Ts.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=To.string2buf(t.dictionary):"[object ArrayBuffer]"===As.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Ts.inflateSetDictionary(this.strm,t.dictionary),n!==Is)))throw new Error(kr[n])}function $s(e,t){const n=new Os(t);if(n.push(e),n.err)throw n.msg||kr[n.err];return n.result}Os.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize,a=this.options.dictionary;let r,o,s;if(this.ended)return!1;for(o=t===~~t?t:!0===t?Ls:Cs,"[object ArrayBuffer]"===As.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),r=Ts.inflate(n,o),r===Rs&&a&&(r=Ts.inflateSetDictionary(n,a),r===Is?r=Ts.inflate(n,o):r===Ws&&(r=Rs));n.avail_in>0&&r===Ds&&n.state.wrap>0&&0!==e[n.next_in];)Ts.inflateReset(n),r=Ts.inflate(n,o);switch(r){case Ns:case Ws:case Rs:case Fs:return this.onEnd(r),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(0===n.avail_out||r===Ds))if("string"===this.options.to){let e=To.utf8border(n.output,n.next_out),t=n.next_out-e,a=To.buf2string(n.output,e);n.next_out=t,n.avail_out=i-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(r!==Is||0!==s){if(r===Ds)return r=Ts.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},Os.prototype.onData=function(e){this.chunks.push(e)},Os.prototype.onEnd=function(e){e===Is&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Mo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var js={Inflate:Os,inflate:$s,inflateRaw:function(e,t){return(t=t||{}).raw=!0,$s(e,t)},ungzip:$s,constants:Sr};const{Inflate:zs,inflate:Hs,inflateRaw:Bs,ungzip:Us}=js;var Gs=Us;const Vs=e=>{let t;if(e?.includes(Me))t=Se;else{const n=e?.find((e=>e.includes(_e)));t=n?n.split("=")[1]:ke}return t=t.replace(/\/$/,""),t+"/"+we},Xs=e=>{const t=ca.getAppConfig(Y)||ca.getAppConfig(ne);return t?.capabilities?.includes(e)??!1},Ks=()=>{const e=(()=>{const e=ca.getAppConfig(Y)||ca.getAppConfig(ne);return e?.campaign_cache_ttl??null})();if(null===e)return;if(0===e)return void ca.purgeApiCampaignCache();const t=ca.getApiCampaignSessionTimestamp();if(null===t)return;(Date.now()-t)/1e3>=e&&ca.purgeApiCampaignCache()},Ys=e=>{const t=!Xs(A.THIRD_PARTY_TRANSACTIONS);return e&&!t&&Ze.info(`[${e}] Your plan does not have purchase management features.`),t};function qs(e){try{const t=function(e){if("undefined"!=typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));const t=atob(e),n=t.length,i=new Uint8Array(n);for(let e=0;e<n;e++)i[e]=t.charCodeAt(e);return i}(e.trim()),n=Gs(t),i=(new TextDecoder).decode(n);return JSON.parse(i)}catch{return}}function Js(e,t,n){const i=n.value;return n.value=function(...e){if(!this.platformID)throw new ga;return i.apply(this,e)},n}function Qs(e,t,n){const i=n.value;return n.value=function(...e){const t=ca.getDevice();if(!t?.id)throw new va;return i.apply(this,e)},n}class Zs{get deviceID(){return ca.getDevice()?.id}constructor(){const e=ca.getNamiConfig();!this.platformID&&e&&this.configure(e)}static configure(e){this.instance.configure(e)}configure(e){this.baseURL=Vs(e.namiCommands),this.platformID=e.appPlatformID}async login(e){if(!e)throw new ya;const t=`device/${this.deviceID}/login/`,n={external_id:e};return await this.requestBodyAPI(t,n,"PUT")}async logout(){const e=`device/${this.deviceID}/logout/`;return await this.requestBodyAPI(e,{},"PUT")}async startSession(e){const t=`device/${this.deviceID}/session/`,n=await this.requestBodyAPI(t,{start_time:e,app_env:"production"});ca.setSessionCounter(),n.id&&ca.setSessionId(n.id)}async postImpression(e){const t=`device/${this.deviceID}/impression/`,n=await this.requestBodyAPI(t,e,"POST",!0);n.id&&ca.setLastImpressionId(n.id)}async postConversion(e){const t=`device/${this.deviceID}/transaction/`;await this.requestBodyAPI(t,e,"POST",!0)}async purchaseValidation(e){const t=`device/${this.deviceID}/purchase_event/`;await this.requestBodyAPI(t,e,"PUT")}async fetchAPI(e,t,n){const i=`${this.baseURL}/${this.platformID}/`+e;return await Ca(i,void 0,t,n)}async requestBodyAPI(e,t,n="POST",i=!1,a,r){const o=`${this.baseURL}/${this.platformID}/`+e,s={method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:i};return await Ca(o,s,a,r)}}function el(e){return null!=e?.flow}var tl;Zs.instance=new Zs,T([Qs],Zs.prototype,"login",null),T([Qs],Zs.prototype,"logout",null),T([Qs],Zs.prototype,"startSession",null),T([Qs],Zs.prototype,"postImpression",null),T([Qs],Zs.prototype,"postConversion",null),T([Qs],Zs.prototype,"purchaseValidation",null),T([Js],Zs.prototype,"fetchAPI",null),T([Js],Zs.prototype,"requestBodyAPI",null),e.NamiCampaignRuleType=void 0,(tl=e.NamiCampaignRuleType||(e.NamiCampaignRuleType={})).DEFAULT="default",tl.LABEL="label",tl.UNKNOWN="unknown",tl.URL="url";const nl=()=>ca.getPaywalls(ae)??[],il=()=>ca.getPaywalls(J)??[],al=()=>ua(et([...il(),...nl()]),"id"),rl=e=>al().find((t=>t.id===e)),ol=e=>{const t=al(),n=new Set(t.map((e=>e.id)));return e.every((e=>n.has(e)))};function sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ll,dl={exports:{}};var ul=(ll||(ll=1,function(e){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},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 i=n(18),a=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,i){void 0===i&&(i=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(n),o=Math.max(a,r),s=0,l=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),i=t+new Array(n+1).join(".0");return e.map(i.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(i&&(s=o-Math.min(a,r)),o-=1;o>=s;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===s)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}},e.map=function(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i},e.find=function(e,t){var n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){var a=e[n];if(t(a,n))return a}},e.assign=function(e){for(var t,n,i=e,a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;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){i[t]=e[t]}))};for(t=0,n=r.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=a,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 i,a=(i=n(91))&&i.__esModule?i:{default:i},r=n(18);function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var s=function(){function e(){}var t,n,i;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 a.default(e,t)},e.parse=function(e){return new a.default(e).getResult()},t=e,i=[{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),i&&o(t,i),e}();t.default=s,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=l(n(92)),a=l(n(93)),r=l(n(94)),o=l(n(95)),s=l(n(17));function l(e){return e&&e.__esModule?e:{default:e}}var d=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(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.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(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.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={},i=0,a={},r=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(a[t]=o,r+=1):"object"==typeof o&&(n[t]=o,i+=1)})),i>0){var o=Object.keys(n),l=s.default.find(o,(function(e){return t.isOS(e)}));if(l){var d=this.satisfies(n[l]);if(void 0!==d)return d}var u=s.default.find(o,(function(e){return t.isPlatform(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}}if(r>0){var h=Object.keys(a),m=s.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(a[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),a=s.default.getBrowserTypeByAlias(i);return t&&a&&(i=a.toLowerCase()),i===n},t.compareVersion=function(e){var t=[0],n=e,i=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(i=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(i=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(a,n,i))>-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=d,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.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=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=a.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=a.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=a.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=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=a.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=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=a.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=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=a.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=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=a.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=a.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=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:a.default.getFirstMatch(t,e),version:a.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=a.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=a.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=a.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=a.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=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=a.default.getMacOSVersionName(t),i={name:r.OS_MAP.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=a.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=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=a.default.getAndroidVersionName(t),i={name:r.OS_MAP.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.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=a.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||a.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||a.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:r.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=a.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=a.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=a.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 i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=a.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=a.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 i,a=(i=n(17))&&i.__esModule?i:{default:i},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=a.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=a.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=a.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=a.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=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})}(dl)),dl.exports),cl=sl(ul);const hl="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},ml="function"==typeof hl.BigInt,fl=ml?hl.BigInt.bind(hl):void 0,pl=ml?fl("0xffffffffffffffffffffffffffffffff"):null,gl=ml?fl("0x100000000000000000000000000000000"):null,vl=ml?fl(0):null,yl=ml?fl(1):null,bl=ml?fl(8):null,wl=ml?fl(1e4):null,kl=16,Sl=1/kl,_l={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},Ml=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:C,language:"en"};const t=cl.getParser(window.navigator.userAgent),n=t.getPlatform(),i={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:C,language:window.navigator.language};if(n.type&&(i.form_factor=_l[n.type]),n.model&&(i.device_model=n.model),e&&e.length>0){const t=(e=>{const t=e.find((e=>e.includes(Ee))),n={platform:"",version:""};if(t){const e=t.split(Pe);n.platform=e[1],n.version=e[2]}return n})(e);i.extended_platform=t.platform,i.extended_platform_version=t.version}return i},El=()=>{const e=ca.getNamiConfig();if(e&&e.formFactor)return e.formFactor;if("undefined"==typeof window)return _l.desktop;const t=cl.getParser(window.navigator.userAgent).getPlatform();return t.type?_l[t.type]:_l.desktop},Pl={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4};const Tl=()=>{const{innerWidth:e,innerHeight:t}=window;return Math.min(e/1920,t/1080)||1};function xl(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function Al(e){if(!ml||!pl)return Il(e);try{const t=pl,n=function(e){if(!fl)throw new Error("BigInt is not supported in this environment");const t=e.replace(/-/g,"");return fl("0x"+t)}(e);return Number(n)/Number(t)*100}catch(t){throw Ze.error(`Error calculating audience split position for UUID ${e}`,t),new Error(`Invalid UUID format: ${e}`)}}function Cl(e){if(!fl)throw new Error("BigInt is not supported in this environment");let t=e.toString(16).padStart(32,"0");t=t.substring(0,12)+"4"+t.substring(13);const n=3&parseInt(t[16],16)|8;return t=t.substring(0,16)+n.toString(16)+t.substring(17),t.slice(0,8)+"-"+t.slice(8,12)+"-"+t.slice(12,16)+"-"+t.slice(16,20)+"-"+t.slice(20)}function Ll(e,t=.5){if(!Number.isFinite(e))throw new Error("Invalid target");if(!Number.isFinite(t))throw new Error("Invalid tolerance");const n=Math.max(0,Math.min(100,e)),i=Math.max(0,Math.min(50,t)),a=e=>Math.round(100*e),r=Math.max(0,a(n-i)),o=Math.min(1e4,a(n+i));if(!(ml&&pl&&fl&&wl))return function(e,t){const n=Math.max(0,Math.min(100,e-t)),i=Math.min(100,Math.max(0,e+t));let a=xl(),r=Number.POSITIVE_INFINITY;const o=50;for(let e=0;e<o;e++){const e=xl(),t=Il(e);if(t>=n&&t<=i)return e;const o=Dl(t,n,i);o<r&&(r=o,a=e)}return a}(n,i);const s=pl,l=fl,d=wl,u=e=>s*l(e)/d,c=u(r),h=u(o);if(h<=c)return Cl(c);const m=c+function(e){if(!fl||null===gl||null===yl||null===vl||null===bl)throw new Error("BigInt is not supported in this environment");const t=fl,n=vl,i=yl,a=bl,r=gl;if(e<n)throw new Error("n must be non-negative");if(e===n)return n;const o=new Uint8Array(16),s=e+i,l=r/s*s-i;let d=0;for(;d<10;){crypto.getRandomValues(o);let e=n;for(const n of o)e=e<<a|t(n);if(e<=l)return e%s;d++}try{crypto.getRandomValues(o);let i=n;for(const e of o)i=i<<a|t(e);const r=i%s;return Ze.warn("randomBigInt: reached max rejection attempts, using modulo fallback",{n:e.toString(),attempts:d}),r}catch(e){throw Ze.error("randomBigInt: failed to generate random values",e),new Error("randomBigInt: unable to generate random value")}}(h-c);return Cl(m)}function Il(e){const t=function(e){const t=e.replace(/-/g,"").toLowerCase();if(!/^[0-9a-f]{32}$/.test(t))throw new Error(`Invalid UUID format: ${e}`);let n=0;for(let e=t.length-1;e>=0;e--){n=(n+parseInt(t[e],kl))*Sl}return n}(e);return 100*t}function Dl(e,t,n){return e<t?t-e:e>n?e-n:0}const Rl=e=>{try{return Boolean(new URL(e))}catch{return!1}},Nl=(e,t,n)=>e?e.flatMap((e=>{let i;if(i="string"==typeof n?e.segments.filter((e=>e.form_factors.some((e=>e.form_factor===n)))):e.segments,0===i.length)return[];const a=((e,t)=>{const n=[...e].sort(((e,t)=>e.split-t.split));for(const e of n)if(t<=e.split)return e;return n[n.length-1]})(i,t);return{form_factors:a.form_factors,paywall:a.paywall,flow:a.flow,segment:a.segment,split:a.split,conversion_event_type:a.conversion_event_type,conversion_event_url:a.conversion_event_url,rule:e.rule,name:e.name,type:e.type,value:e.value,external_segment:e.external_segment}})):[],Wl=()=>{const e=ca.getCampaignRules(q)??[],t=ca.getCampaignRules(ie)??[],n=El(),i=et([...e,...t]).filter((e=>e.form_factors?.some((e=>e.form_factor===n))));return ua(i,"rule")},Fl=e=>{const t=ca.getCampaignRules(e)??[],n=El();return et(t).filter((e=>e.form_factors?.some((e=>e.form_factor===n))))},Ol=()=>Fl(ie),$l=()=>Fl(q),jl=(t,n,i,a)=>{const r=t().find((t=>a?t.type==a&&t.value==i:t.type==e.NamiCampaignRuleType.DEFAULT));if(!r)return{};const o=n().find((e=>r?.paywall===e.id));return{campaign:r,paywall:o}},zl=(e,t)=>{const n=jl($l,il,e,t);if(n.campaign&&n.paywall)return{campaign:n.campaign,paywall:n.paywall};const i=jl(Ol,nl,e,t);return i.campaign&&i.paywall?{campaign:i.campaign,paywall:i.paywall}:n.campaign||n.paywall?{campaign:n.campaign,paywall:n.paywall}:{campaign:i.campaign,paywall:i.paywall}};var Hl,Bl="object"==typeof Reflect?Reflect:null,Ul=Bl&&"function"==typeof Bl.apply?Bl.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};Hl=Bl&&"function"==typeof Bl.ownKeys?Bl.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Gl=Number.isNaN||function(e){return e!=e};function Vl(){Vl.init.call(this)}Vl.EventEmitter=Vl,Vl.prototype._events=void 0,Vl.prototype._eventsCount=0,Vl.prototype._maxListeners=void 0;var Xl=10;function Kl(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Yl(e){return void 0===e._maxListeners?Vl.defaultMaxListeners:e._maxListeners}function ql(e,t,n,i){var a,r,o,s;if(Kl(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]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(a=Yl(e))>0&&o.length>a&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function Jl(){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 Ql(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=Jl.bind(i);return a.listener=n,i.wrapFn=a,a}function Zl(e,t,n){var i=e._events;if(void 0===i)return[];var a=i[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]: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}(a):td(a,a.length)}function ed(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 td(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(Vl,"defaultMaxListeners",{enumerable:!0,get:function(){return Xl},set:function(e){if("number"!=typeof e||e<0||Gl(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Xl=e}}),Vl.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},Vl.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Gl(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},Vl.prototype.getMaxListeners=function(){return Yl(this)},Vl.prototype.emit=function(e){var t=[];for(let e=1;e<arguments.length;e++)t.push(arguments[e]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var r=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw r.context=a,r}var o=i[e];if(void 0===o)return!1;if("function"==typeof o)Ul(o,this,t);else{var s=o.length,l=td(o,s);for(let e=0;e<s;++e)Ul(l[e],this,t)}return!0},Vl.prototype.addListener=function(e,t){return ql(this,e,t,!1)},Vl.prototype.on=Vl.prototype.addListener,Vl.prototype.prependListener=function(e,t){return ql(this,e,t,!0)},Vl.prototype.once=function(e,t){return Kl(t),this.on(e,Ql(this,e,t)),this},Vl.prototype.prependOnceListener=function(e,t){return Kl(t),this.prependListener(e,Ql(this,e,t)),this},Vl.prototype.removeListener=function(e,t){var n,i,a,r,o;if(Kl(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){o=n[r].listener,a=r;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},Vl.prototype.off=Vl.prototype.removeListener,Vl.prototype.removeAllListeners=function(e){var t,n,i;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 a,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(a=r[i])&&this.removeAllListeners(a);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(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},Vl.prototype.listeners=function(e){return Zl(this,e,!0)},Vl.prototype.rawListeners=function(e){return Zl(this,e,!1)},Vl.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):ed.call(e,t)},Vl.prototype.listenerCount=ed,Vl.prototype.eventNames=function(){return this._eventsCount>0?Hl(this._events):[]};class nd{constructor(){this.emitter=new Vl}static getInstance(){return this.instance||(this.instance=new nd),this.instance}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}emit(e,...t){this.emitter.emit(e,...t)}addListener(e,t){this.emitter.addListener(e,t)}removeListener(e,t){this.emitter.removeListener(e,t)}removeAllListeners(e){e?this.emitter.removeAllListeners(e):this.emitter.removeAllListeners()}listeners(e){return this.emitter.listeners(e)}listenerCount(e){return this.emitter.listenerCount(e)}}class id{constructor(){this.disableCampaignUpdates=!1,this.currentFormFactor=El()}configure(e,t,n=[]){this.currentFormFactor=e,this.splitPosition=t,this.disableCampaignUpdates=n.includes("disableCampaignUpdates")}async fetchCampaignRules(e){const t=ca.getDevice();let n;return this.disableCampaignUpdates?(Ze.info("Campaign updates disabled by configuration. Skipping fetch."),[]):(n=t?.id?await this.getCampaigns(t.id):await this.getAnonymousCampaigns(),n=n?.filter((e=>e.paywall&&e.form_factors.some((e=>e.form_factor===this.currentFormFactor))||e.flow&&e.flow?.object?.form_factors?.some((e=>e.form_factor===this.currentFormFactor)))),n=n?.filter((t=>{if(t.paywall){const n=e.find((e=>e.id==t.paywall));if(n)return t}else if(t.flow)return t})),ca.setCampaignRules(q,n),ca.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),n)}invokeAvailableCampaignsResponseHandler(){const e=nd.getInstance().listeners(He),t=Wl();e.forEach((e=>e(t)))}async getAnonymousCampaigns(e=C){const t=`campaign_rules/?sdk_version=${e}`;try{const e=await Zs.instance.fetchAPI(t);return Nl(e.results??[],this.splitPosition,this.currentFormFactor)}catch(e){const n=this.fallbackData();if(!n)throw Ze.error(Aa(e.status,t)),e;return n.results}}async getCampaigns(e){const t=`device/${e}/campaign_rules/`;let n;try{n=await Zs.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw Ze.error(Aa(e.status,t)),e}return n?.results||[]}fallbackData(){const e=ca.getCampaignRules(q)||ca.getCampaignRules(ie);return e?{count:e.length,results:e}:null}}function ad(e,t){return Ei(e,t)}id.instance=new id;class rd{createOrUpdateDevice(e,t,n){const i=ca.getDevice();if(!i?.id){const i={...e,id:t??this.getAnonymousUUID()??xl()};return{id:i.id,device:this.createDevice(i,n)}}return this.isEqualDevices(i,e)?{id:i.id,device:Promise.resolve(i)}:(this.updateDevice(i.id,e),{id:i.id,device:null})}async createDevice(e,t){try{const n=0,i=await this.requestAPIData("device/",e,void 0,void 0,n);return i?(ca.setDevice(i),i):(Ze.info("Device creation returned null, switching to anon mode for this session"),t?.setInMemoryAnonymousMode(!0),null)}catch(e){if(console.error("Error creating device:",e),e instanceof ha)return Ze.info("Retry limit exceeded, switching to anon mode for this session"),t?.setInMemoryAnonymousMode(!0),null;throw e}}async updateDevice(e,t){const n=await this.requestAPIData(`device/${e}/`,t,"PUT");return n&&ca.setDevice(n),n}async updateDeviceField(e,t){const n={[e]:t},i=ca.getDevice();if(!i?.id)throw new va;const a=await this.requestAPIData(`device/${i.id}/`,n,"PATCH");return a&&ca.setDevice(a),a}async requestAPIData(e,t,n="POST",i=De,a){let r;try{r=await Zs.instance.requestBodyAPI(e,t,n,!1,i,a)}catch(t){if(t instanceof ga)throw t;if("device/"===e&&t instanceof ha)throw t;if(r=ca.getDevice(),!r)return Ze.error(Aa(t.status,e)),null}return r}isEqualDevices(e,t){const n={...e,...t},i=Object.keys(e).reduce(((e,t)=>(e[t]=n[t],e)),{});return ad(i,e)}getOrCreateAnonymousUUID(){let e=ca.getAnonymousUUID();return e||(e=xl(),ca.setAnonymousUUID(e)),e}getAnonymousUUID(){const e=ca.getAnonymousUUID();return e?(ca.clearAnonymousUUID(),e):null}}rd.instance=new rd;class od{async fetchProducts(){if(Xs(A.THIRD_PARTY_TRANSACTIONS))return[];let e;try{e=await Zs.instance.fetchAPI("products/")}catch(t){if(e=this.fallbackData(),!e)throw Ze.error(Aa(t.status,"products/")),t}return e?.results&&ca.setProducts(Z,e.results),e?.results||[]}fallbackData(){const e=ca.getProducts(Z)||ca.getProducts(re);return e?{count:e.length,results:e}:null}}od.instance=new od;class sd{async fetchPaywalls(){const e=ca.getDevice();let t;return t=e?.id?await this.getPaywalls(e.id):await this.getAnonymousPaywalls(),t&&ca.setPaywalls(J,t),t}async getAnonymousPaywalls(e=C){const t=`paywalls/?sdk_version=${e}`;let n=null;try{n=await Zs.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw Ze.error(Aa(e.status,t)),e}return n?.results||[]}async getPaywalls(e){const t=`device/${e}/paywalls/`;let n;try{n=await Zs.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw Ze.error(Aa(e.status,t)),e}return n?.results||[]}fallbackData(){const e=ca.getPaywalls(J)||ca.getPaywalls(ae);return e?{count:e.length,results:e}:null}}sd.instance=new sd;class ld{async fetchConfig(){let e;try{e=await Zs.instance.fetchAPI("config/")}catch(t){if(e=ca.getAppConfig(Y)||ca.getAppConfig(ne),!e)throw Ze.error(Aa(t.status,"config/")),t}return e&&ca.setAppConfig(Y,e),e}}ld.instance=new ld;let dd=null;function ud(){return!!ca.getAnonymousMode()||!!dd&&dd.isInMemoryAnonymousMode()}class cd{async startSession(){if(ud())Ze.debug("Skipping session start call - anonymous mode");else try{await Zs.instance.startSession(new Date)}catch(e){Ze.error("error on start session: ",e)}}}cd.instance=new cd;const hd={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"}},md="en";function fd(e){const t=function(e){if(!e)return md;const t=e.trim();if(hd[t])return t;const n=t.toLowerCase(),i=n.split("-")[0];return hd[i]?i:"zh"===i?n.includes("tw")||n.includes("hk")?"zh-TW":"zh-CN":md}(ca.getLanguageCode()),n=hd[t]??hd[md];return n?.[e]??e}const pd=e=>"subscription"===e;function gd(e){if(pd(e?.product_type)){const t=yd(e);if(t.length>0)return t[0].billingPeriod}return null}function vd(e){const t=function(e){if(!e)return[];const t=e.offers.filter((e=>"promo"===e.offer_type));return bd(t,e.subscription_period)}(e).find((e=>0===e.priceAmountMicros));return t?.billingPeriod||null}function yd(e){if(!e)return[];return bd(e.offers.filter((e=>"default"===e.offer_type)),e.subscription_period)}function bd(e,t){return e.map((e=>wd(e,t)))}function wd(e,t){if(!e)return{};const n=e.promo_period?.count??t?.count,i=e.promo_period?.type??t?.type,a=e.promo_price?.price??e.price,r=e.promo_price?.currency??e.currency;return{priceAmountMicros:1e6*a,priceCurrencyCode:r,billingPeriod:i?`P${n}${i[0].toUpperCase()}`:"",formattedPrice:_d(r).format(a)}}function kd(e,t=!1,n=!1,i=!1,a=!1){if(!e)return null;const r=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!r)return null;const[o,s,l,d]=r.slice(1).map((e=>parseInt(e))),u=(e,t,n,i,r)=>{const o=(e=>a?`${e}_abbrev`:e)(r),s=(e=>a?`${e}_abbrev_plural`:`${e}_plural`)(r);let l=fd(o),d=fd(s);return a||l!==o||(l=fd(`${r}_abbrev`)),a||d!==s||(d=fd(`${r}_abbrev_plural`)),i?e.toString():n?1===e||t?l:d:1===e||t?`${e} ${l}`:`${e} ${d}`};switch(e.at(-1)){case"D":return u(d,t,n,i,"nami_day");case"W":return u(l,t,n,i,"nami_week");case"M":return u(s,t,n,i,"nami_month");case"Y":return u(o,t,n,i,"nami_year")}return null}function Sd(e){if(!e||e.length<2)return!1;const t=e.at(-1)?.toUpperCase();return"M"===t||"Y"===t}function _d(e){const t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:e})}catch{return new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:"USD"})}}const Md=(e,t,n)=>e&&t&&n?n.format(e-t):null,Ed=(e,t,n,i)=>{if(e&&t&&n&&i){const a=100*(1-e/(n/i*t));return`${Math.round(a)}%`}return null},Pd=(e,t)=>{if(""==t)return;const n=parseInt(t)-1;return n>=0&&n<e?.length?e[n]:e?.find((e=>e.sku_ref_id===t))},Td=e=>Ad(e.priceAmountMicros)/xd(e.billingPeriod),xd=e=>{let t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Ad=e=>e/1e6;function Cd(e){return parseFloat((Math.round(e)/100).toFixed(2))}const Ld=(e,t,n=[])=>({price:()=>Rd(e),name:()=>e?.name,title:()=>e?.name,description:()=>e?.description,duration:()=>Nd(e),durationSingular:()=>Nd(e,!0),period:()=>Nd(e,!1,!0),periodNumber:()=>Nd(e,!1,!1,!0),freeTrialDuration:()=>Wd(e),freeTrialDurationSingular:()=>Wd(e,!0),freeTrialPeriod:()=>Wd(e,!1,!0),freeTrialPeriodNumber:()=>Wd(e,!1,!1,!0),pricePerMonth:()=>Fd(e),pricePerMonthRounded:()=>Fd(e,!0),periodInMonths:()=>Od(e),durationInMonths:()=>$d(e),durationInMonthsSingular:()=>$d(e,!0),periodNumberInMonths:()=>jd(e),percentagePriceDifferenceFromSku:()=>zd(e,t,n),priceDifferenceFromSku:()=>Hd(e,t,n),promoEligible:()=>null===Bd(e)&&null!==Ud(e,t),freeTrialEligible:()=>null!==Bd(e),promo:()=>Ud(e,t)?.offer_ref_id,promoCode:()=>"XXXXX",promoPrice:()=>Gd(e,t)?.formattedPrice,promoPeriod:()=>Vd(e,t,!1,!0),promoPeriodNumber:()=>Vd(e,t,!1,!1,!0),promoDuration:()=>Vd(e,t),promoDurationSingular:()=>Vd(e,t,!0),introEligible:()=>!1,pricePerDay:()=>Xd(e),pricePerWeek:()=>Kd(e),pricePerWeekRounded:()=>Kd(e,!0),introductoryPrice:()=>Yd(e,t),introductoryPeriod:()=>qd(e,t,!1,!0),introductoryPeriodNumber:()=>qd(e,t,!1,!1,!0),introductoryDuration:()=>qd(e,t),introductoryDurationSingular:()=>qd(e,t,!0),introductoryPricePerMonth:()=>Jd(e,t),introductoryPricePerMonthRounded:()=>Jd(e,t,!0),durationAbbrev:()=>Nd(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>Wd(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>qd(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>Vd(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>Vd(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>$d(e,!1,!1,!1,!0),durationSingularAbbrev:()=>Nd(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>Wd(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>qd(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>Vd(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>Vd(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>$d(e,!0,!1,!1,!0),periodAbbrev:()=>Nd(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>Wd(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>qd(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>Vd(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>Vd(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>$d(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;const t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;const[,n,i,a,r]=t,o=void 0!==n?parseInt(n,10):0,s=void 0!==i?parseInt(i,10):0,l=void 0!==a?parseInt(a,10):0;return(void 0!==r?parseInt(r,10):0)>0?null:l>0?1===l?fd("nami_weekly"):2===l?fd("nami_biweekly"):null:s>0?fd(1===s?"nami_monthly":2===s?"nami_bimonthly":3===s?"nami_quarterly":6===s?"nami_biannually":12===s?"nami_yearly":"nami_monthly"):o>0?fd("nami_yearly"):null}(gd(e)),iso_subscription_duration:()=>Zd(e),invalid:()=>!1,unavailable:()=>!1}),Id=()=>Object.keys(Ld({})),Dd=(e,t,n,i=[])=>{if(!t)return null;const a=Ld(t,n,i);return a[e]?a[e]():null},Rd=e=>{const t=yd(e);return t&&t.length?t[0].formattedPrice:null},Nd=(e,t,n,i,a)=>kd(gd(e),t,n,i,a),Wd=(e,t,n,i,a)=>kd(vd(e),t,n,i,a),Fd=(e,t)=>{const n=yd(e);if(!n||0===n.length)return null;const i=Td(n[0]);return i?_d(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},Od=(e,t)=>{const n=yd(e);if(!n||0===n.length)return null;const i=n[0].billingPeriod;if(!Sd(i))return null;return kd("P1Y"===i?"P12M":i,!1,!1,!1,t)},$d=(e,t,n,i,a)=>{const r=yd(e);if(!r||0===r.length)return null;const o=r[0].billingPeriod;if(!Sd(o))return null;return kd("P1Y"===o?"P12M":o,t,n,i,a)},jd=e=>{if(!e)return 0;const t=yd(e);return t&&t.length?xd(t[0].billingPeriod):0},zd=(e,t,n=[])=>{const i=yd(e);if(!i||0===i.length)return null;const a=Pd(n,t??"")?.product_details;if(!t||!a)return Ed(Cd(i[0].priceAmountMicros),jd(e));const r=yd(a);return Ed(Cd(i[0].priceAmountMicros),jd(e),r?.length>0?Cd(r[0].priceAmountMicros):0,jd(a))},Hd=(e,t,n=[])=>{const i=yd(e);if(!i||0===i.length)return null;const a=Pd(n,t??"")?.product_details;if(!t||!a)return Md(Td(i[0]));const r=yd(a);return Md(Td(i[0]),Td(r[0]),_d(r[0].priceCurrencyCode))},Bd=e=>vd(e),Ud=(e,t)=>{if(!e)return null;const n=e.offers.filter((e=>"promo"===e.offer_type));if(!t)return n[0]||null;const i=n[parseInt(t)];return i?i||null:n.find((e=>e.offer_ref_id===t))||null},Gd=(e,t)=>{if(!e)return null;return wd(Ud(e,t),e.subscription_period)},Vd=(e,t,n,i,a,r)=>{const o=Gd(e,t);return kd(o?.billingPeriod||null,n,i,a,r)},Xd=(e,t)=>{const n=yd(e);if(!n||0===n.length)return null;const i=Ad(n[0].priceAmountMicros)/(e=>{const t=xd(e);return t?30.437*t:1})(n[0].billingPeriod);return i?_d(n[0].priceCurrencyCode).format(i):null},Kd=(e,t)=>{const n=yd(e);if(!n||0===n.length)return null;const i=Ad(n[0].priceAmountMicros)/(e=>{const t=xd(e);return t?52*t/12:1})(n[0].billingPeriod);return i?_d(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},Yd=(e,t)=>{const n=Qd(e,t);return n?.formattedPrice||null},qd=(e,t,n,i,a,r)=>{const o=Qd(e,t);return kd(o?.billingPeriod||null,n,i,a,r)},Jd=(e,t,n)=>{const i=Qd(e,t);if(!i)return;const a=Ad(i.priceAmountMicros),r=xd(i.billingPeriod),o=n?Math.round(a/r):a/r;return _d(i.priceCurrencyCode).format(o)},Qd=(e,t)=>{if(!e)return null;let n;return t?(n=e.offers[parseInt(t)],n||(n=e.offers.find((e=>e.offer_ref_id===t))||null)):n=e.offers[0],wd(n,e.subscription_period)},Zd=e=>{const t=gd(e);return t?"P7D"===t?"P1W":t:null};function eu(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:function(e,t,n){var i=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(a);++i<a;)r[i]=e[i+t];return r}(e,t,n)}var tu=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function nu(e){return tu.test(e)}var iu="\\ud800-\\udfff",au="["+iu+"]",ru="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ou="\\ud83c[\\udffb-\\udfff]",su="[^"+iu+"]",lu="(?:\\ud83c[\\udde6-\\uddff]){2}",du="[\\ud800-\\udbff][\\udc00-\\udfff]",uu="(?:"+ru+"|"+ou+")"+"?",cu="[\\ufe0e\\ufe0f]?",hu=cu+uu+("(?:\\u200d(?:"+[su,lu,du].join("|")+")"+cu+uu+")*"),mu="(?:"+[su+ru+"?",ru,lu,du,au].join("|")+")",fu=RegExp(ou+"(?="+ou+")|"+mu+hu,"g");function pu(e){return nu(e)?function(e){return e.match(fu)||[]}(e):function(e){return e.split("")}(e)}var gu,vu=(gu="toUpperCase",function(e){var t=nu(e=Ki(e))?pu(e):void 0,n=t?t[0]:e.charAt(0),i=t?eu(t,1).join(""):e.slice(1);return n[gu]()+i});var yu,bu=(yu={"À":"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==yu?void 0:yu[e]}),wu=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ku=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Su=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var _u=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Mu="\\ud800-\\udfff",Eu="\\u2700-\\u27bf",Pu="a-z\\xdf-\\xf6\\xf8-\\xff",Tu="A-Z\\xc0-\\xd6\\xd8-\\xde",xu="\\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",Au="["+xu+"]",Cu="\\d+",Lu="["+Eu+"]",Iu="["+Pu+"]",Du="[^"+Mu+xu+Cu+Eu+Pu+Tu+"]",Ru="(?:\\ud83c[\\udde6-\\uddff]){2}",Nu="[\\ud800-\\udbff][\\udc00-\\udfff]",Wu="["+Tu+"]",Fu="(?:"+Iu+"|"+Du+")",Ou="(?:"+Wu+"|"+Du+")",$u="(?:['’](?:d|ll|m|re|s|t|ve))?",ju="(?:['’](?:D|LL|M|RE|S|T|VE))?",zu="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Hu="[\\ufe0e\\ufe0f]?",Bu=Hu+zu+("(?:\\u200d(?:"+["[^"+Mu+"]",Ru,Nu].join("|")+")"+Hu+zu+")*"),Uu="(?:"+[Lu,Ru,Nu].join("|")+")"+Bu,Gu=RegExp([Wu+"?"+Iu+"+"+$u+"(?="+[Au,Wu,"$"].join("|")+")",Ou+"+"+ju+"(?="+[Au,Wu+Fu,"$"].join("|")+")",Wu+"?"+Fu+"+"+$u,Wu+"+"+ju,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cu,Uu].join("|"),"g");function Vu(e,t,n){return e=Ki(e),void 0===t?function(e){return _u.test(e)}(e)?function(e){return e.match(Gu)||[]}(e):function(e){return e.match(Su)||[]}(e):e.match(t)||[]}var Xu=RegExp("['’]","g");var Ku,Yu=(Ku=function(e,t,n){return t=t.toLowerCase(),e+(n?vu(Ki(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var i=-1,a=null==e?0:e.length;++i<a;)n=t(n,e[i],i,e);return n}(Vu(function(e){return(e=Ki(e))&&e.replace(wu,bu).replace(ku,"")}(e).replace(Xu,"")),Ku,"")});function qu(e,t,n,i){const a=n.flatMap((e=>e.products)).find((e=>e.id===t.selectedProducts[t.currentGroupId]));return Qu(ic(e,a?.sku_ref_id),a,i)}function Ju(e,t,n){const i=t.find((e=>e.id===n))?.products??[];return i.forEach((t=>{t.product_details=ic(e,t.sku_ref_id||""),t.variables=Qu(t.product_details,t,i)})),i}function Qu(e,t,n){if(!t)return{};const i=t.variables;if(!i)return{...t};Object.keys(i).forEach((t=>{if(Zu(i[t])){const a=tc(i[t],e,n);i[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(a)}}));const a={};return Id().forEach((t=>{if(void 0===i[t]){const i=Dd(t,e,void 0,n);null!==i&&(a[t]=i)}})),{...t,...a,...i}}function Zu(e){return"string"==typeof e&&e.includes(Ye)}function ec(e,t,n){return t?(Object.keys(t).forEach((i=>{Zu(t[i])&&(t[i]=t[Yu(i)]=tc(t[i],e,n))})),{...t}):{}}const tc=(e,t,n)=>e.replace(Ve,((i,a)=>{const r=Ve.exec(e)?.slice(1)||[];a=r[0]??a;const o=r[1]?.replace(":","")??"";return Dd(a,t,o,n)}));function nc(e,t){return t.flatMap((e=>e.products)).some((t=>1==Dd("freeTrialEligible",ic(e,t.sku_ref_id))))}function ic(e=[],t=""){return e.find((e=>e.product_ref_id===t))||null}var ac=function(){try{var e=Wt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function rc(e,t,n){"__proto__"==t&&ac?ac(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var oc=Object.prototype.hasOwnProperty;function sc(e,t,n){var i=e[t];oc.call(e,t)&&tt(i,n)&&(void 0!==n||t in e)||rc(e,t,n)}function lc(e,t,n,i){var a=!n;n||(n={});for(var r=-1,o=t.length;++r<o;){var s=t[r],l=void 0;void 0===l&&(l=e[s]),a?rc(n,s,l):sc(n,s,l)}return n}var dc=Object.prototype.hasOwnProperty;function uc(e){if(!yt(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Yn(e),n=[];for(var i in e)("constructor"!=i||!t&&dc.call(e,i))&&n.push(i);return n}function cc(e){return Zn(e)?Xn(e,!0):uc(e)}var hc="object"==typeof e&&e&&!e.nodeType&&e,mc=hc&&"object"==typeof module&&module&&!module.nodeType&&module,fc=mc&&mc.exports===hc?st.Buffer:void 0,pc=fc?fc.allocUnsafe:void 0;var gc=qn(Object.getPrototypeOf,Object),vc=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)gn(t,Sn(e)),e=gc(e);return t}:bn;function yc(e){return yn(e,cc,vc)}var bc=Object.prototype.hasOwnProperty;function wc(e){var t=new e.constructor(e.byteLength);return new Jt(t).set(new Jt(e)),t}var kc=/\w*$/;var Sc=lt?lt.prototype:void 0,_c=Sc?Sc.valueOf:void 0;var Mc="[object Boolean]",Ec="[object Date]",Pc="[object Map]",Tc="[object Number]",xc="[object RegExp]",Ac="[object Set]",Cc="[object String]",Lc="[object Symbol]",Ic="[object ArrayBuffer]",Dc="[object DataView]",Rc="[object Float32Array]",Nc="[object Float64Array]",Wc="[object Int8Array]",Fc="[object Int16Array]",Oc="[object Int32Array]",$c="[object Uint8Array]",jc="[object Uint8ClampedArray]",zc="[object Uint16Array]",Hc="[object Uint32Array]";function Bc(e,t,n){var i,a=e.constructor;switch(t){case Ic:return wc(e);case Mc:case Ec:return new a(+e);case Dc:return function(e,t){var n=t?wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case Rc:case Nc:case Wc:case Fc:case Oc:case $c:case jc:case zc:case Hc:return function(e,t){var n=t?wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case Pc:return new a;case Tc:case Cc:return new a(e);case xc:return function(e){var t=new e.constructor(e.source,kc.exec(e));return t.lastIndex=e.lastIndex,t}(e);case Ac:return new a;case Lc:return i=e,_c?Object(_c.call(i)):{}}}var Uc=Object.create,Gc=function(){function e(){}return function(t){if(!yt(t))return{};if(Uc)return Uc(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Vc=Bn&&Bn.isMap,Xc=Vc?$n(Vc):function(e){return _n(e)&&"[object Map]"==yi(e)};var Kc=Bn&&Bn.isSet,Yc=Kc?$n(Kc):function(e){return _n(e)&&"[object Set]"==yi(e)},qc=1,Jc=2,Qc=4,Zc="[object Arguments]",eh="[object Function]",th="[object GeneratorFunction]",nh="[object Object]",ih={};function ah(e,t,n,i,a,r){var o,s=t&qc,l=t&Jc,d=t&Qc;if(void 0!==o)return o;if(!yt(e))return e;var u=vn(e);if(u){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&bc.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}(e,o)}else{var c=yi(e),h=c==eh||c==th;if(In(e))return function(e,t){if(t)return e.slice();var n=e.length,i=pc?pc(n):new e.constructor(n);return e.copy(i),i}(e,s);if(c==nh||c==Zc||h&&!a){if(o=l||h?{}:function(e){return"function"!=typeof e.constructor||Yn(e)?{}:Gc(gc(e))}(e),!s)return l?function(e,t){return lc(e,vc(e),t)}(e,function(e,t){return e&&lc(t,cc(t),e)}(o,e)):function(e,t){return lc(e,Sn(e),t)}(e,function(e,t){return e&&lc(t,ei(t),e)}(o,e))}else{if(!ih[c])return a?e:{};o=Bc(e,c,s)}}r||(r=new Ut);var m=r.get(e);if(m)return m;r.set(e,o),Yc(e)?e.forEach((function(i){o.add(ah(i,t,n,i,e,r))})):Xc(e)&&e.forEach((function(i,a){o.set(a,ah(i,t,n,a,e,r))}));var f=u?void 0:(d?l?yc:ti:l?cc:ei)(e);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););}(f||e,(function(i,a){f&&(i=e[a=i]),sc(o,a,ah(i,t,n,a,e,r))})),o}ih[Zc]=ih["[object Array]"]=ih["[object ArrayBuffer]"]=ih["[object DataView]"]=ih["[object Boolean]"]=ih["[object Date]"]=ih["[object Float32Array]"]=ih["[object Float64Array]"]=ih["[object Int8Array]"]=ih["[object Int16Array]"]=ih["[object Int32Array]"]=ih["[object Map]"]=ih["[object Number]"]=ih[nh]=ih["[object RegExp]"]=ih["[object Set]"]=ih["[object String]"]=ih["[object Symbol]"]=ih["[object Uint8Array]"]=ih["[object Uint8ClampedArray]"]=ih["[object Uint16Array]"]=ih["[object Uint32Array]"]=!0,ih["[object Error]"]=ih[eh]=ih["[object WeakMap]"]=!1;const rh=(e,t,n)=>{const i=Object.getOwnPropertyDescriptor(e,t);if(!i||i.configurable)try{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n,writable:!1})}catch{try{e[t]=n}catch{}}};class oh{constructor(){this.listeners=new Map}addEventListener(e,t,n){if(!t)return;const i=(e=>"boolean"==typeof e?{capture:e}:e??{})(n),a=this.listeners.get(e)??[];if(a.some((e=>e.listener===t)))return;const r={listener:t,once:Boolean(i.once)};if(i.signal){if(i.signal.aborted)return;r.signal=i.signal,r.abortHandler=()=>this.removeEventListener(e,t),i.signal.addEventListener("abort",r.abortHandler,{once:!0})}a.push(r),this.listeners.set(e,a)}removeEventListener(e,t){if(!t)return;const n=this.listeners.get(e);if(n&&0!==n.length){for(let e=n.length-1;e>=0;e-=1){const i=n[e];i.listener===t&&(i.signal&&i.abortHandler&&i.signal.removeEventListener("abort",i.abortHandler),n.splice(e,1))}0===n.length&&this.listeners.delete(e)}}dispatchEvent(e){if(!e||"string"!=typeof e.type)throw new TypeError('Failed to execute "dispatchEvent": event type must be a string.');const t=this.listeners.get(e.type);if(!t||0===t.length)return!0;rh(e,"target",this);let n=!1;const i=e.stopImmediatePropagation?.bind(e),a=e.stopPropagation?.bind(e),r=()=>{n=!0,i?.()},o=()=>{e.cancelBubble=!0,a?.()};e.stopImmediatePropagation=r,e.stopPropagation=o;const s=t.slice();for(const t of s){if(n)break;rh(e,"currentTarget",this),"function"==typeof t.listener?t.listener.call(this,e):"object"==typeof(l=t.listener)&&null!==l&&"handleEvent"in l&&t.listener.handleEvent.call(t.listener,e),t.once&&this.removeEventListener(e.type,t.listener)}var l;if(i)e.stopImmediatePropagation=i;else try{delete e.stopImmediatePropagation}catch{e.stopImmediatePropagation=r}if(a)e.stopPropagation=a;else try{delete e.stopPropagation}catch{e.stopPropagation=o}return rh(e,"currentTarget",null),!e.defaultPrevented}}let sh=[];const lh={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};class dh extends oh{static create(e,t,n){const i=new dh(e,t,n);return this.providers.push(i),i}static remove(e){this.providers=this.providers.filter((t=>t!==e))}static get currentProvider(){return dh.providers[0]}static setCustomerAttribute(e){this.providers.forEach((t=>{t.setCustomerAttribute(e)}))}static removeCustomerAttribute(e){this.providers.forEach((t=>{t.removeCustomerAttribute(e)}))}static setAppSuppliedVideoDetails(e){this.providers.forEach((t=>{t.setAppSuppliedVideoDetails(e)}))}static getSelectedPaywall(){return this.providers[0]?.getSelectedPaywall()}static setUserInteractionEnabled(e){this.providers.forEach((t=>{t.setUserInteractionEnabled(e)}))}static setUserTags(e){this.providers.forEach((t=>{t.setUserTags(e)}))}static setProductDetails(e){this.providers.forEach((t=>{t.setProductDetails(e)})),sh=e}static setPurchaseInProgress(e){this.providers.forEach((t=>{t.setPurchaseInProgress(e)}))}static setIsLoggedIn(e){this.providers.forEach((t=>{t.setIsLoggedIn(e)}))}static setPurchase(e,t){this.providers.forEach((n=>{n.setPurchase(e,t)}))}static getSelectedSlideIndex(){return this.providers[0]?.state.currentSlideIndex}constructor(e,t,n){super(),this.host=null,this.subscribers=new Set,this.productDetails=sh,this.filteredSkuMenus=[],this.state=ah(lh,5);const i=ca.getNamiProfile();this.state.isLoggedIn=!!i?.externalId,this.setPaywall(e,t,n),this.defineDynamicStateProps(),this.subscribers=new Set}subscribe(e){return this.subscribers.add(e),()=>this.unsubscribe(e)}unsubscribe(e){this.subscribers.delete(e)}emitEvent(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))}onEvent(e,t){const n=e=>t(e.detail);return this.addEventListener(e,n),()=>this.removeEventListener(e,n)}hostConnected(){}hostDisconnected(){this.subscribers.clear()}defineDynamicStateProps(){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})}setState(e){this.state=e,this.defineDynamicStateProps(),this.subscribers.forEach((e=>e())),this.host&&this.host.requestUpdate()}setProductDetails(e){this.productDetails=e}getProductDetails(){return this.productDetails}setCurrentGroupData(e,t){const n=qu(this.productDetails,this.state,this.filteredSkuMenus,Ju(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState({...this.state,currentGroupId:e,currentGroupName:t,sku:n})}setFormState(e,t){this.setState({...this.state,formStates:{...this.state.formStates,[e]:t}})}setTimerState(e,t,n,i){this.setState({...this.state,timerStates:{...this.state.timerStates,[e]:{remainingSeconds:t,savedAt:n,hasEmittedCompletion:i}}})}getTimerState(e){return this.state.timerStates[e]}getCurrentGroupId(){return this.state.currentGroupId}getCurrentGroupName(){return this.state.currentGroupName}setCurrentFormId(e,t){const n=this.state.formStates||{},i={...n,[e]:t||!n[e]};this.setState({...this.state,formStates:i})}getCurrentFormId(e){return this.state.formStates[e]}setSelectedProducts(e){const t=qu(this.productDetails,this.state,this.filteredSkuMenus,Ju(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState({...this.state,selectedProducts:e,sku:t})}selectedProducts(){return this.state.selectedProducts}setPaywall(e,t,n){let i={...this.state,formFactor:El(),selectedPaywall:e,selectedCampaign:n};const a=e.template?.initialState;i={...i,...a};const r=function(e,t,n=[]){const i=t.productGroups?.length?t.productGroups:n.map((e=>e.ref));return{customAttributes:t.customAttributes,productGroups:i,customObject:{...e.customObject,...t.customObject},currentGroup:t.currentGroup??""}}(i.launch,t,e.sku_menus);if(this.filteredSkuMenus=e.sku_menus??[],r.productGroups.length&&(this.filteredSkuMenus=this.filteredSkuMenus.filter((e=>r.productGroups.includes(e.ref)))),""!==r.currentGroup&&i.groups.length&&e.template?.displaySingleGroup&&(i.currentGroupId=i.groups.find((e=>e.ref==r.currentGroup))?.id??""),""===i.currentGroupId&&1===this.filteredSkuMenus.length){const e=i.groups.find((e=>e.ref==this.filteredSkuMenus[0].ref));i.currentGroupId=e?.id??i.currentGroupId}const o=Ju(this.productDetails,this.filteredSkuMenus,i.currentGroupId);i.skuItems=o,i.launch=r,i.anySkuHasTrialOffer=nc(this.productDetails,this.filteredSkuMenus),i.anySkuHasPromoOffer=function(e,t){return!nc(e,t)&&t.flatMap((e=>e.products)).some((t=>1==Dd("promoEligible",ic(e,t.sku_ref_id))))}(this.productDetails,this.filteredSkuMenus),i.paywallId=e.id,i.sku=qu(this.productDetails,i,this.filteredSkuMenus,o),this.setState(i)}getSelectedPaywall(){return this.state.selectedPaywall}getSelectedCampaign(){return this.state.selectedCampaign}getCurrentPlacementLabel(){return this.state.selectedCampaign?.value?this.state.selectedCampaign.value:this.flow?.campaign?.value?this.flow.campaign.value:void 0}getPaywallActionEventData(){const t=this.state.selectedCampaign,n=this.state.selectedPaywall;return{paywallId:n?.id??"",paywallName:n?.name??"",campaignId:t?.rule??"",campaignName:t?.name??"",campaignType:t?.type??"",campaignLabel:t?.value??"",campaignUrl:t?.type===e.NamiCampaignRuleType.URL?t?.value??"":"",segmentId:t?.segment??"",externalSegmentId:t?.external_segment??""}}paywallId(){return this.state.paywallId}setCurrentPage(e){this.setState({...this.state,currentPage:e})}setCustomerAttribute(e){this.setState({...this.state,customer:{...this.state.customer,...e}})}removeCustomerAttribute(e){delete this.state.customer[e],this.setState(this.state)}setIsLoggedIn(e){this.setState({...this.state,isLoggedIn:e})}setMediaList(e){this.setState({...this.state,mediaList:e.reduce(((e,t)=>({...e,[t.name]:t})))})}setSafeAreaTop(e){this.setState({...this.state,safeAreaTop:e})}setFullScreenPresentation(e){this.setState({...this.state,fullScreenPresentation:e})}setFormFactor(e){this.setState({...this.state,formFactor:e})}getFormFactor(){return this.state.formFactor}getTVQuality(){if("television"!==this.getFormFactor())return"";const e=window.devicePixelRatio||1,t=window.innerWidth||window.screen?.availWidth,n=window.innerHeight||window.screen?.availHeight;if(!t||!n)return"720p";const i=Math.max(t,n)*e,a=Math.min(t,n)*e;return i>=3840||a>=2160?"4K":i>=1920||a>=1080?"1080p":"720p"}getViewportWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}getViewportHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}setPurchaseInProgress(e){this.setState({...this.state,purchaseInProgress:e})}setPurchase(e,t){this.setState({...this.state,purchaseInProgress:e,productBeingPurchased:t})}setTimeSpentOnPaywall(e){this.setState({...this.state,timeSpentOnPaywall:e})}setAppSuppliedVideoDetails({url:e,name:t}){this.setState({...this.state,appSuppliedVideoUrl:e,appSuppliedVideoName:t})}resetAppSuppliedVideoDetails(){delete this.state.appSuppliedVideoUrl,delete this.state.appSuppliedVideoName,this.setState(this.state)}setLaunchDetails(e,t){this.setState({...this.state,launchValue:e,launchType:t})}setOpenHeaderIds(e,t){e=t?.skuId?`${e}_${t.skuId}`:e;const n=[...this.state.openHeaderIds],i=n.indexOf(e);-1!==i?n.splice(i,1):n.push(e),this.setState({...this.state,openHeaderIds:n,currentCollapsibleSku:t??null})}getCurrentCollapsibleSku(){return this.state.currentCollapsibleSku}setFlow(e){this.flow=e}setUserInteractionEnabled(e){this.setState({...this.state,userInteractionEnabled:e}),this.emitEvent("user-interaction-changed",{enabled:e})}setUserTags(e){this.setState({...this.state,userTags:{...this.state.userTags,...e}})}setCurrentSlideIndex(e){this.state.currentSlideIndex=e}}dh.providers=[];class uh{constructor(){this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}}}uh.instance=new uh;const ch=()=>ua(et([...ca.getNamiEntitlements(te),...ca.getNamiEntitlements(oe)]),"referenceId"),hh=()=>{nd.getInstance().emit(Ue,ch())};function mh(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}}class fh{constructor(){}async fetchActiveEntitlements(){let e=null;if(ud()||Xs(A.THIRD_PARTY_TRANSACTIONS)||!Xs(A.ENTITLEMENT_MANAGEMENT))ud()&&Ze.debug("Skipping active entitlements update - anonymous mode"),Xs(A.THIRD_PARTY_TRANSACTIONS)&&Ze.debug("Skipping active entitlements update - paywalls-only mode"),Xs(A.ENTITLEMENT_MANAGEMENT)||Ze.debug("Skipping active entitlements update - no entitlement_management capability");else{const t=ca.getDevice();if(t?.id){const n=await this.getAPIEntitlements(t.id);e=n?.results,e&&(ca.setActiveEntitlements(ee,e),this.invokeActiveEntitlementsHandler(e))}}return e}async getAPIEntitlements(e){const t=`device/${e}/active_entitlements/`;let n={};try{n=await Zs.instance.fetchAPI(t)}catch(e){throw Ze.error(Aa(e.status,t)),e}return n}invokeActiveEntitlementsHandler(e){if(Ys()){(e=>{ca.setNamiEntitlements(te,e);const t=ca.getNamiEntitlements(oe),n=new Set(e.map((e=>e.referenceId))),i=t.filter((e=>{const t=n.has(e.referenceId);return t&&Ze.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t}));i.length!==t.length&&ca.setNamiEntitlements(oe,i),hh()})(e.map((e=>(e=>{const t=e.entitlement_ref_id;return{name:e.name||"",desc:e.description||"",namiId:"",referenceId:t,relatedSkus:uh.instance.refIdToRelatedSKUs[t]||[],activePurchases:uh.instance.refIdToActivePurchases[t]||[],purchasedSkus:uh.instance.refIdToPurchasedSKUs[t]||[],expires:e.expires?new Date(e.expires).valueOf():0}})(e))))}}}fh.instance=new fh;class ph{async fetchCustomerJourneyState(){if(ud())return Ze.debug("Skipping customer journey state update - anonymous mode"),null;const e=ca.getDevice();if(!e?.id)return null;const t=`device/${e.id}/profile/`;let n=null;try{n=await Zs.instance.fetchAPI(t,void 0,0)}catch(e){throw Ze.error(Aa(e.status,t)),e}return n?(ca.setCustomerJourneyState(n.customer_journey_state),n.customer_journey_state):null}}ph.instance=new ph;class gh{constructor(){this.inMemoryAnonymousMode=!1,dd=this}setInMemoryAnonymousMode(e){this.inMemoryAnonymousMode=e,Ze.info(`In-memory anonymous mode ${e?"enabled":"disabled"} due to failed device registration`)}isInMemoryAnonymousMode(){return this.inMemoryAnonymousMode}isAnonymousMode(){return ca.getAnonymousMode()||this.inMemoryAnonymousMode}async init(e){this.setInitialValues(e),ld.instance.fetchConfig(),await this.initAndFetchRequiredData(e),cd.instance.startSession()}setInitialValues(e){const t={...e};delete t.initialConfig,ca.clearSessionId(),ca.setNamiConfig(t),ca.setLanguageCode(e.namiLanguageCode),ca.setPurchaseChannel(e.purchaseChannel);const n=e.initialConfig;if(n.appConfig||n.platform_config){const e=n?.appConfig||n?.platform_config;e&&ca.setAppConfig(ne,e)}n?.paywalls&&ca.setPaywalls(ae,n.paywalls),n?.products&&ca.setProducts(re,n.products)}initAnonymousDevice(){return{deviceId:rd.instance.getOrCreateAnonymousUUID(),deviceTask:null}}initIdentifiedDevice(e){const t={...Ml(e.namiCommands),...e.formFactor?{form_factor:e.formFactor}:{}},n=function(e){if(!e)return;const t=e.find((e=>e.startsWith("splitPosition=")));if(!t)return;const n=t.split("=")[1],i=Number(n);return n&&!isNaN(i)?Ll(i):void 0}(e.namiCommands),{id:i,device:a}=rd.instance.createOrUpdateDevice(t,n,this);return{deviceId:i,deviceTask:a}}async initAndFetchRequiredData(e,t=0,n=1){const i=e.initialConfig,a=e.formFactor??El(),r=this.isAnonymousMode(),{deviceId:o,deviceTask:s}=r?this.initAnonymousDevice():this.initIdentifiedDevice(e),l=Al(o);i.campaign_rules&&ca.setCampaignRules(ie,Nl(i.campaign_rules,l,a)),s&&await s,id.instance.configure(a,l,e.namiCommands),Ks();const d=Promise.all([od.instance.fetchProducts(),ph.instance.fetchCustomerJourneyState(),fh.instance.fetchActiveEntitlements(),sd.instance.fetchPaywalls().then((e=>id.instance.fetchCampaignRules(e)))]).catch((async i=>{if(i instanceof fa){if(ca.resetDevice(),t<n){const i=100*Math.pow(2,t);return await new Promise((e=>setTimeout(e,i))),this.initAndFetchRequiredData(e,t+1,n)}if(!r)return Ze.warn(`Max retries reached for ConflictError. ${i.message}`),this.setInMemoryAnonymousMode(!0),this.initAndFetchRequiredData(e,0,n)}throw i}));i.campaign_rules?.length&&i.paywalls?.length||await d,d.then((()=>this.reRenderPaywall()))}reRenderPaywall(){if("undefined"==typeof document)return;const e=document.querySelector("nami-paywall");e?.setPaywallData()}}function vh(e){return Array.isArray(e)?e.map(vh):e&&"object"==typeof e?Object.entries(e).reduce(((e,[t,n])=>(void 0!==n&&(e[t]=vh(n)),e)),{}):e}gh.instance=new gh;let yh=!0,bh=!1;function wh(){if("function"==typeof window.VIZIO?.Chromevox?.isEnabled)try{yh=window.VIZIO?.Chromevox?.isEnabled()}catch{}}function kh(){return"undefined"!=typeof window&&void 0!==window.VIZIO&&"function"==typeof window.VIZIO?.Chromevox?.play}function Sh(e){e.isTrusted&&wh()}function _h(e){e.isTrusted&&(yh=!1)}function Mh(e){if(e&&kh()&&yh)try{window.VIZIO?.Chromevox?.play(e)}catch{}}var Eh;class Ph{constructor(){Eh.set(this,!1),this.maxLogging=!1}get isInitialized(){return x(this,Eh,"f")||null!=ca.getNamiConfig()}static sdkVersion(){return C}static sdkPackageVersion(){return L}static async configure(e){if(!e.appPlatformID)throw new ga;return this.setInitialConfig(e),await Ph.instance.initializeSDK(e)}static setInitialConfig(e){if(null!=e.initialConfig){if("string"==typeof e.initialConfig){Ze.warn("[DEPRECATED] NamiConfiguration.initialConfig should be an object");const t=function(e){const t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return JSON.parse(t)}catch{return}}(e.initialConfig);if(!t)return Ze.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)){const t=qs(e.initialConfig.initial_config);t?e.initialConfig=t:(e.initialConfig={},Ze.error("Failed to parse NamiConfiguration.initialConfig as base64-gzipped JSON"))}}else e.initialConfig={}}async initializeSDK(e){let t=!1,n=!1;const i=x(this,Eh,"f")?ca.getNamiConfig():null;if(Ze.setLogger(e.logLevel),Ph.instance.maxLogging=e.maxLogging??!1,null!==i){const r={...e};if(delete r.initialConfig,a=i,ad(vh(r),vh(a)))return Ze.warn("Nami SDK is already configured, ignoring this configure call."),{sdkInitialized:!0,configureState:ze};n=!0;const o=Vs(e.namiCommands),s=Vs(i.namiCommands);e.appPlatformID==i.appPlatformID&&o==s||(t=!0),e.namiLanguageCode===i.namiLanguageCode&&e.logLevel==i.logLevel||(n=!0)}var a;t&&(Ze.info("SDK full reconfigure called"),ca.resetDevice()),function(e,t,n,i,a){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?a.call(e,n):a?a.value=n:t.set(e,n)}(this,Eh,!0,"f"),Zs.configure(e),await gh.instance.init(e),Ze.info("SDK successfully initialized!");const r=n||t?je:$e;return!bh&&kh()&&(window.addEventListener("VIZIO_TTS_ENABLED",Sh),window.addEventListener("VIZIO_TTS_DISABLED",_h),bh=!0,wh()),{sdkInitialized:!0,configureState:r}}}Eh=new WeakMap,Ph.instance=new Ph;const Th=new Set(["fullscreen","sheet","compact_sheet","modal"]);var xh;e.NamiPaywallManagerEvents=void 0,(xh=e.NamiPaywallManagerEvents||(e.NamiPaywallManagerEvents={})).BuySku="RegisterBuySKU",xh.Close="PaywallCloseRequested",xh.SignIn="PaywallSignInRequested",xh.Restore="PaywallRestoreRequested",xh.DeeplinkAction="PaywallDeeplinkAction";const Ah=globalThis,Ch=Ah.ShadowRoot&&(void 0===Ah.ShadyCSS||Ah.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Lh=Symbol(),Ih=new WeakMap;let Dh=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Lh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ch&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Ih.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Ih.set(t,e))}return e}toString(){return this.cssText}};const Rh=e=>new Dh("string"==typeof e?e:e+"",void 0,Lh),Nh=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1]),e[0]);return new Dh(n,e,Lh)},Wh=Ch?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return Rh(t)})(e):e,{is:Fh,defineProperty:Oh,getOwnPropertyDescriptor:$h,getOwnPropertyNames:jh,getOwnPropertySymbols:zh,getPrototypeOf:Hh}=Object,Bh=globalThis,Uh=Bh.trustedTypes,Gh=Uh?Uh.emptyScript:"",Vh=Bh.reactiveElementPolyfillSupport,Xh=(e,t)=>e,Kh={toAttribute(e,t){switch(t){case Boolean:e=e?Gh:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let 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}},Yh=(e,t)=>!Fh(e,t),qh={attribute:!0,type:String,converter:Kh,reflect:!1,useDefault:!1,hasChanged:Yh};Symbol.metadata??=Symbol("metadata"),Bh.litPropertyMetadata??=new WeakMap;let Jh=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=qh){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){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Oh(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:a}=$h(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const r=i?.call(this);a?.call(this,t),this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qh}static _$Ei(){if(this.hasOwnProperty(Xh("elementProperties")))return;const e=Hh(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Xh("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Xh("properties"))){const e=this.properties,t=[...jh(e),...zh(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const n=this._$Eu(e,t);void 0!==n&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(Wh(e))}else void 0!==e&&t.push(Wh(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Ch)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),i=Ah.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){const a=(void 0!==n.converter?.toAttribute?n.converter:Kh).toAttribute(t,n.type);this._$Em=e,null==a?this.removeAttribute(i):this.setAttribute(i,a),this._$Em=null}}_$AK(e,t){const n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=n.getPropertyOptions(i),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Kh;this._$Em=i;const r=a.fromAttribute(t,e.type);this[i]=r??this._$Ej?.get(i)??r,this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){const i=this.constructor,a=this[e];if(n??=i.getPropertyOptions(e),!((n.hasChanged??Yh)(a,t)||n.useDefault&&n.reflect&&a===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:a},r){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,r??t??this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,n,i)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};Jh.elementStyles=[],Jh.shadowRootOptions={mode:"open"},Jh[Xh("elementProperties")]=new Map,Jh[Xh("finalized")]=new Map,Vh?.({ReactiveElement:Jh}),(Bh.reactiveElementVersions??=[]).push("2.1.1");const Qh=globalThis,Zh=Qh.trustedTypes,em=Zh?Zh.createPolicy("lit-html",{createHTML:e=>e}):void 0,tm="$lit$",nm=`lit$${Math.random().toFixed(9).slice(2)}$`,im="?"+nm,am=`<${im}>`,rm=document,om=()=>rm.createComment(""),sm=e=>null===e||"object"!=typeof e&&"function"!=typeof e,lm=Array.isArray,dm=e=>lm(e)||"function"==typeof e?.[Symbol.iterator],um="[ \t\n\f\r]",cm=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hm=/-->/g,mm=/>/g,fm=RegExp(`>|${um}(?:([^\\s"'>=/]+)(${um}*=${um}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),pm=/'/g,gm=/"/g,vm=/^(?:script|style|textarea|title)$/i,ym=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),bm=ym(1),wm=ym(2),km=Symbol.for("lit-noChange"),Sm=Symbol.for("lit-nothing"),_m=new WeakMap,Mm=rm.createTreeWalker(rm,129);function Em(e,t){if(!lm(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==em?em.createHTML(t):t}const Pm=(e,t)=>{const n=e.length-1,i=[];let a,r=2===t?"<svg>":3===t?"<math>":"",o=cm;for(let t=0;t<n;t++){const n=e[t];let s,l,d=-1,u=0;for(;u<n.length&&(o.lastIndex=u,l=o.exec(n),null!==l);)u=o.lastIndex,o===cm?"!--"===l[1]?o=hm:void 0!==l[1]?o=mm:void 0!==l[2]?(vm.test(l[2])&&(a=RegExp("</"+l[2],"g")),o=fm):void 0!==l[3]&&(o=fm):o===fm?">"===l[0]?(o=a??cm,d=-1):void 0===l[1]?d=-2:(d=o.lastIndex-l[2].length,s=l[1],o=void 0===l[3]?fm:'"'===l[3]?gm:pm):o===gm||o===pm?o=fm:o===hm||o===mm?o=cm:(o=fm,a=void 0);const c=o===fm&&e[t+1].startsWith("/>")?" ":"";r+=o===cm?n+am:d>=0?(i.push(s),n.slice(0,d)+tm+n.slice(d)+nm+c):n+nm+(-2===d?t:c)}return[Em(e,r+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class Tm{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let a=0,r=0;const o=e.length-1,s=this.parts,[l,d]=Pm(e,t);if(this.el=Tm.createElement(l,n),Mm.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=Mm.nextNode())&&s.length<o;){if(1===i.nodeType){if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(tm)){const t=d[r++],n=i.getAttribute(e).split(nm),o=/([.?@])?(.*)/.exec(t);s.push({type:1,index:a,name:o[2],strings:n,ctor:"."===o[1]?Im:"?"===o[1]?Dm:"@"===o[1]?Rm:Lm}),i.removeAttribute(e)}else e.startsWith(nm)&&(s.push({type:6,index:a}),i.removeAttribute(e));if(vm.test(i.tagName)){const e=i.textContent.split(nm),t=e.length-1;if(t>0){i.textContent=Zh?Zh.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],om()),Mm.nextNode(),s.push({type:2,index:++a});i.append(e[t],om())}}}else if(8===i.nodeType)if(i.data===im)s.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(nm,e+1));)s.push({type:7,index:a}),e+=nm.length-1}a++}}static createElement(e,t){const n=rm.createElement("template");return n.innerHTML=e,n}}function xm(e,t,n=e,i){if(t===km)return t;let a=void 0!==i?n._$Co?.[i]:n._$Cl;const r=sm(t)?void 0:t._$litDirective$;return a?.constructor!==r&&(a?._$AO?.(!1),void 0===r?a=void 0:(a=new r(e),a._$AT(e,n,i)),void 0!==i?(n._$Co??=[])[i]=a:n._$Cl=a),void 0!==a&&(t=xm(e,a._$AS(e,t.values),a,i)),t}let Am=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,i=(e?.creationScope??rm).importNode(t,!0);Mm.currentNode=i;let a=Mm.nextNode(),r=0,o=0,s=n[0];for(;void 0!==s;){if(r===s.index){let t;2===s.type?t=new Cm(a,a.nextSibling,this,e):1===s.type?t=new s.ctor(a,s.name,s.strings,this,e):6===s.type&&(t=new Nm(a,this,e)),this._$AV.push(t),s=n[++o]}r!==s?.index&&(a=Mm.nextNode(),r++)}return Mm.currentNode=rm,i}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}};class Cm{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=Sm,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=xm(this,e,t),sm(e)?e===Sm||null==e||""===e?(this._$AH!==Sm&&this._$AR(),this._$AH=Sm):e!==this._$AH&&e!==km&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):dm(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Sm&&sm(this._$AH)?this._$AA.nextSibling.data=e:this.T(rm.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=Tm.createElement(Em(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(t);else{const e=new Am(i,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=_m.get(e.strings);return void 0===t&&_m.set(e.strings,t=new Tm(e)),t}k(e){lm(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const a of e)i===t.length?t.push(n=new Cm(this.O(om()),this.O(om()),this,this.options)):n=t[i],n._$AI(a),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class Lm{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,a){this.type=1,this._$AH=Sm,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=a,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Sm}_$AI(e,t=this,n,i){const a=this.strings;let r=!1;if(void 0===a)e=xm(this,e,t,0),r=!sm(e)||e!==this._$AH&&e!==km,r&&(this._$AH=e);else{const i=e;let o,s;for(e=a[0],o=0;o<a.length-1;o++)s=xm(this,i[n+o],t,o),s===km&&(s=this._$AH[o]),r||=!sm(s)||s!==this._$AH[o],s===Sm?e=Sm:e!==Sm&&(e+=(s??"")+a[o+1]),this._$AH[o]=s}r&&!i&&this.j(e)}j(e){e===Sm?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Im extends Lm{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Sm?void 0:e}}class Dm extends Lm{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Sm)}}class Rm extends Lm{constructor(e,t,n,i,a){super(e,t,n,i,a),this.type=5}_$AI(e,t=this){if((e=xm(this,e,t,0)??Sm)===km)return;const n=this._$AH,i=e===Sm&&n!==Sm||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==Sm&&(n===Sm||i);i&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Nm{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){xm(this,e)}}const Wm={M:tm,P:nm,A:im,C:1,L:Pm,R:Am,D:dm,V:xm,I:Cm,H:Lm,N:Dm,U:Rm,B:Im,F:Nm},Fm=Qh.litHtmlPolyfillSupport;Fm?.(Tm,Cm),(Qh.litHtmlVersions??=[]).push("3.3.1");const Om=globalThis;let $m=class extends Jh{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const i=n?.renderBefore??t;let a=i._$litPart$;if(void 0===a){const e=n?.renderBefore??null;i._$litPart$=a=new Cm(t.insertBefore(om(),e),e,void 0,n??{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return km}};$m._$litElement$=!0,$m.finalized=!0,Om.litElementHydrateSupport?.({LitElement:$m});const jm=Om.litElementPolyfillSupport;jm?.({LitElement:$m}),(Om.litElementVersions??=[]).push("4.2.1");const zm=Nh`
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).NamiWebSdk={})}(this,(function(e){"use strict";(()=>{if("undefined"!=typeof globalThis)return;const 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(){const e=this.attributes,t=new Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=e[n].name;return t});const t=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(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=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var n,i,a,r,o,s,l,d,u,c,h,m,f=function(e,t,n,i,a){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?a.call(e,n):a?a.value=n:t.set(e,n),n},p=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};const g=e=>"boolean"==typeof e?e:e?.capture??!1;const v=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,t,n){if(null==t)return;const i=g(n)?this.__captureEventListeners:this.__eventListeners;let a=i.get(e);if(void 0===a)a=new Map,i.set(e,a);else if(a.has(t))return;const r="object"==typeof n&&n?n:{};r.signal?.addEventListener("abort",(()=>this.removeEventListener(e,t,n))),a.set(t,r??{})}removeEventListener(e,t,n){if(null==t)return;const i=g(n)?this.__captureEventListeners:this.__eventListeners,a=i.get(e);void 0!==a&&(a.delete(t),a.size||i.delete(e))}dispatchEvent(e){const t=[this];let 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;let i=!1,a=!1,r=0,o=null,s=null,l=null;const d=e.stopPropagation,u=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get:()=>o??s,...y},srcElement:{get:()=>e.target,...y},currentTarget:{get:()=>l,...y},eventPhase:{get:()=>r,...y},composedPath:{value:()=>t,...y},stopPropagation:{value:()=>{i=!0,d.call(e)},...y},stopImmediatePropagation:{value:()=>{a=!0,u.call(e)},...y}});const c=(t,n,i)=>{"function"==typeof t?t(e):"function"==typeof t?.handleEvent&&t.handleEvent(e),n.once&&i.delete(t)},h=()=>(l=null,r=0,!e.defaultPrevented),m=t.slice().reverse();o=this.__host&&e.composed?null:this;const f=e=>{for(s=this;s.__host&&e.includes(s.__host);)s=s.__host};for(const t of m){o||s&&s!==t.__host||f(m.slice(m.indexOf(t))),l=t,r=t===e.target?2:1;const n=t.__captureEventListeners.get(e.type);if(n)for(const[e,t]of n)if(c(e,t,n),a)return h();if(i)return h()}const p=e.bubbles?t:[this];s=null;for(const t of p){o||s&&t!==s.__host||f(p.slice(0,p.indexOf(t)+1)),l=t,r=t===e.target?2:3;const n=t.__eventListeners.get(e.type);if(n)for(const[e,t]of n)if(c(e,t,n),a)return h();if(i)return h()}return h()}},y={__proto__:null,enumerable:!0};Object.freeze(y);const b=(c=class{constructor(e,t={}){if(n.set(this,!1),i.set(this,!1),a.set(this,!1),r.set(this,!1),o.set(this,Date.now()),s.set(this,!1),l.set(this,void 0),d.set(this,void 0),u.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 t||!t)throw new Error('The "options" argument must be an object');const{bubbles:c,cancelable:h,composed:m}=t;f(this,n,!!h,"f"),f(this,i,!!c,"f"),f(this,a,!!m,"f"),f(this,l,`${e}`,"f"),f(this,d,null,"f"),f(this,u,!1,"f")}initEvent(e,t,n){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){f(this,r,!0,"f")}get target(){return p(this,d,"f")}get currentTarget(){return p(this,d,"f")}get srcElement(){return p(this,d,"f")}get type(){return p(this,l,"f")}get cancelable(){return p(this,n,"f")}get defaultPrevented(){return p(this,n,"f")&&p(this,r,"f")}get timeStamp(){return p(this,o,"f")}composedPath(){return p(this,u,"f")?[p(this,d,"f")]:[]}get returnValue(){return!p(this,n,"f")||!p(this,r,"f")}get bubbles(){return p(this,i,"f")}get composed(){return p(this,a,"f")}get eventPhase(){return p(this,u,"f")?c.AT_TARGET:c.NONE}get cancelBubble(){return p(this,s,"f")}set cancelBubble(e){e&&f(this,s,!0,"f")}stopPropagation(){f(this,s,!0,"f")}get isTrusted(){return!1}},n=new WeakMap,i=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,s=new WeakMap,l=new WeakMap,d=new WeakMap,u=new WeakMap,c.NONE=0,c.CAPTURING_PHASE=1,c.AT_TARGET=2,c.BUBBLING_PHASE=3,c);Object.defineProperties(b.prototype,{initEvent:y,stopImmediatePropagation:y,preventDefault:y,target:y,currentTarget:y,srcElement:y,type:y,cancelable:y,defaultPrevented:y,timeStamp:y,composedPath:y,returnValue:y,bubbles:y,composed:y,eventPhase:y,cancelBubble:y,stopPropagation:y,isTrusted:y});const w=(m=class extends b{constructor(e,t={}){super(e,t),h.set(this,void 0),f(this,h,t?.detail??null,"f")}initCustomEvent(e,t,n,i){throw new Error("Method not implemented.")}get detail(){return p(this,h,"f")}},h=new WeakMap,m);Object.defineProperties(w.prototype,{detail:y});const k=b,S=w;globalThis.Event??=k,globalThis.CustomEvent??=S;const _=new WeakMap,M=e=>{let t=_.get(e);return void 0===t&&_.set(e,t=new Map),t},E=class extends v{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(M(this)).map((([e,t])=>({name:e,value:t})))}get shadowRoot(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){M(this).set(e,String(t))}removeAttribute(e){M(this).delete(e)}toggleAttribute(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}hasAttribute(e){return M(this).has(e)}attachShadow(e){const t={host:this};return this.__shadowRootMode=e.mode,e&&"open"===e.mode&&(this.__shadowRoot=t),t}attachInternals(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");const e=new t(this);return this.__internals=e,e}getAttribute(e){return M(this).get(e)??null}},P=class extends E{};function T(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function x(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}globalThis.litServerRoot??=Object.defineProperty(new P,"localName",{get:()=>"lit-server-root"}),"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=P),"function"==typeof SuppressedError&&SuppressedError;var A;!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"}(A||(A={}));const{NAMI_SDK_VERSION:C="3.3.11",NAMI_SDK_PACKAGE_VERSION:L="3.3.11",PRODUCTION:I="production",DEVELOPMENT:D="development",PLATFORM_ID_REQUIRED:R="Platform ID is required",DEVICE_ID_REQUIRED:N="Device ID is required",EXTERNAL_ID_REQUIRED:W="External ID is required",SDK_NOT_INITIALIZED:F="SDK has not been initialized. Make sure to call Nami.configure() first!",CAMPAIGN_NOT_AVAILABLE:O="Campaign is not available",FLOW_SCREENS_NOT_AVAILABLE:$="Flow screens not available",UNABLE_TO_UPDATE_CDP_ID:j="Unable to update CDP id in anonymous mode",ANONYMOUS_MODE_ALREADY_ON:z="Anonymous mode is already turned on.",ANONYMOUS_MODE_ALREADY_OFF:H="Anonymous mode is already turned off.",ANONYMOUS_MODE_LOGIN_NOT_ALLOWED:B="Login/logout are not available in anonymous mode",SESSION_REQUIRED:U="Session is required",DEVICE_ID_NOT_SET:G="Nami Device ID is not set",AUTH_DEVICE:V="nami_auth_device",NAMI_CONFIGURATION:X="nami_configuration",NAMI_PROFILE:K="nami_profile",API_CONFIG:Y="api_config",API_CAMPAIGN_RULES:q="api_campaign_rules",API_PAYWALLS:J="api_paywalls",API_CAMPAIGN_SESSION_TIMESTAMP:Q="api_campaign_session_timestamp",API_PRODUCTS:Z="api_products",API_ACTIVE_ENTITLEMENTS:ee="api_active_entitlements",SERVER_NAMI_ENTITLEMENTS:te="server_active_entitlements",INITIAL_APP_CONFIG:ne="initial_app_config",INITIAL_CAMPAIGN_RULES:ie="initial_campaign_rules",INITIAL_PAYWALLS:ae="initial_paywalls",INITIAL_PRODUCTS:re="initial_products",LOCAL_NAMI_ENTITLEMENTS:oe="local_active_entitlements",CUSTOMER_ATTRIBUTES_KEY_PREFIX:se="nami_cmr_attributes_",NAMI_CUSTOMER_JOURNEY_STATE:le="nami_customer_journey_state",ANONYMOUS_MODE:de="nami_anonymous_mode_v2",ANONYMOUS_UUID:ue="nami_anonymous_uuid",KEY_SESSION_COUNTER:ce="nami_session_counter",INITIAL_SESSION_COUNTER_VALUE:he=1,NAMI_LAST_IMPRESSION_ID:me="nami_last_impression_id",NAMI_PURCHASE_IMPRESSION_ID:fe="nami_purchase_impression_id",NAMI_LAUNCH_ID:pe="nami_launch_id",NAMI_SESSION_ID:ge="nami_session_id",NAMI_LANGUAGE_CODE:ve="nami_language_code",NAMI_PURCHASE_CHANNEL:ye="nami_purchase_channel",API_VERSION:be="v3",BASE_URL_PATH:we=`sdk/${be}/platform`,BASE_URL:ke="https://app.namiml.com",BASE_STAGING_URL:Se="https://app-staging.namiml.com",CUSTOM_HOST_PREFIX:_e="namiAPIHost=",USE_STAGING_API:Me="useStagingAPI",EXTENDED_CLIENT_INFO_PREFIX:Ee="extendedClientInfo",EXTENDED_CLIENT_INFO_DELIMITER:Pe=":",VALIDATE_PRODUCT_GROUPS:Te="validateProductGroups",EXTENDED_PLATFORM:xe="extended-platform",EXTENDED_PLATFORM_VERSION:Ae="extended-platform-version",API_MAX_CALLS_LIMIT:Ce=2,API_RETRY_DELAY_SEC:Le=2,API_TIMEOUT_LIMIT:Ie=2e4,DEVICE_API_TIMEOUT_LIMIT:De=2e3,STATUS_SUCCESS:Re=200,STATUS_BAD_REQUEST:Ne=400,STATUS_NOT_FOUND:We=404,STATUS_CONFLICT:Fe=409,STATUS_INTERNAL_SERVER_ERROR:Oe=500,INITIAL_SUCCESS:$e="Initial success",RECONFIG_SUCCESS:je="Reconfig success",ALREADY_CONFIGURED:ze="Already configured",AVAILABLE_CAMPAIGNS_CHANGED:He="AvailableCampaignsChanged",PAYWALL_ACTION_EVENT:Be="PaywallActionEvent",AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED:Ue="AvailableActiveEntitlementsChanged",CUSTOMER_JOURNEY_STATE_CHANGED:Ge="CustomerJourneyStateChanged",SKU_TEXT_REGEX:Ve=/\$\{sku\.(\w+)(:\d+)?\}/g,VAR_REGEX:Xe=/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g,HTML_REGEX:Ke=/<\/?[a-z][\s\S]*>/i,SMART_TEXT_PATTERN:Ye="${",LIQUID_VARIABLE_REGEX:qe=/\${[A-Za-z0-9.]+}/g}={};var Je;e.LogLevel=void 0,(Je=e.LogLevel||(e.LogLevel={}))[Je.DEBUG=1]="DEBUG",Je[Je.INFO=2]="INFO",Je[Je.WARN=3]="WARN",Je[Je.ERROR=4]="ERROR";const Qe={debug:e.LogLevel.DEBUG,info:e.LogLevel.INFO,warn:e.LogLevel.WARN,error:e.LogLevel.ERROR};const Ze=new class{constructor(){this.currentLogLevel=e.LogLevel.DEBUG,this.setLogger=t=>{this.currentLogLevel=t?Qe[t]:e.LogLevel.WARN}}debug(t,...n){this.shouldLog(e.LogLevel.DEBUG)&&console.debug(this.formatMessage(e.LogLevel.DEBUG,t,...n))}info(t,...n){this.shouldLog(e.LogLevel.INFO)&&console.info(this.formatMessage(e.LogLevel.INFO,t,...n))}warn(t,...n){this.shouldLog(e.LogLevel.WARN)&&console.warn(this.formatMessage(e.LogLevel.WARN,t,...n))}error(t,...n){this.shouldLog(e.LogLevel.ERROR)&&console.error(this.formatMessage(e.LogLevel.ERROR,t,...n))}shouldLog(e){return e>=this.currentLogLevel}formatMessage(t,n,...i){const a=e.LogLevel[t];return`[${(new Date).toISOString()}] [${a}] ${n} ${i=i.map((e=>"object"==typeof e?JSON.stringify(e):e))}`}};function et(e){for(var t=-1,n=null==e?0:e.length,i=0,a=[];++t<n;){var r=e[t];r&&(a[i++]=r)}return a}function tt(e,t){return e===t||e!=e&&t!=t}function nt(e,t){for(var n=e.length;n--;)if(tt(e[n][0],t))return n;return-1}var it=Array.prototype.splice;function at(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}at.prototype.clear=function(){this.__data__=[],this.size=0},at.prototype.delete=function(e){var t=this.__data__,n=nt(t,e);return!(n<0)&&(n==t.length-1?t.pop():it.call(t,n,1),--this.size,!0)},at.prototype.get=function(e){var t=this.__data__,n=nt(t,e);return n<0?void 0:t[n][1]},at.prototype.has=function(e){return nt(this.__data__,e)>-1},at.prototype.set=function(e,t){var n=this.__data__,i=nt(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var rt="object"==typeof global&&global&&global.Object===Object&&global,ot="object"==typeof self&&self&&self.Object===Object&&self,st=rt||ot||Function("return this")(),lt=st.Symbol,dt=Object.prototype,ut=dt.hasOwnProperty,ct=dt.toString,ht=lt?lt.toStringTag:void 0;var mt=Object.prototype.toString;var ft="[object Null]",pt="[object Undefined]",gt=lt?lt.toStringTag:void 0;function vt(e){return null==e?void 0===e?pt:ft:gt&&gt in Object(e)?function(e){var t=ut.call(e,ht),n=e[ht];try{e[ht]=void 0;var i=!0}catch(e){}var a=ct.call(e);return i&&(t?e[ht]=n:delete e[ht]),a}(e):function(e){return mt.call(e)}(e)}function yt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var bt="[object AsyncFunction]",wt="[object Function]",kt="[object GeneratorFunction]",St="[object Proxy]";function _t(e){if(!yt(e))return!1;var t=vt(e);return t==wt||t==kt||t==bt||t==St}var Mt,Et=st["__core-js_shared__"],Pt=(Mt=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||""))?"Symbol(src)_1."+Mt:"";var Tt=Function.prototype.toString;function xt(e){if(null!=e){try{return Tt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var At=/^\[object .+?Constructor\]$/,Ct=Function.prototype,Lt=Object.prototype,It=Ct.toString,Dt=Lt.hasOwnProperty,Rt=RegExp("^"+It.call(Dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nt(e){return!(!yt(e)||(t=e,Pt&&Pt in t))&&(_t(e)?Rt:At).test(xt(e));var t}function Wt(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Nt(n)?n:void 0}var Ft=Wt(st,"Map"),Ot=Wt(Object,"create");var $t=Object.prototype.hasOwnProperty;var jt=Object.prototype.hasOwnProperty;function zt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ht(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Bt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}zt.prototype.clear=function(){this.__data__=Ot?Ot(null):{},this.size=0},zt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zt.prototype.get=function(e){var t=this.__data__;if(Ot){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return $t.call(t,e)?t[e]:void 0},zt.prototype.has=function(e){var t=this.__data__;return Ot?void 0!==t[e]:jt.call(t,e)},zt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ot&&void 0===t?"__lodash_hash_undefined__":t,this},Bt.prototype.clear=function(){this.size=0,this.__data__={hash:new zt,map:new(Ft||at),string:new zt}},Bt.prototype.delete=function(e){var t=Ht(this,e).delete(e);return this.size-=t?1:0,t},Bt.prototype.get=function(e){return Ht(this,e).get(e)},Bt.prototype.has=function(e){return Ht(this,e).has(e)},Bt.prototype.set=function(e,t){var n=Ht(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};function Ut(e){var t=this.__data__=new at(e);this.size=t.size}Ut.prototype.clear=function(){this.__data__=new at,this.size=0},Ut.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ut.prototype.get=function(e){return this.__data__.get(e)},Ut.prototype.has=function(e){return this.__data__.has(e)},Ut.prototype.set=function(e,t){var n=this.__data__;if(n instanceof at){var i=n.__data__;if(!Ft||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bt(i)}return n.set(e,t),this.size=n.size,this};function Gt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Bt;++t<n;)this.add(e[t])}function Vt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function Xt(e,t){return e.has(t)}Gt.prototype.add=Gt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Gt.prototype.has=function(e){return this.__data__.has(e)};var Kt=1,Yt=2;function qt(e,t,n,i,a,r){var o=n&Kt,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var d=r.get(e),u=r.get(t);if(d&&u)return d==t&&u==e;var c=-1,h=!0,m=n&Yt?new Gt:void 0;for(r.set(e,t),r.set(t,e);++c<s;){var f=e[c],p=t[c];if(i)var g=o?i(p,f,c,t,e,r):i(f,p,c,e,t,r);if(void 0!==g){if(g)continue;h=!1;break}if(m){if(!Vt(t,(function(e,t){if(!Xt(m,t)&&(f===e||a(f,e,n,i,r)))return m.push(t)}))){h=!1;break}}else if(f!==p&&!a(f,p,n,i,r)){h=!1;break}}return r.delete(e),r.delete(t),h}var Jt=st.Uint8Array;function Qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function Zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var en=1,tn=2,nn="[object Boolean]",an="[object Date]",rn="[object Error]",on="[object Map]",sn="[object Number]",ln="[object RegExp]",dn="[object Set]",un="[object String]",cn="[object Symbol]",hn="[object ArrayBuffer]",mn="[object DataView]",fn=lt?lt.prototype:void 0,pn=fn?fn.valueOf:void 0;function gn(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}var vn=Array.isArray;function yn(e,t,n){var i=t(e);return vn(e)?i:gn(i,n(e))}function bn(){return[]}var wn=Object.prototype.propertyIsEnumerable,kn=Object.getOwnPropertySymbols,Sn=kn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,a=0,r=[];++n<i;){var o=e[n];t(o,n,e)&&(r[a++]=o)}return r}(kn(e),(function(t){return wn.call(e,t)})))}:bn;function _n(e){return null!=e&&"object"==typeof e}function Mn(e){return _n(e)&&"[object Arguments]"==vt(e)}var En=Object.prototype,Pn=En.hasOwnProperty,Tn=En.propertyIsEnumerable,xn=Mn(function(){return arguments}())?Mn:function(e){return _n(e)&&Pn.call(e,"callee")&&!Tn.call(e,"callee")};var An="object"==typeof e&&e&&!e.nodeType&&e,Cn=An&&"object"==typeof module&&module&&!module.nodeType&&module,Ln=Cn&&Cn.exports===An?st.Buffer:void 0,In=(Ln?Ln.isBuffer:void 0)||function(){return!1},Dn=9007199254740991,Rn=/^(?:0|[1-9]\d*)$/;function Nn(e,t){var n=typeof e;return!!(t=null==t?Dn:t)&&("number"==n||"symbol"!=n&&Rn.test(e))&&e>-1&&e%1==0&&e<t}var Wn=9007199254740991;function Fn(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Wn}var On={};function $n(e){return function(t){return e(t)}}On["[object Float32Array]"]=On["[object Float64Array]"]=On["[object Int8Array]"]=On["[object Int16Array]"]=On["[object Int32Array]"]=On["[object Uint8Array]"]=On["[object Uint8ClampedArray]"]=On["[object Uint16Array]"]=On["[object Uint32Array]"]=!0,On["[object Arguments]"]=On["[object Array]"]=On["[object ArrayBuffer]"]=On["[object Boolean]"]=On["[object DataView]"]=On["[object Date]"]=On["[object Error]"]=On["[object Function]"]=On["[object Map]"]=On["[object Number]"]=On["[object Object]"]=On["[object RegExp]"]=On["[object Set]"]=On["[object String]"]=On["[object WeakMap]"]=!1;var jn="object"==typeof e&&e&&!e.nodeType&&e,zn=jn&&"object"==typeof module&&module&&!module.nodeType&&module,Hn=zn&&zn.exports===jn&&rt.process,Bn=function(){try{var e=zn&&zn.require&&zn.require("util").types;return e||Hn&&Hn.binding&&Hn.binding("util")}catch(e){}}(),Un=Bn&&Bn.isTypedArray,Gn=Un?$n(Un):function(e){return _n(e)&&Fn(e.length)&&!!On[vt(e)]},Vn=Object.prototype.hasOwnProperty;function Xn(e,t){var n=vn(e),i=!n&&xn(e),a=!n&&!i&&In(e),r=!n&&!i&&!a&&Gn(e),o=n||i||a||r,s=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],l=s.length;for(var d in e)!t&&!Vn.call(e,d)||o&&("length"==d||a&&("offset"==d||"parent"==d)||r&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Nn(d,l))||s.push(d);return s}var Kn=Object.prototype;function Yn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Kn)}function qn(e,t){return function(n){return e(t(n))}}var Jn=qn(Object.keys,Object),Qn=Object.prototype.hasOwnProperty;function Zn(e){return null!=e&&Fn(e.length)&&!_t(e)}function ei(e){return Zn(e)?Xn(e):function(e){if(!Yn(e))return Jn(e);var t=[];for(var n in Object(e))Qn.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}function ti(e){return yn(e,ei,Sn)}var ni=1,ii=Object.prototype.hasOwnProperty;var ai=Wt(st,"DataView"),ri=Wt(st,"Promise"),oi=Wt(st,"Set"),si=Wt(st,"WeakMap"),li="[object Map]",di="[object Promise]",ui="[object Set]",ci="[object WeakMap]",hi="[object DataView]",mi=xt(ai),fi=xt(Ft),pi=xt(ri),gi=xt(oi),vi=xt(si),yi=vt;(ai&&yi(new ai(new ArrayBuffer(1)))!=hi||Ft&&yi(new Ft)!=li||ri&&yi(ri.resolve())!=di||oi&&yi(new oi)!=ui||si&&yi(new si)!=ci)&&(yi=function(e){var t=vt(e),n="[object Object]"==t?e.constructor:void 0,i=n?xt(n):"";if(i)switch(i){case mi:return hi;case fi:return li;case pi:return di;case gi:return ui;case vi:return ci}return t});var bi=1,wi="[object Arguments]",ki="[object Array]",Si="[object Object]",_i=Object.prototype.hasOwnProperty;function Mi(e,t,n,i,a,r){var o=vn(e),s=vn(t),l=o?ki:yi(e),d=s?ki:yi(t),u=(l=l==wi?Si:l)==Si,c=(d=d==wi?Si:d)==Si,h=l==d;if(h&&In(e)){if(!In(t))return!1;o=!0,u=!1}if(h&&!u)return r||(r=new Ut),o||Gn(e)?qt(e,t,n,i,a,r):function(e,t,n,i,a,r,o){switch(n){case mn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case hn:return!(e.byteLength!=t.byteLength||!r(new Jt(e),new Jt(t)));case nn:case an:case sn:return tt(+e,+t);case rn:return e.name==t.name&&e.message==t.message;case ln:case un:return e==t+"";case on:var s=Qt;case dn:var l=i&en;if(s||(s=Zt),e.size!=t.size&&!l)return!1;var d=o.get(e);if(d)return d==t;i|=tn,o.set(e,t);var u=qt(s(e),s(t),i,a,r,o);return o.delete(e),u;case cn:if(pn)return pn.call(e)==pn.call(t)}return!1}(e,t,l,n,i,a,r);if(!(n&bi)){var m=u&&_i.call(e,"__wrapped__"),f=c&&_i.call(t,"__wrapped__");if(m||f){var p=m?e.value():e,g=f?t.value():t;return r||(r=new Ut),a(p,g,n,i,r)}}return!!h&&(r||(r=new Ut),function(e,t,n,i,a,r){var o=n&ni,s=ti(e),l=s.length;if(l!=ti(t).length&&!o)return!1;for(var d=l;d--;){var u=s[d];if(!(o?u in t:ii.call(t,u)))return!1}var c=r.get(e),h=r.get(t);if(c&&h)return c==t&&h==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++d<l;){var p=e[u=s[d]],g=t[u];if(i)var v=o?i(g,p,u,t,e,r):i(p,g,u,e,t,r);if(!(void 0===v?p===g||a(p,g,n,i,r):v)){m=!1;break}f||(f="constructor"==u)}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,i,a,r))}function Ei(e,t,n,i,a){return e===t||(null==e||null==t||!_n(e)&&!_n(t)?e!=e&&t!=t:Mi(e,t,n,i,Ei,a))}var Pi=1,Ti=2;function xi(e){return e==e&&!yt(e)}function Ai(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Ci(e){var t=function(e){for(var t=ei(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,xi(a)]}return t}(e);return 1==t.length&&t[0][2]?Ai(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var a=n.length,r=a;if(null==e)return!r;for(e=Object(e);a--;){var o=n[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<r;){var s=(o=n[a])[0],l=e[s],d=o[1];if(o[2]){if(void 0===l&&!(s in e))return!1}else{var u=new Ut;if(!Ei(d,l,Pi|Ti,i,u))return!1}}return!0}(n,0,t)}}var Li="[object Symbol]";function Ii(e){return"symbol"==typeof e||_n(e)&&vt(e)==Li}var Di=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ri=/^\w*$/;function Ni(e,t){if(vn(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ii(e))||(Ri.test(e)||!Di.test(e)||null!=t&&e in Object(t))}var Wi="Expected a function";function Fi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(Wi);var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=n.cache;if(r.has(a))return r.get(a);var o=e.apply(this,i);return n.cache=r.set(a,o)||r,o};return n.cache=new(Fi.Cache||Bt),n}Fi.Cache=Bt;var Oi,$i,ji,zi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hi=/\\(\\)?/g,Bi=(Oi=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(zi,(function(e,n,i,a){t.push(i?a.replace(Hi,"$1"):n||e)})),t},$i=Fi(Oi,(function(e){return 500===ji.size&&ji.clear(),e})),ji=$i.cache,$i);var Ui=1/0,Gi=lt?lt.prototype:void 0,Vi=Gi?Gi.toString:void 0;function Xi(e){if("string"==typeof e)return e;if(vn(e))return function(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}(e,Xi)+"";if(Ii(e))return Vi?Vi.call(e):"";var t=e+"";return"0"==t&&1/e==-Ui?"-0":t}function Ki(e){return null==e?"":Xi(e)}function Yi(e,t){return vn(e)?e:Ni(e,t)?[e]:Bi(Ki(e))}var qi=1/0;function Ji(e){if("string"==typeof e||Ii(e))return e;var t=e+"";return"0"==t&&1/e==-qi?"-0":t}function Qi(e,t){for(var n=0,i=(t=Yi(t,e)).length;null!=e&&n<i;)e=e[Ji(t[n++])];return n&&n==i?e:void 0}function Zi(e,t){return null!=e&&t in Object(e)}function ea(e,t){return null!=e&&function(e,t,n){for(var i=-1,a=(t=Yi(t,e)).length,r=!1;++i<a;){var o=Ji(t[i]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||++i!=a?r:!!(a=null==e?0:e.length)&&Fn(a)&&Nn(o,a)&&(vn(e)||xn(e))}(e,t,Zi)}var ta=1,na=2;function ia(e,t){return Ni(e)&&xi(t)?Ai(Ji(e),t):function(n){var i=function(e,t,n){var i=null==e?void 0:Qi(e,t);return void 0===i?n:i}(n,e);return void 0===i&&i===t?ea(n,e):Ei(t,i,ta|na)}}function aa(e){return e}function ra(e){return Ni(e)?(t=Ji(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Qi(t,e)}}(e);var t}function oa(e){return e!=e}function sa(e,t){return!!(null==e?0:e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===t)return i;return-1}(e,t,n):function(e,t,n){for(var i=e.length,a=n+-1;++a<i;)if(t(e[a],a,e))return a;return-1}(e,oa,n)}(e,t,0)>-1}var la=oi&&1/Zt(new oi([,-0]))[1]==1/0?function(e){return new oi(e)}:function(){},da=200;function ua(e,t){return e&&e.length?function(e,t,n){var i=-1,a=sa,r=e.length,o=!0,s=[],l=s;if(r>=da){var d=t?null:la(e);if(d)return Zt(d);o=!1,a=Xt,l=new Gt}else l=t?[]:s;e:for(;++i<r;){var u=e[i],c=t?t(u):u;if(u=0!==u?u:0,o&&c==c){for(var h=l.length;h--;)if(l[h]===c)continue e;t&&l.push(c),s.push(u)}else a(l,c,n)||(l!==s&&l.push(c),s.push(u))}return s}(e,"function"==typeof(n=t)?n:null==n?aa:"object"==typeof n?vn(n)?ia(n[0],n[1]):Ci(n):ra(n)):[];var n}const ca=new class{constructor(){this.memoryStore={}}setDevice(e){this.setItem(V,e)}getDevice(){return this.getItem(V)}resetDevice(){this.resetItem(V)}getAnonymousMode(){return this.getItem(de)||!1}setAnonymousMode(e){this.setItem(de,e)}clearAnonymousMode(){this.resetItem(de)}setAppConfig(e,t){this.setItem(e,t)}getAppConfig(e){return this.getItem(e)}setLanguageCode(e){this.setItem(ve,e||"en")}getLanguageCode(){return this.getItem(ve)||"en"}setCampaignRules(e,t){e!==ie?e!==q||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[q]=JSON.stringify(t):this.memoryStore[ie]=JSON.stringify(t)}getCampaignRules(e){if(e===ie)return this.memoryStore[ie]?JSON.parse(this.memoryStore[ie]):null;if(e===q){const e=this.memoryStore[q];if(null!=e)return JSON.parse(e);let t=this.getItem(q);if(null===t)return null;if("string"==typeof t)try{t=JSON.parse(t)}catch{return t}return this.isLegacyTimestampedCache(t)?t.data:t}return this.getItem(e)}setPaywalls(e,t){e!==ae?e!==J||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[J]=JSON.stringify(t):this.memoryStore[ae]=JSON.stringify(t)}getPaywalls(e){if(e===ae)return this.memoryStore[ae]?JSON.parse(this.memoryStore[ae]):null;if(e===J){const e=this.memoryStore[J];if(null!=e)return JSON.parse(e);let t=this.getItem(J);if(null===t)return null;if("string"==typeof t)try{t=JSON.parse(t)}catch{return t}return this.isLegacyTimestampedCache(t)?t.data:t}return this.getItem(e)}setActiveEntitlements(e,t){this.setItem(e,t)}getActiveEntitlements(e){return this.getItem(e)||[]}setNamiEntitlements(e,t){this.setItem(e,t)}getNamiEntitlements(e){return this.getItem(e)||[]}setProducts(e,t){this.setItem(e,t)}getProducts(e){return this.getItem(e)}getCachedProducts(){const e=this.getItem(Z)??[];return ua(et([...this.getItem(re)??[],...e]),"sku_ref_id")}setNamiConfig(e){this.setItem(X,e)}getNamiConfig(){return this.getItem(X)}setCustomerAttribute(e,t){this.setItem(se+e,t)}getCustomerAttribute(e){return this.getItem(se+e)}getAllCustomerAttributes(){return Object.entries(localStorage).filter((([e])=>e.includes(se))).map((([e,t])=>e.replace(se,"")+":"+t))}getAllCustomerAttributesKeys(){return Object.keys(localStorage).filter((e=>e.includes(se))).map((e=>e.replace(se,"")))}clearCustomerAttribute(e){const t=se+e,n=this.getItem(t);return n&&this.resetItem(t),!!n}clearAllCustomerAttributes(){Object.keys(localStorage).filter((e=>e.includes(se))).map((e=>this.resetItem(e)))}setNamiProfile(e){this.setItem(K,e)}getNamiProfile(){return this.getItem(K)}removeNamiProfile(){this.resetItem(K)}setCustomerJourneyState(e){this.setItem(le,e)}getCustomerJourneyState(){return this.getItem(le)}setSessionCounter(){const e=this.getItem(ce),t=e?parseInt(e):he||he;this.setItem(ce,t+1)}getSessionCounter(){const e=this.getItem(ce);return e?parseInt(e):he}setLastImpressionId(e){this.setItem(me,e)}getLastImpressionId(){return this.getItem(me)??""}setPurchaseImpression(){const e=this.getLastImpressionId()??"";this.setItem(fe,e)}getPurchaseImpression(){return this.getItem(fe)??""}setSessionId(e){e&&this.setItem(ge,e)}getSessionId(){return this.getItem(ge)??""}clearSessionId(){this.resetItem(ge)}setLaunchId(e){e&&this.setItem(pe,e)}getLaunchId(){return this.getItem(pe)??""}clearLaunchId(){this.resetItem(pe)}setPurchaseChannel(e){e&&this.setItem(ye,e)}getPurchaseChannel(){return this.getItem(ye)}getAnonymousUUID(){return this.getItem(ue)}setAnonymousUUID(e){this.setItem(ue,e)}clearAnonymousUUID(){this.resetItem(ue)}setApiCampaignSessionTimestamp(){this.setItem(Q,Date.now())}getApiCampaignSessionTimestamp(){return this.getItem(Q)}purgeApiCampaignCache(){this.resetItem(J),this.resetItem(q),this.resetItem(Q)}getCampaignCacheTtl(){const e=this.getAppConfig(Y)||this.getAppConfig(ne);return e?.campaign_cache_ttl??null}isLegacyTimestampedCache(e){return"object"==typeof e&&null!==e&&"cachedAt"in e&&"data"in e}setItem(e,t){let n;try{n=JSON.stringify(t)}catch(t){return void Ze.error(`Serialization failed for ${e}`,t)}try{localStorage.setItem(e,n)}catch(t){Ze.error("Error setting item in localStorage:",t),this.resetItem(e),this.memoryStore[e]=n}}getItem(e){try{const t=localStorage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){"undefined"!=typeof window&&Ze.error("Error getting item from localStorage:",e,": ",t)}const t=this.memoryStore[e];return null!=t?JSON.parse(t):null}resetItem(e){try{localStorage.removeItem(e)}catch(t){"undefined"!=typeof window&&Ze.error("Error removing item from localStorage:",e,": ",t)}delete this.memoryStore[e]}clear(){try{localStorage.clear()}catch(e){Ze.error("Error clearing localStorage:",e)}this.memoryStore={}}};class ha extends Error{constructor(e,t){super(t),this.statusCode=e,this.status=e,this.message=`RetryLimitExceededError: ${this.message}`}}class ma extends Error{}class fa extends ma{constructor(){super(),this.status=409,this.name="ConflictError",this.message="ConflictError: Server responded with conflict"}}class pa extends Error{constructor(){super(F)}}class ga extends Error{constructor(){super(R)}}class va extends Error{constructor(){super(N)}}class ya extends Error{constructor(){super(W)}}class ba extends Error{constructor(){super(O)}}class wa extends Error{constructor(){super($)}}class ka extends Error{constructor(){super(z)}}class Sa extends Error{constructor(){super(H)}}class _a extends Error{constructor(){super(H)}}class Ma extends Error{constructor(){super(j)}}class Ea extends ma{constructor(e){super(e),this.message=`BadRequestError: ${this.message}`}}class Pa extends ma{constructor(e){super(e),this.message=`NotFoundError: ${this.message}`}}class Ta extends ma{constructor(e,t){super(t),this.statusCode=e,this.message=`ClientError: ${this.message}`}}class xa extends ma{constructor(e){super(e),this.message=`ServerError: ${this.message}`}}const Aa=(e,t)=>{if(e==Ne)throw new Ea(t);if(e==We)throw new Pa(t);if(e==Fe)throw new fa;if(e>Ne&&e<Oe)throw new Ta(e,t);if(e>=Oe)throw new xa(t)};async function Ca(e,t,n=Ie,i=Ce){let a=0;const r=async()=>{const o=await async function(e,t={},n){const i=new AbortController,a=setTimeout((()=>i.abort()),n);t.signal=i.signal;const r=await fetch(e,t);return clearTimeout(a),r}(e,t,n);if(!o.ok){if(o.status==Fe)throw new fa;if(a++,a<=i){const e=1e3*(a+Le);return await new Promise((t=>setTimeout(t,e))),r()}throw new ha(o.status,`Request failed after ${i} retries`)}return o};return(await r()).json()}function La(e){let t=e.length;for(;--t>=0;)e[t]=0}const Ia=256,Da=286,Ra=30,Na=15,Wa=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Fa=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Oa=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),$a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ja=new Array(576);La(ja);const za=new Array(60);La(za);const Ha=new Array(512);La(Ha);const Ba=new Array(256);La(Ba);const Ua=new Array(29);La(Ua);const Ga=new Array(Ra);function Va(e,t,n,i,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=a,this.has_stree=e&&e.length}let Xa,Ka,Ya;function qa(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}La(Ga);const Ja=e=>e<256?Ha[e]:Ha[256+(e>>>7)],Qa=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Za=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,Qa(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},er=(e,t,n)=>{Za(e,n[2*t],n[2*t+1])},tr=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},nr=(e,t,n)=>{const i=new Array(16);let a,r,o=0;for(a=1;a<=Na;a++)o=o+n[a-1]<<1,i[a]=o;for(r=0;r<=t;r++){let t=e[2*r+1];0!==t&&(e[2*r]=tr(i[t]++,t))}},ir=e=>{let t;for(t=0;t<Da;t++)e.dyn_ltree[2*t]=0;for(t=0;t<Ra;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},ar=e=>{e.bi_valid>8?Qa(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},rr=(e,t,n,i)=>{const a=2*t,r=2*n;return e[a]<e[r]||e[a]===e[r]&&i[t]<=i[n]},or=(e,t,n)=>{const i=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a<e.heap_len&&rr(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!rr(t,i,e.heap[a],e.depth));)e.heap[n]=e.heap[a],n=a,a<<=1;e.heap[n]=i},sr=(e,t,n)=>{let i,a,r,o,s=0;if(0!==e.sym_next)do{i=255&e.pending_buf[e.sym_buf+s++],i+=(255&e.pending_buf[e.sym_buf+s++])<<8,a=e.pending_buf[e.sym_buf+s++],0===i?er(e,a,t):(r=Ba[a],er(e,r+Ia+1,t),o=Wa[r],0!==o&&(a-=Ua[r],Za(e,a,o)),i--,r=Ja(i),er(e,r,n),o=Fa[r],0!==o&&(i-=Ga[r],Za(e,i,o)))}while(s<e.sym_next);er(e,256,t)},lr=(e,t)=>{const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,r=t.stat_desc.elems;let o,s,l,d=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<r;o++)0!==n[2*o]?(e.heap[++e.heap_len]=d=o,e.depth[o]=0):n[2*o+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=d<2?++d:0,n[2*l]=1,e.depth[l]=0,e.opt_len--,a&&(e.static_len-=i[2*l+1]);for(t.max_code=d,o=e.heap_len>>1;o>=1;o--)or(e,n,o);l=r;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],or(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[2*l]=n[2*o]+n[2*s],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[2*o+1]=n[2*s+1]=l,e.heap[1]=l++,or(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,i=t.max_code,a=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let d,u,c,h,m,f,p=0;for(h=0;h<=Na;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,d=e.heap_max+1;d<573;d++)u=e.heap[d],h=n[2*n[2*u+1]+1]+1,h>l&&(h=l,p++),n[2*u+1]=h,u>i||(e.bl_count[h]++,m=0,u>=s&&(m=o[u-s]),f=n[2*u],e.opt_len+=f*(h+m),r&&(e.static_len+=f*(a[2*u+1]+m)));if(0!==p){do{for(h=l-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,p-=2}while(p>0);for(h=l;0!==h;h--)for(u=e.bl_count[h];0!==u;)c=e.heap[--d],c>i||(n[2*c+1]!==h&&(e.opt_len+=(h-n[2*c+1])*n[2*c],n[2*c+1]=h),u--)}})(e,t),nr(n,d,e.bl_count)},dr=(e,t,n)=>{let i,a,r=-1,o=t[1],s=0,l=7,d=4;for(0===o&&(l=138,d=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)a=o,o=t[2*(i+1)+1],++s<l&&a===o||(s<d?e.bl_tree[2*a]+=s:0!==a?(a!==r&&e.bl_tree[2*a]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,r=a,0===o?(l=138,d=3):a===o?(l=6,d=3):(l=7,d=4))},ur=(e,t,n)=>{let i,a,r=-1,o=t[1],s=0,l=7,d=4;for(0===o&&(l=138,d=3),i=0;i<=n;i++)if(a=o,o=t[2*(i+1)+1],!(++s<l&&a===o)){if(s<d)do{er(e,a,e.bl_tree)}while(0!=--s);else 0!==a?(a!==r&&(er(e,a,e.bl_tree),s--),er(e,16,e.bl_tree),Za(e,s-3,2)):s<=10?(er(e,17,e.bl_tree),Za(e,s-3,3)):(er(e,18,e.bl_tree),Za(e,s-11,7));s=0,r=a,0===o?(l=138,d=3):a===o?(l=6,d=3):(l=7,d=4)}};let cr=!1;const hr=(e,t,n,i)=>{Za(e,0+(i?1:0),3),ar(e),Qa(e,n),Qa(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var mr=e=>{cr||((()=>{let e,t,n,i,a;const r=new Array(16);for(n=0,i=0;i<28;i++)for(Ua[i]=n,e=0;e<1<<Wa[i];e++)Ba[n++]=i;for(Ba[n-1]=i,a=0,i=0;i<16;i++)for(Ga[i]=a,e=0;e<1<<Fa[i];e++)Ha[a++]=i;for(a>>=7;i<Ra;i++)for(Ga[i]=a<<7,e=0;e<1<<Fa[i]-7;e++)Ha[256+a++]=i;for(t=0;t<=Na;t++)r[t]=0;for(e=0;e<=143;)ja[2*e+1]=8,e++,r[8]++;for(;e<=255;)ja[2*e+1]=9,e++,r[9]++;for(;e<=279;)ja[2*e+1]=7,e++,r[7]++;for(;e<=287;)ja[2*e+1]=8,e++,r[8]++;for(nr(ja,287,r),e=0;e<Ra;e++)za[2*e+1]=5,za[2*e]=tr(e,5);Xa=new Va(ja,Wa,257,Da,Na),Ka=new Va(za,Fa,0,Ra,Na),Ya=new Va(new Array(0),Oa,0,19,7)})(),cr=!0),e.l_desc=new qa(e.dyn_ltree,Xa),e.d_desc=new qa(e.dyn_dtree,Ka),e.bl_desc=new qa(e.bl_tree,Ya),e.bi_buf=0,e.bi_valid=0,ir(e)},fr=(e,t,n,i)=>{let a,r,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<Ia;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),lr(e,e.l_desc),lr(e,e.d_desc),o=(e=>{let t;for(dr(e,e.dyn_ltree,e.l_desc.max_code),dr(e,e.dyn_dtree,e.d_desc.max_code),lr(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*$a[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!==t?hr(e,t,n,i):4===e.strategy||r===a?(Za(e,2+(i?1:0),3),sr(e,ja,za)):(Za(e,4+(i?1:0),3),((e,t,n,i)=>{let a;for(Za(e,t-257,5),Za(e,n-1,5),Za(e,i-4,4),a=0;a<i;a++)Za(e,e.bl_tree[2*$a[a]+1],3);ur(e,e.dyn_ltree,t-1),ur(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),sr(e,e.dyn_ltree,e.dyn_dtree)),ir(e),i&&ar(e)},pr=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Ba[n]+Ia+1)]++,e.dyn_dtree[2*Ja(t)]++),e.sym_next===e.sym_end),gr=e=>{Za(e,2,3),er(e,256,ja),(e=>{16===e.bi_valid?(Qa(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)},vr={_tr_init:mr,_tr_stored_block:hr,_tr_flush_block:fr,_tr_tally:pr,_tr_align:gr};var yr=(e,t,n,i)=>{let a=65535&e,r=e>>>16&65535,o=0;for(;0!==n;){o=n>2e3?2e3:n,n-=o;do{a=a+t[i++]|0,r=r+a|0}while(--o);a%=65521,r%=65521}return a|r<<16};const br=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var wr=(e,t,n,i)=>{const a=br,r=i+n;e^=-1;for(let n=i;n<r;n++)e=e>>>8^a[255&(e^t[n])];return~e},kr={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"},Sr={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};const{_tr_init:_r,_tr_stored_block:Mr,_tr_flush_block:Er,_tr_tally:Pr,_tr_align:Tr}=vr,{Z_NO_FLUSH:xr,Z_PARTIAL_FLUSH:Ar,Z_FULL_FLUSH:Cr,Z_FINISH:Lr,Z_BLOCK:Ir,Z_OK:Dr,Z_STREAM_END:Rr,Z_STREAM_ERROR:Nr,Z_DATA_ERROR:Wr,Z_BUF_ERROR:Fr,Z_DEFAULT_COMPRESSION:Or,Z_FILTERED:$r,Z_HUFFMAN_ONLY:jr,Z_RLE:zr,Z_FIXED:Hr,Z_DEFAULT_STRATEGY:Br,Z_UNKNOWN:Ur,Z_DEFLATED:Gr}=Sr,Vr=258,Xr=262,Kr=42,Yr=113,qr=666,Jr=(e,t)=>(e.msg=kr[t],t),Qr=e=>2*e-(e>4?9:0),Zr=e=>{let t=e.length;for(;--t>=0;)e[t]=0},eo=e=>{let t,n,i,a=e.w_size;t=e.hash_size,i=t;do{n=e.head[--i],e.head[i]=n>=a?n-a:0}while(--t);t=a,i=t;do{n=e.prev[--i],e.prev[i]=n>=a?n-a:0}while(--t)};let to=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const no=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},io=(e,t)=>{Er(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,no(e.strm)},ao=(e,t)=>{e.pending_buf[e.pending++]=t},ro=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},oo=(e,t,n,i)=>{let a=e.avail_in;return a>i&&(a=i),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=yr(e.adler,t,a,n):2===e.state.wrap&&(e.adler=wr(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},so=(e,t)=>{let n,i,a=e.max_chain_length,r=e.strstart,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-Xr?e.strstart-(e.w_size-Xr):0,d=e.window,u=e.w_mask,c=e.prev,h=e.strstart+Vr;let m=d[r+o-1],f=d[r+o];e.prev_length>=e.good_match&&(a>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,d[n+o]===f&&d[n+o-1]===m&&d[n]===d[r]&&d[++n]===d[r+1]){r+=2,n++;do{}while(d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&d[++r]===d[++n]&&r<h);if(i=Vr-(h-r),r=h-Vr,i>o){if(e.match_start=t,o=i,i>=s)break;m=d[r+o-1],f=d[r+o]}}}while((t=c[t&u])>l&&0!=--a);return o<=e.lookahead?o:e.lookahead},lo=e=>{const t=e.w_size;let n,i,a;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Xr)&&(e.window.set(e.window.subarray(t,t+t-i),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),eo(e),i+=t),0===e.strm.avail_in)break;if(n=oo(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=to(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=to(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<Xr&&0!==e.strm.avail_in)},uo=(e,t)=>{let n,i,a,r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,s=e.strm.avail_in;do{if(n=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a)break;if(a=e.strm.avail_out-a,i=e.strstart-e.block_start,n>i+e.strm.avail_in&&(n=i+e.strm.avail_in),n>a&&(n=a),n<r&&(0===n&&t!==Lr||t===xr||n!==i+e.strm.avail_in))break;o=t===Lr&&n===i+e.strm.avail_in?1:0,Mr(e,0,0,o),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,no(e.strm),i&&(i>n&&(i=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,n-=i),n&&(oo(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===o);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==xr&&t!==Lr&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(oo(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,r=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=r||(i||t===Lr)&&t!==xr&&0===e.strm.avail_in&&i<=a)&&(n=i>a?a:i,o=t===Lr&&0===e.strm.avail_in&&n===i?1:0,Mr(e,e.block_start,n,o),e.block_start+=n,no(e.strm)),o?3:1)},co=(e,t)=>{let n,i;for(;;){if(e.lookahead<Xr){if(lo(e),e.lookahead<Xr&&t===xr)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=to(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-Xr&&(e.match_length=so(e,n)),e.match_length>=3)if(i=Pr(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=to(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=to(e,e.ins_h,e.window[e.strstart+1]);else i=Pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(io(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Lr?(io(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(io(e,!1),0===e.strm.avail_out)?1:2},ho=(e,t)=>{let n,i,a;for(;;){if(e.lookahead<Xr){if(lo(e),e.lookahead<Xr&&t===xr)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=to(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Xr&&(e.match_length=so(e,n),e.match_length<=5&&(e.strategy===$r||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,i=Pr(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=to(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(io(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=Pr(e,0,e.window[e.strstart-1]),i&&io(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=Pr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Lr?(io(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(io(e,!1),0===e.strm.avail_out)?1:2};function mo(e,t,n,i,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=i,this.func=a}const fo=[new mo(0,0,0,0,uo),new mo(4,4,8,4,co),new mo(4,5,16,8,co),new mo(4,6,32,32,co),new mo(4,4,16,16,ho),new mo(8,16,32,32,ho),new mo(8,16,128,128,ho),new mo(8,32,128,256,ho),new mo(32,128,258,1024,ho),new mo(32,258,258,4096,ho)];function po(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Gr,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Zr(this.dyn_ltree),Zr(this.dyn_dtree),Zr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Zr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Zr(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const go=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Kr&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Yr&&t.status!==qr?1:0},vo=e=>{if(go(e))return Jr(e,Nr);e.total_in=e.total_out=0,e.data_type=Ur;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Kr:Yr,e.adler=2===t.wrap?0:1,t.last_flush=-2,_r(t),Dr},yo=e=>{const t=vo(e);return t===Dr&&(e=>{e.window_size=2*e.w_size,Zr(e.head),e.max_lazy_match=fo[e.level].max_lazy,e.good_match=fo[e.level].good_length,e.nice_match=fo[e.level].nice_length,e.max_chain_length=fo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},bo=(e,t,n,i,a,r)=>{if(!e)return Nr;let o=1;if(t===Or&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),a<1||a>9||n!==Gr||i<8||i>15||t<0||t>9||r<0||r>Hr||8===i&&1!==o)return Jr(e,Nr);8===i&&(i=9);const s=new po;return e.state=s,s.strm=e,s.status=Kr,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=a+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<a+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=3*(s.lit_bufsize-1),s.level=t,s.strategy=r,s.method=n,yo(e)};var wo=(e,t)=>{if(go(e)||t>Ir||t<0)return e?Jr(e,Nr):Nr;const n=e.state;if(!e.output||0!==e.avail_in&&!e.input||n.status===qr&&t!==Lr)return Jr(e,0===e.avail_out?Fr:Nr);const i=n.last_flush;if(n.last_flush=t,0!==n.pending){if(no(e),0===e.avail_out)return n.last_flush=-1,Dr}else if(0===e.avail_in&&Qr(t)<=Qr(i)&&t!==Lr)return Jr(e,Fr);if(n.status===qr&&0!==e.avail_in)return Jr(e,Fr);if(n.status===Kr&&0===n.wrap&&(n.status=Yr),n.status===Kr){let t=Gr+(n.w_bits-8<<4)<<8,i=-1;if(i=n.strategy>=jr||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=i<<6,0!==n.strstart&&(t|=32),t+=31-t%31,ro(n,t),0!==n.strstart&&(ro(n,e.adler>>>16),ro(n,65535&e.adler)),e.adler=1,n.status=Yr,no(e),0!==n.pending)return n.last_flush=-1,Dr}if(57===n.status)if(e.adler=0,ao(n,31),ao(n,139),ao(n,8),n.gzhead)ao(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),ao(n,255&n.gzhead.time),ao(n,n.gzhead.time>>8&255),ao(n,n.gzhead.time>>16&255),ao(n,n.gzhead.time>>24&255),ao(n,9===n.level?2:n.strategy>=jr||n.level<2?4:0),ao(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(ao(n,255&n.gzhead.extra.length),ao(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=wr(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(ao(n,0),ao(n,0),ao(n,0),ao(n,0),ao(n,0),ao(n,9===n.level?2:n.strategy>=jr||n.level<2?4:0),ao(n,3),n.status=Yr,no(e),0!==n.pending)return n.last_flush=-1,Dr;if(69===n.status){if(n.gzhead.extra){let t=n.pending,i=(65535&n.gzhead.extra.length)-n.gzindex;for(;n.pending+i>n.pending_buf_size;){let a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=wr(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=a,no(e),0!==n.pending)return n.last_flush=-1,Dr;t=0,i-=a}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending+=i,n.gzhead.hcrc&&n.pending>t&&(e.adler=wr(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){let t,i=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=wr(e.adler,n.pending_buf,n.pending-i,i)),no(e),0!==n.pending)return n.last_flush=-1,Dr;i=0}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,ao(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>i&&(e.adler=wr(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){let t,i=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=wr(e.adler,n.pending_buf,n.pending-i,i)),no(e),0!==n.pending)return n.last_flush=-1,Dr;i=0}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,ao(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>i&&(e.adler=wr(e.adler,n.pending_buf,n.pending-i,i))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(no(e),0!==n.pending))return n.last_flush=-1,Dr;ao(n,255&e.adler),ao(n,e.adler>>8&255),e.adler=0}if(n.status=Yr,no(e),0!==n.pending)return n.last_flush=-1,Dr}if(0!==e.avail_in||0!==n.lookahead||t!==xr&&n.status!==qr){let i=0===n.level?uo(n,t):n.strategy===jr?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(lo(e),0===e.lookahead)){if(t===xr)return 1;break}if(e.match_length=0,n=Pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(io(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Lr?(io(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(io(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===zr?((e,t)=>{let n,i,a,r;const o=e.window;for(;;){if(e.lookahead<=Vr){if(lo(e),e.lookahead<=Vr&&t===xr)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,i=o[a],i===o[++a]&&i===o[++a]&&i===o[++a])){r=e.strstart+Vr;do{}while(i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&a<r);e.match_length=Vr-(r-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=Pr(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(io(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Lr?(io(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(io(e,!1),0===e.strm.avail_out)?1:2})(n,t):fo[n.level].func(n,t);if(3!==i&&4!==i||(n.status=qr),1===i||3===i)return 0===e.avail_out&&(n.last_flush=-1),Dr;if(2===i&&(t===Ar?Tr(n):t!==Ir&&(Mr(n,0,0,!1),t===Cr&&(Zr(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),no(e),0===e.avail_out))return n.last_flush=-1,Dr}return t!==Lr?Dr:n.wrap<=0?Rr:(2===n.wrap?(ao(n,255&e.adler),ao(n,e.adler>>8&255),ao(n,e.adler>>16&255),ao(n,e.adler>>24&255),ao(n,255&e.total_in),ao(n,e.total_in>>8&255),ao(n,e.total_in>>16&255),ao(n,e.total_in>>24&255)):(ro(n,e.adler>>>16),ro(n,65535&e.adler)),no(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?Dr:Rr)},ko=(e,t)=>{let n=t.length;if(go(e))return Nr;const i=e.state,a=i.wrap;if(2===a||1===a&&i.status!==Kr||i.lookahead)return Nr;if(1===a&&(e.adler=yr(e.adler,t,n,0)),i.wrap=0,n>=i.w_size){0===a&&(Zr(i.head),i.strstart=0,i.block_start=0,i.insert=0);let e=new Uint8Array(i.w_size);e.set(t.subarray(n-i.w_size,n),0),t=e,n=i.w_size}const r=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,lo(i);i.lookahead>=3;){let e=i.strstart,t=i.lookahead-2;do{i.ins_h=to(i,i.ins_h,i.window[e+3-1]),i.prev[e&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=e,e++}while(--t);i.strstart=e,i.lookahead=2,lo(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=o,e.input=s,e.avail_in=r,i.wrap=a,Dr},So={deflateInit:(e,t)=>bo(e,t,Gr,15,8,Br),deflateInit2:bo,deflateReset:yo,deflateResetKeep:vo,deflateSetHeader:(e,t)=>go(e)||2!==e.state.wrap?Nr:(e.state.gzhead=t,Dr),deflate:wo,deflateEnd:e=>{if(go(e))return Nr;const t=e.state.status;return e.state=null,t===Yr?Jr(e,Wr):Dr},deflateSetDictionary:ko,deflateInfo:"pako deflate (from Nodeca project)"};const _o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Mo={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)_o(n,t)&&(e[t]=n[t])}}return e},flattenChunks:e=>{let t=0;for(let n=0,i=e.length;n<i;n++)t+=e[n].length;const n=new Uint8Array(t);for(let t=0,i=0,a=e.length;t<a;t++){let a=e[t];n.set(a,i),i+=a.length}return n}};let Eo=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Eo=!1}const Po=new Uint8Array(256);for(let e=0;e<256;e++)Po[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Po[254]=Po[254]=1;var To={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,i,a,r,o=e.length,s=0;for(a=0;a<o;a++)n=e.charCodeAt(a),55296==(64512&n)&&a+1<o&&(i=e.charCodeAt(a+1),56320==(64512&i)&&(n=65536+(n-55296<<10)+(i-56320),a++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),r=0,a=0;r<s;a++)n=e.charCodeAt(a),55296==(64512&n)&&a+1<o&&(i=e.charCodeAt(a+1),56320==(64512&i)&&(n=65536+(n-55296<<10)+(i-56320),a++)),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)=>{const n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let i,a;const r=new Array(2*n);for(a=0,i=0;i<n;){let t=e[i++];if(t<128){r[a++]=t;continue}let o=Po[t];if(o>4)r[a++]=65533,i+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&i<n;)t=t<<6|63&e[i++],o--;o>1?r[a++]=65533:t<65536?r[a++]=t:(t-=65536,r[a++]=55296|t>>10&1023,r[a++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Eo)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n})(r,a)},utf8border:(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Po[e[n]]>t?n:t}};var xo=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};const Ao=Object.prototype.toString,{Z_NO_FLUSH:Co,Z_SYNC_FLUSH:Lo,Z_FULL_FLUSH:Io,Z_FINISH:Do,Z_OK:Ro,Z_STREAM_END:No,Z_DEFAULT_COMPRESSION:Wo,Z_DEFAULT_STRATEGY:Fo,Z_DEFLATED:Oo}=Sr;function $o(e){this.options=Mo.assign({level:Wo,method:Oo,chunkSize:16384,windowBits:15,memLevel:8,strategy:Fo},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new xo,this.strm.avail_out=0;let n=So.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Ro)throw new Error(kr[n]);if(t.header&&So.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?To.string2buf(t.dictionary):"[object ArrayBuffer]"===Ao.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=So.deflateSetDictionary(this.strm,e),n!==Ro)throw new Error(kr[n]);this._dict_set=!0}}$o.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize;let a,r;if(this.ended)return!1;for(r=t===~~t?t:!0===t?Do:Co,"string"==typeof e?n.input=To.string2buf(e):"[object ArrayBuffer]"===Ao.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),(r===Lo||r===Io)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=So.deflate(n,r),a===No)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=So.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Ro;if(0!==n.avail_out){if(r>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},$o.prototype.onData=function(e){this.chunks.push(e)},$o.prototype.onEnd=function(e){e===Ro&&(this.result=Mo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const jo=16209;var zo=function(e,t){let n,i,a,r,o,s,l,d,u,c,h,m,f,p,g,v,y,b,w,k,S,_,M,E;const P=e.state;n=e.next_in,M=e.input,i=n+(e.avail_in-5),a=e.next_out,E=e.output,r=a-(t-e.avail_out),o=a+(e.avail_out-257),s=P.dmax,l=P.wsize,d=P.whave,u=P.wnext,c=P.window,h=P.hold,m=P.bits,f=P.lencode,p=P.distcode,g=(1<<P.lenbits)-1,v=(1<<P.distbits)-1;e:do{m<15&&(h+=M[n++]<<m,m+=8,h+=M[n++]<<m,m+=8),y=f[h&g];t:for(;;){if(b=y>>>24,h>>>=b,m-=b,b=y>>>16&255,0===b)E[a++]=65535&y;else{if(!(16&b)){if(64&b){if(32&b){P.mode=16191;break e}e.msg="invalid literal/length code",P.mode=jo;break e}y=f[(65535&y)+(h&(1<<b)-1)];continue t}for(w=65535&y,b&=15,b&&(m<b&&(h+=M[n++]<<m,m+=8),w+=h&(1<<b)-1,h>>>=b,m-=b),m<15&&(h+=M[n++]<<m,m+=8,h+=M[n++]<<m,m+=8),y=p[h&v];;){if(b=y>>>24,h>>>=b,m-=b,b=y>>>16&255,16&b){if(k=65535&y,b&=15,m<b&&(h+=M[n++]<<m,m+=8,m<b&&(h+=M[n++]<<m,m+=8)),k+=h&(1<<b)-1,k>s){e.msg="invalid distance too far back",P.mode=jo;break e}if(h>>>=b,m-=b,b=a-r,k>b){if(b=k-b,b>d&&P.sane){e.msg="invalid distance too far back",P.mode=jo;break e}if(S=0,_=c,0===u){if(S+=l-b,b<w){w-=b;do{E[a++]=c[S++]}while(--b);S=a-k,_=E}}else if(u<b){if(S+=l+u-b,b-=u,b<w){w-=b;do{E[a++]=c[S++]}while(--b);if(S=0,u<w){b=u,w-=b;do{E[a++]=c[S++]}while(--b);S=a-k,_=E}}}else if(S+=u-b,b<w){w-=b;do{E[a++]=c[S++]}while(--b);S=a-k,_=E}for(;w>2;)E[a++]=_[S++],E[a++]=_[S++],E[a++]=_[S++],w-=3;w&&(E[a++]=_[S++],w>1&&(E[a++]=_[S++]))}else{S=a-k;do{E[a++]=E[S++],E[a++]=E[S++],E[a++]=E[S++],w-=3}while(w>2);w&&(E[a++]=E[S++],w>1&&(E[a++]=E[S++]))}break}if(64&b){e.msg="invalid distance code",P.mode=jo;break e}y=p[(65535&y)+(h&(1<<b)-1)]}}break}}while(n<i&&a<o);w=m>>3,n-=w,m-=w<<3,h&=(1<<m)-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<o?o-a+257:257-(a-o),P.hold=h,P.bits=m};const Ho=15,Bo=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]),Uo=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]),Go=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]),Vo=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]);var Xo=(e,t,n,i,a,r,o,s)=>{const l=s.bits;let d,u,c,h,m,f,p=0,g=0,v=0,y=0,b=0,w=0,k=0,S=0,_=0,M=0,E=null;const P=new Uint16Array(16),T=new Uint16Array(16);let x,A,C,L=null;for(p=0;p<=Ho;p++)P[p]=0;for(g=0;g<i;g++)P[t[n+g]]++;for(b=l,y=Ho;y>=1&&0===P[y];y--);if(b>y&&(b=y),0===y)return a[r++]=20971520,a[r++]=20971520,s.bits=1,0;for(v=1;v<y&&0===P[v];v++);for(b<v&&(b=v),S=1,p=1;p<=Ho;p++)if(S<<=1,S-=P[p],S<0)return-1;if(S>0&&(0===e||1!==y))return-1;for(T[1]=0,p=1;p<Ho;p++)T[p+1]=T[p]+P[p];for(g=0;g<i;g++)0!==t[n+g]&&(o[T[t[n+g]]++]=g);if(0===e?(E=L=o,f=20):1===e?(E=Bo,L=Uo,f=257):(E=Go,L=Vo,f=0),M=0,g=0,p=v,m=r,w=b,k=0,c=-1,_=1<<b,h=_-1,1===e&&_>852||2===e&&_>592)return 1;for(;;){x=p-k,o[g]+1<f?(A=0,C=o[g]):o[g]>=f?(A=L[o[g]-f],C=E[o[g]-f]):(A=96,C=0),d=1<<p-k,u=1<<w,v=u;do{u-=d,a[m+(M>>k)+u]=x<<24|A<<16|C}while(0!==u);for(d=1<<p-1;M&d;)d>>=1;if(0!==d?(M&=d-1,M+=d):M=0,g++,0==--P[p]){if(p===y)break;p=t[n+o[g]]}if(p>b&&(M&h)!==c){for(0===k&&(k=b),m+=v,w=p-k,S=1<<w;w+k<y&&(S-=P[w+k],!(S<=0));)w++,S<<=1;if(_+=1<<w,1===e&&_>852||2===e&&_>592)return 1;c=M&h,a[c]=b<<24|w<<16|m-r}}return 0!==M&&(a[m+M]=p-k<<24|64<<16),s.bits=b,0};const{Z_FINISH:Ko,Z_BLOCK:Yo,Z_TREES:qo,Z_OK:Jo,Z_STREAM_END:Qo,Z_NEED_DICT:Zo,Z_STREAM_ERROR:es,Z_DATA_ERROR:ts,Z_MEM_ERROR:ns,Z_BUF_ERROR:is,Z_DEFLATED:as}=Sr,rs=16180,os=16190,ss=16191,ls=16192,ds=16194,us=16199,cs=16200,hs=16206,ms=16209,fs=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function ps(){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}const gs=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<rs||t.mode>16211?1:0},vs=e=>{if(gs(e))return es;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=rs,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,Jo},ys=e=>{if(gs(e))return es;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,vs(e)},bs=(e,t)=>{let n;if(gs(e))return es;const i=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?es:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,ys(e))},ws=(e,t)=>{if(!e)return es;const n=new ps;e.state=n,n.strm=e,n.window=null,n.mode=rs;const i=bs(e,t);return i!==Jo&&(e.state=null),i};let ks,Ss,_s=!0;const Ms=e=>{if(_s){ks=new Int32Array(512),Ss=new Int32Array(32);let t=0;for(;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(Xo(1,e.lens,0,288,ks,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Xo(2,e.lens,0,32,Ss,0,e.work,{bits:5}),_s=!1}e.lencode=ks,e.lenbits=9,e.distcode=Ss,e.distbits=5},Es=(e,t,n,i)=>{let a;const r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),i>=r.wsize?(r.window.set(t.subarray(n-r.wsize,n),0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>i&&(a=i),r.window.set(t.subarray(n-i,n-i+a),r.wnext),(i-=a)?(r.window.set(t.subarray(n-i,n),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0};var Ps=(e,t)=>{let n,i,a,r,o,s,l,d,u,c,h,m,f,p,g,v,y,b,w,k,S,_,M=0;const E=new Uint8Array(4);let P,T;const x=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(gs(e)||!e.output||!e.input&&0!==e.avail_in)return es;n=e.state,n.mode===ss&&(n.mode=ls),o=e.next_out,a=e.output,l=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,d=n.hold,u=n.bits,c=s,h=l,_=Jo;e:for(;;)switch(n.mode){case rs:if(0===n.wrap){n.mode=ls;break}for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(2&n.wrap&&35615===d){0===n.wbits&&(n.wbits=15),n.check=0,E[0]=255&d,E[1]=d>>>8&255,n.check=wr(n.check,E,2,0),d=0,u=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",n.mode=ms;break}if((15&d)!==as){e.msg="unknown compression method",n.mode=ms;break}if(d>>>=4,u-=4,S=8+(15&d),0===n.wbits&&(n.wbits=S),S>15||S>n.wbits){e.msg="invalid window size",n.mode=ms;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&d?16189:ss,d=0,u=0;break;case 16181:for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(n.flags=d,(255&n.flags)!==as){e.msg="unknown compression method",n.mode=ms;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=ms;break}n.head&&(n.head.text=d>>8&1),512&n.flags&&4&n.wrap&&(E[0]=255&d,E[1]=d>>>8&255,n.check=wr(n.check,E,2,0)),d=0,u=0,n.mode=16182;case 16182:for(;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.head&&(n.head.time=d),512&n.flags&&4&n.wrap&&(E[0]=255&d,E[1]=d>>>8&255,E[2]=d>>>16&255,E[3]=d>>>24&255,n.check=wr(n.check,E,4,0)),d=0,u=0,n.mode=16183;case 16183:for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.head&&(n.head.xflags=255&d,n.head.os=d>>8),512&n.flags&&4&n.wrap&&(E[0]=255&d,E[1]=d>>>8&255,n.check=wr(n.check,E,2,0)),d=0,u=0,n.mode=16184;case 16184:if(1024&n.flags){for(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.length=d,n.head&&(n.head.extra_len=d),512&n.flags&&4&n.wrap&&(E[0]=255&d,E[1]=d>>>8&255,n.check=wr(n.check,E,2,0)),d=0,u=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(m=n.length,m>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(i.subarray(r,r+m),S)),512&n.flags&&4&n.wrap&&(n.check=wr(n.check,i,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=i[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=wr(n.check,i,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=i[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=wr(n.check,i,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(;u<16;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(4&n.wrap&&d!==(65535&n.check)){e.msg="header crc mismatch",n.mode=ms;break}d=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ss;break;case 16189:for(;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}e.adler=n.check=fs(d),d=0,u=0,n.mode=os;case os:if(0===n.havedict)return e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,n.hold=d,n.bits=u,Zo;e.adler=n.check=1,n.mode=ss;case ss:if(t===Yo||t===qo)break e;case ls:if(n.last){d>>>=7&u,u-=7&u,n.mode=hs;break}for(;u<3;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}switch(n.last=1&d,d>>>=1,u-=1,3&d){case 0:n.mode=16193;break;case 1:if(Ms(n),n.mode=us,t===qo){d>>>=2,u-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=ms}d>>>=2,u-=2;break;case 16193:for(d>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if((65535&d)!=(d>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ms;break}if(n.length=65535&d,d=0,u=0,n.mode=ds,t===qo)break e;case ds:n.mode=16195;case 16195:if(m=n.length,m){if(m>s&&(m=s),m>l&&(m=l),0===m)break e;a.set(i.subarray(r,r+m),o),s-=m,r+=m,l-=m,o+=m,n.length-=m;break}n.mode=ss;break;case 16196:for(;u<14;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(n.nlen=257+(31&d),d>>>=5,u-=5,n.ndist=1+(31&d),d>>>=5,u-=5,n.ncode=4+(15&d),d>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ms;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;u<3;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.lens[x[n.have++]]=7&d,d>>>=3,u-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},_=Xo(0,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,_){e.msg="invalid code lengths set",n.mode=ms;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;M=n.lencode[d&(1<<n.lenbits)-1],g=M>>>24,v=M>>>16&255,y=65535&M,!(g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(y<16)d>>>=g,u-=g,n.lens[n.have++]=y;else{if(16===y){for(T=g+2;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(d>>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=ms;break}S=n.lens[n.have-1],m=3+(3&d),d>>>=2,u-=2}else if(17===y){for(T=g+3;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=g,u-=g,S=0,m=3+(7&d),d>>>=3,u-=3}else{for(T=g+7;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=g,u-=g,S=0,m=11+(127&d),d>>>=7,u-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ms;break}for(;m--;)n.lens[n.have++]=S}}if(n.mode===ms)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=ms;break}if(n.lenbits=9,P={bits:n.lenbits},_=Xo(1,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,_){e.msg="invalid literal/lengths set",n.mode=ms;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},_=Xo(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,_){e.msg="invalid distances set",n.mode=ms;break}if(n.mode=us,t===qo)break e;case us:n.mode=cs;case cs:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,n.hold=d,n.bits=u,zo(e,h),o=e.next_out,a=e.output,l=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,d=n.hold,u=n.bits,n.mode===ss&&(n.back=-1);break}for(n.back=0;M=n.lencode[d&(1<<n.lenbits)-1],g=M>>>24,v=M>>>16&255,y=65535&M,!(g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(v&&!(240&v)){for(b=g,w=v,k=y;M=n.lencode[k+((d&(1<<b+w)-1)>>b)],g=M>>>24,v=M>>>16&255,y=65535&M,!(b+g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=b,u-=b,n.back+=b}if(d>>>=g,u-=g,n.back+=g,n.length=y,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=ss;break}if(64&v){e.msg="invalid literal/length code",n.mode=ms;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(T=n.extra;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.length+=d&(1<<n.extra)-1,d>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;M=n.distcode[d&(1<<n.distbits)-1],g=M>>>24,v=M>>>16&255,y=65535&M,!(g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(!(240&v)){for(b=g,w=v,k=y;M=n.distcode[k+((d&(1<<b+w)-1)>>b)],g=M>>>24,v=M>>>16&255,y=65535&M,!(b+g<=u);){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}d>>>=b,u-=b,n.back+=b}if(d>>>=g,u-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=ms;break}n.offset=y,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(T=n.extra;u<T;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}n.offset+=d&(1<<n.extra)-1,d>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ms;break}n.mode=16204;case 16204:if(0===l)break e;if(m=h-l,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ms;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=o-n.offset,m=n.length;m>l&&(m=l),l-=m,n.length-=m;do{a[o++]=p[f++]}while(--m);0===n.length&&(n.mode=cs);break;case 16205:if(0===l)break e;a[o++]=n.length,l--,n.mode=cs;break;case hs:if(n.wrap){for(;u<32;){if(0===s)break e;s--,d|=i[r++]<<u,u+=8}if(h-=l,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?wr(n.check,a,h,o-h):yr(n.check,a,h,o-h)),h=l,4&n.wrap&&(n.flags?d:fs(d))!==n.check){e.msg="incorrect data check",n.mode=ms;break}d=0,u=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;u<32;){if(0===s)break e;s--,d+=i[r++]<<u,u+=8}if(4&n.wrap&&d!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=ms;break}d=0,u=0}n.mode=16208;case 16208:_=Qo;break e;case ms:_=ts;break e;case 16210:return ns;default:return es}return e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,n.hold=d,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<ms&&(n.mode<hs||t!==Ko))&&Es(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?wr(n.check,a,h,e.next_out-h):yr(n.check,a,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ss?128:0)+(n.mode===us||n.mode===ds?256:0),(0===c&&0===h||t===Ko)&&_===Jo&&(_=is),_},Ts={inflateReset:ys,inflateReset2:bs,inflateResetKeep:vs,inflateInit:e=>ws(e,15),inflateInit2:ws,inflate:Ps,inflateEnd:e=>{if(gs(e))return es;let t=e.state;return t.window&&(t.window=null),e.state=null,Jo},inflateGetHeader:(e,t)=>{if(gs(e))return es;const n=e.state;return 2&n.wrap?(n.head=t,t.done=!1,Jo):es},inflateSetDictionary:(e,t)=>{const n=t.length;let i,a,r;return gs(e)?es:(i=e.state,0!==i.wrap&&i.mode!==os?es:i.mode===os&&(a=1,a=yr(a,t,n,0),a!==i.check)?ts:(r=Es(e,t,n,n),r?(i.mode=16210,ns):(i.havedict=1,Jo)))},inflateInfo:"pako inflate (from Nodeca project)"};var xs=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};const As=Object.prototype.toString,{Z_NO_FLUSH:Cs,Z_FINISH:Ls,Z_OK:Is,Z_STREAM_END:Ds,Z_NEED_DICT:Rs,Z_STREAM_ERROR:Ns,Z_DATA_ERROR:Ws,Z_MEM_ERROR:Fs}=Sr;function Os(e){this.options=Mo.assign({chunkSize:65536,windowBits:15,to:""},e||{});const 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 xo,this.strm.avail_out=0;let n=Ts.inflateInit2(this.strm,t.windowBits);if(n!==Is)throw new Error(kr[n]);if(this.header=new xs,Ts.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=To.string2buf(t.dictionary):"[object ArrayBuffer]"===As.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Ts.inflateSetDictionary(this.strm,t.dictionary),n!==Is)))throw new Error(kr[n])}function $s(e,t){const n=new Os(t);if(n.push(e),n.err)throw n.msg||kr[n.err];return n.result}Os.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize,a=this.options.dictionary;let r,o,s;if(this.ended)return!1;for(o=t===~~t?t:!0===t?Ls:Cs,"[object ArrayBuffer]"===As.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),r=Ts.inflate(n,o),r===Rs&&a&&(r=Ts.inflateSetDictionary(n,a),r===Is?r=Ts.inflate(n,o):r===Ws&&(r=Rs));n.avail_in>0&&r===Ds&&n.state.wrap>0&&0!==e[n.next_in];)Ts.inflateReset(n),r=Ts.inflate(n,o);switch(r){case Ns:case Ws:case Rs:case Fs:return this.onEnd(r),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(0===n.avail_out||r===Ds))if("string"===this.options.to){let e=To.utf8border(n.output,n.next_out),t=n.next_out-e,a=To.buf2string(n.output,e);n.next_out=t,n.avail_out=i-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(r!==Is||0!==s){if(r===Ds)return r=Ts.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},Os.prototype.onData=function(e){this.chunks.push(e)},Os.prototype.onEnd=function(e){e===Is&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Mo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var js={Inflate:Os,inflate:$s,inflateRaw:function(e,t){return(t=t||{}).raw=!0,$s(e,t)},ungzip:$s,constants:Sr};const{Inflate:zs,inflate:Hs,inflateRaw:Bs,ungzip:Us}=js;var Gs=Us;const Vs=e=>{let t;if(e?.includes(Me))t=Se;else{const n=e?.find((e=>e.includes(_e)));t=n?n.split("=")[1]:ke}return t=t.replace(/\/$/,""),t+"/"+we},Xs=e=>{const t=ca.getAppConfig(Y)||ca.getAppConfig(ne);return t?.capabilities?.includes(e)??!1},Ks=()=>{const e=(()=>{const e=ca.getAppConfig(Y)||ca.getAppConfig(ne);return e?.campaign_cache_ttl??null})();if(null===e)return;if(0===e)return void ca.purgeApiCampaignCache();const t=ca.getApiCampaignSessionTimestamp();if(null===t)return;(Date.now()-t)/1e3>=e&&ca.purgeApiCampaignCache()},Ys=e=>{const t=!Xs(A.THIRD_PARTY_TRANSACTIONS);return e&&!t&&Ze.info(`[${e}] Your plan does not have purchase management features.`),t};function qs(e){try{const t=function(e){if("undefined"!=typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));const t=atob(e),n=t.length,i=new Uint8Array(n);for(let e=0;e<n;e++)i[e]=t.charCodeAt(e);return i}(e.trim()),n=Gs(t),i=(new TextDecoder).decode(n);return JSON.parse(i)}catch{return}}function Js(e,t,n){const i=n.value;return n.value=function(...e){if(!this.platformID)throw new ga;return i.apply(this,e)},n}function Qs(e,t,n){const i=n.value;return n.value=function(...e){const t=ca.getDevice();if(!t?.id)throw new va;return i.apply(this,e)},n}class Zs{get deviceID(){return ca.getDevice()?.id}constructor(){const e=ca.getNamiConfig();!this.platformID&&e&&this.configure(e)}static configure(e){this.instance.configure(e)}configure(e){this.baseURL=Vs(e.namiCommands),this.platformID=e.appPlatformID}async login(e){if(!e)throw new ya;const t=`device/${this.deviceID}/login/`,n={external_id:e};return await this.requestBodyAPI(t,n,"PUT")}async logout(){const e=`device/${this.deviceID}/logout/`;return await this.requestBodyAPI(e,{},"PUT")}async startSession(e){const t=`device/${this.deviceID}/session/`,n=await this.requestBodyAPI(t,{start_time:e,app_env:"production"});ca.setSessionCounter(),n.id&&ca.setSessionId(n.id)}async postImpression(e){const t=`device/${this.deviceID}/impression/`,n=await this.requestBodyAPI(t,e,"POST",!0);n.id&&ca.setLastImpressionId(n.id)}async postConversion(e){const t=`device/${this.deviceID}/transaction/`;await this.requestBodyAPI(t,e,"POST",!0)}async purchaseValidation(e){const t=`device/${this.deviceID}/purchase_event/`;await this.requestBodyAPI(t,e,"PUT")}async fetchAPI(e,t,n){const i=`${this.baseURL}/${this.platformID}/`+e;return await Ca(i,void 0,t,n)}async requestBodyAPI(e,t,n="POST",i=!1,a,r){const o=`${this.baseURL}/${this.platformID}/`+e,s={method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:i};return await Ca(o,s,a,r)}}function el(e){return null!=e?.flow}var tl;Zs.instance=new Zs,T([Qs],Zs.prototype,"login",null),T([Qs],Zs.prototype,"logout",null),T([Qs],Zs.prototype,"startSession",null),T([Qs],Zs.prototype,"postImpression",null),T([Qs],Zs.prototype,"postConversion",null),T([Qs],Zs.prototype,"purchaseValidation",null),T([Js],Zs.prototype,"fetchAPI",null),T([Js],Zs.prototype,"requestBodyAPI",null),e.NamiCampaignRuleType=void 0,(tl=e.NamiCampaignRuleType||(e.NamiCampaignRuleType={})).DEFAULT="default",tl.LABEL="label",tl.UNKNOWN="unknown",tl.URL="url";const nl=()=>ca.getPaywalls(ae)??[],il=()=>ca.getPaywalls(J)??[],al=()=>ua(et([...il(),...nl()]),"id"),rl=e=>al().find((t=>t.id===e)),ol=e=>{const t=al(),n=new Set(t.map((e=>e.id)));return e.every((e=>n.has(e)))};function sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ll,dl={exports:{}};var ul=(ll||(ll=1,function(e){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},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 i=n(18),a=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,i){void 0===i&&(i=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(n),o=Math.max(a,r),s=0,l=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),i=t+new Array(n+1).join(".0");return e.map(i.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(i&&(s=o-Math.min(a,r)),o-=1;o>=s;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===s)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}},e.map=function(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i},e.find=function(e,t){var n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){var a=e[n];if(t(a,n))return a}},e.assign=function(e){for(var t,n,i=e,a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;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){i[t]=e[t]}))};for(t=0,n=r.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=a,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 i,a=(i=n(91))&&i.__esModule?i:{default:i},r=n(18);function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var s=function(){function e(){}var t,n,i;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 a.default(e,t)},e.parse=function(e){return new a.default(e).getResult()},t=e,i=[{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),i&&o(t,i),e}();t.default=s,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=l(n(92)),a=l(n(93)),r=l(n(94)),o=l(n(95)),s=l(n(17));function l(e){return e&&e.__esModule?e:{default:e}}var d=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(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.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(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.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={},i=0,a={},r=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(a[t]=o,r+=1):"object"==typeof o&&(n[t]=o,i+=1)})),i>0){var o=Object.keys(n),l=s.default.find(o,(function(e){return t.isOS(e)}));if(l){var d=this.satisfies(n[l]);if(void 0!==d)return d}var u=s.default.find(o,(function(e){return t.isPlatform(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}}if(r>0){var h=Object.keys(a),m=s.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(a[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),a=s.default.getBrowserTypeByAlias(i);return t&&a&&(i=a.toLowerCase()),i===n},t.compareVersion=function(e){var t=[0],n=e,i=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(i=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(i=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(a,n,i))>-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=d,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.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=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=a.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=a.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=a.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=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=a.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=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=a.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=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=a.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=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=a.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=a.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=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:a.default.getFirstMatch(t,e),version:a.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=a.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=a.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=a.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=a.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=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=a.default.getMacOSVersionName(t),i={name:r.OS_MAP.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=a.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=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=a.default.getAndroidVersionName(t),i={name:r.OS_MAP.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.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=a.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||a.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||a.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:r.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=a.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=a.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=a.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 i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=a.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=a.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 i,a=(i=n(17))&&i.__esModule?i:{default:i},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=a.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=a.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=a.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=a.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=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})}(dl)),dl.exports),cl=sl(ul);const hl="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},ml="function"==typeof hl.BigInt,fl=ml?hl.BigInt.bind(hl):void 0,pl=ml?fl("0xffffffffffffffffffffffffffffffff"):null,gl=ml?fl("0x100000000000000000000000000000000"):null,vl=ml?fl(0):null,yl=ml?fl(1):null,bl=ml?fl(8):null,wl=ml?fl(1e4):null,kl=16,Sl=1/kl,_l={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},Ml=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:C,language:"en"};const t=cl.getParser(window.navigator.userAgent),n=t.getPlatform(),i={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:C,language:window.navigator.language};if(n.type&&(i.form_factor=_l[n.type]),n.model&&(i.device_model=n.model),e&&e.length>0){const t=(e=>{const t=e.find((e=>e.includes(Ee))),n={platform:"",version:""};if(t){const e=t.split(Pe);n.platform=e[1],n.version=e[2]}return n})(e);i.extended_platform=t.platform,i.extended_platform_version=t.version}return i},El=()=>{const e=ca.getNamiConfig();if(e&&e.formFactor)return e.formFactor;if("undefined"==typeof window)return _l.desktop;const t=cl.getParser(window.navigator.userAgent).getPlatform();return t.type?_l[t.type]:_l.desktop},Pl={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4};const Tl=()=>{const{innerWidth:e,innerHeight:t}=window;return Math.min(e/1920,t/1080)||1};function xl(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function Al(e){if(!ml||!pl)return Il(e);try{const t=pl,n=function(e){if(!fl)throw new Error("BigInt is not supported in this environment");const t=e.replace(/-/g,"");return fl("0x"+t)}(e);return Number(n)/Number(t)*100}catch(t){throw Ze.error(`Error calculating audience split position for UUID ${e}`,t),new Error(`Invalid UUID format: ${e}`)}}function Cl(e){if(!fl)throw new Error("BigInt is not supported in this environment");let t=e.toString(16).padStart(32,"0");t=t.substring(0,12)+"4"+t.substring(13);const n=3&parseInt(t[16],16)|8;return t=t.substring(0,16)+n.toString(16)+t.substring(17),t.slice(0,8)+"-"+t.slice(8,12)+"-"+t.slice(12,16)+"-"+t.slice(16,20)+"-"+t.slice(20)}function Ll(e,t=.5){if(!Number.isFinite(e))throw new Error("Invalid target");if(!Number.isFinite(t))throw new Error("Invalid tolerance");const n=Math.max(0,Math.min(100,e)),i=Math.max(0,Math.min(50,t)),a=e=>Math.round(100*e),r=Math.max(0,a(n-i)),o=Math.min(1e4,a(n+i));if(!(ml&&pl&&fl&&wl))return function(e,t){const n=Math.max(0,Math.min(100,e-t)),i=Math.min(100,Math.max(0,e+t));let a=xl(),r=Number.POSITIVE_INFINITY;const o=50;for(let e=0;e<o;e++){const e=xl(),t=Il(e);if(t>=n&&t<=i)return e;const o=Dl(t,n,i);o<r&&(r=o,a=e)}return a}(n,i);const s=pl,l=fl,d=wl,u=e=>s*l(e)/d,c=u(r),h=u(o);if(h<=c)return Cl(c);const m=c+function(e){if(!fl||null===gl||null===yl||null===vl||null===bl)throw new Error("BigInt is not supported in this environment");const t=fl,n=vl,i=yl,a=bl,r=gl;if(e<n)throw new Error("n must be non-negative");if(e===n)return n;const o=new Uint8Array(16),s=e+i,l=r/s*s-i;let d=0;for(;d<10;){crypto.getRandomValues(o);let e=n;for(const n of o)e=e<<a|t(n);if(e<=l)return e%s;d++}try{crypto.getRandomValues(o);let i=n;for(const e of o)i=i<<a|t(e);const r=i%s;return Ze.warn("randomBigInt: reached max rejection attempts, using modulo fallback",{n:e.toString(),attempts:d}),r}catch(e){throw Ze.error("randomBigInt: failed to generate random values",e),new Error("randomBigInt: unable to generate random value")}}(h-c);return Cl(m)}function Il(e){const t=function(e){const t=e.replace(/-/g,"").toLowerCase();if(!/^[0-9a-f]{32}$/.test(t))throw new Error(`Invalid UUID format: ${e}`);let n=0;for(let e=t.length-1;e>=0;e--){n=(n+parseInt(t[e],kl))*Sl}return n}(e);return 100*t}function Dl(e,t,n){return e<t?t-e:e>n?e-n:0}const Rl=e=>{try{return Boolean(new URL(e))}catch{return!1}},Nl=(e,t,n)=>e?e.flatMap((e=>{let i;if(i="string"==typeof n?e.segments.filter((e=>e.form_factors.some((e=>e.form_factor===n)))):e.segments,0===i.length)return[];const a=((e,t)=>{const n=[...e].sort(((e,t)=>e.split-t.split));for(const e of n)if(t<=e.split)return e;return n[n.length-1]})(i,t);return{form_factors:a.form_factors,paywall:a.paywall,flow:a.flow,segment:a.segment,split:a.split,conversion_event_type:a.conversion_event_type,conversion_event_url:a.conversion_event_url,rule:e.rule,name:e.name,type:e.type,value:e.value,external_segment:e.external_segment}})):[],Wl=()=>{const e=ca.getCampaignRules(q)??[],t=ca.getCampaignRules(ie)??[],n=El(),i=et([...e,...t]).filter((e=>e.form_factors?.some((e=>e.form_factor===n))));return ua(i,"rule")},Fl=e=>{const t=ca.getCampaignRules(e)??[],n=El();return et(t).filter((e=>e.form_factors?.some((e=>e.form_factor===n))))},Ol=()=>Fl(ie),$l=()=>Fl(q),jl=(t,n,i,a)=>{const r=t().find((t=>a?t.type==a&&t.value==i:t.type==e.NamiCampaignRuleType.DEFAULT));if(!r)return{};const o=n().find((e=>r?.paywall===e.id));return{campaign:r,paywall:o}},zl=(e,t)=>{const n=jl($l,il,e,t);if(n.campaign&&n.paywall)return{campaign:n.campaign,paywall:n.paywall};const i=jl(Ol,nl,e,t);return i.campaign&&i.paywall?{campaign:i.campaign,paywall:i.paywall}:n.campaign||n.paywall?{campaign:n.campaign,paywall:n.paywall}:{campaign:i.campaign,paywall:i.paywall}};var Hl,Bl="object"==typeof Reflect?Reflect:null,Ul=Bl&&"function"==typeof Bl.apply?Bl.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};Hl=Bl&&"function"==typeof Bl.ownKeys?Bl.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Gl=Number.isNaN||function(e){return e!=e};function Vl(){Vl.init.call(this)}Vl.EventEmitter=Vl,Vl.prototype._events=void 0,Vl.prototype._eventsCount=0,Vl.prototype._maxListeners=void 0;var Xl=10;function Kl(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Yl(e){return void 0===e._maxListeners?Vl.defaultMaxListeners:e._maxListeners}function ql(e,t,n,i){var a,r,o,s;if(Kl(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]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(a=Yl(e))>0&&o.length>a&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function Jl(){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 Ql(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=Jl.bind(i);return a.listener=n,i.wrapFn=a,a}function Zl(e,t,n){var i=e._events;if(void 0===i)return[];var a=i[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]: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}(a):td(a,a.length)}function ed(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 td(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(Vl,"defaultMaxListeners",{enumerable:!0,get:function(){return Xl},set:function(e){if("number"!=typeof e||e<0||Gl(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Xl=e}}),Vl.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},Vl.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Gl(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},Vl.prototype.getMaxListeners=function(){return Yl(this)},Vl.prototype.emit=function(e){var t=[];for(let e=1;e<arguments.length;e++)t.push(arguments[e]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var r=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw r.context=a,r}var o=i[e];if(void 0===o)return!1;if("function"==typeof o)Ul(o,this,t);else{var s=o.length,l=td(o,s);for(let e=0;e<s;++e)Ul(l[e],this,t)}return!0},Vl.prototype.addListener=function(e,t){return ql(this,e,t,!1)},Vl.prototype.on=Vl.prototype.addListener,Vl.prototype.prependListener=function(e,t){return ql(this,e,t,!0)},Vl.prototype.once=function(e,t){return Kl(t),this.on(e,Ql(this,e,t)),this},Vl.prototype.prependOnceListener=function(e,t){return Kl(t),this.prependListener(e,Ql(this,e,t)),this},Vl.prototype.removeListener=function(e,t){var n,i,a,r,o;if(Kl(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){o=n[r].listener,a=r;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},Vl.prototype.off=Vl.prototype.removeListener,Vl.prototype.removeAllListeners=function(e){var t,n,i;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 a,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(a=r[i])&&this.removeAllListeners(a);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(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},Vl.prototype.listeners=function(e){return Zl(this,e,!0)},Vl.prototype.rawListeners=function(e){return Zl(this,e,!1)},Vl.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):ed.call(e,t)},Vl.prototype.listenerCount=ed,Vl.prototype.eventNames=function(){return this._eventsCount>0?Hl(this._events):[]};class nd{constructor(){this.emitter=new Vl}static getInstance(){return this.instance||(this.instance=new nd),this.instance}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}emit(e,...t){this.emitter.emit(e,...t)}addListener(e,t){this.emitter.addListener(e,t)}removeListener(e,t){this.emitter.removeListener(e,t)}removeAllListeners(e){e?this.emitter.removeAllListeners(e):this.emitter.removeAllListeners()}listeners(e){return this.emitter.listeners(e)}listenerCount(e){return this.emitter.listenerCount(e)}}class id{constructor(){this.disableCampaignUpdates=!1,this.currentFormFactor=El()}configure(e,t,n=[]){this.currentFormFactor=e,this.splitPosition=t,this.disableCampaignUpdates=n.includes("disableCampaignUpdates")}async fetchCampaignRules(e){const t=ca.getDevice();let n;return this.disableCampaignUpdates?(Ze.info("Campaign updates disabled by configuration. Skipping fetch."),[]):(n=t?.id?await this.getCampaigns(t.id):await this.getAnonymousCampaigns(),n=n?.filter((e=>e.paywall&&e.form_factors.some((e=>e.form_factor===this.currentFormFactor))||e.flow&&e.flow?.object?.form_factors?.some((e=>e.form_factor===this.currentFormFactor)))),n=n?.filter((t=>{if(t.paywall){const n=e.find((e=>e.id==t.paywall));if(n)return t}else if(t.flow)return t})),ca.setCampaignRules(q,n),ca.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),n)}invokeAvailableCampaignsResponseHandler(){const e=nd.getInstance().listeners(He),t=Wl();e.forEach((e=>e(t)))}async getAnonymousCampaigns(e=C){const t=`campaign_rules/?sdk_version=${e}`;try{const e=await Zs.instance.fetchAPI(t);return Nl(e.results??[],this.splitPosition,this.currentFormFactor)}catch(e){const n=this.fallbackData();if(!n)throw Ze.error(Aa(e.status,t)),e;return n.results}}async getCampaigns(e){const t=`device/${e}/campaign_rules/`;let n;try{n=await Zs.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw Ze.error(Aa(e.status,t)),e}return n?.results||[]}fallbackData(){const e=ca.getCampaignRules(q)||ca.getCampaignRules(ie);return e?{count:e.length,results:e}:null}}function ad(e,t){return Ei(e,t)}id.instance=new id;class rd{createOrUpdateDevice(e,t,n){const i=ca.getDevice();if(!i?.id){const i={...e,id:t??this.getAnonymousUUID()??xl()};return{id:i.id,device:this.createDevice(i,n)}}return this.isEqualDevices(i,e)?{id:i.id,device:Promise.resolve(i)}:(this.updateDevice(i.id,e),{id:i.id,device:null})}async createDevice(e,t){try{const n=0,i=await this.requestAPIData("device/",e,void 0,void 0,n);return i?(ca.setDevice(i),i):(Ze.info("Device creation returned null, switching to anon mode for this session"),t?.setInMemoryAnonymousMode(!0),null)}catch(e){if(console.error("Error creating device:",e),e instanceof ha)return Ze.info("Retry limit exceeded, switching to anon mode for this session"),t?.setInMemoryAnonymousMode(!0),null;throw e}}async updateDevice(e,t){const n=await this.requestAPIData(`device/${e}/`,t,"PUT");return n&&ca.setDevice(n),n}async updateDeviceField(e,t){const n={[e]:t},i=ca.getDevice();if(!i?.id)throw new va;const a=await this.requestAPIData(`device/${i.id}/`,n,"PATCH");return a&&ca.setDevice(a),a}async requestAPIData(e,t,n="POST",i=De,a){let r;try{r=await Zs.instance.requestBodyAPI(e,t,n,!1,i,a)}catch(t){if(t instanceof ga)throw t;if("device/"===e&&t instanceof ha)throw t;if(r=ca.getDevice(),!r)return Ze.error(Aa(t.status,e)),null}return r}isEqualDevices(e,t){const n={...e,...t},i=Object.keys(e).reduce(((e,t)=>(e[t]=n[t],e)),{});return ad(i,e)}getOrCreateAnonymousUUID(){let e=ca.getAnonymousUUID();return e||(e=xl(),ca.setAnonymousUUID(e)),e}getAnonymousUUID(){const e=ca.getAnonymousUUID();return e?(ca.clearAnonymousUUID(),e):null}}rd.instance=new rd;class od{async fetchProducts(){if(Xs(A.THIRD_PARTY_TRANSACTIONS))return[];let e;try{e=await Zs.instance.fetchAPI("products/")}catch(t){if(e=this.fallbackData(),!e)throw Ze.error(Aa(t.status,"products/")),t}return e?.results&&ca.setProducts(Z,e.results),e?.results||[]}fallbackData(){const e=ca.getProducts(Z)||ca.getProducts(re);return e?{count:e.length,results:e}:null}}od.instance=new od;class sd{async fetchPaywalls(){const e=ca.getDevice();let t;return t=e?.id?await this.getPaywalls(e.id):await this.getAnonymousPaywalls(),t&&ca.setPaywalls(J,t),t}async getAnonymousPaywalls(e=C){const t=`paywalls/?sdk_version=${e}`;let n=null;try{n=await Zs.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw Ze.error(Aa(e.status,t)),e}return n?.results||[]}async getPaywalls(e){const t=`device/${e}/paywalls/`;let n;try{n=await Zs.instance.fetchAPI(t)}catch(e){if(n=this.fallbackData(),!n)throw Ze.error(Aa(e.status,t)),e}return n?.results||[]}fallbackData(){const e=ca.getPaywalls(J)||ca.getPaywalls(ae);return e?{count:e.length,results:e}:null}}sd.instance=new sd;class ld{async fetchConfig(){let e;try{e=await Zs.instance.fetchAPI("config/")}catch(t){if(e=ca.getAppConfig(Y)||ca.getAppConfig(ne),!e)throw Ze.error(Aa(t.status,"config/")),t}return e&&ca.setAppConfig(Y,e),e}}ld.instance=new ld;let dd=null;function ud(){return!!ca.getAnonymousMode()||!!dd&&dd.isInMemoryAnonymousMode()}class cd{async startSession(){if(ud())Ze.debug("Skipping session start call - anonymous mode");else try{await Zs.instance.startSession(new Date)}catch(e){Ze.error("error on start session: ",e)}}}cd.instance=new cd;const hd={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"}},md="en";function fd(e){const t=function(e){if(!e)return md;const t=e.trim();if(hd[t])return t;const n=t.toLowerCase(),i=n.split("-")[0];return hd[i]?i:"zh"===i?n.includes("tw")||n.includes("hk")?"zh-TW":"zh-CN":md}(ca.getLanguageCode()),n=hd[t]??hd[md];return n?.[e]??e}const pd=e=>"subscription"===e;function gd(e){if(pd(e?.product_type)){const t=yd(e);if(t.length>0)return t[0].billingPeriod}return null}function vd(e){const t=function(e){if(!e)return[];const t=e.offers.filter((e=>"promo"===e.offer_type));return bd(t,e.subscription_period)}(e).find((e=>0===e.priceAmountMicros));return t?.billingPeriod||null}function yd(e){if(!e)return[];return bd(e.offers.filter((e=>"default"===e.offer_type)),e.subscription_period)}function bd(e,t){return e.map((e=>wd(e,t)))}function wd(e,t){if(!e)return{};const n=e.promo_period?.count??t?.count,i=e.promo_period?.type??t?.type,a=e.promo_price?.price??e.price,r=e.promo_price?.currency??e.currency;return{priceAmountMicros:1e6*a,priceCurrencyCode:r,billingPeriod:i?`P${n}${i[0].toUpperCase()}`:"",formattedPrice:_d(r).format(a)}}function kd(e,t=!1,n=!1,i=!1,a=!1){if(!e)return null;const r=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!r)return null;const[o,s,l,d]=r.slice(1).map((e=>parseInt(e))),u=(e,t,n,i,r)=>{const o=(e=>a?`${e}_abbrev`:e)(r),s=(e=>a?`${e}_abbrev_plural`:`${e}_plural`)(r);let l=fd(o),d=fd(s);return a||l!==o||(l=fd(`${r}_abbrev`)),a||d!==s||(d=fd(`${r}_abbrev_plural`)),i?e.toString():n?1===e||t?l:d:1===e||t?`${e} ${l}`:`${e} ${d}`};switch(e.at(-1)){case"D":return u(d,t,n,i,"nami_day");case"W":return u(l,t,n,i,"nami_week");case"M":return u(s,t,n,i,"nami_month");case"Y":return u(o,t,n,i,"nami_year")}return null}function Sd(e){if(!e||e.length<2)return!1;const t=e.at(-1)?.toUpperCase();return"M"===t||"Y"===t}function _d(e){const t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:e})}catch{return new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:"USD"})}}const Md=(e,t,n)=>e&&t&&n?n.format(e-t):null,Ed=(e,t,n,i)=>{if(e&&t&&n&&i){const a=100*(1-e/(n/i*t));return`${Math.round(a)}%`}return null},Pd=(e,t)=>{if(""==t)return;const n=parseInt(t)-1;return n>=0&&n<e?.length?e[n]:e?.find((e=>e.sku_ref_id===t))},Td=e=>Ad(e.priceAmountMicros)/xd(e.billingPeriod),xd=e=>{let t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Ad=e=>e/1e6;function Cd(e){return parseFloat((Math.round(e)/100).toFixed(2))}const Ld=(e,t,n=[])=>({price:()=>Rd(e),name:()=>e?.name,title:()=>e?.name,description:()=>e?.description,duration:()=>Nd(e),durationSingular:()=>Nd(e,!0),period:()=>Nd(e,!1,!0),periodNumber:()=>Nd(e,!1,!1,!0),freeTrialDuration:()=>Wd(e),freeTrialDurationSingular:()=>Wd(e,!0),freeTrialPeriod:()=>Wd(e,!1,!0),freeTrialPeriodNumber:()=>Wd(e,!1,!1,!0),pricePerMonth:()=>Fd(e),pricePerMonthRounded:()=>Fd(e,!0),periodInMonths:()=>Od(e),durationInMonths:()=>$d(e),durationInMonthsSingular:()=>$d(e,!0),periodNumberInMonths:()=>jd(e),percentagePriceDifferenceFromSku:()=>zd(e,t,n),priceDifferenceFromSku:()=>Hd(e,t,n),promoEligible:()=>null===Bd(e)&&null!==Ud(e,t),freeTrialEligible:()=>null!==Bd(e),promo:()=>Ud(e,t)?.offer_ref_id,promoCode:()=>"XXXXX",promoPrice:()=>Gd(e,t)?.formattedPrice,promoPeriod:()=>Vd(e,t,!1,!0),promoPeriodNumber:()=>Vd(e,t,!1,!1,!0),promoDuration:()=>Vd(e,t),promoDurationSingular:()=>Vd(e,t,!0),introEligible:()=>!1,pricePerDay:()=>Xd(e),pricePerWeek:()=>Kd(e),pricePerWeekRounded:()=>Kd(e,!0),introductoryPrice:()=>Yd(e,t),introductoryPeriod:()=>qd(e,t,!1,!0),introductoryPeriodNumber:()=>qd(e,t,!1,!1,!0),introductoryDuration:()=>qd(e,t),introductoryDurationSingular:()=>qd(e,t,!0),introductoryPricePerMonth:()=>Jd(e,t),introductoryPricePerMonthRounded:()=>Jd(e,t,!0),durationAbbrev:()=>Nd(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>Wd(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>qd(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>Vd(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>Vd(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>$d(e,!1,!1,!1,!0),durationSingularAbbrev:()=>Nd(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>Wd(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>qd(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>Vd(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>Vd(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>$d(e,!0,!1,!1,!0),periodAbbrev:()=>Nd(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>Wd(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>qd(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>Vd(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>Vd(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>$d(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;const t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;const[,n,i,a,r]=t,o=void 0!==n?parseInt(n,10):0,s=void 0!==i?parseInt(i,10):0,l=void 0!==a?parseInt(a,10):0;return(void 0!==r?parseInt(r,10):0)>0?null:l>0?1===l?fd("nami_weekly"):2===l?fd("nami_biweekly"):null:s>0?fd(1===s?"nami_monthly":2===s?"nami_bimonthly":3===s?"nami_quarterly":6===s?"nami_biannually":12===s?"nami_yearly":"nami_monthly"):o>0?fd("nami_yearly"):null}(gd(e)),iso_subscription_duration:()=>Zd(e),invalid:()=>!1,unavailable:()=>!1}),Id=()=>Object.keys(Ld({})),Dd=(e,t,n,i=[])=>{if(!t)return null;const a=Ld(t,n,i);return a[e]?a[e]():null},Rd=e=>{const t=yd(e);return t&&t.length?t[0].formattedPrice:null},Nd=(e,t,n,i,a)=>kd(gd(e),t,n,i,a),Wd=(e,t,n,i,a)=>kd(vd(e),t,n,i,a),Fd=(e,t)=>{const n=yd(e);if(!n||0===n.length)return null;const i=Td(n[0]);return i?_d(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},Od=(e,t)=>{const n=yd(e);if(!n||0===n.length)return null;const i=n[0].billingPeriod;if(!Sd(i))return null;return kd("P1Y"===i?"P12M":i,!1,!1,!1,t)},$d=(e,t,n,i,a)=>{const r=yd(e);if(!r||0===r.length)return null;const o=r[0].billingPeriod;if(!Sd(o))return null;return kd("P1Y"===o?"P12M":o,t,n,i,a)},jd=e=>{if(!e)return 0;const t=yd(e);return t&&t.length?xd(t[0].billingPeriod):0},zd=(e,t,n=[])=>{const i=yd(e);if(!i||0===i.length)return null;const a=Pd(n,t??"")?.product_details;if(!t||!a)return Ed(Cd(i[0].priceAmountMicros),jd(e));const r=yd(a);return Ed(Cd(i[0].priceAmountMicros),jd(e),r?.length>0?Cd(r[0].priceAmountMicros):0,jd(a))},Hd=(e,t,n=[])=>{const i=yd(e);if(!i||0===i.length)return null;const a=Pd(n,t??"")?.product_details;if(!t||!a)return Md(Td(i[0]));const r=yd(a);return Md(Td(i[0]),Td(r[0]),_d(r[0].priceCurrencyCode))},Bd=e=>vd(e),Ud=(e,t)=>{if(!e)return null;const n=e.offers.filter((e=>"promo"===e.offer_type));if(!t)return n[0]||null;const i=n[parseInt(t)];return i?i||null:n.find((e=>e.offer_ref_id===t))||null},Gd=(e,t)=>{if(!e)return null;return wd(Ud(e,t),e.subscription_period)},Vd=(e,t,n,i,a,r)=>{const o=Gd(e,t);return kd(o?.billingPeriod||null,n,i,a,r)},Xd=(e,t)=>{const n=yd(e);if(!n||0===n.length)return null;const i=Ad(n[0].priceAmountMicros)/(e=>{const t=xd(e);return t?30.437*t:1})(n[0].billingPeriod);return i?_d(n[0].priceCurrencyCode).format(i):null},Kd=(e,t)=>{const n=yd(e);if(!n||0===n.length)return null;const i=Ad(n[0].priceAmountMicros)/(e=>{const t=xd(e);return t?52*t/12:1})(n[0].billingPeriod);return i?_d(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},Yd=(e,t)=>{const n=Qd(e,t);return n?.formattedPrice||null},qd=(e,t,n,i,a,r)=>{const o=Qd(e,t);return kd(o?.billingPeriod||null,n,i,a,r)},Jd=(e,t,n)=>{const i=Qd(e,t);if(!i)return;const a=Ad(i.priceAmountMicros),r=xd(i.billingPeriod),o=n?Math.round(a/r):a/r;return _d(i.priceCurrencyCode).format(o)},Qd=(e,t)=>{if(!e)return null;let n;return t?(n=e.offers[parseInt(t)],n||(n=e.offers.find((e=>e.offer_ref_id===t))||null)):n=e.offers[0],wd(n,e.subscription_period)},Zd=e=>{const t=gd(e);return t?"P7D"===t?"P1W":t:null};function eu(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:function(e,t,n){var i=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(a);++i<a;)r[i]=e[i+t];return r}(e,t,n)}var tu=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function nu(e){return tu.test(e)}var iu="\\ud800-\\udfff",au="["+iu+"]",ru="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ou="\\ud83c[\\udffb-\\udfff]",su="[^"+iu+"]",lu="(?:\\ud83c[\\udde6-\\uddff]){2}",du="[\\ud800-\\udbff][\\udc00-\\udfff]",uu="(?:"+ru+"|"+ou+")"+"?",cu="[\\ufe0e\\ufe0f]?",hu=cu+uu+("(?:\\u200d(?:"+[su,lu,du].join("|")+")"+cu+uu+")*"),mu="(?:"+[su+ru+"?",ru,lu,du,au].join("|")+")",fu=RegExp(ou+"(?="+ou+")|"+mu+hu,"g");function pu(e){return nu(e)?function(e){return e.match(fu)||[]}(e):function(e){return e.split("")}(e)}var gu,vu=(gu="toUpperCase",function(e){var t=nu(e=Ki(e))?pu(e):void 0,n=t?t[0]:e.charAt(0),i=t?eu(t,1).join(""):e.slice(1);return n[gu]()+i});var yu,bu=(yu={"À":"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==yu?void 0:yu[e]}),wu=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ku=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Su=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var _u=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Mu="\\ud800-\\udfff",Eu="\\u2700-\\u27bf",Pu="a-z\\xdf-\\xf6\\xf8-\\xff",Tu="A-Z\\xc0-\\xd6\\xd8-\\xde",xu="\\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",Au="["+xu+"]",Cu="\\d+",Lu="["+Eu+"]",Iu="["+Pu+"]",Du="[^"+Mu+xu+Cu+Eu+Pu+Tu+"]",Ru="(?:\\ud83c[\\udde6-\\uddff]){2}",Nu="[\\ud800-\\udbff][\\udc00-\\udfff]",Wu="["+Tu+"]",Fu="(?:"+Iu+"|"+Du+")",Ou="(?:"+Wu+"|"+Du+")",$u="(?:['’](?:d|ll|m|re|s|t|ve))?",ju="(?:['’](?:D|LL|M|RE|S|T|VE))?",zu="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Hu="[\\ufe0e\\ufe0f]?",Bu=Hu+zu+("(?:\\u200d(?:"+["[^"+Mu+"]",Ru,Nu].join("|")+")"+Hu+zu+")*"),Uu="(?:"+[Lu,Ru,Nu].join("|")+")"+Bu,Gu=RegExp([Wu+"?"+Iu+"+"+$u+"(?="+[Au,Wu,"$"].join("|")+")",Ou+"+"+ju+"(?="+[Au,Wu+Fu,"$"].join("|")+")",Wu+"?"+Fu+"+"+$u,Wu+"+"+ju,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cu,Uu].join("|"),"g");function Vu(e,t,n){return e=Ki(e),void 0===t?function(e){return _u.test(e)}(e)?function(e){return e.match(Gu)||[]}(e):function(e){return e.match(Su)||[]}(e):e.match(t)||[]}var Xu=RegExp("['’]","g");var Ku,Yu=(Ku=function(e,t,n){return t=t.toLowerCase(),e+(n?vu(Ki(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var i=-1,a=null==e?0:e.length;++i<a;)n=t(n,e[i],i,e);return n}(Vu(function(e){return(e=Ki(e))&&e.replace(wu,bu).replace(ku,"")}(e).replace(Xu,"")),Ku,"")});function qu(e,t,n,i){const a=n.flatMap((e=>e.products)).find((e=>e.id===t.selectedProducts[t.currentGroupId]));return Qu(ic(e,a?.sku_ref_id),a,i)}function Ju(e,t,n){const i=t.find((e=>e.id===n))?.products??[];return i.forEach((t=>{t.product_details=ic(e,t.sku_ref_id||""),t.variables=Qu(t.product_details,t,i)})),i}function Qu(e,t,n){if(!t)return{};const i=t.variables;if(!i)return{...t};Object.keys(i).forEach((t=>{if(Zu(i[t])){const a=tc(i[t],e,n);i[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(a)}}));const a={};return Id().forEach((t=>{if(void 0===i[t]){const i=Dd(t,e,void 0,n);null!==i&&(a[t]=i)}})),{...t,...a,...i}}function Zu(e){return"string"==typeof e&&e.includes(Ye)}function ec(e,t,n){return t?(Object.keys(t).forEach((i=>{Zu(t[i])&&(t[i]=t[Yu(i)]=tc(t[i],e,n))})),{...t}):{}}const tc=(e,t,n)=>e.replace(Ve,((i,a)=>{const r=Ve.exec(e)?.slice(1)||[];a=r[0]??a;const o=r[1]?.replace(":","")??"";return Dd(a,t,o,n)}));function nc(e,t){return t.flatMap((e=>e.products)).some((t=>1==Dd("freeTrialEligible",ic(e,t.sku_ref_id))))}function ic(e=[],t=""){return e.find((e=>e.product_ref_id===t))||null}var ac=function(){try{var e=Wt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function rc(e,t,n){"__proto__"==t&&ac?ac(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var oc=Object.prototype.hasOwnProperty;function sc(e,t,n){var i=e[t];oc.call(e,t)&&tt(i,n)&&(void 0!==n||t in e)||rc(e,t,n)}function lc(e,t,n,i){var a=!n;n||(n={});for(var r=-1,o=t.length;++r<o;){var s=t[r],l=void 0;void 0===l&&(l=e[s]),a?rc(n,s,l):sc(n,s,l)}return n}var dc=Object.prototype.hasOwnProperty;function uc(e){if(!yt(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Yn(e),n=[];for(var i in e)("constructor"!=i||!t&&dc.call(e,i))&&n.push(i);return n}function cc(e){return Zn(e)?Xn(e,!0):uc(e)}var hc="object"==typeof e&&e&&!e.nodeType&&e,mc=hc&&"object"==typeof module&&module&&!module.nodeType&&module,fc=mc&&mc.exports===hc?st.Buffer:void 0,pc=fc?fc.allocUnsafe:void 0;var gc=qn(Object.getPrototypeOf,Object),vc=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)gn(t,Sn(e)),e=gc(e);return t}:bn;function yc(e){return yn(e,cc,vc)}var bc=Object.prototype.hasOwnProperty;function wc(e){var t=new e.constructor(e.byteLength);return new Jt(t).set(new Jt(e)),t}var kc=/\w*$/;var Sc=lt?lt.prototype:void 0,_c=Sc?Sc.valueOf:void 0;var Mc="[object Boolean]",Ec="[object Date]",Pc="[object Map]",Tc="[object Number]",xc="[object RegExp]",Ac="[object Set]",Cc="[object String]",Lc="[object Symbol]",Ic="[object ArrayBuffer]",Dc="[object DataView]",Rc="[object Float32Array]",Nc="[object Float64Array]",Wc="[object Int8Array]",Fc="[object Int16Array]",Oc="[object Int32Array]",$c="[object Uint8Array]",jc="[object Uint8ClampedArray]",zc="[object Uint16Array]",Hc="[object Uint32Array]";function Bc(e,t,n){var i,a=e.constructor;switch(t){case Ic:return wc(e);case Mc:case Ec:return new a(+e);case Dc:return function(e,t){var n=t?wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case Rc:case Nc:case Wc:case Fc:case Oc:case $c:case jc:case zc:case Hc:return function(e,t){var n=t?wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case Pc:return new a;case Tc:case Cc:return new a(e);case xc:return function(e){var t=new e.constructor(e.source,kc.exec(e));return t.lastIndex=e.lastIndex,t}(e);case Ac:return new a;case Lc:return i=e,_c?Object(_c.call(i)):{}}}var Uc=Object.create,Gc=function(){function e(){}return function(t){if(!yt(t))return{};if(Uc)return Uc(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Vc=Bn&&Bn.isMap,Xc=Vc?$n(Vc):function(e){return _n(e)&&"[object Map]"==yi(e)};var Kc=Bn&&Bn.isSet,Yc=Kc?$n(Kc):function(e){return _n(e)&&"[object Set]"==yi(e)},qc=1,Jc=2,Qc=4,Zc="[object Arguments]",eh="[object Function]",th="[object GeneratorFunction]",nh="[object Object]",ih={};function ah(e,t,n,i,a,r){var o,s=t&qc,l=t&Jc,d=t&Qc;if(void 0!==o)return o;if(!yt(e))return e;var u=vn(e);if(u){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&bc.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}(e,o)}else{var c=yi(e),h=c==eh||c==th;if(In(e))return function(e,t){if(t)return e.slice();var n=e.length,i=pc?pc(n):new e.constructor(n);return e.copy(i),i}(e,s);if(c==nh||c==Zc||h&&!a){if(o=l||h?{}:function(e){return"function"!=typeof e.constructor||Yn(e)?{}:Gc(gc(e))}(e),!s)return l?function(e,t){return lc(e,vc(e),t)}(e,function(e,t){return e&&lc(t,cc(t),e)}(o,e)):function(e,t){return lc(e,Sn(e),t)}(e,function(e,t){return e&&lc(t,ei(t),e)}(o,e))}else{if(!ih[c])return a?e:{};o=Bc(e,c,s)}}r||(r=new Ut);var m=r.get(e);if(m)return m;r.set(e,o),Yc(e)?e.forEach((function(i){o.add(ah(i,t,n,i,e,r))})):Xc(e)&&e.forEach((function(i,a){o.set(a,ah(i,t,n,a,e,r))}));var f=u?void 0:(d?l?yc:ti:l?cc:ei)(e);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););}(f||e,(function(i,a){f&&(i=e[a=i]),sc(o,a,ah(i,t,n,a,e,r))})),o}ih[Zc]=ih["[object Array]"]=ih["[object ArrayBuffer]"]=ih["[object DataView]"]=ih["[object Boolean]"]=ih["[object Date]"]=ih["[object Float32Array]"]=ih["[object Float64Array]"]=ih["[object Int8Array]"]=ih["[object Int16Array]"]=ih["[object Int32Array]"]=ih["[object Map]"]=ih["[object Number]"]=ih[nh]=ih["[object RegExp]"]=ih["[object Set]"]=ih["[object String]"]=ih["[object Symbol]"]=ih["[object Uint8Array]"]=ih["[object Uint8ClampedArray]"]=ih["[object Uint16Array]"]=ih["[object Uint32Array]"]=!0,ih["[object Error]"]=ih[eh]=ih["[object WeakMap]"]=!1;const rh=(e,t,n)=>{const i=Object.getOwnPropertyDescriptor(e,t);if(!i||i.configurable)try{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n,writable:!1})}catch{try{e[t]=n}catch{}}};class oh{constructor(){this.listeners=new Map}addEventListener(e,t,n){if(!t)return;const i=(e=>"boolean"==typeof e?{capture:e}:e??{})(n),a=this.listeners.get(e)??[];if(a.some((e=>e.listener===t)))return;const r={listener:t,once:Boolean(i.once)};if(i.signal){if(i.signal.aborted)return;r.signal=i.signal,r.abortHandler=()=>this.removeEventListener(e,t),i.signal.addEventListener("abort",r.abortHandler,{once:!0})}a.push(r),this.listeners.set(e,a)}removeEventListener(e,t){if(!t)return;const n=this.listeners.get(e);if(n&&0!==n.length){for(let e=n.length-1;e>=0;e-=1){const i=n[e];i.listener===t&&(i.signal&&i.abortHandler&&i.signal.removeEventListener("abort",i.abortHandler),n.splice(e,1))}0===n.length&&this.listeners.delete(e)}}dispatchEvent(e){if(!e||"string"!=typeof e.type)throw new TypeError('Failed to execute "dispatchEvent": event type must be a string.');const t=this.listeners.get(e.type);if(!t||0===t.length)return!0;rh(e,"target",this);let n=!1;const i=e.stopImmediatePropagation?.bind(e),a=e.stopPropagation?.bind(e),r=()=>{n=!0,i?.()},o=()=>{e.cancelBubble=!0,a?.()};e.stopImmediatePropagation=r,e.stopPropagation=o;const s=t.slice();for(const t of s){if(n)break;rh(e,"currentTarget",this),"function"==typeof t.listener?t.listener.call(this,e):"object"==typeof(l=t.listener)&&null!==l&&"handleEvent"in l&&t.listener.handleEvent.call(t.listener,e),t.once&&this.removeEventListener(e.type,t.listener)}var l;if(i)e.stopImmediatePropagation=i;else try{delete e.stopImmediatePropagation}catch{e.stopImmediatePropagation=r}if(a)e.stopPropagation=a;else try{delete e.stopPropagation}catch{e.stopPropagation=o}return rh(e,"currentTarget",null),!e.defaultPrevented}}let sh=[];const lh={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};class dh extends oh{static create(e,t,n){const i=new dh(e,t,n);return this.providers.push(i),i}static remove(e){this.providers=this.providers.filter((t=>t!==e))}static get currentProvider(){return dh.providers[0]}static setCustomerAttribute(e){this.providers.forEach((t=>{t.setCustomerAttribute(e)}))}static removeCustomerAttribute(e){this.providers.forEach((t=>{t.removeCustomerAttribute(e)}))}static setAppSuppliedVideoDetails(e){this.providers.forEach((t=>{t.setAppSuppliedVideoDetails(e)}))}static getSelectedPaywall(){return this.providers[0]?.getSelectedPaywall()}static setUserInteractionEnabled(e){this.providers.forEach((t=>{t.setUserInteractionEnabled(e)}))}static setUserTags(e){this.providers.forEach((t=>{t.setUserTags(e)}))}static setProductDetails(e){this.providers.forEach((t=>{t.setProductDetails(e)})),sh=e}static setPurchaseInProgress(e){this.providers.forEach((t=>{t.setPurchaseInProgress(e)}))}static setIsLoggedIn(e){this.providers.forEach((t=>{t.setIsLoggedIn(e)}))}static setPurchase(e,t){this.providers.forEach((n=>{n.setPurchase(e,t)}))}static getSelectedSlideIndex(){return this.providers[0]?.state.currentSlideIndex}constructor(e,t,n){super(),this.host=null,this.subscribers=new Set,this.productDetails=sh,this.filteredSkuMenus=[],this.state=ah(lh,5);const i=ca.getNamiProfile();this.state.isLoggedIn=!!i?.externalId,this.setPaywall(e,t,n),this.defineDynamicStateProps(),this.subscribers=new Set}subscribe(e){return this.subscribers.add(e),()=>this.unsubscribe(e)}unsubscribe(e){this.subscribers.delete(e)}emitEvent(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))}onEvent(e,t){const n=e=>t(e.detail);return this.addEventListener(e,n),()=>this.removeEventListener(e,n)}hostConnected(){}hostDisconnected(){this.subscribers.clear()}defineDynamicStateProps(){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})}setState(e){this.state=e,this.defineDynamicStateProps(),this.subscribers.forEach((e=>e())),this.host&&this.host.requestUpdate()}setProductDetails(e){this.productDetails=e}getProductDetails(){return this.productDetails}setCurrentGroupData(e,t){const n=qu(this.productDetails,this.state,this.filteredSkuMenus,Ju(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState({...this.state,currentGroupId:e,currentGroupName:t,sku:n})}setFormState(e,t){this.setState({...this.state,formStates:{...this.state.formStates,[e]:t}})}setTimerState(e,t,n,i){this.setState({...this.state,timerStates:{...this.state.timerStates,[e]:{remainingSeconds:t,savedAt:n,hasEmittedCompletion:i}}})}getTimerState(e){return this.state.timerStates[e]}getCurrentGroupId(){return this.state.currentGroupId}getCurrentGroupName(){return this.state.currentGroupName}setCurrentFormId(e,t){const n=this.state.formStates||{},i={...n,[e]:t||!n[e]};this.setState({...this.state,formStates:i})}getCurrentFormId(e){return this.state.formStates[e]}setSelectedProducts(e){const t=qu(this.productDetails,this.state,this.filteredSkuMenus,Ju(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState({...this.state,selectedProducts:e,sku:t})}selectedProducts(){return this.state.selectedProducts}setPaywall(e,t,n){let i={...this.state,formFactor:El(),selectedPaywall:e,selectedCampaign:n};const a=e.template?.initialState;i={...i,...a};const r=function(e,t,n=[]){const i=t.productGroups?.length?t.productGroups:n.map((e=>e.ref));return{customAttributes:t.customAttributes,productGroups:i,customObject:{...e.customObject,...t.customObject},currentGroup:t.currentGroup??""}}(i.launch,t,e.sku_menus);if(this.filteredSkuMenus=e.sku_menus??[],r.productGroups.length&&(this.filteredSkuMenus=this.filteredSkuMenus.filter((e=>r.productGroups.includes(e.ref)))),""!==r.currentGroup&&i.groups.length&&e.template?.displaySingleGroup&&(i.currentGroupId=i.groups.find((e=>e.ref==r.currentGroup))?.id??""),""===i.currentGroupId&&1===this.filteredSkuMenus.length){const e=i.groups.find((e=>e.ref==this.filteredSkuMenus[0].ref));i.currentGroupId=e?.id??i.currentGroupId}const o=Ju(this.productDetails,this.filteredSkuMenus,i.currentGroupId);i.skuItems=o,i.launch=r,i.anySkuHasTrialOffer=nc(this.productDetails,this.filteredSkuMenus),i.anySkuHasPromoOffer=function(e,t){return!nc(e,t)&&t.flatMap((e=>e.products)).some((t=>1==Dd("promoEligible",ic(e,t.sku_ref_id))))}(this.productDetails,this.filteredSkuMenus),i.paywallId=e.id,i.sku=qu(this.productDetails,i,this.filteredSkuMenus,o),this.setState(i)}getSelectedPaywall(){return this.state.selectedPaywall}getSelectedCampaign(){return this.state.selectedCampaign}getCurrentPlacementLabel(){return this.state.selectedCampaign?.value?this.state.selectedCampaign.value:this.flow?.campaign?.value?this.flow.campaign.value:void 0}getPaywallActionEventData(){const t=this.state.selectedCampaign,n=this.state.selectedPaywall;return{paywallId:n?.id??"",paywallName:n?.name??"",campaignId:t?.rule??"",campaignName:t?.name??"",campaignType:t?.type??"",campaignLabel:t?.value??"",campaignUrl:t?.type===e.NamiCampaignRuleType.URL?t?.value??"":"",segmentId:t?.segment??"",externalSegmentId:t?.external_segment??""}}paywallId(){return this.state.paywallId}setCurrentPage(e){this.setState({...this.state,currentPage:e})}setCustomerAttribute(e){this.setState({...this.state,customer:{...this.state.customer,...e}})}removeCustomerAttribute(e){delete this.state.customer[e],this.setState(this.state)}setIsLoggedIn(e){this.setState({...this.state,isLoggedIn:e})}setMediaList(e){this.setState({...this.state,mediaList:e.reduce(((e,t)=>({...e,[t.name]:t})))})}setSafeAreaTop(e){this.setState({...this.state,safeAreaTop:e})}setFullScreenPresentation(e){this.setState({...this.state,fullScreenPresentation:e})}setFormFactor(e){this.setState({...this.state,formFactor:e})}getFormFactor(){return this.state.formFactor}getTVQuality(){if("television"!==this.getFormFactor())return"";const e=window.devicePixelRatio||1,t=window.innerWidth||window.screen?.availWidth,n=window.innerHeight||window.screen?.availHeight;if(!t||!n)return"720p";const i=Math.max(t,n)*e,a=Math.min(t,n)*e;return i>=3840||a>=2160?"4K":i>=1920||a>=1080?"1080p":"720p"}getViewportWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}getViewportHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}setPurchaseInProgress(e){this.setState({...this.state,purchaseInProgress:e})}setPurchase(e,t){this.setState({...this.state,purchaseInProgress:e,productBeingPurchased:t})}setTimeSpentOnPaywall(e){this.setState({...this.state,timeSpentOnPaywall:e})}setAppSuppliedVideoDetails({url:e,name:t}){this.setState({...this.state,appSuppliedVideoUrl:e,appSuppliedVideoName:t})}resetAppSuppliedVideoDetails(){delete this.state.appSuppliedVideoUrl,delete this.state.appSuppliedVideoName,this.setState(this.state)}setLaunchDetails(e,t){this.setState({...this.state,launchValue:e,launchType:t})}setOpenHeaderIds(e,t){e=t?.skuId?`${e}_${t.skuId}`:e;const n=[...this.state.openHeaderIds],i=n.indexOf(e);-1!==i?n.splice(i,1):n.push(e),this.setState({...this.state,openHeaderIds:n,currentCollapsibleSku:t??null})}getCurrentCollapsibleSku(){return this.state.currentCollapsibleSku}setFlow(e){this.flow=e}setUserInteractionEnabled(e){this.setState({...this.state,userInteractionEnabled:e}),this.emitEvent("user-interaction-changed",{enabled:e})}setUserTags(e){this.setState({...this.state,userTags:{...this.state.userTags,...e}})}setCurrentSlideIndex(e){this.state.currentSlideIndex=e}}dh.providers=[];class uh{constructor(){this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}}}uh.instance=new uh;const ch=()=>ua(et([...ca.getNamiEntitlements(te),...ca.getNamiEntitlements(oe)]),"referenceId"),hh=()=>{nd.getInstance().emit(Ue,ch())};function mh(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}}class fh{constructor(){}async fetchActiveEntitlements(){let e=null;if(ud()||Xs(A.THIRD_PARTY_TRANSACTIONS)||!Xs(A.ENTITLEMENT_MANAGEMENT))ud()&&Ze.debug("Skipping active entitlements update - anonymous mode"),Xs(A.THIRD_PARTY_TRANSACTIONS)&&Ze.debug("Skipping active entitlements update - paywalls-only mode"),Xs(A.ENTITLEMENT_MANAGEMENT)||Ze.debug("Skipping active entitlements update - no entitlement_management capability");else{const t=ca.getDevice();if(t?.id){const n=await this.getAPIEntitlements(t.id);e=n?.results,e&&(ca.setActiveEntitlements(ee,e),this.invokeActiveEntitlementsHandler(e))}}return e}async getAPIEntitlements(e){const t=`device/${e}/active_entitlements/`;let n={};try{n=await Zs.instance.fetchAPI(t)}catch(e){throw Ze.error(Aa(e.status,t)),e}return n}invokeActiveEntitlementsHandler(e){if(Ys()){(e=>{ca.setNamiEntitlements(te,e);const t=ca.getNamiEntitlements(oe),n=new Set(e.map((e=>e.referenceId))),i=t.filter((e=>{const t=n.has(e.referenceId);return t&&Ze.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t}));i.length!==t.length&&ca.setNamiEntitlements(oe,i),hh()})(e.map((e=>(e=>{const t=e.entitlement_ref_id;return{name:e.name||"",desc:e.description||"",namiId:"",referenceId:t,relatedSkus:uh.instance.refIdToRelatedSKUs[t]||[],activePurchases:uh.instance.refIdToActivePurchases[t]||[],purchasedSkus:uh.instance.refIdToPurchasedSKUs[t]||[],expires:e.expires?new Date(e.expires).valueOf():0}})(e))))}}}fh.instance=new fh;class ph{async fetchCustomerJourneyState(){if(ud())return Ze.debug("Skipping customer journey state update - anonymous mode"),null;const e=ca.getDevice();if(!e?.id)return null;const t=`device/${e.id}/profile/`;let n=null;try{n=await Zs.instance.fetchAPI(t,void 0,0)}catch(e){throw Ze.error(Aa(e.status,t)),e}return n?(ca.setCustomerJourneyState(n.customer_journey_state),n.customer_journey_state):null}}ph.instance=new ph;class gh{constructor(){this.inMemoryAnonymousMode=!1,dd=this}setInMemoryAnonymousMode(e){this.inMemoryAnonymousMode=e,Ze.info(`In-memory anonymous mode ${e?"enabled":"disabled"} due to failed device registration`)}isInMemoryAnonymousMode(){return this.inMemoryAnonymousMode}isAnonymousMode(){return ca.getAnonymousMode()||this.inMemoryAnonymousMode}async init(e){this.setInitialValues(e),ld.instance.fetchConfig(),await this.initAndFetchRequiredData(e),cd.instance.startSession()}setInitialValues(e){const t={...e};delete t.initialConfig,ca.clearSessionId(),ca.setNamiConfig(t),ca.setLanguageCode(e.namiLanguageCode),ca.setPurchaseChannel(e.purchaseChannel);const n=e.initialConfig;if(n.appConfig||n.platform_config){const e=n?.appConfig||n?.platform_config;e&&ca.setAppConfig(ne,e)}n?.paywalls&&ca.setPaywalls(ae,n.paywalls),n?.products&&ca.setProducts(re,n.products)}initAnonymousDevice(){return{deviceId:rd.instance.getOrCreateAnonymousUUID(),deviceTask:null}}initIdentifiedDevice(e){const t={...Ml(e.namiCommands),...e.formFactor?{form_factor:e.formFactor}:{}},n=function(e){if(!e)return;const t=e.find((e=>e.startsWith("splitPosition=")));if(!t)return;const n=t.split("=")[1],i=Number(n);return n&&!isNaN(i)?Ll(i):void 0}(e.namiCommands),{id:i,device:a}=rd.instance.createOrUpdateDevice(t,n,this);return{deviceId:i,deviceTask:a}}async initAndFetchRequiredData(e,t=0,n=1){const i=e.initialConfig,a=e.formFactor??El(),r=this.isAnonymousMode(),{deviceId:o,deviceTask:s}=r?this.initAnonymousDevice():this.initIdentifiedDevice(e),l=Al(o);i.campaign_rules&&ca.setCampaignRules(ie,Nl(i.campaign_rules,l,a)),s&&await s,id.instance.configure(a,l,e.namiCommands),Ks();const d=Promise.all([od.instance.fetchProducts(),ph.instance.fetchCustomerJourneyState(),fh.instance.fetchActiveEntitlements(),sd.instance.fetchPaywalls().then((e=>id.instance.fetchCampaignRules(e)))]).catch((async i=>{if(i instanceof fa){if(ca.resetDevice(),t<n){const i=100*Math.pow(2,t);return await new Promise((e=>setTimeout(e,i))),this.initAndFetchRequiredData(e,t+1,n)}if(!r)return Ze.warn(`Max retries reached for ConflictError. ${i.message}`),this.setInMemoryAnonymousMode(!0),this.initAndFetchRequiredData(e,0,n)}throw i}));i.campaign_rules?.length&&i.paywalls?.length||await d,d.then((()=>this.reRenderPaywall()))}reRenderPaywall(){if("undefined"==typeof document)return;const e=document.querySelector("nami-paywall");e?.setPaywallData()}}function vh(e){return Array.isArray(e)?e.map(vh):e&&"object"==typeof e?Object.entries(e).reduce(((e,[t,n])=>(void 0!==n&&(e[t]=vh(n)),e)),{}):e}gh.instance=new gh;let yh=!0,bh=!1;function wh(){if("function"==typeof window.VIZIO?.Chromevox?.isEnabled)try{yh=window.VIZIO?.Chromevox?.isEnabled()}catch{}}function kh(){return"undefined"!=typeof window&&void 0!==window.VIZIO&&"function"==typeof window.VIZIO?.Chromevox?.play}function Sh(e){e.isTrusted&&wh()}function _h(e){e.isTrusted&&(yh=!1)}function Mh(e){if(e&&kh()&&yh)try{window.VIZIO?.Chromevox?.play(e)}catch{}}var Eh;class Ph{constructor(){Eh.set(this,!1),this.maxLogging=!1}get isInitialized(){return x(this,Eh,"f")||null!=ca.getNamiConfig()}static sdkVersion(){return C}static sdkPackageVersion(){return L}static async configure(e){if(!e.appPlatformID)throw new ga;return this.setInitialConfig(e),await Ph.instance.initializeSDK(e)}static setInitialConfig(e){if(null!=e.initialConfig){if("string"==typeof e.initialConfig){Ze.warn("[DEPRECATED] NamiConfiguration.initialConfig should be an object");const t=function(e){const t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return JSON.parse(t)}catch{return}}(e.initialConfig);if(!t)return Ze.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)){const t=qs(e.initialConfig.initial_config);t?e.initialConfig=t:(e.initialConfig={},Ze.error("Failed to parse NamiConfiguration.initialConfig as base64-gzipped JSON"))}}else e.initialConfig={}}async initializeSDK(e){let t=!1,n=!1;const i=x(this,Eh,"f")?ca.getNamiConfig():null;if(Ze.setLogger(e.logLevel),Ph.instance.maxLogging=e.maxLogging??!1,null!==i){const r={...e};if(delete r.initialConfig,a=i,ad(vh(r),vh(a)))return Ze.warn("Nami SDK is already configured, ignoring this configure call."),{sdkInitialized:!0,configureState:ze};n=!0;const o=Vs(e.namiCommands),s=Vs(i.namiCommands);e.appPlatformID==i.appPlatformID&&o==s||(t=!0),e.namiLanguageCode===i.namiLanguageCode&&e.logLevel==i.logLevel||(n=!0)}var a;t&&(Ze.info("SDK full reconfigure called"),ca.resetDevice()),function(e,t,n,i,a){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?a.call(e,n):a?a.value=n:t.set(e,n)}(this,Eh,!0,"f"),Zs.configure(e),await gh.instance.init(e),Ze.info("SDK successfully initialized!");const r=n||t?je:$e;return!bh&&kh()&&(window.addEventListener("VIZIO_TTS_ENABLED",Sh),window.addEventListener("VIZIO_TTS_DISABLED",_h),bh=!0,wh()),{sdkInitialized:!0,configureState:r}}}Eh=new WeakMap,Ph.instance=new Ph;const Th=new Set(["fullscreen","sheet","compact_sheet","modal"]);var xh;e.NamiPaywallManagerEvents=void 0,(xh=e.NamiPaywallManagerEvents||(e.NamiPaywallManagerEvents={})).BuySku="RegisterBuySKU",xh.Close="PaywallCloseRequested",xh.SignIn="PaywallSignInRequested",xh.Restore="PaywallRestoreRequested",xh.DeeplinkAction="PaywallDeeplinkAction";const Ah=globalThis,Ch=Ah.ShadowRoot&&(void 0===Ah.ShadyCSS||Ah.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Lh=Symbol(),Ih=new WeakMap;let Dh=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Lh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ch&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Ih.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Ih.set(t,e))}return e}toString(){return this.cssText}};const Rh=e=>new Dh("string"==typeof e?e:e+"",void 0,Lh),Nh=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1]),e[0]);return new Dh(n,e,Lh)},Wh=Ch?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return Rh(t)})(e):e,{is:Fh,defineProperty:Oh,getOwnPropertyDescriptor:$h,getOwnPropertyNames:jh,getOwnPropertySymbols:zh,getPrototypeOf:Hh}=Object,Bh=globalThis,Uh=Bh.trustedTypes,Gh=Uh?Uh.emptyScript:"",Vh=Bh.reactiveElementPolyfillSupport,Xh=(e,t)=>e,Kh={toAttribute(e,t){switch(t){case Boolean:e=e?Gh:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let 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}},Yh=(e,t)=>!Fh(e,t),qh={attribute:!0,type:String,converter:Kh,reflect:!1,useDefault:!1,hasChanged:Yh};Symbol.metadata??=Symbol("metadata"),Bh.litPropertyMetadata??=new WeakMap;let Jh=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=qh){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){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Oh(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:a}=$h(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const r=i?.call(this);a?.call(this,t),this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qh}static _$Ei(){if(this.hasOwnProperty(Xh("elementProperties")))return;const e=Hh(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Xh("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Xh("properties"))){const e=this.properties,t=[...jh(e),...zh(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const n=this._$Eu(e,t);void 0!==n&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(Wh(e))}else void 0!==e&&t.push(Wh(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Ch)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),i=Ah.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){const a=(void 0!==n.converter?.toAttribute?n.converter:Kh).toAttribute(t,n.type);this._$Em=e,null==a?this.removeAttribute(i):this.setAttribute(i,a),this._$Em=null}}_$AK(e,t){const n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=n.getPropertyOptions(i),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Kh;this._$Em=i;const r=a.fromAttribute(t,e.type);this[i]=r??this._$Ej?.get(i)??r,this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){const i=this.constructor,a=this[e];if(n??=i.getPropertyOptions(e),!((n.hasChanged??Yh)(a,t)||n.useDefault&&n.reflect&&a===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:a},r){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,r??t??this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,n,i)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};Jh.elementStyles=[],Jh.shadowRootOptions={mode:"open"},Jh[Xh("elementProperties")]=new Map,Jh[Xh("finalized")]=new Map,Vh?.({ReactiveElement:Jh}),(Bh.reactiveElementVersions??=[]).push("2.1.1");const Qh=globalThis,Zh=Qh.trustedTypes,em=Zh?Zh.createPolicy("lit-html",{createHTML:e=>e}):void 0,tm="$lit$",nm=`lit$${Math.random().toFixed(9).slice(2)}$`,im="?"+nm,am=`<${im}>`,rm=document,om=()=>rm.createComment(""),sm=e=>null===e||"object"!=typeof e&&"function"!=typeof e,lm=Array.isArray,dm=e=>lm(e)||"function"==typeof e?.[Symbol.iterator],um="[ \t\n\f\r]",cm=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hm=/-->/g,mm=/>/g,fm=RegExp(`>|${um}(?:([^\\s"'>=/]+)(${um}*=${um}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),pm=/'/g,gm=/"/g,vm=/^(?:script|style|textarea|title)$/i,ym=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),bm=ym(1),wm=ym(2),km=Symbol.for("lit-noChange"),Sm=Symbol.for("lit-nothing"),_m=new WeakMap,Mm=rm.createTreeWalker(rm,129);function Em(e,t){if(!lm(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==em?em.createHTML(t):t}const Pm=(e,t)=>{const n=e.length-1,i=[];let a,r=2===t?"<svg>":3===t?"<math>":"",o=cm;for(let t=0;t<n;t++){const n=e[t];let s,l,d=-1,u=0;for(;u<n.length&&(o.lastIndex=u,l=o.exec(n),null!==l);)u=o.lastIndex,o===cm?"!--"===l[1]?o=hm:void 0!==l[1]?o=mm:void 0!==l[2]?(vm.test(l[2])&&(a=RegExp("</"+l[2],"g")),o=fm):void 0!==l[3]&&(o=fm):o===fm?">"===l[0]?(o=a??cm,d=-1):void 0===l[1]?d=-2:(d=o.lastIndex-l[2].length,s=l[1],o=void 0===l[3]?fm:'"'===l[3]?gm:pm):o===gm||o===pm?o=fm:o===hm||o===mm?o=cm:(o=fm,a=void 0);const c=o===fm&&e[t+1].startsWith("/>")?" ":"";r+=o===cm?n+am:d>=0?(i.push(s),n.slice(0,d)+tm+n.slice(d)+nm+c):n+nm+(-2===d?t:c)}return[Em(e,r+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class Tm{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let a=0,r=0;const o=e.length-1,s=this.parts,[l,d]=Pm(e,t);if(this.el=Tm.createElement(l,n),Mm.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=Mm.nextNode())&&s.length<o;){if(1===i.nodeType){if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(tm)){const t=d[r++],n=i.getAttribute(e).split(nm),o=/([.?@])?(.*)/.exec(t);s.push({type:1,index:a,name:o[2],strings:n,ctor:"."===o[1]?Im:"?"===o[1]?Dm:"@"===o[1]?Rm:Lm}),i.removeAttribute(e)}else e.startsWith(nm)&&(s.push({type:6,index:a}),i.removeAttribute(e));if(vm.test(i.tagName)){const e=i.textContent.split(nm),t=e.length-1;if(t>0){i.textContent=Zh?Zh.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],om()),Mm.nextNode(),s.push({type:2,index:++a});i.append(e[t],om())}}}else if(8===i.nodeType)if(i.data===im)s.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(nm,e+1));)s.push({type:7,index:a}),e+=nm.length-1}a++}}static createElement(e,t){const n=rm.createElement("template");return n.innerHTML=e,n}}function xm(e,t,n=e,i){if(t===km)return t;let a=void 0!==i?n._$Co?.[i]:n._$Cl;const r=sm(t)?void 0:t._$litDirective$;return a?.constructor!==r&&(a?._$AO?.(!1),void 0===r?a=void 0:(a=new r(e),a._$AT(e,n,i)),void 0!==i?(n._$Co??=[])[i]=a:n._$Cl=a),void 0!==a&&(t=xm(e,a._$AS(e,t.values),a,i)),t}let Am=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,i=(e?.creationScope??rm).importNode(t,!0);Mm.currentNode=i;let a=Mm.nextNode(),r=0,o=0,s=n[0];for(;void 0!==s;){if(r===s.index){let t;2===s.type?t=new Cm(a,a.nextSibling,this,e):1===s.type?t=new s.ctor(a,s.name,s.strings,this,e):6===s.type&&(t=new Nm(a,this,e)),this._$AV.push(t),s=n[++o]}r!==s?.index&&(a=Mm.nextNode(),r++)}return Mm.currentNode=rm,i}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}};class Cm{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=Sm,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=xm(this,e,t),sm(e)?e===Sm||null==e||""===e?(this._$AH!==Sm&&this._$AR(),this._$AH=Sm):e!==this._$AH&&e!==km&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):dm(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Sm&&sm(this._$AH)?this._$AA.nextSibling.data=e:this.T(rm.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=Tm.createElement(Em(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(t);else{const e=new Am(i,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=_m.get(e.strings);return void 0===t&&_m.set(e.strings,t=new Tm(e)),t}k(e){lm(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const a of e)i===t.length?t.push(n=new Cm(this.O(om()),this.O(om()),this,this.options)):n=t[i],n._$AI(a),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class Lm{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,a){this.type=1,this._$AH=Sm,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=a,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Sm}_$AI(e,t=this,n,i){const a=this.strings;let r=!1;if(void 0===a)e=xm(this,e,t,0),r=!sm(e)||e!==this._$AH&&e!==km,r&&(this._$AH=e);else{const i=e;let o,s;for(e=a[0],o=0;o<a.length-1;o++)s=xm(this,i[n+o],t,o),s===km&&(s=this._$AH[o]),r||=!sm(s)||s!==this._$AH[o],s===Sm?e=Sm:e!==Sm&&(e+=(s??"")+a[o+1]),this._$AH[o]=s}r&&!i&&this.j(e)}j(e){e===Sm?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Im extends Lm{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Sm?void 0:e}}class Dm extends Lm{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Sm)}}class Rm extends Lm{constructor(e,t,n,i,a){super(e,t,n,i,a),this.type=5}_$AI(e,t=this){if((e=xm(this,e,t,0)??Sm)===km)return;const n=this._$AH,i=e===Sm&&n!==Sm||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==Sm&&(n===Sm||i);i&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Nm{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){xm(this,e)}}const Wm={M:tm,P:nm,A:im,C:1,L:Pm,R:Am,D:dm,V:xm,I:Cm,H:Lm,N:Dm,U:Rm,B:Im,F:Nm},Fm=Qh.litHtmlPolyfillSupport;Fm?.(Tm,Cm),(Qh.litHtmlVersions??=[]).push("3.3.1");const Om=globalThis;let $m=class extends Jh{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const i=n?.renderBefore??t;let a=i._$litPart$;if(void 0===a){const e=n?.renderBefore??null;i._$litPart$=a=new Cm(t.insertBefore(om(),e),e,void 0,n??{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return km}};$m._$litElement$=!0,$m.finalized=!0,Om.litElementHydrateSupport?.({LitElement:$m});const jm=Om.litElementPolyfillSupport;jm?.({LitElement:$m}),(Om.litElementVersions??=[]).push("4.2.1");const zm=Nh`
2
2
  /* ——— keyframes ——— */
3
3
  @keyframes nami-slide-up {
4
4
  from { transform: translateY(100%); }
@@ -290,7 +290,7 @@
290
290
  >
291
291
  ${r}
292
292
  </div>
293
- `}};T([Gm({type:Object})],GW.prototype,"component",void 0),T([Gm({type:Boolean})],GW.prototype,"inFocusedState",void 0),T([Gm({type:Number})],GW.prototype,"height",void 0),T([Gm({type:Number})],GW.prototype,"scaleFactor",void 0),T([Gm({type:Object})],GW.prototype,"minSDKVersion",void 0),GW=T([Hm("nami-collapse-container")],GW);let VW=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.mouseDown=!1,this.startDragging=e=>{e.preventDefault(),this.mouseDown=!0,this.startX=e.pageX-this.offsetLeft},this.stopDragging=()=>{this.mouseDown=!1},this.move=e=>{e.preventDefault(),this.mouseDown&&(this.scrollLeft=this.scrollLeft-(e.pageX-this.offsetLeft-this.startX))}}connectedCallback(){super.connectedCallback(),this.addEventListener("mousemove",this.move,!1),this.addEventListener("mousedown",this.startDragging,!1),this.addEventListener("mouseup",this.stopDragging,!1),this.addEventListener("mouseleave",this.stopDragging,!1)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("mousemove",this.move,!1),this.removeEventListener("mousedown",this.startDragging,!1),this.removeEventListener("mouseup",this.stopDragging,!1),this.removeEventListener("mouseleave",this.stopDragging,!1)}styles(){const e="vertical"===this.component.direction,t=e?"margin-top":"margin-left",n=this.component.spacing?this.component.spacing*this.scaleFactor:0;return Rh(`\n :host {\n display: ${this.component.hidden?"none":"flex"};\n flex-direction: ${e?"column":"row"};\n flex-wrap: ${e?"nowrap":"wrap"};\n overflow: auto;\n align-items: center;\n justify-content: center;\n ${$p(this.component,!1)}\n ${Zp(this.component,!1)}\n align-self: baseline;\n cursor: -webkit-grab;\n cursor: grab;\n }\n :host(:focus){\n ${$p(this.component,!0)}\n ${Zp(this.component,!0)}\n }\n :host(:focus-visible){\n ${ag(this.component)}\n }\n @supports not (display: grid) {\n :host > *:not(:first-child) {\n ${t}: ${n}px;\n }\n }\n @supports (display: grid) {\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-row-gap: ${n}px;\n grid-column-gap: ${n}px;\n grid-gap: ${n}px;\n grid-auto-flow: ${e?"row":"column"};\n align-items: center;\n justify-items: center;\n place-items: center;\n }\n :host > * {\n margin: 0;\n }\n }\n `)}render(){const{focusedBorderColor:e,focusedFillColor:t,fillColor:n}=this.component;!e&&gg(n,t)||(this.tabIndex=0);const i=(a=this.contextProvider,(r=this.component).loopSource?(("string"==typeof r.loopSource?JSON.parse(r.loopSource):r.loopSource)??[]).map((e=>(r.loopSourceConditions?.every((t=>ug(a,t,e))),og(r.components,og({block:e},{block:e}))))).filter((e=>null!=e)):[]);var a,r;return i.map((e=>e.map((e=>vg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))))}};function XW(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function KW(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((n=>{void 0===e[n]?e[n]=t[n]:XW(t[n])&&XW(e[n])&&Object.keys(t[n]).length>0&&KW(e[n],t[n])}))}T([Gm({type:Object})],VW.prototype,"component",void 0),T([Gm({type:Boolean})],VW.prototype,"inFocusedState",void 0),T([Gm({type:Number})],VW.prototype,"scaleFactor",void 0),T([Gm({type:Object})],VW.prototype,"minSDKVersion",void 0),VW=T([Hm("nami-responsive-grid")],VW);const YW={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function qW(){const e="undefined"!=typeof document?document:{};return KW(e,YW),e}const JW={document:YW,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function QW(){const e="undefined"!=typeof window?window:{};return KW(e,JW),e}function ZW(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function eF(){return Date.now()}function tF(e,t){void 0===t&&(t="x");const n=QW();let i,a,r;const o=function(e){const t=QW();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(a=o.transform||o.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map((e=>e.replace(",","."))).join(", ")),r=new n.WebKitCSSMatrix("none"===a?"":a)):(r=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=r.toString().split(",")),"x"===t&&(a=n.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(a=n.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),a||0}function nF(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function iF(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let i=1;i<arguments.length;i+=1){const a=i<0||arguments.length<=i?void 0:arguments[i];if(null!=a&&(n=a,!("undefined"!=typeof window&&void 0!==window.HTMLElement?n instanceof HTMLElement:n&&(1===n.nodeType||11===n.nodeType)))){const n=Object.keys(Object(a)).filter((e=>t.indexOf(e)<0));for(let t=0,i=n.length;t<i;t+=1){const i=n[t],r=Object.getOwnPropertyDescriptor(a,i);void 0!==r&&r.enumerable&&(nF(e[i])&&nF(a[i])?a[i].__swiper__?e[i]=a[i]:iF(e[i],a[i]):!nF(e[i])&&nF(a[i])?(e[i]={},a[i].__swiper__?e[i]=a[i]:iF(e[i],a[i])):e[i]=a[i])}}}var n;return e}function aF(e,t,n){e.style.setProperty(t,n)}function rF(e){let{swiper:t,targetPosition:n,side:i}=e;const a=QW(),r=-t.translate;let o,s=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(t.cssModeFrameID);const d=n>r?"next":"prev",u=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,c=()=>{o=(new Date).getTime(),null===s&&(s=o);const e=Math.max(Math.min((o-s)/l,1),0),d=.5-Math.cos(e*Math.PI)/2;let h=r+d*(n-r);if(u(h,n)&&(h=n),t.wrapperEl.scrollTo({[i]:h}),u(h,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[i]:h})})),void a.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=a.requestAnimationFrame(c)};c()}function oF(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function sF(e,t){void 0===t&&(t="");const n=[...e.children];return e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter((e=>e.matches(t))):n}function lF(e){try{return void console.warn(e)}catch(e){}}function dF(e,t){void 0===t&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:function(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}(t)),n}function uF(e,t){return QW().getComputedStyle(e,null).getPropertyValue(t)}function cF(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function hF(e,t){const n=[];let i=e.parentElement;for(;i;)t?i.matches(t)&&n.push(i):n.push(i),i=i.parentElement;return n}function mF(e,t,n){const i=QW();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function fF(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}let pF,gF,vF;function yF(){return pF||(pF=function(){const e=QW(),t=qW();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),pF}function bF(e){return void 0===e&&(e={}),gF||(gF=function(e){let{userAgent:t}=void 0===e?{}:e;const n=yF(),i=QW(),a=i.navigator.platform,r=t||i.navigator.userAgent,o={ios:!1,android:!1},s=i.screen.width,l=i.screen.height,d=r.match(/(Android);?[\s\/]+([\d.]+)?/);let u=r.match(/(iPad).*OS\s([\d_]+)/);const c=r.match(/(iPod)(.*OS\s([\d_]+))?/),h=!u&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===a;let f="MacIntel"===a;return!u&&f&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${s}x${l}`)>=0&&(u=r.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),f=!1),d&&!m&&(o.os="android",o.android=!0),(u||h||c)&&(o.os="ios",o.ios=!0),o}(e)),gF}function wF(){return vF||(vF=function(){const e=QW(),t=bF();let n=!1;function i(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(i()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,i]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));n=e<16||16===e&&i<2}}const a=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),r=i();return{isSafari:n||r,needPerspectiveFix:n,need3dFix:r||a&&t.ios,isWebView:a}}()),vF}var kF={on(e,t,n){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const a=n?"unshift":"push";return e.split(" ").forEach((e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)})),i},once(e,t,n){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;function a(){i.off(e,a),a.__emitterProxy&&delete a.__emitterProxy;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.apply(i,r)}return a.__emitterProxy=t,i.on(e,a,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const i=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[i](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach(((i,a)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[e].splice(a,1)}))})),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,i;for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];"string"==typeof r[0]||Array.isArray(r[0])?(t=r[0],n=r.slice(1,r.length),i=e):(t=r[0].events,n=r[0].data,i=r[0].context||e),n.unshift(i);return(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(i,[t,...n])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(i,n)}))})),e}};const SF=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const _F=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const MF=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},EF=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},PF=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=a,r=[n-t];return r.push(...Array.from({length:t}).map(((e,t)=>n+i+t))),void e.slides.forEach(((t,n)=>{r.includes(t.column)&&EF(e,n)}))}const r=a+i-1;if(e.params.rewind||e.params.loop)for(let i=a-t;i<=r+t;i+=1){const t=(i%n+n)%n;(t<a||t>r)&&EF(e,t)}else for(let i=Math.max(a-t,0);i<=Math.min(r+t,n-1);i+=1)i!==a&&(i>r||i<a)&&EF(e,i)};var TF={updateSize:function(){const e=this;let t,n;const i=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:i.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:i.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(uF(i,"padding-left")||0,10)-parseInt(uF(i,"padding-right")||0,10),n=n-parseInt(uF(i,"padding-top")||0,10)-parseInt(uF(i,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}const n=e.params,{wrapperEl:i,slidesEl:a,size:r,rtlTranslate:o,wrongRTL:s}=e,l=e.virtual&&n.virtual.enabled,d=l?e.virtual.slides.length:e.slides.length,u=sF(a,`.${e.params.slideClass}, swiper-slide`),c=l?e.virtual.slides.length:u.length;let h=[];const m=[],f=[];let p=n.slidesOffsetBefore;"function"==typeof p&&(p=n.slidesOffsetBefore.call(e));let g=n.slidesOffsetAfter;"function"==typeof g&&(g=n.slidesOffsetAfter.call(e));const v=e.snapGrid.length,y=e.slidesGrid.length;let b=n.spaceBetween,w=-p,k=0,S=0;if(void 0===r)return;"string"==typeof b&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*r:"string"==typeof b&&(b=parseFloat(b)),e.virtualSize=-b,u.forEach((e=>{o?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),n.centeredSlides&&n.cssMode&&(aF(i,"--swiper-centered-offset-before",""),aF(i,"--swiper-centered-offset-after",""));const _=n.grid&&n.grid.rows>1&&e.grid;let M;_?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();const E="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter((e=>void 0!==n.breakpoints[e].slidesPerView)).length>0;for(let i=0;i<c;i+=1){let a;if(M=0,u[i]&&(a=u[i]),_&&e.grid.updateSlide(i,a,u),!u[i]||"none"!==uF(a,"display")){if("auto"===n.slidesPerView){E&&(u[i].style[e.getDirectionLabel("width")]="");const r=getComputedStyle(a),o=a.style.transform,s=a.style.webkitTransform;if(o&&(a.style.transform="none"),s&&(a.style.webkitTransform="none"),n.roundLengths)M=e.isHorizontal()?mF(a,"width"):mF(a,"height");else{const e=t(r,"width"),n=t(r,"padding-left"),i=t(r,"padding-right"),o=t(r,"margin-left"),s=t(r,"margin-right"),l=r.getPropertyValue("box-sizing");if(l&&"border-box"===l)M=e+o+s;else{const{clientWidth:t,offsetWidth:r}=a;M=e+n+i+o+s+(r-t)}}o&&(a.style.transform=o),s&&(a.style.webkitTransform=s),n.roundLengths&&(M=Math.floor(M))}else M=(r-(n.slidesPerView-1)*b)/n.slidesPerView,n.roundLengths&&(M=Math.floor(M)),u[i]&&(u[i].style[e.getDirectionLabel("width")]=`${M}px`);u[i]&&(u[i].swiperSlideSize=M),f.push(M),n.centeredSlides?(w=w+M/2+k/2+b,0===k&&0!==i&&(w=w-r/2-b),0===i&&(w=w-r/2-b),Math.abs(w)<.001&&(w=0),n.roundLengths&&(w=Math.floor(w)),S%n.slidesPerGroup==0&&h.push(w),m.push(w)):(n.roundLengths&&(w=Math.floor(w)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup==0&&h.push(w),m.push(w),w=w+M+b),e.virtualSize+=M+b,k=M,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+g,o&&s&&("slide"===n.effect||"coverflow"===n.effect)&&(i.style.width=`${e.virtualSize+b}px`),n.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),_&&e.grid.updateWrapperSize(M,h),!n.centeredSlides){const t=[];for(let i=0;i<h.length;i+=1){let a=h[i];n.roundLengths&&(a=Math.floor(a)),h[i]<=e.virtualSize-r&&t.push(a)}h=t,Math.floor(e.virtualSize-r)-Math.floor(h[h.length-1])>1&&h.push(e.virtualSize-r)}if(l&&n.loop){const t=f[0]+b;if(n.slidesPerGroup>1){const i=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),a=t*n.slidesPerGroup;for(let e=0;e<i;e+=1)h.push(h[h.length-1]+a)}for(let i=0;i<e.virtual.slidesBefore+e.virtual.slidesAfter;i+=1)1===n.slidesPerGroup&&h.push(h[h.length-1]+t),m.push(m[m.length-1]+t),e.virtualSize+=t}if(0===h.length&&(h=[0]),0!==b){const t=e.isHorizontal()&&o?"marginLeft":e.getDirectionLabel("marginRight");u.filter(((e,t)=>!(n.cssMode&&!n.loop)||t!==u.length-1)).forEach((e=>{e.style[t]=`${b}px`}))}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;f.forEach((t=>{e+=t+(b||0)})),e-=b;const t=e>r?e-r:0;h=h.map((e=>e<=0?-p:e>t?t+g:e))}if(n.centerInsufficientSlides){let e=0;f.forEach((t=>{e+=t+(b||0)})),e-=b;const t=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(e+t<r){const n=(r-e-t)/2;h.forEach(((e,t)=>{h[t]=e-n})),m.forEach(((e,t)=>{m[t]=e+n}))}}if(Object.assign(e,{slides:u,snapGrid:h,slidesGrid:m,slidesSizesGrid:f}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){aF(i,"--swiper-centered-offset-before",-h[0]+"px"),aF(i,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+n))}if(c!==d&&e.emit("slidesLengthChange"),h.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),m.length!==y&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,i=e.el.classList.contains(t);c<=n.maxBackfaceHiddenSlides?i||e.el.classList.add(t):i&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],i=t.virtual&&t.params.virtual.enabled;let a,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const o=e=>i?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{n.push(e)}));else for(a=0;a<Math.ceil(t.params.slidesPerView);a+=1){const e=t.activeIndex+a;if(e>t.slides.length&&!i)break;n.push(o(e))}else n.push(o(t.activeIndex));for(a=0;a<n.length;a+=1)if(void 0!==n[a]){const e=n[a].offsetHeight;r=e>r?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:i,rtlTranslate:a,snapGrid:r}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let o=-e;a&&(o=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=n.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(let e=0;e<i.length;e+=1){const l=i[e];let d=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(d-=i[0].swiperSlideOffset);const u=(o+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),c=(o-r[0]+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),h=-(o-d),m=h+t.slidesSizesGrid[e],f=h>=0&&h<=t.size-t.slidesSizesGrid[e],p=h>=0&&h<t.size-1||m>1&&m<=t.size||h<=0&&m>=t.size;p&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),SF(l,p,n.slideVisibleClass),SF(l,f,n.slideFullyVisibleClass),l.progress=a?-u:u,l.originalProgress=a?-c:c}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:r,isEnd:o,progressLoop:s}=t;const l=r,d=o;if(0===i)a=0,r=!0,o=!0;else{a=(e-t.minTranslate())/i;const n=Math.abs(e-t.minTranslate())<1,s=Math.abs(e-t.maxTranslate())<1;r=n||a<=0,o=s||a>=1,n&&(a=0),s&&(a=1)}if(n.loop){const n=t.getSlideIndexByData(0),i=t.getSlideIndexByData(t.slides.length-1),a=t.slidesGrid[n],r=t.slidesGrid[i],o=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);s=l>=a?(l-a)/o:(l+o-r)/o,s>1&&(s-=1)}Object.assign(t,{progress:a,progressLoop:s,isBeginning:r,isEnd:o}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),r&&!l&&t.emit("reachBeginning toEdge"),o&&!d&&t.emit("reachEnd toEdge"),(l&&!r||d&&!o)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:i,activeIndex:a}=e,r=e.virtual&&n.virtual.enabled,o=e.grid&&n.grid&&n.grid.rows>1,s=e=>sF(i,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,d,u;if(r)if(n.loop){let t=a-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=s(`[data-swiper-slide-index="${t}"]`)}else l=s(`[data-swiper-slide-index="${a}"]`);else o?(l=t.filter((e=>e.column===a))[0],u=t.filter((e=>e.column===a+1))[0],d=t.filter((e=>e.column===a-1))[0]):l=t[a];l&&(o||(u=function(e,t){const n=[];for(;e.nextElementSibling;){const i=e.nextElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u&&(u=t[0]),d=function(e,t){const n=[];for(;e.previousElementSibling;){const i=e.previousElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!d&&(d=t[t.length-1]))),t.forEach((e=>{_F(e,e===l,n.slideActiveClass),_F(e,e===u,n.slideNextClass),_F(e,e===d,n.slidePrevClass)})),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:i,params:a,activeIndex:r,realIndex:o,snapIndex:s}=t;let l,d=e;const u=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:n}=e,i=e.rtlTranslate?e.translate:-e.translate;let a;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?i>=t[e]&&i<t[e+1]-(t[e+1]-t[e])/2?a=e:i>=t[e]&&i<t[e+1]&&(a=e+1):i>=t[e]&&(a=e);return n.normalizeSlideIndex&&(a<0||void 0===a)&&(a=0),a}(t)),i.indexOf(n)>=0)l=i.indexOf(n);else{const e=Math.min(a.slidesPerGroupSkip,d);l=e+Math.floor((d-e)/a.slidesPerGroup)}if(l>=i.length&&(l=i.length-1),d===r&&!t.params.loop)return void(l!==s&&(t.snapIndex=l,t.emit("snapIndexChange")));if(d===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=u(d));const c=t.grid&&a.grid&&a.grid.rows>1;let h;if(t.virtual&&a.virtual.enabled&&a.loop)h=u(d);else if(c){const e=t.slides.filter((e=>e.column===d))[0];let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),h=Math.floor(n/a.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");h=e?parseInt(e,10):d}else h=d;Object.assign(t,{previousSnapIndex:s,snapIndex:l,previousRealIndex:o,realIndex:h,previousIndex:r,activeIndex:d}),t.initialized&&PF(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(o!==h&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,i=n.params;let a=e.closest(`.${i.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!a&&e.matches&&e.matches(`.${i.slideClass}, swiper-slide`)&&(a=e)}));let r,o=!1;if(a)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===a){o=!0,r=e;break}if(!a||!o)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=r,i.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};var xF={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:n,translate:i,wrapperEl:a}=this;if(t.virtualTranslate)return n?-i:i;if(t.cssMode)return i;let r=tF(a,e);return r+=this.cssOverflowAdjustment(),n&&(r=-r),r||0},setTranslate:function(e,t){const n=this,{rtlTranslate:i,params:a,wrapperEl:r,progress:o}=n;let s,l=0,d=0;n.isHorizontal()?l=i?-e:e:d=e,a.roundLengths&&(l=Math.floor(l),d=Math.floor(d)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:d,a.cssMode?r[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-d:a.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():d-=n.cssOverflowAdjustment(),r.style.transform=`translate3d(${l}px, ${d}px, 0px)`);const u=n.maxTranslate()-n.minTranslate();s=0===u?0:(e-n.minTranslate())/u,s!==o&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,i,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===i&&(i=!0);const r=this,{params:o,wrapperEl:s}=r;if(r.animating&&o.preventInteractionOnTransition)return!1;const l=r.minTranslate(),d=r.maxTranslate();let u;if(u=i&&e>l?l:i&&e<d?d:e,r.updateProgress(u),o.cssMode){const e=r.isHorizontal();if(0===t)s[e?"scrollLeft":"scrollTop"]=-u;else{if(!r.support.smoothScroll)return rF({swiper:r,targetPosition:-u,side:e?"left":"top"}),!0;s.scrollTo({[e?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,n&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function AF(e){let{swiper:t,runCallbacks:n,direction:i,step:a}=e;const{activeIndex:r,previousIndex:o}=t;let s=i;if(s||(s=r>o?"next":r<o?"prev":"reset"),t.emit(`transition${a}`),n&&r!==o){if("reset"===s)return void t.emit(`slideResetTransition${a}`);t.emit(`slideChangeTransition${a}`),"next"===s?t.emit(`slideNextTransition${a}`):t.emit(`slidePrevTransition${a}`)}}var CF={slideTo:function(e,t,n,i,a){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const r=this;let o=e;o<0&&(o=0);const{params:s,snapGrid:l,slidesGrid:d,previousIndex:u,activeIndex:c,rtlTranslate:h,wrapperEl:m,enabled:f}=r;if(!f&&!i&&!a||r.destroyed||r.animating&&s.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);const p=Math.min(r.params.slidesPerGroupSkip,o);let g=p+Math.floor((o-p)/r.params.slidesPerGroup);g>=l.length&&(g=l.length-1);const v=-l[g];if(s.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),n=Math.floor(100*d[e]),i=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=n&&t<i-(i-n)/2?o=e:t>=n&&t<i&&(o=e+1):t>=n&&(o=e)}if(r.initialized&&o!==c){if(!r.allowSlideNext&&(h?v>r.translate&&v>r.minTranslate():v<r.translate&&v<r.minTranslate()))return!1;if(!r.allowSlidePrev&&v>r.translate&&v>r.maxTranslate()&&(c||0)!==o)return!1}let y;o!==(u||0)&&n&&r.emit("beforeSlideChangeStart"),r.updateProgress(v),y=o>c?"next":o<c?"prev":"reset";const b=r.virtual&&r.params.virtual.enabled;if(!(b&&a)&&(h&&-v===r.translate||!h&&v===r.translate))return r.updateActiveIndex(o),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==s.effect&&r.setTranslate(v),"reset"!==y&&(r.transitionStart(n,y),r.transitionEnd(n,y)),!1;if(s.cssMode){const e=r.isHorizontal(),n=h?v:-v;if(0===t)b&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),b&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{m[e?"scrollLeft":"scrollTop"]=n}))):m[e?"scrollLeft":"scrollTop"]=n,b&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}));else{if(!r.support.smoothScroll)return rF({swiper:r,targetPosition:n,side:e?"left":"top"}),!0;m.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}return r.setTransition(t),r.setTranslate(v),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,i),r.transitionStart(n,y),0===t?r.transitionEnd(n,y):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(n,y))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,i){if(void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e){e=parseInt(e,10)}const a=this;if(a.destroyed)return;void 0===t&&(t=a.params.speed);const r=a.grid&&a.params.grid&&a.params.grid.rows>1;let o=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)o+=a.virtual.slidesBefore;else{let e;if(r){const t=o*a.params.grid.rows;e=a.slides.filter((e=>1*e.getAttribute("data-swiper-slide-index")===t))[0].column}else e=a.getSlideIndexByData(o);const t=r?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:n}=a.params;let s=a.params.slidesPerView;"auto"===s?s=a.slidesPerViewDynamic():(s=Math.ceil(parseFloat(a.params.slidesPerView,10)),n&&s%2==0&&(s+=1));let l=t-e<s;if(n&&(l=l||e<Math.ceil(s/2)),i&&n&&"auto"!==a.params.slidesPerView&&!r&&(l=!1),l){const i=n?e<a.activeIndex?"prev":"next":e-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:i,slideTo:!0,activeSlideIndex:"next"===i?e+1:e-t+1,slideRealIndex:"next"===i?a.realIndex:void 0})}if(r){const e=o*a.params.grid.rows;o=a.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0].column}else o=a.getSlideIndexByData(o)}return requestAnimationFrame((()=>{a.slideTo(o,t,n,i)})),a},slideNext:function(e,t,n){void 0===t&&(t=!0);const i=this,{enabled:a,params:r,animating:o}=i;if(!a||i.destroyed)return i;void 0===e&&(e=i.params.speed);let s=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(s=Math.max(i.slidesPerViewDynamic("current",!0),1));const l=i.activeIndex<r.slidesPerGroupSkip?1:s,d=i.virtual&&r.virtual.enabled;if(r.loop){if(o&&!d&&r.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&r.cssMode)return requestAnimationFrame((()=>{i.slideTo(i.activeIndex+l,e,t,n)})),!0}return r.rewind&&i.isEnd?i.slideTo(0,e,t,n):i.slideTo(i.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===t&&(t=!0);const i=this,{params:a,snapGrid:r,slidesGrid:o,rtlTranslate:s,enabled:l,animating:d}=i;if(!l||i.destroyed)return i;void 0===e&&(e=i.params.speed);const u=i.virtual&&a.virtual.enabled;if(a.loop){if(d&&!u&&a.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function c(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const h=c(s?i.translate:-i.translate),m=r.map((e=>c(e)));let f=r[m.indexOf(h)-1];if(void 0===f&&a.cssMode){let e;r.forEach(((t,n)=>{h>=t&&(e=n)})),void 0!==e&&(f=r[e>0?e-1:e])}let p=0;if(void 0!==f&&(p=o.indexOf(f),p<0&&(p=i.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(p=p-i.slidesPerViewDynamic("previous",!0)+1,p=Math.max(p,0))),a.rewind&&i.isBeginning){const a=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(a,e,t,n)}return a.loop&&0===i.activeIndex&&a.cssMode?(requestAnimationFrame((()=>{i.slideTo(p,e,t,n)})),!0):i.slideTo(p,e,t,n)},slideReset:function(e,t,n){void 0===t&&(t=!0);const i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,n)},slideToClosest:function(e,t,n,i){void 0===t&&(t=!0),void 0===i&&(i=.5);const a=this;if(a.destroyed)return;void 0===e&&(e=a.params.speed);let r=a.activeIndex;const o=Math.min(a.params.slidesPerGroupSkip,r),s=o+Math.floor((r-o)/a.params.slidesPerGroup),l=a.rtlTranslate?a.translate:-a.translate;if(l>=a.snapGrid[s]){const e=a.snapGrid[s];l-e>(a.snapGrid[s+1]-e)*i&&(r+=a.params.slidesPerGroup)}else{const e=a.snapGrid[s-1];l-e<=(a.snapGrid[s]-e)*i&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,r=e.clickedIndex;const o=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;a=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?r<e.loopedSlides-i/2||r>e.slides.length-e.loopedSlides+i/2?(e.loopFix(),r=e.getSlideIndex(sF(n,`${o}[data-swiper-slide-index="${a}"]`)[0]),ZW((()=>{e.slideTo(r)}))):e.slideTo(r):r>e.slides.length-i?(e.loopFix(),r=e.getSlideIndex(sF(n,`${o}[data-swiper-slide-index="${a}"]`)[0]),ZW((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}};var LF={loopCreate:function(e){const t=this,{params:n,slidesEl:i}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const a=()=>{sF(i,`.${n.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},r=t.grid&&n.grid&&n.grid.rows>1,o=n.slidesPerGroup*(r?n.grid.rows:1),s=t.slides.length%o!=0,l=r&&t.slides.length%n.grid.rows!=0,d=e=>{for(let i=0;i<e;i+=1){const e=t.isElement?dF("swiper-slide",[n.slideBlankClass]):dF("div",[n.slideClass,n.slideBlankClass]);t.slidesEl.append(e)}};if(s){if(n.loopAddBlankSlides){d(o-t.slides.length%o),t.recalcSlides(),t.updateSlides()}else lF("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");a()}else if(l){if(n.loopAddBlankSlides){d(n.grid.rows-t.slides.length%n.grid.rows),t.recalcSlides(),t.updateSlides()}else lF("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");a()}else a();t.loopFix({slideRealIndex:e,direction:n.centeredSlides?void 0:"next"})},loopFix:function(e){let{slideRealIndex:t,slideTo:n=!0,direction:i,setTranslate:a,activeSlideIndex:r,byController:o,byMousewheel:s}=void 0===e?{}:e;const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:d,allowSlidePrev:u,allowSlideNext:c,slidesEl:h,params:m}=l,{centeredSlides:f}=m;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&m.virtual.enabled)return n&&(m.centeredSlides||0!==l.snapIndex?m.centeredSlides&&l.snapIndex<m.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=u,l.allowSlideNext=c,void l.emit("loopFix");let p=m.slidesPerView;"auto"===p?p=l.slidesPerViewDynamic():(p=Math.ceil(parseFloat(m.slidesPerView,10)),f&&p%2==0&&(p+=1));const g=m.slidesPerGroupAuto?p:m.slidesPerGroup;let v=g;v%g!=0&&(v+=g-v%g),v+=m.loopAdditionalSlides,l.loopedSlides=v;const y=l.grid&&m.grid&&m.grid.rows>1;d.length<p+v?lF("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):y&&"row"===m.grid.fill&&lF("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const b=[],w=[];let k=l.activeIndex;void 0===r?r=l.getSlideIndex(d.filter((e=>e.classList.contains(m.slideActiveClass)))[0]):k=r;const S="next"===i||!i,_="prev"===i||!i;let M=0,E=0;const P=y?Math.ceil(d.length/m.grid.rows):d.length,T=(y?d[r].column:r)+(f&&void 0===a?-p/2+.5:0);if(T<v){M=Math.max(v-T,g);for(let e=0;e<v-T;e+=1){const t=e-Math.floor(e/P)*P;if(y){const e=P-t-1;for(let t=d.length-1;t>=0;t-=1)d[t].column===e&&b.push(t)}else b.push(P-t-1)}}else if(T+p>P-v){E=Math.max(T-(P-2*v),g);for(let e=0;e<E;e+=1){const t=e-Math.floor(e/P)*P;y?d.forEach(((e,n)=>{e.column===t&&w.push(n)})):w.push(t)}}if(l.__preventObserver__=!0,requestAnimationFrame((()=>{l.__preventObserver__=!1})),_&&b.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.prepend(d[e]),d[e].swiperLoopMoveDOM=!1})),S&&w.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.append(d[e]),d[e].swiperLoopMoveDOM=!1})),l.recalcSlides(),"auto"===m.slidesPerView?l.updateSlides():y&&(b.length>0&&_||w.length>0&&S)&&l.slides.forEach(((e,t)=>{l.grid.updateSlide(t,e,l.slides)})),m.watchSlidesProgress&&l.updateSlidesOffset(),n)if(b.length>0&&_){if(void 0===t){const e=l.slidesGrid[k],t=l.slidesGrid[k+M]-e;s?l.setTranslate(l.translate-t):(l.slideTo(k+Math.ceil(M),0,!1,!0),a&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else if(a){const e=y?b.length/m.grid.rows:b.length;l.slideTo(l.activeIndex+e,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(w.length>0&&S)if(void 0===t){const e=l.slidesGrid[k],t=l.slidesGrid[k-E]-e;s?l.setTranslate(l.translate-t):(l.slideTo(k-E,0,!1,!0),a&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else{const e=y?w.length/m.grid.rows:w.length;l.slideTo(l.activeIndex-e,0,!1,!0)}if(l.allowSlidePrev=u,l.allowSlideNext=c,l.controller&&l.controller.control&&!o){const e={slideRealIndex:t,direction:i,setTranslate:a,activeSlideIndex:r,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===m.slidesPerView&&n})})):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...e,slideTo:l.controller.control.params.slidesPerView===m.slidesPerView&&n})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const i=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;i[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),i.forEach((e=>{n.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};var IF={setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}};function DF(e,t,n){const i=QW(),{params:a}=e,r=a.edgeSwipeDetection,o=a.edgeSwipeThreshold;return!r||!(n<=o||n>=i.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function RF(e){const t=this,n=qW();let i=e;i.originalEvent&&(i=i.originalEvent);const a=t.touchEventsData;if("pointerdown"===i.type){if(null!==a.pointerId&&a.pointerId!==i.pointerId)return;a.pointerId=i.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(a.touchId=i.targetTouches[0].identifier);if("touchstart"===i.type)return void DF(t,i,i.targetTouches[0].pageX);const{params:r,touches:o,enabled:s}=t;if(!s)return;if(!r.simulateTouch&&"mouse"===i.pointerType)return;if(t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let l=i.target;if("wrapper"===r.touchEventsTarget&&!function(e,t){const n=t.contains(e);if(!n&&t instanceof HTMLSlotElement)return[...t.assignedElements()].includes(e);return n}(l,t.wrapperEl))return;if("which"in i&&3===i.which)return;if("button"in i&&i.button>0)return;if(a.isTouched&&a.isMoved)return;const d=!!r.noSwipingClass&&""!==r.noSwipingClass,u=i.composedPath?i.composedPath():i.path;d&&i.target&&i.target.shadowRoot&&u&&(l=u[0]);const c=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!(!i.target||!i.target.shadowRoot);if(r.noSwiping&&(h?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===qW()||n===QW())return null;n.assignedSlot&&(n=n.assignedSlot);const i=n.closest(e);return i||n.getRootNode?i||t(n.getRootNode().host):null}(t)}(c,l):l.closest(c)))return void(t.allowClick=!0);if(r.swipeHandler&&!l.closest(r.swipeHandler))return;o.currentX=i.pageX,o.currentY=i.pageY;const m=o.currentX,f=o.currentY;if(!DF(t,i,m))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=m,o.startY=f,a.touchStartTime=eF(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1);let p=!0;l.matches(a.focusableElements)&&(p=!1,"SELECT"===l.nodeName&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==l&&n.activeElement.blur();const g=p&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!g||l.isContentEditable||i.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}function NF(e){const t=qW(),n=this,i=n.touchEventsData,{params:a,touches:r,rtlTranslate:o,enabled:s}=n;if(!s)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;let l,d=e;if(d.originalEvent&&(d=d.originalEvent),"pointermove"===d.type){if(null!==i.touchId)return;if(d.pointerId!==i.pointerId)return}if("touchmove"===d.type){if(l=[...d.changedTouches].filter((e=>e.identifier===i.touchId))[0],!l||l.identifier!==i.touchId)return}else l=d;if(!i.isTouched)return void(i.startMoving&&i.isScrolling&&n.emit("touchMoveOpposite",d));const u=l.pageX,c=l.pageY;if(d.preventedByNestedSwiper)return r.startX=u,void(r.startY=c);if(!n.allowTouchMove)return d.target.matches(i.focusableElements)||(n.allowClick=!1),void(i.isTouched&&(Object.assign(r,{startX:u,startY:c,currentX:u,currentY:c}),i.touchStartTime=eF()));if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(c<r.startY&&n.translate<=n.maxTranslate()||c>r.startY&&n.translate>=n.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(u<r.startX&&n.translate<=n.maxTranslate()||u>r.startX&&n.translate>=n.minTranslate())return;if(t.activeElement&&d.target===t.activeElement&&d.target.matches(i.focusableElements))return i.isMoved=!0,void(n.allowClick=!1);i.allowTouchCallbacks&&n.emit("touchMove",d),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=u,r.currentY=c;const h=r.currentX-r.startX,m=r.currentY-r.startY;if(n.params.threshold&&Math.sqrt(h**2+m**2)<n.params.threshold)return;if(void 0===i.isScrolling){let e;n.isHorizontal()&&r.currentY===r.startY||n.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:h*h+m*m>=25&&(e=180*Math.atan2(Math.abs(m),Math.abs(h))/Math.PI,i.isScrolling=n.isHorizontal()?e>a.touchAngle:90-e>a.touchAngle)}if(i.isScrolling&&n.emit("touchMoveOpposite",d),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===d.type&&i.preventTouchMoveFromPointerMove)return void(i.isTouched=!1);if(!i.startMoving)return;n.allowClick=!1,!a.cssMode&&d.cancelable&&d.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&d.stopPropagation();let f=n.isHorizontal()?h:m,p=n.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;a.oneWayMovement&&(f=Math.abs(f)*(o?1:-1),p=Math.abs(p)*(o?1:-1)),r.diff=f,f*=a.touchRatio,o&&(f=-f,p=-p);const g=n.touchesDirection;n.swipeDirection=f>0?"prev":"next",n.touchesDirection=p>0?"prev":"next";const v=n.params.loop&&!a.cssMode,y="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!i.isMoved){if(v&&y&&n.loopFix({direction:n.swipeDirection}),i.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!a.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",d)}if((new Date).getTime(),i.isMoved&&i.allowThresholdMove&&g!==n.touchesDirection&&v&&y&&Math.abs(f)>=1)return Object.assign(r,{startX:u,startY:c,currentX:u,currentY:c,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);n.emit("sliderMove",d),i.isMoved=!0,i.currentTranslate=f+i.startTranslate;let b=!0,w=a.resistanceRatio;if(a.touchReleaseOnEdges&&(w=0),f>0?(v&&y&&i.allowThresholdMove&&i.currentTranslate>(a.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>n.minTranslate()&&(b=!1,a.resistance&&(i.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+i.startTranslate+f)**w))):f<0&&(v&&y&&i.allowThresholdMove&&i.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===a.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),i.currentTranslate<n.maxTranslate()&&(b=!1,a.resistance&&(i.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-i.startTranslate-f)**w))),b&&(d.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),n.allowSlidePrev||n.allowSlideNext||(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(f)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=n.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(i.currentTranslate),n.setTranslate(i.currentTranslate))}function WF(e){const t=this,n=t.touchEventsData;let i,a=e;a.originalEvent&&(a=a.originalEvent);if("touchend"===a.type||"touchcancel"===a.type){if(i=[...a.changedTouches].filter((e=>e.identifier===n.touchId))[0],!i||i.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(a.pointerId!==n.pointerId)return;i=a}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)){if(!(["pointercancel","contextmenu"].includes(a.type)&&(t.browser.isSafari||t.browser.isWebView)))return}n.pointerId=null,n.touchId=null;const{params:r,touches:o,rtlTranslate:s,slidesGrid:l,enabled:d}=t;if(!d)return;if(!r.simulateTouch&&"mouse"===a.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",a),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const u=eF(),c=u-n.touchStartTime;if(t.allowClick){const e=a.path||a.composedPath&&a.composedPath();t.updateClickedSlide(e&&e[0]||a.target,e),t.emit("tap click",a),c<300&&u-n.lastClickTime<300&&t.emit("doubleTap doubleClick",a)}if(n.lastClickTime=eF(),ZW((()=>{t.destroyed||(t.allowClick=!0)})),!n.isTouched||!n.isMoved||!t.swipeDirection||0===o.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let h;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,h=r.followFinger?s?t.translate:-t.translate:-n.currentTranslate,r.cssMode)return;if(r.freeMode&&r.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});const m=h>=-t.maxTranslate()&&!t.params.loop;let f=0,p=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<r.slidesPerGroupSkip?1:r.slidesPerGroup){const t=e<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==l[e+t]?(m||h>=l[e]&&h<l[e+t])&&(f=e,p=l[e+t]-l[e]):(m||h>=l[e])&&(f=e,p=l[l.length-1]-l[l.length-2])}let g=null,v=null;r.rewind&&(t.isBeginning?v=r.virtual&&r.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const y=(h-l[f])/p,b=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(c>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(y>=r.longSwipesRatio?t.slideTo(r.rewind&&t.isEnd?g:f+b):t.slideTo(f)),"prev"===t.swipeDirection&&(y>1-r.longSwipesRatio?t.slideTo(f+b):null!==v&&y<0&&Math.abs(y)>r.longSwipesRatio?t.slideTo(v):t.slideTo(f))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(a.target===t.navigation.nextEl||a.target===t.navigation.prevEl)?a.target===t.navigation.nextEl?t.slideTo(f+b):t.slideTo(f):("next"===t.swipeDirection&&t.slideTo(null!==g?g:f+b),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:f))}}function FF(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:a,snapGrid:r}=e,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=o&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s?e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function OF(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function $F(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:i}=e;if(!i)return;let a;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();a=0===r?0:(e.translate-e.minTranslate())/r,a!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function jF(e){const t=this;MF(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function zF(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const HF=(e,t)=>{const n=qW(),{params:i,el:a,wrapperEl:r,device:o}=e,s=!!i.nested,l="on"===t?"addEventListener":"removeEventListener",d=t;a&&"string"!=typeof a&&(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),a[l]("touchstart",e.onTouchStart,{passive:!1}),a[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:s}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&a[l]("click",e.onClick,!0),i.cssMode&&r[l]("scroll",e.onScroll),i.updateOnWindowResize?e[d](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",FF,!0):e[d]("observerUpdate",FF,!0),a[l]("load",e.onLoad,{capture:!0}))};const BF=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var UF={setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:i,el:a}=e,r=i.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const o=e.getBreakpoint(r,e.params.breakpointsBase,e.el);if(!o||e.currentBreakpoint===o)return;const s=(o in r?r[o]:void 0)||e.originalParams,l=BF(e,i),d=BF(e,s),u=e.params.grabCursor,c=s.grabCursor,h=i.enabled;l&&!d?(a.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!l&&d&&(a.classList.add(`${i.containerModifierClass}grid`),(s.grid.fill&&"column"===s.grid.fill||!s.grid.fill&&"column"===i.grid.fill)&&a.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),u&&!c?e.unsetGrabCursor():!u&&c&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===s[t])return;const n=i[t]&&i[t].enabled,a=s[t]&&s[t].enabled;n&&!a&&e[t].disable(),!n&&a&&e[t].enable()}));const m=s.direction&&s.direction!==i.direction,f=i.loop&&(s.slidesPerView!==i.slidesPerView||m),p=i.loop;m&&n&&e.changeDirection(),iF(e.params,s);const g=e.params.enabled,v=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!g?e.disable():!h&&g&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",s),n&&(f?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!p&&v?(e.loopCreate(t),e.updateSlides()):p&&!v&&e.loopDestroy()),e.emit("breakpoint",s)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let i=!1;const a=QW(),r="window"===t?a.innerHeight:n.clientHeight,o=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));o.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<o.length;e+=1){const{point:r,value:s}=o[e];"window"===t?a.matchMedia(`(min-width: ${s}px)`).matches&&(i=r):s<=n.clientWidth&&(i=r)}return i||"max"}};var GF={addClasses:function(){const e=this,{classNames:t,params:n,rtl:i,el:a,device:r}=e,o=function(e,t){const n=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((i=>{e[i]&&n.push(t+i)})):"string"==typeof e&&n.push(t+e)})),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:i},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...o),a.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}};var VF={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function XF(e,t){return function(n){void 0===n&&(n={});const i=Object.keys(n)[0],a=n[i];"object"==typeof a&&null!==a?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in a?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),iF(t,n)):iF(t,n)):iF(t,n)}}const KF={eventsEmitter:kF,update:TF,translate:xF,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:i}=n;i.cssMode||(i.autoHeight&&n.updateAutoHeight(),AF({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:i}=n;n.animating=!1,i.cssMode||(n.setTransition(0),AF({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:CF,loop:LF,grabCursor:IF,events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=RF.bind(e),e.onTouchMove=NF.bind(e),e.onTouchEnd=WF.bind(e),e.onDocumentTouchStart=zF.bind(e),t.cssMode&&(e.onScroll=$F.bind(e)),e.onClick=OF.bind(e),e.onLoad=jF.bind(e),HF(e,"on")},detachEvents:function(){HF(this,"off")}},breakpoints:UF,checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:i}=n;if(i){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*i;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:GF},YF={};class qF{constructor(){let e,t;for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];1===i.length&&i[0].constructor&&"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?t=i[0]:[e,t]=i,t||(t={}),t=iF({},t),e&&!t.el&&(t.el=e);const r=qW();if(t.el&&"string"==typeof t.el&&r.querySelectorAll(t.el).length>1){const e=[];return r.querySelectorAll(t.el).forEach((n=>{const i=iF({},t,{el:n});e.push(new qF(i))})),e}const o=this;o.__swiper__=!0,o.support=yF(),o.device=bF({userAgent:t.userAgent}),o.browser=wF(),o.eventsListeners={},o.eventsAnyListeners=[],o.modules=[...o.__modules__],t.modules&&Array.isArray(t.modules)&&o.modules.push(...t.modules);const s={};o.modules.forEach((e=>{e({params:t,swiper:o,extendParams:XF(t,s),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})}));const l=iF({},VF,s);return o.params=iF({},l,YF,t),o.originalParams=iF({},o.params),o.passedParams=iF({},t),o.params&&o.params.on&&Object.keys(o.params.on).forEach((e=>{o.on(e,o.params.on[e])})),o.params&&o.params.onAny&&o.onAny(o.params.onAny),Object.assign(o,{enabled:o.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===o.params.direction,isVertical:()=>"vertical"===o.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o.params.allowSlideNext,allowSlidePrev:o.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:o.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o.emit("_swiper"),o.params.init&&o.init(),o}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,i=cF(sF(t,`.${n.slideClass}, swiper-slide`)[0]);return cF(e)-i}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=sF(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const i=n.minTranslate(),a=(n.maxTranslate()-i)*e+i;n.translateTo(a,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((n=>{const i=e.getSlideClasses(n);t.push({slideEl:n,classNames:i}),e.emit("_slideClass",n,i)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:i,slidesGrid:a,slidesSizesGrid:r,size:o,activeIndex:s}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=i[s]?Math.ceil(i[s].swiperSlideSize):0;for(let n=s+1;n<i.length;n+=1)i[n]&&!e&&(t+=Math.ceil(i[n].swiperSlideSize),l+=1,t>o&&(e=!0));for(let n=s-1;n>=0;n-=1)i[n]&&!e&&(t+=i[n].swiperSlideSize,l+=1,t>o&&(e=!0))}else if("current"===e)for(let e=s+1;e<i.length;e+=1){(t?a[e]+r[e]-a[s]<o:a[e]-a[s]<o)&&(l+=1)}else for(let e=s-1;e>=0;e-=1){a[s]-a[e]<o&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let a;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&MF(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)i(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;a=e.slideTo(t.length-1,0,!1,!0)}else a=e.slideTo(e.activeIndex,0,!1,!0);a||i()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,i=n.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=(()=>{if(n&&n.shadowRoot&&n.shadowRoot.querySelector){return n.shadowRoot.querySelector(i())}return sF(n,i())[0]})();return!a&&t.params.createElements&&(a=dF("div",t.params.wrapperClass),n.append(a),sF(n,`.${t.params.slideClass}`).forEach((e=>{a.append(e)}))),Object.assign(t,{el:n,wrapperEl:a,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:a,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===uF(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===uF(n,"direction")),wrongRTL:"-webkit-box"===uF(a,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach((e=>{e.complete?MF(t,e):e.addEventListener("load",(e=>{MF(t,e.target)}))})),PF(t),t.initialized=!0,PF(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:i,el:a,wrapperEl:r,slides:o}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.loop&&n.loopDestroy(),t&&(n.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),r&&r.removeAttribute("style"),o&&o.length&&o.forEach((e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((e=>{n.off(e)})),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(n)),n.destroyed=!0),null}static extendDefaults(e){iF(YF,e)}static get extendedDefaults(){return YF}static get defaults(){return VF}static installModule(e){qF.prototype.__modules__||(qF.prototype.__modules__=[]);const t=qF.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>qF.installModule(e))),qF):(qF.installModule(e),qF)}}function JF(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function QF(e){let{swiper:t,extendParams:n,on:i,emit:a}=e;const r="swiper-pagination";let o;n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),t.pagination={el:null,bullets:[]};let s=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function d(e,n){const{bulletActiveClass:i}=t.params.pagination;e&&(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${i}-${n}`),(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&e.classList.add(`${i}-${n}-${n}`))}function u(e){const n=e.target.closest(JF(t.params.pagination.bulletClass));if(!n)return;e.preventDefault();const i=cF(n)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===i)return;const e=(a=t.realIndex,r=i,o=t.slides.length,(r%=o)==1+(a%=o)?"next":r===a-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(i)}else t.slideTo(i);var a,r,o}function c(){const e=t.rtl,n=t.params.pagination;if(l())return;let i,r,u=t.pagination.el;u=fF(u);const c=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,h=t.params.loop?Math.ceil(c/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(r=t.previousRealIndex||0,i=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(i=t.snapIndex,r=t.previousSnapIndex):(r=t.previousIndex||0,i=t.activeIndex||0),"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const a=t.pagination.bullets;let l,c,h;if(n.dynamicBullets&&(o=mF(a[0],t.isHorizontal()?"width":"height"),u.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=o*(n.dynamicMainBullets+4)+"px"})),n.dynamicMainBullets>1&&void 0!==r&&(s+=i-(r||0),s>n.dynamicMainBullets-1?s=n.dynamicMainBullets-1:s<0&&(s=0)),l=Math.max(i-s,0),c=l+(Math.min(a.length,n.dynamicMainBullets)-1),h=(c+l)/2),a.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${n.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),u.length>1)a.forEach((e=>{const a=cF(e);a===i?e.classList.add(...n.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),n.dynamicBullets&&(a>=l&&a<=c&&e.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),a===l&&d(e,"prev"),a===c&&d(e,"next"))}));else{const e=a[i];if(e&&e.classList.add(...n.bulletActiveClass.split(" ")),t.isElement&&a.forEach(((e,t)=>{e.setAttribute("part",t===i?"bullet-active":"bullet")})),n.dynamicBullets){const e=a[l],t=a[c];for(let e=l;e<=c;e+=1)a[e]&&a[e].classList.add(...`${n.bulletActiveClass}-main`.split(" "));d(e,"prev"),d(t,"next")}}if(n.dynamicBullets){const i=Math.min(a.length,n.dynamicMainBullets+4),r=(o*i-o)/2-h*o,s=e?"right":"left";a.forEach((e=>{e.style[t.isHorizontal()?s:"top"]=`${r}px`}))}}u.forEach(((e,r)=>{if("fraction"===n.type&&(e.querySelectorAll(JF(n.currentClass)).forEach((e=>{e.textContent=n.formatFractionCurrent(i+1)})),e.querySelectorAll(JF(n.totalClass)).forEach((e=>{e.textContent=n.formatFractionTotal(h)}))),"progressbar"===n.type){let a;a=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(i+1)/h;let o=1,s=1;"horizontal"===a?o=r:s=r,e.querySelectorAll(JF(n.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${o}) scaleY(${s})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===n.type&&n.renderCustom?(e.innerHTML=n.renderCustom(t,i+1,h),0===r&&a("paginationRender",e)):(0===r&&a("paginationRender",e),a("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass)}))}function h(){const e=t.params.pagination;if(l())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let i=t.pagination.el;i=fF(i);let r="";if("bullets"===e.type){let i=t.params.loop?Math.ceil(n/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&i>n&&(i=n);for(let n=0;n<i;n+=1)e.renderBullet?r+=e.renderBullet.call(t,n,e.bulletClass):r+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(r=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(r=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],i.forEach((n=>{"custom"!==e.type&&(n.innerHTML=r||""),"bullets"===e.type&&t.pagination.bullets.push(...n.querySelectorAll(JF(e.bulletClass)))})),"custom"!==e.type&&a("paginationRender",i[0])}function m(){t.params.pagination=function(e,t,n,i){return e.params.createElements&&Object.keys(i).forEach((a=>{if(!n[a]&&!0===n.auto){let r=sF(e.el,`.${i[a]}`)[0];r||(r=dF("div",i[a]),r.className=i[a],e.el.append(r)),n[a]=r,t[a]=r}})),n}(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n;"string"==typeof e.el&&t.isElement&&(n=t.el.querySelector(e.el)),n||"string"!=typeof e.el||(n=[...document.querySelectorAll(e.el)]),n||(n=e.el),n&&0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(n)&&n.length>1&&(n=[...t.el.querySelectorAll(e.el)],n.length>1&&(n=n.filter((e=>hF(e,".swiper")[0]===t.el))[0])),Array.isArray(n)&&1===n.length&&(n=n[0]),Object.assign(t.pagination,{el:n}),n=fF(n),n.forEach((n=>{"bullets"===e.type&&e.clickable&&n.classList.add(...(e.clickableClass||"").split(" ")),n.classList.add(e.modifierClass+e.type),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(n.classList.add(`${e.modifierClass}${e.type}-dynamic`),s=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.classList.add(e.progressbarOppositeClass),e.clickable&&n.addEventListener("click",u),t.enabled||n.classList.add(e.lockClass)})))}function f(){const e=t.params.pagination;if(l())return;let n=t.pagination.el;n&&(n=fF(n),n.forEach((n=>{n.classList.remove(e.hiddenClass),n.classList.remove(e.modifierClass+e.type),n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(n.classList.remove(...(e.clickableClass||"").split(" ")),n.removeEventListener("click",u))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}i("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:n}=t.pagination;n=fF(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),i("init",(()=>{!1===t.params.pagination.enabled?p():(m(),h(),c())})),i("activeIndexChange",(()=>{void 0===t.snapIndex&&c()})),i("snapIndexChange",(()=>{c()})),i("snapGridLengthChange",(()=>{h(),c()})),i("destroy",(()=>{f()})),i("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=fF(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),i("lock unlock",(()=>{c()})),i("click",((e,n)=>{const i=n.target,r=fF(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&r&&r.length>0&&!i.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&i===t.navigation.nextEl||t.navigation.prevEl&&i===t.navigation.prevEl))return;const e=r[0].classList.contains(t.params.pagination.hiddenClass);a(!0===e?"paginationShow":"paginationHide"),r.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const p=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=fF(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),f()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=fF(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),m(),h(),c()},disable:p,render:h,update:c,init:m,destroy:f})}function ZF(e){let t,n,{swiper:i,extendParams:a,on:r,emit:o,params:s}=e;i.autoplay={running:!1,paused:!1,timeLeft:0},a({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,d,u,c,h,m,f,p,g=s&&s.autoplay?s.autoplay.delay:3e3,v=s&&s.autoplay?s.autoplay.delay:3e3,y=(new Date).getTime();function b(e){i&&!i.destroyed&&i.wrapperEl&&e.target===i.wrapperEl&&(i.wrapperEl.removeEventListener("transitionend",b),p||e.detail&&e.detail.bySwiperTouchMove||E())}const w=()=>{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?d=!0:d&&(v=l,d=!1);const e=i.autoplay.paused?l:y+v-(new Date).getTime();i.autoplay.timeLeft=e,o("autoplayTimeLeft",e,e/g),n=requestAnimationFrame((()=>{w()}))},k=e=>{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(n),w();let a=void 0===e?i.params.autoplay.delay:e;g=i.params.autoplay.delay,v=i.params.autoplay.delay;const r=(()=>{let e;if(e=i.virtual&&i.params.virtual.enabled?i.slides.filter((e=>e.classList.contains("swiper-slide-active")))[0]:i.slides[i.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(r)&&r>0&&void 0===e&&(a=r,g=r,v=r),l=a;const s=i.params.speed,d=()=>{i&&!i.destroyed&&(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev(s,!0,!0),o("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,s,!0,!0),o("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext(s,!0,!0),o("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,s,!0,!0),o("autoplay")),i.params.cssMode&&(y=(new Date).getTime(),requestAnimationFrame((()=>{k()}))))};return a>0?(clearTimeout(t),t=setTimeout((()=>{d()}),a)):requestAnimationFrame((()=>{d()})),a},S=()=>{y=(new Date).getTime(),i.autoplay.running=!0,k(),o("autoplayStart")},_=()=>{i.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(n),o("autoplayStop")},M=(e,n)=>{if(i.destroyed||!i.autoplay.running)return;clearTimeout(t),e||(f=!0);const a=()=>{o("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",b):E()};if(i.autoplay.paused=!0,n)return m&&(l=i.params.autoplay.delay),m=!1,void a();const r=l||i.params.autoplay.delay;l=r-((new Date).getTime()-y),i.isEnd&&l<0&&!i.params.loop||(l<0&&(l=0),a())},E=()=>{i.isEnd&&l<0&&!i.params.loop||i.destroyed||!i.autoplay.running||(y=(new Date).getTime(),f?(f=!1,k(l)):k(),i.autoplay.paused=!1,o("autoplayResume"))},P=()=>{if(i.destroyed||!i.autoplay.running)return;const e=qW();"hidden"===e.visibilityState&&(f=!0,M(!0)),"visible"===e.visibilityState&&E()},T=e=>{"mouse"===e.pointerType&&(f=!0,p=!0,i.animating||i.autoplay.paused||M(!0))},x=e=>{"mouse"===e.pointerType&&(p=!1,i.autoplay.paused&&E())};r("init",(()=>{i.params.autoplay.enabled&&(i.params.autoplay.pauseOnMouseEnter&&(i.el.addEventListener("pointerenter",T),i.el.addEventListener("pointerleave",x)),qW().addEventListener("visibilitychange",P),S())})),r("destroy",(()=>{i.el&&"string"!=typeof i.el&&(i.el.removeEventListener("pointerenter",T),i.el.removeEventListener("pointerleave",x)),qW().removeEventListener("visibilitychange",P),i.autoplay.running&&_()})),r("_freeModeStaticRelease",(()=>{(c||f)&&E()})),r("_freeModeNoMomentumRelease",(()=>{i.params.autoplay.disableOnInteraction?_():M(!0,!0)})),r("beforeTransitionStart",((e,t,n)=>{!i.destroyed&&i.autoplay.running&&(n||!i.params.autoplay.disableOnInteraction?M(!0,!0):_())})),r("sliderFirstMove",(()=>{!i.destroyed&&i.autoplay.running&&(i.params.autoplay.disableOnInteraction?_():(u=!0,c=!1,f=!1,h=setTimeout((()=>{f=!0,c=!0,M(!0)}),200)))})),r("touchEnd",(()=>{if(!i.destroyed&&i.autoplay.running&&u){if(clearTimeout(h),clearTimeout(t),i.params.autoplay.disableOnInteraction)return c=!1,void(u=!1);c&&i.params.cssMode&&E(),c=!1,u=!1}})),r("slideChange",(()=>{!i.destroyed&&i.autoplay.running&&(m=!0)})),Object.assign(i.autoplay,{start:S,stop:_,pause:M,resume:E})}function eO(e,t){const n=oF(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function tO(e,t,n){const i=`swiper-slide-shadow${n?`-${n}`:""} swiper-slide-shadow-${e}`,a=oF(t);let r=a.querySelector(`.${i.split(" ").join(".")}`);return r||(r=dF("div",i.split(" ")),a.append(r)),r}function nO(e){let{swiper:t,extendParams:n,on:i}=e;n({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}});!function(e){const{effect:t,swiper:n,on:i,setTranslate:a,setTransition:r,overwriteParams:o,perspective:s,recreateShadows:l,getEffectParams:d}=e;let u;i("beforeInit",(()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),s&&s()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=o?o():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)})),i("setTranslate",(()=>{n.params.effect===t&&a()})),i("setTransition",((e,i)=>{n.params.effect===t&&r(i)})),i("transitionEnd",(()=>{if(n.params.effect===t&&l){if(!d||!d().slideShadows)return;n.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),l()}})),i("virtualUpdate",(()=>{n.params.effect===t&&(n.slides.length||(u=!0),requestAnimationFrame((()=>{u&&n.slides&&n.slides.length&&(a(),u=!1)})))}))}({effect:"coverflow",swiper:t,on:i,setTranslate:()=>{const{width:e,height:n,slides:i,slidesSizesGrid:a}=t,r=t.params.coverflowEffect,o=t.isHorizontal(),s=t.translate,l=o?e/2-s:n/2-s,d=o?r.rotate:-r.rotate,u=r.depth,c=function(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}(t);for(let e=0,t=i.length;e<t;e+=1){const t=i[e],n=a[e],s=(l-t.swiperSlideOffset-n/2)/n,h="function"==typeof r.modifier?r.modifier(s):s*r.modifier;let m=o?d*h:0,f=o?0:d*h,p=-u*Math.abs(h),g=r.stretch;"string"==typeof g&&-1!==g.indexOf("%")&&(g=parseFloat(r.stretch)/100*n);let v=o?0:g*h,y=o?g*h:0,b=1-(1-r.scale)*Math.abs(h);Math.abs(y)<.001&&(y=0),Math.abs(v)<.001&&(v=0),Math.abs(p)<.001&&(p=0),Math.abs(m)<.001&&(m=0),Math.abs(f)<.001&&(f=0),Math.abs(b)<.001&&(b=0);const w=`translate3d(${y}px,${v}px,${p}px) rotateX(${c(f)}deg) rotateY(${c(m)}deg) scale(${b})`;if(eO(0,t).style.transform=w,t.style.zIndex=1-Math.abs(Math.round(h)),r.slideShadows){let e=o?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),n=o?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=tO("coverflow",t,o?"left":"top")),n||(n=tO("coverflow",t,o?"right":"bottom")),e&&(e.style.opacity=h>0?h:0),n&&(n.style.opacity=-h>0?-h:0)}}},setTransition:e=>{t.slides.map((e=>oF(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}Object.keys(KF).forEach((e=>{Object.keys(KF[e]).forEach((t=>{qF.prototype[t]=KF[e][t]}))})),qF.use([function(e){let{swiper:t,on:n,emit:i}=e;const a=QW();let r=null,o=null;const s=()=>{t&&!t.destroyed&&t.initialized&&(i("beforeResize"),i("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&i("orientationchange")};n("init",(()=>{t.params.resizeObserver&&void 0!==a.ResizeObserver?t&&!t.destroyed&&t.initialized&&(r=new ResizeObserver((e=>{o=a.requestAnimationFrame((()=>{const{width:n,height:i}=t;let a=n,r=i;e.forEach((e=>{let{contentBoxSize:n,contentRect:i,target:o}=e;o&&o!==t.el||(a=i?i.width:(n[0]||n).inlineSize,r=i?i.height:(n[0]||n).blockSize)})),a===n&&r===i||s()}))})),r.observe(t.el)):(a.addEventListener("resize",s),a.addEventListener("orientationchange",l))})),n("destroy",(()=>{o&&a.cancelAnimationFrame(o),r&&r.unobserve&&t.el&&(r.unobserve(t.el),r=null),a.removeEventListener("resize",s),a.removeEventListener("orientationchange",l)}))},function(e){let{swiper:t,extendParams:n,on:i,emit:a}=e;const r=[],o=QW(),s=function(e,n){void 0===n&&(n={});const i=new(o.MutationObserver||o.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void a("observerUpdate",e[0]);const n=function(){a("observerUpdate",e[0])};o.requestAnimationFrame?o.requestAnimationFrame(n):o.setTimeout(n,0)}));i.observe(e,{attributes:void 0===n.attributes||n.attributes,childList:t.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),r.push(i)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),i("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=hF(t.hostEl);for(let t=0;t<e.length;t+=1)s(e[t])}s(t.hostEl,{childList:t.params.observeSlideChildren}),s(t.wrapperEl,{attributes:!1})}})),i("destroy",(()=>{r.forEach((e=>{e.disconnect()})),r.splice(0,r.length)}))}]);let iO=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.updateSpacing=e=>{this.slideSpacing=e.detail.spacing,this.swiperInstance&&(this.swiperInstance.params.spaceBetween=this.slideSpacing,this.swiperInstance.update())}}connectedCallback(){super.connectedCallback(),window.addEventListener("child-spacing",this.updateSpacing,!1)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("child-spacing",this.updateSpacing,!1)}styles(){const{scaleFactor:e,component:t}=this,{backgroundBlur:n,indicator:i,activeIndicator:a,previousSlidePadding:r,nextSlidePadding:o}=t,s="vertical"===t.direction?"margin-top":"margin-left";return Rh(`\n :host {\n display: ${t.hidden?"none":"flex"};\n flex-direction: column !important;\n ${eg(t.position)} \n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ${n?`backdrop-filter: blur(${n}px);`:""}\n z-index: ${t.zIndex??1};\n top: 0px;\n transition: all 0.3s;\n ${Up(t,e)}\n ${function(e,t){return`\n padding-right: ${Rp(t,e.nextSlidePadding)}px !important;\n padding-left: ${Rp(t,e.previousSlidePadding)}px !important;\n `}(t,e)}\n ${jp(t)}\n ${$p(t,!1)}\n max-width: 100vw;\n }\n :host(:focus){\n ${$p(t,!0)}\n ${Qp(t,e,!0)}\n }\n :host(:focus-visible){\n ${ag(t)}\n }\n :host > *:not(:first-child) {\n ${s}: ${t.spacing?t.spacing*e:0}px;\n }\n .swiper-container {\n ${Xp(t,e)};\n padding-left: ${r??0}px;\n padding-right: ${o??0}px;\n box-sizing: border-box;\n }\n .swiper-pagination{\n position: relative;\n padding: 8px;\n }\n .swiper-pagination-bullet {\n opacity: 1 !important;\n ${null!=i?.width?`width: ${i.width}px !important;`:""}\n ${null!=i?.height?`height: ${i.height}px !important;`:""}\n ${null!=i?.borderRadius?`border-radius: ${i.borderRadius}px !important;`:""}\n background: ${i?.fillColor??t.indicatorColor} !important;\n }\n .swiper-pagination-bullet-active {\n ${null!=a?.width?`width: ${a.width}px !important;`:""}\n ${null!=a?.height?`height: ${a.height}px !important;`:""}\n ${null!=a?.borderRadius?`border-radius: ${a.borderRadius}px !important;`:""}\n background: ${a?.fillColor??t.activeIndicatorColor} !important;\n }\n `)}updated(){const e=[QF,ZF],{autoplay:t,autoplaySeconds:n,showIndicators:i,slideSpacing:a,inactiveSlideScale:r}=this.component;r&&e.push(nO),qF.use(e);const o=this.shadowRoot?.querySelector(".swiper-container"),s=this.shadowRoot?.querySelector(".swiper-pagination");if(o&&!this.swiperInstance){const e={initialSlide:0,slidesPerView:1,loop:t,spaceBetween:a??this.slideSpacing??0,autoplay:!!t&&{delay:1e3*n,disableOnInteraction:!1},pagination:!(null!=i&&!i)&&{el:s,clickable:!0},on:{init:e=>{this.handleSlideChange(e)},slideChange:e=>{this.handleSlideChange(e)}}};r&&(e.effect="coverflow",e.coverflowEffect={rotate:0,stretch:0,depth:100,modifier:1,slideShadows:!1,scale:r}),this.swiperInstance=new qF(o,e)}}handleSlideChange(e){if(this.contextProvider.setCurrentSlideIndex(e.realIndex),this.component.onChange){const e=this.getCarouselOnChange(this.component),t=e?.parameters?.partialState?.currentGroupId;t&&this.contextProvider.setCurrentGroupData(t,"")}}getCarouselOnChange(e){if(!e.onChange)return;const{parameters:t}=e.onChange;if(!t)return;const{slides:n}=this.contextProvider.state,i="string"==typeof e.loopSource?e.loopSource:"",a=n?.[i]?.carouselName?.[this.contextProvider.state.currentSlideIndex];return og(e.onChange,{slide:a,sku:this.contextProvider.state.sku,state:this.contextProvider.state,launch:this.contextProvider.state.launch,customer:this.contextProvider.state.customer})}getCarouselSlides(e){if(!e.loopSource)return[];const{slides:t,selectedProducts:n}=this.contextProvider.state,i="string"==typeof e.loopSource?e.loopSource:"",a=Ju(this.contextProvider.productDetails,this.contextProvider.getSelectedPaywall()?.sku_menus??[],i);let r=[];Xm(t)||(r=""!=i?t[i].carouselName:e.loopSource??[]);const o=this.contextProvider.filteredSkuMenus.map((e=>e.id));return r.filter((e=>!e.productGroupId||o.includes(e.productGroupId))).map((t=>{const i=a.find((e=>e.id==n[t.productGroupId]));return og(e.components,og({slide:t},{sku:{...ec(i?.product_details,t,a)}}))||[]}))}render(){const e=this.getCarouselSlides(this.component),{focusedBorderColor:t,focusedFillColor:n,fillColor:i}=this.component;return!t&&gg(i,n)||(this.tabIndex=0),bm`
293
+ `}};T([Gm({type:Object})],GW.prototype,"component",void 0),T([Gm({type:Boolean})],GW.prototype,"inFocusedState",void 0),T([Gm({type:Number})],GW.prototype,"height",void 0),T([Gm({type:Number})],GW.prototype,"scaleFactor",void 0),T([Gm({type:Object})],GW.prototype,"minSDKVersion",void 0),GW=T([Hm("nami-collapse-container")],GW);let VW=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.mouseDown=!1,this.startDragging=e=>{e.preventDefault(),this.mouseDown=!0,this.startX=e.pageX-this.offsetLeft},this.stopDragging=()=>{this.mouseDown=!1},this.move=e=>{e.preventDefault(),this.mouseDown&&(this.scrollLeft=this.scrollLeft-(e.pageX-this.offsetLeft-this.startX))}}connectedCallback(){super.connectedCallback(),this.addEventListener("mousemove",this.move,!1),this.addEventListener("mousedown",this.startDragging,!1),this.addEventListener("mouseup",this.stopDragging,!1),this.addEventListener("mouseleave",this.stopDragging,!1)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("mousemove",this.move,!1),this.removeEventListener("mousedown",this.startDragging,!1),this.removeEventListener("mouseup",this.stopDragging,!1),this.removeEventListener("mouseleave",this.stopDragging,!1)}styles(){const e="vertical"===this.component.direction,t=e?"margin-top":"margin-left",n=this.component.spacing?this.component.spacing*this.scaleFactor:0;return Rh(`\n :host {\n display: ${this.component.hidden?"none":"flex"};\n flex-direction: ${e?"column":"row"};\n flex-wrap: ${e?"nowrap":"wrap"};\n overflow: auto;\n align-items: center;\n justify-content: center;\n ${$p(this.component,!1)}\n ${Zp(this.component,!1)}\n align-self: baseline;\n cursor: -webkit-grab;\n cursor: grab;\n }\n :host(:focus){\n ${$p(this.component,!0)}\n ${Zp(this.component,!0)}\n }\n :host(:focus-visible){\n ${ag(this.component)}\n }\n @supports not (display: grid) {\n :host > *:not(:first-child) {\n ${t}: ${n}px;\n }\n }\n @supports (display: grid) {\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-row-gap: ${n}px;\n grid-column-gap: ${n}px;\n grid-gap: ${n}px;\n grid-auto-flow: ${e?"row":"column"};\n align-items: center;\n justify-items: center;\n place-items: center;\n }\n :host > * {\n margin: 0;\n }\n }\n `)}render(){const{focusedBorderColor:e,focusedFillColor:t,fillColor:n}=this.component;!e&&gg(n,t)||(this.tabIndex=0);const i=(a=this.contextProvider,(r=this.component).loopSource?(("string"==typeof r.loopSource?JSON.parse(r.loopSource):r.loopSource)??[]).map((e=>(r.loopSourceConditions?.every((t=>ug(a,t,e))),og(r.components,og({block:e},{block:e}))))).filter((e=>null!=e)):[]);var a,r;return i.map((e=>e.map((e=>vg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))))}};function XW(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function KW(e={},t={}){const n=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>n.indexOf(e)<0)).forEach((n=>{void 0===e[n]?e[n]=t[n]:XW(t[n])&&XW(e[n])&&Object.keys(t[n]).length>0&&KW(e[n],t[n])}))}T([Gm({type:Object})],VW.prototype,"component",void 0),T([Gm({type:Boolean})],VW.prototype,"inFocusedState",void 0),T([Gm({type:Number})],VW.prototype,"scaleFactor",void 0),T([Gm({type:Object})],VW.prototype,"minSDKVersion",void 0),VW=T([Hm("nami-responsive-grid")],VW);const YW={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function qW(){const e="undefined"!=typeof document?document:{};return KW(e,YW),e}const JW={document:YW,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function QW(){const e="undefined"!=typeof window?window:{};return KW(e,JW),e}function ZW(e,t=0){return setTimeout(e,t)}function eF(){return Date.now()}function tF(e,t="x"){const n=QW();let i,a,r;const o=function(e){const t=QW();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(a=o.transform||o.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map((e=>e.replace(",","."))).join(", ")),r=new n.WebKitCSSMatrix("none"===a?"":a)):(r=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=r.toString().split(",")),"x"===t&&(a=n.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(a=n.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),a||0}function nF(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function iF(...e){const t=Object(e[0]);for(let i=1;i<e.length;i+=1){const a=e[i];if(null!=a&&(n=a,!("undefined"!=typeof window&&void 0!==window.HTMLElement?n instanceof HTMLElement:n&&(1===n.nodeType||11===n.nodeType)))){const e=Object.keys(Object(a)).filter((e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e));for(let n=0,i=e.length;n<i;n+=1){const i=e[n],r=Object.getOwnPropertyDescriptor(a,i);void 0!==r&&r.enumerable&&(nF(t[i])&&nF(a[i])?a[i].__swiper__?t[i]=a[i]:iF(t[i],a[i]):!nF(t[i])&&nF(a[i])?(t[i]={},a[i].__swiper__?t[i]=a[i]:iF(t[i],a[i])):t[i]=a[i])}}}var n;return t}function aF(e,t,n){e.style.setProperty(t,n)}function rF({swiper:e,targetPosition:t,side:n}){const i=QW(),a=-e.translate;let r,o=null;const s=e.params.speed;e.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(e.cssModeFrameID);const l=t>a?"next":"prev",d=(e,t)=>"next"===l&&e>=t||"prev"===l&&e<=t,u=()=>{r=(new Date).getTime(),null===o&&(o=r);const l=Math.max(Math.min((r-o)/s,1),0),c=.5-Math.cos(l*Math.PI)/2;let h=a+c*(t-a);if(d(h,t)&&(h=t),e.wrapperEl.scrollTo({[n]:h}),d(h,t))return e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout((()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:h})})),void i.cancelAnimationFrame(e.cssModeFrameID);e.cssModeFrameID=i.requestAnimationFrame(u)};u()}function oF(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function sF(e,t=""){const n=QW(),i=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&i.push(...e.assignedElements()),t?i.filter((e=>e.matches(t))):i}function lF(e){try{return void console.warn(e)}catch(e){}}function dF(e,t=[]){const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:function(e=""){return e.trim().split(" ").filter((e=>!!e.trim()))}(t)),n}function uF(e,t){return QW().getComputedStyle(e,null).getPropertyValue(t)}function cF(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function hF(e,t){const n=[];let i=e.parentElement;for(;i;)t?i.matches(t)&&n.push(i):n.push(i),i=i.parentElement;return n}function mF(e,t,n){const i=QW();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function fF(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}function pF(e,t=""){"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}let gF,vF,yF;function bF(){return gF||(gF=function(){const e=QW(),t=qW();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),gF}function wF(e={}){return vF||(vF=function({userAgent:e}={}){const t=bF(),n=QW(),i=n.navigator.platform,a=e||n.navigator.userAgent,r={ios:!1,android:!1},o=n.screen.width,s=n.screen.height,l=a.match(/(Android);?[\s\/]+([\d.]+)?/);let d=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const u=a.match(/(iPod)(.*OS\s([\d_]+))?/),c=!d&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let m="MacIntel"===i;return!d&&m&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${s}`)>=0&&(d=a.match(/(Version)\/([\d.]+)/),d||(d=[0,1,"13_0_0"]),m=!1),l&&!h&&(r.os="android",r.android=!0),(d||c||u)&&(r.os="ios",r.ios=!0),r}(e)),vF}function kF(){return yF||(yF=function(){const e=QW(),t=wF();let n=!1;function i(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(i()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,i]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));n=e<16||16===e&&i<2}}const a=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),r=i();return{isSafari:n||r,needPerspectiveFix:n,need3dFix:r||a&&t.ios,isWebView:a}}()),yF}var SF={on(e,t,n){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const a=n?"unshift":"push";return e.split(" ").forEach((e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)})),i},once(e,t,n){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;function a(...n){i.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(i,n)}return a.__emitterProxy=t,i.on(e,a,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const i=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[i](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach(((i,a)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[e].splice(a,1)}))})),n):n},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsListeners)return t;let n,i,a;"string"==typeof e[0]||Array.isArray(e[0])?(n=e[0],i=e.slice(1,e.length),a=t):(n=e[0].events,i=e[0].data,a=e[0].context||t),i.unshift(a);return(Array.isArray(n)?n:n.split(" ")).forEach((e=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach((t=>{t.apply(a,[e,...i])})),t.eventsListeners&&t.eventsListeners[e]&&t.eventsListeners[e].forEach((e=>{e.apply(a,i)}))})),t}};const _F=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const MF=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const EF=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&!t.lazyPreloaderManaged&&t.remove())}))),t&&!t.lazyPreloaderManaged&&t.remove()}},PF=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},TF=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=a,r=[n-t];return r.push(...Array.from({length:t}).map(((e,t)=>n+i+t))),void e.slides.forEach(((t,n)=>{r.includes(t.column)&&PF(e,n)}))}const r=a+i-1;if(e.params.rewind||e.params.loop)for(let i=a-t;i<=r+t;i+=1){const t=(i%n+n)%n;(t<a||t>r)&&PF(e,t)}else for(let i=Math.max(a-t,0);i<=Math.min(r+t,n-1);i+=1)i!==a&&(i>r||i<a)&&PF(e,i)};var xF={updateSize:function(){const e=this;let t,n;const i=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:i.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:i.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(uF(i,"padding-left")||0,10)-parseInt(uF(i,"padding-right")||0,10),n=n-parseInt(uF(i,"padding-top")||0,10)-parseInt(uF(i,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}const n=e.params,{wrapperEl:i,slidesEl:a,rtlTranslate:r,wrongRTL:o}=e,s=e.virtual&&n.virtual.enabled,l=s?e.virtual.slides.length:e.slides.length,d=sF(a,`.${e.params.slideClass}, swiper-slide`),u=s?e.virtual.slides.length:d.length;let c=[];const h=[],m=[];let f=n.slidesOffsetBefore;"function"==typeof f&&(f=n.slidesOffsetBefore.call(e));let p=n.slidesOffsetAfter;"function"==typeof p&&(p=n.slidesOffsetAfter.call(e));const g=e.snapGrid.length,v=e.slidesGrid.length,y=e.size-f-p;let b=n.spaceBetween,w=-f,k=0,S=0;if(void 0===y)return;"string"==typeof b&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*y:"string"==typeof b&&(b=parseFloat(b)),e.virtualSize=-b-f-p,d.forEach((e=>{r?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),n.centeredSlides&&n.cssMode&&(aF(i,"--swiper-centered-offset-before",""),aF(i,"--swiper-centered-offset-after","")),n.cssMode&&(aF(i,"--swiper-slides-offset-before",`${f}px`),aF(i,"--swiper-slides-offset-after",`${p}px`));const _=n.grid&&n.grid.rows>1&&e.grid;let M;_?e.grid.initSlides(d):e.grid&&e.grid.unsetSlides();const E="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter((e=>void 0!==n.breakpoints[e].slidesPerView)).length>0;for(let i=0;i<u;i+=1){M=0;const a=d[i];if(!a||(_&&e.grid.updateSlide(i,a,d),"none"!==uF(a,"display"))){if(s&&"auto"===n.slidesPerView)n.virtual.slidesPerViewAutoSlideSize&&(M=n.virtual.slidesPerViewAutoSlideSize),M&&a&&(n.roundLengths&&(M=Math.floor(M)),a.style[e.getDirectionLabel("width")]=`${M}px`);else if("auto"===n.slidesPerView){E&&(a.style[e.getDirectionLabel("width")]="");const i=getComputedStyle(a),r=a.style.transform,o=a.style.webkitTransform;if(r&&(a.style.transform="none"),o&&(a.style.webkitTransform="none"),n.roundLengths)M=e.isHorizontal()?mF(a,"width"):mF(a,"height");else{const e=t(i,"width"),n=t(i,"padding-left"),r=t(i,"padding-right"),o=t(i,"margin-left"),s=t(i,"margin-right"),l=i.getPropertyValue("box-sizing");if(l&&"border-box"===l)M=e+o+s;else{const{clientWidth:t,offsetWidth:i}=a;M=e+n+r+o+s+(i-t)}}r&&(a.style.transform=r),o&&(a.style.webkitTransform=o),n.roundLengths&&(M=Math.floor(M))}else M=(y-(n.slidesPerView-1)*b)/n.slidesPerView,n.roundLengths&&(M=Math.floor(M)),a&&(a.style[e.getDirectionLabel("width")]=`${M}px`);a&&(a.swiperSlideSize=M),m.push(M),n.centeredSlides?(w=w+M/2+k/2+b,0===k&&0!==i&&(w=w-y/2-b),0===i&&(w=w-y/2-b),Math.abs(w)<.001&&(w=0),n.roundLengths&&(w=Math.floor(w)),S%n.slidesPerGroup==0&&c.push(w),h.push(w)):(n.roundLengths&&(w=Math.floor(w)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup==0&&c.push(w),h.push(w),w=w+M+b),e.virtualSize+=M+b,k=M,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,y)+p,r&&o&&("slide"===n.effect||"coverflow"===n.effect)&&(i.style.width=`${e.virtualSize+b}px`),n.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),_&&e.grid.updateWrapperSize(M,c),!n.centeredSlides){const t="auto"!==n.slidesPerView&&n.slidesPerView%1!=0,i=n.snapToSlideEdge&&!n.loop&&("auto"===n.slidesPerView||t);let a=c.length;if(i){let e;if("auto"===n.slidesPerView){e=1;let t=0;for(let n=m.length-1;n>=0&&(t+=m[n]+(n<m.length-1?b:0),t<=y);n-=1)e=m.length-n}else e=Math.floor(n.slidesPerView);a=Math.max(u-e,0)}const r=[];for(let t=0;t<c.length;t+=1){let o=c[t];n.roundLengths&&(o=Math.floor(o)),i?t<=a&&r.push(o):c[t]<=e.virtualSize-y&&r.push(o)}c=r,Math.floor(e.virtualSize-y)-Math.floor(c[c.length-1])>1&&(i||c.push(e.virtualSize-y))}if(s&&n.loop){const t=m[0]+b;if(n.slidesPerGroup>1){const i=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),a=t*n.slidesPerGroup;for(let e=0;e<i;e+=1)c.push(c[c.length-1]+a)}for(let i=0;i<e.virtual.slidesBefore+e.virtual.slidesAfter;i+=1)1===n.slidesPerGroup&&c.push(c[c.length-1]+t),h.push(h[h.length-1]+t),e.virtualSize+=t}if(0===c.length&&(c=[0]),0!==b){const t=e.isHorizontal()&&r?"marginLeft":e.getDirectionLabel("marginRight");d.filter(((e,t)=>!(n.cssMode&&!n.loop)||t!==d.length-1)).forEach((e=>{e.style[t]=`${b}px`}))}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;m.forEach((t=>{e+=t+(b||0)})),e-=b;const t=e>y?e-y:0;c=c.map((e=>e<=0?-f:e>t?t+p:e))}if(n.centerInsufficientSlides){let e=0;if(m.forEach((t=>{e+=t+(b||0)})),e-=b,e<y){const t=(y-e)/2;c.forEach(((e,n)=>{c[n]=e-t})),h.forEach(((e,n)=>{h[n]=e+t}))}}if(Object.assign(e,{slides:d,snapGrid:c,slidesGrid:h,slidesSizesGrid:m}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){aF(i,"--swiper-centered-offset-before",-c[0]+"px"),aF(i,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+n))}if(u!==l&&e.emit("slidesLengthChange"),c.length!==g&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==v&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(s||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,i=e.el.classList.contains(t);u<=n.maxBackfaceHiddenSlides?i||e.el.classList.add(t):i&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],i=t.virtual&&t.params.virtual.enabled;let a,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const o=e=>i?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{n.push(e)}));else for(a=0;a<Math.ceil(t.params.slidesPerView);a+=1){const e=t.activeIndex+a;if(e>t.slides.length&&!i)break;n.push(o(e))}else n.push(o(t.activeIndex));for(a=0;a<n.length;a+=1)if(void 0!==n[a]){const e=n[a].offsetHeight;r=e>r?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){const t=this,n=t.params,{slides:i,rtlTranslate:a,snapGrid:r}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let o=-e;a&&(o=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=n.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(let e=0;e<i.length;e+=1){const l=i[e];let d=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(d-=i[0].swiperSlideOffset);const u=(o+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),c=(o-r[0]+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),h=-(o-d),m=h+t.slidesSizesGrid[e],f=h>=0&&h<=t.size-t.slidesSizesGrid[e],p=h>=0&&h<t.size-1||m>1&&m<=t.size||h<=0&&m>=t.size;p&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),_F(l,p,n.slideVisibleClass),_F(l,f,n.slideFullyVisibleClass),l.progress=a?-u:u,l.originalProgress=a?-c:c}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:r,isEnd:o,progressLoop:s}=t;const l=r,d=o;if(0===i)a=0,r=!0,o=!0;else{a=(e-t.minTranslate())/i;const n=Math.abs(e-t.minTranslate())<1,s=Math.abs(e-t.maxTranslate())<1;r=n||a<=0,o=s||a>=1,n&&(a=0),s&&(a=1)}if(n.loop){const n=t.getSlideIndexByData(0),i=t.getSlideIndexByData(t.slides.length-1),a=t.slidesGrid[n],r=t.slidesGrid[i],o=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);s=l>=a?(l-a)/o:(l+o-r)/o,s>1&&(s-=1)}Object.assign(t,{progress:a,progressLoop:s,isBeginning:r,isEnd:o}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),r&&!l&&t.emit("reachBeginning toEdge"),o&&!d&&t.emit("reachEnd toEdge"),(l&&!r||d&&!o)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:i,activeIndex:a}=e,r=e.virtual&&n.virtual.enabled,o=e.grid&&n.grid&&n.grid.rows>1,s=e=>sF(i,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,d,u;if(r)if(n.loop){let t=a-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=s(`[data-swiper-slide-index="${t}"]`)}else l=s(`[data-swiper-slide-index="${a}"]`);else o?(l=t.find((e=>e.column===a)),u=t.find((e=>e.column===a+1)),d=t.find((e=>e.column===a-1))):l=t[a];l&&(o||(u=function(e,t){const n=[];for(;e.nextElementSibling;){const i=e.nextElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u&&(u=t[0]),d=function(e,t){const n=[];for(;e.previousElementSibling;){const i=e.previousElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!d&&(d=t[t.length-1]))),t.forEach((e=>{MF(e,e===l,n.slideActiveClass),MF(e,e===u,n.slideNextClass),MF(e,e===d,n.slidePrevClass)})),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:i,params:a,activeIndex:r,realIndex:o,snapIndex:s}=t;let l,d=e;const u=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:n}=e,i=e.rtlTranslate?e.translate:-e.translate;let a;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?i>=t[e]&&i<t[e+1]-(t[e+1]-t[e])/2?a=e:i>=t[e]&&i<t[e+1]&&(a=e+1):i>=t[e]&&(a=e);return n.normalizeSlideIndex&&(a<0||void 0===a)&&(a=0),a}(t)),i.indexOf(n)>=0)l=i.indexOf(n);else{const e=Math.min(a.slidesPerGroupSkip,d);l=e+Math.floor((d-e)/a.slidesPerGroup)}if(l>=i.length&&(l=i.length-1),d===r&&!t.params.loop)return void(l!==s&&(t.snapIndex=l,t.emit("snapIndexChange")));if(d===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=u(d));const c=t.grid&&a.grid&&a.grid.rows>1;let h;if(t.virtual&&a.virtual.enabled)h=a.loop?u(d):d;else if(c){const e=t.slides.find((e=>e.column===d));let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),h=Math.floor(n/a.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");h=e?parseInt(e,10):d}else h=d;Object.assign(t,{previousSnapIndex:s,snapIndex:l,previousRealIndex:o,realIndex:h,previousIndex:r,activeIndex:d}),t.initialized&&TF(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(o!==h&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,i=n.params;let a=e.closest(`.${i.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!a&&e.matches&&e.matches(`.${i.slideClass}, swiper-slide`)&&(a=e)}));let r,o=!1;if(a)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===a){o=!0,r=e;break}if(!a||!o)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=r,i.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};var AF={getTranslate:function(e=(this.isHorizontal()?"x":"y")){const{params:t,rtlTranslate:n,translate:i,wrapperEl:a}=this;if(t.virtualTranslate)return n?-i:i;if(t.cssMode)return i;let r=tF(a,e);return r+=this.cssOverflowAdjustment(),n&&(r=-r),r||0},setTranslate:function(e,t){const n=this,{rtlTranslate:i,params:a,wrapperEl:r,progress:o}=n;let s,l=0,d=0;n.isHorizontal()?l=i?-e:e:d=e,a.roundLengths&&(l=Math.floor(l),d=Math.floor(d)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:d,a.cssMode?r[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-d:a.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():d-=n.cssOverflowAdjustment(),r.style.transform=`translate3d(${l}px, ${d}px, 0px)`);const u=n.maxTranslate()-n.minTranslate();s=0===u?0:(e-n.minTranslate())/u,s!==o&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,n=!0,i=!0,a){const r=this,{params:o,wrapperEl:s}=r;if(r.animating&&o.preventInteractionOnTransition)return!1;const l=r.minTranslate(),d=r.maxTranslate();let u;if(u=i&&e>l?l:i&&e<d?d:e,r.updateProgress(u),o.cssMode){const e=r.isHorizontal();if(0===t)s[e?"scrollLeft":"scrollTop"]=-u;else{if(!r.support.smoothScroll)return rF({swiper:r,targetPosition:-u,side:e?"left":"top"}),!0;s.scrollTo({[e?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,n&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function CF({swiper:e,runCallbacks:t,direction:n,step:i}){const{activeIndex:a,previousIndex:r}=e;let o=n;o||(o=a>r?"next":a<r?"prev":"reset"),e.emit(`transition${i}`),t&&"reset"===o?e.emit(`slideResetTransition${i}`):t&&a!==r&&(e.emit(`slideChangeTransition${i}`),"next"===o?e.emit(`slideNextTransition${i}`):e.emit(`slidePrevTransition${i}`))}var LF={slideTo:function(e=0,t,n=!0,i,a){"string"==typeof e&&(e=parseInt(e,10));const r=this;let o=e;o<0&&(o=0);const{params:s,snapGrid:l,slidesGrid:d,previousIndex:u,activeIndex:c,rtlTranslate:h,wrapperEl:m,enabled:f}=r;if(!f&&!i&&!a||r.destroyed||r.animating&&s.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);const p=Math.min(r.params.slidesPerGroupSkip,o);let g=p+Math.floor((o-p)/r.params.slidesPerGroup);g>=l.length&&(g=l.length-1);const v=-l[g];if(s.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),n=Math.floor(100*d[e]),i=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=n&&t<i-(i-n)/2?o=e:t>=n&&t<i&&(o=e+1):t>=n&&(o=e)}if(r.initialized&&o!==c){if(!r.allowSlideNext&&(h?v>r.translate&&v>r.minTranslate():v<r.translate&&v<r.minTranslate()))return!1;if(!r.allowSlidePrev&&v>r.translate&&v>r.maxTranslate()&&(c||0)!==o)return!1}let y;o!==(u||0)&&n&&r.emit("beforeSlideChangeStart"),r.updateProgress(v),y=o>c?"next":o<c?"prev":"reset";const b=r.virtual&&r.params.virtual.enabled;if(!(b&&a)&&(h&&-v===r.translate||!h&&v===r.translate))return r.updateActiveIndex(o),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==s.effect&&r.setTranslate(v),"reset"!==y&&(r.transitionStart(n,y),r.transitionEnd(n,y)),!1;if(s.cssMode){const e=r.isHorizontal(),n=h?v:-v;if(0===t)b&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),b&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{m[e?"scrollLeft":"scrollTop"]=n}))):m[e?"scrollLeft":"scrollTop"]=n,b&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}));else{if(!r.support.smoothScroll)return rF({swiper:r,targetPosition:n,side:e?"left":"top"}),!0;m.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}const w=kF().isSafari;return b&&!a&&w&&r.isElement&&r.virtual.update(!1,!1,o),r.setTransition(t),r.setTranslate(v),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,i),r.transitionStart(n,y),0===t?r.transitionEnd(n,y):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(n,y))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,n=!0,i){if("string"==typeof e){e=parseInt(e,10)}const a=this;if(a.destroyed)return;void 0===t&&(t=a.params.speed);const r=a.grid&&a.params.grid&&a.params.grid.rows>1;let o=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)o+=a.virtual.slidesBefore;else{let e;if(r){const t=o*a.params.grid.rows;e=a.slides.find((e=>1*e.getAttribute("data-swiper-slide-index")===t)).column}else e=a.getSlideIndexByData(o);const t=r?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:n,slidesOffsetBefore:s,slidesOffsetAfter:l}=a.params,d=n||!!s||!!l;let u=a.params.slidesPerView;"auto"===u?u=a.slidesPerViewDynamic():(u=Math.ceil(parseFloat(a.params.slidesPerView,10)),d&&u%2==0&&(u+=1));let c=t-e<u;if(d&&(c=c||e<Math.ceil(u/2)),i&&d&&"auto"!==a.params.slidesPerView&&!r&&(c=!1),c){const n=d?e<a.activeIndex?"prev":"next":e-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:n,slideTo:!0,activeSlideIndex:"next"===n?e+1:e-t+1,slideRealIndex:"next"===n?a.realIndex:void 0})}if(r){const e=o*a.params.grid.rows;o=a.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)).column}else o=a.getSlideIndexByData(o)}return requestAnimationFrame((()=>{a.slideTo(o,t,n,i)})),a},slideNext:function(e,t=!0,n){const i=this,{enabled:a,params:r,animating:o}=i;if(!a||i.destroyed)return i;void 0===e&&(e=i.params.speed);let s=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(s=Math.max(i.slidesPerViewDynamic("current",!0),1));const l=i.activeIndex<r.slidesPerGroupSkip?1:s,d=i.virtual&&r.virtual.enabled;if(r.loop){if(o&&!d&&r.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&r.cssMode)return requestAnimationFrame((()=>{i.slideTo(i.activeIndex+l,e,t,n)})),!0}return r.rewind&&i.isEnd?i.slideTo(0,e,t,n):i.slideTo(i.activeIndex+l,e,t,n)},slidePrev:function(e,t=!0,n){const i=this,{params:a,snapGrid:r,slidesGrid:o,rtlTranslate:s,enabled:l,animating:d}=i;if(!l||i.destroyed)return i;void 0===e&&(e=i.params.speed);const u=i.virtual&&a.virtual.enabled;if(a.loop){if(d&&!u&&a.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function c(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const h=c(s?i.translate:-i.translate),m=r.map((e=>c(e))),f=a.freeMode&&a.freeMode.enabled;let p=r[m.indexOf(h)-1];if(void 0===p&&(a.cssMode||f)){let e;r.forEach(((t,n)=>{h>=t&&(e=n)})),void 0!==e&&(p=f?r[e]:r[e>0?e-1:e])}let g=0;if(void 0!==p&&(g=o.indexOf(p),g<0&&(g=i.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(g=g-i.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&i.isBeginning){const a=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(a,e,t,n)}return a.loop&&0===i.activeIndex&&a.cssMode?(requestAnimationFrame((()=>{i.slideTo(g,e,t,n)})),!0):i.slideTo(g,e,t,n)},slideReset:function(e,t=!0,n){const i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,n)},slideToClosest:function(e,t=!0,n,i=.5){const a=this;if(a.destroyed)return;void 0===e&&(e=a.params.speed);let r=a.activeIndex;const o=Math.min(a.params.slidesPerGroupSkip,r),s=o+Math.floor((r-o)/a.params.slidesPerGroup),l=a.rtlTranslate?a.translate:-a.translate;if(l>=a.snapGrid[s]){const e=a.snapGrid[s];l-e>(a.snapGrid[s+1]-e)*i&&(r+=a.params.slidesPerGroup)}else{const e=a.snapGrid[s-1];l-e<=(a.snapGrid[s]-e)*i&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,r=e.getSlideIndexWhenGrid(e.clickedIndex);const o=e.isElement?"swiper-slide":`.${t.slideClass}`,s=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;a=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(a):r>(s?(e.slides.length-i)/2-(e.params.grid.rows-1):e.slides.length-i)?(e.loopFix(),r=e.getSlideIndex(sF(n,`${o}[data-swiper-slide-index="${a}"]`)[0]),ZW((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}};var IF={loopCreate:function(e,t){const n=this,{params:i,slidesEl:a}=n;if(!i.loop||n.virtual&&n.params.virtual.enabled)return;const r=()=>{sF(a,`.${i.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},o=n.grid&&i.grid&&i.grid.rows>1;i.loopAddBlankSlides&&(i.slidesPerGroup>1||o)&&(()=>{const e=sF(a,`.${i.slideBlankClass}`);e.forEach((e=>{e.remove()})),e.length>0&&(n.recalcSlides(),n.updateSlides())})();const s=i.slidesPerGroup*(o?i.grid.rows:1),l=n.slides.length%s!=0,d=o&&n.slides.length%i.grid.rows!=0,u=e=>{for(let t=0;t<e;t+=1){const e=n.isElement?dF("swiper-slide",[i.slideBlankClass]):dF("div",[i.slideClass,i.slideBlankClass]);n.slidesEl.append(e)}};if(l){if(i.loopAddBlankSlides){u(s-n.slides.length%s),n.recalcSlides(),n.updateSlides()}else lF("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else if(d){if(i.loopAddBlankSlides){u(i.grid.rows-n.slides.length%i.grid.rows),n.recalcSlides(),n.updateSlides()}else lF("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else r();const c=i.centeredSlides||!!i.slidesOffsetBefore||!!i.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:c?void 0:"next",initial:t})},loopFix:function({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:i,activeSlideIndex:a,initial:r,byController:o,byMousewheel:s}={}){const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:d,allowSlidePrev:u,allowSlideNext:c,slidesEl:h,params:m}=l,{centeredSlides:f,slidesOffsetBefore:p,slidesOffsetAfter:g,initialSlide:v}=m,y=f||!!p||!!g;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&m.virtual.enabled)return t&&(y||0!==l.snapIndex?y&&l.snapIndex<m.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=u,l.allowSlideNext=c,void l.emit("loopFix");let b=m.slidesPerView;"auto"===b?b=l.slidesPerViewDynamic():(b=Math.ceil(parseFloat(m.slidesPerView,10)),y&&b%2==0&&(b+=1));const w=m.slidesPerGroupAuto?b:m.slidesPerGroup;let k=y?Math.max(w,Math.ceil(b/2)):w;k%w!=0&&(k+=w-k%w),k+=m.loopAdditionalSlides,l.loopedSlides=k;const S=l.grid&&m.grid&&m.grid.rows>1;d.length<b+k||"cards"===l.params.effect&&d.length<b+2*k?lF("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):S&&"row"===m.grid.fill&&lF("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const _=[],M=[],E=S?Math.ceil(d.length/m.grid.rows):d.length,P=r&&E-v<b&&!y;let T=P?v:l.activeIndex;void 0===a?a=l.getSlideIndex(d.find((e=>e.classList.contains(m.slideActiveClass)))):T=a;const x="next"===n||!n,A="prev"===n||!n;let C=0,L=0;const I=(S?d[a].column:a)+(y&&void 0===i?-b/2+.5:0);if(I<k){C=Math.max(k-I,w);for(let e=0;e<k-I;e+=1){const t=e-Math.floor(e/E)*E;if(S){const e=E-t-1;for(let t=d.length-1;t>=0;t-=1)d[t].column===e&&_.push(t)}else _.push(E-t-1)}}else if(I+b>E-k){L=Math.max(I-(E-2*k),w),P&&(L=Math.max(L,b-E+v+1));for(let e=0;e<L;e+=1){const t=e-Math.floor(e/E)*E;S?d.forEach(((e,n)=>{e.column===t&&M.push(n)})):M.push(t)}}if(l.__preventObserver__=!0,requestAnimationFrame((()=>{l.__preventObserver__=!1})),"cards"===l.params.effect&&d.length<b+2*k&&(M.includes(a)&&M.splice(M.indexOf(a),1),_.includes(a)&&_.splice(_.indexOf(a),1)),A&&_.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.prepend(d[e]),d[e].swiperLoopMoveDOM=!1})),x&&M.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.append(d[e]),d[e].swiperLoopMoveDOM=!1})),l.recalcSlides(),"auto"===m.slidesPerView?l.updateSlides():S&&(_.length>0&&A||M.length>0&&x)&&l.slides.forEach(((e,t)=>{l.grid.updateSlide(t,e,l.slides)})),m.watchSlidesProgress&&l.updateSlidesOffset(),t)if(_.length>0&&A){if(void 0===e){const e=l.slidesGrid[T],t=l.slidesGrid[T+C]-e;s?l.setTranslate(l.translate-t):(l.slideTo(T+Math.ceil(C),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else if(i){const e=S?_.length/m.grid.rows:_.length;l.slideTo(l.activeIndex+e,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(M.length>0&&x)if(void 0===e){const e=l.slidesGrid[T],t=l.slidesGrid[T-L]-e;s?l.setTranslate(l.translate-t):(l.slideTo(T-L,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else{const e=S?M.length/m.grid.rows:M.length;l.slideTo(l.activeIndex-e,0,!1,!0)}if(l.allowSlidePrev=u,l.allowSlideNext=c,l.controller&&l.controller.control&&!o){const r={slideRealIndex:e,direction:n,setTranslate:i,activeSlideIndex:a,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach((e=>{!e.destroyed&&e.params.loop&&e.loopFix({...r,slideTo:e.params.slidesPerView===m.slidesPerView&&t})})):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...r,slideTo:l.controller.control.params.slidesPerView===m.slidesPerView&&t})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const i=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;i[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),i.forEach((e=>{n.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};var DF={setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}};function RF(e,t,n){const i=QW(),{params:a}=e,r=a.edgeSwipeDetection,o=a.edgeSwipeThreshold;return!r||!(n<=o||n>=i.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function NF(e){const t=this,n=qW();let i=e;i.originalEvent&&(i=i.originalEvent);const a=t.touchEventsData;if("pointerdown"===i.type){if(null!==a.pointerId&&a.pointerId!==i.pointerId)return;a.pointerId=i.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(a.touchId=i.targetTouches[0].identifier);if("touchstart"===i.type)return void RF(t,i,i.targetTouches[0].pageX);const{params:r,touches:o,enabled:s}=t;if(!s)return;if(!r.simulateTouch&&"mouse"===i.pointerType)return;if(t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let l=i.target;if("wrapper"===r.touchEventsTarget&&!function(e,t){const n=QW();let i=t.contains(e);!i&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(i=[...t.assignedElements()].includes(e),i||(i=function(e,t){const n=[t];for(;n.length>0;){const t=n.shift();if(e===t)return!0;n.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}}(e,t)));return i}(l,t.wrapperEl))return;if("which"in i&&3===i.which)return;if("button"in i&&i.button>0)return;if(a.isTouched&&a.isMoved)return;const d=!!r.noSwipingClass&&""!==r.noSwipingClass,u=i.composedPath?i.composedPath():i.path;d&&i.target&&i.target.shadowRoot&&u&&(l=u[0]);const c=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!(!i.target||!i.target.shadowRoot);if(r.noSwiping&&(h?function(e,t=this){return function t(n){if(!n||n===qW()||n===QW())return null;n.assignedSlot&&(n=n.assignedSlot);const i=n.closest(e);return i||n.getRootNode?i||t(n.getRootNode().host):null}(t)}(c,l):l.closest(c)))return void(t.allowClick=!0);if(r.swipeHandler&&!l.closest(r.swipeHandler))return;o.currentX=i.pageX,o.currentY=i.pageY;const m=o.currentX,f=o.currentY;if(!RF(t,i,m))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=m,o.startY=f,a.touchStartTime=eF(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1);let p=!0;l.matches(a.focusableElements)&&(p=!1,"SELECT"===l.nodeName&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==l&&("mouse"===i.pointerType||"mouse"!==i.pointerType&&!l.matches(a.focusableElements))&&n.activeElement.blur();const g=p&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!g||l.isContentEditable||i.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}function WF(e){const t=qW(),n=this,i=n.touchEventsData,{params:a,touches:r,rtlTranslate:o,enabled:s}=n;if(!s)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;let l,d=e;if(d.originalEvent&&(d=d.originalEvent),"pointermove"===d.type){if(null!==i.touchId)return;if(d.pointerId!==i.pointerId)return}if("touchmove"===d.type){if(l=[...d.changedTouches].find((e=>e.identifier===i.touchId)),!l||l.identifier!==i.touchId)return}else l=d;if(!i.isTouched)return void(i.startMoving&&i.isScrolling&&n.emit("touchMoveOpposite",d));const u=l.pageX,c=l.pageY;if(d.preventedByNestedSwiper)return r.startX=u,void(r.startY=c);if(!n.allowTouchMove)return d.target.matches(i.focusableElements)||(n.allowClick=!1),void(i.isTouched&&(Object.assign(r,{startX:u,startY:c,currentX:u,currentY:c}),i.touchStartTime=eF()));if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(c<r.startY&&n.translate<=n.maxTranslate()||c>r.startY&&n.translate>=n.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else{if(o&&(u>r.startX&&-n.translate<=n.maxTranslate()||u<r.startX&&-n.translate>=n.minTranslate()))return;if(!o&&(u<r.startX&&n.translate<=n.maxTranslate()||u>r.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(i.focusableElements)&&t.activeElement!==d.target&&"mouse"!==d.pointerType&&t.activeElement.blur(),t.activeElement&&d.target===t.activeElement&&d.target.matches(i.focusableElements))return i.isMoved=!0,void(n.allowClick=!1);i.allowTouchCallbacks&&n.emit("touchMove",d),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=u,r.currentY=c;const h=r.currentX-r.startX,m=r.currentY-r.startY;if(n.params.threshold&&Math.sqrt(h**2+m**2)<n.params.threshold)return;if(void 0===i.isScrolling){let e;n.isHorizontal()&&r.currentY===r.startY||n.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:h*h+m*m>=25&&(e=180*Math.atan2(Math.abs(m),Math.abs(h))/Math.PI,i.isScrolling=n.isHorizontal()?e>a.touchAngle:90-e>a.touchAngle)}if(i.isScrolling&&n.emit("touchMoveOpposite",d),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===d.type&&i.preventTouchMoveFromPointerMove)return void(i.isTouched=!1);if(!i.startMoving)return;n.allowClick=!1,!a.cssMode&&d.cancelable&&d.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&d.stopPropagation();let f=n.isHorizontal()?h:m,p=n.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;a.oneWayMovement&&(f=Math.abs(f)*(o?1:-1),p=Math.abs(p)*(o?1:-1)),r.diff=f,f*=a.touchRatio,o&&(f=-f,p=-p);const g=n.touchesDirection;n.swipeDirection=f>0?"prev":"next",n.touchesDirection=p>0?"prev":"next";const v=n.params.loop&&!a.cssMode,y="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!i.isMoved){if(v&&y&&n.loopFix({direction:n.swipeDirection}),i.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!a.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",d)}if((new Date).getTime(),!1!==a._loopSwapReset&&i.isMoved&&i.allowThresholdMove&&g!==n.touchesDirection&&v&&y&&Math.abs(f)>=1)return Object.assign(r,{startX:u,startY:c,currentX:u,currentY:c,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);n.emit("sliderMove",d),i.isMoved=!0,i.currentTranslate=f+i.startTranslate;let b=!0,w=a.resistanceRatio;if(a.touchReleaseOnEdges&&(w=0),f>0?(v&&y&&i.allowThresholdMove&&i.currentTranslate>(a.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>n.minTranslate()&&(b=!1,a.resistance&&(i.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+i.startTranslate+f)**w))):f<0&&(v&&y&&i.allowThresholdMove&&i.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===a.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),i.currentTranslate<n.maxTranslate()&&(b=!1,a.resistance&&(i.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-i.startTranslate-f)**w))),b&&(d.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),n.allowSlidePrev||n.allowSlideNext||(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(f)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=n.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(i.currentTranslate),n.setTranslate(i.currentTranslate))}function FF(e){const t=this,n=t.touchEventsData;let i,a=e;a.originalEvent&&(a=a.originalEvent);if("touchend"===a.type||"touchcancel"===a.type){if(i=[...a.changedTouches].find((e=>e.identifier===n.touchId)),!i||i.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(a.pointerId!==n.pointerId)return;i=a}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)){if(!(["pointercancel","contextmenu"].includes(a.type)&&(t.browser.isSafari||t.browser.isWebView)))return}n.pointerId=null,n.touchId=null;const{params:r,touches:o,rtlTranslate:s,slidesGrid:l,enabled:d}=t;if(!d)return;if(!r.simulateTouch&&"mouse"===a.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",a),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const u=eF(),c=u-n.touchStartTime;if(t.allowClick){const e=a.path||a.composedPath&&a.composedPath();t.updateClickedSlide(e&&e[0]||a.target,e),t.emit("tap click",a),c<300&&u-n.lastClickTime<300&&t.emit("doubleTap doubleClick",a)}if(n.lastClickTime=eF(),ZW((()=>{t.destroyed||(t.allowClick=!0)})),!n.isTouched||!n.isMoved||!t.swipeDirection||0===o.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let h;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,h=r.followFinger?s?t.translate:-t.translate:-n.currentTranslate,r.cssMode)return;if(r.freeMode&&r.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});const m=h>=-t.maxTranslate()&&!t.params.loop;let f=0,p=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<r.slidesPerGroupSkip?1:r.slidesPerGroup){const t=e<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==l[e+t]?(m||h>=l[e]&&h<l[e+t])&&(f=e,p=l[e+t]-l[e]):(m||h>=l[e])&&(f=e,p=l[l.length-1]-l[l.length-2])}let g=null,v=null;r.rewind&&(t.isBeginning?v=r.virtual&&r.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const y=(h-l[f])/p,b=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(c>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(y>=r.longSwipesRatio?t.slideTo(r.rewind&&t.isEnd?g:f+b):t.slideTo(f)),"prev"===t.swipeDirection&&(y>1-r.longSwipesRatio?t.slideTo(f+b):null!==v&&y<0&&Math.abs(y)>r.longSwipesRatio?t.slideTo(v):t.slideTo(f))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(a.target===t.navigation.nextEl||a.target===t.navigation.prevEl)?a.target===t.navigation.nextEl?t.slideTo(f+b):t.slideTo(f):("next"===t.swipeDirection&&t.slideTo(null!==g?g:f+b),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:f))}}function OF(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:a,snapGrid:r}=e,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=o&&t.loop;if(!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s)e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);else{const t=o?e.virtual.slides:e.slides;e.slideTo(t.length-1,0,!1,!0)}e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function $F(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function jF(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:i}=e;if(!i)return;let a;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();a=0===r?0:(e.translate-e.minTranslate())/r,a!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function zF(e){const t=this;EF(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function HF(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const BF=(e,t)=>{const n=qW(),{params:i,el:a,wrapperEl:r,device:o}=e,s=!!i.nested,l="on"===t?"addEventListener":"removeEventListener",d=t;a&&"string"!=typeof a&&(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),a[l]("touchstart",e.onTouchStart,{passive:!1}),a[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:s}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&a[l]("click",e.onClick,!0),i.cssMode&&r[l]("scroll",e.onScroll),i.updateOnWindowResize?e[d](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",OF,!0):e[d]("observerUpdate",OF,!0),a[l]("load",e.onLoad,{capture:!0}))};const UF=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var GF={setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:i,el:a}=e,r=i.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const o=qW(),s="window"!==i.breakpointsBase&&i.breakpointsBase?"container":i.breakpointsBase,l=["window","container"].includes(i.breakpointsBase)||!i.breakpointsBase?e.el:o.querySelector(i.breakpointsBase),d=e.getBreakpoint(r,s,l);if(!d||e.currentBreakpoint===d)return;const u=(d in r?r[d]:void 0)||e.originalParams,c=UF(e,i),h=UF(e,u),m=e.params.grabCursor,f=u.grabCursor,p=i.enabled;c&&!h?(a.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&h&&(a.classList.add(`${i.containerModifierClass}grid`),(u.grid.fill&&"column"===u.grid.fill||!u.grid.fill&&"column"===i.grid.fill)&&a.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),m&&!f?e.unsetGrabCursor():!m&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===u[t])return;const n=i[t]&&i[t].enabled,a=u[t]&&u[t].enabled;n&&!a&&e[t].disable(),!n&&a&&e[t].enable()}));const g=u.direction&&u.direction!==i.direction,v=i.loop&&(u.slidesPerView!==i.slidesPerView||g),y=i.loop;g&&n&&e.changeDirection(),iF(e.params,u);const b=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!b?e.disable():!p&&b&&e.enable(),e.currentBreakpoint=d,e.emit("_beforeBreakpoint",u),n&&(v?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&w?(e.loopCreate(t),e.updateSlides()):y&&!w&&e.loopDestroy()),e.emit("breakpoint",u)},getBreakpoint:function(e,t="window",n){if(!e||"container"===t&&!n)return;let i=!1;const a=QW(),r="window"===t?a.innerHeight:n.clientHeight,o=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));o.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<o.length;e+=1){const{point:r,value:s}=o[e];"window"===t?a.matchMedia(`(min-width: ${s}px)`).matches&&(i=r):s<=n.clientWidth&&(i=r)}return i||"max"}};var VF={addClasses:function(){const e=this,{classNames:t,params:n,rtl:i,el:a,device:r}=e,o=function(e,t){const n=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((i=>{e[i]&&n.push(t+i)})):"string"==typeof e&&n.push(t+e)})),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:i},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...o),a.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}};var XF={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function KF(e,t){return function(n={}){const i=Object.keys(n)[0],a=n[i];"object"==typeof a&&null!==a?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in a?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),iF(t,n)):iF(t,n)):iF(t,n)}}const YF={eventsEmitter:SF,update:xF,translate:AF,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e=!0,t){const n=this,{params:i}=n;i.cssMode||(i.autoHeight&&n.updateAutoHeight(),CF({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){const n=this,{params:i}=n;n.animating=!1,i.cssMode||(n.setTransition(0),CF({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:LF,loop:IF,grabCursor:DF,events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=NF.bind(e),e.onTouchMove=WF.bind(e),e.onTouchEnd=FF.bind(e),e.onDocumentTouchStart=HF.bind(e),t.cssMode&&(e.onScroll=jF.bind(e)),e.onClick=$F.bind(e),e.onLoad=zF.bind(e),BF(e,"on")},detachEvents:function(){BF(this,"off")}},breakpoints:GF,checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:i}=n;if(i){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*i;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:VF},qF={};class JF{constructor(...e){let t,n;1===e.length&&e[0].constructor&&"Object"===Object.prototype.toString.call(e[0]).slice(8,-1)?n=e[0]:[t,n]=e,n||(n={}),n=iF({},n),t&&!n.el&&(n.el=t);const i=qW();if(n.el&&"string"==typeof n.el&&i.querySelectorAll(n.el).length>1){const e=[];return i.querySelectorAll(n.el).forEach((t=>{const i=iF({},n,{el:t});e.push(new JF(i))})),e}const a=this;a.__swiper__=!0,a.support=bF(),a.device=wF({userAgent:n.userAgent}),a.browser=kF(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],n.modules&&Array.isArray(n.modules)&&n.modules.forEach((e=>{"function"==typeof e&&a.modules.indexOf(e)<0&&a.modules.push(e)}));const r={};a.modules.forEach((e=>{e({params:n,swiper:a,extendParams:KF(n,r),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})}));const o=iF({},XF,r);return a.params=iF({},o,qF,n),a.originalParams=iF({},a.params),a.passedParams=iF({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach((e=>{a.on(e,a.params.on[e])})),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===a.params.direction,isVertical:()=>"vertical"===a.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,i=cF(sF(t,`.${n.slideClass}, swiper-slide`)[0]);return cF(e)-i}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=sF(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const i=n.minTranslate(),a=(n.maxTranslate()-i)*e+i;n.translateTo(a,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((n=>{const i=e.getSlideClasses(n);t.push({slideEl:n,classNames:i}),e.emit("_slideClass",n,i)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e="current",t=!1){const{params:n,slides:i,slidesGrid:a,slidesSizesGrid:r,size:o,activeIndex:s}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=i[s]?Math.ceil(i[s].swiperSlideSize):0;for(let n=s+1;n<i.length;n+=1)i[n]&&!e&&(t+=Math.ceil(i[n].swiperSlideSize),l+=1,t>o&&(e=!0));for(let n=s-1;n>=0;n-=1)i[n]&&!e&&(t+=i[n].swiperSlideSize,l+=1,t>o&&(e=!0))}else if("current"===e)for(let e=s+1;e<i.length;e+=1){(t?a[e]+r[e]-a[s]<o:a[e]-a[s]<o)&&(l+=1)}else for(let e=s-1;e>=0;e-=1){a[s]-a[e]<o&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let a;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&EF(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)i(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;a=e.slideTo(t.length-1,0,!1,!0)}else a=e.slideTo(e.activeIndex,0,!1,!0);a||i()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const n=this,i=n.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=(()=>{if(n&&n.shadowRoot&&n.shadowRoot.querySelector){return n.shadowRoot.querySelector(i())}return sF(n,i())[0]})();return!a&&t.params.createElements&&(a=dF("div",t.params.wrapperClass),n.append(a),sF(n,`.${t.params.slideClass}`).forEach((e=>{a.append(e)}))),Object.assign(t,{el:n,wrapperEl:a,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:a,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===uF(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===uF(n,"direction")),wrongRTL:"-webkit-box"===uF(a,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach((e=>{e.complete?EF(t,e):e.addEventListener("load",(e=>{EF(t,e.target)}))})),TF(t),t.initialized=!0,TF(t),t.emit("init"),t.emit("afterInit"),t}destroy(e=!0,t=!0){const n=this,{params:i,el:a,wrapperEl:r,slides:o}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.loop&&n.loopDestroy(),t&&(n.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),r&&r.removeAttribute("style"),o&&o.length&&o.forEach((e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((e=>{n.off(e)})),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(n)),n.destroyed=!0),null}static extendDefaults(e){iF(qF,e)}static get extendedDefaults(){return qF}static get defaults(){return XF}static installModule(e){JF.prototype.__modules__||(JF.prototype.__modules__=[]);const t=JF.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>JF.installModule(e))),JF):(JF.installModule(e),JF)}}function QF(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function ZF({swiper:e,extendParams:t,on:n,emit:i}){const a="swiper-pagination";let r;t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`,paginationDisabledClass:`${a}-disabled`}}),e.pagination={el:null,bullets:[]};let o=0;function s(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&0===e.pagination.el.length}function l(t,n){const{bulletActiveClass:i}=e.params.pagination;t&&(t=t[("prev"===n?"previous":"next")+"ElementSibling"])&&(t.classList.add(`${i}-${n}`),(t=t[("prev"===n?"previous":"next")+"ElementSibling"])&&t.classList.add(`${i}-${n}-${n}`))}function d(t){const n=t.target.closest(QF(e.params.pagination.bulletClass));if(!n)return;t.preventDefault();const i=cF(n)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===i)return;const t=(a=e.realIndex,r=i,o=e.slides.length,(r%=o)==1+(a%=o)?"next":r===a-1?"previous":void 0);"next"===t?e.slideNext():"previous"===t?e.slidePrev():e.slideToLoop(i)}else e.slideTo(i);var a,r,o}function u(){const t=e.rtl,n=e.params.pagination;if(s())return;let a,d,u=e.pagination.el;u=fF(u);const c=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,h=e.params.loop?Math.ceil(c/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(d=e.previousRealIndex||0,a=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):void 0!==e.snapIndex?(a=e.snapIndex,d=e.previousSnapIndex):(d=e.previousIndex||0,a=e.activeIndex||0),"bullets"===n.type&&e.pagination.bullets&&e.pagination.bullets.length>0){const i=e.pagination.bullets;let s,c,h;if(n.dynamicBullets&&(r=mF(i[0],e.isHorizontal()?"width":"height"),u.forEach((t=>{t.style[e.isHorizontal()?"width":"height"]=r*(n.dynamicMainBullets+4)+"px"})),n.dynamicMainBullets>1&&void 0!==d&&(o+=a-(d||0),o>n.dynamicMainBullets-1?o=n.dynamicMainBullets-1:o<0&&(o=0)),s=Math.max(a-o,0),c=s+(Math.min(i.length,n.dynamicMainBullets)-1),h=(c+s)/2),i.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${n.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),u.length>1)i.forEach((t=>{const i=cF(t);i===a?t.classList.add(...n.bulletActiveClass.split(" ")):e.isElement&&t.setAttribute("part","bullet"),n.dynamicBullets&&(i>=s&&i<=c&&t.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),i===s&&l(t,"prev"),i===c&&l(t,"next"))}));else{const t=i[a];if(t&&t.classList.add(...n.bulletActiveClass.split(" ")),e.isElement&&i.forEach(((e,t)=>{e.setAttribute("part",t===a?"bullet-active":"bullet")})),n.dynamicBullets){const e=i[s],t=i[c];for(let e=s;e<=c;e+=1)i[e]&&i[e].classList.add(...`${n.bulletActiveClass}-main`.split(" "));l(e,"prev"),l(t,"next")}}if(n.dynamicBullets){const a=Math.min(i.length,n.dynamicMainBullets+4),o=(r*a-r)/2-h*r,s=t?"right":"left";i.forEach((t=>{t.style[e.isHorizontal()?s:"top"]=`${o}px`}))}}u.forEach(((t,r)=>{if("fraction"===n.type&&(t.querySelectorAll(QF(n.currentClass)).forEach((e=>{e.textContent=n.formatFractionCurrent(a+1)})),t.querySelectorAll(QF(n.totalClass)).forEach((e=>{e.textContent=n.formatFractionTotal(h)}))),"progressbar"===n.type){let i;i=n.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";const r=(a+1)/h;let o=1,s=1;"horizontal"===i?o=r:s=r,t.querySelectorAll(QF(n.progressbarFillClass)).forEach((t=>{t.style.transform=`translate3d(0,0,0) scaleX(${o}) scaleY(${s})`,t.style.transitionDuration=`${e.params.speed}ms`}))}"custom"===n.type&&n.renderCustom?(pF(t,n.renderCustom(e,a+1,h)),0===r&&i("paginationRender",t)):(0===r&&i("paginationRender",t),i("paginationUpdate",t)),e.params.watchOverflow&&e.enabled&&t.classList[e.isLocked?"add":"remove"](n.lockClass)}))}function c(){const t=e.params.pagination;if(s())return;const n=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let a=e.pagination.el;a=fF(a);let r="";if("bullets"===t.type){let i=e.params.loop?Math.ceil(n/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&i>n&&(i=n);for(let n=0;n<i;n+=1)t.renderBullet?r+=t.renderBullet.call(e,n,t.bulletClass):r+=`<${t.bulletElement} ${e.isElement?'part="bullet"':""} class="${t.bulletClass}"></${t.bulletElement}>`}"fraction"===t.type&&(r=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`),"progressbar"===t.type&&(r=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`),e.pagination.bullets=[],a.forEach((n=>{"custom"!==t.type&&pF(n,r||""),"bullets"===t.type&&e.pagination.bullets.push(...n.querySelectorAll(QF(t.bulletClass)))})),"custom"!==t.type&&i("paginationRender",a[0])}function h(){e.params.pagination=function(e,t,n,i){return e.params.createElements&&Object.keys(i).forEach((a=>{if(!n[a]&&!0===n.auto){let r=sF(e.el,`.${i[a]}`)[0];r||(r=dF("div",i[a]),r.className=i[a],e.el.append(r)),n[a]=r,t[a]=r}})),n}(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const t=e.params.pagination;if(!t.el)return;let n;"string"==typeof t.el&&e.isElement&&(n=e.el.querySelector(t.el)),n||"string"!=typeof t.el||(n=[...document.querySelectorAll(t.el)]),n||(n=t.el),n&&0!==n.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&Array.isArray(n)&&n.length>1&&(n=[...e.el.querySelectorAll(t.el)],n.length>1&&(n=n.find((t=>hF(t,".swiper")[0]===e.el)))),Array.isArray(n)&&1===n.length&&(n=n[0]),Object.assign(e.pagination,{el:n}),n=fF(n),n.forEach((n=>{"bullets"===t.type&&t.clickable&&n.classList.add(...(t.clickableClass||"").split(" ")),n.classList.add(t.modifierClass+t.type),n.classList.add(e.isHorizontal()?t.horizontalClass:t.verticalClass),"bullets"===t.type&&t.dynamicBullets&&(n.classList.add(`${t.modifierClass}${t.type}-dynamic`),o=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&n.classList.add(t.progressbarOppositeClass),t.clickable&&n.addEventListener("click",d),e.enabled||n.classList.add(t.lockClass)})))}function m(){const t=e.params.pagination;if(s())return;let n=e.pagination.el;n&&(n=fF(n),n.forEach((n=>{n.classList.remove(t.hiddenClass),n.classList.remove(t.modifierClass+t.type),n.classList.remove(e.isHorizontal()?t.horizontalClass:t.verticalClass),t.clickable&&(n.classList.remove(...(t.clickableClass||"").split(" ")),n.removeEventListener("click",d))}))),e.pagination.bullets&&e.pagination.bullets.forEach((e=>e.classList.remove(...t.bulletActiveClass.split(" "))))}n("changeDirection",(()=>{if(!e.pagination||!e.pagination.el)return;const t=e.params.pagination;let{el:n}=e.pagination;n=fF(n),n.forEach((n=>{n.classList.remove(t.horizontalClass,t.verticalClass),n.classList.add(e.isHorizontal()?t.horizontalClass:t.verticalClass)}))})),n("init",(()=>{!1===e.params.pagination.enabled?f():(h(),c(),u())})),n("activeIndexChange",(()=>{void 0===e.snapIndex&&u()})),n("snapIndexChange",(()=>{u()})),n("snapGridLengthChange",(()=>{c(),u()})),n("destroy",(()=>{m()})),n("enable disable",(()=>{let{el:t}=e.pagination;t&&(t=fF(t),t.forEach((t=>t.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass))))})),n("lock unlock",(()=>{u()})),n("click",((t,n)=>{const a=n.target,r=fF(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&r&&r.length>0&&!a.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&a===e.navigation.nextEl||e.navigation.prevEl&&a===e.navigation.prevEl))return;const t=r[0].classList.contains(e.params.pagination.hiddenClass);i(!0===t?"paginationShow":"paginationHide"),r.forEach((t=>t.classList.toggle(e.params.pagination.hiddenClass)))}}));const f=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:t}=e.pagination;t&&(t=fF(t),t.forEach((t=>t.classList.add(e.params.pagination.paginationDisabledClass)))),m()};Object.assign(e.pagination,{enable:()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:t}=e.pagination;t&&(t=fF(t),t.forEach((t=>t.classList.remove(e.params.pagination.paginationDisabledClass)))),h(),c(),u()},disable:f,render:c,update:u,init:h,destroy:m})}function eO({swiper:e,extendParams:t,on:n,emit:i,params:a}){let r,o;e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let s,l,d,u,c,h,m,f=a&&a.autoplay?a.autoplay.delay:3e3,p=a&&a.autoplay?a.autoplay.delay:3e3,g=(new Date).getTime();function v(t){e&&!e.destroyed&&e.wrapperEl&&t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",v),m||t.detail&&t.detail.bySwiperTouchMove||M())}const y=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?l=!0:l&&(p=s,l=!1);const t=e.autoplay.paused?s:g+p-(new Date).getTime();e.autoplay.timeLeft=t,i("autoplayTimeLeft",t,t/f),o=requestAnimationFrame((()=>{y()}))},b=()=>{let t=e.params.autoplay.delay;const n=(()=>{let t;if(t=e.virtual&&e.params.virtual.enabled?e.slides.find((e=>e.classList.contains("swiper-slide-active"))):e.slides[e.activeIndex],!t)return;return parseInt(t.getAttribute("data-swiper-autoplay"),10)})();return!Number.isNaN(n)&&n>0&&(t=n),t},w=t=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(o),y();let n=t;void 0===n&&(n=b(),f=n,p=n),s=n;const a=e.params.speed,l=()=>{e&&!e.destroyed&&(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(a,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,a,!0,!0),i("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(a,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,a,!0,!0),i("autoplay")),e.params.cssMode&&(g=(new Date).getTime(),requestAnimationFrame((()=>{w()}))))};return n>0?(clearTimeout(r),r=setTimeout((()=>{l()}),n)):requestAnimationFrame((()=>{l()})),n},k=()=>{g=(new Date).getTime(),e.autoplay.running=!0,w(),i("autoplayStart")},S=()=>{e.autoplay.running=!1,clearTimeout(r),cancelAnimationFrame(o),i("autoplayStop")},_=(t,n)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(r),t||(h=!0);const a=()=>{i("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",v):M()};if(e.autoplay.paused=!0,n)return void a();const o=s||e.params.autoplay.delay;s=o-((new Date).getTime()-g),e.isEnd&&s<0&&!e.params.loop||(s<0&&(s=0),a())},M=()=>{e.isEnd&&s<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(g=(new Date).getTime(),h?(h=!1,w(s)):w(),e.autoplay.paused=!1,i("autoplayResume"))},E=()=>{if(e.destroyed||!e.autoplay.running)return;const t=qW();"hidden"===t.visibilityState&&(h=!0,_(!0)),"visible"===t.visibilityState&&M()},P=t=>{"mouse"===t.pointerType&&(h=!0,m=!0,e.animating||e.autoplay.paused||_(!0))},T=t=>{"mouse"===t.pointerType&&(m=!1,e.autoplay.paused&&M())};n("init",(()=>{e.params.autoplay.enabled&&(e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",P),e.el.addEventListener("pointerleave",T)),qW().addEventListener("visibilitychange",E),k())})),n("destroy",(()=>{e.el&&"string"!=typeof e.el&&(e.el.removeEventListener("pointerenter",P),e.el.removeEventListener("pointerleave",T)),qW().removeEventListener("visibilitychange",E),e.autoplay.running&&S()})),n("_freeModeStaticRelease",(()=>{(u||h)&&M()})),n("_freeModeNoMomentumRelease",(()=>{e.params.autoplay.disableOnInteraction?S():_(!0,!0)})),n("beforeTransitionStart",((t,n,i)=>{!e.destroyed&&e.autoplay.running&&(i||!e.params.autoplay.disableOnInteraction?_(!0,!0):S())})),n("sliderFirstMove",(()=>{!e.destroyed&&e.autoplay.running&&(e.params.autoplay.disableOnInteraction?S():(d=!0,u=!1,h=!1,c=setTimeout((()=>{h=!0,u=!0,_(!0)}),200)))})),n("touchEnd",(()=>{if(!e.destroyed&&e.autoplay.running&&d){if(clearTimeout(c),clearTimeout(r),e.params.autoplay.disableOnInteraction)return u=!1,void(d=!1);u&&e.params.cssMode&&M(),u=!1,d=!1}})),n("slideChange",(()=>{!e.destroyed&&e.autoplay.running&&e.autoplay.paused&&(s=b(),f=b())})),Object.assign(e.autoplay,{start:k,stop:S,pause:_,resume:M})}function tO(e,t){const n=oF(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function nO(e,t,n){const i=`swiper-slide-shadow${n?`-${n}`:""} swiper-slide-shadow-${e}`,a=oF(t);let r=a.querySelector(`.${i.split(" ").join(".")}`);return r||(r=dF("div",i.split(" ")),a.append(r)),r}function iO({swiper:e,extendParams:t,on:n}){t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}});!function(e){const{effect:t,swiper:n,on:i,setTranslate:a,setTransition:r,overwriteParams:o,perspective:s,recreateShadows:l,getEffectParams:d}=e;let u;i("beforeInit",(()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),s&&s()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=o?o():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)})),i("setTranslate _virtualUpdated",(()=>{n.params.effect===t&&a()})),i("setTransition",((e,i)=>{n.params.effect===t&&r(i)})),i("transitionEnd",(()=>{if(n.params.effect===t&&l){if(!d||!d().slideShadows)return;n.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),l()}})),i("virtualUpdate",(()=>{n.params.effect===t&&(n.slides.length||(u=!0),requestAnimationFrame((()=>{u&&n.slides&&n.slides.length&&(a(),u=!1)})))}))}({effect:"coverflow",swiper:e,on:n,setTranslate:()=>{const{width:t,height:n,slides:i,slidesSizesGrid:a}=e,r=e.params.coverflowEffect,o=e.isHorizontal(),s=e.translate,l=o?t/2-s:n/2-s,d=o?r.rotate:-r.rotate,u=r.depth,c=function(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}(e);for(let e=0,t=i.length;e<t;e+=1){const t=i[e],n=a[e],s=(l-t.swiperSlideOffset-n/2)/n,h="function"==typeof r.modifier?r.modifier(s):s*r.modifier;let m=o?d*h:0,f=o?0:d*h,p=-u*Math.abs(h),g=r.stretch;"string"==typeof g&&-1!==g.indexOf("%")&&(g=parseFloat(r.stretch)/100*n);let v=o?0:g*h,y=o?g*h:0,b=1-(1-r.scale)*Math.abs(h);Math.abs(y)<.001&&(y=0),Math.abs(v)<.001&&(v=0),Math.abs(p)<.001&&(p=0),Math.abs(m)<.001&&(m=0),Math.abs(f)<.001&&(f=0),Math.abs(b)<.001&&(b=0);const w=`translate3d(${y}px,${v}px,${p}px) rotateX(${c(f)}deg) rotateY(${c(m)}deg) scale(${b})`;if(tO(0,t).style.transform=w,t.style.zIndex=1-Math.abs(Math.round(h)),r.slideShadows){let e=o?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),n=o?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=nO("coverflow",t,o?"left":"top")),n||(n=nO("coverflow",t,o?"right":"bottom")),e&&(e.style.opacity=h>0?h:0),n&&(n.style.opacity=-h>0?-h:0)}}},setTransition:t=>{e.slides.map((e=>oF(e))).forEach((e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>{e.style.transitionDuration=`${t}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}Object.keys(YF).forEach((e=>{Object.keys(YF[e]).forEach((t=>{JF.prototype[t]=YF[e][t]}))})),JF.use([function({swiper:e,on:t,emit:n}){const i=QW();let a=null,r=null;const o=()=>{e&&!e.destroyed&&e.initialized&&(n("beforeResize"),n("resize"))},s=()=>{e&&!e.destroyed&&e.initialized&&n("orientationchange")};t("init",(()=>{e.params.resizeObserver&&void 0!==i.ResizeObserver?e&&!e.destroyed&&e.initialized&&(a=new ResizeObserver((t=>{r=i.requestAnimationFrame((()=>{const{width:n,height:i}=e;let a=n,r=i;t.forEach((({contentBoxSize:t,contentRect:n,target:i})=>{i&&i!==e.el||(a=n?n.width:(t[0]||t).inlineSize,r=n?n.height:(t[0]||t).blockSize)})),a===n&&r===i||o()}))})),a.observe(e.el)):(i.addEventListener("resize",o),i.addEventListener("orientationchange",s))})),t("destroy",(()=>{r&&i.cancelAnimationFrame(r),a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",s)}))},function({swiper:e,extendParams:t,on:n,emit:i}){const a=[],r=QW(),o=(t,n={})=>{const o=new(r.MutationObserver||r.WebkitMutationObserver)((t=>{if(e.__preventObserver__)return;if(1===t.length)return void i("observerUpdate",t[0]);const n=function(){i("observerUpdate",t[0])};r.requestAnimationFrame?r.requestAnimationFrame(n):r.setTimeout(n,0)}));o.observe(t,{attributes:void 0===n.attributes||n.attributes,childList:e.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),a.push(o)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",(()=>{if(e.params.observer){if(e.params.observeParents){const t=hF(e.hostEl);for(let e=0;e<t.length;e+=1)o(t[e])}o(e.hostEl,{childList:e.params.observeSlideChildren}),o(e.wrapperEl,{attributes:!1})}})),n("destroy",(()=>{a.forEach((e=>{e.disconnect()})),a.splice(0,a.length)}))}]);let aO=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.updateSpacing=e=>{this.slideSpacing=e.detail.spacing,this.swiperInstance&&(this.swiperInstance.params.spaceBetween=this.slideSpacing,this.swiperInstance.update())}}connectedCallback(){super.connectedCallback(),window.addEventListener("child-spacing",this.updateSpacing,!1)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("child-spacing",this.updateSpacing,!1)}styles(){const{scaleFactor:e,component:t}=this,{backgroundBlur:n,indicator:i,activeIndicator:a,previousSlidePadding:r,nextSlidePadding:o}=t,s="vertical"===t.direction?"margin-top":"margin-left";return Rh(`\n :host {\n display: ${t.hidden?"none":"flex"};\n flex-direction: column !important;\n ${eg(t.position)} \n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ${n?`backdrop-filter: blur(${n}px);`:""}\n z-index: ${t.zIndex??1};\n top: 0px;\n transition: all 0.3s;\n ${Up(t,e)}\n ${function(e,t){return`\n padding-right: ${Rp(t,e.nextSlidePadding)}px !important;\n padding-left: ${Rp(t,e.previousSlidePadding)}px !important;\n `}(t,e)}\n ${jp(t)}\n ${$p(t,!1)}\n max-width: 100vw;\n }\n :host(:focus){\n ${$p(t,!0)}\n ${Qp(t,e,!0)}\n }\n :host(:focus-visible){\n ${ag(t)}\n }\n :host > *:not(:first-child) {\n ${s}: ${t.spacing?t.spacing*e:0}px;\n }\n .swiper-container {\n ${Xp(t,e)};\n padding-left: ${r??0}px;\n padding-right: ${o??0}px;\n box-sizing: border-box;\n }\n .swiper-pagination{\n position: relative;\n padding: 8px;\n }\n .swiper-pagination-bullet {\n opacity: 1 !important;\n ${null!=i?.width?`width: ${i.width}px !important;`:""}\n ${null!=i?.height?`height: ${i.height}px !important;`:""}\n ${null!=i?.borderRadius?`border-radius: ${i.borderRadius}px !important;`:""}\n background: ${i?.fillColor??t.indicatorColor} !important;\n }\n .swiper-pagination-bullet-active {\n ${null!=a?.width?`width: ${a.width}px !important;`:""}\n ${null!=a?.height?`height: ${a.height}px !important;`:""}\n ${null!=a?.borderRadius?`border-radius: ${a.borderRadius}px !important;`:""}\n background: ${a?.fillColor??t.activeIndicatorColor} !important;\n }\n `)}updated(){const e=[ZF,eO],{autoplay:t,autoplaySeconds:n,showIndicators:i,slideSpacing:a,inactiveSlideScale:r}=this.component;r&&e.push(iO),JF.use(e);const o=this.shadowRoot?.querySelector(".swiper-container"),s=this.shadowRoot?.querySelector(".swiper-pagination");if(o&&!this.swiperInstance){const e={initialSlide:0,slidesPerView:1,loop:t,spaceBetween:a??this.slideSpacing??0,autoplay:!!t&&{delay:1e3*n,disableOnInteraction:!1},pagination:!(null!=i&&!i)&&{el:s,clickable:!0},on:{init:e=>{this.handleSlideChange(e)},slideChange:e=>{this.handleSlideChange(e)}}};r&&(e.effect="coverflow",e.coverflowEffect={rotate:0,stretch:0,depth:100,modifier:1,slideShadows:!1,scale:r}),this.swiperInstance=new JF(o,e)}}handleSlideChange(e){if(this.contextProvider.setCurrentSlideIndex(e.realIndex),this.component.onChange){const e=this.getCarouselOnChange(this.component),t=e?.parameters?.partialState?.currentGroupId;t&&this.contextProvider.setCurrentGroupData(t,"")}}getCarouselOnChange(e){if(!e.onChange)return;const{parameters:t}=e.onChange;if(!t)return;const{slides:n}=this.contextProvider.state,i="string"==typeof e.loopSource?e.loopSource:"",a=n?.[i]?.carouselName?.[this.contextProvider.state.currentSlideIndex];return og(e.onChange,{slide:a,sku:this.contextProvider.state.sku,state:this.contextProvider.state,launch:this.contextProvider.state.launch,customer:this.contextProvider.state.customer})}getCarouselSlides(e){if(!e.loopSource)return[];const{slides:t,selectedProducts:n}=this.contextProvider.state,i="string"==typeof e.loopSource?e.loopSource:"",a=Ju(this.contextProvider.productDetails,this.contextProvider.getSelectedPaywall()?.sku_menus??[],i);let r=[];Xm(t)||(r=""!=i?t[i].carouselName:e.loopSource??[]);const o=this.contextProvider.filteredSkuMenus.map((e=>e.id));return r.filter((e=>!e.productGroupId||o.includes(e.productGroupId))).map((t=>{const i=a.find((e=>e.id==n[t.productGroupId]));return og(e.components,og({slide:t},{sku:{...ec(i?.product_details,t,a)}}))||[]}))}render(){const e=this.getCarouselSlides(this.component),{focusedBorderColor:t,focusedFillColor:n,fillColor:i}=this.component;return!t&&gg(i,n)||(this.tabIndex=0),bm`
294
294
  <link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css"/>
295
295
  <div class="swiper-container" aria-live="assertive" aria-atomic="true">
296
296
  <div class="swiper-wrapper">
@@ -301,7 +301,7 @@
301
301
  </div>
302
302
  </div>
303
303
  <div class="swiper-pagination"></div>
304
- `}};T([Gm({type:Object})],iO.prototype,"component",void 0),T([Gm({type:Boolean})],iO.prototype,"inFocusedState",void 0),T([Gm({type:Number})],iO.prototype,"scaleFactor",void 0),T([Gm({type:Object})],iO.prototype,"minSDKVersion",void 0),iO=T([Hm("nami-carousel-container")],iO);let aO=class extends Sp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleFocus=()=>{this.inFocusedState=!0,this._announceButtonLabel()},this._handleBlur=()=>{this.inFocusedState=!1},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()},this._handleClick=()=>{Gg({contextProvider:this.contextProvider,onTap:this.muted?this.component.mutedOnTap:this.component.volumeOnTap}),this.requestUpdate()},this.addEventListener("click",this._handleClick,!1),this.addEventListener("focus",this._handleFocus,!1),this.addEventListener("blur",this._handleBlur,!1),this.addEventListener("keydown",this._handleKeyDown,!1)}_announceButtonLabel(){const e=this.component.screenreaderText||this.component.title||"";e&&Mh(e)}updated(){this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=this.component.screenreaderHint??""}styles(){const{component:e,scaleFactor:t}=this,n="vertical"===e.direction?"margin-top":"margin-left";return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${$p(e,!1)}\n ${jp(e)}\n ${Qp(e,t,!1)}\n }\n :host(:focus){\n ${$p(e,!0)}\n ${Qp(e,t,!0)}\n }\n :host(:focus-visible){\n ${ag(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}render(){this.muted=Ug.instance?.muted??!1,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});const e=this.muted?this.component.mutedComponents:this.component.volumeComponents;return e?.map((e=>vg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}};T([Gm({type:Object})],aO.prototype,"component",void 0),T([Gm({type:Boolean})],aO.prototype,"inFocusedState",void 0),T([Gm({type:Number})],aO.prototype,"scaleFactor",void 0),T([Gm({type:Object})],aO.prototype,"minSDKVersion",void 0),aO=T([Hm("nami-volume-button")],aO);let rO=class extends Sp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleFocus=()=>{this.inFocusedState=!0,this._announceButtonLabel()},this._handleBlur=()=>{this.inFocusedState=!1},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()},this._handleClick=()=>{Gg({contextProvider:this.contextProvider,onTap:this.playing?this.component.playingOnTap:this.component.pausedOnTap}),this.requestUpdate()},this.addEventListener("click",this._handleClick,!1),this.addEventListener("focus",this._handleFocus,!1),this.addEventListener("blur",this._handleBlur,!1),this.addEventListener("keydown",this._handleKeyDown,!1)}_announceButtonLabel(){const e=this.component.screenreaderText||this.component.title||"";e&&Mh(e)}updated(){this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=this.component.screenreaderHint??""}styles(){const{component:e,scaleFactor:t}=this,n="vertical"===e.direction?"margin-top":"margin-left";return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${$p(e,!1)}\n ${jp(e)}\n ${Qp(e,t,!1)}\n }\n :host(:focus){\n ${$p(e,!0)}\n ${Qp(e,t,!0)}\n }\n :host(:focus-visible){\n ${ag(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}render(){this.playing=Ug.instance?.playing??!1,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});return(this.playing?this.component.playingComponents:this.component.pausedComponents).map((e=>vg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}};T([Gm({type:Object})],rO.prototype,"component",void 0),T([Gm({type:Boolean})],rO.prototype,"inFocusedState",void 0),T([Gm({type:Number})],rO.prototype,"scaleFactor",void 0),T([Gm({type:Object})],rO.prototype,"minSDKVersion",void 0),rO=T([Hm("nami-play-pause-button")],rO);let oO=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{component:e,scaleFactor:t,minSDKVersion:n}=this,{backgroundBlur:i}=e,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=e.fillImage?Rh(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):Rh($p(e,!1));return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${s};\n ${eg(e.position)}\n ${jp(e)}\n ${Qp(e,t,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${$p(e,!0)}\n ${Qp(e,t,!0)}\n }\n :host(:focus-visible){\n ${ag(e)}\n }\n :host > *:not(nami-text) {\n position: absolute;\n }\n :host > * {\n ${Hp(n,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}render(){const{focusedBorderColor:e,focusedFillColor:t,fillColor:n}=this.component;!e&&gg(n,t)||(this.tabIndex=0);return(this.component.components??[]).map((e=>vg(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}};function sO(e){const[t,n,i,a,r,o]=e.match(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/)??[];return{semver:t,major:Number.parseInt(n)||3,minor:Number.parseInt(i)||0,patch:Number.parseInt(a)||0,prerelease:r,buildmetadata:o}}function lO(e,t){e&&(function(e,t){return e.major!==t.major?e.major>t.major?1:-1:e.minor!==t.minor?e.minor>t.minor?1:-1:e.patch!==t.patch?e.patch>t.patch?1:-1:0}(sO(C),e)>=0||Ze.warn(`Component ${t} requires SDK version ${e.semver} or higher, but current SDK version is ${C}`))}T([Gm({type:Object})],oO.prototype,"component",void 0),T([Gm({type:Boolean})],oO.prototype,"inFocusedState",void 0),T([Gm({type:Number})],oO.prototype,"scaleFactor",void 0),T([Gm({type:Object})],oO.prototype,"minSDKVersion",void 0),oO=T([Hm("nami-stack")],oO);const dO="nami-disabled";let uO=class extends $m{constructor(){super(...arguments),this.timeSpentOnPaywall=0}connectedCallback(){super.connectedCallback(),this.minSDKVersion=sO(this.paywall.template.min_sdk_version),this.contextProvider=dh.create(this.paywall,this.context,this.campaign),this.contextConsumer=new mp(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(dO),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}disconnectedCallback(){super.disconnectedCallback(),dh.remove(this.contextProvider),this.teardownEvent()}userInteractionListener(e){this.classList.toggle(dO,!e.enabled)}firstUpdated(){this.postImpression(),this.postPaywallScreenData()}postImpression(){(async e=>{if(ud())return void Ze.info("Skipping paywall impression - anonymous mode");const t=ca.getSessionId();t&&(e.session=t);const n=ca.getLaunchId();n&&(e.launch_id=n),e.app_env="production",e.url_params=Af(),Ze.info("Post paywall impression - segment ",e.segment);try{await Zs.instance.postImpression(e)}catch(e){Ze.error("Error posting impression",e)}})({segment:this.campaign?.segment,call_to_action:this.paywall.id})}postPaywallScreenData(){nd.getInstance().emit(Be,{...this.contextProvider.getPaywallActionEventData(),action:e.NamiPaywallAction.SHOW_PAYWALL})}getTemplate(){let e;e=this.contextProvider.state.selectedPaywall===this.paywall?this.contextProvider.state.currentPage:this.paywall.template?.initialState?.currentPage??"page1";const t=this.paywall.template?.pages.find((t=>t.name===e));if(!t)throw new Error(`Page with name ${e} not found in paywall template.`);return t}render(){const e=this.getTemplate(),{backgroundContainer:t,header:n=[],footer:i=[],contentContainer:a}=e,r=this.contextProvider.state.fullScreenPresentation??!1,o=this.contextProvider.getFormFactor(),s=function(e){if(e||(e=El()),"television"!==e)return 1;const{innerWidth:t,innerHeight:n}=window,i=t.toString()+"x"+n.toString();return Pl[i]??Tl()}(o);return bm`
304
+ `}};T([Gm({type:Object})],aO.prototype,"component",void 0),T([Gm({type:Boolean})],aO.prototype,"inFocusedState",void 0),T([Gm({type:Number})],aO.prototype,"scaleFactor",void 0),T([Gm({type:Object})],aO.prototype,"minSDKVersion",void 0),aO=T([Hm("nami-carousel-container")],aO);let rO=class extends Sp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleFocus=()=>{this.inFocusedState=!0,this._announceButtonLabel()},this._handleBlur=()=>{this.inFocusedState=!1},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()},this._handleClick=()=>{Gg({contextProvider:this.contextProvider,onTap:this.muted?this.component.mutedOnTap:this.component.volumeOnTap}),this.requestUpdate()},this.addEventListener("click",this._handleClick,!1),this.addEventListener("focus",this._handleFocus,!1),this.addEventListener("blur",this._handleBlur,!1),this.addEventListener("keydown",this._handleKeyDown,!1)}_announceButtonLabel(){const e=this.component.screenreaderText||this.component.title||"";e&&Mh(e)}updated(){this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=this.component.screenreaderHint??""}styles(){const{component:e,scaleFactor:t}=this,n="vertical"===e.direction?"margin-top":"margin-left";return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${$p(e,!1)}\n ${jp(e)}\n ${Qp(e,t,!1)}\n }\n :host(:focus){\n ${$p(e,!0)}\n ${Qp(e,t,!0)}\n }\n :host(:focus-visible){\n ${ag(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}render(){this.muted=Ug.instance?.muted??!1,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});const e=this.muted?this.component.mutedComponents:this.component.volumeComponents;return e?.map((e=>vg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}};T([Gm({type:Object})],rO.prototype,"component",void 0),T([Gm({type:Boolean})],rO.prototype,"inFocusedState",void 0),T([Gm({type:Number})],rO.prototype,"scaleFactor",void 0),T([Gm({type:Object})],rO.prototype,"minSDKVersion",void 0),rO=T([Hm("nami-volume-button")],rO);let oO=class extends Sp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleFocus=()=>{this.inFocusedState=!0,this._announceButtonLabel()},this._handleBlur=()=>{this.inFocusedState=!1},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()},this._handleClick=()=>{Gg({contextProvider:this.contextProvider,onTap:this.playing?this.component.playingOnTap:this.component.pausedOnTap}),this.requestUpdate()},this.addEventListener("click",this._handleClick,!1),this.addEventListener("focus",this._handleFocus,!1),this.addEventListener("blur",this._handleBlur,!1),this.addEventListener("keydown",this._handleKeyDown,!1)}_announceButtonLabel(){const e=this.component.screenreaderText||this.component.title||"";e&&Mh(e)}updated(){this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=this.component.screenreaderHint??""}styles(){const{component:e,scaleFactor:t}=this,n="vertical"===e.direction?"margin-top":"margin-left";return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${$p(e,!1)}\n ${jp(e)}\n ${Qp(e,t,!1)}\n }\n :host(:focus){\n ${$p(e,!0)}\n ${Qp(e,t,!0)}\n }\n :host(:focus-visible){\n ${ag(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}render(){this.playing=Ug.instance?.playing??!1,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});return(this.playing?this.component.playingComponents:this.component.pausedComponents).map((e=>vg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}};T([Gm({type:Object})],oO.prototype,"component",void 0),T([Gm({type:Boolean})],oO.prototype,"inFocusedState",void 0),T([Gm({type:Number})],oO.prototype,"scaleFactor",void 0),T([Gm({type:Object})],oO.prototype,"minSDKVersion",void 0),oO=T([Hm("nami-play-pause-button")],oO);let sO=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{component:e,scaleFactor:t,minSDKVersion:n}=this,{backgroundBlur:i}=e,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=e.fillImage?Rh(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):Rh($p(e,!1));return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${s};\n ${eg(e.position)}\n ${jp(e)}\n ${Qp(e,t,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${$p(e,!0)}\n ${Qp(e,t,!0)}\n }\n :host(:focus-visible){\n ${ag(e)}\n }\n :host > *:not(nami-text) {\n position: absolute;\n }\n :host > * {\n ${Hp(n,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}render(){const{focusedBorderColor:e,focusedFillColor:t,fillColor:n}=this.component;!e&&gg(n,t)||(this.tabIndex=0);return(this.component.components??[]).map((e=>vg(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}};function lO(e){const[t,n,i,a,r,o]=e.match(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/)??[];return{semver:t,major:Number.parseInt(n)||3,minor:Number.parseInt(i)||0,patch:Number.parseInt(a)||0,prerelease:r,buildmetadata:o}}function dO(e,t){e&&(function(e,t){return e.major!==t.major?e.major>t.major?1:-1:e.minor!==t.minor?e.minor>t.minor?1:-1:e.patch!==t.patch?e.patch>t.patch?1:-1:0}(lO(C),e)>=0||Ze.warn(`Component ${t} requires SDK version ${e.semver} or higher, but current SDK version is ${C}`))}T([Gm({type:Object})],sO.prototype,"component",void 0),T([Gm({type:Boolean})],sO.prototype,"inFocusedState",void 0),T([Gm({type:Number})],sO.prototype,"scaleFactor",void 0),T([Gm({type:Object})],sO.prototype,"minSDKVersion",void 0),sO=T([Hm("nami-stack")],sO);const uO="nami-disabled";let cO=class extends $m{constructor(){super(...arguments),this.timeSpentOnPaywall=0}connectedCallback(){super.connectedCallback(),this.minSDKVersion=lO(this.paywall.template.min_sdk_version),this.contextProvider=dh.create(this.paywall,this.context,this.campaign),this.contextConsumer=new mp(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(uO),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}disconnectedCallback(){super.disconnectedCallback(),dh.remove(this.contextProvider),this.teardownEvent()}userInteractionListener(e){this.classList.toggle(uO,!e.enabled)}firstUpdated(){this.postImpression(),this.postPaywallScreenData()}postImpression(){(async e=>{if(ud())return void Ze.info("Skipping paywall impression - anonymous mode");const t=ca.getSessionId();t&&(e.session=t);const n=ca.getLaunchId();n&&(e.launch_id=n),e.app_env="production",e.url_params=Af(),Ze.info("Post paywall impression - segment ",e.segment);try{await Zs.instance.postImpression(e)}catch(e){Ze.error("Error posting impression",e)}})({segment:this.campaign?.segment,call_to_action:this.paywall.id})}postPaywallScreenData(){nd.getInstance().emit(Be,{...this.contextProvider.getPaywallActionEventData(),action:e.NamiPaywallAction.SHOW_PAYWALL})}getTemplate(){let e;e=this.contextProvider.state.selectedPaywall===this.paywall?this.contextProvider.state.currentPage:this.paywall.template?.initialState?.currentPage??"page1";const t=this.paywall.template?.pages.find((t=>t.name===e));if(!t)throw new Error(`Page with name ${e} not found in paywall template.`);return t}render(){const e=this.getTemplate(),{backgroundContainer:t,header:n=[],footer:i=[],contentContainer:a}=e,r=this.contextProvider.state.fullScreenPresentation??!1,o=this.contextProvider.getFormFactor(),s=function(e){if(e||(e=El()),"television"!==e)return 1;const{innerWidth:t,innerHeight:n}=window,i=t.toString()+"x"+n.toString();return Pl[i]??Tl()}(o);return bm`
305
305
  <nami-background-container
306
306
  .component=${t}
307
307
  .scaleFactor=${s}
@@ -325,7 +325,7 @@
325
325
  .scaleFactor=${s}
326
326
  .minSDKVersion=${this.minSDKVersion}
327
327
  ></nami-footer>
328
- `}};uO.styles=Nh`
328
+ `}};cO.styles=Nh`
329
329
  :host {
330
330
  display: flex;
331
331
  flex-direction: column;
@@ -334,15 +334,15 @@
334
334
  min-height: 0;
335
335
  overflow: hidden;
336
336
  }
337
- `,T([Gm({type:Object})],uO.prototype,"paywall",void 0),T([Gm({type:Object})],uO.prototype,"campaign",void 0),T([Gm({type:Object})],uO.prototype,"context",void 0),T([function({context:e}){return(t,n)=>{const i=new WeakMap;if("object"==typeof n)return{get(){return t.get.call(this)},set(e){return i.get(this).setValue(e),t.set.call(this,e)},init(t){return i.set(this,new hp(this,{context:e,initialValue:t})),t}};{t.constructor.addInitializer((t=>{i.set(t,new hp(t,{context:e}))}));const a=Object.getOwnPropertyDescriptor(t,n);let r;if(void 0===a){const e=new WeakMap;r={get(){return e.get(this)},set(t){i.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{const e=a.set;r={...a,set(t){i.get(this).setValue(t),e?.call(this,t)}}}return void Object.defineProperty(t,n,r)}}}({context:fp})],uO.prototype,"contextProvider",void 0),uO=T([Hm("nami-paywall-screen")],uO);var cO,hO,mO={};function fO(){return hO?cO:(hO=1,cO=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var pO,gO={},vO={};function yO(){if(pO)return vO;let e;pO=1;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return vO.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},vO.getSymbolTotalCodewords=function(e){return t[e]},vO.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},vO.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},vO.isKanjiModeEnabled=function(){return void 0!==e},vO.toSJIS=function(t){return e(t)},vO}var bO,wO,kO,SO,_O,MO={};function EO(){return bO||(bO=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return n}}}(MO)),MO}var PO,TO={};var xO,AO={};var CO,LO={};var IO,DO={};function RO(){if(IO)return DO;IO=1;const e=EO(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return DO.getBlocksCount=function(n,i){switch(i){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},DO.getTotalCodewordsCount=function(t,i){switch(i){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},DO}var NO,WO,FO,OO,$O={},jO={};function zO(){return WO||(WO=1,function(e){const t=function(){if(NO)return jO;NO=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let n=1;for(let i=0;i<255;i++)e[i]=n,t[n]=i,n<<=1,256&n&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),jO.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},jO.exp=function(t){return e[t]},jO.mul=function(n,i){return 0===n||0===i?0:e[t[n]+t[i]]},jO}();e.mul=function(e,n){const i=new Uint8Array(e.length+n.length-1);for(let a=0;a<e.length;a++)for(let r=0;r<n.length;r++)i[a+r]^=t.mul(e[a],n[r]);return i},e.mod=function(e,n){let i=new Uint8Array(e);for(;i.length-n.length>=0;){const e=i[0];for(let a=0;a<n.length;a++)i[a]^=t.mul(n[a],e);let a=0;for(;a<i.length&&0===i[a];)a++;i=i.slice(a)}return i},e.generateECPolynomial=function(n){let i=new Uint8Array([1]);for(let a=0;a<n;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}}($O)),$O}var HO,BO={},UO={},GO={};function VO(){return HO||(HO=1,GO.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),GO}var XO,KO,YO,qO={};function JO(){if(XO)return qO;XO=1;const e="[0-9]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+")(?:.|[\r\n]))+";qO.KANJI=new RegExp(t,"g"),qO.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),qO.BYTE=new RegExp(n,"g"),qO.NUMERIC=new RegExp(e,"g"),qO.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return qO.testKanji=function(e){return i.test(e)},qO.testNumeric=function(e){return a.test(e)},qO.testAlphanumeric=function(e){return r.test(e)},qO}function QO(){return KO||(KO=1,function(e){const t=VO(),n=JO();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return n}}}(UO)),UO}function ZO(){return YO||(YO=1,function(e){const t=yO(),n=RO(),i=EO(),a=QO(),r=VO(),o=t.getBCHDigit(7973);function s(e,t){return a.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach((function(e){const i=s(e.mode,t);n+=i+e.getBitsLength()})),n}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,i,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,i));if(o===a.MIXED)return l;const d=l-s(o,e);switch(o){case a.NUMERIC:return Math.floor(d/10*3);case a.ALPHANUMERIC:return Math.floor(d/11*2);case a.KANJI:return Math.floor(d/13);case a.BYTE:default:return Math.floor(d/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let i=1;i<=40;i++)if(l(t,i)<=e.getCapacity(i,n,a.MIXED))return i}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,i){for(let a=1;a<=40;a++)if(n<=e.getCapacity(a,i,t))return a}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;t.getBCHDigit(n)-o>=0;)n^=7973<<t.getBCHDigit(n)-o;return e<<12|n}}(BO)),BO}var e$,t$={};var n$,i$,a$,r$,o$,s$,l$,d$,u$={};var c$,h$,m$,f$={exports:{}};function p$(){return c$||(c$=1,function(e){var t={single_source_shortest_paths:function(e,n,i){var a={},r={};r[n]=0;var o,s,l,d,u,c,h,m=t.PriorityQueue.make();for(m.push(n,0);!m.empty();)for(l in s=(o=m.pop()).value,d=o.cost,u=e[s]||{})u.hasOwnProperty(l)&&(c=d+u[l],h=r[l],(void 0===r[l]||h>c)&&(r[l]=c,m.push(l,c),a[l]=s));if(void 0!==i&&void 0===r[i]){var f=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],i=t;i;)n.push(i),e[i],i=e[i];return n.reverse(),n},find_path:function(e,n,i){var a=t.single_source_shortest_paths(e,n,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(e){var n,i=t.PriorityQueue,a={};for(n in e=e||{},i)i.hasOwnProperty(n)&&(a[n]=i[n]);return a.queue=[],a.sorter=e.sorter||i.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(f$)),f$.exports}function g$(){return h$||(h$=1,function(e){const t=QO(),n=function(){if(i$)return n$;i$=1;const e=QO();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t,n,i;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),i=parseInt(n,10),e.put(i,10);const a=this.data.length-t;a>0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,3*a+1))},n$=t}(),i=function(){if(r$)return a$;r$=1;const e=QO(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=45*t.indexOf(this.data[n]);i+=t.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},a$=n}(),a=function(){if(s$)return o$;s$=1;const e=QO();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},o$=t}(),r=function(){if(d$)return l$;d$=1;const e=QO(),t=yO();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}},l$=n}(),o=JO(),s=yO(),l=p$();function d(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){const i=[];let a;for(;null!==(a=e.exec(n));)i.push({data:a[0],index:a.index,mode:t,length:a[0].length});return i}function c(e){const n=u(o.NUMERIC,t.NUMERIC,e),i=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e);let a,r;s.isKanjiModeEnabled()?(a=u(o.BYTE,t.BYTE,e),r=u(o.KANJI,t.KANJI,e)):(a=u(o.BYTE_KANJI,t.BYTE,e),r=[]);return n.concat(i,a,r).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function h(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return i.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function m(e,o){let l;const d=t.getBestModeForData(e);if(l=t.from(o,d),l!==t.BYTE&&l.bit<d.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(l)+".\n Suggested mode is: "+t.toString(d));switch(l!==t.KANJI||s.isKanjiModeEnabled()||(l=t.BYTE),l){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new i(e);case t.KANJI:return new r(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},e.fromString=function(n,i){const a=function(e){const n=[];for(let i=0;i<e.length;i++){const a=e[i];switch(a.mode){case t.NUMERIC:n.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:n.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:n.push([a,{data:a.data,mode:t.BYTE,length:d(a.data)}]);break;case t.BYTE:n.push([{data:a.data,mode:t.BYTE,length:d(a.data)}])}}return n}(c(n,s.isKanjiModeEnabled())),r=function(e,n){const i={},a={start:{}};let r=["start"];for(let o=0;o<e.length;o++){const s=e[o],l=[];for(let e=0;e<s.length;e++){const d=s[e],u=""+o+e;l.push(u),i[u]={node:d,lastCount:0},a[u]={};for(let e=0;e<r.length;e++){const o=r[e];i[o]&&i[o].node.mode===d.mode?(a[o][u]=h(i[o].lastCount+d.length,d.mode)-h(i[o].lastCount,d.mode),i[o].lastCount+=d.length):(i[o]&&(i[o].lastCount=d.length),a[o][u]=h(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,n))}}r=l}for(let e=0;e<r.length;e++)a[r[e]].end=0;return{map:a,table:i}}(a,i),o=l.find_path(r.map,"start","end"),u=[];for(let e=1;e<o.length-1;e++)u.push(r.table[o[e]].node);return e.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(u))},e.rawSplit=function(t){return e.fromArray(c(t,s.isKanjiModeEnabled()))}}(u$)),u$}function v$(){if(m$)return gO;m$=1;const e=yO(),t=EO(),n=function(){if(kO)return wO;function e(){this.buffer=[],this.length=0}return kO=1,e.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},wO=e}(),i=function(){if(_O)return SO;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return _O=1,e.prototype.set=function(e,t,n,i){const a=e*this.size+t;this.data[a]=n,i&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},SO=e}(),a=(PO||(PO=1,function(e){const t=yO().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const n=Math.floor(e/7)+2,i=t(e),a=145===i?26:2*Math.ceil((i-13)/(2*n-2)),r=[i-7];for(let e=1;e<n-1;e++)r[e]=r[e-1]-a;return r.push(6),r.reverse()},e.getPositions=function(t){const n=[],i=e.getRowColCoords(t),a=i.length;for(let e=0;e<a;e++)for(let t=0;t<a;t++)0===e&&0===t||0===e&&t===a-1||e===a-1&&0===t||n.push([i[e],i[t]]);return n}}(TO)),TO),r=function(){if(xO)return AO;xO=1;const e=yO().getSymbolSize;return AO.getPositions=function(t){const n=e(t);return[[0,0],[n-7,0],[0,n-7]]},AO}(),o=(CO||(CO=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,n=3,i=40,a=10;function r(t,n,i){switch(t){case e.Patterns.PATTERN000:return(n+i)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return i%3==0;case e.Patterns.PATTERN011:return(n+i)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2==0;case e.Patterns.PATTERN101:return n*i%2+n*i%3==0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2==0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const n=e.size;let i=0,a=0,r=0,o=null,s=null;for(let l=0;l<n;l++){a=r=0,o=s=null;for(let d=0;d<n;d++){let n=e.get(l,d);n===o?a++:(a>=5&&(i+=t+(a-5)),o=n,a=1),n=e.get(d,l),n===s?r++:(r>=5&&(i+=t+(r-5)),s=n,r=1)}a>=5&&(i+=t+(a-5)),r>=5&&(i+=t+(r-5))}return i},e.getPenaltyN2=function(e){const t=e.size;let i=0;for(let n=0;n<t-1;n++)for(let a=0;a<t-1;a++){const t=e.get(n,a)+e.get(n,a+1)+e.get(n+1,a)+e.get(n+1,a+1);4!==t&&0!==t||i++}return i*n},e.getPenaltyN3=function(e){const t=e.size;let n=0,a=0,r=0;for(let i=0;i<t;i++){a=r=0;for(let o=0;o<t;o++)a=a<<1&2047|e.get(i,o),o>=10&&(1488===a||93===a)&&n++,r=r<<1&2047|e.get(o,i),o>=10&&(1488===r||93===r)&&n++}return n*i},e.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let i=0;i<n;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/n/5)-10)*a},e.applyMask=function(e,t){const n=t.size;for(let i=0;i<n;i++)for(let a=0;a<n;a++)t.isReserved(a,i)||t.xor(a,i,r(e,a,i))},e.getBestMask=function(t,n){const i=Object.keys(e.Patterns).length;let a=0,r=1/0;for(let o=0;o<i;o++){n(o),e.applyMask(o,t);const i=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),i<r&&(r=i,a=o)}return a}}(LO)),LO),s=RO(),l=function(){if(OO)return FO;OO=1;const e=zO();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const i=e.mod(n,this.genPoly),a=this.degree-i.length;if(a>0){const e=new Uint8Array(this.degree);return e.set(i,a),e}return i},FO=t}(),d=ZO(),u=function(){if(e$)return t$;e$=1;const e=yO(),t=e.getBCHDigit(1335);return t$.getEncodedBits=function(n,i){const a=n.bit<<3|i;let r=a<<10;for(;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(a<<10|r)},t$}(),c=QO(),h=g$();function m(e,t,n){const i=e.size,a=u.getEncodedBits(t,n);let r,o;for(r=0;r<15;r++)o=1==(a>>r&1),r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),r<8?e.set(8,i-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}function f(t,i,a){const r=new n;a.forEach((function(e){r.put(e.mode.bit,4),r.put(e.getLength(),c.getCharCountIndicator(e.mode,t)),e.write(r)}));const o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,i));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const d=(o-r.getLengthInBits())/8;for(let e=0;e<d;e++)r.put(e%2?17:236,8);return function(t,n,i){const a=e.getSymbolTotalCodewords(n),r=s.getTotalCodewordsCount(n,i),o=a-r,d=s.getBlocksCount(n,i),u=a%d,c=d-u,h=Math.floor(a/d),m=Math.floor(o/d),f=m+1,p=h-m,g=new l(p);let v=0;const y=new Array(d),b=new Array(d);let w=0;const k=new Uint8Array(t.buffer);for(let e=0;e<d;e++){const t=e<c?m:f;y[e]=k.slice(v,v+t),b[e]=g.encode(y[e]),v+=t,w=Math.max(w,t)}const S=new Uint8Array(a);let _,M,E=0;for(_=0;_<w;_++)for(M=0;M<d;M++)_<y[M].length&&(S[E++]=y[M][_]);for(_=0;_<p;_++)for(M=0;M<d;M++)S[E++]=b[M][_];return S}(r,t,i)}function p(t,n,s,l){let u;if(Array.isArray(t))u=h.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let e=n;if(!e){const n=h.rawSplit(t);e=d.getBestVersionForData(n,s)}u=h.fromString(t,e||40)}}const c=d.getBestVersionForData(u,s);if(!c)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<c)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+c+".\n")}else n=c;const p=f(n,s,u),g=e.getSymbolSize(n),v=new i(g);return function(e,t){const n=e.size,i=r.getPositions(t);for(let t=0;t<i.length;t++){const a=i[t][0],r=i[t][1];for(let t=-1;t<=7;t++)if(!(a+t<=-1||n<=a+t))for(let i=-1;i<=7;i++)r+i<=-1||n<=r+i||(t>=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(a+t,r+i,!0,!0):e.set(a+t,r+i,!1,!0))}}(v,n),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(v),function(e,t){const n=a.getPositions(t);for(let t=0;t<n.length;t++){const i=n[t][0],a=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(i+t,a+n,!0,!0):e.set(i+t,a+n,!1,!0)}}(v,n),m(v,s,0),n>=7&&function(e,t){const n=e.size,i=d.getEncodedBits(t);let a,r,o;for(let t=0;t<18;t++)a=Math.floor(t/3),r=t%3+n-8-3,o=1==(i>>t&1),e.set(a,r,o,!0),e.set(r,a,o,!0)}(v,n),function(e,t){const n=e.size;let i=-1,a=n-1,r=7,o=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(a,s-n)){let i=!1;o<t.length&&(i=1==(t[o]>>>r&1)),e.set(a,s-n,i),r--,-1===r&&(o++,r=7)}if(a+=i,a<0||n<=a){a-=i,i=-i;break}}}(v,p),isNaN(l)&&(l=o.getBestMask(v,m.bind(null,v,s))),o.applyMask(l,v),m(v,s,l),{modules:v,version:n,errorCorrectionLevel:s,maskPattern:l,segments:u}}return gO.create=function(n,i){if(void 0===n||""===n)throw new Error("No input text");let a,r,s=t.M;return void 0!==i&&(s=t.from(i.errorCorrectionLevel,t.M),a=d.from(i.version),r=o.from(i.maskPattern),i.toSJISFunc&&e.setToSJISFunction(i.toSJISFunc)),p(n,a,s,r)},gO}var y$,b$,w$={},k$={};function S$(){return y$||(y$=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){const i=e.getScale(t,n);return Math.floor((t+2*n.margin)*i)},e.qrToImageData=function(t,n,i){const a=n.modules.size,r=n.modules.data,o=e.getScale(a,i),s=Math.floor((a+2*i.margin)*o),l=i.margin*o,d=[i.color.light,i.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=4*(e*s+n),c=i.color.light;if(e>=l&&n>=l&&e<s-l&&n<s-l){c=d[r[Math.floor((e-l)/o)*a+Math.floor((n-l)/o)]?1:0]}t[u++]=c.r,t[u++]=c.g,t[u++]=c.b,t[u]=c.a}}}(k$)),k$}function _$(){return b$||(b$=1,function(e){const t=S$();e.render=function(e,n,i){let a=i,r=n;void 0!==a||n&&n.getContext||(a=n,n=void 0),n||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);const o=t.getImageWidth(e.modules.size,a),s=r.getContext("2d"),l=s.createImageData(o,o);return t.qrToImageData(l.data,e,a),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,r,o),s.putImageData(l,0,0),r},e.renderToDataURL=function(t,n,i){let a=i;void 0!==a||n&&n.getContext||(a=n,n=void 0),a||(a={});const r=e.render(t,n,a),o=a.type||"image/png",s=a.rendererOpts||{};return r.toDataURL(o,s.quality)}}(w$)),w$}var M$,E$,P$={};function T$(){if(M$)return P$;M$=1;const e=S$();function t(e,t){const n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function n(e,t,n){let i=e+t;return void 0!==n&&(i+=" "+n),i}return P$.render=function(i,a,r){const o=e.getOptions(a),s=i.modules.size,l=i.modules.data,d=s+2*o.margin,u=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",c="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,i){let a="",r=0,o=!1,s=0;for(let l=0;l<e.length;l++){const d=Math.floor(l%t),u=Math.floor(l/t);d||o||(o=!0),e[l]?(s++,l>0&&d>0&&e[l-1]||(a+=o?n("M",d+i,.5+u+i):n("m",r,0),r=0,o=!1),d+1<t&&e[l+1]||(a+=n("h",s),s=0)):r++}return a}(l,s,o.margin)+'"/>',h='viewBox="0 0 '+d+" "+d+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+c+"</svg>\n";return"function"==typeof r&&r(null,m),m},P$}var x$=function(){if(E$)return mO;E$=1;const e=fO(),t=v$(),n=_$(),i=T$();function a(n,i,a,r,o){const s=[].slice.call(arguments,1),l=s.length,d="function"==typeof s[l-1];if(!d&&!e())throw new Error("Callback required as last argument");if(!d){if(l<1)throw new Error("Too few arguments provided");return 1===l?(a=i,i=r=void 0):2!==l||i.getContext||(r=a,a=i,i=void 0),new Promise((function(e,o){try{const o=t.create(a,r);e(n(o,i,r))}catch(e){o(e)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(o=a,a=i,i=r=void 0):3===l&&(i.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=a,a=i,i=void 0));try{const e=t.create(a,r);o(null,n(e,i,r))}catch(e){o(e)}}return mO.create=t.create,mO.toCanvas=a.bind(null,n.render),mO.toDataURL=a.bind(null,n.renderToDataURL),mO.toString=a.bind(null,(function(e,t,n){return i.render(e,n)})),mO}(),A$=sl(x$);let C$=class extends Sp{constructor(){super(...arguments),this.scaleFactor=1}styles(){return this.component?Rh(`\n :host {\n box-sizing: border-box;\n ${Xp(this.component,this.scaleFactor)}\n ${Up(this.component,this.scaleFactor)}\n background-color: ${this.component.fillColor||this.component.borderColor||"transparent"};\n border-width: ${this.component.borderWidth??0}px;\n ${Fp(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):Rh(":host { box-sizing: border-box; display: inline-block; }")}async renderQr(){const e=this.renderRoot.querySelector("canvas");if(!e||!this.component?.url)return;const t=this.computedSize;e.width=t,e.height=t,e.style.width=`${t}px`,e.style.height=`${t}px`;const n=pg(this.component.color)??"#000000",i=pg(this.component.fillColor)??"#ffffff";try{await A$.toCanvas(e,this.component.url,{width:t,color:{dark:n,light:i},margin:0})}catch(e){Ze.error(`QR render failed for URL "${this.component.url}":`,e)}}firstUpdated(){this.renderQr()}updated(e){(e.has("component")||e.has("scaleFactor"))&&Promise.resolve().then((()=>this.renderQr()))}get computedSize(){const e=Number(this.component.borderWidth??0),t=Number(this.component.width)*this.scaleFactor,n=Math.floor(this.component.width?t-2*e:360);return Math.max(1,n)}render(){if(this.component){const e=this.computedSize;return bm`<canvas width="${e}" height="${e}" style="width:${e}px;height:${e}px;"></canvas>`}return bm`<canvas></canvas>`}};T([Gm({type:Object})],C$.prototype,"component",void 0),T([Gm({type:Number})],C$.prototype,"scaleFactor",void 0),C$=T([Hm("nami-qr-code")],C$);let L$=class extends Sp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this.isActive=!1,this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()}}connectedCallback(){super.connectedCallback(),this.isActive=!!this.component.checked,this.contextProvider.setFormState(this.component.formId,this.isActive),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}_handleClick(){const{onTap:e,disabled:t,formId:n}=this.component;if(!0===t)return;let i;this.component.checked=!this.component.checked,this.isActive=this.component.checked,i=n?{function:e?.function||"",parameters:{...e?.parameters,formId:n||""}}:e,!this.contextProvider.flow||n?Gg({onTap:i,contextProvider:this.contextProvider}):this.component.id?(Ze.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):Ze.warn("Cannot trigger button hoisting without an id")}styles(){return Rh(`\n :host {\n box-sizing: border-box;\n }\n :host .toggle-plate {\n display: flex;\n position: relative;\n ${this.applyPlateStyles()}\n }\n :host .toggle-handle {\n display: flex;\n position: relative;\n ${this.applyHandleStyles()}\n }\n `)}applyPlateStyles(){const{component:e,scaleFactor:t}=this,n=this.isActive||e.checked||!1,i=n?e.activePlateFillColor||"transparent":e.inactivePlateFillColor||"transparent",a=n?e.activePlateBorderColor||"transparent":e.inactivePlateBorderColor||"transparent";return`\n transition: all 0.3s;\n ${Xp(e,t)};\n ${Fp(a||"transparent")}\n border-width: ${n?e.activePlateBorderWidth||0:e.inactivePlateBorderWidth||0}px !important;\n border-style: solid;\n border-radius: ${e.borderRadius||0}px !important;\n padding: ${e.innerPadding||0}px !important;\n ${Wp(i)}\n `}applyHandleStyles(){const e=this.component,t=e.checked||!1,n=t?e.activeHandleFillColor||"transparent":e.inactiveHandleFillColor||"transparent",i=t?e.activeHandleBorderColor||"transparent":e.inactiveHandleBorderColor||"transparent";return`\n transition: all 0.3s;\n height: 100%;\n width: 50%;\n border-radius: ${e.borderRadius}px !important;\n ${Fp(i)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Yp(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${Wp(n)}\n `}render(){return this.tabIndex=0,this.role="switch",bm`
337
+ `,T([Gm({type:Object})],cO.prototype,"paywall",void 0),T([Gm({type:Object})],cO.prototype,"campaign",void 0),T([Gm({type:Object})],cO.prototype,"context",void 0),T([function({context:e}){return(t,n)=>{const i=new WeakMap;if("object"==typeof n)return{get(){return t.get.call(this)},set(e){return i.get(this).setValue(e),t.set.call(this,e)},init(t){return i.set(this,new hp(this,{context:e,initialValue:t})),t}};{t.constructor.addInitializer((t=>{i.set(t,new hp(t,{context:e}))}));const a=Object.getOwnPropertyDescriptor(t,n);let r;if(void 0===a){const e=new WeakMap;r={get(){return e.get(this)},set(t){i.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{const e=a.set;r={...a,set(t){i.get(this).setValue(t),e?.call(this,t)}}}return void Object.defineProperty(t,n,r)}}}({context:fp})],cO.prototype,"contextProvider",void 0),cO=T([Hm("nami-paywall-screen")],cO);var hO,mO,fO={};function pO(){return mO?hO:(mO=1,hO=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var gO,vO={},yO={};function bO(){if(gO)return yO;let e;gO=1;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return yO.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},yO.getSymbolTotalCodewords=function(e){return t[e]},yO.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},yO.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},yO.isKanjiModeEnabled=function(){return void 0!==e},yO.toSJIS=function(t){return e(t)},yO}var wO,kO,SO,_O,MO,EO={};function PO(){return wO||(wO=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return n}}}(EO)),EO}var TO,xO={};var AO,CO={};var LO,IO={};var DO,RO={};function NO(){if(DO)return RO;DO=1;const e=PO(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return RO.getBlocksCount=function(n,i){switch(i){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},RO.getTotalCodewordsCount=function(t,i){switch(i){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},RO}var WO,FO,OO,$O,jO={},zO={};function HO(){return FO||(FO=1,function(e){const t=function(){if(WO)return zO;WO=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let n=1;for(let i=0;i<255;i++)e[i]=n,t[n]=i,n<<=1,256&n&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),zO.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},zO.exp=function(t){return e[t]},zO.mul=function(n,i){return 0===n||0===i?0:e[t[n]+t[i]]},zO}();e.mul=function(e,n){const i=new Uint8Array(e.length+n.length-1);for(let a=0;a<e.length;a++)for(let r=0;r<n.length;r++)i[a+r]^=t.mul(e[a],n[r]);return i},e.mod=function(e,n){let i=new Uint8Array(e);for(;i.length-n.length>=0;){const e=i[0];for(let a=0;a<n.length;a++)i[a]^=t.mul(n[a],e);let a=0;for(;a<i.length&&0===i[a];)a++;i=i.slice(a)}return i},e.generateECPolynomial=function(n){let i=new Uint8Array([1]);for(let a=0;a<n;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}}(jO)),jO}var BO,UO={},GO={},VO={};function XO(){return BO||(BO=1,VO.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),VO}var KO,YO,qO,JO={};function QO(){if(KO)return JO;KO=1;const e="[0-9]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+")(?:.|[\r\n]))+";JO.KANJI=new RegExp(t,"g"),JO.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),JO.BYTE=new RegExp(n,"g"),JO.NUMERIC=new RegExp(e,"g"),JO.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return JO.testKanji=function(e){return i.test(e)},JO.testNumeric=function(e){return a.test(e)},JO.testAlphanumeric=function(e){return r.test(e)},JO}function ZO(){return YO||(YO=1,function(e){const t=XO(),n=QO();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return n}}}(GO)),GO}function e$(){return qO||(qO=1,function(e){const t=bO(),n=NO(),i=PO(),a=ZO(),r=XO(),o=t.getBCHDigit(7973);function s(e,t){return a.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach((function(e){const i=s(e.mode,t);n+=i+e.getBitsLength()})),n}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,i,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,i));if(o===a.MIXED)return l;const d=l-s(o,e);switch(o){case a.NUMERIC:return Math.floor(d/10*3);case a.ALPHANUMERIC:return Math.floor(d/11*2);case a.KANJI:return Math.floor(d/13);case a.BYTE:default:return Math.floor(d/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let i=1;i<=40;i++)if(l(t,i)<=e.getCapacity(i,n,a.MIXED))return i}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,i){for(let a=1;a<=40;a++)if(n<=e.getCapacity(a,i,t))return a}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;t.getBCHDigit(n)-o>=0;)n^=7973<<t.getBCHDigit(n)-o;return e<<12|n}}(UO)),UO}var t$,n$={};var i$,a$,r$,o$,s$,l$,d$,u$,c$={};var h$,m$,f$,p$={exports:{}};function g$(){return h$||(h$=1,function(e){var t={single_source_shortest_paths:function(e,n,i){var a={},r={};r[n]=0;var o,s,l,d,u,c,h,m=t.PriorityQueue.make();for(m.push(n,0);!m.empty();)for(l in s=(o=m.pop()).value,d=o.cost,u=e[s]||{})u.hasOwnProperty(l)&&(c=d+u[l],h=r[l],(void 0===r[l]||h>c)&&(r[l]=c,m.push(l,c),a[l]=s));if(void 0!==i&&void 0===r[i]){var f=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],i=t;i;)n.push(i),e[i],i=e[i];return n.reverse(),n},find_path:function(e,n,i){var a=t.single_source_shortest_paths(e,n,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(e){var n,i=t.PriorityQueue,a={};for(n in e=e||{},i)i.hasOwnProperty(n)&&(a[n]=i[n]);return a.queue=[],a.sorter=e.sorter||i.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(p$)),p$.exports}function v$(){return m$||(m$=1,function(e){const t=ZO(),n=function(){if(a$)return i$;a$=1;const e=ZO();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t,n,i;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),i=parseInt(n,10),e.put(i,10);const a=this.data.length-t;a>0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,3*a+1))},i$=t}(),i=function(){if(o$)return r$;o$=1;const e=ZO(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=45*t.indexOf(this.data[n]);i+=t.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},r$=n}(),a=function(){if(l$)return s$;l$=1;const e=ZO();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},s$=t}(),r=function(){if(u$)return d$;u$=1;const e=ZO(),t=bO();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}},d$=n}(),o=QO(),s=bO(),l=g$();function d(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){const i=[];let a;for(;null!==(a=e.exec(n));)i.push({data:a[0],index:a.index,mode:t,length:a[0].length});return i}function c(e){const n=u(o.NUMERIC,t.NUMERIC,e),i=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e);let a,r;s.isKanjiModeEnabled()?(a=u(o.BYTE,t.BYTE,e),r=u(o.KANJI,t.KANJI,e)):(a=u(o.BYTE_KANJI,t.BYTE,e),r=[]);return n.concat(i,a,r).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function h(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return i.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function m(e,o){let l;const d=t.getBestModeForData(e);if(l=t.from(o,d),l!==t.BYTE&&l.bit<d.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(l)+".\n Suggested mode is: "+t.toString(d));switch(l!==t.KANJI||s.isKanjiModeEnabled()||(l=t.BYTE),l){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new i(e);case t.KANJI:return new r(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},e.fromString=function(n,i){const a=function(e){const n=[];for(let i=0;i<e.length;i++){const a=e[i];switch(a.mode){case t.NUMERIC:n.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:n.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:n.push([a,{data:a.data,mode:t.BYTE,length:d(a.data)}]);break;case t.BYTE:n.push([{data:a.data,mode:t.BYTE,length:d(a.data)}])}}return n}(c(n,s.isKanjiModeEnabled())),r=function(e,n){const i={},a={start:{}};let r=["start"];for(let o=0;o<e.length;o++){const s=e[o],l=[];for(let e=0;e<s.length;e++){const d=s[e],u=""+o+e;l.push(u),i[u]={node:d,lastCount:0},a[u]={};for(let e=0;e<r.length;e++){const o=r[e];i[o]&&i[o].node.mode===d.mode?(a[o][u]=h(i[o].lastCount+d.length,d.mode)-h(i[o].lastCount,d.mode),i[o].lastCount+=d.length):(i[o]&&(i[o].lastCount=d.length),a[o][u]=h(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,n))}}r=l}for(let e=0;e<r.length;e++)a[r[e]].end=0;return{map:a,table:i}}(a,i),o=l.find_path(r.map,"start","end"),u=[];for(let e=1;e<o.length-1;e++)u.push(r.table[o[e]].node);return e.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(u))},e.rawSplit=function(t){return e.fromArray(c(t,s.isKanjiModeEnabled()))}}(c$)),c$}function y$(){if(f$)return vO;f$=1;const e=bO(),t=PO(),n=function(){if(SO)return kO;function e(){this.buffer=[],this.length=0}return SO=1,e.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},kO=e}(),i=function(){if(MO)return _O;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return MO=1,e.prototype.set=function(e,t,n,i){const a=e*this.size+t;this.data[a]=n,i&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},_O=e}(),a=(TO||(TO=1,function(e){const t=bO().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const n=Math.floor(e/7)+2,i=t(e),a=145===i?26:2*Math.ceil((i-13)/(2*n-2)),r=[i-7];for(let e=1;e<n-1;e++)r[e]=r[e-1]-a;return r.push(6),r.reverse()},e.getPositions=function(t){const n=[],i=e.getRowColCoords(t),a=i.length;for(let e=0;e<a;e++)for(let t=0;t<a;t++)0===e&&0===t||0===e&&t===a-1||e===a-1&&0===t||n.push([i[e],i[t]]);return n}}(xO)),xO),r=function(){if(AO)return CO;AO=1;const e=bO().getSymbolSize;return CO.getPositions=function(t){const n=e(t);return[[0,0],[n-7,0],[0,n-7]]},CO}(),o=(LO||(LO=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,n=3,i=40,a=10;function r(t,n,i){switch(t){case e.Patterns.PATTERN000:return(n+i)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return i%3==0;case e.Patterns.PATTERN011:return(n+i)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2==0;case e.Patterns.PATTERN101:return n*i%2+n*i%3==0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2==0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const n=e.size;let i=0,a=0,r=0,o=null,s=null;for(let l=0;l<n;l++){a=r=0,o=s=null;for(let d=0;d<n;d++){let n=e.get(l,d);n===o?a++:(a>=5&&(i+=t+(a-5)),o=n,a=1),n=e.get(d,l),n===s?r++:(r>=5&&(i+=t+(r-5)),s=n,r=1)}a>=5&&(i+=t+(a-5)),r>=5&&(i+=t+(r-5))}return i},e.getPenaltyN2=function(e){const t=e.size;let i=0;for(let n=0;n<t-1;n++)for(let a=0;a<t-1;a++){const t=e.get(n,a)+e.get(n,a+1)+e.get(n+1,a)+e.get(n+1,a+1);4!==t&&0!==t||i++}return i*n},e.getPenaltyN3=function(e){const t=e.size;let n=0,a=0,r=0;for(let i=0;i<t;i++){a=r=0;for(let o=0;o<t;o++)a=a<<1&2047|e.get(i,o),o>=10&&(1488===a||93===a)&&n++,r=r<<1&2047|e.get(o,i),o>=10&&(1488===r||93===r)&&n++}return n*i},e.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let i=0;i<n;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/n/5)-10)*a},e.applyMask=function(e,t){const n=t.size;for(let i=0;i<n;i++)for(let a=0;a<n;a++)t.isReserved(a,i)||t.xor(a,i,r(e,a,i))},e.getBestMask=function(t,n){const i=Object.keys(e.Patterns).length;let a=0,r=1/0;for(let o=0;o<i;o++){n(o),e.applyMask(o,t);const i=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),i<r&&(r=i,a=o)}return a}}(IO)),IO),s=NO(),l=function(){if($O)return OO;$O=1;const e=HO();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const i=e.mod(n,this.genPoly),a=this.degree-i.length;if(a>0){const e=new Uint8Array(this.degree);return e.set(i,a),e}return i},OO=t}(),d=e$(),u=function(){if(t$)return n$;t$=1;const e=bO(),t=e.getBCHDigit(1335);return n$.getEncodedBits=function(n,i){const a=n.bit<<3|i;let r=a<<10;for(;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(a<<10|r)},n$}(),c=ZO(),h=v$();function m(e,t,n){const i=e.size,a=u.getEncodedBits(t,n);let r,o;for(r=0;r<15;r++)o=1==(a>>r&1),r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),r<8?e.set(8,i-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}function f(t,i,a){const r=new n;a.forEach((function(e){r.put(e.mode.bit,4),r.put(e.getLength(),c.getCharCountIndicator(e.mode,t)),e.write(r)}));const o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,i));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const d=(o-r.getLengthInBits())/8;for(let e=0;e<d;e++)r.put(e%2?17:236,8);return function(t,n,i){const a=e.getSymbolTotalCodewords(n),r=s.getTotalCodewordsCount(n,i),o=a-r,d=s.getBlocksCount(n,i),u=a%d,c=d-u,h=Math.floor(a/d),m=Math.floor(o/d),f=m+1,p=h-m,g=new l(p);let v=0;const y=new Array(d),b=new Array(d);let w=0;const k=new Uint8Array(t.buffer);for(let e=0;e<d;e++){const t=e<c?m:f;y[e]=k.slice(v,v+t),b[e]=g.encode(y[e]),v+=t,w=Math.max(w,t)}const S=new Uint8Array(a);let _,M,E=0;for(_=0;_<w;_++)for(M=0;M<d;M++)_<y[M].length&&(S[E++]=y[M][_]);for(_=0;_<p;_++)for(M=0;M<d;M++)S[E++]=b[M][_];return S}(r,t,i)}function p(t,n,s,l){let u;if(Array.isArray(t))u=h.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let e=n;if(!e){const n=h.rawSplit(t);e=d.getBestVersionForData(n,s)}u=h.fromString(t,e||40)}}const c=d.getBestVersionForData(u,s);if(!c)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<c)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+c+".\n")}else n=c;const p=f(n,s,u),g=e.getSymbolSize(n),v=new i(g);return function(e,t){const n=e.size,i=r.getPositions(t);for(let t=0;t<i.length;t++){const a=i[t][0],r=i[t][1];for(let t=-1;t<=7;t++)if(!(a+t<=-1||n<=a+t))for(let i=-1;i<=7;i++)r+i<=-1||n<=r+i||(t>=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(a+t,r+i,!0,!0):e.set(a+t,r+i,!1,!0))}}(v,n),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(v),function(e,t){const n=a.getPositions(t);for(let t=0;t<n.length;t++){const i=n[t][0],a=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(i+t,a+n,!0,!0):e.set(i+t,a+n,!1,!0)}}(v,n),m(v,s,0),n>=7&&function(e,t){const n=e.size,i=d.getEncodedBits(t);let a,r,o;for(let t=0;t<18;t++)a=Math.floor(t/3),r=t%3+n-8-3,o=1==(i>>t&1),e.set(a,r,o,!0),e.set(r,a,o,!0)}(v,n),function(e,t){const n=e.size;let i=-1,a=n-1,r=7,o=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(a,s-n)){let i=!1;o<t.length&&(i=1==(t[o]>>>r&1)),e.set(a,s-n,i),r--,-1===r&&(o++,r=7)}if(a+=i,a<0||n<=a){a-=i,i=-i;break}}}(v,p),isNaN(l)&&(l=o.getBestMask(v,m.bind(null,v,s))),o.applyMask(l,v),m(v,s,l),{modules:v,version:n,errorCorrectionLevel:s,maskPattern:l,segments:u}}return vO.create=function(n,i){if(void 0===n||""===n)throw new Error("No input text");let a,r,s=t.M;return void 0!==i&&(s=t.from(i.errorCorrectionLevel,t.M),a=d.from(i.version),r=o.from(i.maskPattern),i.toSJISFunc&&e.setToSJISFunction(i.toSJISFunc)),p(n,a,s,r)},vO}var b$,w$,k$={},S$={};function _$(){return b$||(b$=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){const i=e.getScale(t,n);return Math.floor((t+2*n.margin)*i)},e.qrToImageData=function(t,n,i){const a=n.modules.size,r=n.modules.data,o=e.getScale(a,i),s=Math.floor((a+2*i.margin)*o),l=i.margin*o,d=[i.color.light,i.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=4*(e*s+n),c=i.color.light;if(e>=l&&n>=l&&e<s-l&&n<s-l){c=d[r[Math.floor((e-l)/o)*a+Math.floor((n-l)/o)]?1:0]}t[u++]=c.r,t[u++]=c.g,t[u++]=c.b,t[u]=c.a}}}(S$)),S$}function M$(){return w$||(w$=1,function(e){const t=_$();e.render=function(e,n,i){let a=i,r=n;void 0!==a||n&&n.getContext||(a=n,n=void 0),n||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);const o=t.getImageWidth(e.modules.size,a),s=r.getContext("2d"),l=s.createImageData(o,o);return t.qrToImageData(l.data,e,a),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,r,o),s.putImageData(l,0,0),r},e.renderToDataURL=function(t,n,i){let a=i;void 0!==a||n&&n.getContext||(a=n,n=void 0),a||(a={});const r=e.render(t,n,a),o=a.type||"image/png",s=a.rendererOpts||{};return r.toDataURL(o,s.quality)}}(k$)),k$}var E$,P$,T$={};function x$(){if(E$)return T$;E$=1;const e=_$();function t(e,t){const n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function n(e,t,n){let i=e+t;return void 0!==n&&(i+=" "+n),i}return T$.render=function(i,a,r){const o=e.getOptions(a),s=i.modules.size,l=i.modules.data,d=s+2*o.margin,u=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",c="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,i){let a="",r=0,o=!1,s=0;for(let l=0;l<e.length;l++){const d=Math.floor(l%t),u=Math.floor(l/t);d||o||(o=!0),e[l]?(s++,l>0&&d>0&&e[l-1]||(a+=o?n("M",d+i,.5+u+i):n("m",r,0),r=0,o=!1),d+1<t&&e[l+1]||(a+=n("h",s),s=0)):r++}return a}(l,s,o.margin)+'"/>',h='viewBox="0 0 '+d+" "+d+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+c+"</svg>\n";return"function"==typeof r&&r(null,m),m},T$}var A$=function(){if(P$)return fO;P$=1;const e=pO(),t=y$(),n=M$(),i=x$();function a(n,i,a,r,o){const s=[].slice.call(arguments,1),l=s.length,d="function"==typeof s[l-1];if(!d&&!e())throw new Error("Callback required as last argument");if(!d){if(l<1)throw new Error("Too few arguments provided");return 1===l?(a=i,i=r=void 0):2!==l||i.getContext||(r=a,a=i,i=void 0),new Promise((function(e,o){try{const o=t.create(a,r);e(n(o,i,r))}catch(e){o(e)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(o=a,a=i,i=r=void 0):3===l&&(i.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=a,a=i,i=void 0));try{const e=t.create(a,r);o(null,n(e,i,r))}catch(e){o(e)}}return fO.create=t.create,fO.toCanvas=a.bind(null,n.render),fO.toDataURL=a.bind(null,n.renderToDataURL),fO.toString=a.bind(null,(function(e,t,n){return i.render(e,n)})),fO}(),C$=sl(A$);let L$=class extends Sp{constructor(){super(...arguments),this.scaleFactor=1}styles(){return this.component?Rh(`\n :host {\n box-sizing: border-box;\n ${Xp(this.component,this.scaleFactor)}\n ${Up(this.component,this.scaleFactor)}\n background-color: ${this.component.fillColor||this.component.borderColor||"transparent"};\n border-width: ${this.component.borderWidth??0}px;\n ${Fp(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):Rh(":host { box-sizing: border-box; display: inline-block; }")}async renderQr(){const e=this.renderRoot.querySelector("canvas");if(!e||!this.component?.url)return;const t=this.computedSize;e.width=t,e.height=t,e.style.width=`${t}px`,e.style.height=`${t}px`;const n=pg(this.component.color)??"#000000",i=pg(this.component.fillColor)??"#ffffff";try{await C$.toCanvas(e,this.component.url,{width:t,color:{dark:n,light:i},margin:0})}catch(e){Ze.error(`QR render failed for URL "${this.component.url}":`,e)}}firstUpdated(){this.renderQr()}updated(e){(e.has("component")||e.has("scaleFactor"))&&Promise.resolve().then((()=>this.renderQr()))}get computedSize(){const e=Number(this.component.borderWidth??0),t=Number(this.component.width)*this.scaleFactor,n=Math.floor(this.component.width?t-2*e:360);return Math.max(1,n)}render(){if(this.component){const e=this.computedSize;return bm`<canvas width="${e}" height="${e}" style="width:${e}px;height:${e}px;"></canvas>`}return bm`<canvas></canvas>`}};T([Gm({type:Object})],L$.prototype,"component",void 0),T([Gm({type:Number})],L$.prototype,"scaleFactor",void 0),L$=T([Hm("nami-qr-code")],L$);let I$=class extends Sp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this.isActive=!1,this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()}}connectedCallback(){super.connectedCallback(),this.isActive=!!this.component.checked,this.contextProvider.setFormState(this.component.formId,this.isActive),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}_handleClick(){const{onTap:e,disabled:t,formId:n}=this.component;if(!0===t)return;let i;this.component.checked=!this.component.checked,this.isActive=this.component.checked,i=n?{function:e?.function||"",parameters:{...e?.parameters,formId:n||""}}:e,!this.contextProvider.flow||n?Gg({onTap:i,contextProvider:this.contextProvider}):this.component.id?(Ze.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):Ze.warn("Cannot trigger button hoisting without an id")}styles(){return Rh(`\n :host {\n box-sizing: border-box;\n }\n :host .toggle-plate {\n display: flex;\n position: relative;\n ${this.applyPlateStyles()}\n }\n :host .toggle-handle {\n display: flex;\n position: relative;\n ${this.applyHandleStyles()}\n }\n `)}applyPlateStyles(){const{component:e,scaleFactor:t}=this,n=this.isActive||e.checked||!1,i=n?e.activePlateFillColor||"transparent":e.inactivePlateFillColor||"transparent",a=n?e.activePlateBorderColor||"transparent":e.inactivePlateBorderColor||"transparent";return`\n transition: all 0.3s;\n ${Xp(e,t)};\n ${Fp(a||"transparent")}\n border-width: ${n?e.activePlateBorderWidth||0:e.inactivePlateBorderWidth||0}px !important;\n border-style: solid;\n border-radius: ${e.borderRadius||0}px !important;\n padding: ${e.innerPadding||0}px !important;\n ${Wp(i)}\n `}applyHandleStyles(){const e=this.component,t=e.checked||!1,n=t?e.activeHandleFillColor||"transparent":e.inactiveHandleFillColor||"transparent",i=t?e.activeHandleBorderColor||"transparent":e.inactiveHandleBorderColor||"transparent";return`\n transition: all 0.3s;\n height: 100%;\n width: 50%;\n border-radius: ${e.borderRadius}px !important;\n ${Fp(i)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Yp(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${Wp(n)}\n `}render(){return this.tabIndex=0,this.role="switch",bm`
338
338
  <div class="toggle-plate">
339
339
  <div class="toggle-handle"></div>
340
340
  </div>
341
- `}};T([Gm({type:Object})],L$.prototype,"component",void 0),T([Gm({type:Boolean})],L$.prototype,"inFocusedState",void 0),T([Gm({type:Number})],L$.prototype,"scaleFactor",void 0),T([Gm({type:Boolean})],L$.prototype,"isActive",void 0),L$=T([Hm("nami-toggle-switch")],L$);let I$=class extends Sp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this.tabIndex=0}styles(){const e=this.component;return Rh(`\n :host {\n box-sizing: border-box;\n }\n :host .radio-button-wrapper {\n display: flex;\n transition: all 0.3s;\n ${Xp(e,this.scaleFactor)}\n ${Fp(e.inactiveBorderColor||"transparent")}\n border-width: ${e.inactiveBorderWidth||0}px !important;\n border-style: solid;\n border-radius: 100%;\n padding: ${e.innerPadding||0}px !important;\n }\n :host .radio-button-wrapper.active {\n ${Fp(e.activeBorderColor||"transparent")}\n border-width: ${e.activeBorderWidth||0}px !important;\n ${Yp(e.dropShadow)}\n }\n :host .radio-button-inner {\n ${Wp(e.inactiveFillColor||"transparent")}\n width: 100%;\n height: 100%;\n border-radius: 100%;\n }\n :host .radio-button-wrapper.active .radio-button-inner {\n ${Wp(e.activeFillColor||"transparent")}\n }\n `)}get isActive(){const e=this.component.sku?.id??"";return Object.values(this.contextProvider.selectedProducts()).includes(e)}render(){const e=this.isActive?"active":"";return bm`
341
+ `}};T([Gm({type:Object})],I$.prototype,"component",void 0),T([Gm({type:Boolean})],I$.prototype,"inFocusedState",void 0),T([Gm({type:Number})],I$.prototype,"scaleFactor",void 0),T([Gm({type:Boolean})],I$.prototype,"isActive",void 0),I$=T([Hm("nami-toggle-switch")],I$);let D$=class extends Sp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this.tabIndex=0}styles(){const e=this.component;return Rh(`\n :host {\n box-sizing: border-box;\n }\n :host .radio-button-wrapper {\n display: flex;\n transition: all 0.3s;\n ${Xp(e,this.scaleFactor)}\n ${Fp(e.inactiveBorderColor||"transparent")}\n border-width: ${e.inactiveBorderWidth||0}px !important;\n border-style: solid;\n border-radius: 100%;\n padding: ${e.innerPadding||0}px !important;\n }\n :host .radio-button-wrapper.active {\n ${Fp(e.activeBorderColor||"transparent")}\n border-width: ${e.activeBorderWidth||0}px !important;\n ${Yp(e.dropShadow)}\n }\n :host .radio-button-inner {\n ${Wp(e.inactiveFillColor||"transparent")}\n width: 100%;\n height: 100%;\n border-radius: 100%;\n }\n :host .radio-button-wrapper.active .radio-button-inner {\n ${Wp(e.activeFillColor||"transparent")}\n }\n `)}get isActive(){const e=this.component.sku?.id??"";return Object.values(this.contextProvider.selectedProducts()).includes(e)}render(){const e=this.isActive?"active":"";return bm`
342
342
  <div class="radio-button-wrapper ${e}">
343
343
  <div class="radio-button-inner"></div>
344
344
  </div>
345
- `}};T([Gm({type:Object})],I$.prototype,"component",void 0),T([Gm({type:Boolean})],I$.prototype,"inFocusedState",void 0),T([Gm({type:Number})],I$.prototype,"scaleFactor",void 0),I$=T([Hm("nami-radio-button")],I$);let D$=class extends Sp{constructor(){super(...arguments),this.scaleFactor=1,this.inFocusedState=!1,this.currentWidth=0,this.hasInitialized=!1}connectedCallback(){super.connectedCallback(),lO(this.minSDKVersion,"ProgressIndicator")}firstUpdated(e){super.firstUpdated(e),this.currentWidth=100*jf.getLastAnimatedFlowProgress(this.component?.id||"default"),this.hasInitialized=!0,this.animateProgress(!0)}updated(e){super.updated(e),this.hasInitialized&&this.animateProgress(!1)}styles(){const{component:e,scaleFactor:t,inFocusedState:n}=this,{inactiveFillColor:i,inactiveFillColorFallback:a,inactiveBorderRadius:r,activeFillColor:o,activeFillColorFallback:s,activeBorderRadius:l,innerPadding:d=0,activeDropShadow:u,inactiveDropShadow:c}=e;return Rh(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${Qp(e,t,n)}\n }\n \n .progress-container {\n ${Xp(e,t)} \n background: ${i||a};\n border-radius: ${r||0}px;\n overflow: hidden;\n position: relative;\n padding: ${d*t}px;\n box-sizing: border-box;\n ${Yp(c)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${o||s};\n border-radius: ${l||0}px;\n box-sizing: border-box;\n transition: width 0.8s ease-in-out;\n ${Yp(u)}\n }\n `)}getProgressPercentage(){let e=this.component.percentage??0;return"auto"===e&&(e=jf.getCurrentFlowProgress(this.component.id)),Math.min(100,Math.max(0,100*Number(e)))}animateProgress(e){const{id:t,percentage:n}=this.component,i=this.getProgressPercentage();if(this.currentWidth===i)return;const a=()=>{this.currentWidth=i,"auto"===n&&jf.setLastAnimatedFlowProgress(t||"default",i/100)};e?requestAnimationFrame((()=>requestAnimationFrame(a))):requestAnimationFrame(a)}render(){return bm`
345
+ `}};T([Gm({type:Object})],D$.prototype,"component",void 0),T([Gm({type:Boolean})],D$.prototype,"inFocusedState",void 0),T([Gm({type:Number})],D$.prototype,"scaleFactor",void 0),D$=T([Hm("nami-radio-button")],D$);let R$=class extends Sp{constructor(){super(...arguments),this.scaleFactor=1,this.inFocusedState=!1,this.currentWidth=0,this.hasInitialized=!1}connectedCallback(){super.connectedCallback(),dO(this.minSDKVersion,"ProgressIndicator")}firstUpdated(e){super.firstUpdated(e),this.currentWidth=100*jf.getLastAnimatedFlowProgress(this.component?.id||"default"),this.hasInitialized=!0,this.animateProgress(!0)}updated(e){super.updated(e),this.hasInitialized&&this.animateProgress(!1)}styles(){const{component:e,scaleFactor:t,inFocusedState:n}=this,{inactiveFillColor:i,inactiveFillColorFallback:a,inactiveBorderRadius:r,activeFillColor:o,activeFillColorFallback:s,activeBorderRadius:l,innerPadding:d=0,activeDropShadow:u,inactiveDropShadow:c}=e;return Rh(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${Qp(e,t,n)}\n }\n \n .progress-container {\n ${Xp(e,t)} \n background: ${i||a};\n border-radius: ${r||0}px;\n overflow: hidden;\n position: relative;\n padding: ${d*t}px;\n box-sizing: border-box;\n ${Yp(c)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${o||s};\n border-radius: ${l||0}px;\n box-sizing: border-box;\n transition: width 0.8s ease-in-out;\n ${Yp(u)}\n }\n `)}getProgressPercentage(){let e=this.component.percentage??0;return"auto"===e&&(e=jf.getCurrentFlowProgress(this.component.id)),Math.min(100,Math.max(0,100*Number(e)))}animateProgress(e){const{id:t,percentage:n}=this.component,i=this.getProgressPercentage();if(this.currentWidth===i)return;const a=()=>{this.currentWidth=i,"auto"===n&&jf.setLastAnimatedFlowProgress(t||"default",i/100)};e?requestAnimationFrame((()=>requestAnimationFrame(a))):requestAnimationFrame(a)}render(){return bm`
346
346
  <div class="progress-container">
347
347
  <div
348
348
  class="progress-bar"
@@ -353,7 +353,7 @@
353
353
  aria-valuemax="100"
354
354
  ></div>
355
355
  </div>
356
- `}};T([Gm({type:Object})],D$.prototype,"component",void 0),T([Gm({type:Number})],D$.prototype,"scaleFactor",void 0),T([Gm({type:Boolean})],D$.prototype,"inFocusedState",void 0),T([Gm({type:Object})],D$.prototype,"minSDKVersion",void 0),T([Gm({type:Number})],D$.prototype,"currentWidth",void 0),D$=T([Hm("nami-progress-indicator")],D$);let R$=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.isActive=!1,this._handleFocus=()=>{this._announceButtonLabel()},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}_announceButtonLabel(){const e=this.component.screenreaderText||this.component.title||"";e&&Mh(e)}_handleClick(){const e=this.component.onTap?.function;if(!e)return;const t={function:e,parameters:{...this.component.onTap?.parameters,formId:this.component.formId||"",value:"radio"===this.component.mode?this.component.value:void 0}};Gg({onTap:t,contextProvider:this.contextProvider})}updated(){this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=this.component.screenreaderHint??""}styles(){const{component:e}=this,t=this.contextProvider.getCurrentFormId(e.formId||""),n=!0===t||t===e.value;this.inFocusedState=n;const i=n?e.activeFillColor||e.activeFillColorFallback||"transparent":e.inactiveFillColor||e.inactiveFillColorFallback||"transparent",a=n?e.activeBorderColor||"transparent":e.inactiveBorderColor||"transparent";return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius}px !important;\n ${Qp(e,this.scaleFactor,this.inFocusedState)}\n ${Fp(a)}\n border-width: ${n?e.activeBorderWidth||0:e.inactiveBorderWidth||0}px !important;\n ${Yp(n?e.activeDropShadow:e.inactiveDropShadow)};\n border-style: solid;\n ${Wp(i)}\n }\n `)}render(){this.tabIndex=0;return this.component.components.map((e=>vg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}};var N$;T([Gm({type:Object})],R$.prototype,"component",void 0),T([Gm({type:Boolean})],R$.prototype,"inFocusedState",void 0),T([Gm({type:Number})],R$.prototype,"scaleFactor",void 0),T([Gm({type:Object})],R$.prototype,"minSDKVersion",void 0),T([Gm({type:Boolean})],R$.prototype,"isActive",void 0),R$=T([Hm("nami-toggle-button")],R$);let W$=N$=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.timer=null,this.startTime=0,this.initialDuration=0,this.hasEmittedCompletion=!1}firstUpdated(){this.loadTimerState(),this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.saveTimerState(),this.clearTimer()}getTimerId(){return this.component?.id??""}loadTimerState(){this.contextProvider?.flow&&(this.timerState=this.contextProvider.flow.timerStates[this.getTimerId()])}saveTimerState(){if(!this.contextProvider?.flow)return;const{mode:e,durationSeconds:t}=this.component;if("duration"!==e||void 0===t)return;const n=this.calculateCurrentRemainingSeconds();this.contextProvider.flow.timerStates[this.getTimerId()]={remainingSeconds:n,savedAt:Date.now(),hasEmittedCompletion:this.hasEmittedCompletion}}getSavedTimerState(){return this.contextProvider?.flow?.timerStates[this.getTimerId()]}startTimer(){this.initializeTimerState(),this.clearTimer(),this.timer=setInterval((()=>this.onTimerTick()),N$.TIMER_INTERVAL_MS)}initializeTimerState(){const{mode:e,durationSeconds:t,resetOnRemount:n}=this.component;"duration"===e&&void 0!==t&&(this.timerState&&!n?this.restoreTimerFromState(this.timerState,t):this.resetTimerState(t))}restoreTimerFromState(e,t){const n=(Date.now()-e.savedAt)/1e3,i=Math.max(0,e.remainingSeconds-n);this.initialDuration=t,this.startTime=Date.now()-1e3*(this.initialDuration-i),this.hasEmittedCompletion=e.hasEmittedCompletion}resetTimerState(e){this.initialDuration=e,this.startTime=Date.now(),this.hasEmittedCompletion=!1}onTimerTick(){const{isCompleted:e}=this.calculateTimeValues();this.requestUpdate(),e&&this.clearTimer()}clearTimer(){this.timer&&(clearInterval(this.timer),this.timer=null)}calculateTimeValues(){const e=this.calculateTotalRemainingSeconds(),t=e<=0,{units:n}=this.component,{days:i,hours:a,minutes:r,seconds:o}=n||N$.DEFAULT_UNITS;return{...this.convertSecondsToTimeUnits(e,{days:i,hours:a,minutes:r,seconds:o}),isCompleted:t}}calculateTotalRemainingSeconds(){const{mode:e,durationSeconds:t,targetDateTime:n}=this.component;return"duration"===e?this.calculateDurationRemainingSeconds(t):"targetDateTime"===e&&n?this.calculateTargetDateTimeRemainingSeconds(n):0}calculateDurationRemainingSeconds(e){const t=this.getSavedTimerState();if(t){const e=(Date.now()-t.savedAt)/1e3;return Math.max(0,t.remainingSeconds-e)}if(this.initialDuration>0&&this.startTime>0){const e=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-e)}return void 0!==e?Math.max(0,e):0}calculateTargetDateTimeRemainingSeconds(e){const t=new Date(e).getTime(),n=Date.now();return Math.max(0,(t-n)/1e3)}calculateCurrentRemainingSeconds(){const{durationSeconds:e}=this.component;if(this.initialDuration>0&&this.startTime>0){const e=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-e)}return e??0}convertSecondsToTimeUnits(e,t){const n=t.days?Math.floor(e/N$.SECONDS_PER_DAY):0,i=e-n*N$.SECONDS_PER_DAY,a=t.hours?Math.floor(i/N$.SECONDS_PER_HOUR):0,r=i-a*N$.SECONDS_PER_HOUR,o=t.minutes?Math.floor(r/N$.SECONDS_PER_MINUTE):0,s=r-o*N$.SECONDS_PER_MINUTE;return{days:n,hours:a,minutes:o,seconds:t.seconds?Math.floor(s):0}}formatValue(e,t){return t?e.toString().padStart(2,"0"):e.toString()}emitCompletionEvent(){!this.hasEmittedCompletion&&this.contextProvider&&(this.hasEmittedCompletion=!0,nd.getInstance().emit(Be,{...this.contextProvider.getPaywallActionEventData(),action:e.NamiPaywallAction.COUNTDOWN_TIMER_COMPLETED,componentChange:{id:this.component.id,name:this.component.title}}))}updated(e){this.updateAccessibilityAttributes(),e.has("component")&&this.handleComponentChange(e.get("component"))}updateAccessibilityAttributes(){this.ariaLabel=this.component.screenreaderText||"",this.ariaDescription=this.component.screenreaderHint||""}handleComponentChange(e){if(!e)return;const{mode:t,durationSeconds:n,targetDateTime:i}=this.component;(t!==e.mode||n!==e.durationSeconds||i!==e.targetDateTime)&&this.startTimer()}styles(){const{component:e}=this,{labels:t,separator:n,labelPosition:i="none",direction:a="horizontal",labelFontSize:r,labelFontColor:o,labelFontName:s,labelSpacing:l,spacing:d,fontSize:u,fontColor:c,fontName:h,alignment:m}=e,f="below"===i?"bottom":"above"===i?"top":i,p="vertical"===a,g=t&&(t.days||t.hours||t.minutes||t.seconds)||"none"!==f;return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius||0}px !important;\n flex-direction: ${p?"column":"row"};\n align-items: center;\n justify-content: flex-start;\n ${$p(e,this.inFocusedState)}\n ${Up(e,this.scaleFactor)}\n ${Vp(e,this.scaleFactor,this.inFocusedState)}\n ${zp(e)}\n ${Xp(e,this.scaleFactor)}\n }\n .timer-text {\n display: flex;\n flex-direction: ${p?"column":"row"};\n align-items: center;\n gap: ${p?d?d*this.scaleFactor:4:0}px;\n }\n .timer-unit {\n display: flex;\n flex-direction: ${"top"===f||"bottom"===f?"column":"row"};\n align-items: center;\n ${p?`margin-top: ${d?d*this.scaleFactor:4}px;`:`margin-right: ${d?d*this.scaleFactor:4}px;`} \n }\n .timer-text-value-days,\n .timer-text-value-hours,\n .timer-text-value-minutes,\n .timer-text-value-seconds {\n ${u?`font-size: ${u*this.scaleFactor}px;`:""}\n ${c?Op(c):""}\n ${Jp(h)}\n ${m?`text-align: ${m};`:""}\n ${Yp(e.dropShadow,!0)}\n line-height: 1;\n }\n .timer-text-value-label {\n font-size: ${r?r*this.scaleFactor:12*this.scaleFactor}px;\n color: ${o||"inherit"};\n ${Jp(s)}\n ${"top"===f?`margin-bottom: ${l?l*this.scaleFactor:2}px;`:""}\n ${"bottom"===f?`margin-top: ${l?l*this.scaleFactor:2}px;`:""}\n ${g?"":"display: none;"}\n }\n .timer-text-value-separator {\n ${n?`\n display: flex;\n align-items: center;\n ${u?`font-size: ${u*this.scaleFactor}px;`:""}\n ${c?Op(c):""}\n ${Jp(h)}\n line-height: 1;\n ${p?`margin-top: ${d?d*this.scaleFactor:4}px;`:`margin-right: ${d?d*this.scaleFactor:4}px;`} \n ${"bottom"===f||"top"===f?"align-self: flex-start;":""}\n `:"display: none;"}\n }\n `)}render(){this.tabIndex=0;const{showWhenCompleted:e="zero"}=this.component,t=this.calculateTimeValues();if(t.isCompleted&&(this.emitCompletionEvent(),"hidden"===e))return bm``;const n=this.buildUnitsToRender(t);return 0===n.length?bm`<div class="timer-text"></div>`:this.renderTimerUnits(n)}buildUnitsToRender(e){const{labels:t,units:n,labelPosition:i="none"}=this.component,{days:a,hours:r,minutes:o,seconds:s}=n||{},l=this.normalizeLabelPosition(i),d=this.shouldDisplayLabels(t,l);return[{enabled:a,value:e.days,label:this.getLabel("days",t,d),class:"timer-text-value-days"},{enabled:r,value:e.hours,label:this.getLabel("hours",t,d),class:"timer-text-value-hours"},{enabled:o,value:e.minutes,label:this.getLabel("minutes",t,d),class:"timer-text-value-minutes"},{enabled:s,value:e.seconds,label:this.getLabel("seconds",t,d),class:"timer-text-value-seconds"}].filter((e=>e.enabled)).map((e=>({value:e.value,label:e.label,unitClass:e.class,showUnit:!0})))}normalizeLabelPosition(e){return"below"===e?"bottom":"above"===e?"top":e}shouldDisplayLabels(e,t){return Boolean(e&&(e.days||e.hours||e.minutes||e.seconds))||"none"!==t&&void 0!==t}getLabel(e,t,n){return t?.[e]??(n?N$.DEFAULT_LABELS[e]:"")}renderTimerUnits(e){const{separator:t,zeroPad:n=!0,labelPosition:i="none"}=this.component,{labels:a}=this.component,r=this.normalizeLabelPosition(i),o=a&&(a.days||a.hours||a.minutes||a.seconds),s=Boolean(o||"none"!==r),l=t??":";return bm`
356
+ `}};T([Gm({type:Object})],R$.prototype,"component",void 0),T([Gm({type:Number})],R$.prototype,"scaleFactor",void 0),T([Gm({type:Boolean})],R$.prototype,"inFocusedState",void 0),T([Gm({type:Object})],R$.prototype,"minSDKVersion",void 0),T([Gm({type:Number})],R$.prototype,"currentWidth",void 0),R$=T([Hm("nami-progress-indicator")],R$);let N$=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.isActive=!1,this._handleFocus=()=>{this._announceButtonLabel()},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}_announceButtonLabel(){const e=this.component.screenreaderText||this.component.title||"";e&&Mh(e)}_handleClick(){const e=this.component.onTap?.function;if(!e)return;const t={function:e,parameters:{...this.component.onTap?.parameters,formId:this.component.formId||"",value:"radio"===this.component.mode?this.component.value:void 0}};Gg({onTap:t,contextProvider:this.contextProvider})}updated(){this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=this.component.screenreaderHint??""}styles(){const{component:e}=this,t=this.contextProvider.getCurrentFormId(e.formId||""),n=!0===t||t===e.value;this.inFocusedState=n;const i=n?e.activeFillColor||e.activeFillColorFallback||"transparent":e.inactiveFillColor||e.inactiveFillColorFallback||"transparent",a=n?e.activeBorderColor||"transparent":e.inactiveBorderColor||"transparent";return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius}px !important;\n ${Qp(e,this.scaleFactor,this.inFocusedState)}\n ${Fp(a)}\n border-width: ${n?e.activeBorderWidth||0:e.inactiveBorderWidth||0}px !important;\n ${Yp(n?e.activeDropShadow:e.inactiveDropShadow)};\n border-style: solid;\n ${Wp(i)}\n }\n `)}render(){this.tabIndex=0;return this.component.components.map((e=>vg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}};var W$;T([Gm({type:Object})],N$.prototype,"component",void 0),T([Gm({type:Boolean})],N$.prototype,"inFocusedState",void 0),T([Gm({type:Number})],N$.prototype,"scaleFactor",void 0),T([Gm({type:Object})],N$.prototype,"minSDKVersion",void 0),T([Gm({type:Boolean})],N$.prototype,"isActive",void 0),N$=T([Hm("nami-toggle-button")],N$);let F$=W$=class extends Sp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this.timer=null,this.startTime=0,this.initialDuration=0,this.hasEmittedCompletion=!1}firstUpdated(){this.loadTimerState(),this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.saveTimerState(),this.clearTimer()}getTimerId(){return this.component?.id??""}loadTimerState(){this.contextProvider?.flow&&(this.timerState=this.contextProvider.flow.timerStates[this.getTimerId()])}saveTimerState(){if(!this.contextProvider?.flow)return;const{mode:e,durationSeconds:t}=this.component;if("duration"!==e||void 0===t)return;const n=this.calculateCurrentRemainingSeconds();this.contextProvider.flow.timerStates[this.getTimerId()]={remainingSeconds:n,savedAt:Date.now(),hasEmittedCompletion:this.hasEmittedCompletion}}getSavedTimerState(){return this.contextProvider?.flow?.timerStates[this.getTimerId()]}startTimer(){this.initializeTimerState(),this.clearTimer(),this.timer=setInterval((()=>this.onTimerTick()),W$.TIMER_INTERVAL_MS)}initializeTimerState(){const{mode:e,durationSeconds:t,resetOnRemount:n}=this.component;"duration"===e&&void 0!==t&&(this.timerState&&!n?this.restoreTimerFromState(this.timerState,t):this.resetTimerState(t))}restoreTimerFromState(e,t){const n=(Date.now()-e.savedAt)/1e3,i=Math.max(0,e.remainingSeconds-n);this.initialDuration=t,this.startTime=Date.now()-1e3*(this.initialDuration-i),this.hasEmittedCompletion=e.hasEmittedCompletion}resetTimerState(e){this.initialDuration=e,this.startTime=Date.now(),this.hasEmittedCompletion=!1}onTimerTick(){const{isCompleted:e}=this.calculateTimeValues();this.requestUpdate(),e&&this.clearTimer()}clearTimer(){this.timer&&(clearInterval(this.timer),this.timer=null)}calculateTimeValues(){const e=this.calculateTotalRemainingSeconds(),t=e<=0,{units:n}=this.component,{days:i,hours:a,minutes:r,seconds:o}=n||W$.DEFAULT_UNITS;return{...this.convertSecondsToTimeUnits(e,{days:i,hours:a,minutes:r,seconds:o}),isCompleted:t}}calculateTotalRemainingSeconds(){const{mode:e,durationSeconds:t,targetDateTime:n}=this.component;return"duration"===e?this.calculateDurationRemainingSeconds(t):"targetDateTime"===e&&n?this.calculateTargetDateTimeRemainingSeconds(n):0}calculateDurationRemainingSeconds(e){const t=this.getSavedTimerState();if(t){const e=(Date.now()-t.savedAt)/1e3;return Math.max(0,t.remainingSeconds-e)}if(this.initialDuration>0&&this.startTime>0){const e=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-e)}return void 0!==e?Math.max(0,e):0}calculateTargetDateTimeRemainingSeconds(e){const t=new Date(e).getTime(),n=Date.now();return Math.max(0,(t-n)/1e3)}calculateCurrentRemainingSeconds(){const{durationSeconds:e}=this.component;if(this.initialDuration>0&&this.startTime>0){const e=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-e)}return e??0}convertSecondsToTimeUnits(e,t){const n=t.days?Math.floor(e/W$.SECONDS_PER_DAY):0,i=e-n*W$.SECONDS_PER_DAY,a=t.hours?Math.floor(i/W$.SECONDS_PER_HOUR):0,r=i-a*W$.SECONDS_PER_HOUR,o=t.minutes?Math.floor(r/W$.SECONDS_PER_MINUTE):0,s=r-o*W$.SECONDS_PER_MINUTE;return{days:n,hours:a,minutes:o,seconds:t.seconds?Math.floor(s):0}}formatValue(e,t){return t?e.toString().padStart(2,"0"):e.toString()}emitCompletionEvent(){!this.hasEmittedCompletion&&this.contextProvider&&(this.hasEmittedCompletion=!0,nd.getInstance().emit(Be,{...this.contextProvider.getPaywallActionEventData(),action:e.NamiPaywallAction.COUNTDOWN_TIMER_COMPLETED,componentChange:{id:this.component.id,name:this.component.title}}))}updated(e){this.updateAccessibilityAttributes(),e.has("component")&&this.handleComponentChange(e.get("component"))}updateAccessibilityAttributes(){this.ariaLabel=this.component.screenreaderText||"",this.ariaDescription=this.component.screenreaderHint||""}handleComponentChange(e){if(!e)return;const{mode:t,durationSeconds:n,targetDateTime:i}=this.component;(t!==e.mode||n!==e.durationSeconds||i!==e.targetDateTime)&&this.startTimer()}styles(){const{component:e}=this,{labels:t,separator:n,labelPosition:i="none",direction:a="horizontal",labelFontSize:r,labelFontColor:o,labelFontName:s,labelSpacing:l,spacing:d,fontSize:u,fontColor:c,fontName:h,alignment:m}=e,f="below"===i?"bottom":"above"===i?"top":i,p="vertical"===a,g=t&&(t.days||t.hours||t.minutes||t.seconds)||"none"!==f;return Rh(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius||0}px !important;\n flex-direction: ${p?"column":"row"};\n align-items: center;\n justify-content: flex-start;\n ${$p(e,this.inFocusedState)}\n ${Up(e,this.scaleFactor)}\n ${Vp(e,this.scaleFactor,this.inFocusedState)}\n ${zp(e)}\n ${Xp(e,this.scaleFactor)}\n }\n .timer-text {\n display: flex;\n flex-direction: ${p?"column":"row"};\n align-items: center;\n gap: ${p?d?d*this.scaleFactor:4:0}px;\n }\n .timer-unit {\n display: flex;\n flex-direction: ${"top"===f||"bottom"===f?"column":"row"};\n align-items: center;\n ${p?`margin-top: ${d?d*this.scaleFactor:4}px;`:`margin-right: ${d?d*this.scaleFactor:4}px;`} \n }\n .timer-text-value-days,\n .timer-text-value-hours,\n .timer-text-value-minutes,\n .timer-text-value-seconds {\n ${u?`font-size: ${u*this.scaleFactor}px;`:""}\n ${c?Op(c):""}\n ${Jp(h)}\n ${m?`text-align: ${m};`:""}\n ${Yp(e.dropShadow,!0)}\n line-height: 1;\n }\n .timer-text-value-label {\n font-size: ${r?r*this.scaleFactor:12*this.scaleFactor}px;\n color: ${o||"inherit"};\n ${Jp(s)}\n ${"top"===f?`margin-bottom: ${l?l*this.scaleFactor:2}px;`:""}\n ${"bottom"===f?`margin-top: ${l?l*this.scaleFactor:2}px;`:""}\n ${g?"":"display: none;"}\n }\n .timer-text-value-separator {\n ${n?`\n display: flex;\n align-items: center;\n ${u?`font-size: ${u*this.scaleFactor}px;`:""}\n ${c?Op(c):""}\n ${Jp(h)}\n line-height: 1;\n ${p?`margin-top: ${d?d*this.scaleFactor:4}px;`:`margin-right: ${d?d*this.scaleFactor:4}px;`} \n ${"bottom"===f||"top"===f?"align-self: flex-start;":""}\n `:"display: none;"}\n }\n `)}render(){this.tabIndex=0;const{showWhenCompleted:e="zero"}=this.component,t=this.calculateTimeValues();if(t.isCompleted&&(this.emitCompletionEvent(),"hidden"===e))return bm``;const n=this.buildUnitsToRender(t);return 0===n.length?bm`<div class="timer-text"></div>`:this.renderTimerUnits(n)}buildUnitsToRender(e){const{labels:t,units:n,labelPosition:i="none"}=this.component,{days:a,hours:r,minutes:o,seconds:s}=n||{},l=this.normalizeLabelPosition(i),d=this.shouldDisplayLabels(t,l);return[{enabled:a,value:e.days,label:this.getLabel("days",t,d),class:"timer-text-value-days"},{enabled:r,value:e.hours,label:this.getLabel("hours",t,d),class:"timer-text-value-hours"},{enabled:o,value:e.minutes,label:this.getLabel("minutes",t,d),class:"timer-text-value-minutes"},{enabled:s,value:e.seconds,label:this.getLabel("seconds",t,d),class:"timer-text-value-seconds"}].filter((e=>e.enabled)).map((e=>({value:e.value,label:e.label,unitClass:e.class,showUnit:!0})))}normalizeLabelPosition(e){return"below"===e?"bottom":"above"===e?"top":e}shouldDisplayLabels(e,t){return Boolean(e&&(e.days||e.hours||e.minutes||e.seconds))||"none"!==t&&void 0!==t}getLabel(e,t,n){return t?.[e]??(n?W$.DEFAULT_LABELS[e]:"")}renderTimerUnits(e){const{separator:t,zeroPad:n=!0,labelPosition:i="none"}=this.component,{labels:a}=this.component,r=this.normalizeLabelPosition(i),o=a&&(a.days||a.hours||a.minutes||a.seconds),s=Boolean(o||"none"!==r),l=t??":";return bm`
357
357
  <div class="timer-text">
358
358
  ${e.map(((t,i)=>bm`
359
359
  ${this.renderUnit(t.value,t.label,t.unitClass,t.showUnit,n,r,s)}
@@ -366,7 +366,7 @@
366
366
  <span class="${n}">${this.formatValue(e,a)}</span>
367
367
  ${s&&"bottom"===r?bm`<span class="timer-text-value-label">${t}</span>`:""}
368
368
  </div>
369
- `}};W$.DEFAULT_LABELS={days:"days",hours:"hours",minutes:"minutes",seconds:"seconds"},W$.DEFAULT_UNITS={days:!1,hours:!0,minutes:!0,seconds:!0},W$.SECONDS_PER_DAY=86400,W$.SECONDS_PER_HOUR=3600,W$.SECONDS_PER_MINUTE=60,W$.TIMER_INTERVAL_MS=1e3,T([Gm({type:Object})],W$.prototype,"component",void 0),T([Gm({type:Boolean})],W$.prototype,"inFocusedState",void 0),T([Gm({type:Number})],W$.prototype,"scaleFactor",void 0),T([Gm({type:Object})],W$.prototype,"minSDKVersion",void 0),W$=N$=T([Hm("nami-countdown-timer-text")],W$);let F$=class extends Sp{constructor(){super(...arguments),this.scaleFactor=1,this.inFocusedState=!1,this.currentProgress=0,this.isAnimating=!1,this.screenreaderAnnouncement="",this.hasInitialized=!1,this.delayTimeoutId=null,this.animationFrameId=null,this.animationStartTime=null,this.startPercentage=0}connectedCallback(){super.connectedCallback(),lO(this.minSDKVersion,"ProgressBar")}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}firstUpdated(e){super.firstUpdated(e),this.hasInitialized=!0,this.startAnimation()}updated(e){super.updated(e),this.hasInitialized&&e.has("component")&&(this.cleanup(),this.startAnimation())}cleanup(){null!==this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationStartTime=null,this.isAnimating=!1}getResolvedDuration(){const{duration:e,mode:t}=this.component;if("auto"===e&&"determinate"===t){return jf.getCurrentFlowStepAutoAdvanceDelay()??3}return"number"==typeof e&&e>0?e:"determinate"===t?3:2}startAnimation(){const{mode:e,delay:t,percentage:n=0}=this.component,i="number"==typeof n&&!Number.isInteger(n);this.startPercentage="number"==typeof n?i?100*n:n:0,this.currentProgress=this.startPercentage;const a="number"==typeof t&&t>0?1e3*t:0;a>0?this.delayTimeoutId=setTimeout((()=>{this.delayTimeoutId=null,this.beginAnimation(e)}),a):this.beginAnimation(e)}beginAnimation(e){this.isAnimating=!0;const t=this.component.screenreaderText||"Loading";this.screenreaderAnnouncement=t,setTimeout((()=>{this.screenreaderAnnouncement=""}),1e3),"determinate"===e&&this.animateDeterminate()}animateDeterminate(){if(this.isAnimating&&null!==this.animationFrameId)return;const e=1e3*this.getResolvedDuration(),t=this.startPercentage;this.animationStartTime=null;const n=i=>{null===this.animationStartTime&&(this.animationStartTime=i);const a=i-this.animationStartTime,r=Math.min(1,a/e);this.currentProgress=t+(100-t)*r,r<1?this.animationFrameId=requestAnimationFrame(n):(this.currentProgress=100,this.isAnimating=!1,this.animationFrameId=null,this.animationStartTime=null)};this.animationFrameId=requestAnimationFrame(n)}getActiveWidthCss(){const{activeWidth:e}=this.component;return null==e?"30%":"number"==typeof e?`${e}px`:String(e).trim()}isActiveWidthPercent(){const{activeWidth:e}=this.component;return null==e||"number"!=typeof e&&String(e).endsWith("%")}styles(){const{component:e,scaleFactor:t,inFocusedState:n}=this,{mode:i,inactiveFillColor:a,inactiveFillColorFallback:r,inactiveBorderRadius:o,activeFillColor:s,activeFillColorFallback:l,activeBorderRadius:d,innerPadding:u=0,activeDropShadow:c,inactiveDropShadow:h}=e,m=this.getActiveWidthCss(),f=this.getResolvedDuration(),p=this.isActiveWidthPercent(),g=p&&parseFloat(m)||30,v=(100-g)/g*100,y=p?0:parseFloat(m)||0;return Rh(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${Qp(e,t,n)}\n }\n \n .progress-container {\n ${Xp(e,t)} \n background: ${a||r};\n border-radius: ${o||0}px;\n overflow: hidden;\n position: relative;\n padding: ${u*t}px;\n box-sizing: border-box;\n ${Yp(h)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${s||l};\n border-radius: ${d||0}px;\n box-sizing: border-box;\n ${Yp(c)}\n ${"indeterminate"===i?`\n position: absolute;\n left: 0;\n top: ${u*t}px;\n bottom: ${u*t}px;\n width: ${m};\n animation: slide ${f}s linear infinite;\n `:""}\n }\n\n ${"indeterminate"===i?p?`\n @keyframes slide {\n 0% {\n transform: translateX(-${v}%);\n }\n 100% {\n transform: translateX(${v+100}%);\n }\n }\n `:`\n @keyframes slide {\n 0% {\n left: -${y}px;\n }\n 100% {\n left: 100%;\n }\n }\n `:""}\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `)}render(){const{mode:e}=this.component;return bm`
369
+ `}};F$.DEFAULT_LABELS={days:"days",hours:"hours",minutes:"minutes",seconds:"seconds"},F$.DEFAULT_UNITS={days:!1,hours:!0,minutes:!0,seconds:!0},F$.SECONDS_PER_DAY=86400,F$.SECONDS_PER_HOUR=3600,F$.SECONDS_PER_MINUTE=60,F$.TIMER_INTERVAL_MS=1e3,T([Gm({type:Object})],F$.prototype,"component",void 0),T([Gm({type:Boolean})],F$.prototype,"inFocusedState",void 0),T([Gm({type:Number})],F$.prototype,"scaleFactor",void 0),T([Gm({type:Object})],F$.prototype,"minSDKVersion",void 0),F$=W$=T([Hm("nami-countdown-timer-text")],F$);let O$=class extends Sp{constructor(){super(...arguments),this.scaleFactor=1,this.inFocusedState=!1,this.currentProgress=0,this.isAnimating=!1,this.screenreaderAnnouncement="",this.hasInitialized=!1,this.delayTimeoutId=null,this.animationFrameId=null,this.animationStartTime=null,this.startPercentage=0}connectedCallback(){super.connectedCallback(),dO(this.minSDKVersion,"ProgressBar")}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}firstUpdated(e){super.firstUpdated(e),this.hasInitialized=!0,this.startAnimation()}updated(e){super.updated(e),this.hasInitialized&&e.has("component")&&(this.cleanup(),this.startAnimation())}cleanup(){null!==this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationStartTime=null,this.isAnimating=!1}getResolvedDuration(){const{duration:e,mode:t}=this.component;if("auto"===e&&"determinate"===t){return jf.getCurrentFlowStepAutoAdvanceDelay()??3}return"number"==typeof e&&e>0?e:"determinate"===t?3:2}startAnimation(){const{mode:e,delay:t,percentage:n=0}=this.component,i="number"==typeof n&&!Number.isInteger(n);this.startPercentage="number"==typeof n?i?100*n:n:0,this.currentProgress=this.startPercentage;const a="number"==typeof t&&t>0?1e3*t:0;a>0?this.delayTimeoutId=setTimeout((()=>{this.delayTimeoutId=null,this.beginAnimation(e)}),a):this.beginAnimation(e)}beginAnimation(e){this.isAnimating=!0;const t=this.component.screenreaderText||"Loading";this.screenreaderAnnouncement=t,setTimeout((()=>{this.screenreaderAnnouncement=""}),1e3),"determinate"===e&&this.animateDeterminate()}animateDeterminate(){if(this.isAnimating&&null!==this.animationFrameId)return;const e=1e3*this.getResolvedDuration(),t=this.startPercentage;this.animationStartTime=null;const n=i=>{null===this.animationStartTime&&(this.animationStartTime=i);const a=i-this.animationStartTime,r=Math.min(1,a/e);this.currentProgress=t+(100-t)*r,r<1?this.animationFrameId=requestAnimationFrame(n):(this.currentProgress=100,this.isAnimating=!1,this.animationFrameId=null,this.animationStartTime=null)};this.animationFrameId=requestAnimationFrame(n)}getActiveWidthCss(){const{activeWidth:e}=this.component;return null==e?"30%":"number"==typeof e?`${e}px`:String(e).trim()}isActiveWidthPercent(){const{activeWidth:e}=this.component;return null==e||"number"!=typeof e&&String(e).endsWith("%")}styles(){const{component:e,scaleFactor:t,inFocusedState:n}=this,{mode:i,inactiveFillColor:a,inactiveFillColorFallback:r,inactiveBorderRadius:o,activeFillColor:s,activeFillColorFallback:l,activeBorderRadius:d,innerPadding:u=0,activeDropShadow:c,inactiveDropShadow:h}=e,m=this.getActiveWidthCss(),f=this.getResolvedDuration(),p=this.isActiveWidthPercent(),g=p&&parseFloat(m)||30,v=(100-g)/g*100,y=p?0:parseFloat(m)||0;return Rh(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${Qp(e,t,n)}\n }\n \n .progress-container {\n ${Xp(e,t)} \n background: ${a||r};\n border-radius: ${o||0}px;\n overflow: hidden;\n position: relative;\n padding: ${u*t}px;\n box-sizing: border-box;\n ${Yp(h)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${s||l};\n border-radius: ${d||0}px;\n box-sizing: border-box;\n ${Yp(c)}\n ${"indeterminate"===i?`\n position: absolute;\n left: 0;\n top: ${u*t}px;\n bottom: ${u*t}px;\n width: ${m};\n animation: slide ${f}s linear infinite;\n `:""}\n }\n\n ${"indeterminate"===i?p?`\n @keyframes slide {\n 0% {\n transform: translateX(-${v}%);\n }\n 100% {\n transform: translateX(${v+100}%);\n }\n }\n `:`\n @keyframes slide {\n 0% {\n left: -${y}px;\n }\n 100% {\n left: 100%;\n }\n }\n `:""}\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `)}render(){const{mode:e}=this.component;return bm`
370
370
  <div class="progress-container">
371
371
  <div
372
372
  class="progress-bar"
@@ -383,4 +383,4 @@
383
383
  aria-live="polite"
384
384
  aria-atomic="true"
385
385
  >${this.screenreaderAnnouncement}</span>
386
- `}};T([Gm({type:Object})],F$.prototype,"component",void 0),T([Gm({type:Number})],F$.prototype,"scaleFactor",void 0),T([Gm({type:Boolean})],F$.prototype,"inFocusedState",void 0),T([Gm({type:Object})],F$.prototype,"minSDKVersion",void 0),T([Vm()],F$.prototype,"currentProgress",void 0),T([Vm()],F$.prototype,"isAnimating",void 0),T([Vm()],F$.prototype,"screenreaderAnnouncement",void 0),F$=T([Hm("nami-progress-bar")],F$),e.Nami=Ph,e.NamiCampaignManager=np,e.NamiCustomerManager=Ff,e.NamiEntitlementManager=ap,e.NamiFlowManager=rp,e.NamiPaywallManager=ip,e.isNamiFlowCampaign=el}));
386
+ `}};T([Gm({type:Object})],O$.prototype,"component",void 0),T([Gm({type:Number})],O$.prototype,"scaleFactor",void 0),T([Gm({type:Boolean})],O$.prototype,"inFocusedState",void 0),T([Gm({type:Object})],O$.prototype,"minSDKVersion",void 0),T([Vm()],O$.prototype,"currentProgress",void 0),T([Vm()],O$.prototype,"isAnimating",void 0),T([Vm()],O$.prototype,"screenreaderAnnouncement",void 0),O$=T([Hm("nami-progress-bar")],O$),e.Nami=Ph,e.NamiCampaignManager=np,e.NamiCustomerManager=Ff,e.NamiEntitlementManager=ap,e.NamiFlowManager=rp,e.NamiPaywallManager=ip,e.isNamiFlowCampaign=el}));