@namiml/web-sdk 3.5.0-dev.202611121653 → 3.5.0-dev.202611130235

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nami-web.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("@namiml/sdk-core"),t=require("lit"),i=require("lit/directives/repeat.js");function n(e,t){this.v=e,this.k=t}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e){return new n(e,0)}function s(e,t,i){return t=g(t),w(e,b()?Reflect.construct(t,i||[],g(e).constructor):t.apply(e,i))}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(()=>{if("undefined"==typeof globalThis){var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")();Object.defineProperty(e,"globalThis",{value:e,writable:!0,enumerable:!1,configurable:!0})}})(),"undefined"!=typeof Element&&"function"!=typeof Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var e=this.attributes,t=new Array(e.length),i=0;i<e.length;i+=1)t[i]=e[i].name;return t});var d=0;function h(e){return"__private_"+d+++"_"+e}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A(n.key),n)}}function m(e,t,i){return t&&c(e.prototype,t),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return a(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},v.apply(null,arguments)}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:i):a.value}},p.apply(null,arguments)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function w(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(e)}function k(){var e,t,i="function"==typeof Symbol?Symbol:{},n=i.iterator||"@@iterator",a=i.toStringTag||"@@toStringTag";function r(i,n,a,r){var u=n&&n.prototype instanceof s?n:s,l=Object.create(u.prototype);return T(l,"_invoke",function(i,n,a){var r,s,u,l=0,d=a||[],h=!1,c={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,i){return r=t,s=0,u=e,c.n=i,o}};function m(i,n){for(s=i,u=n,t=0;!h&&l&&!a&&t<d.length;t++){var a,r=d[t],m=c.p,f=r[2];i>3?(a=f===n)&&(u=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=m&&((a=i<2&&m<r[1])?(s=0,c.v=n,c.n=r[1]):m<f&&(a=i<3||r[0]>n||n>f)&&(r[4]=i,r[5]=n,c.n=f,s=0))}if(a||i>1)return o;throw h=!0,n}return function(a,d,f){if(l>1)throw TypeError("Generator is already running");for(h&&1===d&&m(d,f),s=d,u=f;(t=s<2?e:u)||!h;){r||(s?s<3?(s>1&&(c.n=-1),m(s,u)):c.n=u:c.v=u);try{if(l=2,r){if(s||(a="next"),t=r[a]){if(!(t=t.call(r,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),s=1);r=e}else if((t=(h=c.n<0)?u:i.call(n,c))!==o)break}catch(t){r=e,s=1,u=t}finally{l=1}}return{value:t,done:h}}}(i,a,r),!0),l}var o={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(T(t={},n,function(){return this}),t),h=l.prototype=s.prototype=Object.create(d);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,T(e,a,"GeneratorFunction")),e.prototype=Object.create(h),e}return u.prototype=l,T(h,"constructor",l),T(l,"constructor",u),u.displayName="GeneratorFunction",T(l,a,"GeneratorFunction"),T(h),T(h,a,"Generator"),T(h,n,function(){return this}),T(h,"toString",function(){return"[object Generator]"}),(k=function(){return{w:r,m:c}})()}function S(e,t,i,n,a){var r=function(e,t,i,n,a){return new E(k().w(e,t,i,n),a||Promise)}(e,t,i,n,a);return r.next().then(function(e){return e.done?e.value:r.next()})}function E(e,t){function i(a,r,o,s){try{var u=e[a](r),l=u.value;return l instanceof n?t.resolve(l.v).then(function(e){i("next",e,o,s)},function(e){i("throw",e,o,s)}):t.resolve(l).then(function(e){u.value=e,o(u)},function(e){return i("throw",e,o,s)})}catch(e){s(e)}}var a;this.next||(T(E.prototype),T(E.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),T(this,"_invoke",function(e,n,r){function o(){return new t(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)}function T(e,t,i,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}T=function(e,t,i,n){function r(t,i){T(e,t,function(e){return this._invoke(t,i,e)})}t?a?a(e,t,{value:i,enumerable:!n,configurable:!n,writable:!n}):e[t]=i:(r("next",0),r("throw",1),r("return",2))},T(e,t,i,n)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function M(e,t,i,n){var a=p(g(e.prototype),t,i);return"function"==typeof a?function(e){return a.apply(i,e)}:a}function A(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function D(e){var t="function"==typeof Map?new Map:void 0;return D=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return function(e,t,i){if(b())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return i&&P(a,i.prototype),a}(e,arguments,g(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),P(i,e)},D(e)}var x,C,I,L,_,R,F,O,W,$,N,j,B=function(){return m(function e(t){u(this,e),this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t},[{key:"shadowRoot",get:function(){return this.__host.__shadowRoot}},{key:"checkValidity",value:function(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}},{key:"reportValidity",value:function(){return!0}},{key:"setFormValue",value:function(){}},{key:"setValidity",value:function(){}}])}(),z=function(e,t,i,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!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"===n?a.call(e,i):a?a.value=i:t.set(e,i),i},U=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},H={__proto__:null,enumerable:!0};Object.freeze(H);var G=($=function(){return m(function e(t,i={}){if(u(this,e),x.set(this,!1),C.set(this,!1),I.set(this,!1),L.set(this,!1),_.set(this,Date.now()),R.set(this,!1),F.set(this,void 0),O.set(this,void 0),W.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 i||!i)throw new Error('The "options" argument must be an object');var n=i.bubbles,a=i.cancelable,r=i.composed;z(this,x,!!a,"f"),z(this,C,!!n,"f"),z(this,I,!!r,"f"),z(this,F,`${t}`,"f"),z(this,O,null,"f"),z(this,W,!1,"f")},[{key:"initEvent",value:function(e,t,i){throw new Error("Method not implemented.")}},{key:"stopImmediatePropagation",value:function(){this.stopPropagation()}},{key:"preventDefault",value:function(){z(this,L,!0,"f")}},{key:"target",get:function(){return U(this,O,"f")}},{key:"currentTarget",get:function(){return U(this,O,"f")}},{key:"srcElement",get:function(){return U(this,O,"f")}},{key:"type",get:function(){return U(this,F,"f")}},{key:"cancelable",get:function(){return U(this,x,"f")}},{key:"defaultPrevented",get:function(){return U(this,x,"f")&&U(this,L,"f")}},{key:"timeStamp",get:function(){return U(this,_,"f")}},{key:"composedPath",value:function(){return U(this,W,"f")?[U(this,O,"f")]:[]}},{key:"returnValue",get:function(){return!U(this,x,"f")||!U(this,L,"f")}},{key:"bubbles",get:function(){return U(this,C,"f")}},{key:"composed",get:function(){return U(this,I,"f")}},{key:"eventPhase",get:function(){return U(this,W,"f")?$.AT_TARGET:$.NONE}},{key:"cancelBubble",get:function(){return U(this,R,"f")},set:function(e){e&&z(this,R,!0,"f")}},{key:"stopPropagation",value:function(){z(this,R,!0,"f")}},{key:"isTrusted",get:function(){return!1}}])}(),x=new WeakMap,C=new WeakMap,I=new WeakMap,L=new WeakMap,_=new WeakMap,R=new WeakMap,F=new WeakMap,O=new WeakMap,W=new WeakMap,$.NONE=0,$.CAPTURING_PHASE=1,$.AT_TARGET=2,$.BUBBLING_PHASE=3,$);Object.defineProperties(G.prototype,{initEvent:H,stopImmediatePropagation:H,preventDefault:H,target:H,currentTarget:H,srcElement:H,type:H,cancelable:H,defaultPrevented:H,timeStamp:H,composedPath:H,returnValue:H,bubbles:H,composed:H,eventPhase:H,cancelBubble:H,stopPropagation:H,isTrusted:H});var V=(j=function(){function e(t,i={}){var n,a;return u(this,e),a=s(this,e,[t,i]),N.set(a,void 0),z(a,N,null!==(n=null==i?void 0:i.detail)&&void 0!==n?n:null,"f"),a}return y(e,G),m(e,[{key:"initCustomEvent",value:function(e,t,i,n){throw new Error("Method not implemented.")}},{key:"detail",get:function(){return U(this,N,"f")}}])}(),N=new WeakMap,j);Object.defineProperties(V.prototype,{detail:H});var K,X,Y,q,J=G,Q=V;(K=function(){return m(function e(){u(this,e),this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""},[{key:"parentRule",get:function(){return null}},{key:"parentStyleSheet",get:function(){return this.__parentStyleSheet}},{key:"type",get:function(){return 0}}])}()).STYLE_RULE=1,K.CHARSET_RULE=2,K.IMPORT_RULE=3,K.MEDIA_RULE=4,K.FONT_FACE_RULE=5,K.PAGE_RULE=6,K.NAMESPACE_RULE=10,K.KEYFRAMES_RULE=7,K.KEYFRAME_RULE=8,K.SUPPORTS_RULE=12,K.COUNTER_STYLE_RULE=11,K.FONT_FEATURE_VALUES_RULE=14,K.MARGIN_RULE=9,null!==(X=globalThis.Event)&&void 0!==X||(globalThis.Event=J),null!==(Y=globalThis.CustomEvent)&&void 0!==Y||(globalThis.CustomEvent=Q);var Z=Symbol(),ee=e=>{var t;return"boolean"==typeof e?e:null!==(t=null==e?void 0:e.capture)&&void 0!==t&&t},te={__proto__:null,enumerable:!0};Object.freeze(te);var ie=function(){return m(function e(){u(this,e),this.__eventListeners=new Map,this.__captureEventListeners=new Map},[{key:"addEventListener",value:function(e,t,i){var n;if(null!=t){var a=ee(i)?this.__captureEventListeners:this.__eventListeners,r=a.get(e);if(void 0===r)r=new Map,a.set(e,r);else if(r.has(t))return;var o="object"==typeof i&&i?i:{};null===(n=o.signal)||void 0===n||n.addEventListener("abort",()=>this.removeEventListener(e,t,i)),r.set(t,null!=o?o:{})}}},{key:"removeEventListener",value:function(e,t,i){if(null!=t){var n=ee(i)?this.__captureEventListeners:this.__eventListeners,a=n.get(e);void 0!==a&&(a.delete(t),a.size||n.delete(e))}}},{key:"dispatchEvent",value:function(e){var t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));var i=!1,n=!1,a=J.NONE,r=null,o=null,s=null,u=e.stopPropagation,l=e.stopImmediatePropagation;Object.defineProperties(e,{target:v({get:()=>null!=r?r:o},te),srcElement:v({get:()=>e.target},te),currentTarget:v({get:()=>s},te),eventPhase:v({get:()=>a},te),composedPath:v({value:()=>t},te),stopPropagation:v({value:()=>{i=!0,u.call(e)}},te),stopImmediatePropagation:v({value:()=>{n=!0,l.call(e)}},te)});var d=(t,i,n)=>{"function"==typeof t?t(e):"function"==typeof(null==t?void 0:t.handleEvent)&&t.handleEvent(e),i.once&&n.delete(t)},h=()=>(s=null,a=J.NONE,!e.defaultPrevented),c=t.slice().reverse();r=this.__host&&e.composed?null:this;for(var m,p=e=>{for(o=this;o.__host&&e.includes(o.__host);)o=o.__host},g=f(c);!(m=g()).done;){var y=m.value;r||o&&o!==y.__host||p(c.slice(c.indexOf(y))),s=y,a=y===e.target?J.AT_TARGET:J.CAPTURING_PHASE;var b=y.__captureEventListeners.get(e.type);if(b)for(var w,k=f(b);!(w=k()).done;){var S=w.value;if(d(S[0],S[1],b),n)return h()}if(i)return h()}var E=e.bubbles?t:[this];o=null;for(var T,P=f(E);!(T=P()).done;){var M=T.value;r||o&&M!==o.__host||p(E.slice(0,E.indexOf(M)+1)),s=M,a=M===e.target?J.AT_TARGET:J.BUBBLING_PHASE;var A=M.__eventListeners.get(e.type);if(A)for(var D,x=f(A);!(D=x()).done;){var C=D.value;if(d(C[0],C[1],A),n)return h()}if(i)return h()}return h()}},{key:"__resolveFullEventPath",value:function(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,se,ge]}}])}(),ne=new WeakMap,ae=e=>{var t=ne.get(e);return void 0===t&&ne.set(e,t=new Map),t},re=function(){function e(){return u(this,e),s(this,e,arguments)}return y(e,ie),m(e,[{key:"getRootNode",value:function(e){var t;if(null!=e&&e.composed)return ue;var i=this.__host;return null!==(t=null==i?void 0:i.__shadowRoot)&&void 0!==t?t:ue}}])}(),oe=function(){function e(){return u(this,e),s(this,e,arguments)}return y(e,re),m(e,[{key:"adoptedStyleSheets",get:function(){return[]}},{key:"createTreeWalker",value:function(){return{}}},{key:"createTextNode",value:function(){return{}}},{key:"createElement",value:function(){return{}}}])}(),se=new oe,ue=se,le=function(){function e(t){var i;if(u(this,e),i=s(this,e),t!==Z)throw new TypeError("Illegal constructor");return Object.assign(i,globalThis,{CustomElementRegistry:ve,customElements:pe,document:ue,Document:oe,Element:de,EventTarget:ie,HTMLElement:he,Node:re,ShadowRoot:me,window:i,Window:le}),i}return y(e,re),m(e)}(),de=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).__shadowRootMode=null,t.__shadowRoot=null,t.__internals=null,t}return y(e,re),m(e,[{key:"attributes",get:function(){return Array.from(ae(this)).map(([e,t])=>({name:e,value:t}))}},{key:"shadowRoot",get:function(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}},{key:"localName",get:function(){return this.constructor.__localName}},{key:"tagName",get:function(){var e;return null===(e=this.localName)||void 0===e?void 0:e.toUpperCase()}},{key:"setAttribute",value:function(e,t){ae(this).set(e,String(t))}},{key:"removeAttribute",value:function(e){ae(this).delete(e)}},{key:"toggleAttribute",value:function(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}},{key:"hasAttribute",value:function(e){return ae(this).has(e)}},{key:"attachShadow",value:function(e){this.__shadowRootMode=e.mode;var t=new me(Z,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}},{key:"attachInternals",value:function(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");var e=new B(this);return this.__internals=e,e}},{key:"getAttribute",value:function(e){var t=ae(this).get(e);return null!=t?t:null}}])}(),he=function(){function e(){return u(this,e),s(this,e,arguments)}return y(e,de),m(e)}(),ce=he,me=function(){function e(t,i){var n;if(u(this,e),n=s(this,e),t!=t)throw new TypeError("Illegal constructor");return n.mode=i.mode,n}return y(e,re),m(e,[{key:"host",get:function(){return this.__host}}])}();function fe(){var e,t;return{promise:new Promise((i,n)=>{e=i,t=n}),resolve:e,reject:t}}null!==(q=globalThis.litServerRoot)&&void 0!==q||(globalThis.litServerRoot=Object.defineProperty(new ce,"localName",{get:()=>"lit-server-root"}));var ve=function(){return m(function e(){u(this,e),this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map},[{key:"define",value:function(e,t){var i,n;if(this.__definitions.has(e)){if("development"!==process.env.NODE_ENV)throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`)}if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:null!==(i=t.observedAttributes)&&void 0!==i?i:[]}),this.__reverseDefinitions.set(t,e),null===(n=this.__pendingWhenDefineds.get(e))||void 0===n||n.resolve(t),this.__pendingWhenDefineds.delete(e)}},{key:"get",value:function(e){var t=this.__definitions.get(e);return null==t?void 0:t.ctor}},{key:"getName",value:function(e){var t;return null!==(t=this.__reverseDefinitions.get(e))&&void 0!==t?t:null}},{key:"initialize",value:function(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}},{key:"upgrade",value:function(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}},{key:"whenDefined",value:function(e){var t,i;return S(function(n){for(;;)switch(n.n){case 0:if(!(t=this.__definitions.get(e))){n.n=1;break}return n.a(2,t.ctor);case 1:return(i=this.__pendingWhenDefineds.get(e))||(i=fe(),this.__pendingWhenDefineds.set(e,i)),n.a(2,i.promise)}},null,this,null,Promise)}}])}(),pe=new ve,ge=new le(Z);"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=ce);var ye=function(){return m(function e(){u(this,e)},[{key:"getItem",value:function(e){try{return localStorage.getItem(e)}catch(e){return null}}},{key:"setItem",value:function(e,t){try{localStorage.setItem(e,t)}catch(e){}}},{key:"removeItem",value:function(e){try{localStorage.removeItem(e)}catch(e){}}},{key:"clear",value:function(){try{localStorage.clear()}catch(e){}}},{key:"getAllKeys",value:function(){try{return Object.keys(localStorage)}catch(e){return[]}}}])}();function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we,ke={exports:{}};var Se=(we||(we=1,ke.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=i(18),a=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},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});t.push(0);var i=t[0],n=t[1];if(10===i)switch(n){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}switch(i){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";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,i,n){void 0===n&&(n=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(i),o=Math.max(a,r),s=0,u=e.map([t,i],function(t){var i=o-e.getVersionPrecision(t),n=t+new Array(i+1).join(".0");return e.map(n.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(n&&(s=o-Math.min(a,r)),o-=1;o>=s;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===s)return 0;o-=1}else if(u[0][o]<u[1][o])return-1}},e.map=function(e,t){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)n.push(t(e[i]));return n},e.find=function(e,t){var i,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,n=e.length;i<n;i+=1){var a=e[i];if(t(a,i))return a}},e.assign=function(e){for(var t,i,n=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){n[t]=e[t]})};for(t=0,i=r.length;t<i;t+=1)s();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=a,e.exports=t.default},18:function(e,t,i){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={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(91))&&n.__esModule?n:{default:n},r=i(18);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){}var t,i,n;return e.getParser=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new a.default(e,t,i)},e.parse=function(e,t){return void 0===t&&(t=null),new a.default(e,t).getResult()},t=e,n=[{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}}],(i=null)&&o(t.prototype,i),n&&o(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=u(i(92)),a=u(i(93)),r=u(i(94)),o=u(i(95)),s=u(i(17));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var n=!1;"boolean"==typeof t?(n=t,this._hints=i):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==n&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),i=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return i?i.version:void 0}},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(n.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))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)),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(Array.isArray(t.test))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(Array.isArray(t.test))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(Array.isArray(t.test))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,i={},n=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&&(i[t]=o,n+=1)}),n>0){var o=Object.keys(i),u=s.default.find(o,function(e){return t.isOS(e)});if(u){var l=this.satisfies(i[u]);if(void 0!==l)return l}var d=s.default.find(o,function(e){return t.isPlatform(e)});if(d){var h=this.satisfies(i[d]);if(void 0!==h)return h}}if(r>0){var c=Object.keys(a),m=s.default.find(c,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 i=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),a=s.default.getBrowserTypeByAlias(n);return t&&a&&(n=a.toLowerCase()),n===i},t.compareVersion=function(e){var t=[0],i=e,n=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(n=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(n=!0,i=e.substr(1)),t.indexOf(s.default.compareVersions(a,i,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=l,e.exports=t.default},92:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},i=a.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},i=a.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},i=a.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},i=a.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},i=a.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},i=a.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},i=a.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},i=a.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},i=a.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},i=a.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},i=a.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},i=a.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},i=a.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},i=a.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},i=a.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},i=a.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},i=a.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},i=a.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},i=a.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},i=a.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=a.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=a.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=a.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=a.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=a.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},i=a.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=a.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},i=a.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),n=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),r=a.default.getFirstMatch(/se ([\d.]+)x/i,e),o=i||n||r;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=a.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var i={name:"DuckDuckGo"};if(t){var n=t.getBrandVersion("DuckDuckGo");if(n)return i.version=n,i}var r=a.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(i.version=r),i}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var i={name:"Brave"};if(t){var n=t.getBrandVersion("Brave");if(n)return i.version=n,i}return i}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=a.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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),i=a.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},i=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=a.default.getMacOSVersionName(t),n={name:r.OS_MAP.MacOS,version:t};return i&&(n.versionName=i),n}},{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:[/OpenHarmony/i],describe:function(e){var t=a.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=a.default.getAndroidVersionName(t),n={name:r.OS_MAP.Android,version:t};return i&&(n.versionName=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:r.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(18),o=[{test:[/googlebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=a.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{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),i=e.test(/like (ipod|iphone)/i);return t&&!i},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:[/Nokia/i],describe:function(e){var t=a.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),i={type:r.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(i.model=t),i}},{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:[/smart-?tv|smarttv/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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},i=a.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},i=a.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},i=a.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),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},i=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=o,e.exports=t.default}})),ke.exports),Ee=be(Se),Te={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},Pe={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4},Me=function(){return m(function e(){u(this,e)},[{key:"getDeviceData",value:function(t){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:e.NAMI_SDK_VERSION,language:"en"};var i=Ee.getParser(window.navigator.userAgent),n=i.getPlatform(),a={os_version:i.getOSVersion(),os_name:i.getOSName(),browser_name:i.getBrowserName(),browser_version:i.getBrowserVersion(),sdk_client:"web",sdk_version:e.NAMI_SDK_VERSION,language:window.navigator.language};if(n.type&&(a.form_factor=Te[n.type]),n.model&&(a.device_model=n.model),t&&t.length>0){var r=e.getExtendedClientInfo(t);a.extended_platform=r.platform,a.extended_platform_version=r.version}return a}},{key:"getDeviceFormFactor",value:function(){if("undefined"==typeof window)return"desktop";var e=Ee.getParser(window.navigator.userAgent).getPlatform();return e.type&&Te[e.type]||"desktop"}},{key:"getDeviceScaleFactor",value:function(e){var t;if(e||(e=this.getDeviceFormFactor()),"television"!==e)return 1;var i=window,n=i.innerWidth,a=i.innerHeight,r=n.toString()+"x"+a.toString();return null!==(t=Pe[r])&&void 0!==t?t:Math.min(n/1920,a/1080)||1}},{key:"getScreenInfo",value:function(){var e,t,i,n;return"undefined"==typeof window?{width:1920,height:1080,scale:1}:{width:null!==(e=null===(t=window.screen)||void 0===t?void 0:t.width)&&void 0!==e?e:window.innerWidth,height:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.height)&&void 0!==i?i:window.innerHeight,scale:window.devicePixelRatio||1}}},{key:"getLanguage",value:function(){return"undefined"==typeof window?"en":window.navigator.language||"en"}},{key:"onAppForeground",value:function(e){if("undefined"==typeof document)return()=>{};var t=()=>{"visible"===document.visibilityState&&e()};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)}},{key:"onAppBackground",value:function(e){if("undefined"==typeof document)return()=>{};var t=()=>{"hidden"===document.visibilityState&&e()};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)}},{key:"isAppVisible",value:function(){return"undefined"==typeof document||"hidden"!==document.visibilityState}},{key:"generateUUID",value:function(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}])}();function Ae(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o}"function"==typeof SuppressedError&&SuppressedError;var De,xe,Ce,Ie,Le,_e=t.css(De||(De=(e=>e)`
1
+ "use strict";var e=require("@namiml/sdk-core"),t=require("lit"),i=require("lit/directives/repeat.js");function n(e,t){this.v=e,this.k=t}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e){return new n(e,0)}function s(e,t,i){return t=g(t),w(e,b()?Reflect.construct(t,i||[],g(e).constructor):t.apply(e,i))}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(()=>{if("undefined"==typeof globalThis){var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")();Object.defineProperty(e,"globalThis",{value:e,writable:!0,enumerable:!1,configurable:!0})}})(),"undefined"!=typeof Element&&"function"!=typeof Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var e=this.attributes,t=new Array(e.length),i=0;i<e.length;i+=1)t[i]=e[i].name;return t});var d=0;function h(e){return"__private_"+d+++"_"+e}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A(n.key),n)}}function m(e,t,i){return t&&c(e.prototype,t),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return a(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},v.apply(null,arguments)}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:i):a.value}},p.apply(null,arguments)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function w(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(e)}function k(){var e,t,i="function"==typeof Symbol?Symbol:{},n=i.iterator||"@@iterator",a=i.toStringTag||"@@toStringTag";function r(i,n,a,r){var u=n&&n.prototype instanceof s?n:s,l=Object.create(u.prototype);return T(l,"_invoke",function(i,n,a){var r,s,u,l=0,d=a||[],h=!1,c={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,i){return r=t,s=0,u=e,c.n=i,o}};function m(i,n){for(s=i,u=n,t=0;!h&&l&&!a&&t<d.length;t++){var a,r=d[t],m=c.p,f=r[2];i>3?(a=f===n)&&(u=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=m&&((a=i<2&&m<r[1])?(s=0,c.v=n,c.n=r[1]):m<f&&(a=i<3||r[0]>n||n>f)&&(r[4]=i,r[5]=n,c.n=f,s=0))}if(a||i>1)return o;throw h=!0,n}return function(a,d,f){if(l>1)throw TypeError("Generator is already running");for(h&&1===d&&m(d,f),s=d,u=f;(t=s<2?e:u)||!h;){r||(s?s<3?(s>1&&(c.n=-1),m(s,u)):c.n=u:c.v=u);try{if(l=2,r){if(s||(a="next"),t=r[a]){if(!(t=t.call(r,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),s=1);r=e}else if((t=(h=c.n<0)?u:i.call(n,c))!==o)break}catch(t){r=e,s=1,u=t}finally{l=1}}return{value:t,done:h}}}(i,a,r),!0),l}var o={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(T(t={},n,function(){return this}),t),h=l.prototype=s.prototype=Object.create(d);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,T(e,a,"GeneratorFunction")),e.prototype=Object.create(h),e}return u.prototype=l,T(h,"constructor",l),T(l,"constructor",u),u.displayName="GeneratorFunction",T(l,a,"GeneratorFunction"),T(h),T(h,a,"Generator"),T(h,n,function(){return this}),T(h,"toString",function(){return"[object Generator]"}),(k=function(){return{w:r,m:c}})()}function S(e,t,i,n,a){var r=function(e,t,i,n,a){return new E(k().w(e,t,i,n),a||Promise)}(e,t,i,n,a);return r.next().then(function(e){return e.done?e.value:r.next()})}function E(e,t){function i(a,r,o,s){try{var u=e[a](r),l=u.value;return l instanceof n?t.resolve(l.v).then(function(e){i("next",e,o,s)},function(e){i("throw",e,o,s)}):t.resolve(l).then(function(e){u.value=e,o(u)},function(e){return i("throw",e,o,s)})}catch(e){s(e)}}var a;this.next||(T(E.prototype),T(E.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),T(this,"_invoke",function(e,n,r){function o(){return new t(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)}function T(e,t,i,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}T=function(e,t,i,n){function r(t,i){T(e,t,function(e){return this._invoke(t,i,e)})}t?a?a(e,t,{value:i,enumerable:!n,configurable:!n,writable:!n}):e[t]=i:(r("next",0),r("throw",1),r("return",2))},T(e,t,i,n)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function M(e,t,i,n){var a=p(g(e.prototype),t,i);return"function"==typeof a?function(e){return a.apply(i,e)}:a}function A(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function D(e){var t="function"==typeof Map?new Map:void 0;return D=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return function(e,t,i){if(b())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return i&&P(a,i.prototype),a}(e,arguments,g(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),P(i,e)},D(e)}var x,C,I,L,_,R,F,O,W,$,N,j,B=function(){return m(function e(t){u(this,e),this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t},[{key:"shadowRoot",get:function(){return this.__host.__shadowRoot}},{key:"checkValidity",value:function(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}},{key:"reportValidity",value:function(){return!0}},{key:"setFormValue",value:function(){}},{key:"setValidity",value:function(){}}])}(),z=function(e,t,i,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!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"===n?a.call(e,i):a?a.value=i:t.set(e,i),i},U=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},H={__proto__:null,enumerable:!0};Object.freeze(H);var G=($=function(){return m(function e(t,i={}){if(u(this,e),x.set(this,!1),C.set(this,!1),I.set(this,!1),L.set(this,!1),_.set(this,Date.now()),R.set(this,!1),F.set(this,void 0),O.set(this,void 0),W.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 i||!i)throw new Error('The "options" argument must be an object');var n=i.bubbles,a=i.cancelable,r=i.composed;z(this,x,!!a,"f"),z(this,C,!!n,"f"),z(this,I,!!r,"f"),z(this,F,`${t}`,"f"),z(this,O,null,"f"),z(this,W,!1,"f")},[{key:"initEvent",value:function(e,t,i){throw new Error("Method not implemented.")}},{key:"stopImmediatePropagation",value:function(){this.stopPropagation()}},{key:"preventDefault",value:function(){z(this,L,!0,"f")}},{key:"target",get:function(){return U(this,O,"f")}},{key:"currentTarget",get:function(){return U(this,O,"f")}},{key:"srcElement",get:function(){return U(this,O,"f")}},{key:"type",get:function(){return U(this,F,"f")}},{key:"cancelable",get:function(){return U(this,x,"f")}},{key:"defaultPrevented",get:function(){return U(this,x,"f")&&U(this,L,"f")}},{key:"timeStamp",get:function(){return U(this,_,"f")}},{key:"composedPath",value:function(){return U(this,W,"f")?[U(this,O,"f")]:[]}},{key:"returnValue",get:function(){return!U(this,x,"f")||!U(this,L,"f")}},{key:"bubbles",get:function(){return U(this,C,"f")}},{key:"composed",get:function(){return U(this,I,"f")}},{key:"eventPhase",get:function(){return U(this,W,"f")?$.AT_TARGET:$.NONE}},{key:"cancelBubble",get:function(){return U(this,R,"f")},set:function(e){e&&z(this,R,!0,"f")}},{key:"stopPropagation",value:function(){z(this,R,!0,"f")}},{key:"isTrusted",get:function(){return!1}}])}(),x=new WeakMap,C=new WeakMap,I=new WeakMap,L=new WeakMap,_=new WeakMap,R=new WeakMap,F=new WeakMap,O=new WeakMap,W=new WeakMap,$.NONE=0,$.CAPTURING_PHASE=1,$.AT_TARGET=2,$.BUBBLING_PHASE=3,$);Object.defineProperties(G.prototype,{initEvent:H,stopImmediatePropagation:H,preventDefault:H,target:H,currentTarget:H,srcElement:H,type:H,cancelable:H,defaultPrevented:H,timeStamp:H,composedPath:H,returnValue:H,bubbles:H,composed:H,eventPhase:H,cancelBubble:H,stopPropagation:H,isTrusted:H});var V=(j=function(){function e(t,i={}){var n,a;return u(this,e),a=s(this,e,[t,i]),N.set(a,void 0),z(a,N,null!==(n=null==i?void 0:i.detail)&&void 0!==n?n:null,"f"),a}return y(e,G),m(e,[{key:"initCustomEvent",value:function(e,t,i,n){throw new Error("Method not implemented.")}},{key:"detail",get:function(){return U(this,N,"f")}}])}(),N=new WeakMap,j);Object.defineProperties(V.prototype,{detail:H});var K,X,Y,q,J=G,Q=V;(K=function(){return m(function e(){u(this,e),this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""},[{key:"parentRule",get:function(){return null}},{key:"parentStyleSheet",get:function(){return this.__parentStyleSheet}},{key:"type",get:function(){return 0}}])}()).STYLE_RULE=1,K.CHARSET_RULE=2,K.IMPORT_RULE=3,K.MEDIA_RULE=4,K.FONT_FACE_RULE=5,K.PAGE_RULE=6,K.NAMESPACE_RULE=10,K.KEYFRAMES_RULE=7,K.KEYFRAME_RULE=8,K.SUPPORTS_RULE=12,K.COUNTER_STYLE_RULE=11,K.FONT_FEATURE_VALUES_RULE=14,K.MARGIN_RULE=9,null!==(X=globalThis.Event)&&void 0!==X||(globalThis.Event=J),null!==(Y=globalThis.CustomEvent)&&void 0!==Y||(globalThis.CustomEvent=Q);var Z=Symbol(),ee=e=>{var t;return"boolean"==typeof e?e:null!==(t=null==e?void 0:e.capture)&&void 0!==t&&t},te={__proto__:null,enumerable:!0};Object.freeze(te);var ie=function(){return m(function e(){u(this,e),this.__eventListeners=new Map,this.__captureEventListeners=new Map},[{key:"addEventListener",value:function(e,t,i){var n;if(null!=t){var a=ee(i)?this.__captureEventListeners:this.__eventListeners,r=a.get(e);if(void 0===r)r=new Map,a.set(e,r);else if(r.has(t))return;var o="object"==typeof i&&i?i:{};null===(n=o.signal)||void 0===n||n.addEventListener("abort",()=>this.removeEventListener(e,t,i)),r.set(t,null!=o?o:{})}}},{key:"removeEventListener",value:function(e,t,i){if(null!=t){var n=ee(i)?this.__captureEventListeners:this.__eventListeners,a=n.get(e);void 0!==a&&(a.delete(t),a.size||n.delete(e))}}},{key:"dispatchEvent",value:function(e){var t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));var i=!1,n=!1,a=J.NONE,r=null,o=null,s=null,u=e.stopPropagation,l=e.stopImmediatePropagation;Object.defineProperties(e,{target:v({get:()=>null!=r?r:o},te),srcElement:v({get:()=>e.target},te),currentTarget:v({get:()=>s},te),eventPhase:v({get:()=>a},te),composedPath:v({value:()=>t},te),stopPropagation:v({value:()=>{i=!0,u.call(e)}},te),stopImmediatePropagation:v({value:()=>{n=!0,l.call(e)}},te)});var d=(t,i,n)=>{"function"==typeof t?t(e):"function"==typeof(null==t?void 0:t.handleEvent)&&t.handleEvent(e),i.once&&n.delete(t)},h=()=>(s=null,a=J.NONE,!e.defaultPrevented),c=t.slice().reverse();r=this.__host&&e.composed?null:this;for(var m,p=e=>{for(o=this;o.__host&&e.includes(o.__host);)o=o.__host},g=f(c);!(m=g()).done;){var y=m.value;r||o&&o!==y.__host||p(c.slice(c.indexOf(y))),s=y,a=y===e.target?J.AT_TARGET:J.CAPTURING_PHASE;var b=y.__captureEventListeners.get(e.type);if(b)for(var w,k=f(b);!(w=k()).done;){var S=w.value;if(d(S[0],S[1],b),n)return h()}if(i)return h()}var E=e.bubbles?t:[this];o=null;for(var T,P=f(E);!(T=P()).done;){var M=T.value;r||o&&M!==o.__host||p(E.slice(0,E.indexOf(M)+1)),s=M,a=M===e.target?J.AT_TARGET:J.BUBBLING_PHASE;var A=M.__eventListeners.get(e.type);if(A)for(var D,x=f(A);!(D=x()).done;){var C=D.value;if(d(C[0],C[1],A),n)return h()}if(i)return h()}return h()}},{key:"__resolveFullEventPath",value:function(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,se,ge]}}])}(),ne=new WeakMap,ae=e=>{var t=ne.get(e);return void 0===t&&ne.set(e,t=new Map),t},re=function(){function e(){return u(this,e),s(this,e,arguments)}return y(e,ie),m(e,[{key:"getRootNode",value:function(e){var t;if(null!=e&&e.composed)return ue;var i=this.__host;return null!==(t=null==i?void 0:i.__shadowRoot)&&void 0!==t?t:ue}}])}(),oe=function(){function e(){return u(this,e),s(this,e,arguments)}return y(e,re),m(e,[{key:"adoptedStyleSheets",get:function(){return[]}},{key:"createTreeWalker",value:function(){return{}}},{key:"createTextNode",value:function(){return{}}},{key:"createElement",value:function(){return{}}}])}(),se=new oe,ue=se,le=function(){function e(t){var i;if(u(this,e),i=s(this,e),t!==Z)throw new TypeError("Illegal constructor");return Object.assign(i,globalThis,{CustomElementRegistry:ve,customElements:pe,document:ue,Document:oe,Element:de,EventTarget:ie,HTMLElement:he,Node:re,ShadowRoot:me,window:i,Window:le}),i}return y(e,re),m(e)}(),de=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).__shadowRootMode=null,t.__shadowRoot=null,t.__internals=null,t}return y(e,re),m(e,[{key:"attributes",get:function(){return Array.from(ae(this)).map(([e,t])=>({name:e,value:t}))}},{key:"shadowRoot",get:function(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}},{key:"localName",get:function(){return this.constructor.__localName}},{key:"tagName",get:function(){var e;return null===(e=this.localName)||void 0===e?void 0:e.toUpperCase()}},{key:"setAttribute",value:function(e,t){ae(this).set(e,String(t))}},{key:"removeAttribute",value:function(e){ae(this).delete(e)}},{key:"toggleAttribute",value:function(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}},{key:"hasAttribute",value:function(e){return ae(this).has(e)}},{key:"attachShadow",value:function(e){this.__shadowRootMode=e.mode;var t=new me(Z,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}},{key:"attachInternals",value:function(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");var e=new B(this);return this.__internals=e,e}},{key:"getAttribute",value:function(e){var t=ae(this).get(e);return null!=t?t:null}}])}(),he=function(){function e(){return u(this,e),s(this,e,arguments)}return y(e,de),m(e)}(),ce=he,me=function(){function e(t,i){var n;if(u(this,e),n=s(this,e),t!=t)throw new TypeError("Illegal constructor");return n.mode=i.mode,n}return y(e,re),m(e,[{key:"host",get:function(){return this.__host}}])}();function fe(){var e,t;return{promise:new Promise((i,n)=>{e=i,t=n}),resolve:e,reject:t}}null!==(q=globalThis.litServerRoot)&&void 0!==q||(globalThis.litServerRoot=Object.defineProperty(new ce,"localName",{get:()=>"lit-server-root"}));var ve=function(){return m(function e(){u(this,e),this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map},[{key:"define",value:function(e,t){var i,n;if(this.__definitions.has(e)){if("development"!==process.env.NODE_ENV)throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`)}if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:null!==(i=t.observedAttributes)&&void 0!==i?i:[]}),this.__reverseDefinitions.set(t,e),null===(n=this.__pendingWhenDefineds.get(e))||void 0===n||n.resolve(t),this.__pendingWhenDefineds.delete(e)}},{key:"get",value:function(e){var t=this.__definitions.get(e);return null==t?void 0:t.ctor}},{key:"getName",value:function(e){var t;return null!==(t=this.__reverseDefinitions.get(e))&&void 0!==t?t:null}},{key:"initialize",value:function(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}},{key:"upgrade",value:function(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}},{key:"whenDefined",value:function(e){var t,i;return S(function(n){for(;;)switch(n.n){case 0:if(!(t=this.__definitions.get(e))){n.n=1;break}return n.a(2,t.ctor);case 1:return(i=this.__pendingWhenDefineds.get(e))||(i=fe(),this.__pendingWhenDefineds.set(e,i)),n.a(2,i.promise)}},null,this,null,Promise)}}])}(),pe=new ve,ge=new le(Z);"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=ce);var ye=function(){return m(function e(){u(this,e)},[{key:"getItem",value:function(e){try{return localStorage.getItem(e)}catch(e){return null}}},{key:"setItem",value:function(e,t){try{localStorage.setItem(e,t)}catch(e){}}},{key:"removeItem",value:function(e){try{localStorage.removeItem(e)}catch(e){}}},{key:"clear",value:function(){try{localStorage.clear()}catch(e){}}},{key:"getAllKeys",value:function(){try{return Object.keys(localStorage)}catch(e){return[]}}}])}();function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we,ke={exports:{}};var Se=(we||(we=1,ke.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=i(18),a=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},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});t.push(0);var i=t[0],n=t[1];if(10===i)switch(n){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}switch(i){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";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,i,n){void 0===n&&(n=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(i),o=Math.max(a,r),s=0,u=e.map([t,i],function(t){var i=o-e.getVersionPrecision(t),n=t+new Array(i+1).join(".0");return e.map(n.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(n&&(s=o-Math.min(a,r)),o-=1;o>=s;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===s)return 0;o-=1}else if(u[0][o]<u[1][o])return-1}},e.map=function(e,t){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)n.push(t(e[i]));return n},e.find=function(e,t){var i,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,n=e.length;i<n;i+=1){var a=e[i];if(t(a,i))return a}},e.assign=function(e){for(var t,i,n=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){n[t]=e[t]})};for(t=0,i=r.length;t<i;t+=1)s();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=a,e.exports=t.default},18:function(e,t,i){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={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(91))&&n.__esModule?n:{default:n},r=i(18);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){}var t,i,n;return e.getParser=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new a.default(e,t,i)},e.parse=function(e,t){return void 0===t&&(t=null),new a.default(e,t).getResult()},t=e,n=[{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}}],(i=null)&&o(t.prototype,i),n&&o(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=u(i(92)),a=u(i(93)),r=u(i(94)),o=u(i(95)),s=u(i(17));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var n=!1;"boolean"==typeof t?(n=t,this._hints=i):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==n&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),i=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return i?i.version:void 0}},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(n.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))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)),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(Array.isArray(t.test))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(Array.isArray(t.test))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(Array.isArray(t.test))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,i={},n=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&&(i[t]=o,n+=1)}),n>0){var o=Object.keys(i),u=s.default.find(o,function(e){return t.isOS(e)});if(u){var l=this.satisfies(i[u]);if(void 0!==l)return l}var d=s.default.find(o,function(e){return t.isPlatform(e)});if(d){var h=this.satisfies(i[d]);if(void 0!==h)return h}}if(r>0){var c=Object.keys(a),m=s.default.find(c,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 i=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),a=s.default.getBrowserTypeByAlias(n);return t&&a&&(n=a.toLowerCase()),n===i},t.compareVersion=function(e){var t=[0],i=e,n=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(n=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(n=!0,i=e.substr(1)),t.indexOf(s.default.compareVersions(a,i,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=l,e.exports=t.default},92:function(e,t,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},i=a.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},i=a.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},i=a.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},i=a.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},i=a.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},i=a.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},i=a.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},i=a.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},i=a.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},i=a.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},i=a.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},i=a.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},i=a.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},i=a.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},i=a.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},i=a.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},i=a.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},i=a.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},i=a.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},i=a.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=a.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=a.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=a.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=a.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=a.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},i=a.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=a.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},i=a.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),n=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),r=a.default.getFirstMatch(/se ([\d.]+)x/i,e),o=i||n||r;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=a.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var i={name:"DuckDuckGo"};if(t){var n=t.getBrandVersion("DuckDuckGo");if(n)return i.version=n,i}var r=a.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(i.version=r),i}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var i={name:"Brave"};if(t){var n=t.getBrandVersion("Brave");if(n)return i.version=n,i}return i}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=a.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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),i=a.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},i=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=a.default.getMacOSVersionName(t),n={name:r.OS_MAP.MacOS,version:t};return i&&(n.versionName=i),n}},{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:[/OpenHarmony/i],describe:function(e){var t=a.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=a.default.getAndroidVersionName(t),n={name:r.OS_MAP.Android,version:t};return i&&(n.versionName=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:r.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(18),o=[{test:[/googlebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=a.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{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),i=e.test(/like (ipod|iphone)/i);return t&&!i},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:[/Nokia/i],describe:function(e){var t=a.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),i={type:r.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(i.model=t),i}},{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:[/smart-?tv|smarttv/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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},i=a.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},i=a.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},i=a.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),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},i=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=o,e.exports=t.default}})),ke.exports),Ee=be(Se),Te={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},Pe={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4},Me=function(){return m(function e(){u(this,e)},[{key:"getDeviceData",value:function(t){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:e.NAMI_SDK_VERSION,language:"en"};var i=Ee.getParser(window.navigator.userAgent),n=i.getPlatform(),a={os_version:i.getOSVersion(),os_name:i.getOSName(),browser_name:i.getBrowserName(),browser_version:i.getBrowserVersion(),sdk_client:"web",sdk_version:e.NAMI_SDK_VERSION,language:window.navigator.language};if(n.type&&(a.form_factor=Te[n.type]),n.model&&(a.device_model=n.model),t&&t.length>0){var r=e.getExtendedClientInfo(t);a.extended_platform=r.platform,a.extended_platform_version=r.version}return a}},{key:"getDeviceFormFactor",value:function(){if("undefined"==typeof window)return"desktop";var e=Ee.getParser(window.navigator.userAgent).getPlatform();return e.type&&Te[e.type]||"desktop"}},{key:"getDeviceScaleFactor",value:function(e){var t;if(e||(e=this.getDeviceFormFactor()),"television"!==e)return 1;var i=window,n=i.innerWidth,a=i.innerHeight,r=n.toString()+"x"+a.toString();return null!==(t=Pe[r])&&void 0!==t?t:Math.min(n/1920,a/1080)||1}},{key:"getScreenInfo",value:function(){var e,t,i,n;return"undefined"==typeof window?{width:1920,height:1080,scale:1}:{width:null!==(e=null===(t=window.screen)||void 0===t?void 0:t.width)&&void 0!==e?e:window.innerWidth,height:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.height)&&void 0!==i?i:window.innerHeight,scale:window.devicePixelRatio||1}}},{key:"getLanguage",value:function(){return"undefined"==typeof window?"en":window.navigator.language||"en"}},{key:"onAppForeground",value:function(e){if("undefined"==typeof document)return()=>{};var t=()=>{"visible"===document.visibilityState&&e()};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)}},{key:"onAppBackground",value:function(e){if("undefined"==typeof document)return()=>{};var t=()=>{"hidden"===document.visibilityState&&e()};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)}},{key:"isAppVisible",value:function(){return"undefined"==typeof document||"hidden"!==document.visibilityState}},{key:"isOnline",value:function(){if("undefined"!=typeof navigator)return navigator.onLine}},{key:"onOnline",value:function(e){return"undefined"==typeof window?()=>{}:(window.addEventListener("online",e),()=>window.removeEventListener("online",e))}},{key:"runExclusive",value:function(e,t){var i,n;return S(function(a){for(;;)switch(a.n){case 0:if(null!=(i="undefined"!=typeof navigator?navigator.locks:void 0)&&i.request){a.n=2;break}return a.n=1,o(t());case 1:return a.a(2,!0);case 2:return n=!1,a.n=3,o(i.request(e,{ifAvailable:!0},e=>S(function(i){for(;;)switch(i.n){case 0:if(e){i.n=1;break}return i.a(2);case 1:return n=!0,i.n=2,o(t());case 2:return i.a(2)}},null,null,null,Promise)));case 3:return a.a(2,n)}},null,null,null,Promise)}},{key:"generateUUID",value:function(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}])}();function Ae(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o}"function"==typeof SuppressedError&&SuppressedError;var De,xe,Ce,Ie,Le,_e=t.css(De||(De=(e=>e)`
2
2
  /* ——— keyframes ——— */
3
3
  @keyframes nami-slide-up {
4
4
  from { transform: translateY(100%); }
@@ -251,7 +251,7 @@
251
251
  .nami-modal-content nami-content-container {
252
252
  overflow: visible;
253
253
  }
254
- `)),Fe=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Oe=globalThis,We=Oe.ShadowRoot&&(void 0===Oe.ShadyCSS||Oe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$e=Symbol(),Ne=new WeakMap,je=function(){return m(function e(t,i,n){if(u(this,e),this._$cssResult$=!0,n!==$e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(We&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Ne.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ne.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Be=(e,t)=>{if(We)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=f(t);!(i=n()).done;){var a=i.value,r=document.createElement("style"),o=Oe.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}},ze=We?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=f(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return(e=>new je("string"==typeof e?e:e+"",void 0,$e))(i)})(e):e,Ue=Object.is,He=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,Ve=Object.getOwnPropertyNames,Ke=Object.getOwnPropertySymbols,Xe=Object.getPrototypeOf,Ye=globalThis,qe=Ye.trustedTypes,Je=qe?qe.emptyScript:"",Qe=Ye.reactiveElementPolyfillSupport,Ze=(e,t)=>e,et={toAttribute(e,t){switch(t){case Boolean:e=e?Je:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},tt=(e,t)=>!Ue(e,t),it={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:tt};null!==(Ce=Symbol.metadata)&&void 0!==Ce||(Symbol.metadata=Symbol("metadata")),null!==(Ie=Ye.litPropertyMetadata)&&void 0!==Ie||(Ye.litPropertyMetadata=new WeakMap);var nt=function(){function e(){var t;return u(this,e),(t=s(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return y(e,D(HTMLElement)),m(e,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}},{key:"addController",value:function(e){var t,i;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,i=f(this.constructor.elementProperties.keys());!(e=i()).done;){var n=e.value;this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return Be(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}},{key:"attributeChangedCallback",value:function(e,t,i){this._$AK(e,i)}},{key:"_$ET",value:function(e,t){var i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(void 0!==n&&!0===i.reflect){var a,r=(void 0!==(null===(a=i.converter)||void 0===a?void 0:a.toAttribute)?i.converter:et).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var i=this.constructor,n=i._$Eh.get(e);if(void 0!==n&&this._$Em!==n){var a,r,o,s=i.getPropertyOptions(n),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:et;this._$Em=n;var l=u.fromAttribute(t,s.type);this[n]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(n))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,i,n=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===n&&(a=this[e]),null!=i||(i=s.getPropertyOptions(e)),!((null!==(r=i.hasChanged)&&void 0!==r?r:tt)(a,t)||i.useDefault&&i.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:i,reflect:n,wrapped:a},r){var o,s,u;i&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return S(function(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,o(this._$ES);case 2:i.n=4;break;case 3:i.p=3,t=i.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){i.n=5;break}return i.n=5,o(e);case 5:return i.a(2,!this.isUpdatePending)}},null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,i=f(this._$Ep);!(t=i()).done;){var n=t.value,a=n[0],r=n[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=f(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],c=h.wrapped,m=this[d];!0!==c||this._$AL.has(d)||void 0===m||this.C(d,void 0,h,m)}}var v=!1,p=this._$AL;try{var g;(v=this.shouldUpdate(p))?(this.willUpdate(p),null!==(g=this._$EO)&&void 0!==g&&g.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(p)):this._$EM()}catch(p){throw v=!1,this._$EM(),p}v&&this._$AE(p)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=it){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var i=Symbol(),n=this.getPropertyDescriptor(e,i,t);void 0!==n&&He(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Ge(this.prototype,e))&&void 0!==n?n:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var n=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:it}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Ze("elementProperties"))){var e=Xe(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Ze("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ze("properties")))for(var e=this.properties,t=0,i=[...Ve(e),...Ke(e)];t<i.length;t++){var n=i[t];this.createProperty(n,e[n])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=f(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var h,c=f(this.elementProperties);!(h=c()).done;){var m=h.value,v=m[0],p=m[1],g=this._$Eu(v,p);void 0!==g&&this._$Eh.set(g,v)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var i,n=f(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(ze(a))}else void 0!==e&&t.push(ze(e));return t}},{key:"_$Eu",value:function(e,t){var i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}}])}();nt.elementStyles=[],nt.shadowRootOptions={mode:"open"},nt[Ze("elementProperties")]=new Map,nt[Ze("finalized")]=new Map,null!=Qe&&Qe({ReactiveElement:nt}),(null!==(Le=Ye.reactiveElementVersions)&&void 0!==Le?Le:Ye.reactiveElementVersions=[]).push("2.1.2");var at={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:tt},rt=(e=at,t,i)=>{var n=i.kind,a=i.metadata,r=globalThis.litPropertyMetadata.get(a);if(void 0===r&&globalThis.litPropertyMetadata.set(a,r=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),"accessor"===n){var o=i.name;return{set(i){var n=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,n,e,!0,i)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===n){var s=i.name;return function(i){var n=this[s];t.call(this,i),this.requestUpdate(s,n,e,!0,i)}}throw Error("Unsupported decorator location: "+n)};function ot(e){return(t,i)=>"object"==typeof i?rt(e,t,i):((e,t,i)=>{var n=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),n?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function st(e){return ot(v({},e,{state:!0,attribute:!1}))}var ut=function(){function t(e,i,n){var a;return u(this,t),(a=s(this,t,[e,i,n])).host=null,a.defineDynamicStateProps(),a}return y(t,e.PaywallState),m(t,[{key:"hostConnected",value:function(){}},{key:"hostDisconnected",value:function(){this.subscribers.clear()}},{key:"onStateChanged",value:function(){this.defineDynamicStateProps(),this.host&&this.host.requestUpdate()}},{key:"defineDynamicStateProps",value:function(){Object.defineProperty(this.state,"tvQuality",{get:this.getTVQuality.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportWidth",{get:this.getViewportWidth.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportHeight",{get:this.getViewportHeight.bind(this),enumerable:!1,configurable:!0})}},{key:"getTVQuality",value:function(){var e,t;if("television"!==this.getFormFactor())return"";var i=window.devicePixelRatio||1,n=window.innerWidth||(null===(e=window.screen)||void 0===e?void 0:e.availWidth),a=window.innerHeight||(null===(t=window.screen)||void 0===t?void 0:t.availHeight);if(!n||!a)return"720p";var r=Math.max(n,a)*i,o=Math.min(n,a)*i;return r>=3840||o>=2160?"4K":r>=1920||o>=1080?"1080p":"720p"}},{key:"getViewportWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}},{key:"getViewportHeight",value:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}],[{key:"create",value:function(e,i,n){var a=new t(e,i,n);return this.providers.push(a),a}},{key:"remove",value:function(t){e.PaywallState.remove(t)}},{key:"currentProvider",get:function(){return this.providers[0]}}])}();var lt=e=>{var t;return S(function(i){for(;;)if(0===i.n)return t=new Set(Array.from(document.fonts.values()).map(e=>e.family)),e.forEach(e=>{var i=dt(e);if(!t.has(i)){var n=new FontFace(i,`url(${e.file})`);document.fonts.add(n)}}),i.a(2,document.fonts.ready.then())},null,null,null,Promise)};function dt(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function ht(t,i,n){var a,r,o,s,u,l,d,h;if("undefined"==typeof window||!t||!i)return e.logger.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var c={minDistance:null!==(a=null==n?void 0:n.minDistance)&&void 0!==a?a:30,maxDuration:null!==(r=null==n?void 0:n.maxDuration)&&void 0!==r?r:600,lockAxis:null===(o=null==n?void 0:n.lockAxis)||void 0===o||o,preventScrollOnSwipe:null!==(s=null==n?void 0:n.preventScrollOnSwipe)&&void 0!==s&&s,pointerTypes:null!==(u=null==n?void 0:n.pointerTypes)&&void 0!==u?u:["touch"],passiveListeners:null===(l=null==n?void 0:n.passiveListeners)||void 0===l||l,axisHint:null!==(d=null==n?void 0:n.axisHint)&&void 0!==d?d:"y",edgeLeakThreshold:null!==(h=null==n?void 0:n.edgeLeakThreshold)&&void 0!==h?h:24},m=t.style.touchAction;c.preventScrollOnSwipe&&(t.style.touchAction="none");var f=null,v=0,p=0,g=0,y=0,b=0,w=null,k=null,S=!1,E=!1,T=!1,P=e=>{try{var t=window.getComputedStyle(e);if(!t)return!1;var i=t.overflowY;if("auto"!==i&&"scroll"!==i)return!1;var n=e;return n.scrollHeight>n.clientHeight}catch(e){return!1}},M=e=>c.pointerTypes.includes(e.pointerType),A=e=>{var i=e.composedPath?e.composedPath()[0]:e.target;if(M(e)&&null===f){f=e.pointerId,v=g=e.clientX,p=y=e.clientY,b=performance.now(),w=null,T=!1,S=!1,E=!1,(k="y"===c.axisHint?((e,t)=>{for(var i=e;i&&i!==t&&i instanceof HTMLElement;){var n,a;if(P(i))return i;i=i.parentElement||(null!==(n=null===(a=i.parentNode)||void 0===a?void 0:a.host)&&void 0!==n?n:null)}return null})(i,t):null)||(E=!0);try{var n;null==t||null===(n=t.setPointerCapture)||void 0===n||n.call(t,e.pointerId)}catch(t){try{var a;null==i||null===(a=i.setPointerCapture)||void 0===a||a.call(i,e.pointerId)}catch(e){}}}},D=e=>{if(e.pointerId===f&&M(e)){if(g=e.clientX,y=e.clientY,c.lockAxis&&!w){var t=Math.abs(g-v),n=Math.abs(y-p);(t>2||n>2)&&(w=n>=t?"y":"x")}if("y"===c.axisHint&&("y"===w||!c.lockAxis)){var a=y-p,r=a<0?"up":"down",o=Math.abs(a),s=performance.now()-b,u=o/Math.max(s,1),l=o>=c.minDistance||u>.5;if(k)if(l)E=!0;else if(((e,t)=>!!e&&("down"===t?e.scrollTop>0:e.scrollTop+e.clientHeight<e.scrollHeight-1))(k,r)){if(!(("down"===r&&k.scrollTop<=50||"up"===r&&k.scrollTop+k.clientHeight>=k.scrollHeight-50)&&u>.3))return void(S=!0);E=!0}else E=!0;var d=!k||o>=c.edgeLeakThreshold;if(!T&&!S&&E&&d&&o>=c.minDistance){T=!0;var h=performance.now(),m={direction:"up"===r?"up":"down",distanceX:g-v,distanceY:a,absX:Math.abs(g-v),absY:o,duration:h-b,velocity:o/Math.max(h-b,1),startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:h,originalEvent:e};i(m)}}}},x=e=>{if(e.pointerId===f)if(M(e))if(k)C();else if(T||S)C();else{var t,n=performance.now(),a=n-b,r=g-v,o=y-p,s=Math.abs(r),u=Math.abs(o),l="x"===(t=c.lockAxis&&w?w:"x"===c.axisHint?"x":"y"===c.axisHint?"y":s>=u?"x":"y")?s:u,d=a<=c.maxDuration,h=c.minDistance;if(k&&"y"===t&&E&&(h+=c.edgeLeakThreshold),d&&l>=h){var m;m="x"===t?r>0?"right":"left":o>0?"down":"up";var P=l/Math.max(a,1);i({direction:m,distanceX:r,distanceY:o,absX:s,absY:u,duration:a,velocity:P,startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:n,originalEvent:e})}C()}else C()},C=()=>{f=null,w=null,b=0,k=null,E=!1,S=!1,T=!1},I=!!c.passiveListeners&&{passive:!0},L=c.passiveListeners?{passive:!0,capture:!0}:{capture:!0};t.addEventListener("pointerdown",A,L),t.addEventListener("pointermove",D,I),t.addEventListener("pointerup",x,I),t.addEventListener("pointercancel",x,I),t.addEventListener("lostpointercapture",x,I);return{destroy:()=>{t.removeEventListener("pointerdown",A,L),t.removeEventListener("pointermove",D,I),t.removeEventListener("pointerup",x,I),t.removeEventListener("pointercancel",x,I),t.removeEventListener("lostpointercapture",x,I),c.preventScrollOnSwipe&&(t.style.touchAction=m),C()},updateOptions:e=>{Object.assign(c,e),"boolean"==typeof e.preventScrollOnSwipe&&(e.preventScrollOnSwipe?t.style.touchAction="none":t.style.touchAction=m)}}}var ct={},mt=ct.NAMI_CLOSE_PAYWALL,ft=void 0===mt?"namiClosePaywall":mt,vt=ct.NAMI_RESTORE_PURCHASES,pt=void 0===vt?"namiRestorePurchases":vt,gt=ct.NAMI_SIGN_IN,yt=void 0===gt?"namiSignIn":gt,bt=ct.NAMI_BUY_SKU,wt=void 0===bt?"namiBuySKU":bt,kt=ct.SET_STATE,St=void 0===kt?"setState":kt,Et=ct.NAMI_SELECT_SKU,Tt=void 0===Et?"namiSelectSKU":Et,Pt=ct.NAMI_PURCHASE_SELECTED_SKU,Mt=void 0===Pt?"namiPurchaseSelectedSKU":Pt,At=ct.NAMI_DEEP_LINK,Dt=void 0===At?"namiDeeplink":At,xt=ct.NAMI_NAVIGATE_TO_SCREEN,Ct=void 0===xt?"namiNavigateToScreen":xt,It=ct.NAMI_RELOAD_PRODUCTS,Lt=void 0===It?"namiReloadProducts":It,_t=ct.NAMI_PLAY_VIDEO,Rt=void 0===_t?"namiPlayVideo":_t,Ft=ct.NAMI_PAUSE_VIDEO,Ot=void 0===Ft?"namiPauseVideo":Ft,Wt=ct.NAMI_MUTE_VIDEO,$t=void 0===Wt?"namiMuteVideo":Wt,Nt=ct.NAMI_UNMUTE_VIDEO,jt=void 0===Nt?"namiUnmuteVideo":Nt,Bt=e=>"subscription"===e;function zt(e){if(Bt(null==e?void 0:e.product_type)){var t=Ht(e);if(t.length>0)return t[0].billingPeriod}return null}function Ut(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return Gt(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Ht(e){return e?Gt(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function Gt(e,t){return e.map(e=>Vt(e,t))}function Vt(e,t){var i,n,a,r,o,s,u,l;if(!e)return{};var d=null!==(i=null===(n=e.promo_period)||void 0===n?void 0:n.count)&&void 0!==i?i:null==t?void 0:t.count,h=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,c=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:Yt(m).format(c)}}function Kt(t,i=!1,n=!1,a=!1,r=!1){if(!t)return null;var o=t.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!o)return null;var s=o.slice(1).map(e=>parseInt(e)),u=s[0],l=s[1],d=s[2],h=s[3],c=(t,i,n,a,o)=>{var s=(e=>r?`${e}_abbrev`:e)(o),u=(e=>r?`${e}_abbrev_plural`:`${e}_plural`)(o),l=e.getTranslate(s),d=e.getTranslate(u);return r||l!==s||(l=e.getTranslate(`${o}_abbrev`)),r||d!==u||(d=e.getTranslate(`${o}_abbrev_plural`)),a?t.toString():n?1===t||i?l:d:1===t||i?`${t} ${l}`:`${t} ${d}`};switch(t.at(-1)){case"D":return c(h,i,n,a,"nami_day");case"W":return c(d,i,n,a,"nami_week");case"M":return c(l,i,n,a,"nami_month");case"Y":return c(u,i,n,a,"nami_year")}return null}function Xt(e){var t;if(!e||e.length<2)return!1;var i=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===i||"Y"===i}function Yt(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,v({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,v({},t,{style:"currency",currency:"USD"}))}}var qt=(e,t,i)=>e&&t&&i?i.format(e-t):null,Jt=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Qt=(e,t)=>{if(""!=t){var i=parseInt(t)-1;return i>=0&&i<(null==e?void 0:e.length)?e[i]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},Zt=e=>ti(e.priceAmountMicros)/ei(e.billingPeriod),ei=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},ti=e=>e/1e6;function ii(e){return parseFloat((Math.round(e)/100).toFixed(2))}var ni=(t,i,n=[])=>({price:()=>ri(t),name:()=>null==t?void 0:t.name,title:()=>null==t?void 0:t.name,description:()=>null==t?void 0:t.description,duration:()=>oi(t),durationSingular:()=>oi(t,!0),period:()=>oi(t,!1,!0),periodNumber:()=>oi(t,!1,!1,!0),freeTrialDuration:()=>si(t),freeTrialDurationSingular:()=>si(t,!0),freeTrialPeriod:()=>si(t,!1,!0),freeTrialPeriodNumber:()=>si(t,!1,!1,!0),pricePerMonth:()=>ui(t),pricePerMonthRounded:()=>ui(t,!0),periodInMonths:()=>li(t),durationInMonths:()=>di(t),durationInMonthsSingular:()=>di(t,!0),periodNumberInMonths:()=>hi(t),percentagePriceDifferenceFromSku:()=>ci(t,i,n),priceDifferenceFromSku:()=>mi(t,i,n),promoEligible:()=>null===fi(t)&&null!==vi(t,i),freeTrialEligible:()=>null!==fi(t),promo:()=>{var e;return null===(e=vi(t,i))||void 0===e?void 0:e.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var e;return null===(e=pi(t,i))||void 0===e?void 0:e.formattedPrice},promoPeriod:()=>gi(t,i,!1,!0),promoPeriodNumber:()=>gi(t,i,!1,!1,!0),promoDuration:()=>gi(t,i),promoDurationSingular:()=>gi(t,i,!0),introEligible:()=>!1,pricePerDay:()=>Si(t),pricePerWeek:()=>Ei(t),pricePerWeekRounded:()=>Ei(t,!0),introductoryPrice:()=>wi(t,i),introductoryPeriod:()=>bi(t,i,!1,!0),introductoryPeriodNumber:()=>bi(t,i,!1,!1,!0),introductoryDuration:()=>bi(t,i),introductoryDurationSingular:()=>bi(t,i,!0),introductoryPricePerMonth:()=>ki(t,i),introductoryPricePerMonthRounded:()=>ki(t,i,!0),durationAbbrev:()=>oi(t,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>si(t,!1,!1,!1,!0),introductoryDurationAbbrev:()=>bi(t,i,!1,!1,!1,!0),promoDurationAbbrev:()=>gi(t,i,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>gi(t,i,!0,!0,!1,!0),durationInMonthsAbbrev:()=>di(t,!1,!1,!1,!0),durationSingularAbbrev:()=>oi(t,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>si(t,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>bi(t,i,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>gi(t,i,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>gi(t,i,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>di(t,!0,!1,!1,!0),periodAbbrev:()=>oi(t,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>si(t,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>bi(t,i,!1,!0,!1,!0),promoPeriodAbbrev:()=>gi(t,i,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>gi(t,i,!1,!0,!0,!0),periodInMonthsAbbrev:()=>di(t,!1,!0,!1,!0),periodly:()=>function(t){if(!t)return null;var i=t.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!i)return null;var n=i[1],a=i[2],r=i[3],o=i[4],s=void 0!==n?parseInt(n,10):0,u=void 0!==a?parseInt(a,10):0,l=void 0!==r?parseInt(r,10):0;return(void 0!==o?parseInt(o,10):0)>0?null:l>0?1===l?e.getTranslate("nami_weekly"):2===l?e.getTranslate("nami_biweekly"):null:u>0?1===u?e.getTranslate("nami_monthly"):2===u?e.getTranslate("nami_bimonthly"):3===u?e.getTranslate("nami_quarterly"):6===u?e.getTranslate("nami_biannually"):12===u?e.getTranslate("nami_yearly"):e.getTranslate("nami_monthly"):s>0?e.getTranslate("nami_yearly"):null}(zt(t)),iso_subscription_duration:()=>Ti(t),invalid:()=>!1,unavailable:()=>!1}),ai=(e,t,i,n=[])=>{if(!t)return null;var a=ni(t,i,n);return a[e]?a[e]():null},ri=e=>{var t=Ht(e);return t&&t.length?t[0].formattedPrice:null},oi=(e,t,i,n,a)=>Kt(zt(e),t,i,n,a),si=(e,t,i,n,a)=>Kt(Ut(e),t,i,n,a),ui=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n=Zt(i[0]);return n?Yt(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},li=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Xt(n)?Kt("P1Y"===n?"P12M":n,!1,!1,!1,t):null},di=(e,t,i,n,a)=>{var r=Ht(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Xt(o)?Kt("P1Y"===o?"P12M":o,t,i,n,a):null},hi=e=>{if(!e)return 0;var t=Ht(e);return t&&t.length?ei(t[0].billingPeriod):0},ci=(e,t,i=[])=>{var n,a=Ht(e);if(!a||0===a.length)return null;var r=null===(n=Qt(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Jt(ii(a[0].priceAmountMicros),hi(e));var o=Ht(r);return Jt(ii(a[0].priceAmountMicros),hi(e),(null==o?void 0:o.length)>0?ii(o[0].priceAmountMicros):0,hi(r))},mi=(e,t,i=[])=>{var n,a=Ht(e);if(!a||0===a.length)return null;var r=null===(n=Qt(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return qt(Zt(a[0]));var o=Ht(r);return qt(Zt(a[0]),Zt(o[0]),Yt(o[0].priceCurrencyCode))},fi=e=>Ut(e),vi=(e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null},pi=(e,t)=>{if(!e)return null;var i=vi(e,t);return i?Vt(i,e.subscription_period):null},gi=(e,t,i,n,a,r)=>{var o=pi(e,t);return Kt((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},yi=(e,t)=>{if(!e)return null;var i=((e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"intro"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null})(e,t);return i?Vt(i,e.subscription_period):null},bi=(e,t,i,n,a,r)=>{var o=yi(e,t);return Kt((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},wi=(e,t)=>{var i=yi(e,t);return i?i.formattedPrice:null},ki=(e,t,i)=>{var n=yi(e,t);if(!n)return null;var a=Zt(n);return a?Yt(n.priceCurrencyCode).format(i?Math.round(a):a):null},Si=e=>{var t=Ht(e);if(!t||0===t.length)return null;var i,n,a=ti(t[0].priceAmountMicros)/(i=t[0].billingPeriod,(n=ei(i))?30.437*n:1);return Yt(t[0].priceCurrencyCode).format(a)},Ei=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n,a,r=ti(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=ei(n))?52*a/12:1);return Yt(i[0].priceCurrencyCode).format(t?Math.round(r):r)},Ti=e=>{var t=Ht(e)[0];return t?t.billingPeriod:null},Pi="object"==typeof global&&global&&global.Object===Object&&global,Mi="object"==typeof self&&self&&self.Object===Object&&self,Ai=Pi||Mi||Function("return this")(),Di=Ai.Symbol;var xi=Array.isArray,Ci=Object.prototype,Ii=Ci.hasOwnProperty,Li=Ci.toString,_i=Di?Di.toStringTag:void 0;var Ri=Object.prototype.toString;var Fi=Di?Di.toStringTag:void 0;function Oi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Fi&&Fi in Object(e)?function(e){var t=Ii.call(e,_i),i=e[_i];try{e[_i]=void 0;var n=!0}catch(e){}var a=Li.call(e);return n&&(t?e[_i]=i:delete e[_i]),a}(e):function(e){return Ri.call(e)}(e)}function Wi(e){return null!=e&&"object"==typeof e}var $i=Di?Di.prototype:void 0,Ni=$i?$i.toString:void 0;function ji(e){if("string"==typeof e)return e;if(xi(e))return function(e,t){for(var i=-1,n=null==e?0:e.length,a=Array(n);++i<n;)a[i]=t(e[i],i,e);return a}(e,ji)+"";if(function(e){return"symbol"==typeof e||Wi(e)&&"[object Symbol]"==Oi(e)}(e))return Ni?Ni.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bi(e){return null==e?"":ji(e)}function zi(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:function(e,t,i){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(i=i>a?a:i)<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(a);++n<a;)r[n]=e[n+t];return r}(e,t,i)}var Ui=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Hi(e){return Ui.test(e)}var Gi="\\ud800-\\udfff",Vi="["+Gi+"]",Ki="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xi="\\ud83c[\\udffb-\\udfff]",Yi="[^"+Gi+"]",qi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ji="[\\ud800-\\udbff][\\udc00-\\udfff]",Qi="(?:"+Ki+"|"+Xi+")"+"?",Zi="[\\ufe0e\\ufe0f]?",en=Zi+Qi+("(?:\\u200d(?:"+[Yi,qi,Ji].join("|")+")"+Zi+Qi+")*"),tn="(?:"+[Yi+Ki+"?",Ki,qi,Ji,Vi].join("|")+")",nn=RegExp(Xi+"(?="+Xi+")|"+tn+en,"g");function an(e){return Hi(e)?function(e){return e.match(nn)||[]}(e):function(e){return e.split("")}(e)}var rn,on=(rn="toUpperCase",function(e){var t=Hi(e=Bi(e))?an(e):void 0,i=t?t[0]:e.charAt(0),n=t?zi(t,1).join(""):e.slice(1);return i[rn]()+n});var sn,un=(sn={À:"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==sn?void 0:sn[e]}),ln=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var hn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var cn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var mn="\\ud800-\\udfff",fn="\\u2700-\\u27bf",vn="a-z\\xdf-\\xf6\\xf8-\\xff",pn="A-Z\\xc0-\\xd6\\xd8-\\xde",gn="\\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",yn="["+gn+"]",bn="\\d+",wn="["+fn+"]",kn="["+vn+"]",Sn="[^"+mn+gn+bn+fn+vn+pn+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",Tn="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+pn+"]",Mn="(?:"+kn+"|"+Sn+")",An="(?:"+Pn+"|"+Sn+")",Dn="(?:['’](?:d|ll|m|re|s|t|ve))?",xn="(?:['’](?:D|LL|M|RE|S|T|VE))?",Cn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",In="[\\ufe0e\\ufe0f]?",Ln=In+Cn+("(?:\\u200d(?:"+["[^"+mn+"]",En,Tn].join("|")+")"+In+Cn+")*"),_n="(?:"+[wn,En,Tn].join("|")+")"+Ln,Rn=RegExp([Pn+"?"+kn+"+"+Dn+"(?="+[yn,Pn,"$"].join("|")+")",An+"+"+xn+"(?="+[yn,Pn+Mn,"$"].join("|")+")",Pn+"?"+Mn+"+"+Dn,Pn+"+"+xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bn,_n].join("|"),"g");function Fn(e,t,i){return e=Bi(e),void 0===t?function(e){return cn.test(e)}(e)?function(e){return e.match(Rn)||[]}(e):function(e){return e.match(hn)||[]}(e):e.match(t)||[]}var On=RegExp("['’]","g");var Wn,$n=(Wn=function(e,t,i){return t=t.toLowerCase(),e+(i?on(Bi(t).toLowerCase()):t)},function(e){return function(e,t,i){for(var n=-1,a=null==e?0:e.length;++n<a;)i=t(i,e[n],n,e);return i}(Fn(function(e){return(e=Bi(e))&&e.replace(ln,un).replace(dn,"")}(e).replace(On,"")),Wn,"")});function Nn(e,t,i){var n,a,r=null!==(n=null===(a=t.find(e=>e.id===i))||void 0===a?void 0:a.products)&&void 0!==n?n:[];return r.forEach(t=>{t.product_details=Un(e,t.sku_ref_id||""),t.variables=function(e,t,i){if(!t)return{};var n=function(e){if(!Array.isArray(e))return e;var t=e.filter(e=>e&&"object"==typeof e&&"entitlement_ref_id"in e).map(e=>e.entitlement_ref_id);return t.length?t:e}(t.entitlements),a=t.variables;if(!a)return v({},t,{entitlements:n});Object.keys(a).forEach(t=>{if(jn(a[t])){var n=zn(a[t],e,i);a[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(n)}});var r={};return(()=>Object.keys(ni({})))().forEach(t=>{if(void 0===a[t]){var n=ai(t,e,void 0,i);null!==n&&(r[t]=n)}}),v({},t,r,a,{entitlements:n})}(t.product_details,t,r)}),r}function jn(t){return"string"==typeof t&&t.includes(e.SMART_TEXT_PATTERN)}function Bn(e,t,i){return t?(Object.keys(t).forEach(n=>{jn(t[n])&&(t[n]=t[$n(n)]=zn(t[n],e,i))}),v({},t)):{}}var zn=(t,i,n)=>t.replace(e.SKU_TEXT_REGEX,(a,r)=>{var o,s,u,l,d=(null===(o=e.SKU_TEXT_REGEX.exec(t))||void 0===o?void 0:o.slice(1))||[];r=null!==(s=d[0])&&void 0!==s?s:r;var h=null!==(u=null===(l=d[1])||void 0===l?void 0:l.replace(":",""))&&void 0!==u?u:"";return ai(r,i,h,n)});function Un(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Hn,Gn=["conditionAttributes"];function Vn(e,t){return Array.isArray(e)?e.reduce((e,i)=>{var n=Vn(i,t);return Array.isArray(n)?[...e,...n]:[...e,n]},[]):null==e?e:"object"==typeof e?Object.entries(e).reduce((e,[i,n])=>{var a="newRow"===i?n:Vn(n,t);return v({},e,{[i]:a})},{}):"string"==typeof e?na(e,t):e}function Kn(e){for(var t,i=f(e);!(t=i()).done;){var n=t.value;if("button"===n.component)return n.focused=!0,!0;if(Array.isArray(n.components)&&Kn(n.components))return!0}return!1}function Xn(t,i,n,a={}){var r=n.productBaseComponents||n.components||[],o=n.productFeaturedComponents||r,s="television"===t.state.formFactor;return i.map(i=>{var n,u,l,d=i.featured?o:r,h=i.entitlements.map(e=>e.entitlement_ref_id),c=Un(t.productDetails,i.sku_ref_id),m={freeTrialEligible:1==ai("freeTrialEligible",c),introEligible:1==ai("introEligible",c),promoEligible:1==ai("promoEligible",c),invalid:ai("invalid",c),unavailable:ai("unavailable",c)},p=v({},i,i.variables,m,{id:i.id,entitlements:h});u=i,l=t=>{for(var i,n=f(t);!(i=n()).done;){var a=i.value;a.sku=e.toNamiSKU(u),a.components&&l(a.components),a.collapseHeader&&a.collapseHeader.components&&l(a.collapseHeader.components)}},l(d);var g={sku:p,media:ia(a,{convertToUrl:!0})},y=Vn(d,Vn(g,g));return function(e,t){var i=e=>{for(var n,a=f(e);!(n=a()).done;){var r,o=n.value;o&&"object"==typeof o&&(Object.defineProperty(o,"__skuContext",{value:t,enumerable:!1,writable:!0,configurable:!0}),Array.isArray(o.components)&&i(o.components),Array.isArray(o.conditionAttributes)&&i(o.conditionAttributes),null!==(r=o.collapseHeader)&&void 0!==r&&r.components&&i(o.collapseHeader.components))}};i(e)}(y,p),s&&i.featured&&Kn(y),[null!==(n=i.featured)&&void 0!==n&&n,y]},[])}function Yn(t,i){var n;if(!i.loopSource)return[];var a=e.resolveLoopSource(i.loopSource),r=(null!=a?a:[]).filter(e=>{var n;return!(null!==(n=i.loopSourceConditions)&&void 0!==n&&n.length)||i.loopSourceConditions.every(i=>ta(t,i,e))}),o=i.groupBy,s=i.groupHeaderTemplate,u=e=>Vn(i.components,Vn({block:e},{block:e})),l=(null!==(n=i.slots)&&void 0!==n?n:[]).filter(e=>{var i;return!(null!==(i=e.conditions)&&void 0!==i&&i.length)||e.conditions.every(e=>ta(t,e,null))}),d=e=>[null!=e.columnSpan?v({},e.template,{__namiSlotColumnSpan:e.columnSpan}):e.template],h=l.filter(e=>"listStart"===e.position).map(d),c=l.filter(e=>"listEnd"===e.position).map(d);if(!o||!s){"number"==typeof i.max&&(r=r.slice(0,i.max));var m=r.map(u).filter(e=>null!=e);return[{key:"",header:null,items:[...h,...m,...c]}]}for(var p,g=[],y=new Map,b=f(r);!(p=b()).done;){var w=p.value,k=Vn(o,Vn({block:w},{block:w})),S=null==k?"":String(k);y.has(S)||(g.push(S),y.set(S,[])),y.get(S).push(w)}for(var E,T=e=>{var i,n=g.filter(i=>((e,i)=>{var n,a,r=null!==(n=null===(a=e.group)||void 0===a?void 0:a.itemConditions)&&void 0!==n?n:[];return r.length?i.some(e=>r.every(i=>ta(t,i,e))):i.length>0})(e,y.get(i)));return"last"===(null===(i=e.group)||void 0===i?void 0:i.ordinal)?n[n.length-1]:n[0]},P=new Map,M=new Map,A=f(l);!(E=A()).done;){var D=E.value,x="groupStart"===D.position?P:"groupEnd"===D.position?M:null;if(x){var C=T(D);null!=C&&(x.has(C)||x.set(C,[]),x.get(C).push(d(D)))}}var I=g.map(e=>{var t,n,a={key:e},r=Vn(s,Vn({group:a},{group:a})),o=y.get(e);return"number"==typeof i.groupMax&&(o=o.slice(0,i.groupMax)),{key:e,header:[r],items:[...null!==(t=P.get(e))&&void 0!==t?t:[],...o.map(u),...null!==(n=M.get(e))&&void 0!==n?n:[]]}});return[...h.length?[{key:"",header:null,items:h}]:[],...I,...c.length?[{key:"",header:null,items:c}]:[]]}function qn(e,t,i){var n=(t,n)=>ta(e,t,n,i);return t.assertions?t.assertions.every(n):!!t.orAssertions&&(!t.orAssertions.length||t.orAssertions.some(n))}function Jn(e,t,i){var n=t.conditionAttributes,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(t,Gn);if(!n)return a;var r=null!=i?i:a.__skuContext;return n.reduce((t,i)=>{if(!qn(e,i,r))return t;var n={};return Object.entries(i.attributes).forEach(([t,i])=>{n[t]=Zn(e,i,r)}),v({},t,n)},a)}function Qn(){if(!Hn){var t=e.getDeviceData(),i=t.browser_name,n=t.browser_version;Hn={browser:i,browserVersion:n}}return Hn}function Zn(t,i,n,a=null){var r,o=null!==(r=null==t?void 0:t.flow)&&void 0!==r?r:{},s=o.manager,u=o.previousStepAvailable,l=o.nextStepAvailable,d=t.state,h=e.getUrlParams(),c={isLaunched:!(null==s||!s.flowOpen),previousStepAvailable:!!u,nextStepAvailable:!!l},m={};if(a&&(m={block:a}),m=v({},m,{state:d,urlParams:h,flow:c,launch:d.launch,sku:n||d.sku,customer:d.customer,device:Qn(),platform:{id:d.platformId}}),"string"==typeof i){var f=function(t,i){if(!t.includes(ea))return;var n=t.trim();if(!n.startsWith(ea)||!n.endsWith(")"))return;var a=n.slice(ea.length,-1).split(",");if(2!==a.length)return;var r=a.map(t=>{var n=t.trim(),a=Number(n.includes(e.SMART_TEXT_PATTERN)?i(n):n);return Number.isFinite(a)?a:0}),o=r[0],s=r[1];return Math.max(o,s)}(i,e=>na(e,m));if(void 0!==f)return f}return"string"==typeof i&&i.includes(e.SMART_TEXT_PATTERN)&&(i=na(i,m)),i}var ea="max(";function ta(t,{value:i,expected:n,operator:a},r,o){var s=e.evaluateSystemTimeCondition({value:i,operator:a,expected:n},t.state);if(null!==s)return s;if(i=Zn(t,i,o,r),n=Zn(t,n,o,r),"equals"===a)return i===n;if("notEquals"===a)return i!==n;if("contains"===a){var u;if(Array.isArray(i)||"string"==typeof i||i instanceof String||(i=i.toString()),"collapse"==n)n+="_"+(null===(u=t.getCurrentCollapsibleSku())||void 0===u?void 0:u.skuId);return i.includes(n)}if("notContains"===a)return Array.isArray(i)||"string"==typeof i||i instanceof String||(i=i.toString()),!i.includes(n);if("set"===a){var l=null!=i&&""!==i&&!i.toString().match(e.LIQUID_VARIABLE_REGEX);return"boolean"==typeof n?l===n:l}return"notSet"===a?null==i||""===i||!!i.toString().match(e.LIQUID_VARIABLE_REGEX):"gt"===a?i>n:"gte"===a?i>=n:"lt"===a?i<n:"lte"===a&&i<=n}function ia(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce((e,[i,{content:n}])=>(t&&"string"!=typeof n&&n&&(n=URL.createObjectURL(n)),v({},e,{[i]:n})),{})}function na(t,i){var n=t;if("string"!=typeof t)return n;for(var a,r=new RegExp(e.VAR_REGEX.source,e.VAR_REGEX.flags),o=[];null!==(a=r.exec(t))&&(o.push(a),r.global);)a.index===r.lastIndex&&r.lastIndex++;for(var s=0,u=o;s<u.length;s++){var l=u[s],d=l[0],h=l[1],c=na(h,i);if(d===t)return m(d,c);c!==h&&(n=n.replace(h,c)),n=n.replace(e.VAR_REGEX,m)}return n;function m(e,t){var n=String(t).split("."),a=n[0];if(!a)return e;var r=aa(i,a);if(void 0===r)return e;if("object"==typeof r&&null!==r&&0===Object.keys(r).length)return"";var o=aa(i,...n);return void 0===o?"":"string"!=typeof o?o:na(o,i)}}function aa(e,...t){for(var i=e,n=0,a=t;n<a.length;n++){var r=a[n];if(null==i)return;i=Array.isArray(i)?i[+r]:i[r]}return i}var ra=e=>{var t=e.state.timeSpentOnPaywall;if(t)return Date.now()-t},oa=e=>{if(!e)return null;if(e.includes("#"))return e;var t=e.match(/[\d.]+/g);if(!t||t.length<3)return null;var i=t.map(Number),n=i[0],a=i[1],r=i[2],o=i[3],s=e=>Math.round(e).toString(16).padStart(2,"0"),u=void 0!==o&&o<1?s(255*o):"";return`#${s(n)}${s(a)}${s(r)}${u}`},sa=(e,t)=>{if(!e||!t)return!0;var i=null!=e&&e.includes("rgb")?oa(e):e,n=null!=t&&t.includes("rgb")?oa(t):t;return(null==i?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())};function ua(e){var t,i,n,a,r,o,s,u,l,d,h,c,m;return{width:null!==(t=e.width)&&void 0!==t?t:20,railSpacing:null!==(i=e.railSpacing)&&void 0!==i?i:12,dotLineSpacing:null!==(n=e.dotLineSpacing)&&void 0!==n?n:10,lineTopOffset:null!==(a=e.lineTopOffset)&&void 0!==a?a:0,lineBottomOffset:null!==(r=e.lineBottomOffset)&&void 0!==r?r:0,lineWidth:null!==(o=e.lineWidth)&&void 0!==o?o:1,lineColor:null!==(s=e.lineColor)&&void 0!==s?s:"#C6CBD7",lineCornerRadius:null!==(u=e.lineCornerRadius)&&void 0!==u?u:0,dotSize:null!==(l=e.dotSize)&&void 0!==l?l:6,dotColor:null!==(d=e.dotColor)&&void 0!==d?d:"#C6CBD7",dotCornerRadius:null!==(h=e.dotCornerRadius)&&void 0!==h?h:3,dotBorderWidth:null!==(c=e.dotBorderWidth)&&void 0!==c?c:0,dotBorderColor:null!==(m=e.dotBorderColor)&&void 0!==m?m:"transparent",conditionAttributes:e.conditionAttributes}}function la(e,t,i){for(var n,a=ua(t),r={key:i},o=Vn(t,Vn({group:r},{group:r})),s={dotSize:a.dotSize,dotColor:a.dotColor,dotCornerRadius:a.dotCornerRadius,dotBorderWidth:a.dotBorderWidth,dotBorderColor:a.dotBorderColor},u=f(null!==(l=o.conditionAttributes)&&void 0!==l?l:[]);!(n=u()).done;){var l,d,h=n.value;if(qn(e,h)){var c=null!==(d=h.attributes)&&void 0!==d?d:{};s={dotSize:"number"==typeof c.dotSize?c.dotSize:s.dotSize,dotColor:"string"==typeof c.dotColor?c.dotColor:s.dotColor,dotCornerRadius:"number"==typeof c.dotCornerRadius?c.dotCornerRadius:s.dotCornerRadius,dotBorderWidth:"number"==typeof c.dotBorderWidth?c.dotBorderWidth:s.dotBorderWidth,dotBorderColor:"string"==typeof c.dotBorderColor?c.dotBorderColor:s.dotBorderColor}}}return s.dotCornerRadius=Math.min(s.dotCornerRadius,s.dotSize/2),s}var da=!0,ha=!1,ca=!1,ma=!1,fa=!1,va=!1,pa=null,ga=null,ya=null,ba=null,wa=!1,ka="",Sa=!1,Ea=null,Ta=null,Pa=null,Ma=null,Aa=null,Da=null,xa=null,Ca=null,Ia=!1,La=null,_a="",Ra=0,Fa=1,Oa=null,Wa=[],$a=new WeakMap,Na=new WeakMap,ja=1;function Ba(e){var t=Na.get(e);return t||(t=ja++,Na.set(e,t)),String(t)}var za=null,Ua=null,Ha=null,Ga=null;function Va(e){return!0===e||"true"===e||"1"===e||"yes"===e}function Ka(e,t){if(function(){if("undefined"==typeof window)return!1;try{var e,t;return!!Va(window.NAMI_TTS_DEBUG)||Va(null===(e=window.localStorage)||void 0===e?void 0:e.getItem("nami:tts:debug"))||Va(null===(t=window.localStorage)||void 0===t?void 0:t.getItem("NAMI_TTS_DEBUG"))}catch(e){return!1}}())try{t?console.debug(`[Nami TTS] ${e}`,t):console.debug(`[Nami TTS] ${e}`)}catch(e){}}function Xa(e="TTS is unavailable in this runtime."){ha||(ha=!0,Ka(e))}function Ya(e){if(!e)return"none";var t=e.id?`#${e.id}`:"",i=e.getAttribute("data-testid"),n=i?`[data-testid="${i}"]`:"";return`${e.tagName.toLowerCase()}${t}${n}`}function qa(e){return function(e){return null==e?"":String(e).replace(/[^.!?\n]*\$\{[^}]*subscribeUrl[^}]*\}[^.!?\n]*[.!?]?/gi,"To subscribe, follow the on-screen instructions.").replace(/\$\{[^}]+\}/g," ").replace(/\s+([.,!?;:])/g,"$1").replace(/\s+/g," ").trim()}(e)}function Ja(e){return e.toLowerCase().replace(/[^a-z0-9$]+/g," ").replace(/\s+/g," ").trim()}function Qa(e){return qa(String(null!=e?e:"").replace(/<[^>]*>/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*_`#>~]/g," "))}function Za(e,t){var i=qa(t);i&&e[e.length-1]!==i&&e.push(i)}function er(e,t=[]){var i=[];return[...e,...t].forEach(e=>{var t=function(e){var t=qa(e);if(!t)return[];for(var i=[],n=0,a=0;a<t.length;a+=1){var r=t.charAt(a),o=t.charAt(a+1);if(("."===r||"!"===r||"?"===r)&&(!o||/\s/.test(o))){var s=qa(t.slice(n,a+1));for(s&&i.push(s);a+1<t.length&&/\s/.test(t.charAt(a+1));)a+=1;n=a+1}}var u=qa(t.slice(n));u&&i.push(u);return i.length?i:[t]}(e);t.length||Za(i,e),t.forEach(e=>Za(i,e))}),i.slice(0,60)}function tr(e){return qa(e.join(". ").replace(/\.\s*([.!?])/g,"$1"))}function ir(e){var t,i=Oa;i&&(e&&i.id===e||(i.status="cancelled",(null===(t=Oa)||void 0===t?void 0:t.id)===i.id&&(Oa=null)))}function nr(){if("undefined"==typeof document)return null;for(var e=document.activeElement;e&&null!==(t=e.shadowRoot)&&void 0!==t&&t.activeElement;){var t,i,n;e=null!==(i=null===(n=e.shadowRoot)||void 0===n?void 0:n.activeElement)&&void 0!==i?i:e}return e}function ar(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function rr(e){for(var t=[],i=null!=e?e:null;i;){i instanceof Element&&-1===t.indexOf(i)&&t.push(i);var n=i.parentNode;i=ar(n)?n.host:n}return t}function or(e,t){return!!t&&-1!==rr(t).indexOf(e)}function sr(e,t){if(!t)return!1;if(t===e)return!0;if(e.contains(t))return!0;var i=e.shadowRoot;return!!i&&(i.activeElement===t||i.contains(t))}function ur(e,t){t&&-1===e.indexOf(t)&&e.push(t)}function lr(e,t){var i=t.shadowRoot;i&&i.querySelectorAll('button,[role="button"],a,input,select,textarea,[tabindex]:not([tabindex="-1"])').forEach(t=>ur(e,t))}function dr(e,t){var i,n=("function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():null!==(i=null==t?void 0:t.composedPath)&&void 0!==i?i:[]).filter(e=>e instanceof Element);return n.length?n:rr(e)}function hr(e,t=[],i={}){var n=[];if(i.focusedElementOnly)return ur(n,e),n;var a=(t.length?t:rr(e)).filter(e=>e.isConnected),r=function(e,t){var i,n=t.find(e=>e.matches("nami-product-container"));if(n)return n;var a=rr(e).find(e=>e.matches("nami-product-container"));if(a)return a;var r=ba&&"querySelectorAll"in ba?ba:"undefined"!=typeof document?document:null;return r&&null!==(i=Array.prototype.slice.call(r.querySelectorAll("nami-product-container")).find(t=>or(t,e)))&&void 0!==i?i:null}(e,a);return ur(n,e),lr(n,e),a.forEach(t=>{var i=!!r&&(t===r||or(r,t)),a=t!==e&&or(t,e),o=t.matches('nami-product-container,nami-button,[role="button"],button,[tabindex]:not([tabindex="-1"])');(i||a||t===e)&&o&&(ur(n,t),lr(n,t))}),null!=r&&r.isConnected&&(ur(n,r),lr(n,r)),n}function cr(e){return $a.has(e)}function mr(e,t,i=[]){var n=qa(t);if(!n)return!1;gr(),fr(void 0,"new-composite",!0);var a=hr(e,i,Lr()||Ir()?{focusedElementOnly:!1}:{focusedElementOnly:!0});return a.forEach(e=>function(e,t){var i=qa(t);return!!i&&($a.has(e)||$a.set(e,{"aria-label":e.getAttribute("aria-label")}),e.setAttribute("aria-label",i),!0)}(e,n)),Wa=a,!0}function fr(e,t="manual",i=!1){var n=e&&-1===Wa.indexOf(e)?hr(e):Wa;n.length&&(!i&&Oa&&n.some(e=>$a.has(e))?Ka("composite restore skipped: transaction still active",{reason:t}):(gr(),n.forEach(e=>{var t=$a.get(e);t&&(!function(e,t,i){null===i?e.removeAttribute(t):e.setAttribute(t,i)}(e,"aria-label",t["aria-label"]),$a.delete(e))}),e&&-1===Wa.indexOf(e)||(Wa=[])))}function vr(e,t){$a.has(e)&&(t instanceof Element&&sr(e,t)||(gr(),Pa=setTimeout(()=>{(Pa=null,e.isConnected)?sr(e,nr())||fr(e,"blur"):fr(e,"blur-disconnected",!0)},50)))}function pr(e){Wa.length&&fr(void 0,e,!0)}function gr(){Pa&&(clearTimeout(Pa),Pa=null)}function yr(){Ma&&(clearTimeout(Ma),Ma=null),za=null}function br(){Aa&&(clearTimeout(Aa),Aa=null)}function wr(){Da&&(clearTimeout(Da),Da=null)}function kr(){xa&&(clearTimeout(xa),xa=null)}function Sr(){Ca&&(clearTimeout(Ca),Ca=null)}function Er(e){Ia=!0,Sr(),Ca=setTimeout(()=>{Ca=null,Ia=!1},Pr(e)+500)}function Tr(){Sr(),Ia=!1}function Pr(e){var t=qa(e),i=350*(t?t.split(/\s+/).filter(Boolean).length:0);return Math.min(3e4,Math.max(4e3,i))}function Mr(){return"undefined"==typeof window?null:window}function Ar(){var e,t=null===(e=Mr())||void 0===e||null===(e=e.webOS)||void 0===e||null===(e=e.service)||void 0===e?void 0:e.request;return"function"==typeof t?t:null}function Dr(){return!!Ar()}function xr(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.VIZIO)||void 0===e?void 0:e.Chromevox;return t&&"function"==typeof t.play?t:null}function Cr(){return"undefined"!=typeof window&&void 0!==window.speechSynthesis&&"function"==typeof window.speechSynthesis.speak&&"function"==typeof window.SpeechSynthesisUtterance}function Ir(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!(!t.VIZIO&&-1===i.indexOf("vizio"))}function Lr(){var e,t;if("undefined"==typeof window)return!1;if(Ir())return!1;var i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"",n=Mr();return!!(null!=n&&n.webOS||null!=n&&n.webOSDev||null!=n&&n.PalmSystem||null!=n&&null!==(t=n.webOS)&&void 0!==t&&null!==(t=t.platform)&&void 0!==t&&t.tv||-1!==i.indexOf("webos")||-1!==i.indexOf("netcast"))}function _r(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!!(t.tizen||-1!==i.indexOf("tizen")||-1!==i.indexOf("samsung")&&(-1!==i.indexOf("smart-tv")||-1!==i.indexOf("smarttv"))||-1!==i.indexOf("samsungbrowser")&&-1!==i.indexOf("tv"))}function Rr(e){return"string"==typeof e&&-1!==e.toLowerCase().indexOf("xbox")}function Fr(){var e,t,i;if("undefined"==typeof window)return!1;if(!0===Ha)return!0;var n=window.navigator;return[n.userAgent,n.platform,n.vendor,null===(e=n.userAgentData)||void 0===e?void 0:e.platform,...(null!==(t=null===(i=n.userAgentData)||void 0===i?void 0:i.brands)&&void 0!==t?t:[]).map(e=>e.brand)].some(Rr)}function Or(){if("undefined"==typeof window)return!1;try{return"television"===e.getDeviceFormFactor()}catch(e){return!1}}function Wr(){if(fa)return!1;var e=xr();if(!e)return!1;try{return"function"!=typeof e.isEnabled||e.isEnabled()}catch(e){return!1}}function $r(){return{televisionRuntime:Or(),televisionTtsRuntime:Nr(),webos:Lr(),tizen:_r(),vizio:Ir(),xbox:Fr(),xboxClientHintsResult:Ha,hasWebOsServiceRequest:Dr(),webOsRequestType:typeof Ar(),hasWebSpeechApi:Cr(),webSpeechUnavailableForSession:ca,webOsLunaUnavailableForSession:ma,vizioChromevoxUnavailableForSession:fa}}function Nr(){return Or()||Lr()||Ir()||_r()}function jr(){return Nr()&&!ca&&Cr()}function Br(e){if(va=e,Ka("set media playing",{playing:e,hasDeferredUtterance:!!pa}),!e&&pa){var t,i=pa;if(pa=null,i.options.transactionId&&(null===(t=Oa)||void 0===t?void 0:t.id)!==i.options.transactionId)return void Ka("drop stale deferred speech",{transactionId:i.options.transactionId,reason:i.options.reason});ro(i.text,i.options)}}function zr(e){ca=!0,Xa(Lr()?"Web Speech TTS unavailable in this webOS runtime":"Web Speech TTS unavailable in this runtime"),Ka("web speech unavailable",{error:e})}function Ur(e){ma=!0,Ka("webOS Luna unavailable",{error:e})}function Hr(e,t){pa={text:e,options:t}}var Gr={name:"webos-luna-tts",platform:"webos",isAvailable:function(){return Nr()&&!Ir()&&!ma&&Dr()},speak:function(e,t){Ka("speakViaWebOsLuna:enter",{textPreview:e.slice(0,160),reason:t.reason,transactionId:t.transactionId,requestType:typeof Ar()});var i=Ar();if(!i)return Ka("speakViaWebOsLuna:no-request"),!1;var n="composite"===t.reason,a=!1,r=()=>{var r,o;if(Da=null,t.transactionId&&(null===(r=Oa)||void 0===r?void 0:r.id)!==t.transactionId)return Ka("speakViaWebOsLuna:drop-stale-delayed-speak",{transactionId:t.transactionId,activeTransaction:null===(o=Oa)||void 0===o?void 0:o.id,reason:t.reason}),!1;if(va)return Ka("speakViaWebOsLuna:defer-delayed-speak-media-playing",{transactionId:t.transactionId,reason:t.reason}),Hr(e,t),!0;var s=!1;try{Ka("speakViaWebOsLuna:request",{uri:"luna://com.webos.service.tts",method:"speak",delayedComposite:n,textPreview:e.slice(0,160)}),i("luna://com.webos.service.tts",{method:"speak",parameters:{text:e,clear:!0,feedback:!0},onSuccess:e=>{var i;if(Ka("speakViaWebOsLuna:onSuccess",{response:e,transactionId:t.transactionId}),!t.transactionId||(null===(i=Oa)||void 0===i?void 0:i.id)===t.transactionId){var n,r=function(e){var t,i=qa(null!==(t=null==e?void 0:e.msgStatus)&&void 0!==t?t:null==e?void 0:e.status).toLowerCase();return"done"===i||"stopped"===i||"canceled"===i||"cancelled"===i||"error"===i}(e),o=!(null==e||!e.returnValue||"msgStatus"in Object(null!=e?e:{}));if(!a&&(r||o))a=!0,t.transactionId&&(null===(n=Oa)||void 0===n?void 0:n.id)===t.transactionId&&(Oa.status="ended",Oa=null)}},onFailure:e=>{var i;s=!0,Ka("speakViaWebOsLuna:onFailure",{error:e,transactionId:t.transactionId});var n=!t.transactionId||(null===(i=Oa)||void 0===i?void 0:i.id)===t.transactionId;t.transactionId&&n&&Oa&&(Oa.status="cancelled",Oa=null),Ur(e)}})}catch(e){var u;return t.transactionId&&(null===(u=Oa)||void 0===u?void 0:u.id)===t.transactionId&&(Oa.status="cancelled",Oa=null),Ur(e),!1}return!s};if(n)return wr(),Ka("speakViaWebOsLuna:delay-composite-until-focus-settles",{delayMs:250,transactionId:t.transactionId}),Da=setTimeout(r,250),!0;return r()},stop:Xr},Vr={name:"web-speech",platform:"web",isAvailable:jr,speak:function(e,t){if(!jr())return!1;try{var i=new window.SpeechSynthesisUtterance(e);return i.onstart=()=>{var e;t.transactionId&&(null===(e=Oa)||void 0===e?void 0:e.id)===t.transactionId&&(Oa.status="started")},i.onend=()=>{var e=Oa,i=!t.transactionId||(null==e?void 0:e.id)===t.transactionId;t.transactionId&&i&&e&&(e.status="ended",Oa=null)},i.onerror=e=>{var i,n=e.error;t.transactionId&&(null===(i=Oa)||void 0===i?void 0:i.id)===t.transactionId&&(Oa.status="cancelled",Oa=null),"synthesis-failed"===n&&zr(n)},window.speechSynthesis.speak(i),!0}catch(e){return zr("exception"),!1}},stop:()=>{if(Cr())try{window.speechSynthesis.cancel()}catch(e){}}},Kr={name:"vizio-chromevox",platform:"vizio",isAvailable:Wr,speak:qr,stop:Yr};function Xr(){var e=Ar();if(e)try{e("luna://com.webos.service.tts",{method:"stop",parameters:{},onFailure:e=>Ka("webOS Luna stop failed",{error:e})})}catch(e){Ka("webOS Luna stop threw",{error:e})}}function Yr(e=!0){var t=!!Aa,i=Ia;br();var n=xr(),a=function(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.chrome)||void 0===e||null===(e=e.tts)||void 0===e?void 0:e.stop;return"function"==typeof t?t:null}();if((n||a)&&(i||t||a)&&(i||!t||a))try{var r=!1;n&&"function"==typeof n.stop&&(n.stop(),r=!0),n&&"function"==typeof n.cancel&&n.cancel(),n&&"function"==typeof n.pause&&n.pause(),a&&(a(),r=!0),n&&e&&!r&&i&&n.play(""),Tr()}catch(e){Tr(),Ka("VIZIO stop threw",{error:e})}}function qr(e,t){var i=xr();if(!i)return!1;try{var n,a,r=!0===(null===(n=t.element)||void 0===n?void 0:n.isConnected),o="composite"===t.reason?1400:"focus"===t.reason?700:0;return o>0?(br(),Aa=setTimeout(()=>{var n;if(Aa=null,!t.transactionId||!Oa||Oa.id===t.transactionId)if(t.element&&r&&!t.element.isConnected){var a;t.transactionId&&(null===(a=Oa)||void 0===a?void 0:a.id)===t.transactionId&&(Oa.status="cancelled",Oa=null)}else{if(va)return yr(),Ua=null,void Hr(e,t);i.play(e),Er(e),t.transactionId&&(null===(n=Oa)||void 0===n?void 0:n.id)===t.transactionId&&(Oa.status="ended",Oa=null)}},o),!0):(i.play(e),Er(e),t.transactionId&&(null===(a=Oa)||void 0===a?void 0:a.id)===t.transactionId&&(Oa.status="ended",Oa=null),!0)}catch(e){return function(e){fa=!0,Ka("VIZIO Chromevox unavailable",{error:e})}(e),!1}}function Jr(e){return"high"===e?3:"normal"===e?2:1}function Qr(){return Date.now()-Ra<1500}function Zr(e){return Ja(e)}function eo(e){if(!e)return"";var t=function(e){return e?[e.tagName.toLowerCase(),e.id||"",e.getAttribute("data-component-id")||"",e.getAttribute("data-nami-id")||"",e.getAttribute("data-testid")||"",`el-${Ba(e)}`].filter(Boolean).join("|"):""}(e);return Ja(t||co(e))}function to(e){var t=Zr(e);return"clickable"===t||"button"===t||"focusable"===t||"selected"===t||"unselected"===t}function io(e,t,i){var n;if(Ua={textKey:Zr(e),reason:t.reason,timestamp:Date.now()},"high"===i){var a=Pr(e),r=Date.now();za={transactionId:t.transactionId,pageKey:ka,element:null!==(n=t.element)&&void 0!==n?n:null,elementKey:eo(t.element),textKey:Zr(e),startedAt:r,suppressUntil:r+a},Ma&&clearTimeout(Ma),Ma=setTimeout(()=>{Ma=null,za=null},a)}}function no(e,t=!0){var i,n,a,r=!(!e||(null===(i=Oa)||void 0===i?void 0:i.id)!==e||"pending"!==Oa.status);if(Ka("stopSpeech",{preserveTransactionId:e,allowVizioEmptyFallback:t,activeTransaction:null===(n=Oa)||void 0===n?void 0:n.id,reason:null===(a=Oa)||void 0===a?void 0:a.reason,preservingCurrentTransaction:r}),pa=null,r||(kr(),wr()),e||(yr(),gr(),pr("stop")),ir(e),Ta&&(clearTimeout(Ta),Ta=null),!r){if(Cr())try{window.speechSynthesis.cancel()}catch(e){}Lr()&&Xr(),Ir()&&Yr(t)}}function ao(){no()}function ro(e,t={}){var i,n,a;Ka("speakText:enter",{textPreview:qa(e).slice(0,160),reason:t.reason,transactionId:t.transactionId,element:Ya(t.element),runtime:$r()});var r=qa(e);if(!r)return!1;if(!Nr())return Ka("skip speech: non-CTV runtime"),!1;var o={interrupt:!1!==t.interrupt,reason:null!==(i=t.reason)&&void 0!==i?i:"manual",transactionId:t.transactionId,element:t.element,focusPath:t.focusPath,priority:t.priority},s=function(e,t){return t.priority?t.priority:"composite"===t.reason?"high":to(e)?"low":"normal"}(r,o);if(function(e,t,i){var n=Zr(e),a=Date.now(),r=eo(t.element);if(to(e))return!0;if(Ua&&Ua.reason===t.reason&&Ua.textKey===n&&a-Ua.timestamp<600)return Ka("suppress:duplicate-request",{reason:t.reason,textPreview:e.slice(0,120)}),!0;if(!za)return!1;if(Jr(i)>=Jr("high"))return!1;if("focus"===t.reason){var o=za.textKey;if(!Qr()&&(n===o||n.includes(o)))return Ka("suppress:focus-text-is-active-composite",{textPreview:e.slice(0,120),transactionId:za.transactionId,element:Ya(t.element)}),!0}var s=function(e,t){return!!e&&!!t&&e===t}(t.element,za.element),u=!!r&&za.elementKey===r,l=!za.pageKey||za.pageKey===ka,d=Qr(),h=l&&!d&&a<za.startedAt+2500;return!(!s&&!u&&(l&&"focus"===t.reason&&t.element&&za.element!==t.element||"low"!==i&&!h)&&(yr(),1))}(r,o,s))return!1;if(o.interrupt&&no(o.transactionId,!1),va)return Hr(r,o),!0;var u=function(e){var t;return"manual"!==(null!==(t=e.reason)&&void 0!==t?t:"manual")&&e.element?Lr()||Ir()?"programmatic":"accessibility-label":"programmatic"}(o);Ka("speakText:owner",{owner:u,reason:o.reason,element:Ya(o.element)});var l,d,h="programmatic"===u?function(){if(!Nr())return null;var e=Ir(),t=Lr();return Kr.isAvailable()?(Ka("resolveTtsEngine:selected",{engine:"vizio-chromevox"}),Kr):e?null:Gr.isAvailable()?(Ka("resolveTtsEngine:selected",{engine:"webos-luna-tts"}),Gr):Vr.isAvailable()?(Ka("resolveTtsEngine:selected",{engine:"web-speech"}),Vr):(Ka("tts engine unavailable",{webos:t,vizio:e}),null)}():null;(Ka("speakText:engine",{engine:null!==(n=null==h?void 0:h.name)&&void 0!==n?n:null,owner:u}),"composite"===o.reason&&o.transactionId&&o.element&&function(e){return"accessibility-label"===e||Lr()}(u))&&mr(o.element,r,null!==(l=o.focusPath)&&void 0!==l?l:[]);if("accessibility-label"===u)return"focus"===o.reason&&o.element&&o.element.setAttribute("aria-label",r),o.transactionId&&(null===(d=Oa)||void 0===d?void 0:d.id)===o.transactionId&&(Oa.status="started"),io(r,o,s),!0;if(!h)return function(e,t){if(!Ir()||fa)return!1;var i=Date.now(),n=()=>{var a;xa=null,t.transactionId&&Oa&&Oa.id!==t.transactionId||(Wr()?qr(e,t):Date.now()-i>=8e3?t.transactionId&&(null===(a=Oa)||void 0===a?void 0:a.id)===t.transactionId&&(Oa.status="cancelled",Oa=null):xa=setTimeout(n,250))};return kr(),xa=setTimeout(n,250),!0}(r,o)?(io(r,o,s),!0):(Xa(),!1);var c="focus"===o.reason&&o.element?lo(o.element,r):r,m=h.speak(c,o);if(Ka("speakText:engine-result",{engine:h.name,accepted:m,reason:o.reason,transactionId:o.transactionId}),m)return io(r,o,s),m;if(!o.element)return m;var f=mr(o.element,r,null!==(a=o.focusPath)&&void 0!==a?a:[]);return Ka("speakText:aria-label-fallback",{engine:h.name,accepted:f,reason:o.reason}),f&&io(r,o,s),f}function oo(e){var t=e.component;return e.hasAttribute("data-nami-primary-cta")||!0===(null==t?void 0:t.focused)||"productButton"===(null==t?void 0:t.namiComponentType)}function so(e){var t,i=null===(t=e.getAttribute("role"))||void 0===t?void 0:t.toLowerCase();return"button"===e.tagName.toLowerCase()||"button"===i||e.matches("nami-button,nami-play-pause-button,nami-volume-button,nami-toggle-button")}function uo(e){return qa(e).replace(/(?:,\s*)?\bbutton\b\s*$/i,"").trim()||qa(e)}function lo(e,t){var i=qa(t);return i&&(Ir()||Lr())&&so(e)?/\bbutton\b\s*$/i.test(i)?i:qa(`${i} button`):i}function ho(e){return qa(e.innerText||e.textContent||"")}function co(e){if(!e)return"";if(cr(e)){var t=function(e){var t=$a.get(e);return t?qa(t["aria-label"]||e.getAttribute("title")||""):""}(e);if(t)return t;var i=mo(e.component);if(i)return i}var n=e.getAttribute("data-tts-spoken-label");if(n)return qa(n);var a=mo(e.component);if(a)return a;var r=e.getAttribute("aria-label")||e.getAttribute("title");return r?qa(r):ho(e)}function mo(e){var t=vo(e,ya);if(!t)return"";var i=t,n=qa(fo(i.speechLabel)||fo(i.speech_label)||fo(i.screenreaderText)||fo(i.title)||fo(i.alt)||fo(i.text)||(Array.isArray(i.texts)?i.texts.map(e=>fo(e)).join(", "):""));if(n)return n;for(var a,r=f(go(i));!(a=r()).done;){var o=mo(a.value);if(o)return o}return""}function fo(e,t=ya){return t?Zn(t,e):e}function vo(e,t){if(!e||e.hidden)return null;var i=e;if("condition"===i.component)return t&&qn(t,i)?e:null;if(i.conditionAttributes&&t){var n=Jn(t,i);return n.hidden?null:n}return e}function po(e,t){if(Ka("applySpeechAttributes:enter",{element:Ya(e),label:t,activeComposite:cr(e)}),!cr(e)){var i=qa(t),n=function(e,t){var i=qa(t);return i?so(e)?uo(i):i:""}(e,t);if(!n)return e.removeAttribute("data-tts-spoken-label"),void e.removeAttribute("aria-label");i?e.setAttribute("data-tts-spoken-label",i):e.removeAttribute("data-tts-spoken-label"),e.setAttribute("aria-label",function(e,t){return so(e)?uo(t):qa(t)}(e,n))}}function go(e){for(var t=[],i=0,n=["components","playingComponents","pausedComponents","mutedComponents","volumeComponents","productBaseComponents","productFeaturedComponents"];i<n.length;i++){var a=null==e?void 0:e[n[i]];Array.isArray(a)&&t.push(...a)}return null!=e&&e.collapseHeader&&(Array.isArray(e.collapseHeader)?t.push(...e.collapseHeader):t.push(e.collapseHeader)),t}function yo(e,t,i){var n=vo(e,ya);if(n&&!function(e){var t=vo(e,ya);if(!t)return!1;var i=t,n=String(i.component||i.namiComponentType||"").toLowerCase();return-1!==n.indexOf("button")||-1!==n.indexOf("toggle")||-1!==n.indexOf("checkbox")||-1!==n.indexOf("radio")||-1!==n.indexOf("select")||-1!==n.indexOf("input")||!!i.onTap||!!i.sku||!0===i.focused}(n)){var a=function(e){var t=vo(e,ya);if(!t)return"";var i=t;switch(t.component){case"text":case"countdownTimerText":return Qa(fo(i.screenreaderText)||fo(i.text));case"text-list":return Array.isArray(i.texts)?Qa(i.texts.map(e=>fo(e)).join(", ")):"";case"videoUrl":case"progressBar":return qa(fo(i.screenreaderText));default:return""}}(n);Za(t,a),go(n).forEach(e=>yo(e,t))}}function bo(e,t){var i=[];if(!e)return i;var n=e;return[n.header,n.contentContainer,n.footer,n.backgroundContainer,n.components].forEach(e=>{Array.isArray(e)?e.forEach(e=>yo(e,i)):yo(e,i)}),i}function wo(e,t){var i=bo(e),n=function(e){if(!e)return"";var t=mo(e.component),i=e.getAttribute("aria-label")||e.getAttribute("title")||ho(e),n=qa(t||i);return n?lo(e,n):""}(t);return tr(er(i,n?[n]:[]))}function ko(e){return e?Ja(`${qa(e.id||e.name||"")}|${tr(er(bo(e),[]))}`):""}function So(){return Sa}function Eo(e,t=null){!function(){if(null===Ha&&null===Ga){var e=navigator.userAgentData;"function"==typeof(null==e?void 0:e.getHighEntropyValues)?Ga=e.getHighEntropyValues(["platform","model"]).then(e=>{var t,i,n=(null!==(t=e.platform)&&void 0!==t?t:"").toLowerCase(),a=(null!==(i=e.model)&&void 0!==i?i:"").toLowerCase();Ha=n.includes("xbox")||a.includes("xbox"),Ka("xbox client hints resolved",{platform:n,model:a,result:Ha})}).catch(()=>{Ha=!1}).finally(()=>{Ga=null}):Ha=!1}}(),Ka("setActivePage:enter",{nextKey:ko(e),previousKey:ka,activePageAnnounced:wa,pageName:qa((null==e?void 0:e.name)||(null==e?void 0:e.id)||"")});var i=ka;ga=e,ya=t,function(e){var t=ko(e);if(t!==ka){var i=!ka&&!!La;wa=!1,ka=t,Sa=i,La=null,_a=""}}(e),i!==ka&&no(void 0,!1)}function To(e,t){if(Ka("prepareInitialComposite:enter",{element:Ya(e),activePageKey:ka,activePageAnnounced:wa,blockedByNavigation:So(),label:co(e),isPrimary:oo(e)}),!ga||wa||!oo(e)||So())return Ka("prepareInitialComposite:skip",{hasActivePage:!!ga,activePageAnnounced:wa,isPrimary:oo(e),blockedByNavigation:So()}),!1;var i=wo(ga,e);if(!i)return!1;var n=dr(e,t),a=function(e,t,i){var n={id:Fa++,reason:e,element:i,text:t,page:ga,status:"pending"};return Oa=n,n}("composite",i,e);wa=!0,La=e,_a=eo(e);var r,o=ro(i,{reason:"composite",interrupt:!0,transactionId:a.id,element:e,focusPath:n,priority:"high"});o||(wa=!1,(null===(r=Oa)||void 0===r?void 0:r.id)===a.id&&(Oa.status="cancelled",Oa=null));return o}function Po(e,t){Ka("preparePrimaryCtaCompositeFocus:enter",{element:Ya(e),label:co(e),activePageKey:ka,activePageAnnounced:wa});var i=To(e,t);return Ka("preparePrimaryCtaCompositeFocus:result",{result:i,activePageKey:ka,activePageAnnounced:wa}),i}function Mo(e){Ka("handleNativeFocusIn:enter",{target:e.target instanceof Element?Ya(e.target):String(e.target),activePageKey:ka,activePageAnnounced:wa});var t=function(e){for(var t,i=null,n=f("function"==typeof e.composedPath?e.composedPath():[]);!(t=n()).done;){var a=t.value;if(a instanceof Element&&co(a)){if(a.tagName.toLowerCase().startsWith("nami-"))return a;i||(i=a)}}return null!=i?i:e.target instanceof Element?e.target:null}(e);t&&Ao(t,e)}function Ao(e,t){if(Ka("handleFocusedElementForSpeech:enter",{element:Ya(e),label:co(e),ttsEnabled:da,runtime:$r(),activePageKey:ka,activePageAnnounced:wa,lastFocused:Ya(La),lastFocusedElementIdentity:_a}),!e)return Ka("handleFocusedElementForSpeech:skip-basic",{hasElement:!!e,ttsEnabled:da}),!1;if(!Nr())return!1;var i=eo(e);if(za&&za.pageKey===ka&&Date.now()<za.startedAt+2500){var n=za.element===e,a=!!i&&za.elementKey===i;if(!Qr()&&(n||a))return Ka("handleFocusedElementForSpeech:skip-during-initial-composite-lock",{element:Ya(e),sameCompositeElement:n,sameCompositeElementKey:a}),!1;var r=co(e),o=r?Zr(r):"";if(!Qr()&&o&&za.textKey.includes(o))return Ka("handleFocusedElementForSpeech:skip-composite-contained-label-during-initial-lock",{element:Ya(e),labelPreview:r.slice(0,120),transactionId:za.transactionId}),La=e,_a=i,!1}if(La===e||i&&i===_a&&!wa)return Ka("handleFocusedElementForSpeech:skip-same-element",{element:Ya(e),activePageAnnounced:wa,elementIdentity:i,lastFocusedElementIdentity:_a}),!1;if(!wa&&ga&&oo(e)&&!La&&!So())return To(e,t);var s=co(e);if(!s)return!1;if(za){var u=Zr(s),l=za.textKey;if(!Qr()&&(u===l||u.includes(l)))return Ka("handleFocusedElementForSpeech:skip-active-composite-label",{element:Ya(e),labelPreview:s.slice(0,120),transactionId:za.transactionId}),La=e,_a=i,!1}return La=e,_a=i,Ta&&clearTimeout(Ta),Ta=setTimeout(()=>{Ta=null,La===e&&ro(s,{reason:"focus",interrupt:!0,element:e,focusPath:dr(e,t),priority:"normal"})},120),!0}function Do(e=document){var t;if(Ka("attachFocusSpeechListeners:enter",{root:e instanceof Element?Ya(e):e instanceof DocumentFragment?"document-fragment":"document",runtime:$r()}),xo(),!Nr())return Ka("focus speech listeners not attached: non-CTV runtime"),xo;var i,n=e=>Mo(e),a=()=>(Ka("handleUserNavigationKey",{activePageKey:ka,activePageAnnounced:wa}),Ra=Date.now(),void(Sa=!0));e.addEventListener("focusin",n,!0),e.addEventListener("keydown",a,!0);var r=window;if("undefined"!=typeof window&&null!==(t=r.TVJS)&&void 0!==t&&t.DirectionalNavigation){var o=r.TVJS.DirectionalNavigation;i=o.onfocuschanged,o.onfocuschanged=e=>{var t;null===(t=i)||void 0===t||t.call(o,e),function(e){var t,i=null===(t=e.detail)||void 0===t?void 0:t.nextFocusElement;i&&Ao(i,e)}(e)}}return Ea={root:e,focusListener:n,keyListener:a,previousTvjsHandler:i},xo}function xo(){var e;if(Ka("detachFocusSpeechListeners:enter",{hasCleanup:!!Ea}),Ea){var t=Ea,i=t.root,n=t.focusListener,a=t.keyListener,r=t.previousTvjsHandler;i.removeEventListener("focusin",n,!0),a&&i.removeEventListener("keydown",a,!0);var o=window;null!==(e=o.TVJS)&&void 0!==e&&e.DirectionalNavigation&&r&&(o.TVJS.DirectionalNavigation.onfocuschanged=r),Ea=null}}function Co(){var e;Ka("resetScreenreaderState:enter",{activePageKey:ka,activePageAnnounced:wa,activeTransaction:null===(e=Oa)||void 0===e?void 0:e.id,lastFocused:Ya(La)}),xo(),pa=null,va=!1,ga=null,ya=null,ba=null,wa=!1,ka="",Sa=!1,La=null,_a="",Ra=0,Ua=null,yr(),gr(),br(),wr(),kr(),Tr(),Ta&&(clearTimeout(Ta),Ta=null),pr("reset"),ir(),Oa=null}var Io=function(){return m(function t(i,n,a="",r=""){var o;u(this,t),this.playing=!1,this.toggling=!1,this.handleVideoEvents=t=>{this.video.onended=()=>{Br(!1),this.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_ENDED)},this.video.onpause=()=>{Br(!1),this.toggling||this.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_PAUSED)},this.video.onplay=()=>{Br(!this.video.muted),this.toggling||this.handlePlayerAnalytics(t,this.video.currentTime>.05?e.NamiPaywallAction.VIDEO_RESUMED:e.NamiPaywallAction.VIDEO_STARTED)},this.video.onvolumechange=()=>{this.toggling||(this.muted=this.video.muted,Br(!this.video.paused&&!this.video.ended&&!this.muted),this.handlePlayerAnalytics(t,this.muted?e.NamiPaywallAction.VIDEO_MUTED:e.NamiPaywallAction.VIDEO_UNMUTED))}},this.removeVideoEvents=()=>{this.video&&(Br(!1),this.video.onended=null,this.video.onpause=null,this.video.onplay=null,this.video.onvolumechange=null,this.toggling=!1)},this.video=null!=n?n:this.video,null!==(o=t.instance)&&void 0!==o&&o.videoSrc&&n.src!=t.instance.videoSrc&&this.handlePlayerAnalytics(i,e.NamiPaywallAction.VIDEO_CHANGED),this.videoSrc=n.src,this.video&&(this.muteByDefault=n.muted,this.loopVideo=n.loop,this.autoplayVideo=n.autoplay,this.muted=this.video.muted,this.videoComponentName=a,this.videoComponentId=r,this.playing=!(!(this.video.currentTime>0)||this.video.paused||this.video.ended),Br(this.playing&&!this.video.muted),this.handleVideoEvents(i))},[{key:"togglePlayVideo",value:function(e){this.toggling=!0,this.playing?this.video.pause():this.video.play(),this.playing=!this.playing,this.handlePlayerAnalytics(e)}},{key:"toggleMuteVideo",value:function(t){this.toggling=!0,this.video.muted=!this.video.muted,this.muted=this.video.muted,this.handlePlayerAnalytics(t,this.muted?e.NamiPaywallAction.VIDEO_MUTED:e.NamiPaywallAction.VIDEO_UNMUTED)}},{key:"videoPlayingAction",value:function(){var t,i;return(null===(t=this.video)||void 0===t?void 0:t.currentTime)<=0?e.NamiPaywallAction.VIDEO_STARTED:this.video.paused?e.NamiPaywallAction.VIDEO_PAUSED:this.video.ended?e.NamiPaywallAction.VIDEO_ENDED:(null===(i=this.video)||void 0===i?void 0:i.currentTime)>.05?e.NamiPaywallAction.VIDEO_RESUMED:e.NamiPaywallAction.UNKNOWN}},{key:"handlePlayerAnalytics",value:function(t,i){if(this.video){var n={id:this.videoComponentId,name:this.videoComponentName,url:this.video.src,loopVideo:this.loopVideo,muteByDefault:this.muteByDefault,autoplayVideo:this.autoplayVideo,contentDuration:this.video.duration/1e3,contentTimecode:this.video.currentTime/1e3};e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,{action:null!=i?i:this.videoPlayingAction(),videoMetaData:n,timeSpentOnPaywall:ra(t)})}}}])}();Io.instance=null;var Lo=e._internal.NamiFlowManager,_o=null;function Ro(){var e=_o;return!!e&&(_o=null,e.flow&&Lo.instance.currentFlow===e.flow&&Lo.finish(),e.remove(),!0)}var Fo=({onTap:t,sku:i,componentChange:n,contextProvider:a}={})=>{var r,o,s,u,l,d,h,c,m,f,p,g=e.NamiPaywallAction.UNKNOWN;switch(null==t?void 0:t.function){case ft:g=e.NamiPaywallAction.CLOSE_PAYWALL,p=ra(a),Oo(),null===(r=Io.instance)||void 0===r||r.handlePlayerAnalytics(a,e.NamiPaywallAction.VIDEO_ENDED);break;case pt:g=e.NamiPaywallAction.RESTORE_PURCHASES,Wo();break;case yt:g=e.NamiPaywallAction.SIGN_IN,$o();break;case Dt:No(null===(o=t.parameters)||void 0===o?void 0:o.url);break;case wt:i&&(g=e.NamiPaywallAction.BUY_SKU,i=jo(a,t,i));break;case Ct:g=e.NamiPaywallAction.PAGE_CHANGE,n={name:null==t||null===(s=t.parameters)||void 0===s?void 0:s.screen},Bo(a,null==t||null===(u=t.parameters)||void 0===u?void 0:u.screen);break;case St:g=e.NamiPaywallAction.TOGGLE_CHANGE,n=zo(a,null==t||null===(l=t.parameters)||void 0===l?void 0:l.formId,null==t||null===(d=t.parameters)||void 0===d?void 0:d.value);break;case Tt:i&&(g=e.NamiPaywallAction.SELECT_SKU,Uo(a,i));break;case Mt:i&&(g=e.NamiPaywallAction.PURCHASE_SELECTED_SKU,Ho(a,i));break;case Lt:break;case Rt:null===(h=Io.instance)||void 0===h||h.togglePlayVideo(a);break;case Ot:null===(c=Io.instance)||void 0===c||c.togglePlayVideo(a);break;case $t:null===(m=Io.instance)||void 0===m||m.toggleMuteVideo(a);break;case jt:null===(f=Io.instance)||void 0===f||f.toggleMuteVideo(a)}g!==e.NamiPaywallAction.UNKNOWN&&e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},a.getPaywallActionEventData(),{action:g,sku:i,timeSpentOnPaywall:p,componentChange:n,purchaseError:void 0,purchases:void 0}))},Oo=()=>{ao(),e.storageService.clearLaunchId(),Ro()||Go(e.PaywallManagerEvents.Close)||"undefined"==typeof window||window.history.back()},Wo=()=>{var t=e.hasCapability(e.Capabilities.THIRD_PARTY_TRANSACTIONS);Go(e.PaywallManagerEvents.Restore)||t||e.logger.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},$o=()=>{Go(e.PaywallManagerEvents.SignIn)},No=t=>{t?Go(e.PaywallManagerEvents.DeeplinkAction,t)||"undefined"!=typeof window&&window.open(t,"_blank"):e.logger.debug("Paywall deep link action invoked, but no url present.")},jo=(t,i,n)=>{var a,r=null===(a=i.parameters)||void 0===a?void 0:a.promo,o=n;if(r)e.logger.debug(`promo id is not null ${null==n?void 0:n.id}`),o.promoId=r.toString();else{e.logger.debug(`promo id is null for ${n.id}, product details: ${JSON.stringify(n.productDetails)}`);var s=n.productDetails;if(Bt(null==s?void 0:s.product_type)){var u=function(e){return e.offers.find(e=>"promo"===e.offer_type&&0===e.price)}(s);if(u&&u.offer_ref_id)e.logger.debug(`Found a free trial offer ${u.offer_ref_id}`),o.promoId=u.offer_ref_id.toString();else{var l,d=s.offers[0];if(d)e.logger.debug(`Found an offer ${d.offer_ref_id}`),o.promoId=null===(l=d.offer_ref_id)||void 0===l?void 0:l.toString()}}}return function(t,i){if(e.hasCapability(e.Capabilities.THIRD_PARTY_TRANSACTIONS)){if(e.storageService.setPurchaseImpression(),e.NamiEventEmitter.getInstance().listenerCount(e.PaywallManagerEvents.BuySku)<=0)return void e.logger.warn("In order for Nami to hand off the purchase so the transaction can be handled by, you must register a NamiBuySkuHandler callbackwith NamiPaywallManager.registerBuySkuHandler.");e.logger.info(`Handing off purchase for processing by developer skuId=${i.skuId} promoId=${i.promoId}`),Go(e.PaywallManagerEvents.BuySku,i)}else{var n=e.namiBuySKU(i.skuId);if(n&&(e.logger.info(`Purchase flow completed, success=${n.success}, code=${n.billingResponseCode}, message=${n.message}`),n.success)){var a;e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,{action:e.NamiPaywallAction.CLOSE_PAYWALL,sku:i,timeSpentOnPaywall:ra(t)}),null===(a=Io.instance)||void 0===a||a.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_ENDED);var r=t.getSelectedCampaign();r&&r.conversion_event_type==e.CampaignRuleConversionEventType.IN_APP&&r.conversion_event_url?(e.storageService.clearLaunchId(),window.location.href=r.conversion_event_url):Oo()}}}(t,o),o},Bo=(e,t)=>{var i;t&&((null===(i=window.history.state)||void 0===i?void 0:i.prevUrl)==t?window.history.back():e.setCurrentPage(t))},zo=(e,t,i)=>{if(t)return e.setCurrentFormId(t,i),{formId:t,value:i};var n=e.getCurrentGroupId(),a=e.getCurrentGroupName();return e.setCurrentGroupData(n,a),{id:n,name:a}},Uo=(e,t)=>{var i=e.getCurrentGroupId(),n=e.selectedProducts();i&&t.id!=n[i]&&e.setSelectedProducts(v({},n,{[i]:t.id}))},Ho=(e,t)=>{e.setPurchase(!0,t)};function Go(t,...i){var n=e.NamiEventEmitter.getInstance();return n.emit(t,...i),n.listenerCount(t)>0}var Vo,Ko,Xo,Yo,qo,Jo,Qo,Zo,es,ts,is,ns,as=e=>e,rs=e._internal.NamiFlowManager,os=250,ss=(Vo=function(){function n(t,i,a,r){var o;return u(this,n),(o=s(this,n)).pages=[],o.currentOffset=0,o.presentationStyle="fullscreen",o._sheetEntranceActive=!0,o.formFactor=e.getDeviceFormFactor(),o.timeSpentOnPaywall=0,o.animation={transition:"none",direction:"forward"},o._originalBodyStyles={},o._originalDocumentStyles={},o._savedScrollY=0,o._sheetDragStartY=0,o._sheetIsDragging=!1,o._dismissThreshold=100,o._boundHandleKeyDownEvent=e=>o.handleKeyDownEvent(e),o._stylesAlreadySaved=!1,o.type=t,o.value=i,o.context=a,o.presetCampaign=r,o.setPaywallData(),o.presentationStyle=o.getPresentationStyle(o.paywall),o.applyPresentationHostClasses(),w(o,o)}return y(n,t.LitElement),m(n,[{key:"applyPresentationHostClasses",value:function(){this.classList.toggle("nami-half-sheet-mode",this.isOverlaySheet),this.classList.toggle("nami-modal-mode",this.isModal),this.classList.toggle("nami-modal-phone",this.isModal&&"phone"===this.formFactor),this.classList.toggle("nami-modal-wide",this.isModal&&"phone"!==this.formFactor)}},{key:"setPaywallData",value:function(){if(this.presetCampaign)return this.campaign=this.presetCampaign,void(this.paywall=this.presetCampaign.paywall?e.getPaywall(this.presetCampaign.paywall):void 0);var t=e.getPaywallDataFromLabel(this.value,this.type);this.paywall=t.paywall,this.campaign=t.campaign}},{key:"getPresentationStyle",value:function(t){var i,n,a,r=null!==(i=null==t||null===(n=t.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.presentationStyle)&&void 0!==i?i:null==t||null===(a=t.template)||void 0===a||null===(a=a.initialState)||void 0===a?void 0:a.presentation_style;return e.getEffectiveWebStyle(r)}},{key:"isHalfSheet",get:function(){return"compact_sheet"===this.presentationStyle}},{key:"isSheet",get:function(){return"sheet"===this.presentationStyle}},{key:"isOverlaySheet",get:function(){return this.isHalfSheet||this.isSheet}},{key:"isModal",get:function(){return"modal"===this.presentationStyle}},{key:"isOverlay",get:function(){return this.isOverlaySheet||this.isModal}},{key:"connectedCallback",value:function(){var e;M(n,"connectedCallback",this)([]),null!==(e=window.TVJS)&&void 0!==e&&e.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),this._detachFocusSpeechListeners=Do(this),document.addEventListener("keydown",this._boundHandleKeyDownEvent),this._swipeHandler=ht(this,this.handleSwipeEvent.bind(this),{axisHint:"y",lockAxis:!0,minDistance:25,edgeLeakThreshold:15,preventScrollOnSwipe:!1,pointerTypes:["touch"]}),this.setOriginalStyles()}},{key:"disconnectedCallback",value:function(){var t,i,a;M(n,"disconnectedCallback",this)([]),ao(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=void 0,Co(),e.storageService.clearLaunchId(),null!==(i=window.TVJS)&&void 0!==i&&i.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this._boundHandleKeyDownEvent),e.NamiEventEmitter.getInstance().removeAllListeners(e.PAYWALL_ACTION_EVENT),this.restoreStyles(),null===(a=this._halfSheetAbortController)||void 0===a||a.abort(),this._swipeHandler.destroy()}},{key:"setOriginalStyles",value:function(){this._stylesAlreadySaved||(this._stylesAlreadySaved=!0,this._originalBodyStyles.background=document.body.style.background,this._originalBodyStyles.overflow=document.body.style.overflow||null,this._originalBodyStyles.position=document.body.style.position||null,this._originalBodyStyles.top=document.body.style.top||null,this._originalBodyStyles.width=document.body.style.width||null,"phone"===this.formFactor&&(this._originalBodyStyles["overscroll-behavior"]=document.body.style.overscrollBehavior||null,this._originalDocumentStyles["overscroll-behavior"]=document.documentElement.style.overscrollBehavior||null)),"television"===this.formFactor&&(document.body.style.overflow="hidden"),"phone"===this.formFactor&&(document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none",this.isOverlay||(document.body.style.overflow="hidden")),this.isOverlay&&(this._savedScrollY=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%",document.body.style.overflow="hidden")}},{key:"restoreStyles",value:function(){Object.entries(this._originalBodyStyles).forEach(([e,t])=>{null!==t?document.body.style.setProperty(e,t):document.body.style.removeProperty(e)}),Object.entries(this._originalDocumentStyles).forEach(([e,t])=>{null!==t?document.documentElement.style.setProperty(e,t):document.documentElement.style.removeProperty(e)}),this._savedScrollY>0&&(window.scrollTo(0,this._savedScrollY),this._savedScrollY=0)}},{key:"handleKeyDownEvent",value:function(t){if(10009===t.keyCode||27===t.keyCode||166===t.keyCode||196===t.keyCode||"Backspace"===t.key||"GoBack"===t.key||"BrowserBack"===t.key||"XF86Back"===t.key){if("Backspace"===t.key)if(t.composedPath().some(e=>e instanceof HTMLElement&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)))return;t.preventDefault(),ao(),this.flow?this.flow.triggerActions(e.NamiReservedActions.REMOTE_BACK):this.isModal&&this.animateSheetDismiss().then(()=>Oo())}}},{key:"handleBackdropClick",value:function(e){var t;(e.stopPropagation(),this.flow)?null!==(t=this.flow.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==t&&t?this.flow.triggerActions("__swipe_down__"):this.animateSheetDismiss().then(()=>{var e;null===(e=this.flow)||void 0===e||e.dismiss(),Oo()}):this.animateSheetDismiss().then(()=>Oo())}},{key:"animateSheetDismiss",value:function(){var e,t,i,n,a;return S(function(r){for(;;)switch(r.n){case 0:return i=this.shadowRoot,n=null!==(e=null==i?void 0:i.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null==i?void 0:i.querySelector(".nami-modal-container"),a=null!==(t=null==i?void 0:i.querySelector(".nami-half-sheet-backdrop"))&&void 0!==t?t:null==i?void 0:i.querySelector(".nami-modal-backdrop"),n&&n.classList.add("nami-dismissing"),a&&a.classList.add("nami-dismissing"),r.n=1,o(new Promise(e=>setTimeout(e,200)));case 1:return r.a(2)}},null,this,null,Promise)}},{key:"handleSwipeEvent",value:function({direction:e}){var t;if("down"===e)null===(t=this.flow)||void 0===t||t.triggerActions("__swipe_down__");else if("up"===e){var i;null===(i=this.flow)||void 0===i||i.triggerActions("__swipe_up__")}}},{key:"setupHalfSheetDragTracking",value:function(){var e,t,i;null===(e=this._halfSheetAbortController)||void 0===e||e.abort(),this._halfSheetAbortController=new AbortController;var n=this._halfSheetAbortController.signal,a=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"),r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-half-sheet-content");if(a&&r){a.addEventListener("touchstart",e=>{r.scrollTop>0||(this._sheetDragStartY=e.touches[0].clientY,this._sheetIsDragging=!0)},{passive:!0,signal:n}),a.addEventListener("touchmove",e=>{if(this._sheetIsDragging){var t=e.touches[0].clientY-this._sheetDragStartY;t>0&&(a.style.transform=`translateY(${t}px)`,a.style.transition="none",e.preventDefault())}},{passive:!1,signal:n}),a.addEventListener("touchend",()=>{if(this._sheetIsDragging){this._sheetIsDragging=!1;var e,t,i=a.style.transform.match(/translateY\((\d+(?:\.\d+)?)px\)/);if((i?parseFloat(i[1]):0)>this._dismissThreshold)if(null!==(e=null===(t=this.flow)||void 0===t?void 0:t.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==e&&e){var n;a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out",null===(n=this.flow)||void 0===n||n.triggerActions("__swipe_down__")}else{var r;a.style.transform="translateY(100%)",a.style.transition="transform 0.2s ease-in";var o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(".nami-half-sheet-backdrop");o&&o.classList.add("nami-dismissing"),setTimeout(()=>{var e;null===(e=this.flow)||void 0===e||e.dismiss()},200)}else a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out"}},{signal:n})}}},{key:"setupHalfSheetFocusTrap",value:function(){var e,t,i,n,a=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-modal-container");if(a){a.focus();var r=null===(n=this._halfSheetAbortController)||void 0===n?void 0:n.signal;a.addEventListener("keydown",e=>{if("Tab"===e.key){var t=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0!==t.length){var i,n,r=t[0],o=t[t.length-1];if(e.shiftKey)document.activeElement!==r&&(null===(i=this.shadowRoot)||void 0===i?void 0:i.activeElement)!==r||(e.preventDefault(),o.focus());else document.activeElement!==o&&(null===(n=this.shadowRoot)||void 0===n?void 0:n.activeElement)!==o||(e.preventDefault(),r.focus())}}},r?{signal:r}:void 0)}}},{key:"firstUpdated",value:function(){var t;this.timeSpentOnPaywall=Date.now(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=Do(this.renderRoot),e.isNamiFlowCampaign(this.campaign)&&(this.flow=rs.instance.presentFlow(this.campaign,this,this.context)),this.isOverlay&&this.updateComplete.then(()=>{this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()})}},{key:"updated",value:function(e){if(M(n,"updated",this)([e]),e.has("presentationStyle")){var t=e.get("presentationStyle");("compact_sheet"===t||"sheet"===t||"modal"===t)!==this.isOverlay&&(this.restoreStyles(),this._stylesAlreadySaved=!1,this.setOriginalStyles()),this.isOverlay&&(this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap())}}},{key:"getAnimationStyles",value:function(e){var t="backward"===this.animation.direction?-1:1;switch(this.animation.transition){case"verticalSlide":return`transform: translateY(${100*(e-this.currentOffset)*t}vh);`;case"slide":return`transform: translateX(${100*(e-this.currentOffset)*t}vw);`;case"fade":return`opacity: ${e===this.currentOffset?1:0};`;default:return""}}},{key:"updatePages",value:function(e){var t,i,n;return S(function(a){for(;;)switch(a.n){case 0:if(this.paywall=e,0!==this.pages.length&&"none"!==this.animation.transition){a.n=1;break}return this.pages=[e],a.a(2);case 1:if((null==(t=this.pages[this.pages.length-1])?void 0:t.id)!==e.id){a.n=2;break}return a.a(2);case 2:return i=null,this.isOverlaySheet&&(i=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelector(".nami-half-sheet-content"))&&(i.style.height=`${i.clientHeight}px`),this.pages=[t,e],this.currentOffset=0,a.n=3,o(this.updateComplete);case 3:requestAnimationFrame(()=>{this.currentOffset=1,setTimeout(()=>{this.pages=[e],this.currentOffset=0,i&&(i.style.height="")},os)});case 4:return a.a(2)}},null,this,null,Promise)}},{key:"animateFullscreenEntry",value:function(){return S(function(e){for(;;)switch(e.n){case 0:return e.n=1,o(new Promise(e=>requestAnimationFrame(()=>e())));case 1:return this.classList.remove("nami-fullscreen-entering"),this.classList.add("nami-fullscreen-entering-active"),e.n=2,o(new Promise(e=>setTimeout(e,os)));case 2:this.classList.remove("nami-fullscreen-entering-active");case 3:return e.a(2)}},null,this,null,Promise)}},{key:"_captureExitOverlay",value:function(e){var t=this.shadowRoot;if(!t)return null;var i=t.querySelector(".nami-flow-container"),n=document.createElement("div");if(n.className="nami-fullscreen-exit-overlay",n.style.cssText=`\n position: fixed; inset: 0; z-index: 10000;\n pointer-events: none;\n background: ${e};\n overflow: hidden;\n `,i){var a=i.cloneNode(!0);a.style.transform="none",a.style.transition="none",n.appendChild(a)}return t.appendChild(n),n.offsetHeight,n}},{key:"_slideExitOverlayAway",value:function(e){var t;return S(function(i){for(;;)switch(i.n){case 0:if(e){i.n=1;break}return i.a(2);case 1:return t="undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,e.style.transition=t?"none":"transform 250ms ease-in",e.style.transform="translateY(100%)",i.n=2,o(new Promise(e=>setTimeout(e,t?0:os)));case 2:e.remove();case 3:return i.a(2)}},null,null,null,Promise)}},{key:"flowNavigateToScreen",value:function(t,i){var n,a,r,s,u,l,d,h,c,m,f;return S(function(v){for(;;)switch(v.n){case 0:if(null!==(n=this.flow)&&void 0!==n&&n.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,e.NamiReservedActions.DISAPPEAR),r=this.presentationStyle,s=this.getPresentationStyle(t),u=0===this.pages.length,l="backward"===i.direction,"compact_sheet"!==r&&"sheet"!==r||"fullscreen"!==s){v.n=3;break}return this.classList.add("nami-fullscreen-entering"),this.presentationStyle="fullscreen",this.applyPresentationHostClasses(),v.n=1,o(this.updateComplete);case 1:return v.n=2,o(this.animateFullscreenEntry());case 2:v.n=11;break;case 3:if("fullscreen"!==r||"compact_sheet"!==s&&"sheet"!==s){v.n=10;break}if(!u&&!l){v.n=8;break}if(!l){v.n=6;break}return d=document.body.style.background||getComputedStyle(this).backgroundColor||"#000",this._sheetEntranceActive=!1,h=this._captureExitOverlay(d),this.presentationStyle=s,this.applyPresentationHostClasses(),this.pages=[t],this.paywall=t,v.n=4,o(this.updateComplete);case 4:return v.n=5,o(this._slideExitOverlayAway(h));case 5:v.n=7;break;case 6:this.presentationStyle=s,this.applyPresentationHostClasses();case 7:v.n=9;break;case 8:console.warn(`Unsupported forward transition: fullscreen → ${s}. Presenting as fullscreen.`);case 9:v.n=11;break;case 10:this.presentationStyle=s,this.applyPresentationHostClasses();case 11:return c=("compact_sheet"===r||"sheet"===r)&&"fullscreen"===s,m="fullscreen"===r&&("compact_sheet"===s||"sheet"===s),f=!("compact_sheet"!==r&&"sheet"!==r||"compact_sheet"!==s&&"sheet"!==s||r===s)||c||m,this.animation=f?{transition:"fade",direction:i.direction}:i,v.n=12,o(this.updatePages(t));case 12:null!==(a=this.flow)&&void 0!==a&&a.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,e.NamiReservedActions.APPEAR);case 13:return v.a(2)}},null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return ut.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?t.html(Ko||(Ko=as``)):this.isOverlaySheet?this.renderHalfSheet():this.isModal?this.renderModal(this.renderFlowContainer()):this.renderFlowContainer()}},{key:"renderFlowContainer",value:function(){return t.html(Xo||(Xo=as`
254
+ `)),Fe=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Oe=globalThis,We=Oe.ShadowRoot&&(void 0===Oe.ShadyCSS||Oe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$e=Symbol(),Ne=new WeakMap,je=function(){return m(function e(t,i,n){if(u(this,e),this._$cssResult$=!0,n!==$e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(We&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Ne.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ne.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Be=(e,t)=>{if(We)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=f(t);!(i=n()).done;){var a=i.value,r=document.createElement("style"),o=Oe.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}},ze=We?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=f(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return(e=>new je("string"==typeof e?e:e+"",void 0,$e))(i)})(e):e,Ue=Object.is,He=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,Ve=Object.getOwnPropertyNames,Ke=Object.getOwnPropertySymbols,Xe=Object.getPrototypeOf,Ye=globalThis,qe=Ye.trustedTypes,Je=qe?qe.emptyScript:"",Qe=Ye.reactiveElementPolyfillSupport,Ze=(e,t)=>e,et={toAttribute(e,t){switch(t){case Boolean:e=e?Je:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},tt=(e,t)=>!Ue(e,t),it={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:tt};null!==(Ce=Symbol.metadata)&&void 0!==Ce||(Symbol.metadata=Symbol("metadata")),null!==(Ie=Ye.litPropertyMetadata)&&void 0!==Ie||(Ye.litPropertyMetadata=new WeakMap);var nt=function(){function e(){var t;return u(this,e),(t=s(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return y(e,D(HTMLElement)),m(e,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}},{key:"addController",value:function(e){var t,i;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,i=f(this.constructor.elementProperties.keys());!(e=i()).done;){var n=e.value;this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return Be(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}},{key:"attributeChangedCallback",value:function(e,t,i){this._$AK(e,i)}},{key:"_$ET",value:function(e,t){var i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(void 0!==n&&!0===i.reflect){var a,r=(void 0!==(null===(a=i.converter)||void 0===a?void 0:a.toAttribute)?i.converter:et).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var i=this.constructor,n=i._$Eh.get(e);if(void 0!==n&&this._$Em!==n){var a,r,o,s=i.getPropertyOptions(n),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:et;this._$Em=n;var l=u.fromAttribute(t,s.type);this[n]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(n))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,i,n=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===n&&(a=this[e]),null!=i||(i=s.getPropertyOptions(e)),!((null!==(r=i.hasChanged)&&void 0!==r?r:tt)(a,t)||i.useDefault&&i.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:i,reflect:n,wrapped:a},r){var o,s,u;i&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return S(function(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,o(this._$ES);case 2:i.n=4;break;case 3:i.p=3,t=i.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){i.n=5;break}return i.n=5,o(e);case 5:return i.a(2,!this.isUpdatePending)}},null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,i=f(this._$Ep);!(t=i()).done;){var n=t.value,a=n[0],r=n[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=f(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],c=h.wrapped,m=this[d];!0!==c||this._$AL.has(d)||void 0===m||this.C(d,void 0,h,m)}}var v=!1,p=this._$AL;try{var g;(v=this.shouldUpdate(p))?(this.willUpdate(p),null!==(g=this._$EO)&&void 0!==g&&g.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(p)):this._$EM()}catch(p){throw v=!1,this._$EM(),p}v&&this._$AE(p)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=it){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var i=Symbol(),n=this.getPropertyDescriptor(e,i,t);void 0!==n&&He(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Ge(this.prototype,e))&&void 0!==n?n:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var n=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:it}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Ze("elementProperties"))){var e=Xe(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Ze("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ze("properties")))for(var e=this.properties,t=0,i=[...Ve(e),...Ke(e)];t<i.length;t++){var n=i[t];this.createProperty(n,e[n])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=f(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var h,c=f(this.elementProperties);!(h=c()).done;){var m=h.value,v=m[0],p=m[1],g=this._$Eu(v,p);void 0!==g&&this._$Eh.set(g,v)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var i,n=f(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(ze(a))}else void 0!==e&&t.push(ze(e));return t}},{key:"_$Eu",value:function(e,t){var i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}}])}();nt.elementStyles=[],nt.shadowRootOptions={mode:"open"},nt[Ze("elementProperties")]=new Map,nt[Ze("finalized")]=new Map,null!=Qe&&Qe({ReactiveElement:nt}),(null!==(Le=Ye.reactiveElementVersions)&&void 0!==Le?Le:Ye.reactiveElementVersions=[]).push("2.1.2");var at={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:tt},rt=(e=at,t,i)=>{var n=i.kind,a=i.metadata,r=globalThis.litPropertyMetadata.get(a);if(void 0===r&&globalThis.litPropertyMetadata.set(a,r=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),"accessor"===n){var o=i.name;return{set(i){var n=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,n,e,!0,i)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===n){var s=i.name;return function(i){var n=this[s];t.call(this,i),this.requestUpdate(s,n,e,!0,i)}}throw Error("Unsupported decorator location: "+n)};function ot(e){return(t,i)=>"object"==typeof i?rt(e,t,i):((e,t,i)=>{var n=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),n?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function st(e){return ot(v({},e,{state:!0,attribute:!1}))}var ut=function(){function t(e,i,n){var a;return u(this,t),(a=s(this,t,[e,i,n])).host=null,a.defineDynamicStateProps(),a}return y(t,e.PaywallState),m(t,[{key:"hostConnected",value:function(){}},{key:"hostDisconnected",value:function(){this.subscribers.clear()}},{key:"onStateChanged",value:function(){this.defineDynamicStateProps(),this.host&&this.host.requestUpdate()}},{key:"defineDynamicStateProps",value:function(){Object.defineProperty(this.state,"tvQuality",{get:this.getTVQuality.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportWidth",{get:this.getViewportWidth.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportHeight",{get:this.getViewportHeight.bind(this),enumerable:!1,configurable:!0})}},{key:"getTVQuality",value:function(){var e,t;if("television"!==this.getFormFactor())return"";var i=window.devicePixelRatio||1,n=window.innerWidth||(null===(e=window.screen)||void 0===e?void 0:e.availWidth),a=window.innerHeight||(null===(t=window.screen)||void 0===t?void 0:t.availHeight);if(!n||!a)return"720p";var r=Math.max(n,a)*i,o=Math.min(n,a)*i;return r>=3840||o>=2160?"4K":r>=1920||o>=1080?"1080p":"720p"}},{key:"getViewportWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}},{key:"getViewportHeight",value:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}],[{key:"create",value:function(e,i,n){var a=new t(e,i,n);return this.providers.push(a),a}},{key:"remove",value:function(t){e.PaywallState.remove(t)}},{key:"currentProvider",get:function(){return this.providers[0]}}])}();var lt=e=>{var t;return S(function(i){for(;;)if(0===i.n)return t=new Set(Array.from(document.fonts.values()).map(e=>e.family)),e.forEach(e=>{var i=dt(e);if(!t.has(i)){var n=new FontFace(i,`url(${e.file})`);document.fonts.add(n)}}),i.a(2,document.fonts.ready.then())},null,null,null,Promise)};function dt(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function ht(t,i,n){var a,r,o,s,u,l,d,h;if("undefined"==typeof window||!t||!i)return e.logger.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var c={minDistance:null!==(a=null==n?void 0:n.minDistance)&&void 0!==a?a:30,maxDuration:null!==(r=null==n?void 0:n.maxDuration)&&void 0!==r?r:600,lockAxis:null===(o=null==n?void 0:n.lockAxis)||void 0===o||o,preventScrollOnSwipe:null!==(s=null==n?void 0:n.preventScrollOnSwipe)&&void 0!==s&&s,pointerTypes:null!==(u=null==n?void 0:n.pointerTypes)&&void 0!==u?u:["touch"],passiveListeners:null===(l=null==n?void 0:n.passiveListeners)||void 0===l||l,axisHint:null!==(d=null==n?void 0:n.axisHint)&&void 0!==d?d:"y",edgeLeakThreshold:null!==(h=null==n?void 0:n.edgeLeakThreshold)&&void 0!==h?h:24},m=t.style.touchAction;c.preventScrollOnSwipe&&(t.style.touchAction="none");var f=null,v=0,p=0,g=0,y=0,b=0,w=null,k=null,S=!1,E=!1,T=!1,P=e=>{try{var t=window.getComputedStyle(e);if(!t)return!1;var i=t.overflowY;if("auto"!==i&&"scroll"!==i)return!1;var n=e;return n.scrollHeight>n.clientHeight}catch(e){return!1}},M=e=>c.pointerTypes.includes(e.pointerType),A=e=>{var i=e.composedPath?e.composedPath()[0]:e.target;if(M(e)&&null===f){f=e.pointerId,v=g=e.clientX,p=y=e.clientY,b=performance.now(),w=null,T=!1,S=!1,E=!1,(k="y"===c.axisHint?((e,t)=>{for(var i=e;i&&i!==t&&i instanceof HTMLElement;){var n,a;if(P(i))return i;i=i.parentElement||(null!==(n=null===(a=i.parentNode)||void 0===a?void 0:a.host)&&void 0!==n?n:null)}return null})(i,t):null)||(E=!0);try{var n;null==t||null===(n=t.setPointerCapture)||void 0===n||n.call(t,e.pointerId)}catch(t){try{var a;null==i||null===(a=i.setPointerCapture)||void 0===a||a.call(i,e.pointerId)}catch(e){}}}},D=e=>{if(e.pointerId===f&&M(e)){if(g=e.clientX,y=e.clientY,c.lockAxis&&!w){var t=Math.abs(g-v),n=Math.abs(y-p);(t>2||n>2)&&(w=n>=t?"y":"x")}if("y"===c.axisHint&&("y"===w||!c.lockAxis)){var a=y-p,r=a<0?"up":"down",o=Math.abs(a),s=performance.now()-b,u=o/Math.max(s,1),l=o>=c.minDistance||u>.5;if(k)if(l)E=!0;else if(((e,t)=>!!e&&("down"===t?e.scrollTop>0:e.scrollTop+e.clientHeight<e.scrollHeight-1))(k,r)){if(!(("down"===r&&k.scrollTop<=50||"up"===r&&k.scrollTop+k.clientHeight>=k.scrollHeight-50)&&u>.3))return void(S=!0);E=!0}else E=!0;var d=!k||o>=c.edgeLeakThreshold;if(!T&&!S&&E&&d&&o>=c.minDistance){T=!0;var h=performance.now(),m={direction:"up"===r?"up":"down",distanceX:g-v,distanceY:a,absX:Math.abs(g-v),absY:o,duration:h-b,velocity:o/Math.max(h-b,1),startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:h,originalEvent:e};i(m)}}}},x=e=>{if(e.pointerId===f)if(M(e))if(k)C();else if(T||S)C();else{var t,n=performance.now(),a=n-b,r=g-v,o=y-p,s=Math.abs(r),u=Math.abs(o),l="x"===(t=c.lockAxis&&w?w:"x"===c.axisHint?"x":"y"===c.axisHint?"y":s>=u?"x":"y")?s:u,d=a<=c.maxDuration,h=c.minDistance;if(k&&"y"===t&&E&&(h+=c.edgeLeakThreshold),d&&l>=h){var m;m="x"===t?r>0?"right":"left":o>0?"down":"up";var P=l/Math.max(a,1);i({direction:m,distanceX:r,distanceY:o,absX:s,absY:u,duration:a,velocity:P,startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:n,originalEvent:e})}C()}else C()},C=()=>{f=null,w=null,b=0,k=null,E=!1,S=!1,T=!1},I=!!c.passiveListeners&&{passive:!0},L=c.passiveListeners?{passive:!0,capture:!0}:{capture:!0};t.addEventListener("pointerdown",A,L),t.addEventListener("pointermove",D,I),t.addEventListener("pointerup",x,I),t.addEventListener("pointercancel",x,I),t.addEventListener("lostpointercapture",x,I);return{destroy:()=>{t.removeEventListener("pointerdown",A,L),t.removeEventListener("pointermove",D,I),t.removeEventListener("pointerup",x,I),t.removeEventListener("pointercancel",x,I),t.removeEventListener("lostpointercapture",x,I),c.preventScrollOnSwipe&&(t.style.touchAction=m),C()},updateOptions:e=>{Object.assign(c,e),"boolean"==typeof e.preventScrollOnSwipe&&(e.preventScrollOnSwipe?t.style.touchAction="none":t.style.touchAction=m)}}}var ct={},mt=ct.NAMI_CLOSE_PAYWALL,ft=void 0===mt?"namiClosePaywall":mt,vt=ct.NAMI_RESTORE_PURCHASES,pt=void 0===vt?"namiRestorePurchases":vt,gt=ct.NAMI_SIGN_IN,yt=void 0===gt?"namiSignIn":gt,bt=ct.NAMI_BUY_SKU,wt=void 0===bt?"namiBuySKU":bt,kt=ct.SET_STATE,St=void 0===kt?"setState":kt,Et=ct.NAMI_SELECT_SKU,Tt=void 0===Et?"namiSelectSKU":Et,Pt=ct.NAMI_PURCHASE_SELECTED_SKU,Mt=void 0===Pt?"namiPurchaseSelectedSKU":Pt,At=ct.NAMI_DEEP_LINK,Dt=void 0===At?"namiDeeplink":At,xt=ct.NAMI_NAVIGATE_TO_SCREEN,Ct=void 0===xt?"namiNavigateToScreen":xt,It=ct.NAMI_RELOAD_PRODUCTS,Lt=void 0===It?"namiReloadProducts":It,_t=ct.NAMI_PLAY_VIDEO,Rt=void 0===_t?"namiPlayVideo":_t,Ft=ct.NAMI_PAUSE_VIDEO,Ot=void 0===Ft?"namiPauseVideo":Ft,Wt=ct.NAMI_MUTE_VIDEO,$t=void 0===Wt?"namiMuteVideo":Wt,Nt=ct.NAMI_UNMUTE_VIDEO,jt=void 0===Nt?"namiUnmuteVideo":Nt,Bt=e=>"subscription"===e;function zt(e){if(Bt(null==e?void 0:e.product_type)){var t=Ht(e);if(t.length>0)return t[0].billingPeriod}return null}function Ut(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return Gt(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Ht(e){return e?Gt(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function Gt(e,t){return e.map(e=>Vt(e,t))}function Vt(e,t){var i,n,a,r,o,s,u,l;if(!e)return{};var d=null!==(i=null===(n=e.promo_period)||void 0===n?void 0:n.count)&&void 0!==i?i:null==t?void 0:t.count,h=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,c=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:Yt(m).format(c)}}function Kt(t,i=!1,n=!1,a=!1,r=!1){if(!t)return null;var o=t.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!o)return null;var s=o.slice(1).map(e=>parseInt(e)),u=s[0],l=s[1],d=s[2],h=s[3],c=(t,i,n,a,o)=>{var s=(e=>r?`${e}_abbrev`:e)(o),u=(e=>r?`${e}_abbrev_plural`:`${e}_plural`)(o),l=e.getTranslate(s),d=e.getTranslate(u);return r||l!==s||(l=e.getTranslate(`${o}_abbrev`)),r||d!==u||(d=e.getTranslate(`${o}_abbrev_plural`)),a?t.toString():n?1===t||i?l:d:1===t||i?`${t} ${l}`:`${t} ${d}`};switch(t.at(-1)){case"D":return c(h,i,n,a,"nami_day");case"W":return c(d,i,n,a,"nami_week");case"M":return c(l,i,n,a,"nami_month");case"Y":return c(u,i,n,a,"nami_year")}return null}function Xt(e){var t;if(!e||e.length<2)return!1;var i=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===i||"Y"===i}function Yt(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,v({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,v({},t,{style:"currency",currency:"USD"}))}}var qt=(e,t,i)=>e&&t&&i?i.format(e-t):null,Jt=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Qt=(e,t)=>{if(""!=t){var i=parseInt(t)-1;return i>=0&&i<(null==e?void 0:e.length)?e[i]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},Zt=e=>ti(e.priceAmountMicros)/ei(e.billingPeriod),ei=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},ti=e=>e/1e6;function ii(e){return parseFloat((Math.round(e)/100).toFixed(2))}var ni=(t,i,n=[])=>({price:()=>ri(t),name:()=>null==t?void 0:t.name,title:()=>null==t?void 0:t.name,description:()=>null==t?void 0:t.description,duration:()=>oi(t),durationSingular:()=>oi(t,!0),period:()=>oi(t,!1,!0),periodNumber:()=>oi(t,!1,!1,!0),freeTrialDuration:()=>si(t),freeTrialDurationSingular:()=>si(t,!0),freeTrialPeriod:()=>si(t,!1,!0),freeTrialPeriodNumber:()=>si(t,!1,!1,!0),pricePerMonth:()=>ui(t),pricePerMonthRounded:()=>ui(t,!0),periodInMonths:()=>li(t),durationInMonths:()=>di(t),durationInMonthsSingular:()=>di(t,!0),periodNumberInMonths:()=>hi(t),percentagePriceDifferenceFromSku:()=>ci(t,i,n),priceDifferenceFromSku:()=>mi(t,i,n),promoEligible:()=>null===fi(t)&&null!==vi(t,i),freeTrialEligible:()=>null!==fi(t),promo:()=>{var e;return null===(e=vi(t,i))||void 0===e?void 0:e.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var e;return null===(e=pi(t,i))||void 0===e?void 0:e.formattedPrice},promoPeriod:()=>gi(t,i,!1,!0),promoPeriodNumber:()=>gi(t,i,!1,!1,!0),promoDuration:()=>gi(t,i),promoDurationSingular:()=>gi(t,i,!0),introEligible:()=>!1,pricePerDay:()=>Si(t),pricePerWeek:()=>Ei(t),pricePerWeekRounded:()=>Ei(t,!0),introductoryPrice:()=>wi(t,i),introductoryPeriod:()=>bi(t,i,!1,!0),introductoryPeriodNumber:()=>bi(t,i,!1,!1,!0),introductoryDuration:()=>bi(t,i),introductoryDurationSingular:()=>bi(t,i,!0),introductoryPricePerMonth:()=>ki(t,i),introductoryPricePerMonthRounded:()=>ki(t,i,!0),durationAbbrev:()=>oi(t,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>si(t,!1,!1,!1,!0),introductoryDurationAbbrev:()=>bi(t,i,!1,!1,!1,!0),promoDurationAbbrev:()=>gi(t,i,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>gi(t,i,!0,!0,!1,!0),durationInMonthsAbbrev:()=>di(t,!1,!1,!1,!0),durationSingularAbbrev:()=>oi(t,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>si(t,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>bi(t,i,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>gi(t,i,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>gi(t,i,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>di(t,!0,!1,!1,!0),periodAbbrev:()=>oi(t,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>si(t,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>bi(t,i,!1,!0,!1,!0),promoPeriodAbbrev:()=>gi(t,i,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>gi(t,i,!1,!0,!0,!0),periodInMonthsAbbrev:()=>di(t,!1,!0,!1,!0),periodly:()=>function(t){if(!t)return null;var i=t.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!i)return null;var n=i[1],a=i[2],r=i[3],o=i[4],s=void 0!==n?parseInt(n,10):0,u=void 0!==a?parseInt(a,10):0,l=void 0!==r?parseInt(r,10):0;return(void 0!==o?parseInt(o,10):0)>0?null:l>0?1===l?e.getTranslate("nami_weekly"):2===l?e.getTranslate("nami_biweekly"):null:u>0?1===u?e.getTranslate("nami_monthly"):2===u?e.getTranslate("nami_bimonthly"):3===u?e.getTranslate("nami_quarterly"):6===u?e.getTranslate("nami_biannually"):12===u?e.getTranslate("nami_yearly"):e.getTranslate("nami_monthly"):s>0?e.getTranslate("nami_yearly"):null}(zt(t)),iso_subscription_duration:()=>Ti(t),invalid:()=>!1,unavailable:()=>!1}),ai=(e,t,i,n=[])=>{if(!t)return null;var a=ni(t,i,n);return a[e]?a[e]():null},ri=e=>{var t=Ht(e);return t&&t.length?t[0].formattedPrice:null},oi=(e,t,i,n,a)=>Kt(zt(e),t,i,n,a),si=(e,t,i,n,a)=>Kt(Ut(e),t,i,n,a),ui=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n=Zt(i[0]);return n?Yt(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},li=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Xt(n)?Kt("P1Y"===n?"P12M":n,!1,!1,!1,t):null},di=(e,t,i,n,a)=>{var r=Ht(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Xt(o)?Kt("P1Y"===o?"P12M":o,t,i,n,a):null},hi=e=>{if(!e)return 0;var t=Ht(e);return t&&t.length?ei(t[0].billingPeriod):0},ci=(e,t,i=[])=>{var n,a=Ht(e);if(!a||0===a.length)return null;var r=null===(n=Qt(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Jt(ii(a[0].priceAmountMicros),hi(e));var o=Ht(r);return Jt(ii(a[0].priceAmountMicros),hi(e),(null==o?void 0:o.length)>0?ii(o[0].priceAmountMicros):0,hi(r))},mi=(e,t,i=[])=>{var n,a=Ht(e);if(!a||0===a.length)return null;var r=null===(n=Qt(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return qt(Zt(a[0]));var o=Ht(r);return qt(Zt(a[0]),Zt(o[0]),Yt(o[0].priceCurrencyCode))},fi=e=>Ut(e),vi=(e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null},pi=(e,t)=>{if(!e)return null;var i=vi(e,t);return i?Vt(i,e.subscription_period):null},gi=(e,t,i,n,a,r)=>{var o=pi(e,t);return Kt((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},yi=(e,t)=>{if(!e)return null;var i=((e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"intro"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null})(e,t);return i?Vt(i,e.subscription_period):null},bi=(e,t,i,n,a,r)=>{var o=yi(e,t);return Kt((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},wi=(e,t)=>{var i=yi(e,t);return i?i.formattedPrice:null},ki=(e,t,i)=>{var n=yi(e,t);if(!n)return null;var a=Zt(n);return a?Yt(n.priceCurrencyCode).format(i?Math.round(a):a):null},Si=e=>{var t=Ht(e);if(!t||0===t.length)return null;var i,n,a=ti(t[0].priceAmountMicros)/(i=t[0].billingPeriod,(n=ei(i))?30.437*n:1);return Yt(t[0].priceCurrencyCode).format(a)},Ei=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n,a,r=ti(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=ei(n))?52*a/12:1);return Yt(i[0].priceCurrencyCode).format(t?Math.round(r):r)},Ti=e=>{var t=Ht(e)[0];return t?t.billingPeriod:null},Pi="object"==typeof global&&global&&global.Object===Object&&global,Mi="object"==typeof self&&self&&self.Object===Object&&self,Ai=Pi||Mi||Function("return this")(),Di=Ai.Symbol;var xi=Array.isArray,Ci=Object.prototype,Ii=Ci.hasOwnProperty,Li=Ci.toString,_i=Di?Di.toStringTag:void 0;var Ri=Object.prototype.toString;var Fi=Di?Di.toStringTag:void 0;function Oi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Fi&&Fi in Object(e)?function(e){var t=Ii.call(e,_i),i=e[_i];try{e[_i]=void 0;var n=!0}catch(e){}var a=Li.call(e);return n&&(t?e[_i]=i:delete e[_i]),a}(e):function(e){return Ri.call(e)}(e)}function Wi(e){return null!=e&&"object"==typeof e}var $i=Di?Di.prototype:void 0,Ni=$i?$i.toString:void 0;function ji(e){if("string"==typeof e)return e;if(xi(e))return function(e,t){for(var i=-1,n=null==e?0:e.length,a=Array(n);++i<n;)a[i]=t(e[i],i,e);return a}(e,ji)+"";if(function(e){return"symbol"==typeof e||Wi(e)&&"[object Symbol]"==Oi(e)}(e))return Ni?Ni.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bi(e){return null==e?"":ji(e)}function zi(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:function(e,t,i){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(i=i>a?a:i)<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(a);++n<a;)r[n]=e[n+t];return r}(e,t,i)}var Ui=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Hi(e){return Ui.test(e)}var Gi="\\ud800-\\udfff",Vi="["+Gi+"]",Ki="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xi="\\ud83c[\\udffb-\\udfff]",Yi="[^"+Gi+"]",qi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ji="[\\ud800-\\udbff][\\udc00-\\udfff]",Qi="(?:"+Ki+"|"+Xi+")"+"?",Zi="[\\ufe0e\\ufe0f]?",en=Zi+Qi+("(?:\\u200d(?:"+[Yi,qi,Ji].join("|")+")"+Zi+Qi+")*"),tn="(?:"+[Yi+Ki+"?",Ki,qi,Ji,Vi].join("|")+")",nn=RegExp(Xi+"(?="+Xi+")|"+tn+en,"g");function an(e){return Hi(e)?function(e){return e.match(nn)||[]}(e):function(e){return e.split("")}(e)}var rn,on=(rn="toUpperCase",function(e){var t=Hi(e=Bi(e))?an(e):void 0,i=t?t[0]:e.charAt(0),n=t?zi(t,1).join(""):e.slice(1);return i[rn]()+n});var sn,un=(sn={À:"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==sn?void 0:sn[e]}),ln=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var hn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var cn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var mn="\\ud800-\\udfff",fn="\\u2700-\\u27bf",vn="a-z\\xdf-\\xf6\\xf8-\\xff",pn="A-Z\\xc0-\\xd6\\xd8-\\xde",gn="\\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",yn="["+gn+"]",bn="\\d+",wn="["+fn+"]",kn="["+vn+"]",Sn="[^"+mn+gn+bn+fn+vn+pn+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",Tn="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+pn+"]",Mn="(?:"+kn+"|"+Sn+")",An="(?:"+Pn+"|"+Sn+")",Dn="(?:['’](?:d|ll|m|re|s|t|ve))?",xn="(?:['’](?:D|LL|M|RE|S|T|VE))?",Cn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",In="[\\ufe0e\\ufe0f]?",Ln=In+Cn+("(?:\\u200d(?:"+["[^"+mn+"]",En,Tn].join("|")+")"+In+Cn+")*"),_n="(?:"+[wn,En,Tn].join("|")+")"+Ln,Rn=RegExp([Pn+"?"+kn+"+"+Dn+"(?="+[yn,Pn,"$"].join("|")+")",An+"+"+xn+"(?="+[yn,Pn+Mn,"$"].join("|")+")",Pn+"?"+Mn+"+"+Dn,Pn+"+"+xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bn,_n].join("|"),"g");function Fn(e,t,i){return e=Bi(e),void 0===t?function(e){return cn.test(e)}(e)?function(e){return e.match(Rn)||[]}(e):function(e){return e.match(hn)||[]}(e):e.match(t)||[]}var On=RegExp("['’]","g");var Wn,$n=(Wn=function(e,t,i){return t=t.toLowerCase(),e+(i?on(Bi(t).toLowerCase()):t)},function(e){return function(e,t,i){for(var n=-1,a=null==e?0:e.length;++n<a;)i=t(i,e[n],n,e);return i}(Fn(function(e){return(e=Bi(e))&&e.replace(ln,un).replace(dn,"")}(e).replace(On,"")),Wn,"")});function Nn(e,t,i){var n,a,r=null!==(n=null===(a=t.find(e=>e.id===i))||void 0===a?void 0:a.products)&&void 0!==n?n:[];return r.forEach(t=>{t.product_details=Un(e,t.sku_ref_id||""),t.variables=function(e,t,i){if(!t)return{};var n=function(e){if(!Array.isArray(e))return e;var t=e.filter(e=>e&&"object"==typeof e&&"entitlement_ref_id"in e).map(e=>e.entitlement_ref_id);return t.length?t:e}(t.entitlements),a=t.variables;if(!a)return v({},t,{entitlements:n});Object.keys(a).forEach(t=>{if(jn(a[t])){var n=zn(a[t],e,i);a[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(n)}});var r={};return(()=>Object.keys(ni({})))().forEach(t=>{if(void 0===a[t]){var n=ai(t,e,void 0,i);null!==n&&(r[t]=n)}}),v({},t,r,a,{entitlements:n})}(t.product_details,t,r)}),r}function jn(t){return"string"==typeof t&&t.includes(e.SMART_TEXT_PATTERN)}function Bn(e,t,i){return t?(Object.keys(t).forEach(n=>{jn(t[n])&&(t[n]=t[$n(n)]=zn(t[n],e,i))}),v({},t)):{}}var zn=(t,i,n)=>t.replace(e.SKU_TEXT_REGEX,(a,r)=>{var o,s,u,l,d=(null===(o=e.SKU_TEXT_REGEX.exec(t))||void 0===o?void 0:o.slice(1))||[];r=null!==(s=d[0])&&void 0!==s?s:r;var h=null!==(u=null===(l=d[1])||void 0===l?void 0:l.replace(":",""))&&void 0!==u?u:"";return ai(r,i,h,n)});function Un(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Hn,Gn=["conditionAttributes"];function Vn(e,t){return Array.isArray(e)?e.reduce((e,i)=>{var n=Vn(i,t);return Array.isArray(n)?[...e,...n]:[...e,n]},[]):null==e?e:"object"==typeof e?Object.entries(e).reduce((e,[i,n])=>{var a="newRow"===i?n:Vn(n,t);return v({},e,{[i]:a})},{}):"string"==typeof e?na(e,t):e}function Kn(e){for(var t,i=f(e);!(t=i()).done;){var n=t.value;if("button"===n.component)return n.focused=!0,!0;if(Array.isArray(n.components)&&Kn(n.components))return!0}return!1}function Xn(t,i,n,a={}){var r=n.productBaseComponents||n.components||[],o=n.productFeaturedComponents||r,s="television"===t.state.formFactor;return i.map(i=>{var n,u,l,d=i.featured?o:r,h=i.entitlements.map(e=>e.entitlement_ref_id),c=Un(t.productDetails,i.sku_ref_id),m={freeTrialEligible:1==ai("freeTrialEligible",c),introEligible:1==ai("introEligible",c),promoEligible:1==ai("promoEligible",c),invalid:ai("invalid",c),unavailable:ai("unavailable",c)},p=v({},i,i.variables,m,{id:i.id,entitlements:h});u=i,l=t=>{for(var i,n=f(t);!(i=n()).done;){var a=i.value;a.sku=e.toNamiSKU(u),a.components&&l(a.components),a.collapseHeader&&a.collapseHeader.components&&l(a.collapseHeader.components)}},l(d);var g={sku:p,media:ia(a,{convertToUrl:!0})},y=Vn(d,Vn(g,g));return function(e,t){var i=e=>{for(var n,a=f(e);!(n=a()).done;){var r,o=n.value;o&&"object"==typeof o&&(Object.defineProperty(o,"__skuContext",{value:t,enumerable:!1,writable:!0,configurable:!0}),Array.isArray(o.components)&&i(o.components),Array.isArray(o.conditionAttributes)&&i(o.conditionAttributes),null!==(r=o.collapseHeader)&&void 0!==r&&r.components&&i(o.collapseHeader.components))}};i(e)}(y,p),s&&i.featured&&Kn(y),[null!==(n=i.featured)&&void 0!==n&&n,y]},[])}function Yn(t,i){var n;if(!i.loopSource)return[];var a=e.resolveLoopSource(i.loopSource),r=(null!=a?a:[]).filter(e=>{var n;return!(null!==(n=i.loopSourceConditions)&&void 0!==n&&n.length)||i.loopSourceConditions.every(i=>ta(t,i,e))}),o=i.groupBy,s=i.groupHeaderTemplate,u=e=>Vn(i.components,Vn({block:e},{block:e})),l=(null!==(n=i.slots)&&void 0!==n?n:[]).filter(e=>{var i;return!(null!==(i=e.conditions)&&void 0!==i&&i.length)||e.conditions.every(e=>ta(t,e,null))}),d=e=>[null!=e.columnSpan?v({},e.template,{__namiSlotColumnSpan:e.columnSpan}):e.template],h=l.filter(e=>"listStart"===e.position).map(d),c=l.filter(e=>"listEnd"===e.position).map(d);if(!o||!s){"number"==typeof i.max&&(r=r.slice(0,i.max));var m=r.map(u).filter(e=>null!=e);return[{key:"",header:null,items:[...h,...m,...c]}]}for(var p,g=[],y=new Map,b=f(r);!(p=b()).done;){var w=p.value,k=Vn(o,Vn({block:w},{block:w})),S=null==k?"":String(k);y.has(S)||(g.push(S),y.set(S,[])),y.get(S).push(w)}for(var E,T=e=>{var i,n=g.filter(i=>((e,i)=>{var n,a,r=null!==(n=null===(a=e.group)||void 0===a?void 0:a.itemConditions)&&void 0!==n?n:[];return r.length?i.some(e=>r.every(i=>ta(t,i,e))):i.length>0})(e,y.get(i)));return"last"===(null===(i=e.group)||void 0===i?void 0:i.ordinal)?n[n.length-1]:n[0]},P=new Map,M=new Map,A=f(l);!(E=A()).done;){var D=E.value,x="groupStart"===D.position?P:"groupEnd"===D.position?M:null;if(x){var C=T(D);null!=C&&(x.has(C)||x.set(C,[]),x.get(C).push(d(D)))}}var I=g.map(e=>{var t,n,a={key:e},r=Vn(s,Vn({group:a},{group:a})),o=y.get(e);return"number"==typeof i.groupMax&&(o=o.slice(0,i.groupMax)),{key:e,header:[r],items:[...null!==(t=P.get(e))&&void 0!==t?t:[],...o.map(u),...null!==(n=M.get(e))&&void 0!==n?n:[]]}});return[...h.length?[{key:"",header:null,items:h}]:[],...I,...c.length?[{key:"",header:null,items:c}]:[]]}function qn(e,t,i){var n=(t,n)=>ta(e,t,n,i);return t.assertions?t.assertions.every(n):!!t.orAssertions&&(!t.orAssertions.length||t.orAssertions.some(n))}function Jn(e,t,i){var n=t.conditionAttributes,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(t,Gn);if(!n)return a;var r=null!=i?i:a.__skuContext;return n.reduce((t,i)=>{if(!qn(e,i,r))return t;var n={};return Object.entries(i.attributes).forEach(([t,i])=>{n[t]=Zn(e,i,r)}),v({},t,n)},a)}function Qn(){if(!Hn){var t=e.getDeviceData(),i=t.browser_name,n=t.browser_version;Hn={browser:i,browserVersion:n}}return Hn}function Zn(t,i,n,a=null){var r,o=null!==(r=null==t?void 0:t.flow)&&void 0!==r?r:{},s=o.manager,u=o.previousStepAvailable,l=o.nextStepAvailable,d=t.state,h=e.getUrlParams(),c={isLaunched:!(null==s||!s.flowOpen),previousStepAvailable:!!u,nextStepAvailable:!!l},m={};if(a&&(m={block:a}),m=v({},m,{state:d,urlParams:h,flow:c,launch:d.launch,sku:n||d.sku,customer:d.customer,device:Qn(),platform:{id:d.platformId}}),"string"==typeof i){var f=function(t,i){if(!t.includes(ea))return;var n=t.trim();if(!n.startsWith(ea)||!n.endsWith(")"))return;var a=n.slice(ea.length,-1).split(",");if(2!==a.length)return;var r=a.map(t=>{var n=t.trim(),a=Number(n.includes(e.SMART_TEXT_PATTERN)?i(n):n);return Number.isFinite(a)?a:0}),o=r[0],s=r[1];return Math.max(o,s)}(i,e=>na(e,m));if(void 0!==f)return f}return"string"==typeof i&&i.includes(e.SMART_TEXT_PATTERN)&&(i=na(i,m)),i}var ea="max(";function ta(t,{value:i,expected:n,operator:a},r,o){var s=e.evaluateSystemTimeCondition({value:i,operator:a,expected:n},t.state);if(null!==s)return s;if(i=Zn(t,i,o,r),n=Zn(t,n,o,r),"equals"===a)return i===n;if("notEquals"===a)return i!==n;if("contains"===a){var u;if(Array.isArray(i)||"string"==typeof i||i instanceof String||(i=i.toString()),"collapse"==n)n+="_"+(null===(u=t.getCurrentCollapsibleSku())||void 0===u?void 0:u.skuId);return i.includes(n)}if("notContains"===a)return Array.isArray(i)||"string"==typeof i||i instanceof String||(i=i.toString()),!i.includes(n);if("set"===a){var l=null!=i&&""!==i&&!i.toString().match(e.LIQUID_VARIABLE_REGEX);return"boolean"==typeof n?l===n:l}return"notSet"===a?null==i||""===i||!!i.toString().match(e.LIQUID_VARIABLE_REGEX):"gt"===a?i>n:"gte"===a?i>=n:"lt"===a?i<n:"lte"===a&&i<=n}function ia(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce((e,[i,{content:n}])=>(t&&"string"!=typeof n&&n&&(n=URL.createObjectURL(n)),v({},e,{[i]:n})),{})}function na(t,i){var n=t;if("string"!=typeof t)return n;for(var a,r=new RegExp(e.VAR_REGEX.source,e.VAR_REGEX.flags),o=[];null!==(a=r.exec(t))&&(o.push(a),r.global);)a.index===r.lastIndex&&r.lastIndex++;for(var s=0,u=o;s<u.length;s++){var l=u[s],d=l[0],h=l[1],c=na(h,i);if(d===t)return m(d,c);c!==h&&(n=n.replace(h,c)),n=n.replace(e.VAR_REGEX,m)}return n;function m(e,t){var n=String(t).split("."),a=n[0];if(!a)return e;var r=aa(i,a);if(void 0===r)return e;if("object"==typeof r&&null!==r&&0===Object.keys(r).length)return"";var o=aa(i,...n);return void 0===o?"":"string"!=typeof o?o:na(o,i)}}function aa(e,...t){for(var i=e,n=0,a=t;n<a.length;n++){var r=a[n];if(null==i)return;i=Array.isArray(i)?i[+r]:i[r]}return i}var ra=e=>{var t=e.state.timeSpentOnPaywall;if(t)return Date.now()-t},oa=e=>{if(!e)return null;if(e.includes("#"))return e;var t=e.match(/[\d.]+/g);if(!t||t.length<3)return null;var i=t.map(Number),n=i[0],a=i[1],r=i[2],o=i[3],s=e=>Math.round(e).toString(16).padStart(2,"0"),u=void 0!==o&&o<1?s(255*o):"";return`#${s(n)}${s(a)}${s(r)}${u}`},sa=(e,t)=>{if(!e||!t)return!0;var i=null!=e&&e.includes("rgb")?oa(e):e,n=null!=t&&t.includes("rgb")?oa(t):t;return(null==i?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())};function ua(e){var t,i,n,a,r,o,s,u,l,d,h,c,m;return{width:null!==(t=e.width)&&void 0!==t?t:20,railSpacing:null!==(i=e.railSpacing)&&void 0!==i?i:12,dotLineSpacing:null!==(n=e.dotLineSpacing)&&void 0!==n?n:10,lineTopOffset:null!==(a=e.lineTopOffset)&&void 0!==a?a:0,lineBottomOffset:null!==(r=e.lineBottomOffset)&&void 0!==r?r:0,lineWidth:null!==(o=e.lineWidth)&&void 0!==o?o:1,lineColor:null!==(s=e.lineColor)&&void 0!==s?s:"#C6CBD7",lineCornerRadius:null!==(u=e.lineCornerRadius)&&void 0!==u?u:0,dotSize:null!==(l=e.dotSize)&&void 0!==l?l:6,dotColor:null!==(d=e.dotColor)&&void 0!==d?d:"#C6CBD7",dotCornerRadius:null!==(h=e.dotCornerRadius)&&void 0!==h?h:3,dotBorderWidth:null!==(c=e.dotBorderWidth)&&void 0!==c?c:0,dotBorderColor:null!==(m=e.dotBorderColor)&&void 0!==m?m:"transparent",conditionAttributes:e.conditionAttributes}}function la(e,t,i){for(var n,a=ua(t),r={key:i},o=Vn(t,Vn({group:r},{group:r})),s={dotSize:a.dotSize,dotColor:a.dotColor,dotCornerRadius:a.dotCornerRadius,dotBorderWidth:a.dotBorderWidth,dotBorderColor:a.dotBorderColor},u=f(null!==(l=o.conditionAttributes)&&void 0!==l?l:[]);!(n=u()).done;){var l,d,h=n.value;if(qn(e,h)){var c=null!==(d=h.attributes)&&void 0!==d?d:{};s={dotSize:"number"==typeof c.dotSize?c.dotSize:s.dotSize,dotColor:"string"==typeof c.dotColor?c.dotColor:s.dotColor,dotCornerRadius:"number"==typeof c.dotCornerRadius?c.dotCornerRadius:s.dotCornerRadius,dotBorderWidth:"number"==typeof c.dotBorderWidth?c.dotBorderWidth:s.dotBorderWidth,dotBorderColor:"string"==typeof c.dotBorderColor?c.dotBorderColor:s.dotBorderColor}}}return s.dotCornerRadius=Math.min(s.dotCornerRadius,s.dotSize/2),s}var da=!0,ha=!1,ca=!1,ma=!1,fa=!1,va=!1,pa=null,ga=null,ya=null,ba=null,wa=!1,ka="",Sa=!1,Ea=null,Ta=null,Pa=null,Ma=null,Aa=null,Da=null,xa=null,Ca=null,Ia=!1,La=null,_a="",Ra=0,Fa=1,Oa=null,Wa=[],$a=new WeakMap,Na=new WeakMap,ja=1;function Ba(e){var t=Na.get(e);return t||(t=ja++,Na.set(e,t)),String(t)}var za=null,Ua=null,Ha=null,Ga=null;function Va(e){return!0===e||"true"===e||"1"===e||"yes"===e}function Ka(e,t){if(function(){if("undefined"==typeof window)return!1;try{var e,t;return!!Va(window.NAMI_TTS_DEBUG)||Va(null===(e=window.localStorage)||void 0===e?void 0:e.getItem("nami:tts:debug"))||Va(null===(t=window.localStorage)||void 0===t?void 0:t.getItem("NAMI_TTS_DEBUG"))}catch(e){return!1}}())try{t?console.debug(`[Nami TTS] ${e}`,t):console.debug(`[Nami TTS] ${e}`)}catch(e){}}function Xa(e="TTS is unavailable in this runtime."){ha||(ha=!0,Ka(e))}function Ya(e){if(!e)return"none";var t=e.id?`#${e.id}`:"",i=e.getAttribute("data-testid"),n=i?`[data-testid="${i}"]`:"";return`${e.tagName.toLowerCase()}${t}${n}`}function qa(e){return function(e){return null==e?"":String(e).replace(/[^.!?\n]*\$\{[^}]*subscribeUrl[^}]*\}[^.!?\n]*[.!?]?/gi,"To subscribe, follow the on-screen instructions.").replace(/\$\{[^}]+\}/g," ").replace(/\s+([.,!?;:])/g,"$1").replace(/\s+/g," ").trim()}(e)}function Ja(e){return e.toLowerCase().replace(/[^a-z0-9$]+/g," ").replace(/\s+/g," ").trim()}function Qa(e){return qa(String(null!=e?e:"").replace(/<[^>]*>/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*_`#>~]/g," "))}function Za(e,t){var i=qa(t);i&&e[e.length-1]!==i&&e.push(i)}function er(e,t=[]){var i=[];return[...e,...t].forEach(e=>{var t=function(e){var t=qa(e);if(!t)return[];for(var i=[],n=0,a=0;a<t.length;a+=1){var r=t.charAt(a),o=t.charAt(a+1);if(("."===r||"!"===r||"?"===r)&&(!o||/\s/.test(o))){var s=qa(t.slice(n,a+1));for(s&&i.push(s);a+1<t.length&&/\s/.test(t.charAt(a+1));)a+=1;n=a+1}}var u=qa(t.slice(n));u&&i.push(u);return i.length?i:[t]}(e);t.length||Za(i,e),t.forEach(e=>Za(i,e))}),i.slice(0,60)}function tr(e){return qa(e.join(". ").replace(/\.\s*([.!?])/g,"$1"))}function ir(e){var t,i=Oa;i&&(e&&i.id===e||(i.status="cancelled",(null===(t=Oa)||void 0===t?void 0:t.id)===i.id&&(Oa=null)))}function nr(){if("undefined"==typeof document)return null;for(var e=document.activeElement;e&&null!==(t=e.shadowRoot)&&void 0!==t&&t.activeElement;){var t,i,n;e=null!==(i=null===(n=e.shadowRoot)||void 0===n?void 0:n.activeElement)&&void 0!==i?i:e}return e}function ar(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function rr(e){for(var t=[],i=null!=e?e:null;i;){i instanceof Element&&-1===t.indexOf(i)&&t.push(i);var n=i.parentNode;i=ar(n)?n.host:n}return t}function or(e,t){return!!t&&-1!==rr(t).indexOf(e)}function sr(e,t){if(!t)return!1;if(t===e)return!0;if(e.contains(t))return!0;var i=e.shadowRoot;return!!i&&(i.activeElement===t||i.contains(t))}function ur(e,t){t&&-1===e.indexOf(t)&&e.push(t)}function lr(e,t){var i=t.shadowRoot;i&&i.querySelectorAll('button,[role="button"],a,input,select,textarea,[tabindex]:not([tabindex="-1"])').forEach(t=>ur(e,t))}function dr(e,t){var i,n=("function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():null!==(i=null==t?void 0:t.composedPath)&&void 0!==i?i:[]).filter(e=>e instanceof Element);return n.length?n:rr(e)}function hr(e,t=[],i={}){var n=[];if(i.focusedElementOnly)return ur(n,e),n;var a=(t.length?t:rr(e)).filter(e=>e.isConnected),r=function(e,t){var i,n=t.find(e=>e.matches("nami-product-container"));if(n)return n;var a=rr(e).find(e=>e.matches("nami-product-container"));if(a)return a;var r=ba&&"querySelectorAll"in ba?ba:"undefined"!=typeof document?document:null;return r&&null!==(i=Array.prototype.slice.call(r.querySelectorAll("nami-product-container")).find(t=>or(t,e)))&&void 0!==i?i:null}(e,a);return ur(n,e),lr(n,e),a.forEach(t=>{var i=!!r&&(t===r||or(r,t)),a=t!==e&&or(t,e),o=t.matches('nami-product-container,nami-button,[role="button"],button,[tabindex]:not([tabindex="-1"])');(i||a||t===e)&&o&&(ur(n,t),lr(n,t))}),null!=r&&r.isConnected&&(ur(n,r),lr(n,r)),n}function cr(e){return $a.has(e)}function mr(e,t,i=[]){var n=qa(t);if(!n)return!1;gr(),fr(void 0,"new-composite",!0);var a=hr(e,i,Lr()||Ir()?{focusedElementOnly:!1}:{focusedElementOnly:!0});return a.forEach(e=>function(e,t){var i=qa(t);return!!i&&($a.has(e)||$a.set(e,{"aria-label":e.getAttribute("aria-label")}),e.setAttribute("aria-label",i),!0)}(e,n)),Wa=a,!0}function fr(e,t="manual",i=!1){var n=e&&-1===Wa.indexOf(e)?hr(e):Wa;n.length&&(!i&&Oa&&n.some(e=>$a.has(e))?Ka("composite restore skipped: transaction still active",{reason:t}):(gr(),n.forEach(e=>{var t=$a.get(e);t&&(!function(e,t,i){null===i?e.removeAttribute(t):e.setAttribute(t,i)}(e,"aria-label",t["aria-label"]),$a.delete(e))}),e&&-1===Wa.indexOf(e)||(Wa=[])))}function vr(e,t){$a.has(e)&&(t instanceof Element&&sr(e,t)||(gr(),Pa=setTimeout(()=>{(Pa=null,e.isConnected)?sr(e,nr())||fr(e,"blur"):fr(e,"blur-disconnected",!0)},50)))}function pr(e){Wa.length&&fr(void 0,e,!0)}function gr(){Pa&&(clearTimeout(Pa),Pa=null)}function yr(){Ma&&(clearTimeout(Ma),Ma=null),za=null}function br(){Aa&&(clearTimeout(Aa),Aa=null)}function wr(){Da&&(clearTimeout(Da),Da=null)}function kr(){xa&&(clearTimeout(xa),xa=null)}function Sr(){Ca&&(clearTimeout(Ca),Ca=null)}function Er(e){Ia=!0,Sr(),Ca=setTimeout(()=>{Ca=null,Ia=!1},Pr(e)+500)}function Tr(){Sr(),Ia=!1}function Pr(e){var t=qa(e),i=350*(t?t.split(/\s+/).filter(Boolean).length:0);return Math.min(3e4,Math.max(4e3,i))}function Mr(){return"undefined"==typeof window?null:window}function Ar(){var e,t=null===(e=Mr())||void 0===e||null===(e=e.webOS)||void 0===e||null===(e=e.service)||void 0===e?void 0:e.request;return"function"==typeof t?t:null}function Dr(){return!!Ar()}function xr(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.VIZIO)||void 0===e?void 0:e.Chromevox;return t&&"function"==typeof t.play?t:null}function Cr(){return"undefined"!=typeof window&&void 0!==window.speechSynthesis&&"function"==typeof window.speechSynthesis.speak&&"function"==typeof window.SpeechSynthesisUtterance}function Ir(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!(!t.VIZIO&&-1===i.indexOf("vizio"))}function Lr(){var e,t;if("undefined"==typeof window)return!1;if(Ir())return!1;var i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"",n=Mr();return!!(null!=n&&n.webOS||null!=n&&n.webOSDev||null!=n&&n.PalmSystem||null!=n&&null!==(t=n.webOS)&&void 0!==t&&null!==(t=t.platform)&&void 0!==t&&t.tv||-1!==i.indexOf("webos")||-1!==i.indexOf("netcast"))}function _r(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!!(t.tizen||-1!==i.indexOf("tizen")||-1!==i.indexOf("samsung")&&(-1!==i.indexOf("smart-tv")||-1!==i.indexOf("smarttv"))||-1!==i.indexOf("samsungbrowser")&&-1!==i.indexOf("tv"))}function Rr(e){return"string"==typeof e&&-1!==e.toLowerCase().indexOf("xbox")}function Fr(){var e,t,i;if("undefined"==typeof window)return!1;if(!0===Ha)return!0;var n=window.navigator;return[n.userAgent,n.platform,n.vendor,null===(e=n.userAgentData)||void 0===e?void 0:e.platform,...(null!==(t=null===(i=n.userAgentData)||void 0===i?void 0:i.brands)&&void 0!==t?t:[]).map(e=>e.brand)].some(Rr)}function Or(){if("undefined"==typeof window)return!1;try{return"television"===e.getDeviceFormFactor()}catch(e){return!1}}function Wr(){if(fa)return!1;var e=xr();if(!e)return!1;try{return"function"!=typeof e.isEnabled||e.isEnabled()}catch(e){return!1}}function $r(){return{televisionRuntime:Or(),televisionTtsRuntime:Nr(),webos:Lr(),tizen:_r(),vizio:Ir(),xbox:Fr(),xboxClientHintsResult:Ha,hasWebOsServiceRequest:Dr(),webOsRequestType:typeof Ar(),hasWebSpeechApi:Cr(),webSpeechUnavailableForSession:ca,webOsLunaUnavailableForSession:ma,vizioChromevoxUnavailableForSession:fa}}function Nr(){return Or()||Lr()||Ir()||_r()}function jr(){return Nr()&&!ca&&Cr()}function Br(e){if(va=e,Ka("set media playing",{playing:e,hasDeferredUtterance:!!pa}),!e&&pa){var t,i=pa;if(pa=null,i.options.transactionId&&(null===(t=Oa)||void 0===t?void 0:t.id)!==i.options.transactionId)return void Ka("drop stale deferred speech",{transactionId:i.options.transactionId,reason:i.options.reason});ro(i.text,i.options)}}function zr(e){ca=!0,Xa(Lr()?"Web Speech TTS unavailable in this webOS runtime":"Web Speech TTS unavailable in this runtime"),Ka("web speech unavailable",{error:e})}function Ur(e){ma=!0,Ka("webOS Luna unavailable",{error:e})}function Hr(e,t){pa={text:e,options:t}}var Gr={name:"webos-luna-tts",platform:"webos",isAvailable:function(){return Nr()&&!Ir()&&!ma&&Dr()},speak:function(e,t){Ka("speakViaWebOsLuna:enter",{textPreview:e.slice(0,160),reason:t.reason,transactionId:t.transactionId,requestType:typeof Ar()});var i=Ar();if(!i)return Ka("speakViaWebOsLuna:no-request"),!1;var n="composite"===t.reason,a=!1,r=()=>{var r,o;if(Da=null,t.transactionId&&(null===(r=Oa)||void 0===r?void 0:r.id)!==t.transactionId)return Ka("speakViaWebOsLuna:drop-stale-delayed-speak",{transactionId:t.transactionId,activeTransaction:null===(o=Oa)||void 0===o?void 0:o.id,reason:t.reason}),!1;if(va)return Ka("speakViaWebOsLuna:defer-delayed-speak-media-playing",{transactionId:t.transactionId,reason:t.reason}),Hr(e,t),!0;var s=!1;try{Ka("speakViaWebOsLuna:request",{uri:"luna://com.webos.service.tts",method:"speak",delayedComposite:n,textPreview:e.slice(0,160)}),i("luna://com.webos.service.tts",{method:"speak",parameters:{text:e,clear:!0,feedback:!0},onSuccess:e=>{var i;if(Ka("speakViaWebOsLuna:onSuccess",{response:e,transactionId:t.transactionId}),!t.transactionId||(null===(i=Oa)||void 0===i?void 0:i.id)===t.transactionId){var n,r=function(e){var t,i=qa(null!==(t=null==e?void 0:e.msgStatus)&&void 0!==t?t:null==e?void 0:e.status).toLowerCase();return"done"===i||"stopped"===i||"canceled"===i||"cancelled"===i||"error"===i}(e),o=!(null==e||!e.returnValue||"msgStatus"in Object(null!=e?e:{}));if(!a&&(r||o))a=!0,t.transactionId&&(null===(n=Oa)||void 0===n?void 0:n.id)===t.transactionId&&(Oa.status="ended",Oa=null)}},onFailure:e=>{var i;s=!0,Ka("speakViaWebOsLuna:onFailure",{error:e,transactionId:t.transactionId});var n=!t.transactionId||(null===(i=Oa)||void 0===i?void 0:i.id)===t.transactionId;t.transactionId&&n&&Oa&&(Oa.status="cancelled",Oa=null),Ur(e)}})}catch(e){var u;return t.transactionId&&(null===(u=Oa)||void 0===u?void 0:u.id)===t.transactionId&&(Oa.status="cancelled",Oa=null),Ur(e),!1}return!s};if(n)return wr(),Ka("speakViaWebOsLuna:delay-composite-until-focus-settles",{delayMs:250,transactionId:t.transactionId}),Da=setTimeout(r,250),!0;return r()},stop:Xr},Vr={name:"web-speech",platform:"web",isAvailable:jr,speak:function(e,t){if(!jr())return!1;try{var i=new window.SpeechSynthesisUtterance(e);return i.onstart=()=>{var e;t.transactionId&&(null===(e=Oa)||void 0===e?void 0:e.id)===t.transactionId&&(Oa.status="started")},i.onend=()=>{var e=Oa,i=!t.transactionId||(null==e?void 0:e.id)===t.transactionId;t.transactionId&&i&&e&&(e.status="ended",Oa=null)},i.onerror=e=>{var i,n=e.error;t.transactionId&&(null===(i=Oa)||void 0===i?void 0:i.id)===t.transactionId&&(Oa.status="cancelled",Oa=null),"synthesis-failed"===n&&zr(n)},window.speechSynthesis.speak(i),!0}catch(e){return zr("exception"),!1}},stop:()=>{if(Cr())try{window.speechSynthesis.cancel()}catch(e){}}},Kr={name:"vizio-chromevox",platform:"vizio",isAvailable:Wr,speak:qr,stop:Yr};function Xr(){var e=Ar();if(e)try{e("luna://com.webos.service.tts",{method:"stop",parameters:{},onFailure:e=>Ka("webOS Luna stop failed",{error:e})})}catch(e){Ka("webOS Luna stop threw",{error:e})}}function Yr(e=!0){var t=!!Aa,i=Ia;br();var n=xr(),a=function(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.chrome)||void 0===e||null===(e=e.tts)||void 0===e?void 0:e.stop;return"function"==typeof t?t:null}();if((n||a)&&(i||t||a)&&(i||!t||a))try{var r=!1;n&&"function"==typeof n.stop&&(n.stop(),r=!0),n&&"function"==typeof n.cancel&&n.cancel(),n&&"function"==typeof n.pause&&n.pause(),a&&(a(),r=!0),n&&e&&!r&&i&&n.play(""),Tr()}catch(e){Tr(),Ka("VIZIO stop threw",{error:e})}}function qr(e,t){var i=xr();if(!i)return!1;try{var n,a,r=!0===(null===(n=t.element)||void 0===n?void 0:n.isConnected),o="composite"===t.reason?1400:"focus"===t.reason?700:0;return o>0?(br(),Aa=setTimeout(()=>{var n;if(Aa=null,!t.transactionId||!Oa||Oa.id===t.transactionId)if(t.element&&r&&!t.element.isConnected){var a;t.transactionId&&(null===(a=Oa)||void 0===a?void 0:a.id)===t.transactionId&&(Oa.status="cancelled",Oa=null)}else{if(va)return yr(),Ua=null,void Hr(e,t);i.play(e),Er(e),t.transactionId&&(null===(n=Oa)||void 0===n?void 0:n.id)===t.transactionId&&(Oa.status="ended",Oa=null)}},o),!0):(i.play(e),Er(e),t.transactionId&&(null===(a=Oa)||void 0===a?void 0:a.id)===t.transactionId&&(Oa.status="ended",Oa=null),!0)}catch(e){return function(e){fa=!0,Ka("VIZIO Chromevox unavailable",{error:e})}(e),!1}}function Jr(e){return"high"===e?3:"normal"===e?2:1}function Qr(){return Date.now()-Ra<1500}function Zr(e){return Ja(e)}function eo(e){if(!e)return"";var t=function(e){return e?[e.tagName.toLowerCase(),e.id||"",e.getAttribute("data-component-id")||"",e.getAttribute("data-nami-id")||"",e.getAttribute("data-testid")||"",`el-${Ba(e)}`].filter(Boolean).join("|"):""}(e);return Ja(t||co(e))}function to(e){var t=Zr(e);return"clickable"===t||"button"===t||"focusable"===t||"selected"===t||"unselected"===t}function io(e,t,i){var n;if(Ua={textKey:Zr(e),reason:t.reason,timestamp:Date.now()},"high"===i){var a=Pr(e),r=Date.now();za={transactionId:t.transactionId,pageKey:ka,element:null!==(n=t.element)&&void 0!==n?n:null,elementKey:eo(t.element),textKey:Zr(e),startedAt:r,suppressUntil:r+a},Ma&&clearTimeout(Ma),Ma=setTimeout(()=>{Ma=null,za=null},a)}}function no(e,t=!0){var i,n,a,r=!(!e||(null===(i=Oa)||void 0===i?void 0:i.id)!==e||"pending"!==Oa.status);if(Ka("stopSpeech",{preserveTransactionId:e,allowVizioEmptyFallback:t,activeTransaction:null===(n=Oa)||void 0===n?void 0:n.id,reason:null===(a=Oa)||void 0===a?void 0:a.reason,preservingCurrentTransaction:r}),pa=null,r||(kr(),wr()),e||(yr(),gr(),pr("stop")),ir(e),Ta&&(clearTimeout(Ta),Ta=null),!r){if(Cr())try{window.speechSynthesis.cancel()}catch(e){}Lr()&&Xr(),Ir()&&Yr(t)}}function ao(){no()}function ro(e,t={}){var i,n,a;Ka("speakText:enter",{textPreview:qa(e).slice(0,160),reason:t.reason,transactionId:t.transactionId,element:Ya(t.element),runtime:$r()});var r=qa(e);if(!r)return!1;if(!Nr())return Ka("skip speech: non-CTV runtime"),!1;var o={interrupt:!1!==t.interrupt,reason:null!==(i=t.reason)&&void 0!==i?i:"manual",transactionId:t.transactionId,element:t.element,focusPath:t.focusPath,priority:t.priority},s=function(e,t){return t.priority?t.priority:"composite"===t.reason?"high":to(e)?"low":"normal"}(r,o);if(function(e,t,i){var n=Zr(e),a=Date.now(),r=eo(t.element);if(to(e))return!0;if(Ua&&Ua.reason===t.reason&&Ua.textKey===n&&a-Ua.timestamp<600)return Ka("suppress:duplicate-request",{reason:t.reason,textPreview:e.slice(0,120)}),!0;if(!za)return!1;if(Jr(i)>=Jr("high"))return!1;if("focus"===t.reason){var o=za.textKey;if(!Qr()&&(n===o||n.includes(o)))return Ka("suppress:focus-text-is-active-composite",{textPreview:e.slice(0,120),transactionId:za.transactionId,element:Ya(t.element)}),!0}var s=function(e,t){return!!e&&!!t&&e===t}(t.element,za.element),u=!!r&&za.elementKey===r,l=!za.pageKey||za.pageKey===ka,d=Qr(),h=l&&!d&&a<za.startedAt+2500;return!(!s&&!u&&(l&&"focus"===t.reason&&t.element&&za.element!==t.element||"low"!==i&&!h)&&(yr(),1))}(r,o,s))return!1;if(o.interrupt&&no(o.transactionId,!1),va)return Hr(r,o),!0;var u=function(e){var t;return"manual"!==(null!==(t=e.reason)&&void 0!==t?t:"manual")&&e.element?Lr()||Ir()?"programmatic":"accessibility-label":"programmatic"}(o);Ka("speakText:owner",{owner:u,reason:o.reason,element:Ya(o.element)});var l,d,h="programmatic"===u?function(){if(!Nr())return null;var e=Ir(),t=Lr();return Kr.isAvailable()?(Ka("resolveTtsEngine:selected",{engine:"vizio-chromevox"}),Kr):e?null:Gr.isAvailable()?(Ka("resolveTtsEngine:selected",{engine:"webos-luna-tts"}),Gr):Vr.isAvailable()?(Ka("resolveTtsEngine:selected",{engine:"web-speech"}),Vr):(Ka("tts engine unavailable",{webos:t,vizio:e}),null)}():null;(Ka("speakText:engine",{engine:null!==(n=null==h?void 0:h.name)&&void 0!==n?n:null,owner:u}),"composite"===o.reason&&o.transactionId&&o.element&&function(e){return"accessibility-label"===e||Lr()}(u))&&mr(o.element,r,null!==(l=o.focusPath)&&void 0!==l?l:[]);if("accessibility-label"===u)return"focus"===o.reason&&o.element&&o.element.setAttribute("aria-label",r),o.transactionId&&(null===(d=Oa)||void 0===d?void 0:d.id)===o.transactionId&&(Oa.status="started"),io(r,o,s),!0;if(!h)return function(e,t){if(!Ir()||fa)return!1;var i=Date.now(),n=()=>{var a;xa=null,t.transactionId&&Oa&&Oa.id!==t.transactionId||(Wr()?qr(e,t):Date.now()-i>=8e3?t.transactionId&&(null===(a=Oa)||void 0===a?void 0:a.id)===t.transactionId&&(Oa.status="cancelled",Oa=null):xa=setTimeout(n,250))};return kr(),xa=setTimeout(n,250),!0}(r,o)?(io(r,o,s),!0):(Xa(),!1);var c="focus"===o.reason&&o.element?lo(o.element,r):r,m=h.speak(c,o);if(Ka("speakText:engine-result",{engine:h.name,accepted:m,reason:o.reason,transactionId:o.transactionId}),m)return io(r,o,s),m;if(!o.element)return m;var f=mr(o.element,r,null!==(a=o.focusPath)&&void 0!==a?a:[]);return Ka("speakText:aria-label-fallback",{engine:h.name,accepted:f,reason:o.reason}),f&&io(r,o,s),f}function oo(e){var t=e.component;return e.hasAttribute("data-nami-primary-cta")||!0===(null==t?void 0:t.focused)||"productButton"===(null==t?void 0:t.namiComponentType)}function so(e){var t,i=null===(t=e.getAttribute("role"))||void 0===t?void 0:t.toLowerCase();return"button"===e.tagName.toLowerCase()||"button"===i||e.matches("nami-button,nami-play-pause-button,nami-volume-button,nami-toggle-button")}function uo(e){return qa(e).replace(/(?:,\s*)?\bbutton\b\s*$/i,"").trim()||qa(e)}function lo(e,t){var i=qa(t);return i&&(Ir()||Lr())&&so(e)?/\bbutton\b\s*$/i.test(i)?i:qa(`${i} button`):i}function ho(e){return qa(e.innerText||e.textContent||"")}function co(e){if(!e)return"";if(cr(e)){var t=function(e){var t=$a.get(e);return t?qa(t["aria-label"]||e.getAttribute("title")||""):""}(e);if(t)return t;var i=mo(e.component);if(i)return i}var n=e.getAttribute("data-tts-spoken-label");if(n)return qa(n);var a=mo(e.component);if(a)return a;var r=e.getAttribute("aria-label")||e.getAttribute("title");return r?qa(r):ho(e)}function mo(e){var t=vo(e,ya);if(!t)return"";var i=t,n=qa(fo(i.speechLabel)||fo(i.speech_label)||fo(i.screenreaderText)||fo(i.title)||fo(i.alt)||fo(i.text)||(Array.isArray(i.texts)?i.texts.map(e=>fo(e)).join(", "):""));if(n)return n;for(var a,r=f(go(i));!(a=r()).done;){var o=mo(a.value);if(o)return o}return""}function fo(e,t=ya){return t?Zn(t,e):e}function vo(e,t){if(!e||e.hidden)return null;var i=e;if("condition"===i.component)return t&&qn(t,i)?e:null;if(i.conditionAttributes&&t){var n=Jn(t,i);return n.hidden?null:n}return e}function po(e,t){if(Ka("applySpeechAttributes:enter",{element:Ya(e),label:t,activeComposite:cr(e)}),!cr(e)){var i=qa(t),n=function(e,t){var i=qa(t);return i?so(e)?uo(i):i:""}(e,t);if(!n)return e.removeAttribute("data-tts-spoken-label"),void e.removeAttribute("aria-label");i?e.setAttribute("data-tts-spoken-label",i):e.removeAttribute("data-tts-spoken-label"),e.setAttribute("aria-label",function(e,t){return so(e)?uo(t):qa(t)}(e,n))}}function go(e){for(var t=[],i=0,n=["components","playingComponents","pausedComponents","mutedComponents","volumeComponents","productBaseComponents","productFeaturedComponents"];i<n.length;i++){var a=null==e?void 0:e[n[i]];Array.isArray(a)&&t.push(...a)}return null!=e&&e.collapseHeader&&(Array.isArray(e.collapseHeader)?t.push(...e.collapseHeader):t.push(e.collapseHeader)),t}function yo(e,t,i){var n=vo(e,ya);if(n&&!function(e){var t=vo(e,ya);if(!t)return!1;var i=t,n=String(i.component||i.namiComponentType||"").toLowerCase();return-1!==n.indexOf("button")||-1!==n.indexOf("toggle")||-1!==n.indexOf("checkbox")||-1!==n.indexOf("radio")||-1!==n.indexOf("select")||-1!==n.indexOf("input")||!!i.onTap||!!i.sku||!0===i.focused}(n)){var a=function(e){var t=vo(e,ya);if(!t)return"";var i=t;switch(t.component){case"text":case"countdownTimerText":return Qa(fo(i.screenreaderText)||fo(i.text));case"text-list":return Array.isArray(i.texts)?Qa(i.texts.map(e=>fo(e)).join(", ")):"";case"videoUrl":case"progressBar":return qa(fo(i.screenreaderText));default:return""}}(n);Za(t,a),go(n).forEach(e=>yo(e,t))}}function bo(e,t){var i=[];if(!e)return i;var n=e;return[n.header,n.contentContainer,n.footer,n.backgroundContainer,n.components].forEach(e=>{Array.isArray(e)?e.forEach(e=>yo(e,i)):yo(e,i)}),i}function wo(e,t){var i=bo(e),n=function(e){if(!e)return"";var t=mo(e.component),i=e.getAttribute("aria-label")||e.getAttribute("title")||ho(e),n=qa(t||i);return n?lo(e,n):""}(t);return tr(er(i,n?[n]:[]))}function ko(e){return e?Ja(`${qa(e.id||e.name||"")}|${tr(er(bo(e),[]))}`):""}function So(){return Sa}function Eo(e,t=null){!function(){if(null===Ha&&null===Ga){var e=navigator.userAgentData;"function"==typeof(null==e?void 0:e.getHighEntropyValues)?Ga=e.getHighEntropyValues(["platform","model"]).then(e=>{var t,i,n=(null!==(t=e.platform)&&void 0!==t?t:"").toLowerCase(),a=(null!==(i=e.model)&&void 0!==i?i:"").toLowerCase();Ha=n.includes("xbox")||a.includes("xbox"),Ka("xbox client hints resolved",{platform:n,model:a,result:Ha})}).catch(()=>{Ha=!1}).finally(()=>{Ga=null}):Ha=!1}}(),Ka("setActivePage:enter",{nextKey:ko(e),previousKey:ka,activePageAnnounced:wa,pageName:qa((null==e?void 0:e.name)||(null==e?void 0:e.id)||"")});var i=ka;ga=e,ya=t,function(e){var t=ko(e);if(t!==ka){var i=!ka&&!!La;wa=!1,ka=t,Sa=i,La=null,_a=""}}(e),i!==ka&&no(void 0,!1)}function To(e,t){if(Ka("prepareInitialComposite:enter",{element:Ya(e),activePageKey:ka,activePageAnnounced:wa,blockedByNavigation:So(),label:co(e),isPrimary:oo(e)}),!ga||wa||!oo(e)||So())return Ka("prepareInitialComposite:skip",{hasActivePage:!!ga,activePageAnnounced:wa,isPrimary:oo(e),blockedByNavigation:So()}),!1;var i=wo(ga,e);if(!i)return!1;var n=dr(e,t),a=function(e,t,i){var n={id:Fa++,reason:e,element:i,text:t,page:ga,status:"pending"};return Oa=n,n}("composite",i,e);wa=!0,La=e,_a=eo(e);var r,o=ro(i,{reason:"composite",interrupt:!0,transactionId:a.id,element:e,focusPath:n,priority:"high"});o||(wa=!1,(null===(r=Oa)||void 0===r?void 0:r.id)===a.id&&(Oa.status="cancelled",Oa=null));return o}function Po(e,t){Ka("preparePrimaryCtaCompositeFocus:enter",{element:Ya(e),label:co(e),activePageKey:ka,activePageAnnounced:wa});var i=To(e,t);return Ka("preparePrimaryCtaCompositeFocus:result",{result:i,activePageKey:ka,activePageAnnounced:wa}),i}function Mo(e){Ka("handleNativeFocusIn:enter",{target:e.target instanceof Element?Ya(e.target):String(e.target),activePageKey:ka,activePageAnnounced:wa});var t=function(e){for(var t,i=null,n=f("function"==typeof e.composedPath?e.composedPath():[]);!(t=n()).done;){var a=t.value;if(a instanceof Element&&co(a)){if(a.tagName.toLowerCase().startsWith("nami-"))return a;i||(i=a)}}return null!=i?i:e.target instanceof Element?e.target:null}(e);t&&Ao(t,e)}function Ao(e,t){if(Ka("handleFocusedElementForSpeech:enter",{element:Ya(e),label:co(e),ttsEnabled:da,runtime:$r(),activePageKey:ka,activePageAnnounced:wa,lastFocused:Ya(La),lastFocusedElementIdentity:_a}),!e)return Ka("handleFocusedElementForSpeech:skip-basic",{hasElement:!!e,ttsEnabled:da}),!1;if(!Nr())return!1;var i=eo(e);if(za&&za.pageKey===ka&&Date.now()<za.startedAt+2500){var n=za.element===e,a=!!i&&za.elementKey===i;if(!Qr()&&(n||a))return Ka("handleFocusedElementForSpeech:skip-during-initial-composite-lock",{element:Ya(e),sameCompositeElement:n,sameCompositeElementKey:a}),!1;var r=co(e),o=r?Zr(r):"";if(!Qr()&&o&&za.textKey.includes(o))return Ka("handleFocusedElementForSpeech:skip-composite-contained-label-during-initial-lock",{element:Ya(e),labelPreview:r.slice(0,120),transactionId:za.transactionId}),La=e,_a=i,!1}if(La===e||i&&i===_a&&!wa)return Ka("handleFocusedElementForSpeech:skip-same-element",{element:Ya(e),activePageAnnounced:wa,elementIdentity:i,lastFocusedElementIdentity:_a}),!1;if(!wa&&ga&&oo(e)&&!La&&!So())return To(e,t);var s=co(e);if(!s)return!1;if(za){var u=Zr(s),l=za.textKey;if(!Qr()&&(u===l||u.includes(l)))return Ka("handleFocusedElementForSpeech:skip-active-composite-label",{element:Ya(e),labelPreview:s.slice(0,120),transactionId:za.transactionId}),La=e,_a=i,!1}return La=e,_a=i,Ta&&clearTimeout(Ta),Ta=setTimeout(()=>{Ta=null,La===e&&ro(s,{reason:"focus",interrupt:!0,element:e,focusPath:dr(e,t),priority:"normal"})},120),!0}function Do(e=document){var t;if(Ka("attachFocusSpeechListeners:enter",{root:e instanceof Element?Ya(e):e instanceof DocumentFragment?"document-fragment":"document",runtime:$r()}),xo(),!Nr())return Ka("focus speech listeners not attached: non-CTV runtime"),xo;var i,n=e=>Mo(e),a=()=>(Ka("handleUserNavigationKey",{activePageKey:ka,activePageAnnounced:wa}),Ra=Date.now(),void(Sa=!0));e.addEventListener("focusin",n,!0),e.addEventListener("keydown",a,!0);var r=window;if("undefined"!=typeof window&&null!==(t=r.TVJS)&&void 0!==t&&t.DirectionalNavigation){var o=r.TVJS.DirectionalNavigation;i=o.onfocuschanged,o.onfocuschanged=e=>{var t;null===(t=i)||void 0===t||t.call(o,e),function(e){var t,i=null===(t=e.detail)||void 0===t?void 0:t.nextFocusElement;i&&Ao(i,e)}(e)}}return Ea={root:e,focusListener:n,keyListener:a,previousTvjsHandler:i},xo}function xo(){var e;if(Ka("detachFocusSpeechListeners:enter",{hasCleanup:!!Ea}),Ea){var t=Ea,i=t.root,n=t.focusListener,a=t.keyListener,r=t.previousTvjsHandler;i.removeEventListener("focusin",n,!0),a&&i.removeEventListener("keydown",a,!0);var o=window;null!==(e=o.TVJS)&&void 0!==e&&e.DirectionalNavigation&&r&&(o.TVJS.DirectionalNavigation.onfocuschanged=r),Ea=null}}function Co(){var e;Ka("resetScreenreaderState:enter",{activePageKey:ka,activePageAnnounced:wa,activeTransaction:null===(e=Oa)||void 0===e?void 0:e.id,lastFocused:Ya(La)}),xo(),pa=null,va=!1,ga=null,ya=null,ba=null,wa=!1,ka="",Sa=!1,La=null,_a="",Ra=0,Ua=null,yr(),gr(),br(),wr(),kr(),Tr(),Ta&&(clearTimeout(Ta),Ta=null),pr("reset"),ir(),Oa=null}var Io=function(){return m(function t(i,n,a="",r=""){var o;u(this,t),this.playing=!1,this.toggling=!1,this.handleVideoEvents=t=>{this.video.onended=()=>{Br(!1),this.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_ENDED)},this.video.onpause=()=>{Br(!1),this.toggling||this.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_PAUSED)},this.video.onplay=()=>{Br(!this.video.muted),this.toggling||this.handlePlayerAnalytics(t,this.video.currentTime>.05?e.NamiPaywallAction.VIDEO_RESUMED:e.NamiPaywallAction.VIDEO_STARTED)},this.video.onvolumechange=()=>{this.toggling||(this.muted=this.video.muted,Br(!this.video.paused&&!this.video.ended&&!this.muted),this.handlePlayerAnalytics(t,this.muted?e.NamiPaywallAction.VIDEO_MUTED:e.NamiPaywallAction.VIDEO_UNMUTED))}},this.removeVideoEvents=()=>{this.video&&(Br(!1),this.video.onended=null,this.video.onpause=null,this.video.onplay=null,this.video.onvolumechange=null,this.toggling=!1)},this.video=null!=n?n:this.video,null!==(o=t.instance)&&void 0!==o&&o.videoSrc&&n.src!=t.instance.videoSrc&&this.handlePlayerAnalytics(i,e.NamiPaywallAction.VIDEO_CHANGED),this.videoSrc=n.src,this.video&&(this.muteByDefault=n.muted,this.loopVideo=n.loop,this.autoplayVideo=n.autoplay,this.muted=this.video.muted,this.videoComponentName=a,this.videoComponentId=r,this.playing=!(!(this.video.currentTime>0)||this.video.paused||this.video.ended),Br(this.playing&&!this.video.muted),this.handleVideoEvents(i))},[{key:"togglePlayVideo",value:function(e){this.toggling=!0,this.playing?this.video.pause():this.video.play(),this.playing=!this.playing,this.handlePlayerAnalytics(e)}},{key:"toggleMuteVideo",value:function(t){this.toggling=!0,this.video.muted=!this.video.muted,this.muted=this.video.muted,this.handlePlayerAnalytics(t,this.muted?e.NamiPaywallAction.VIDEO_MUTED:e.NamiPaywallAction.VIDEO_UNMUTED)}},{key:"videoPlayingAction",value:function(){var t,i;return(null===(t=this.video)||void 0===t?void 0:t.currentTime)<=0?e.NamiPaywallAction.VIDEO_STARTED:this.video.paused?e.NamiPaywallAction.VIDEO_PAUSED:this.video.ended?e.NamiPaywallAction.VIDEO_ENDED:(null===(i=this.video)||void 0===i?void 0:i.currentTime)>.05?e.NamiPaywallAction.VIDEO_RESUMED:e.NamiPaywallAction.UNKNOWN}},{key:"handlePlayerAnalytics",value:function(t,i){if(this.video){var n={id:this.videoComponentId,name:this.videoComponentName,url:this.video.src,loopVideo:this.loopVideo,muteByDefault:this.muteByDefault,autoplayVideo:this.autoplayVideo,contentDuration:this.video.duration/1e3,contentTimecode:this.video.currentTime/1e3};e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,{action:null!=i?i:this.videoPlayingAction(),videoMetaData:n,timeSpentOnPaywall:ra(t)})}}}])}();Io.instance=null;var Lo=e._internal.NamiFlowManager,_o=null;function Ro(){var e=_o;return!!e&&(_o=null,e.flow&&Lo.instance.currentFlow===e.flow&&Lo.finish(),e.remove(),!0)}var Fo=({onTap:t,sku:i,componentChange:n,contextProvider:a}={})=>{var r,o,s,u,l,d,h,c,m,f,p,g=e.NamiPaywallAction.UNKNOWN;switch(null==t?void 0:t.function){case ft:g=e.NamiPaywallAction.CLOSE_PAYWALL,p=ra(a),Oo(),null===(r=Io.instance)||void 0===r||r.handlePlayerAnalytics(a,e.NamiPaywallAction.VIDEO_ENDED);break;case pt:g=e.NamiPaywallAction.RESTORE_PURCHASES,Wo();break;case yt:g=e.NamiPaywallAction.SIGN_IN,$o();break;case Dt:No(null===(o=t.parameters)||void 0===o?void 0:o.url);break;case wt:i&&(g=e.NamiPaywallAction.BUY_SKU,i=jo(a,t,i));break;case Ct:g=e.NamiPaywallAction.PAGE_CHANGE,n={name:null==t||null===(s=t.parameters)||void 0===s?void 0:s.screen},Bo(a,null==t||null===(u=t.parameters)||void 0===u?void 0:u.screen);break;case St:g=e.NamiPaywallAction.TOGGLE_CHANGE,n=zo(a,null==t||null===(l=t.parameters)||void 0===l?void 0:l.formId,null==t||null===(d=t.parameters)||void 0===d?void 0:d.value);break;case Tt:i&&(g=e.NamiPaywallAction.SELECT_SKU,Uo(a,i));break;case Mt:i&&(g=e.NamiPaywallAction.PURCHASE_SELECTED_SKU,Ho(a,i));break;case Lt:break;case Rt:null===(h=Io.instance)||void 0===h||h.togglePlayVideo(a);break;case Ot:null===(c=Io.instance)||void 0===c||c.togglePlayVideo(a);break;case $t:null===(m=Io.instance)||void 0===m||m.toggleMuteVideo(a);break;case jt:null===(f=Io.instance)||void 0===f||f.toggleMuteVideo(a)}g!==e.NamiPaywallAction.UNKNOWN&&e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},a.getPaywallActionEventData(),{action:g,sku:i,timeSpentOnPaywall:p,componentChange:n,purchaseError:void 0,purchases:void 0}))},Oo=()=>{ao(),e.storageService.clearLaunchId(),Ro()||Go(e.PaywallManagerEvents.Close)||"undefined"==typeof window||window.history.back()},Wo=()=>{var t=e.hasCapability(e.Capabilities.THIRD_PARTY_TRANSACTIONS);Go(e.PaywallManagerEvents.Restore)||t||e.logger.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},$o=()=>{Go(e.PaywallManagerEvents.SignIn)},No=t=>{t?Go(e.PaywallManagerEvents.DeeplinkAction,t)||"undefined"!=typeof window&&window.open(t,"_blank"):e.logger.debug("Paywall deep link action invoked, but no url present.")},jo=(t,i,n)=>{var a,r=null===(a=i.parameters)||void 0===a?void 0:a.promo,o=n;if(r)e.logger.debug(`promo id is not null ${null==n?void 0:n.id}`),o.promoId=r.toString();else{e.logger.debug(`promo id is null for ${n.id}, product details: ${JSON.stringify(n.productDetails)}`);var s=n.productDetails;if(Bt(null==s?void 0:s.product_type)){var u=function(e){return e.offers.find(e=>"promo"===e.offer_type&&0===e.price)}(s);if(u&&u.offer_ref_id)e.logger.debug(`Found a free trial offer ${u.offer_ref_id}`),o.promoId=u.offer_ref_id.toString();else{var l,d=s.offers[0];if(d)e.logger.debug(`Found an offer ${d.offer_ref_id}`),o.promoId=null===(l=d.offer_ref_id)||void 0===l?void 0:l.toString()}}}return function(t,i){if(e.hasCapability(e.Capabilities.THIRD_PARTY_TRANSACTIONS)){if(e.storageService.setPurchaseImpression(i.skuId),e.NamiEventEmitter.getInstance().listenerCount(e.PaywallManagerEvents.BuySku)<=0)return void e.logger.warn("In order for Nami to hand off the purchase so the transaction can be handled by, you must register a NamiBuySkuHandler callbackwith NamiPaywallManager.registerBuySkuHandler.");e.logger.info(`Handing off purchase for processing by developer skuId=${i.skuId} promoId=${i.promoId}`),Go(e.PaywallManagerEvents.BuySku,i)}else{var n=e.namiBuySKU(i.skuId);if(n&&(e.logger.info(`Purchase flow completed, success=${n.success}, code=${n.billingResponseCode}, message=${n.message}`),n.success)){var a;e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,{action:e.NamiPaywallAction.CLOSE_PAYWALL,sku:i,timeSpentOnPaywall:ra(t)}),null===(a=Io.instance)||void 0===a||a.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_ENDED);var r=t.getSelectedCampaign();r&&r.conversion_event_type==e.CampaignRuleConversionEventType.IN_APP&&r.conversion_event_url?(e.storageService.clearLaunchId(),window.location.href=r.conversion_event_url):Oo()}}}(t,o),o},Bo=(e,t)=>{var i;t&&((null===(i=window.history.state)||void 0===i?void 0:i.prevUrl)==t?window.history.back():e.setCurrentPage(t))},zo=(e,t,i)=>{if(t)return e.setCurrentFormId(t,i),{formId:t,value:i};var n=e.getCurrentGroupId(),a=e.getCurrentGroupName();return e.setCurrentGroupData(n,a),{id:n,name:a}},Uo=(e,t)=>{var i=e.getCurrentGroupId(),n=e.selectedProducts();i&&t.id!=n[i]&&e.setSelectedProducts(v({},n,{[i]:t.id}))},Ho=(e,t)=>{e.setPurchase(!0,t)};function Go(t,...i){var n=e.NamiEventEmitter.getInstance();return n.emit(t,...i),n.listenerCount(t)>0}var Vo,Ko,Xo,Yo,qo,Jo,Qo,Zo,es,ts,is,ns,as=e=>e,rs=e._internal.NamiFlowManager,os=250,ss=(Vo=function(){function n(t,i,a,r){var o;return u(this,n),(o=s(this,n)).pages=[],o.currentOffset=0,o.presentationStyle="fullscreen",o._sheetEntranceActive=!0,o.formFactor=e.getDeviceFormFactor(),o.timeSpentOnPaywall=0,o.animation={transition:"none",direction:"forward"},o._originalBodyStyles={},o._originalDocumentStyles={},o._savedScrollY=0,o._sheetDragStartY=0,o._sheetIsDragging=!1,o._dismissThreshold=100,o._boundHandleKeyDownEvent=e=>o.handleKeyDownEvent(e),o._stylesAlreadySaved=!1,o.type=t,o.value=i,o.context=a,o.presetCampaign=r,o.setPaywallData(),o.presentationStyle=o.getPresentationStyle(o.paywall),o.applyPresentationHostClasses(),w(o,o)}return y(n,t.LitElement),m(n,[{key:"applyPresentationHostClasses",value:function(){this.classList.toggle("nami-half-sheet-mode",this.isOverlaySheet),this.classList.toggle("nami-modal-mode",this.isModal),this.classList.toggle("nami-modal-phone",this.isModal&&"phone"===this.formFactor),this.classList.toggle("nami-modal-wide",this.isModal&&"phone"!==this.formFactor)}},{key:"setPaywallData",value:function(){if(this.presetCampaign)return this.campaign=this.presetCampaign,void(this.paywall=this.presetCampaign.paywall?e.getPaywall(this.presetCampaign.paywall):void 0);var t=e.getPaywallDataFromLabel(this.value,this.type);this.paywall=t.paywall,this.campaign=t.campaign}},{key:"getPresentationStyle",value:function(t){var i,n,a,r=null!==(i=null==t||null===(n=t.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.presentationStyle)&&void 0!==i?i:null==t||null===(a=t.template)||void 0===a||null===(a=a.initialState)||void 0===a?void 0:a.presentation_style;return e.getEffectiveWebStyle(r)}},{key:"isHalfSheet",get:function(){return"compact_sheet"===this.presentationStyle}},{key:"isSheet",get:function(){return"sheet"===this.presentationStyle}},{key:"isOverlaySheet",get:function(){return this.isHalfSheet||this.isSheet}},{key:"isModal",get:function(){return"modal"===this.presentationStyle}},{key:"isOverlay",get:function(){return this.isOverlaySheet||this.isModal}},{key:"connectedCallback",value:function(){var e;M(n,"connectedCallback",this)([]),null!==(e=window.TVJS)&&void 0!==e&&e.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),this._detachFocusSpeechListeners=Do(this),document.addEventListener("keydown",this._boundHandleKeyDownEvent),this._swipeHandler=ht(this,this.handleSwipeEvent.bind(this),{axisHint:"y",lockAxis:!0,minDistance:25,edgeLeakThreshold:15,preventScrollOnSwipe:!1,pointerTypes:["touch"]}),this.setOriginalStyles()}},{key:"disconnectedCallback",value:function(){var t,i,a;M(n,"disconnectedCallback",this)([]),ao(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=void 0,Co(),e.storageService.clearLaunchId(),null!==(i=window.TVJS)&&void 0!==i&&i.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this._boundHandleKeyDownEvent),e.NamiEventEmitter.getInstance().removeAllListeners(e.PAYWALL_ACTION_EVENT),this.restoreStyles(),null===(a=this._halfSheetAbortController)||void 0===a||a.abort(),this._swipeHandler.destroy()}},{key:"setOriginalStyles",value:function(){this._stylesAlreadySaved||(this._stylesAlreadySaved=!0,this._originalBodyStyles.background=document.body.style.background,this._originalBodyStyles.overflow=document.body.style.overflow||null,this._originalBodyStyles.position=document.body.style.position||null,this._originalBodyStyles.top=document.body.style.top||null,this._originalBodyStyles.width=document.body.style.width||null,"phone"===this.formFactor&&(this._originalBodyStyles["overscroll-behavior"]=document.body.style.overscrollBehavior||null,this._originalDocumentStyles["overscroll-behavior"]=document.documentElement.style.overscrollBehavior||null)),"television"===this.formFactor&&(document.body.style.overflow="hidden"),"phone"===this.formFactor&&(document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none",this.isOverlay||(document.body.style.overflow="hidden")),this.isOverlay&&(this._savedScrollY=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%",document.body.style.overflow="hidden")}},{key:"restoreStyles",value:function(){Object.entries(this._originalBodyStyles).forEach(([e,t])=>{null!==t?document.body.style.setProperty(e,t):document.body.style.removeProperty(e)}),Object.entries(this._originalDocumentStyles).forEach(([e,t])=>{null!==t?document.documentElement.style.setProperty(e,t):document.documentElement.style.removeProperty(e)}),this._savedScrollY>0&&(window.scrollTo(0,this._savedScrollY),this._savedScrollY=0)}},{key:"handleKeyDownEvent",value:function(t){if(10009===t.keyCode||27===t.keyCode||166===t.keyCode||196===t.keyCode||"Backspace"===t.key||"GoBack"===t.key||"BrowserBack"===t.key||"XF86Back"===t.key){if("Backspace"===t.key)if(t.composedPath().some(e=>e instanceof HTMLElement&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)))return;t.preventDefault(),ao(),this.flow?this.flow.triggerActions(e.NamiReservedActions.REMOTE_BACK):this.isModal&&this.animateSheetDismiss().then(()=>Oo())}}},{key:"handleBackdropClick",value:function(e){var t;(e.stopPropagation(),this.flow)?null!==(t=this.flow.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==t&&t?this.flow.triggerActions("__swipe_down__"):this.animateSheetDismiss().then(()=>{var e;null===(e=this.flow)||void 0===e||e.dismiss(),Oo()}):this.animateSheetDismiss().then(()=>Oo())}},{key:"animateSheetDismiss",value:function(){var e,t,i,n,a;return S(function(r){for(;;)switch(r.n){case 0:return i=this.shadowRoot,n=null!==(e=null==i?void 0:i.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null==i?void 0:i.querySelector(".nami-modal-container"),a=null!==(t=null==i?void 0:i.querySelector(".nami-half-sheet-backdrop"))&&void 0!==t?t:null==i?void 0:i.querySelector(".nami-modal-backdrop"),n&&n.classList.add("nami-dismissing"),a&&a.classList.add("nami-dismissing"),r.n=1,o(new Promise(e=>setTimeout(e,200)));case 1:return r.a(2)}},null,this,null,Promise)}},{key:"handleSwipeEvent",value:function({direction:e}){var t;if("down"===e)null===(t=this.flow)||void 0===t||t.triggerActions("__swipe_down__");else if("up"===e){var i;null===(i=this.flow)||void 0===i||i.triggerActions("__swipe_up__")}}},{key:"setupHalfSheetDragTracking",value:function(){var e,t,i;null===(e=this._halfSheetAbortController)||void 0===e||e.abort(),this._halfSheetAbortController=new AbortController;var n=this._halfSheetAbortController.signal,a=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"),r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-half-sheet-content");if(a&&r){a.addEventListener("touchstart",e=>{r.scrollTop>0||(this._sheetDragStartY=e.touches[0].clientY,this._sheetIsDragging=!0)},{passive:!0,signal:n}),a.addEventListener("touchmove",e=>{if(this._sheetIsDragging){var t=e.touches[0].clientY-this._sheetDragStartY;t>0&&(a.style.transform=`translateY(${t}px)`,a.style.transition="none",e.preventDefault())}},{passive:!1,signal:n}),a.addEventListener("touchend",()=>{if(this._sheetIsDragging){this._sheetIsDragging=!1;var e,t,i=a.style.transform.match(/translateY\((\d+(?:\.\d+)?)px\)/);if((i?parseFloat(i[1]):0)>this._dismissThreshold)if(null!==(e=null===(t=this.flow)||void 0===t?void 0:t.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==e&&e){var n;a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out",null===(n=this.flow)||void 0===n||n.triggerActions("__swipe_down__")}else{var r;a.style.transform="translateY(100%)",a.style.transition="transform 0.2s ease-in";var o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(".nami-half-sheet-backdrop");o&&o.classList.add("nami-dismissing"),setTimeout(()=>{var e;null===(e=this.flow)||void 0===e||e.dismiss()},200)}else a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out"}},{signal:n})}}},{key:"setupHalfSheetFocusTrap",value:function(){var e,t,i,n,a=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-modal-container");if(a){a.focus();var r=null===(n=this._halfSheetAbortController)||void 0===n?void 0:n.signal;a.addEventListener("keydown",e=>{if("Tab"===e.key){var t=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0!==t.length){var i,n,r=t[0],o=t[t.length-1];if(e.shiftKey)document.activeElement!==r&&(null===(i=this.shadowRoot)||void 0===i?void 0:i.activeElement)!==r||(e.preventDefault(),o.focus());else document.activeElement!==o&&(null===(n=this.shadowRoot)||void 0===n?void 0:n.activeElement)!==o||(e.preventDefault(),r.focus())}}},r?{signal:r}:void 0)}}},{key:"firstUpdated",value:function(){var t;this.timeSpentOnPaywall=Date.now(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=Do(this.renderRoot),e.isNamiFlowCampaign(this.campaign)&&(this.flow=rs.instance.presentFlow(this.campaign,this,this.context)),this.isOverlay&&this.updateComplete.then(()=>{this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()})}},{key:"updated",value:function(e){if(M(n,"updated",this)([e]),e.has("presentationStyle")){var t=e.get("presentationStyle");("compact_sheet"===t||"sheet"===t||"modal"===t)!==this.isOverlay&&(this.restoreStyles(),this._stylesAlreadySaved=!1,this.setOriginalStyles()),this.isOverlay&&(this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap())}}},{key:"getAnimationStyles",value:function(e){var t="backward"===this.animation.direction?-1:1;switch(this.animation.transition){case"verticalSlide":return`transform: translateY(${100*(e-this.currentOffset)*t}vh);`;case"slide":return`transform: translateX(${100*(e-this.currentOffset)*t}vw);`;case"fade":return`opacity: ${e===this.currentOffset?1:0};`;default:return""}}},{key:"updatePages",value:function(e){var t,i,n;return S(function(a){for(;;)switch(a.n){case 0:if(this.paywall=e,0!==this.pages.length&&"none"!==this.animation.transition){a.n=1;break}return this.pages=[e],a.a(2);case 1:if((null==(t=this.pages[this.pages.length-1])?void 0:t.id)!==e.id){a.n=2;break}return a.a(2);case 2:return i=null,this.isOverlaySheet&&(i=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelector(".nami-half-sheet-content"))&&(i.style.height=`${i.clientHeight}px`),this.pages=[t,e],this.currentOffset=0,a.n=3,o(this.updateComplete);case 3:requestAnimationFrame(()=>{this.currentOffset=1,setTimeout(()=>{this.pages=[e],this.currentOffset=0,i&&(i.style.height="")},os)});case 4:return a.a(2)}},null,this,null,Promise)}},{key:"animateFullscreenEntry",value:function(){return S(function(e){for(;;)switch(e.n){case 0:return e.n=1,o(new Promise(e=>requestAnimationFrame(()=>e())));case 1:return this.classList.remove("nami-fullscreen-entering"),this.classList.add("nami-fullscreen-entering-active"),e.n=2,o(new Promise(e=>setTimeout(e,os)));case 2:this.classList.remove("nami-fullscreen-entering-active");case 3:return e.a(2)}},null,this,null,Promise)}},{key:"_captureExitOverlay",value:function(e){var t=this.shadowRoot;if(!t)return null;var i=t.querySelector(".nami-flow-container"),n=document.createElement("div");if(n.className="nami-fullscreen-exit-overlay",n.style.cssText=`\n position: fixed; inset: 0; z-index: 10000;\n pointer-events: none;\n background: ${e};\n overflow: hidden;\n `,i){var a=i.cloneNode(!0);a.style.transform="none",a.style.transition="none",n.appendChild(a)}return t.appendChild(n),n.offsetHeight,n}},{key:"_slideExitOverlayAway",value:function(e){var t;return S(function(i){for(;;)switch(i.n){case 0:if(e){i.n=1;break}return i.a(2);case 1:return t="undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,e.style.transition=t?"none":"transform 250ms ease-in",e.style.transform="translateY(100%)",i.n=2,o(new Promise(e=>setTimeout(e,t?0:os)));case 2:e.remove();case 3:return i.a(2)}},null,null,null,Promise)}},{key:"flowNavigateToScreen",value:function(t,i){var n,a,r,s,u,l,d,h,c,m,f;return S(function(v){for(;;)switch(v.n){case 0:if(null!==(n=this.flow)&&void 0!==n&&n.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,e.NamiReservedActions.DISAPPEAR),r=this.presentationStyle,s=this.getPresentationStyle(t),u=0===this.pages.length,l="backward"===i.direction,"compact_sheet"!==r&&"sheet"!==r||"fullscreen"!==s){v.n=3;break}return this.classList.add("nami-fullscreen-entering"),this.presentationStyle="fullscreen",this.applyPresentationHostClasses(),v.n=1,o(this.updateComplete);case 1:return v.n=2,o(this.animateFullscreenEntry());case 2:v.n=11;break;case 3:if("fullscreen"!==r||"compact_sheet"!==s&&"sheet"!==s){v.n=10;break}if(!u&&!l){v.n=8;break}if(!l){v.n=6;break}return d=document.body.style.background||getComputedStyle(this).backgroundColor||"#000",this._sheetEntranceActive=!1,h=this._captureExitOverlay(d),this.presentationStyle=s,this.applyPresentationHostClasses(),this.pages=[t],this.paywall=t,v.n=4,o(this.updateComplete);case 4:return v.n=5,o(this._slideExitOverlayAway(h));case 5:v.n=7;break;case 6:this.presentationStyle=s,this.applyPresentationHostClasses();case 7:v.n=9;break;case 8:console.warn(`Unsupported forward transition: fullscreen → ${s}. Presenting as fullscreen.`);case 9:v.n=11;break;case 10:this.presentationStyle=s,this.applyPresentationHostClasses();case 11:return c=("compact_sheet"===r||"sheet"===r)&&"fullscreen"===s,m="fullscreen"===r&&("compact_sheet"===s||"sheet"===s),f=!("compact_sheet"!==r&&"sheet"!==r||"compact_sheet"!==s&&"sheet"!==s||r===s)||c||m,this.animation=f?{transition:"fade",direction:i.direction}:i,v.n=12,o(this.updatePages(t));case 12:null!==(a=this.flow)&&void 0!==a&&a.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,e.NamiReservedActions.APPEAR);case 13:return v.a(2)}},null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return ut.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?t.html(Ko||(Ko=as``)):this.isOverlaySheet?this.renderHalfSheet():this.isModal?this.renderModal(this.renderFlowContainer()):this.renderFlowContainer()}},{key:"renderFlowContainer",value:function(){return t.html(Xo||(Xo=as`
255
255
  <div class="nami-flow-container">
256
256
  ${0}
257
257
  </div>
@@ -522,7 +522,7 @@
522
522
  `),e.map(e=>e.map(e=>(e.spacing&&(this.slideSpacing=2*e.spacing),t.html(sF||(sF=uF`
523
523
  <div class="swiper-slide">
524
524
  ${0}
525
- </div>`),Uu(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}();Ae([ot({type:Object})],lF.prototype,"component",void 0),Ae([ot({type:Boolean})],lF.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],lF.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],lF.prototype,"minSDKVersion",void 0),lF=Ae([Fe("nami-carousel-container")],lF);var dF=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{Fo({contextProvider:t.contextProvider,onTap:t.muted?t.component.mutedOnTap:t.component.volumeOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return y(e,As),m(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${zs(e,!1)}\n ${Hs(e)}\n ${ru(e,i,!1)}\n }\n :host(:focus){\n ${zs(e,!0)}\n ${ru(e,i,!0)}\n }\n :host(:focus-visible){\n ${hu(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;this.muted=null!==(e=null===(t=Io.instance)||void 0===t?void 0:t.muted)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});var i=this.muted?this.component.mutedComponents:this.component.volumeComponents;return null==i?void 0:i.map(e=>Uu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],dF.prototype,"component",void 0),Ae([ot({type:Boolean})],dF.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],dF.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],dF.prototype,"minSDKVersion",void 0),dF=Ae([Fe("nami-volume-button")],dF);var hF=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{Fo({contextProvider:t.contextProvider,onTap:t.playing?t.component.playingOnTap:t.component.pausedOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return y(e,As),m(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${zs(e,!1)}\n ${Hs(e)}\n ${ru(e,i,!1)}\n }\n :host(:focus){\n ${zs(e,!0)}\n ${ru(e,i,!0)}\n }\n :host(:focus-visible){\n ${hu(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;return this.playing=null!==(e=null===(t=Io.instance)||void 0===t?void 0:t.playing)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0}),(this.playing?this.component.playingComponents:this.component.pausedComponents).map(e=>Uu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],hF.prototype,"component",void 0),Ae([ot({type:Boolean})],hF.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],hF.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],hF.prototype,"minSDKVersion",void 0),hF=Ae([Fe("nami-play-pause-button")],hF);var cF=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,As),m(e,[{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n=this.minSDKVersion,a=e.backgroundBlur,r="vertical"===e.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=t.unsafeCSS(Us(e));return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${u};\n ${su(e.position)}\n ${Hs(e)}\n ${ru(e,i,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${zs(e,!0)}\n ${ru(e,i,!0)}\n }\n :host(:focus-visible){\n ${hu(e)}\n }\n /* Overlapping children center on both axes like the other SDKs' ZStack;\n the flex center on :host doesn't reach absolutely-positioned boxes. */\n :host > *:not(nami-text) {\n position: absolute;\n inset: 0;\n margin: auto;\n }\n :host > * {\n ${Vs(n,o)}\n }\n :host > nami-text:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.focusedBorderColor,n=t.focusedFillColor,a=t.fillColor;return!i&&sa(a,n)||(this.tabIndex=0),(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Uu(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],cF.prototype,"component",void 0),Ae([ot({type:Boolean})],cF.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],cF.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],cF.prototype,"minSDKVersion",void 0),cF=Ae([Fe("nami-stack")],cF);var mF,fF,vF,pF=e=>e,gF="nami-disabled",yF=(mF=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).active=!0,e.timeSpentOnPaywall=0,e.activeTemplate=null,e}return y(i,t.LitElement),m(i,[{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),this.minSDKVersion=e.parseToSemver(this.paywall.template.min_sdk_version),this.contextProvider=ut.create(this.paywall,this.context,this.campaign),this.contextConsumer=new ys(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(gF),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}},{key:"disconnectedCallback",value:function(){var e;M(i,"disconnectedCallback",this)([]),ut.remove(this.contextProvider),this.teardownEvent(),null===(e=this.footerResizeObserver)||void 0===e||e.disconnect(),this.active&&Co()}},{key:"userInteractionListener",value:function(e){this.classList.toggle(gF,!e.enabled)}},{key:"firstUpdated",value:function(){this.postImpression(),this.postPaywallScreenData(),this.updateActiveRenderRoot(),this.observeFooterHeight()}},{key:"updated",value:function(){this.updateActiveRenderRoot()}},{key:"updateActiveRenderRoot",value:function(){this.active&&this.activeTemplate&&(Eo(this.activeTemplate,this.contextProvider),function(e){if(Ka("setActivePageRenderRoot:enter",{hasRoot:!!e,rootType:e instanceof Element?Ya(e):e instanceof DocumentFragment?"document-fragment":String(e),activePageKey:ka,activePageAnnounced:wa,activeElement:Ya(nr())}),ba=e,e&&ga&&!wa){var t=nr();if(t&&"contains"in e&&e.contains(t))To(t);else if(e instanceof DocumentFragment){var i=e.activeElement;i&&To(i)}}}(this.renderRoot))}},{key:"observeFooterHeight",value:function(){if("undefined"!=typeof ResizeObserver){var e=this.renderRoot.querySelector("nami-footer");e&&(this.footerResizeObserver=new ResizeObserver(e=>{var t,i,n=e[e.length-1];if(n){var a=null!==(t=null===(i=n.borderBoxSize)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.blockSize)&&void 0!==t?t:n.contentRect.height;this.style.setProperty("--nami-footer-height",`${a}px`)}}),this.footerResizeObserver.observe(e))}}},{key:"postImpression",value:function(){var t,i;null!==(t=this.paywall)&&void 0!==t&&t.id&&(t=>{var i,n,a;S(function(r){for(;;)switch(r.p=r.n){case 0:if(!e.isAnonymousMode()){r.n=1;break}return e.logger.info("Skipping paywall impression - anonymous mode"),r.a(2);case 1:return(i=e.storageService.getSessionId())&&(t.session=i),(n=e.storageService.getLaunchId())&&(t.launch_id=n),t.app_env="production",t.url_params=e.getUrlParams(),e.logger.info("Post paywall impression - segment ",t.segment),r.p=2,r.n=3,o(e.NamiAPI.instance.postImpression(t));case 3:r.n=5;break;case 4:r.p=4,a=r.v,e.logger.error("Error posting impression",a);case 5:return r.a(2)}},null,null,[[2,4]],Promise)})({segment:null===(i=this.campaign)||void 0===i?void 0:i.segment,call_to_action:this.paywall.id})}},{key:"postPaywallScreenData",value:function(){var t=this.initialGroupChange();e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.SHOW_PAYWALL},t&&{componentChange:t}))}},{key:"initialGroupChange",value:function(){var e=this.contextProvider.state,t=e.groups,i=e.currentGroupId;if(!(t.length<=1)&&i){var n=t.find(({id:e})=>e===i);if(n)return{id:n.id,name:n.displayName}}}},{key:"getTemplate",value:function(){var e,t,i,n;this.contextProvider.state.selectedPaywall===this.paywall?t=this.contextProvider.state.currentPage:t=null!==(i=null===(n=this.paywall.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.currentPage)&&void 0!==i?i:"page1";var a=null===(e=this.paywall.template)||void 0===e?void 0:e.pages.find(e=>e.name===t);if(!a)throw new Error(`Page with name ${t} not found in paywall template.`);return this.activeTemplate=a,this.active&&Eo(a,this.contextProvider),a}},{key:"render",value:function(){var i,n=this.getTemplate(),a=n.backgroundContainer,r=n.header,o=void 0===r?[]:r,s=n.footer,u=void 0===s?[]:s,l=n.contentContainer,d=null!==(i=this.contextProvider.state.fullScreenPresentation)&&void 0!==i&&i,h=this.contextProvider.getFormFactor(),c=e.getDeviceScaleFactor(h);return t.html(fF||(fF=pF`
525
+ </div>`),Uu(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}();Ae([ot({type:Object})],lF.prototype,"component",void 0),Ae([ot({type:Boolean})],lF.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],lF.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],lF.prototype,"minSDKVersion",void 0),lF=Ae([Fe("nami-carousel-container")],lF);var dF=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{Fo({contextProvider:t.contextProvider,onTap:t.muted?t.component.mutedOnTap:t.component.volumeOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return y(e,As),m(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${zs(e,!1)}\n ${Hs(e)}\n ${ru(e,i,!1)}\n }\n :host(:focus){\n ${zs(e,!0)}\n ${ru(e,i,!0)}\n }\n :host(:focus-visible){\n ${hu(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;this.muted=null!==(e=null===(t=Io.instance)||void 0===t?void 0:t.muted)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});var i=this.muted?this.component.mutedComponents:this.component.volumeComponents;return null==i?void 0:i.map(e=>Uu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],dF.prototype,"component",void 0),Ae([ot({type:Boolean})],dF.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],dF.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],dF.prototype,"minSDKVersion",void 0),dF=Ae([Fe("nami-volume-button")],dF);var hF=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{Fo({contextProvider:t.contextProvider,onTap:t.playing?t.component.playingOnTap:t.component.pausedOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return y(e,As),m(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${zs(e,!1)}\n ${Hs(e)}\n ${ru(e,i,!1)}\n }\n :host(:focus){\n ${zs(e,!0)}\n ${ru(e,i,!0)}\n }\n :host(:focus-visible){\n ${hu(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;return this.playing=null!==(e=null===(t=Io.instance)||void 0===t?void 0:t.playing)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0}),(this.playing?this.component.playingComponents:this.component.pausedComponents).map(e=>Uu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],hF.prototype,"component",void 0),Ae([ot({type:Boolean})],hF.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],hF.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],hF.prototype,"minSDKVersion",void 0),hF=Ae([Fe("nami-play-pause-button")],hF);var cF=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,As),m(e,[{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n=this.minSDKVersion,a=e.backgroundBlur,r="vertical"===e.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=t.unsafeCSS(Us(e));return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${u};\n ${su(e.position)}\n ${Hs(e)}\n ${ru(e,i,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${zs(e,!0)}\n ${ru(e,i,!0)}\n }\n :host(:focus-visible){\n ${hu(e)}\n }\n /* Overlapping children center on both axes like the other SDKs' ZStack;\n the flex center on :host doesn't reach absolutely-positioned boxes. */\n :host > *:not(nami-text) {\n position: absolute;\n inset: 0;\n margin: auto;\n }\n :host > * {\n ${Vs(n,o)}\n }\n :host > nami-text:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.focusedBorderColor,n=t.focusedFillColor,a=t.fillColor;return!i&&sa(a,n)||(this.tabIndex=0),(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Uu(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],cF.prototype,"component",void 0),Ae([ot({type:Boolean})],cF.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],cF.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],cF.prototype,"minSDKVersion",void 0),cF=Ae([Fe("nami-stack")],cF);var mF,fF,vF,pF=e=>e,gF="nami-disabled",yF=(mF=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).active=!0,e.timeSpentOnPaywall=0,e.activeTemplate=null,e}return y(i,t.LitElement),m(i,[{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),this.minSDKVersion=e.parseToSemver(this.paywall.template.min_sdk_version),this.contextProvider=ut.create(this.paywall,this.context,this.campaign),this.contextConsumer=new ys(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(gF),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}},{key:"disconnectedCallback",value:function(){var e;M(i,"disconnectedCallback",this)([]),ut.remove(this.contextProvider),this.teardownEvent(),null===(e=this.footerResizeObserver)||void 0===e||e.disconnect(),this.active&&Co()}},{key:"userInteractionListener",value:function(e){this.classList.toggle(gF,!e.enabled)}},{key:"firstUpdated",value:function(){this.postImpression(),this.postPaywallScreenData(),this.updateActiveRenderRoot(),this.observeFooterHeight()}},{key:"updated",value:function(){this.updateActiveRenderRoot()}},{key:"updateActiveRenderRoot",value:function(){this.active&&this.activeTemplate&&(Eo(this.activeTemplate,this.contextProvider),function(e){if(Ka("setActivePageRenderRoot:enter",{hasRoot:!!e,rootType:e instanceof Element?Ya(e):e instanceof DocumentFragment?"document-fragment":String(e),activePageKey:ka,activePageAnnounced:wa,activeElement:Ya(nr())}),ba=e,e&&ga&&!wa){var t=nr();if(t&&"contains"in e&&e.contains(t))To(t);else if(e instanceof DocumentFragment){var i=e.activeElement;i&&To(i)}}}(this.renderRoot))}},{key:"observeFooterHeight",value:function(){if("undefined"!=typeof ResizeObserver){var e=this.renderRoot.querySelector("nami-footer");e&&(this.footerResizeObserver=new ResizeObserver(e=>{var t,i,n=e[e.length-1];if(n){var a=null!==(t=null===(i=n.borderBoxSize)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.blockSize)&&void 0!==t?t:n.contentRect.height;this.style.setProperty("--nami-footer-height",`${a}px`)}}),this.footerResizeObserver.observe(e))}}},{key:"postImpression",value:function(){var t,i;null!==(t=this.paywall)&&void 0!==t&&t.id&&(t=>{var i,n,a;S(function(r){for(;;)switch(r.p=r.n){case 0:if(!e.storageService.getAnonymousMode()){r.n=1;break}return e.logger.info("Skipping paywall impression - anonymous mode"),r.a(2);case 1:return(i=e.storageService.getSessionId())&&(t.session=i),(n=e.storageService.getLaunchId())&&(t.launch_id=n),t.app_env="production",t.url_params=e.getUrlParams(),e.logger.info("Post paywall impression - segment ",t.segment),r.p=2,r.n=3,o(e.NamiAPI.instance.postImpression(t));case 3:r.n=5;break;case 4:r.p=4,a=r.v,e.logger.error("Error posting impression",a);case 5:return r.a(2)}},null,null,[[2,4]],Promise)})({segment:null===(i=this.campaign)||void 0===i?void 0:i.segment,call_to_action:this.paywall.id})}},{key:"postPaywallScreenData",value:function(){var t=this.initialGroupChange();e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.SHOW_PAYWALL},t&&{componentChange:t}))}},{key:"initialGroupChange",value:function(){var e=this.contextProvider.state,t=e.groups,i=e.currentGroupId;if(!(t.length<=1)&&i){var n=t.find(({id:e})=>e===i);if(n)return{id:n.id,name:n.displayName}}}},{key:"getTemplate",value:function(){var e,t,i,n;this.contextProvider.state.selectedPaywall===this.paywall?t=this.contextProvider.state.currentPage:t=null!==(i=null===(n=this.paywall.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.currentPage)&&void 0!==i?i:"page1";var a=null===(e=this.paywall.template)||void 0===e?void 0:e.pages.find(e=>e.name===t);if(!a)throw new Error(`Page with name ${t} not found in paywall template.`);return this.activeTemplate=a,this.active&&Eo(a,this.contextProvider),a}},{key:"render",value:function(){var i,n=this.getTemplate(),a=n.backgroundContainer,r=n.header,o=void 0===r?[]:r,s=n.footer,u=void 0===s?[]:s,l=n.contentContainer,d=null!==(i=this.contextProvider.state.fullScreenPresentation)&&void 0!==i&&i,h=this.contextProvider.getFormFactor(),c=e.getDeviceScaleFactor(h);return t.html(fF||(fF=pF`
526
526
  <nami-background-container
527
527
  .component=${0}
528
528
  .scaleFactor=${0}