@namiml/web-sdk 3.4.11-dev.202609100527 → 3.4.11-dev.202609100556
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.
|
@@ -16,6 +16,8 @@ export declare class NamiSegmentPicker extends NamiElement {
|
|
|
16
16
|
private _handleClick;
|
|
17
17
|
private _handleFocusIn;
|
|
18
18
|
private _handleFocusOut;
|
|
19
|
+
/** Whether `related` (a focus event's relatedTarget) is an item of this picker. */
|
|
20
|
+
private _cameFromInside;
|
|
19
21
|
protected styles(): CSSResult;
|
|
20
22
|
render(): import("lit-html").TemplateResult<1>;
|
|
21
23
|
}
|
package/dist/nami-web.cjs
CHANGED
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
`),e,e,e,function(e){return rh[e]||rh.CheckCircleOutlined}(e))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();Ae([ot({type:Object})],Yk.prototype,"component",void 0),Ae([ot({type:Boolean})],Yk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Yk.prototype,"scaleFactor",void 0),Yk=Ae([Fe("nami-symbol")],Yk);var qk=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n=this.inFocusedState,a=e.hidden,r=e.fontSize,o=e.alignment,s=e.strikethrough,u=e.spacing;return t.unsafeCSS(`\n :host {\n ${Hk(e,i)}\n display: ${a?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${$s(e,n)}\n ${Vk(e,n)}\n font-size: ${(null!=r?r:zk)*i}px;\n text-align: ${o||"center"};\n ${qs("string"!=typeof s&&s)}\n ${Js(e.fontName)}\n ${eu(e,i,n)}\n ${Bk(e)}\n ${js(e)}\n ${function({alignment:e,horizontalAlignment:t}){return Ms("justify-content",t&&Ts[t]?Ts[t]:e&&Ts[e]?Ts[e]:"center")}(e)}\n }\n :host > :not(:first-child) {\n margin-top: ${u||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n ${Hk(e,i)}\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${$s(e,n)}\n ${Vk(e,n)}\n font-size: ${(null!=r?r:zk)*i}px;\n text-align: ${o||"center"};\n ${qs("string"!=typeof s&&s)}\n ${Js(e.fontName)}\n }\n ${Bk(e,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n /* NAM-1409: re-applied here (not only on the wrapper) so the p's own\n computed default doesn't shadow the inherited value — see NAM-2875. */\n ${Hk(e,i)}\n }\n \n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n \n `)}},{key:"render",value:function(){var e=this.component,i=e.fontColor,n=e.fontSize,a=e.activeFontColor,r=e.bulletComponent,o=e.texts,s=e.spacing,u=r?v({fontColor:i,fontSize:n,activeFontColor:a,spacing:s},r):null;if(!Array.isArray(o))return t.html(Rk||(Rk=jk``));var l=Gk(this.component),d=o.map(e=>e?t.html(Fk||(Fk=jk`<nami-text-list-item-wrapper aria-hidden="${0}" .component=${0} .scaleFactor=${0}>
|
|
460
460
|
${0}
|
|
461
461
|
<div class="bullet-text-wrapper" .innerHTML="${0}"></div>
|
|
462
|
-
</nami-text-list-item-wrapper>`),l?"true":t.nothing,this.component,this.scaleFactor,u&&t.html(Ok||(Ok=jk`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),nd(e)):null);return t.html(Wk||(Wk=jk`${0}${0}`),d,l?t.html($k||($k=jk`<span class="sr-only">${0}</span>`),l):t.nothing)}}])}();Ae([ot({type:Object})],qk.prototype,"component",void 0),Ae([ot({type:Boolean})],qk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],qk.prototype,"scaleFactor",void 0),qk=Ae([Fe("nami-text-list")],qk);(()=>{var e,t=!0;try{new RegExp("","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=nd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.inline;n&&Object.values(n).forEach(e=>{e&&Object.keys(e).forEach(t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var Jk=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return y(e,Es),m(e,[{key:"disconnectedCallback",value:function(){M(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{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(Ns(e)),l=Boolean(e.fillColor||e.fillImage),d=e.roundBorders,h=Array.isArray(d)&&d.length>0&&d.length<4,c=l&&h?"overflow: hidden;":"";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 ${c}\n ${iu(e.position)}\n ${js(e)}\n ${eu(e,i,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${$s(e,!0)}\n ${eu(e,i,!0)}\n }\n :host(:focus-visible){\n ${ou(e)}\n }\n :host > * {\n ${zs(n,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function Qk(e,t){return e===t||e!=e&&t!=t}function Zk(e,t){for(var i=e.length;i--;)if(Qk(e[i][0],t))return i;return-1}Ae([ot({type:Object})],Jk.prototype,"component",void 0),Ae([ot({type:Boolean})],Jk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Jk.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],Jk.prototype,"minSDKVersion",void 0),Jk=Ae([Fe("nami-container")],Jk);var eS=Array.prototype.splice;function tS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function iS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}tS.prototype.clear=function(){this.__data__=[],this.size=0},tS.prototype.delete=function(e){var t=this.__data__,i=Zk(t,e);return!(i<0)&&(i==t.length-1?t.pop():eS.call(t,i,1),--this.size,!0)},tS.prototype.get=function(e){var t=this.__data__,i=Zk(t,e);return i<0?void 0:t[i][1]},tS.prototype.has=function(e){return Zk(this.__data__,e)>-1},tS.prototype.set=function(e,t){var i=this.__data__,n=Zk(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function nS(e){if(!iS(e))return!1;var t=Oi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var aS,rS=Ai["__core-js_shared__"],oS=(aS=/[^.]+$/.exec(rS&&rS.keys&&rS.keys.IE_PROTO||""))?"Symbol(src)_1."+aS:"";var sS=Function.prototype.toString;function uS(e){if(null!=e){try{return sS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var lS=/^\[object .+?Constructor\]$/,dS=Function.prototype,hS=Object.prototype,cS=dS.toString,mS=hS.hasOwnProperty,fS=RegExp("^"+cS.call(mS).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vS(e){return!(!iS(e)||(t=e,oS&&oS in t))&&(nS(e)?fS:lS).test(uS(e));var t}function pS(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return vS(i)?i:void 0}var gS=pS(Ai,"Map"),yS=pS(Object,"create");var bS=Object.prototype.hasOwnProperty;var wS=Object.prototype.hasOwnProperty;function kS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function SS(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function ES(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}kS.prototype.clear=function(){this.__data__=yS?yS(null):{},this.size=0},kS.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},kS.prototype.get=function(e){var t=this.__data__;if(yS){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return bS.call(t,e)?t[e]:void 0},kS.prototype.has=function(e){var t=this.__data__;return yS?void 0!==t[e]:wS.call(t,e)},kS.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=yS&&void 0===t?"__lodash_hash_undefined__":t,this},ES.prototype.clear=function(){this.size=0,this.__data__={hash:new kS,map:new(gS||tS),string:new kS}},ES.prototype.delete=function(e){var t=SS(this,e).delete(e);return this.size-=t?1:0,t},ES.prototype.get=function(e){return SS(this,e).get(e)},ES.prototype.has=function(e){return SS(this,e).has(e)},ES.prototype.set=function(e,t){var i=SS(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function TS(e){var t=this.__data__=new tS(e);this.size=t.size}TS.prototype.clear=function(){this.__data__=new tS,this.size=0},TS.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},TS.prototype.get=function(e){return this.__data__.get(e)},TS.prototype.has=function(e){return this.__data__.has(e)},TS.prototype.set=function(e,t){var i=this.__data__;if(i instanceof tS){var n=i.__data__;if(!gS||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new ES(n)}return i.set(e,t),this.size=i.size,this};function PS(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new ES;++t<i;)this.add(e[t])}function MS(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}PS.prototype.add=PS.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},PS.prototype.has=function(e){return this.__data__.has(e)};function AS(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new PS:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!MS(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var DS=Ai.Uint8Array;function xS(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function CS(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var IS=Di?Di.prototype:void 0,LS=IS?IS.valueOf:void 0;var _S=Object.prototype.propertyIsEnumerable,RS=Object.getOwnPropertySymbols,FS=RS?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(RS(e),function(t){return _S.call(e,t)}))}:function(){return[]};function OS(e){return Wi(e)&&"[object Arguments]"==Oi(e)}var WS=Object.prototype,$S=WS.hasOwnProperty,NS=WS.propertyIsEnumerable,jS=OS(function(){return arguments}())?OS:function(e){return Wi(e)&&$S.call(e,"callee")&&!NS.call(e,"callee")};var BS="object"==typeof exports&&exports&&!exports.nodeType&&exports,zS=BS&&"object"==typeof module&&module&&!module.nodeType&&module,US=zS&&zS.exports===BS?Ai.Buffer:void 0,HS=(US?US.isBuffer:void 0)||function(){return!1},GS=/^(?:0|[1-9]\d*)$/;function VS(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&GS.test(e))&&e>-1&&e%1==0&&e<t}function KS(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var XS={};XS["[object Float32Array]"]=XS["[object Float64Array]"]=XS["[object Int8Array]"]=XS["[object Int16Array]"]=XS["[object Int32Array]"]=XS["[object Uint8Array]"]=XS["[object Uint8ClampedArray]"]=XS["[object Uint16Array]"]=XS["[object Uint32Array]"]=!0,XS["[object Arguments]"]=XS["[object Array]"]=XS["[object ArrayBuffer]"]=XS["[object Boolean]"]=XS["[object DataView]"]=XS["[object Date]"]=XS["[object Error]"]=XS["[object Function]"]=XS["[object Map]"]=XS["[object Number]"]=XS["[object Object]"]=XS["[object RegExp]"]=XS["[object Set]"]=XS["[object String]"]=XS["[object WeakMap]"]=!1;var YS,qS="object"==typeof exports&&exports&&!exports.nodeType&&exports,JS=qS&&"object"==typeof module&&module&&!module.nodeType&&module,QS=JS&&JS.exports===qS&&Pi.process,ZS=function(){try{var e=JS&&JS.require&&JS.require("util").types;return e||QS&&QS.binding&&QS.binding("util")}catch(e){}}(),eE=ZS&&ZS.isTypedArray,tE=eE?(YS=eE,function(e){return YS(e)}):function(e){return Wi(e)&&KS(e.length)&&!!XS[Oi(e)]},iE=Object.prototype.hasOwnProperty;function nE(e,t){var i=xi(e),n=!i&&jS(e),a=!i&&!n&&HS(e),r=!i&&!n&&!a&&tE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!iE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||VS(l,u))||s.push(l);return s}var aE=Object.prototype;var rE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),oE=Object.prototype.hasOwnProperty;function sE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||aE))return rE(e);var t,i,n=[];for(var a in Object(e))oE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function uE(e){return null!=(t=e)&&KS(t.length)&&!nS(t)?nE(e):sE(e);var t}function lE(e){return function(e,t,i){var n=t(e);return xi(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,uE,FS)}var dE=Object.prototype.hasOwnProperty;var hE=pS(Ai,"DataView"),cE=pS(Ai,"Promise"),mE=pS(Ai,"Set"),fE=pS(Ai,"WeakMap"),vE="[object Map]",pE="[object Promise]",gE="[object Set]",yE="[object WeakMap]",bE="[object DataView]",wE=uS(hE),kE=uS(gS),SE=uS(cE),EE=uS(mE),TE=uS(fE),PE=Oi;(hE&&PE(new hE(new ArrayBuffer(1)))!=bE||gS&&PE(new gS)!=vE||cE&&PE(cE.resolve())!=pE||mE&&PE(new mE)!=gE||fE&&PE(new fE)!=yE)&&(PE=function(e){var t=Oi(e),i="[object Object]"==t?e.constructor:void 0,n=i?uS(i):"";if(n)switch(n){case wE:return bE;case kE:return vE;case SE:return pE;case EE:return gE;case TE:return yE}return t});var ME="[object Arguments]",AE="[object Array]",DE="[object Object]",xE=Object.prototype.hasOwnProperty;function CE(e,t,i,n,a,r){var o=xi(e),s=xi(t),u=o?AE:PE(e),l=s?AE:PE(t),d=(u=u==ME?DE:u)==DE,h=(l=l==ME?DE:l)==DE,c=u==l;if(c&&HS(e)){if(!HS(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new TS),o||tE(e)?AS(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new DS(e),new DS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Qk(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=xS;case"[object Set]":var u=1&n;if(s||(s=CS),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=AS(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(LS)return LS.call(e)==LS.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&xE.call(e,"__wrapped__"),f=h&&xE.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new TS),a(v,p,i,n,r)}}return!!c&&(r||(r=new TS),function(e,t,i,n,a,r){var o=1&i,s=lE(e),u=s.length;if(u!=lE(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:dE.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function IE(e,t,i,n,a){return e===t||(null==e||null==t||!Wi(e)&&!Wi(t)?e!=e&&t!=t:CE(e,t,i,n,IE,a))}function LE(e,t){return IE(e,t)}var _E=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,i="vertical"===this.component.direction,n=i?"width":"height",a=i?"margin-top":"margin-left",r=t.unsafeCSS(Ns(this.component));return t.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${iu(this.component.position)}\n ${js(this.component)}\n ${eu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${a}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;LE(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout(()=>this.classList.add("fade-in"),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Nn(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Xn(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();Ae([ot({type:Object})],_E.prototype,"component",void 0),Ae([ot({type:Boolean})],_E.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],_E.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],_E.prototype,"minSDKVersion",void 0),_E=Ae([Fe("nami-product-container")],_E);var RE,FE,OE=e=>e;function WE(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var $E=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e,i=this.component,n=i.imageCropping,a=i.alignment,r=i.height,o=i.width,s=i.rightMargin,u=i.spacing,l=i.hidden,d=i.blur,h="fit"===n,c=this.contextConsumer.state.formFactor,m=Rs(null!=r?r:"100%",this.scaleFactor),f=Rs(null!==(e="fitContent"==o?r:o)&&void 0!==e?e:"100%",this.scaleFactor),v="string"==typeof r&&r.includes("%")||void 0===r,p="phone"===c&&v?"max-height":"height",g=WE(this.component.moveX)||WE(this.component.moveY);return t.unsafeCSS(`\n :host {\n display: ${"television"===c?"flex":"inline-block"};\n ${l?"display:none;":""}\n position: relative;\n ${g?Gs(this.component):""}\n ${p}: ${m};\n width: ${f};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${h?"contain":"cover"};\n object-position: ${a} center;\n ${p}: ${m};\n width: ${f};\n margin-right: ${s||u||0}px;\n ${d?`filter: blur(${d}px);`:""}\n flex-shrink: ${"number"==typeof o?0:1};\n }\n `)}},{key:"render",value:function(){var e,i=this.component,n=i.url,a=i.alt,r=i.title,o=i.focusedBorderColor,s=i.focusedFillColor,u=i.fillColor;return n?(!o&&oa(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t.html(RE||(RE=OE`<img src="${0}" alt="${0}" />`),n,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t.html(FE||(FE=OE``)))}}])}();Ae([ot({type:Object})],$E.prototype,"component",void 0),Ae([ot({type:Boolean})],$E.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],$E.prototype,"scaleFactor",void 0),$E=Ae([Fe("nami-image")],$E);var NE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"connectedCallback",value:function(){M(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return t.unsafeCSS("");var i=this.component,n=this.scaleFactor,a=this.contextConsumer.state.formFactor,r=i.backgroundBlur,o="vertical"===i.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n max-height: ${"television"===a?"100vh":""};\n display: ${i.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Bs(i)}\n position: var(--nami-bg-position, fixed);\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=i.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${$s(i,!1)}\n transition: all 0.3s;\n ${Hs(i,n)}\n }\n :host(:focus){\n ${$s(i,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${i.spacing?i.spacing*n:0}px;\n }\n `)}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>$u(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],NE.prototype,"component",void 0),Ae([ot({type:Boolean})],NE.prototype,"fullscreen",void 0),Ae([ot({type:Boolean})],NE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],NE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],NE.prototype,"minSDKVersion",void 0),NE=Ae([Fe("nami-background-container")],NE);var jE,BE=e=>e,zE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e,i,n=this.contextConsumer,a=this.component,r=this.zIndex,o=this.scaleFactor;if(!n)return t.css(jE||(jE=BE``));var s=n.state.formFactor,u=a.backgroundBlur,l="phone"!==s?"width: 100%;":"",d=null!==(e=a.width)&&void 0!==e?e:a.fixedWidth,h=null!==(i=a.height)&&void 0!==i?i:a.fixedHeight,c="phone"===s?`max-width:100%;\n ${void 0!==d?`width: ${Rs(d,o)};`:""}\n ${void 0!==h?`height: ${Rs(h,o)};`:""}`:Ks(a,o),m="vertical"===a.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${a.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${js(a)}\n ${c}\n ${l}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?Ts[n]:void 0,s=a?Ts[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${Ms("align-items",t)}${Ms("justify-content",i)}`}(a)}\n ${u?`backdrop-filter: blur(${u}px);`:""}\n z-index: ${r};\n transition: all 0.3s;\n overflow-y: ${"television"===s?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Hs(a,o)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${_s(o,a.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${$s(a,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${$s(a,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${m}: ${a.spacing?a.spacing*o:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();Ae([ot({type:Object})],zE.prototype,"component",void 0),Ae([ot({type:Number})],zE.prototype,"zIndex",void 0),Ae([ot({type:Boolean})],zE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],zE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],zE.prototype,"minSDKVersion",void 0),zE=Ae([Fe("nami-content-container")],zE);var UE,HE=e=>e,GE=function(){function i(){var e;return u(this,i),(e=s(this,i)).inFocusedState=!1,e.scaleFactor=1,e._anyItemFocused=!1,e._handleClick=t=>{t.preventDefault(),Io({contextProvider:e.contextProvider,onTap:e.component.onTap})},e._handleFocusIn=t=>{var i,n;"nami-segment-picker-item"===(null===(i=t.target.tagName)||void 0===i?void 0:i.toLowerCase())&&(e._isTv&&(e._anyItemFocused=!0),"television"===(null===(n=e.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&e.contextProvider.clearSelectedProduct(e.contextProvider.getCurrentGroupId()))},e._handleFocusOut=t=>{var i;if(e._isTv){var n=t.relatedTarget;if("nami-segment-picker-item"!==(null==n||null===(i=n.tagName)||void 0===i?void 0:i.toLowerCase())){var a=e.shadowRoot;n&&null!=a&&a.contains(n)||(e._anyItemFocused=!1)}}},e.addEventListener("click",e._handleClick),e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"firstUpdated",value:function(e){var t,n;M(i,"firstUpdated",this)([e]),null===(t=this.shadowRoot)||void 0===t||t.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var e,t;M(i,"disconnectedCallback",this)([]),null===(e=this.shadowRoot)||void 0===e||e.removeEventListener("focusin",this._handleFocusIn),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusout",this._handleFocusOut)}},{key:"styles",value:function(){var e,i,n,a=nu("active",this.component.components[0]),r=nu("inactive",this.component.components[0]),o=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||a.fillColor,s=this._anyItemFocused;return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${js(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${$s(this.component,!1)}\n ${eu(this.component,this.scaleFactor,s)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n .toggle{\n ${i=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${_s(n,i.topPadding)}px;\n bottom: ${_s(n,i.bottomPadding)}px;\n width: calc(50% - ${_s(n,i.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${au(r,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${au(a,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${o?`background-color: ${o} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${o?`background-color: ${o} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return t.html(UE||(UE=HE`${0}<div class="toggle"></div>`),e)}}])}();Ae([ot({type:Object})],GE.prototype,"component",void 0),Ae([ot({type:Boolean})],GE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],GE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],GE.prototype,"minSDKVersion",void 0),Ae([st()],GE.prototype,"_anyItemFocused",void 0),GE=Ae([Fe("nami-segment-picker")],GE);var VE,KE=e=>e,XE=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e._isFocused=!1,e._handleFocus=()=>{e.inFocusedState=!0,e._isTv&&(e._isFocused=!0,e.classList.add("focused"))},e._handleBlur=()=>{e.inFocusedState=!1,e._isTv&&(e._isFocused=!1,e.classList.remove("focused"))},e._handleKeyDown=t=>{"Enter"===t.key||" "===t.key||142===t.keyCode||195===t.keyCode?e._handleClick():!e._isTv||"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(e._moveFocusToSibling("ArrowRight"===t.key?1:-1),t.preventDefault())},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){M(i,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=LE(i.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach(e=>{e!==this&&e.requestUpdate("component",e)})}}}},{key:"styles",value:function(){var e,i,n=nu("active",this.component),a=nu("inactive",this.component),r=this.component.focusedFontColor||n.fontColor||a.fontColor||"";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${au(v({},a,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${Ys(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${ru(v({},n,this.component),this.scaleFactor)}\n ${Ys(null!==(i=this.component.activeDropShadow)&&void 0!==i?i:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${r?Ws(r):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",t.html(VE||(VE=KE`<input type="radio"
|
|
462
|
+
</nami-text-list-item-wrapper>`),l?"true":t.nothing,this.component,this.scaleFactor,u&&t.html(Ok||(Ok=jk`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),nd(e)):null);return t.html(Wk||(Wk=jk`${0}${0}`),d,l?t.html($k||($k=jk`<span class="sr-only">${0}</span>`),l):t.nothing)}}])}();Ae([ot({type:Object})],qk.prototype,"component",void 0),Ae([ot({type:Boolean})],qk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],qk.prototype,"scaleFactor",void 0),qk=Ae([Fe("nami-text-list")],qk);(()=>{var e,t=!0;try{new RegExp("","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=nd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.inline;n&&Object.values(n).forEach(e=>{e&&Object.keys(e).forEach(t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var Jk=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return y(e,Es),m(e,[{key:"disconnectedCallback",value:function(){M(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{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(Ns(e)),l=Boolean(e.fillColor||e.fillImage),d=e.roundBorders,h=Array.isArray(d)&&d.length>0&&d.length<4,c=l&&h?"overflow: hidden;":"";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 ${c}\n ${iu(e.position)}\n ${js(e)}\n ${eu(e,i,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${$s(e,!0)}\n ${eu(e,i,!0)}\n }\n :host(:focus-visible){\n ${ou(e)}\n }\n :host > * {\n ${zs(n,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function Qk(e,t){return e===t||e!=e&&t!=t}function Zk(e,t){for(var i=e.length;i--;)if(Qk(e[i][0],t))return i;return-1}Ae([ot({type:Object})],Jk.prototype,"component",void 0),Ae([ot({type:Boolean})],Jk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Jk.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],Jk.prototype,"minSDKVersion",void 0),Jk=Ae([Fe("nami-container")],Jk);var eS=Array.prototype.splice;function tS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function iS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}tS.prototype.clear=function(){this.__data__=[],this.size=0},tS.prototype.delete=function(e){var t=this.__data__,i=Zk(t,e);return!(i<0)&&(i==t.length-1?t.pop():eS.call(t,i,1),--this.size,!0)},tS.prototype.get=function(e){var t=this.__data__,i=Zk(t,e);return i<0?void 0:t[i][1]},tS.prototype.has=function(e){return Zk(this.__data__,e)>-1},tS.prototype.set=function(e,t){var i=this.__data__,n=Zk(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function nS(e){if(!iS(e))return!1;var t=Oi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var aS,rS=Ai["__core-js_shared__"],oS=(aS=/[^.]+$/.exec(rS&&rS.keys&&rS.keys.IE_PROTO||""))?"Symbol(src)_1."+aS:"";var sS=Function.prototype.toString;function uS(e){if(null!=e){try{return sS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var lS=/^\[object .+?Constructor\]$/,dS=Function.prototype,hS=Object.prototype,cS=dS.toString,mS=hS.hasOwnProperty,fS=RegExp("^"+cS.call(mS).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vS(e){return!(!iS(e)||(t=e,oS&&oS in t))&&(nS(e)?fS:lS).test(uS(e));var t}function pS(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return vS(i)?i:void 0}var gS=pS(Ai,"Map"),yS=pS(Object,"create");var bS=Object.prototype.hasOwnProperty;var wS=Object.prototype.hasOwnProperty;function kS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function SS(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function ES(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}kS.prototype.clear=function(){this.__data__=yS?yS(null):{},this.size=0},kS.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},kS.prototype.get=function(e){var t=this.__data__;if(yS){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return bS.call(t,e)?t[e]:void 0},kS.prototype.has=function(e){var t=this.__data__;return yS?void 0!==t[e]:wS.call(t,e)},kS.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=yS&&void 0===t?"__lodash_hash_undefined__":t,this},ES.prototype.clear=function(){this.size=0,this.__data__={hash:new kS,map:new(gS||tS),string:new kS}},ES.prototype.delete=function(e){var t=SS(this,e).delete(e);return this.size-=t?1:0,t},ES.prototype.get=function(e){return SS(this,e).get(e)},ES.prototype.has=function(e){return SS(this,e).has(e)},ES.prototype.set=function(e,t){var i=SS(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function TS(e){var t=this.__data__=new tS(e);this.size=t.size}TS.prototype.clear=function(){this.__data__=new tS,this.size=0},TS.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},TS.prototype.get=function(e){return this.__data__.get(e)},TS.prototype.has=function(e){return this.__data__.has(e)},TS.prototype.set=function(e,t){var i=this.__data__;if(i instanceof tS){var n=i.__data__;if(!gS||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new ES(n)}return i.set(e,t),this.size=i.size,this};function PS(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new ES;++t<i;)this.add(e[t])}function MS(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}PS.prototype.add=PS.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},PS.prototype.has=function(e){return this.__data__.has(e)};function AS(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new PS:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!MS(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var DS=Ai.Uint8Array;function xS(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function CS(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var IS=Di?Di.prototype:void 0,LS=IS?IS.valueOf:void 0;var _S=Object.prototype.propertyIsEnumerable,RS=Object.getOwnPropertySymbols,FS=RS?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(RS(e),function(t){return _S.call(e,t)}))}:function(){return[]};function OS(e){return Wi(e)&&"[object Arguments]"==Oi(e)}var WS=Object.prototype,$S=WS.hasOwnProperty,NS=WS.propertyIsEnumerable,jS=OS(function(){return arguments}())?OS:function(e){return Wi(e)&&$S.call(e,"callee")&&!NS.call(e,"callee")};var BS="object"==typeof exports&&exports&&!exports.nodeType&&exports,zS=BS&&"object"==typeof module&&module&&!module.nodeType&&module,US=zS&&zS.exports===BS?Ai.Buffer:void 0,HS=(US?US.isBuffer:void 0)||function(){return!1},GS=/^(?:0|[1-9]\d*)$/;function VS(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&GS.test(e))&&e>-1&&e%1==0&&e<t}function KS(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var XS={};XS["[object Float32Array]"]=XS["[object Float64Array]"]=XS["[object Int8Array]"]=XS["[object Int16Array]"]=XS["[object Int32Array]"]=XS["[object Uint8Array]"]=XS["[object Uint8ClampedArray]"]=XS["[object Uint16Array]"]=XS["[object Uint32Array]"]=!0,XS["[object Arguments]"]=XS["[object Array]"]=XS["[object ArrayBuffer]"]=XS["[object Boolean]"]=XS["[object DataView]"]=XS["[object Date]"]=XS["[object Error]"]=XS["[object Function]"]=XS["[object Map]"]=XS["[object Number]"]=XS["[object Object]"]=XS["[object RegExp]"]=XS["[object Set]"]=XS["[object String]"]=XS["[object WeakMap]"]=!1;var YS,qS="object"==typeof exports&&exports&&!exports.nodeType&&exports,JS=qS&&"object"==typeof module&&module&&!module.nodeType&&module,QS=JS&&JS.exports===qS&&Pi.process,ZS=function(){try{var e=JS&&JS.require&&JS.require("util").types;return e||QS&&QS.binding&&QS.binding("util")}catch(e){}}(),eE=ZS&&ZS.isTypedArray,tE=eE?(YS=eE,function(e){return YS(e)}):function(e){return Wi(e)&&KS(e.length)&&!!XS[Oi(e)]},iE=Object.prototype.hasOwnProperty;function nE(e,t){var i=xi(e),n=!i&&jS(e),a=!i&&!n&&HS(e),r=!i&&!n&&!a&&tE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!iE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||VS(l,u))||s.push(l);return s}var aE=Object.prototype;var rE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),oE=Object.prototype.hasOwnProperty;function sE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||aE))return rE(e);var t,i,n=[];for(var a in Object(e))oE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function uE(e){return null!=(t=e)&&KS(t.length)&&!nS(t)?nE(e):sE(e);var t}function lE(e){return function(e,t,i){var n=t(e);return xi(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,uE,FS)}var dE=Object.prototype.hasOwnProperty;var hE=pS(Ai,"DataView"),cE=pS(Ai,"Promise"),mE=pS(Ai,"Set"),fE=pS(Ai,"WeakMap"),vE="[object Map]",pE="[object Promise]",gE="[object Set]",yE="[object WeakMap]",bE="[object DataView]",wE=uS(hE),kE=uS(gS),SE=uS(cE),EE=uS(mE),TE=uS(fE),PE=Oi;(hE&&PE(new hE(new ArrayBuffer(1)))!=bE||gS&&PE(new gS)!=vE||cE&&PE(cE.resolve())!=pE||mE&&PE(new mE)!=gE||fE&&PE(new fE)!=yE)&&(PE=function(e){var t=Oi(e),i="[object Object]"==t?e.constructor:void 0,n=i?uS(i):"";if(n)switch(n){case wE:return bE;case kE:return vE;case SE:return pE;case EE:return gE;case TE:return yE}return t});var ME="[object Arguments]",AE="[object Array]",DE="[object Object]",xE=Object.prototype.hasOwnProperty;function CE(e,t,i,n,a,r){var o=xi(e),s=xi(t),u=o?AE:PE(e),l=s?AE:PE(t),d=(u=u==ME?DE:u)==DE,h=(l=l==ME?DE:l)==DE,c=u==l;if(c&&HS(e)){if(!HS(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new TS),o||tE(e)?AS(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new DS(e),new DS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Qk(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=xS;case"[object Set]":var u=1&n;if(s||(s=CS),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=AS(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(LS)return LS.call(e)==LS.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&xE.call(e,"__wrapped__"),f=h&&xE.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new TS),a(v,p,i,n,r)}}return!!c&&(r||(r=new TS),function(e,t,i,n,a,r){var o=1&i,s=lE(e),u=s.length;if(u!=lE(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:dE.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function IE(e,t,i,n,a){return e===t||(null==e||null==t||!Wi(e)&&!Wi(t)?e!=e&&t!=t:CE(e,t,i,n,IE,a))}function LE(e,t){return IE(e,t)}var _E=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,i="vertical"===this.component.direction,n=i?"width":"height",a=i?"margin-top":"margin-left",r=t.unsafeCSS(Ns(this.component));return t.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${iu(this.component.position)}\n ${js(this.component)}\n ${eu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${a}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;LE(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout(()=>this.classList.add("fade-in"),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Nn(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Xn(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();Ae([ot({type:Object})],_E.prototype,"component",void 0),Ae([ot({type:Boolean})],_E.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],_E.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],_E.prototype,"minSDKVersion",void 0),_E=Ae([Fe("nami-product-container")],_E);var RE,FE,OE=e=>e;function WE(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var $E=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e,i=this.component,n=i.imageCropping,a=i.alignment,r=i.height,o=i.width,s=i.rightMargin,u=i.spacing,l=i.hidden,d=i.blur,h="fit"===n,c=this.contextConsumer.state.formFactor,m=Rs(null!=r?r:"100%",this.scaleFactor),f=Rs(null!==(e="fitContent"==o?r:o)&&void 0!==e?e:"100%",this.scaleFactor),v="string"==typeof r&&r.includes("%")||void 0===r,p="phone"===c&&v?"max-height":"height",g=WE(this.component.moveX)||WE(this.component.moveY);return t.unsafeCSS(`\n :host {\n display: ${"television"===c?"flex":"inline-block"};\n ${l?"display:none;":""}\n position: relative;\n ${g?Gs(this.component):""}\n ${p}: ${m};\n width: ${f};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${h?"contain":"cover"};\n object-position: ${a} center;\n ${p}: ${m};\n width: ${f};\n margin-right: ${s||u||0}px;\n ${d?`filter: blur(${d}px);`:""}\n flex-shrink: ${"number"==typeof o?0:1};\n }\n `)}},{key:"render",value:function(){var e,i=this.component,n=i.url,a=i.alt,r=i.title,o=i.focusedBorderColor,s=i.focusedFillColor,u=i.fillColor;return n?(!o&&oa(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t.html(RE||(RE=OE`<img src="${0}" alt="${0}" />`),n,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t.html(FE||(FE=OE``)))}}])}();Ae([ot({type:Object})],$E.prototype,"component",void 0),Ae([ot({type:Boolean})],$E.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],$E.prototype,"scaleFactor",void 0),$E=Ae([Fe("nami-image")],$E);var NE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"connectedCallback",value:function(){M(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return t.unsafeCSS("");var i=this.component,n=this.scaleFactor,a=this.contextConsumer.state.formFactor,r=i.backgroundBlur,o="vertical"===i.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n max-height: ${"television"===a?"100vh":""};\n display: ${i.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Bs(i)}\n position: var(--nami-bg-position, fixed);\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=i.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${$s(i,!1)}\n transition: all 0.3s;\n ${Hs(i,n)}\n }\n :host(:focus){\n ${$s(i,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${i.spacing?i.spacing*n:0}px;\n }\n `)}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>$u(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],NE.prototype,"component",void 0),Ae([ot({type:Boolean})],NE.prototype,"fullscreen",void 0),Ae([ot({type:Boolean})],NE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],NE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],NE.prototype,"minSDKVersion",void 0),NE=Ae([Fe("nami-background-container")],NE);var jE,BE=e=>e,zE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e,i,n=this.contextConsumer,a=this.component,r=this.zIndex,o=this.scaleFactor;if(!n)return t.css(jE||(jE=BE``));var s=n.state.formFactor,u=a.backgroundBlur,l="phone"!==s?"width: 100%;":"",d=null!==(e=a.width)&&void 0!==e?e:a.fixedWidth,h=null!==(i=a.height)&&void 0!==i?i:a.fixedHeight,c="phone"===s?`max-width:100%;\n ${void 0!==d?`width: ${Rs(d,o)};`:""}\n ${void 0!==h?`height: ${Rs(h,o)};`:""}`:Ks(a,o),m="vertical"===a.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${a.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${js(a)}\n ${c}\n ${l}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?Ts[n]:void 0,s=a?Ts[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${Ms("align-items",t)}${Ms("justify-content",i)}`}(a)}\n ${u?`backdrop-filter: blur(${u}px);`:""}\n z-index: ${r};\n transition: all 0.3s;\n overflow-y: ${"television"===s?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Hs(a,o)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${_s(o,a.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${$s(a,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${$s(a,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${m}: ${a.spacing?a.spacing*o:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();Ae([ot({type:Object})],zE.prototype,"component",void 0),Ae([ot({type:Number})],zE.prototype,"zIndex",void 0),Ae([ot({type:Boolean})],zE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],zE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],zE.prototype,"minSDKVersion",void 0),zE=Ae([Fe("nami-content-container")],zE);var UE,HE=e=>e,GE=function(){function i(){var e;return u(this,i),(e=s(this,i)).inFocusedState=!1,e.scaleFactor=1,e._anyItemFocused=!1,e._handleClick=t=>{t.preventDefault(),Io({contextProvider:e.contextProvider,onTap:e.component.onTap})},e._handleFocusIn=t=>{var i,n,a=t.target;if("nami-segment-picker-item"===(null===(i=a.tagName)||void 0===i?void 0:i.toLowerCase())){if(e._isTv&&(e._anyItemFocused=!0,!e._cameFromInside(t.relatedTarget))){var r,o=null===(r=e.shadowRoot)||void 0===r?void 0:r.querySelector("nami-segment-picker-item.active");if(o&&o!==a)return void o.focus()}"television"===(null===(n=e.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&e.contextProvider.clearSelectedProduct(e.contextProvider.getCurrentGroupId())}},e._handleFocusOut=t=>{e._isTv&&(e._cameFromInside(t.relatedTarget)||(e._anyItemFocused=!1))},e.addEventListener("click",e._handleClick),e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"firstUpdated",value:function(e){var t,n;M(i,"firstUpdated",this)([e]),null===(t=this.shadowRoot)||void 0===t||t.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var e,t;M(i,"disconnectedCallback",this)([]),null===(e=this.shadowRoot)||void 0===e||e.removeEventListener("focusin",this._handleFocusIn),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusout",this._handleFocusOut)}},{key:"_cameFromInside",value:function(e){var t,i;return!!e&&("nami-segment-picker-item"===(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())||!(null===(i=this.shadowRoot)||void 0===i||!i.contains(e)))}},{key:"styles",value:function(){var e,i,n,a=nu("active",this.component.components[0]),r=nu("inactive",this.component.components[0]),o=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||a.fillColor,s=this._anyItemFocused;return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${js(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${$s(this.component,!1)}\n ${eu(this.component,this.scaleFactor,s)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n .toggle{\n ${i=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${_s(n,i.topPadding)}px;\n bottom: ${_s(n,i.bottomPadding)}px;\n width: calc(50% - ${_s(n,i.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${au(r,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${au(a,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${o?`background-color: ${o} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${o?`background-color: ${o} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return t.html(UE||(UE=HE`${0}<div class="toggle"></div>`),e)}}])}();Ae([ot({type:Object})],GE.prototype,"component",void 0),Ae([ot({type:Boolean})],GE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],GE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],GE.prototype,"minSDKVersion",void 0),Ae([st()],GE.prototype,"_anyItemFocused",void 0),GE=Ae([Fe("nami-segment-picker")],GE);var VE,KE=e=>e,XE=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e._isFocused=!1,e._handleFocus=()=>{e.inFocusedState=!0,e._isTv&&(e._isFocused=!0,e.classList.add("focused"))},e._handleBlur=()=>{e.inFocusedState=!1,e._isTv&&(e._isFocused=!1,e.classList.remove("focused"))},e._handleKeyDown=t=>{"Enter"===t.key||" "===t.key||142===t.keyCode||195===t.keyCode?e._handleClick():!e._isTv||"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(e._moveFocusToSibling("ArrowRight"===t.key?1:-1),t.preventDefault())},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){M(i,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=LE(i.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach(e=>{e!==this&&e.requestUpdate("component",e)})}}}},{key:"styles",value:function(){var e,i,n=nu("active",this.component),a=nu("inactive",this.component),r=this.component.focusedFontColor||n.fontColor||a.fontColor||"";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${au(v({},a,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${Ys(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${ru(v({},n,this.component),this.scaleFactor)}\n ${Ys(null!==(i=this.component.activeDropShadow)&&void 0!==i?i:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${r?Ws(r):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",t.html(VE||(VE=KE`<input type="radio"
|
|
463
463
|
autocomplete="off"
|
|
464
464
|
id="${0}"
|
|
465
465
|
name="${0}"
|
package/dist/nami-web.d.ts
CHANGED
|
@@ -263,6 +263,8 @@ declare class NamiSegmentPicker extends NamiElement {
|
|
|
263
263
|
private _handleClick;
|
|
264
264
|
private _handleFocusIn;
|
|
265
265
|
private _handleFocusOut;
|
|
266
|
+
/** Whether `related` (a focus event's relatedTarget) is an item of this picker. */
|
|
267
|
+
private _cameFromInside;
|
|
266
268
|
protected styles(): CSSResult;
|
|
267
269
|
render(): lit_html.TemplateResult<1>;
|
|
268
270
|
}
|
package/dist/nami-web.mjs
CHANGED
|
@@ -459,7 +459,7 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
|
|
|
459
459
|
`),e,e,e,function(e){return qh[e]||qh.CheckCircleOutlined}(e))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();yt([Jt({type:Object})],jS.prototype,"component",void 0),yt([Jt({type:Boolean})],jS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],jS.prototype,"scaleFactor",void 0),jS=yt([Pt("nami-symbol")],jS);var BS=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.inFocusedState,n=e.hidden,a=e.fontSize,r=e.alignment,o=e.strikethrough,s=e.spacing;return H(`\n :host {\n ${FS(e,t)}\n display: ${n?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${xu(e,i)}\n ${WS(e,i)}\n font-size: ${(null!=a?a:_S)*t}px;\n text-align: ${r||"center"};\n ${Bu("string"!=typeof o&&o)}\n ${zu(e.fontName)}\n ${Gu(e,t,i)}\n ${LS(e)}\n ${Iu(e)}\n ${function({alignment:e,horizontalAlignment:t}){return gu("justify-content",t&&vu[t]?vu[t]:e&&vu[e]?vu[e]:"center")}(e)}\n }\n :host > :not(:first-child) {\n margin-top: ${s||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n ${FS(e,t)}\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${xu(e,i)}\n ${WS(e,i)}\n font-size: ${(null!=a?a:_S)*t}px;\n text-align: ${r||"center"};\n ${Bu("string"!=typeof o&&o)}\n ${zu(e.fontName)}\n }\n ${LS(e,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n /* NAM-1409: re-applied here (not only on the wrapper) so the p's own\n computed default doesn't shadow the inherited value — see NAM-2875. */\n ${FS(e,t)}\n }\n \n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n \n `)}},{key:"render",value:function(){var e=this.component,t=e.fontColor,i=e.fontSize,n=e.activeFontColor,a=e.bulletComponent,r=e.texts,o=e.spacing,s=a?oe({fontColor:t,fontSize:i,activeFontColor:n,spacing:o},a):null;if(!Array.isArray(r))return z(MS||(MS=IS``));var u=OS(this.component),l=r.map(e=>e?z(PS||(PS=IS`<nami-text-list-item-wrapper aria-hidden="${0}" .component=${0} .scaleFactor=${0}>
|
|
460
460
|
${0}
|
|
461
461
|
<div class="bullet-text-wrapper" .innerHTML="${0}"></div>
|
|
462
|
-
</nami-text-list-item-wrapper>`),u?"true":V,this.component,this.scaleFactor,s&&z(AS||(AS=IS`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),s,this.scaleFactor),Xd(e)):null);return z(DS||(DS=IS`${0}${0}`),l,u?z(xS||(xS=IS`<span class="sr-only">${0}</span>`),u):V)}}])}();yt([Jt({type:Object})],BS.prototype,"component",void 0),yt([Jt({type:Boolean})],BS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],BS.prototype,"scaleFactor",void 0),BS=yt([Pt("nami-text-list")],BS);(()=>{var e,t=!0;try{new RegExp("","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=Xd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.inline;n&&Object.values(n).forEach(e=>{e&&Object.keys(e).forEach(t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var zS=function(){function e(){var t;return Z(this,e),(t=Q(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return le(e,fu),ae(e,[{key:"disconnectedCallback",value:function(){ge(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.minSDKVersion,n=e.backgroundBlur,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=H(Cu(e)),u=Boolean(e.fillColor||e.fillImage),l=e.roundBorders,d=Array.isArray(l)&&l.length>0&&l.length<4,h=u&&d?"overflow: hidden;":"";return H(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${n?`backdrop-filter: blur(${n}px);`:""}\n ${s};\n ${h}\n ${Ku(e.position)}\n ${Iu(e)}\n ${Gu(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${xu(e,!0)}\n ${Gu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Ju(e)}\n }\n :host > * {\n ${_u(i,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function US(e,t){return e===t||e!=e&&t!=t}function HS(e,t){for(var i=e.length;i--;)if(US(e[i][0],t))return i;return-1}yt([Jt({type:Object})],zS.prototype,"component",void 0),yt([Jt({type:Boolean})],zS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],zS.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],zS.prototype,"minSDKVersion",void 0),zS=yt([Pt("nami-container")],zS);var GS=Array.prototype.splice;function VS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function KS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}VS.prototype.clear=function(){this.__data__=[],this.size=0},VS.prototype.delete=function(e){var t=this.__data__,i=HS(t,e);return!(i<0)&&(i==t.length-1?t.pop():GS.call(t,i,1),--this.size,!0)},VS.prototype.get=function(e){var t=this.__data__,i=HS(t,e);return i<0?void 0:t[i][1]},VS.prototype.has=function(e){return HS(this.__data__,e)>-1},VS.prototype.set=function(e,t){var i=this.__data__,n=HS(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function XS(e){if(!KS(e))return!1;var t=Dn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var YS,qS=bn["__core-js_shared__"],JS=(YS=/[^.]+$/.exec(qS&&qS.keys&&qS.keys.IE_PROTO||""))?"Symbol(src)_1."+YS:"";var QS=Function.prototype.toString;function ZS(e){if(null!=e){try{return QS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var eE=/^\[object .+?Constructor\]$/,tE=Function.prototype,iE=Object.prototype,nE=tE.toString,aE=iE.hasOwnProperty,rE=RegExp("^"+nE.call(aE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oE(e){return!(!KS(e)||(t=e,JS&&JS in t))&&(XS(e)?rE:eE).test(ZS(e));var t}function sE(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return oE(i)?i:void 0}var uE=sE(bn,"Map"),lE=sE(Object,"create");var dE=Object.prototype.hasOwnProperty;var hE=Object.prototype.hasOwnProperty;function cE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function mE(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function fE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}cE.prototype.clear=function(){this.__data__=lE?lE(null):{},this.size=0},cE.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},cE.prototype.get=function(e){var t=this.__data__;if(lE){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return dE.call(t,e)?t[e]:void 0},cE.prototype.has=function(e){var t=this.__data__;return lE?void 0!==t[e]:hE.call(t,e)},cE.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=lE&&void 0===t?"__lodash_hash_undefined__":t,this},fE.prototype.clear=function(){this.size=0,this.__data__={hash:new cE,map:new(uE||VS),string:new cE}},fE.prototype.delete=function(e){var t=mE(this,e).delete(e);return this.size-=t?1:0,t},fE.prototype.get=function(e){return mE(this,e).get(e)},fE.prototype.has=function(e){return mE(this,e).has(e)},fE.prototype.set=function(e,t){var i=mE(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function vE(e){var t=this.__data__=new VS(e);this.size=t.size}vE.prototype.clear=function(){this.__data__=new VS,this.size=0},vE.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},vE.prototype.get=function(e){return this.__data__.get(e)},vE.prototype.has=function(e){return this.__data__.has(e)},vE.prototype.set=function(e,t){var i=this.__data__;if(i instanceof VS){var n=i.__data__;if(!uE||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new fE(n)}return i.set(e,t),this.size=i.size,this};function pE(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new fE;++t<i;)this.add(e[t])}function gE(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}pE.prototype.add=pE.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},pE.prototype.has=function(e){return this.__data__.has(e)};function yE(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new pE:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!gE(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var bE=bn.Uint8Array;function wE(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function kE(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var SE=wn?wn.prototype:void 0,EE=SE?SE.valueOf:void 0;var TE=Object.prototype.propertyIsEnumerable,ME=Object.getOwnPropertySymbols,PE=ME?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(ME(e),function(t){return TE.call(e,t)}))}:function(){return[]};function AE(e){return xn(e)&&"[object Arguments]"==Dn(e)}var DE=Object.prototype,xE=DE.hasOwnProperty,CE=DE.propertyIsEnumerable,IE=AE(function(){return arguments}())?AE:function(e){return xn(e)&&xE.call(e,"callee")&&!CE.call(e,"callee")};var LE="object"==typeof exports&&exports&&!exports.nodeType&&exports,_E=LE&&"object"==typeof module&&module&&!module.nodeType&&module,RE=_E&&_E.exports===LE?bn.Buffer:void 0,FE=(RE?RE.isBuffer:void 0)||function(){return!1},OE=/^(?:0|[1-9]\d*)$/;function WE(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&OE.test(e))&&e>-1&&e%1==0&&e<t}function $E(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var NE={};NE["[object Float32Array]"]=NE["[object Float64Array]"]=NE["[object Int8Array]"]=NE["[object Int16Array]"]=NE["[object Int32Array]"]=NE["[object Uint8Array]"]=NE["[object Uint8ClampedArray]"]=NE["[object Uint16Array]"]=NE["[object Uint32Array]"]=!0,NE["[object Arguments]"]=NE["[object Array]"]=NE["[object ArrayBuffer]"]=NE["[object Boolean]"]=NE["[object DataView]"]=NE["[object Date]"]=NE["[object Error]"]=NE["[object Function]"]=NE["[object Map]"]=NE["[object Number]"]=NE["[object Object]"]=NE["[object RegExp]"]=NE["[object Set]"]=NE["[object String]"]=NE["[object WeakMap]"]=!1;var jE,BE="object"==typeof exports&&exports&&!exports.nodeType&&exports,zE=BE&&"object"==typeof module&&module&&!module.nodeType&&module,UE=zE&&zE.exports===BE&&gn.process,HE=function(){try{var e=zE&&zE.require&&zE.require("util").types;return e||UE&&UE.binding&&UE.binding("util")}catch(e){}}(),GE=HE&&HE.isTypedArray,VE=GE?(jE=GE,function(e){return jE(e)}):function(e){return xn(e)&&$E(e.length)&&!!NE[Dn(e)]},KE=Object.prototype.hasOwnProperty;function XE(e,t){var i=kn(e),n=!i&&IE(e),a=!i&&!n&&FE(e),r=!i&&!n&&!a&&VE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!KE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||WE(l,u))||s.push(l);return s}var YE=Object.prototype;var qE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),JE=Object.prototype.hasOwnProperty;function QE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||YE))return qE(e);var t,i,n=[];for(var a in Object(e))JE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function ZE(e){return null!=(t=e)&&$E(t.length)&&!XS(t)?XE(e):QE(e);var t}function eT(e){return function(e,t,i){var n=t(e);return kn(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,ZE,PE)}var tT=Object.prototype.hasOwnProperty;var iT=sE(bn,"DataView"),nT=sE(bn,"Promise"),aT=sE(bn,"Set"),rT=sE(bn,"WeakMap"),oT="[object Map]",sT="[object Promise]",uT="[object Set]",lT="[object WeakMap]",dT="[object DataView]",hT=ZS(iT),cT=ZS(uE),mT=ZS(nT),fT=ZS(aT),vT=ZS(rT),pT=Dn;(iT&&pT(new iT(new ArrayBuffer(1)))!=dT||uE&&pT(new uE)!=oT||nT&&pT(nT.resolve())!=sT||aT&&pT(new aT)!=uT||rT&&pT(new rT)!=lT)&&(pT=function(e){var t=Dn(e),i="[object Object]"==t?e.constructor:void 0,n=i?ZS(i):"";if(n)switch(n){case hT:return dT;case cT:return oT;case mT:return sT;case fT:return uT;case vT:return lT}return t});var gT="[object Arguments]",yT="[object Array]",bT="[object Object]",wT=Object.prototype.hasOwnProperty;function kT(e,t,i,n,a,r){var o=kn(e),s=kn(t),u=o?yT:pT(e),l=s?yT:pT(t),d=(u=u==gT?bT:u)==bT,h=(l=l==gT?bT:l)==bT,c=u==l;if(c&&FE(e)){if(!FE(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new vE),o||VE(e)?yE(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new bE(e),new bE(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return US(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=wE;case"[object Set]":var u=1&n;if(s||(s=kE),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=yE(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(EE)return EE.call(e)==EE.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&wT.call(e,"__wrapped__"),f=h&&wT.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new vE),a(v,p,i,n,r)}}return!!c&&(r||(r=new vE),function(e,t,i,n,a,r){var o=1&i,s=eT(e),u=s.length;if(u!=eT(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:tT.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function ST(e,t,i,n,a){return e===t||(null==e||null==t||!xn(e)&&!xn(t)?e!=e&&t!=t:kT(e,t,i,n,ST,a))}function ET(e,t){return ST(e,t)}var TT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,t="vertical"===this.component.direction,i=t?"width":"height",n=t?"margin-top":"margin-left",a=H(Cu(this.component));return H(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${a};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Ku(this.component.position)}\n ${Iu(this.component)}\n ${Gu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${n}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${xu(this.component,!0)}\n ${Gu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Ju(this.component)}\n }\n :host > * {\n ${i}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;ET(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout(()=>this.classList.add("fade-in"),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Ca(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Na(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();yt([Jt({type:Object})],TT.prototype,"component",void 0),yt([Jt({type:Boolean})],TT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],TT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],TT.prototype,"minSDKVersion",void 0),TT=yt([Pt("nami-product-container")],TT);var MT,PT,AT=e=>e;function DT(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var xT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e,t=this.component,i=t.imageCropping,n=t.alignment,a=t.height,r=t.width,o=t.rightMargin,s=t.spacing,u=t.hidden,l=t.blur,d="fit"===i,h=this.contextConsumer.state.formFactor,c=Mu(null!=a?a:"100%",this.scaleFactor),m=Mu(null!==(e="fitContent"==r?a:r)&&void 0!==e?e:"100%",this.scaleFactor),f="string"==typeof a&&a.includes("%")||void 0===a,v="phone"===h&&f?"max-height":"height",p=DT(this.component.moveX)||DT(this.component.moveY);return H(`\n :host {\n display: ${"television"===h?"flex":"inline-block"};\n ${u?"display:none;":""}\n position: relative;\n ${p?Ou(this.component):""}\n ${v}: ${c};\n width: ${m};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${d?"contain":"cover"};\n object-position: ${n} center;\n ${v}: ${c};\n width: ${m};\n margin-right: ${o||s||0}px;\n ${l?`filter: blur(${l}px);`:""}\n flex-shrink: ${"number"==typeof r?0:1};\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.url,n=t.alt,a=t.title,r=t.focusedBorderColor,o=t.focusedFillColor,s=t.fillColor;return i?(!r&&Ja(s,o)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=n?n:a)&&void 0!==e?e:"",z(MT||(MT=AT`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,z(PT||(PT=AT``)))}}])}();yt([Jt({type:Object})],xT.prototype,"component",void 0),yt([Jt({type:Boolean})],xT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],xT.prototype,"scaleFactor",void 0),xT=yt([Pt("nami-image")],xT);var CT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"connectedCallback",value:function(){ge(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return H("");var t=this.component,i=this.scaleFactor,n=this.contextConsumer.state.formFactor,a=t.backgroundBlur,r="vertical"===t.direction?"margin-top":"margin-left";return H(`\n :host {\n max-height: ${"television"===n?"100vh":""};\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Lu(t)}\n position: var(--nami-bg-position, fixed);\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=t.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${xu(t,!1)}\n transition: all 0.3s;\n ${Fu(t,i)}\n }\n :host(:focus){\n ${xu(t,!0)}\n }\n :host > *:not(:first-child) {\n ${r}: ${t.spacing?t.spacing*i:0}px;\n }\n `)}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>xl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();yt([Jt({type:Object})],CT.prototype,"component",void 0),yt([Jt({type:Boolean})],CT.prototype,"fullscreen",void 0),yt([Jt({type:Boolean})],CT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],CT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],CT.prototype,"minSDKVersion",void 0),CT=yt([Pt("nami-background-container")],CT);var IT,LT=e=>e,_T=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e,t,i=this.contextConsumer,n=this.component,a=this.zIndex,r=this.scaleFactor;if(!i)return B(IT||(IT=LT``));var o=i.state.formFactor,s=n.backgroundBlur,u="phone"!==o?"width: 100%;":"",l=null!==(e=n.width)&&void 0!==e?e:n.fixedWidth,d=null!==(t=n.height)&&void 0!==t?t:n.fixedHeight,h="phone"===o?`max-width:100%;\n ${void 0!==l?`width: ${Mu(l,r)};`:""}\n ${void 0!==d?`height: ${Mu(d,r)};`:""}`:$u(n,r),c="vertical"===n.direction?"margin-top":"margin-left";return H(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Iu(n)}\n ${h}\n ${u}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?vu[n]:void 0,s=a?vu[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${gu("align-items",t)}${gu("justify-content",i)}`}(n)}\n ${s?`backdrop-filter: blur(${s}px);`:""}\n z-index: ${a};\n transition: all 0.3s;\n overflow-y: ${"television"===o?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Fu(n,r)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${Tu(r,n.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${xu(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${xu(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${c}: ${n.spacing?n.spacing*r:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();yt([Jt({type:Object})],_T.prototype,"component",void 0),yt([Jt({type:Number})],_T.prototype,"zIndex",void 0),yt([Jt({type:Boolean})],_T.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],_T.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],_T.prototype,"minSDKVersion",void 0),_T=yt([Pt("nami-content-container")],_T);var RT,FT=e=>e,OT=function(){function e(){var t;return Z(this,e),(t=Q(this,e)).inFocusedState=!1,t.scaleFactor=1,t._anyItemFocused=!1,t._handleClick=e=>{e.preventDefault(),Ss({contextProvider:t.contextProvider,onTap:t.component.onTap})},t._handleFocusIn=e=>{var i,n;"nami-segment-picker-item"===(null===(i=e.target.tagName)||void 0===i?void 0:i.toLowerCase())&&(t._isTv&&(t._anyItemFocused=!0),"television"===(null===(n=t.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&t.contextProvider.clearSelectedProduct(t.contextProvider.getCurrentGroupId()))},t._handleFocusOut=e=>{var i;if(t._isTv){var n=e.relatedTarget;if("nami-segment-picker-item"!==(null==n||null===(i=n.tagName)||void 0===i?void 0:i.toLowerCase())){var a=t.shadowRoot;n&&null!=a&&a.contains(n)||(t._anyItemFocused=!1)}}},t.addEventListener("click",t._handleClick),t}return le(e,fu),ae(e,[{key:"_isTv",get:function(){return"television"===m()}},{key:"firstUpdated",value:function(t){var i,n;ge(e,"firstUpdated",this)([t]),null===(i=this.shadowRoot)||void 0===i||i.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var t,i;ge(e,"disconnectedCallback",this)([]),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusin",this._handleFocusIn),null===(i=this.shadowRoot)||void 0===i||i.removeEventListener("focusout",this._handleFocusOut)}},{key:"styles",value:function(){var e,t,i,n=Xu("active",this.component.components[0]),a=Xu("inactive",this.component.components[0]),r=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||n.fillColor,o=this._anyItemFocused;return H(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Iu(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${xu(this.component,!1)}\n ${Gu(this.component,this.scaleFactor,o)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${xu(this.component,!0)}\n ${Gu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Ju(this.component)}\n }\n .toggle{\n ${t=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Tu(i,t.topPadding)}px;\n bottom: ${Tu(i,t.bottomPadding)}px;\n width: calc(50% - ${Tu(i,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Yu(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${Yu(n,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${xu(n,!0)}\n ${qu(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${xu(n,!0)}\n ${qu(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return z(RT||(RT=FT`${0}<div class="toggle"></div>`),e)}}])}();yt([Jt({type:Object})],OT.prototype,"component",void 0),yt([Jt({type:Boolean})],OT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],OT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],OT.prototype,"minSDKVersion",void 0),yt([Qt()],OT.prototype,"_anyItemFocused",void 0),OT=yt([Pt("nami-segment-picker")],OT);var WT,$T=e=>e,NT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._isFocused=!1,t._handleFocus=()=>{t.inFocusedState=!0,t._isTv&&(t._isFocused=!0,t.classList.add("focused"))},t._handleBlur=()=>{t.inFocusedState=!1,t._isTv&&(t._isFocused=!1,t.classList.remove("focused"))},t._handleKeyDown=e=>{"Enter"===e.key||" "===e.key||142===e.keyCode||195===e.keyCode?t._handleClick():!t._isTv||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(t._moveFocusToSibling("ArrowRight"===e.key?1:-1),e.preventDefault())},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return le(e,fu),ae(e,[{key:"_isTv",get:function(){return"television"===m()}},{key:"connectedCallback",value:function(){ge(e,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){ge(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=ET(i.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach(e=>{e!==this&&e.requestUpdate("component",e)})}}}},{key:"styles",value:function(){var e,t,i=Xu("active",this.component),n=Xu("inactive",this.component),a=this.component.focusedFontColor||i.fontColor||n.fontColor||"";return H(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${Yu(oe({},n,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${ju(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${qu(oe({},i,this.component),this.scaleFactor)}\n ${ju(null!==(t=this.component.activeDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${a?Du(a):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",z(WT||(WT=$T`<input type="radio"
|
|
462
|
+
</nami-text-list-item-wrapper>`),u?"true":V,this.component,this.scaleFactor,s&&z(AS||(AS=IS`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),s,this.scaleFactor),Xd(e)):null);return z(DS||(DS=IS`${0}${0}`),l,u?z(xS||(xS=IS`<span class="sr-only">${0}</span>`),u):V)}}])}();yt([Jt({type:Object})],BS.prototype,"component",void 0),yt([Jt({type:Boolean})],BS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],BS.prototype,"scaleFactor",void 0),BS=yt([Pt("nami-text-list")],BS);(()=>{var e,t=!0;try{new RegExp("","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=Xd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.inline;n&&Object.values(n).forEach(e=>{e&&Object.keys(e).forEach(t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var zS=function(){function e(){var t;return Z(this,e),(t=Q(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return le(e,fu),ae(e,[{key:"disconnectedCallback",value:function(){ge(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.minSDKVersion,n=e.backgroundBlur,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=H(Cu(e)),u=Boolean(e.fillColor||e.fillImage),l=e.roundBorders,d=Array.isArray(l)&&l.length>0&&l.length<4,h=u&&d?"overflow: hidden;":"";return H(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${n?`backdrop-filter: blur(${n}px);`:""}\n ${s};\n ${h}\n ${Ku(e.position)}\n ${Iu(e)}\n ${Gu(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${xu(e,!0)}\n ${Gu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Ju(e)}\n }\n :host > * {\n ${_u(i,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function US(e,t){return e===t||e!=e&&t!=t}function HS(e,t){for(var i=e.length;i--;)if(US(e[i][0],t))return i;return-1}yt([Jt({type:Object})],zS.prototype,"component",void 0),yt([Jt({type:Boolean})],zS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],zS.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],zS.prototype,"minSDKVersion",void 0),zS=yt([Pt("nami-container")],zS);var GS=Array.prototype.splice;function VS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function KS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}VS.prototype.clear=function(){this.__data__=[],this.size=0},VS.prototype.delete=function(e){var t=this.__data__,i=HS(t,e);return!(i<0)&&(i==t.length-1?t.pop():GS.call(t,i,1),--this.size,!0)},VS.prototype.get=function(e){var t=this.__data__,i=HS(t,e);return i<0?void 0:t[i][1]},VS.prototype.has=function(e){return HS(this.__data__,e)>-1},VS.prototype.set=function(e,t){var i=this.__data__,n=HS(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function XS(e){if(!KS(e))return!1;var t=Dn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var YS,qS=bn["__core-js_shared__"],JS=(YS=/[^.]+$/.exec(qS&&qS.keys&&qS.keys.IE_PROTO||""))?"Symbol(src)_1."+YS:"";var QS=Function.prototype.toString;function ZS(e){if(null!=e){try{return QS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var eE=/^\[object .+?Constructor\]$/,tE=Function.prototype,iE=Object.prototype,nE=tE.toString,aE=iE.hasOwnProperty,rE=RegExp("^"+nE.call(aE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oE(e){return!(!KS(e)||(t=e,JS&&JS in t))&&(XS(e)?rE:eE).test(ZS(e));var t}function sE(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return oE(i)?i:void 0}var uE=sE(bn,"Map"),lE=sE(Object,"create");var dE=Object.prototype.hasOwnProperty;var hE=Object.prototype.hasOwnProperty;function cE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function mE(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function fE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}cE.prototype.clear=function(){this.__data__=lE?lE(null):{},this.size=0},cE.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},cE.prototype.get=function(e){var t=this.__data__;if(lE){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return dE.call(t,e)?t[e]:void 0},cE.prototype.has=function(e){var t=this.__data__;return lE?void 0!==t[e]:hE.call(t,e)},cE.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=lE&&void 0===t?"__lodash_hash_undefined__":t,this},fE.prototype.clear=function(){this.size=0,this.__data__={hash:new cE,map:new(uE||VS),string:new cE}},fE.prototype.delete=function(e){var t=mE(this,e).delete(e);return this.size-=t?1:0,t},fE.prototype.get=function(e){return mE(this,e).get(e)},fE.prototype.has=function(e){return mE(this,e).has(e)},fE.prototype.set=function(e,t){var i=mE(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function vE(e){var t=this.__data__=new VS(e);this.size=t.size}vE.prototype.clear=function(){this.__data__=new VS,this.size=0},vE.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},vE.prototype.get=function(e){return this.__data__.get(e)},vE.prototype.has=function(e){return this.__data__.has(e)},vE.prototype.set=function(e,t){var i=this.__data__;if(i instanceof VS){var n=i.__data__;if(!uE||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new fE(n)}return i.set(e,t),this.size=i.size,this};function pE(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new fE;++t<i;)this.add(e[t])}function gE(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}pE.prototype.add=pE.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},pE.prototype.has=function(e){return this.__data__.has(e)};function yE(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new pE:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!gE(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var bE=bn.Uint8Array;function wE(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function kE(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var SE=wn?wn.prototype:void 0,EE=SE?SE.valueOf:void 0;var TE=Object.prototype.propertyIsEnumerable,ME=Object.getOwnPropertySymbols,PE=ME?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(ME(e),function(t){return TE.call(e,t)}))}:function(){return[]};function AE(e){return xn(e)&&"[object Arguments]"==Dn(e)}var DE=Object.prototype,xE=DE.hasOwnProperty,CE=DE.propertyIsEnumerable,IE=AE(function(){return arguments}())?AE:function(e){return xn(e)&&xE.call(e,"callee")&&!CE.call(e,"callee")};var LE="object"==typeof exports&&exports&&!exports.nodeType&&exports,_E=LE&&"object"==typeof module&&module&&!module.nodeType&&module,RE=_E&&_E.exports===LE?bn.Buffer:void 0,FE=(RE?RE.isBuffer:void 0)||function(){return!1},OE=/^(?:0|[1-9]\d*)$/;function WE(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&OE.test(e))&&e>-1&&e%1==0&&e<t}function $E(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var NE={};NE["[object Float32Array]"]=NE["[object Float64Array]"]=NE["[object Int8Array]"]=NE["[object Int16Array]"]=NE["[object Int32Array]"]=NE["[object Uint8Array]"]=NE["[object Uint8ClampedArray]"]=NE["[object Uint16Array]"]=NE["[object Uint32Array]"]=!0,NE["[object Arguments]"]=NE["[object Array]"]=NE["[object ArrayBuffer]"]=NE["[object Boolean]"]=NE["[object DataView]"]=NE["[object Date]"]=NE["[object Error]"]=NE["[object Function]"]=NE["[object Map]"]=NE["[object Number]"]=NE["[object Object]"]=NE["[object RegExp]"]=NE["[object Set]"]=NE["[object String]"]=NE["[object WeakMap]"]=!1;var jE,BE="object"==typeof exports&&exports&&!exports.nodeType&&exports,zE=BE&&"object"==typeof module&&module&&!module.nodeType&&module,UE=zE&&zE.exports===BE&&gn.process,HE=function(){try{var e=zE&&zE.require&&zE.require("util").types;return e||UE&&UE.binding&&UE.binding("util")}catch(e){}}(),GE=HE&&HE.isTypedArray,VE=GE?(jE=GE,function(e){return jE(e)}):function(e){return xn(e)&&$E(e.length)&&!!NE[Dn(e)]},KE=Object.prototype.hasOwnProperty;function XE(e,t){var i=kn(e),n=!i&&IE(e),a=!i&&!n&&FE(e),r=!i&&!n&&!a&&VE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!KE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||WE(l,u))||s.push(l);return s}var YE=Object.prototype;var qE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),JE=Object.prototype.hasOwnProperty;function QE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||YE))return qE(e);var t,i,n=[];for(var a in Object(e))JE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function ZE(e){return null!=(t=e)&&$E(t.length)&&!XS(t)?XE(e):QE(e);var t}function eT(e){return function(e,t,i){var n=t(e);return kn(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,ZE,PE)}var tT=Object.prototype.hasOwnProperty;var iT=sE(bn,"DataView"),nT=sE(bn,"Promise"),aT=sE(bn,"Set"),rT=sE(bn,"WeakMap"),oT="[object Map]",sT="[object Promise]",uT="[object Set]",lT="[object WeakMap]",dT="[object DataView]",hT=ZS(iT),cT=ZS(uE),mT=ZS(nT),fT=ZS(aT),vT=ZS(rT),pT=Dn;(iT&&pT(new iT(new ArrayBuffer(1)))!=dT||uE&&pT(new uE)!=oT||nT&&pT(nT.resolve())!=sT||aT&&pT(new aT)!=uT||rT&&pT(new rT)!=lT)&&(pT=function(e){var t=Dn(e),i="[object Object]"==t?e.constructor:void 0,n=i?ZS(i):"";if(n)switch(n){case hT:return dT;case cT:return oT;case mT:return sT;case fT:return uT;case vT:return lT}return t});var gT="[object Arguments]",yT="[object Array]",bT="[object Object]",wT=Object.prototype.hasOwnProperty;function kT(e,t,i,n,a,r){var o=kn(e),s=kn(t),u=o?yT:pT(e),l=s?yT:pT(t),d=(u=u==gT?bT:u)==bT,h=(l=l==gT?bT:l)==bT,c=u==l;if(c&&FE(e)){if(!FE(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new vE),o||VE(e)?yE(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new bE(e),new bE(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return US(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=wE;case"[object Set]":var u=1&n;if(s||(s=kE),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=yE(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(EE)return EE.call(e)==EE.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&wT.call(e,"__wrapped__"),f=h&&wT.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new vE),a(v,p,i,n,r)}}return!!c&&(r||(r=new vE),function(e,t,i,n,a,r){var o=1&i,s=eT(e),u=s.length;if(u!=eT(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:tT.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function ST(e,t,i,n,a){return e===t||(null==e||null==t||!xn(e)&&!xn(t)?e!=e&&t!=t:kT(e,t,i,n,ST,a))}function ET(e,t){return ST(e,t)}var TT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,t="vertical"===this.component.direction,i=t?"width":"height",n=t?"margin-top":"margin-left",a=H(Cu(this.component));return H(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${a};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Ku(this.component.position)}\n ${Iu(this.component)}\n ${Gu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${n}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${xu(this.component,!0)}\n ${Gu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Ju(this.component)}\n }\n :host > * {\n ${i}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;ET(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout(()=>this.classList.add("fade-in"),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Ca(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Na(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();yt([Jt({type:Object})],TT.prototype,"component",void 0),yt([Jt({type:Boolean})],TT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],TT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],TT.prototype,"minSDKVersion",void 0),TT=yt([Pt("nami-product-container")],TT);var MT,PT,AT=e=>e;function DT(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var xT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e,t=this.component,i=t.imageCropping,n=t.alignment,a=t.height,r=t.width,o=t.rightMargin,s=t.spacing,u=t.hidden,l=t.blur,d="fit"===i,h=this.contextConsumer.state.formFactor,c=Mu(null!=a?a:"100%",this.scaleFactor),m=Mu(null!==(e="fitContent"==r?a:r)&&void 0!==e?e:"100%",this.scaleFactor),f="string"==typeof a&&a.includes("%")||void 0===a,v="phone"===h&&f?"max-height":"height",p=DT(this.component.moveX)||DT(this.component.moveY);return H(`\n :host {\n display: ${"television"===h?"flex":"inline-block"};\n ${u?"display:none;":""}\n position: relative;\n ${p?Ou(this.component):""}\n ${v}: ${c};\n width: ${m};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${d?"contain":"cover"};\n object-position: ${n} center;\n ${v}: ${c};\n width: ${m};\n margin-right: ${o||s||0}px;\n ${l?`filter: blur(${l}px);`:""}\n flex-shrink: ${"number"==typeof r?0:1};\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.url,n=t.alt,a=t.title,r=t.focusedBorderColor,o=t.focusedFillColor,s=t.fillColor;return i?(!r&&Ja(s,o)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=n?n:a)&&void 0!==e?e:"",z(MT||(MT=AT`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,z(PT||(PT=AT``)))}}])}();yt([Jt({type:Object})],xT.prototype,"component",void 0),yt([Jt({type:Boolean})],xT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],xT.prototype,"scaleFactor",void 0),xT=yt([Pt("nami-image")],xT);var CT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"connectedCallback",value:function(){ge(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return H("");var t=this.component,i=this.scaleFactor,n=this.contextConsumer.state.formFactor,a=t.backgroundBlur,r="vertical"===t.direction?"margin-top":"margin-left";return H(`\n :host {\n max-height: ${"television"===n?"100vh":""};\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Lu(t)}\n position: var(--nami-bg-position, fixed);\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=t.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${xu(t,!1)}\n transition: all 0.3s;\n ${Fu(t,i)}\n }\n :host(:focus){\n ${xu(t,!0)}\n }\n :host > *:not(:first-child) {\n ${r}: ${t.spacing?t.spacing*i:0}px;\n }\n `)}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>xl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();yt([Jt({type:Object})],CT.prototype,"component",void 0),yt([Jt({type:Boolean})],CT.prototype,"fullscreen",void 0),yt([Jt({type:Boolean})],CT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],CT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],CT.prototype,"minSDKVersion",void 0),CT=yt([Pt("nami-background-container")],CT);var IT,LT=e=>e,_T=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e,t,i=this.contextConsumer,n=this.component,a=this.zIndex,r=this.scaleFactor;if(!i)return B(IT||(IT=LT``));var o=i.state.formFactor,s=n.backgroundBlur,u="phone"!==o?"width: 100%;":"",l=null!==(e=n.width)&&void 0!==e?e:n.fixedWidth,d=null!==(t=n.height)&&void 0!==t?t:n.fixedHeight,h="phone"===o?`max-width:100%;\n ${void 0!==l?`width: ${Mu(l,r)};`:""}\n ${void 0!==d?`height: ${Mu(d,r)};`:""}`:$u(n,r),c="vertical"===n.direction?"margin-top":"margin-left";return H(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Iu(n)}\n ${h}\n ${u}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?vu[n]:void 0,s=a?vu[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${gu("align-items",t)}${gu("justify-content",i)}`}(n)}\n ${s?`backdrop-filter: blur(${s}px);`:""}\n z-index: ${a};\n transition: all 0.3s;\n overflow-y: ${"television"===o?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Fu(n,r)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${Tu(r,n.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${xu(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${xu(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${c}: ${n.spacing?n.spacing*r:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();yt([Jt({type:Object})],_T.prototype,"component",void 0),yt([Jt({type:Number})],_T.prototype,"zIndex",void 0),yt([Jt({type:Boolean})],_T.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],_T.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],_T.prototype,"minSDKVersion",void 0),_T=yt([Pt("nami-content-container")],_T);var RT,FT=e=>e,OT=function(){function e(){var t;return Z(this,e),(t=Q(this,e)).inFocusedState=!1,t.scaleFactor=1,t._anyItemFocused=!1,t._handleClick=e=>{e.preventDefault(),Ss({contextProvider:t.contextProvider,onTap:t.component.onTap})},t._handleFocusIn=e=>{var i,n,a=e.target;if("nami-segment-picker-item"===(null===(i=a.tagName)||void 0===i?void 0:i.toLowerCase())){if(t._isTv&&(t._anyItemFocused=!0,!t._cameFromInside(e.relatedTarget))){var r,o=null===(r=t.shadowRoot)||void 0===r?void 0:r.querySelector("nami-segment-picker-item.active");if(o&&o!==a)return void o.focus()}"television"===(null===(n=t.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&t.contextProvider.clearSelectedProduct(t.contextProvider.getCurrentGroupId())}},t._handleFocusOut=e=>{t._isTv&&(t._cameFromInside(e.relatedTarget)||(t._anyItemFocused=!1))},t.addEventListener("click",t._handleClick),t}return le(e,fu),ae(e,[{key:"_isTv",get:function(){return"television"===m()}},{key:"firstUpdated",value:function(t){var i,n;ge(e,"firstUpdated",this)([t]),null===(i=this.shadowRoot)||void 0===i||i.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var t,i;ge(e,"disconnectedCallback",this)([]),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusin",this._handleFocusIn),null===(i=this.shadowRoot)||void 0===i||i.removeEventListener("focusout",this._handleFocusOut)}},{key:"_cameFromInside",value:function(e){var t,i;return!!e&&("nami-segment-picker-item"===(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())||!(null===(i=this.shadowRoot)||void 0===i||!i.contains(e)))}},{key:"styles",value:function(){var e,t,i,n=Xu("active",this.component.components[0]),a=Xu("inactive",this.component.components[0]),r=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||n.fillColor,o=this._anyItemFocused;return H(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Iu(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${xu(this.component,!1)}\n ${Gu(this.component,this.scaleFactor,o)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${xu(this.component,!0)}\n ${Gu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Ju(this.component)}\n }\n .toggle{\n ${t=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Tu(i,t.topPadding)}px;\n bottom: ${Tu(i,t.bottomPadding)}px;\n width: calc(50% - ${Tu(i,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Yu(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${Yu(n,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${xu(n,!0)}\n ${qu(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${xu(n,!0)}\n ${qu(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return z(RT||(RT=FT`${0}<div class="toggle"></div>`),e)}}])}();yt([Jt({type:Object})],OT.prototype,"component",void 0),yt([Jt({type:Boolean})],OT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],OT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],OT.prototype,"minSDKVersion",void 0),yt([Qt()],OT.prototype,"_anyItemFocused",void 0),OT=yt([Pt("nami-segment-picker")],OT);var WT,$T=e=>e,NT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._isFocused=!1,t._handleFocus=()=>{t.inFocusedState=!0,t._isTv&&(t._isFocused=!0,t.classList.add("focused"))},t._handleBlur=()=>{t.inFocusedState=!1,t._isTv&&(t._isFocused=!1,t.classList.remove("focused"))},t._handleKeyDown=e=>{"Enter"===e.key||" "===e.key||142===e.keyCode||195===e.keyCode?t._handleClick():!t._isTv||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(t._moveFocusToSibling("ArrowRight"===e.key?1:-1),e.preventDefault())},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return le(e,fu),ae(e,[{key:"_isTv",get:function(){return"television"===m()}},{key:"connectedCallback",value:function(){ge(e,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){ge(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=ET(i.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach(e=>{e!==this&&e.requestUpdate("component",e)})}}}},{key:"styles",value:function(){var e,t,i=Xu("active",this.component),n=Xu("inactive",this.component),a=this.component.focusedFontColor||i.fontColor||n.fontColor||"";return H(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${Yu(oe({},n,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${ju(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${qu(oe({},i,this.component),this.scaleFactor)}\n ${ju(null!==(t=this.component.activeDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${a?Du(a):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",z(WT||(WT=$T`<input type="radio"
|
|
463
463
|
autocomplete="off"
|
|
464
464
|
id="${0}"
|
|
465
465
|
name="${0}"
|