@letscooee/web-sdk 9.5.6 → 9.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.min.js +1 -1
- package/dist/widget.min.js +23 -23
- package/package.json +1 -1
package/dist/widget.min.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";(()=>{var BR=Object.create,Fh=Object.defineProperty,VR=Object.defineProperties,UR=Object.getOwnPropertyDescriptor,HR=Object.getOwnPropertyDescriptors,jR=Object.getOwnPropertyNames,BE=Object.getOwnPropertySymbols,$R=Object.getPrototypeOf,UE=Object.prototype.hasOwnProperty,WR=Object.prototype.propertyIsEnumerable,VE=(e,t,n)=>t in e?Fh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||={})UE.call(t,n)&&VE(e,n,t[n]);if(BE)for(var n of BE(t))WR.call(t,n)&&VE(e,n,t[n]);return e},re=(e,t)=>VR(e,HR(t)),Ic=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),GR=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jR(t))!UE.call(e,i)&&i!==n&&Fh(e,i,{get:()=>t[i],enumerable:!(r=UR(t,i))||r.enumerable});return e},Fe=(e,t,n)=>(n=e!=null?BR($R(e)):{},GR(t||!e||!e.__esModule?Fh(n,"default",{value:e,enumerable:!0}):n,e)),is=jn((e,t)=>{"use strict";(function(n){"use strict";var r={};r.VERSION="1.6.1";var i,s={},o=function(d,f){return function(){return f.apply(d,arguments)}},a=function(){var d=arguments,f=d[0],g,m;for(m=1;m<d.length;m++)for(g in d[m])!(g in f)&&d[m].hasOwnProperty(g)&&(f[g]=d[m][g]);return f},l=function(d,f){return{value:d,name:f}};r.TRACE=l(1,"TRACE"),r.DEBUG=l(2,"DEBUG"),r.INFO=l(3,"INFO"),r.TIME=l(4,"TIME"),r.WARN=l(5,"WARN"),r.ERROR=l(8,"ERROR"),r.OFF=l(99,"OFF");var c=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};c.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var f=this.context.filterLevel;return d.value>=f.value},trace:function(){this.invoke(r.TRACE,arguments)},debug:function(){this.invoke(r.DEBUG,arguments)},info:function(){this.invoke(r.INFO,arguments)},warn:function(){this.invoke(r.WARN,arguments)},error:function(){this.invoke(r.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(r.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(r.TIME,[d,"end"])},invoke:function(d,f){i&&this.enabledFor(d)&&i(f,a({level:d},this.context))}};var h=new c({filterLevel:r.OFF});(function(){var d=r;d.enabledFor=o(h,h.enabledFor),d.trace=o(h,h.trace),d.debug=o(h,h.debug),d.time=o(h,h.time),d.timeEnd=o(h,h.timeEnd),d.info=o(h,h.info),d.warn=o(h,h.warn),d.error=o(h,h.error),d.log=d.info})(),r.setHandler=function(d){i=d},r.setLevel=function(d){h.setLevel(d);for(var f in s)s.hasOwnProperty(f)&&s[f].setLevel(d)},r.getLevel=function(){return h.getLevel()},r.get=function(d){return s[d]||(s[d]=new c(a({name:d},h.context)))},r.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(m,b){b.name&&m.unshift("["+b.name+"]")};var f={},g=function(m,b){Function.prototype.apply.call(m,console,b)};return typeof console>"u"?function(){}:function(m,b){m=Array.prototype.slice.call(m);var I=console.log,A;b.level===r.TIME?(A=(b.name?"["+b.name+"] ":"")+m[0],m[1]==="start"?console.time?console.time(A):f[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):g(I,[A+": "+(new Date().getTime()-f[A])+"ms"])):(b.level===r.WARN&&console.warn?I=console.warn:b.level===r.ERROR&&console.error?I=console.error:b.level===r.INFO&&console.info?I=console.info:b.level===r.DEBUG&&console.debug?I=console.debug:b.level===r.TRACE&&console.trace&&(I=console.trace),d.formatter(m,b),g(I,m))}},r.useDefaults=function(d){r.setLevel(d&&d.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(d))},r.setDefaults=r.useDefaults,typeof define=="function"&&define.amd?define(r):typeof t<"u"&&t.exports?t.exports=r:(r._prevLogger=n.Logger,r.noConflict=function(){return n.Logger=r._prevLogger,r},n.Logger=r)})(e)}),Qn=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MilestoneRewardType=e.ProgressBarLayout=e.EngagementContentSource=e.EngagementObjective=e.OnsiteDeliveryType=e.ClickActionType=e.FrequencyGapUnit=e.FrequencyType=e.RedirectBehaviour=e.EngagementPlacementPosition=e.EngagementCollectionSource=e.PromotionType=e.CartFilterEnum=e.CartCurrencyOperator=e.CartCriteria=e.URLCriteria=e.UTMCriteria=e.CartItemSource=e.EngagementItemSource=e.PurchasedVisitor=e.LoggedInVisitor=e.VisitorType=e.SessionType=e.EngagementContentType=e.TriggerType=e.EngagementType=e.EngagementStatus=e.TimePreference=e.ScheduleFrequency=e.CriteriaFrequency=void 0;var t=function(_){return _[_.ONCE_PER_USER=1]="ONCE_PER_USER",_[_.ONCE_PER_SESSION=2]="ONCE_PER_SESSION",_[_.EVERY_TIME=3]="EVERY_TIME",_}(t||(e.CriteriaFrequency=t={})),n=function(_){return _[_.ONE_TIME=1]="ONE_TIME",_[_.MULTIPLE=2]="MULTIPLE",_[_.RECURRING=3]="RECURRING",_}(n||(e.ScheduleFrequency=n={})),r=function(_){return _[_.NOW=1]="NOW",_[_.LATER=2]="LATER",_[_.NEVER=3]="NEVER",_}(r||(e.TimePreference=r={})),i=function(_){return _[_.PUBLISHED=1]="PUBLISHED",_[_.DRAFT=2]="DRAFT",_[_.PAUSED=3]="PAUSED",_[_.FAILED=4]="FAILED",_[_.STOPPED=5]="STOPPED",_[_.COMPLETED=6]="COMPLETED",_[_.ARCHIVED=7]="ARCHIVED",_[_.UNINSTALLED=8]="UNINSTALLED",_}(i||(e.EngagementStatus=i={})),s=function(_){return _[_.POPUP=1]="POPUP",_[_.LEAD_GENERATION=2]="LEAD_GENERATION",_[_.PRODUCT_WIDGET=3]="PRODUCT_WIDGET",_[_.PRODUCT_BUNDLE=4]="PRODUCT_BUNDLE",_[_.ANNOUNCEMENT_BAR=5]="ANNOUNCEMENT_BAR",_[_.CART_REMINDER=6]="CART_REMINDER",_[_.CRO_COPILOT=10]="CRO_COPILOT",_[_.OTHER=11]="OTHER",_}(s||(e.EngagementType=s={})),o=function(_){return _[_.NONE=0]="NONE",_[_.RULE_BASED=1]="RULE_BASED",_[_.INTENT_BASED=2]="INTENT_BASED",_}(o||(e.TriggerType=o={})),a=function(_){return _[_.SINGLE=1]="SINGLE",_[_.EXCLUSION=2]="EXCLUSION",_[_.ABTESTING=3]="ABTESTING",_}(a||(e.EngagementContentType=a={})),l=function(_){return _[_.ALL=0]="ALL",_[_.NEW_ONLY=1]="NEW_ONLY",_[_.RETURNING_ONLY=2]="RETURNING_ONLY",_}(l||(e.SessionType=l={})),c=function(_){return _[_.ALL=0]="ALL",_[_.LOGGED_IN_ONLY=3]="LOGGED_IN_ONLY",_[_.NON_LOGGED_IN_ONLY=4]="NON_LOGGED_IN_ONLY",_[_.PURCHASED=5]="PURCHASED",_[_.NON_PURCHASED=6]="NON_PURCHASED",_[_.ABANDON_CART=7]="ABANDON_CART",_[_.RETURNING_AND_NON_PURCHASED=8]="RETURNING_AND_NON_PURCHASED",_}(c||(e.VisitorType=c={})),h=function(_){return _.ALL="ALL",_.LOGGED_IN="LOGGED_IN",_.NON_LOGGED_IN="NON_LOGGED_IN",_}(h||(e.LoggedInVisitor=h={})),d=function(_){return _.ALL="ALL",_.PURCHASED="PURCHASED",_.NON_PURCHASED="NON_PURCHASED",_}(d||(e.PurchasedVisitor=d={})),f=function(_){return _[_.NONE=0]="NONE",_[_.ITEM_RECOMMENDATION=1]="ITEM_RECOMMENDATION",_[_.MULTIPLE_ITEMS=2]="MULTIPLE_ITEMS",_[_.SINGLE_ITEM=3]="SINGLE_ITEM",_[_.TOP_SELLING=4]="TOP_SELLING",_[_.STOCK_CLEARANCE=5]="STOCK_CLEARANCE",_[_.NEW_ARRIVALS=6]="NEW_ARRIVALS",_[_.RECENTLY_VIEWED=7]="RECENTLY_VIEWED",_[_.EVENT_ITEM=8]="EVENT_ITEM",_[_.CART_ITEM=9]="CART_ITEM",_[_.BUNDLE=10]="BUNDLE",_[_.CURRENT_ITEM=11]="CURRENT_ITEM",_[_.PURCHASED_PREVIOUSLY=12]="PURCHASED_PREVIOUSLY",_[_.COLLECTION_ITEMS=13]="COLLECTION_ITEMS",_[_.TRENDING_ITEMS=14]="TRENDING_ITEMS",_}(f||(e.EngagementItemSource=f={})),g=function(_){return _[_.LAST_ADDED=1]="LAST_ADDED",_[_.FIRST_ADDED=2]="FIRST_ADDED",_[_.HIGHEST_PRICE=3]="HIGHEST_PRICE",_[_.LOWEST_PRICE=4]="LOWEST_PRICE",_[_.FIRST_MATCHING_TAG=5]="FIRST_MATCHING_TAG",_[_.ALL=6]="ALL",_}(g||(e.CartItemSource=g={})),m=function(_){return _[_.ALL=0]="ALL",_[_.ONLY_ORGANIC=1]="ONLY_ORGANIC",_[_.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",_[_.INCLUDES=3]="INCLUDES",_[_.EXCLUDES=4]="EXCLUDES",_}(m||(e.UTMCriteria=m={})),b=function(_){return _[_.NONE=0]="NONE",_[_.LIKE=1]="LIKE",_[_.NOT_LIKE=2]="NOT_LIKE",_[_.EQUALS=3]="EQUALS",_[_.NOT_EQUALS=4]="NOT_EQUALS",_}(b||(e.URLCriteria=b={})),I=function(_){return _[_.NONE=0]="NONE",_[_.LESS_THAN=1]="LESS_THAN",_[_.GREATER_THAN=2]="GREATER_THAN",_[_.BETWEEN=3]="BETWEEN",_[_.EQUALS=4]="EQUALS",_}(I||(e.CartCriteria=I={})),A=function(_){return _[_.ALL=0]="ALL",_[_.INCLUDES=1]="INCLUDES",_[_.EXCLUDES=2]="EXCLUDES",_}(A||(e.CartCurrencyOperator=A={})),F=function(_){return _[_.NONE=0]="NONE",_[_.AMOUNT=1]="AMOUNT",_[_.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",_[_.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",_}(F||(e.CartFilterEnum=F={})),V=function(_){return _[_.NONE=0]="NONE",_[_.ITEM=1]="ITEM",_[_.COLLECTION=2]="COLLECTION",_}(V||(e.PromotionType=V={})),M=function(_){return _[_.NONE=0]="NONE",_[_.SINGLE=1]="SINGLE",_[_.MULTIPLE=2]="MULTIPLE",_}(M||(e.EngagementCollectionSource=M={})),J=function(_){return _.BEFORE="before",_.AFTER="after",_.INSIDE_FIRST="insideFirst",_.INSIDE_LAST="insideLast",_}(J||(e.EngagementPlacementPosition=J={})),Ne=function(_){return _.SHOPIFY_CHECKOUT="shopify_checkout",_.THIRD_PARTY_CHECKOUT="third_party_checkout",_.CART_PAGE="cart_page",_.CART_DRAWER="cart_drawer",_}(Ne||(e.RedirectBehaviour=Ne={})),ht=function(_){return _.ONCE_IN_SESSION="ONCE_IN_SESSION",_.ACROSS_SESSIONS="ACROSS_SESSIONS",_}(ht||(e.FrequencyType=ht={})),j=function(_){return _.DAYS="DAYS",_.HOURS="HOURS",_.MINUTES="MINUTES",_.SECONDS="SECONDS",_}(j||(e.FrequencyGapUnit=j={})),pe=function(_){return _[_.NONE=0]="NONE",_[_.REJECT_POPUP=1]="REJECT_POPUP",_[_.ACCEPT_POPUP=2]="ACCEPT_POPUP",_[_.GO_TO_URL=4]="GO_TO_URL",_[_.SHARE=5]="SHARE",_[_.KEY_VALUE=100]="KEY_VALUE",_[_.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",_[_.ADD_TO_CART=102]="ADD_TO_CART",_[_.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",_[_.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",_[_.OPEN_CART=105]="OPEN_CART",_[_.SUBMIT_FORM=106]="SUBMIT_FORM",_[_.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",_[_.ADD_BUNDLE=108]="ADD_BUNDLE",_[_.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",_}(pe||(e.ClickActionType=pe={})),te=function(_){return _.POPUP="POPUP",_.PAGE_EMBED="PAGE_EMBED",_.CART_EMBED="CART_EMBED",_.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",_}(te||(e.OnsiteDeliveryType=te={})),de=function(_){return _.PRODUCT_PROMOTION="PRODUCT_PROMOTION",_.BUNDLE_AND_UPSELL="BUNDLE_AND_UPSELL",_.CART_RECOVERY="CART_RECOVERY",_.ANNOUNCEMENT="ANNOUNCEMENT",_.LEAD_GENERATION="LEAD_GENERATION",_.DATA_COLLECTION="DATA_COLLECTION",_.SALE_PROMOTION="SALE_PROMOTION",_.SUBSCRIPTION_UPSELL="SUBSCRIPTION_UPSELL",_.SHOPPABLE_VIDEO="SHOPPABLE_VIDEO",_.BYOB="BYOB",_.PROGRESS_BAR="PROGRESS_BAR",_.BUY_NOW="BUY_NOW",_}(de||(e.EngagementObjective=de={})),Ae=function(_){return _.COOEE="COOEE",_.KLAVIYO="KLAVIYO",_}(Ae||(e.EngagementContentSource=Ae={})),dt=function(_){return _.ICONS="ICONS",_.TILES="TILES",_}(dt||(e.ProgressBarLayout=dt={})),ut=function(_){return _.FREE_SHIPPING="FREE_SHIPPING",_.DISCOUNT="DISCOUNT",_.FREE_AUTO_GIFT="FREE_AUTO_GIFT",_.FREE_GIFT_SELECT="FREE_GIFT_SELECT",_}(ut||(e.MilestoneRewardType=ut={}))}),va=jn(e=>{"use strict";var t=e&&e.__awaiter||function(r,i,s,o){function a(l){return l instanceof s?l:new s(function(c){c(l)})}return new(s||(s=Promise))(function(l,c){function h(g){try{f(o.next(g))}catch(m){c(m)}}function d(g){try{f(o.throw(g))}catch(m){c(m)}}function f(g){g.done?l(g.value):a(g.value).then(h,d)}f((o=o.apply(r,i||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.JSUtils=void 0;var n=class{static isObject(r){return typeof r=="object"&&!Array.isArray(r)&&r!==null}static parseToAny(r){try{return JSON.parse(r.toString())}catch{}return r.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(r.toString()):r}static sleep(r){return t(this,void 0,void 0,function*(){return new Promise(i=>setTimeout(i,r))})}static hasKeys(r){return r?Object.keys(r).length>=1:!1}static convertObjectToArray(r,i){return i.reduce((s,o)=>(r.hasOwnProperty(o)&&r[o]!=null&&s.push({[o]:r[o]}),s),[])}static removeNullUndefinedKeys(r){return Object.keys(r).reduce((i,s)=>(r[s]!==null&&r[s]!==void 0&&(i[s]=r[s]),i),{})}static stringify(r){return JSON.stringify(r,function(i,s){return s===void 0?null:s})}};e.JSUtils=n,n.ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)}),QS=jn((e,t)=>{"use strict";(function(n){if(typeof e=="object"&&typeof t<"u")t.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var r;typeof window<"u"?r=window:typeof global<"u"?r=global:typeof self<"u"?r=self:r=this,r.localforage=n()}})(function(){var n,r,i;return function s(o,a,l){function c(f,g){if(!a[f]){if(!o[f]){var m=typeof Ic=="function"&&Ic;if(!g&&m)return m(f,!0);if(h)return h(f,!0);var b=new Error("Cannot find module '"+f+"'");throw b.code="MODULE_NOT_FOUND",b}var I=a[f]={exports:{}};o[f][0].call(I.exports,function(A){var F=o[f][1][A];return c(F||A)},I,I.exports,s,o,a,l)}return a[f].exports}for(var h=typeof Ic=="function"&&Ic,d=0;d<l.length;d++)c(l[d]);return c}({1:[function(s,o,a){(function(l){"use strict";var c=l.MutationObserver||l.WebKitMutationObserver,h;if(c){var d=0,f=new c(A),g=l.document.createTextNode("");f.observe(g,{characterData:!0}),h=function(){g.data=d=++d%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var m=new l.MessageChannel;m.port1.onmessage=A,h=function(){m.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?h=function(){var V=l.document.createElement("script");V.onreadystatechange=function(){A(),V.onreadystatechange=null,V.parentNode.removeChild(V),V=null},l.document.documentElement.appendChild(V)}:h=function(){setTimeout(A,0)};var b,I=[];function A(){b=!0;for(var V,M,J=I.length;J;){for(M=I,I=[],V=-1;++V<J;)M[V]();J=I.length}b=!1}o.exports=F;function F(V){I.push(V)===1&&!b&&h()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,a){"use strict";var l=s(1);function c(){}var h={},d=["REJECTED"],f=["FULFILLED"],g=["PENDING"];o.exports=m;function m(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,j!==c&&F(this,j)}m.prototype.catch=function(j){return this.then(null,j)},m.prototype.then=function(j,pe){if(typeof j!="function"&&this.state===f||typeof pe!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==g){var de=this.state===f?j:pe;I(te,de,this.outcome)}else this.queue.push(new b(te,j,pe));return te};function b(j,pe,te){this.promise=j,typeof pe=="function"&&(this.onFulfilled=pe,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}b.prototype.callFulfilled=function(j){h.resolve(this.promise,j)},b.prototype.otherCallFulfilled=function(j){I(this.promise,this.onFulfilled,j)},b.prototype.callRejected=function(j){h.reject(this.promise,j)},b.prototype.otherCallRejected=function(j){I(this.promise,this.onRejected,j)};function I(j,pe,te){l(function(){var de;try{de=pe(te)}catch(Ae){return h.reject(j,Ae)}de===j?h.reject(j,new TypeError("Cannot resolve promise with itself")):h.resolve(j,de)})}h.resolve=function(j,pe){var te=V(A,pe);if(te.status==="error")return h.reject(j,te.value);var de=te.value;if(de)F(j,de);else{j.state=f,j.outcome=pe;for(var Ae=-1,dt=j.queue.length;++Ae<dt;)j.queue[Ae].callFulfilled(pe)}return j},h.reject=function(j,pe){j.state=d,j.outcome=pe;for(var te=-1,de=j.queue.length;++te<de;)j.queue[te].callRejected(pe);return j};function A(j){var pe=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof pe=="function")return function(){pe.apply(j,arguments)}}function F(j,pe){var te=!1;function de(_){te||(te=!0,h.reject(j,_))}function Ae(_){te||(te=!0,h.resolve(j,_))}function dt(){pe(Ae,de)}var ut=V(dt);ut.status==="error"&&de(ut.value)}function V(j,pe){var te={};try{te.value=j(pe),te.status="success"}catch(de){te.status="error",te.value=de}return te}m.resolve=M;function M(j){return j instanceof this?j:h.resolve(new this(c),j)}m.reject=J;function J(j){var pe=new this(c);return h.reject(pe,j)}m.all=Ne;function Ne(j){var pe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,de=!1;if(!te)return this.resolve([]);for(var Ae=new Array(te),dt=0,ut=-1,_=new this(c);++ut<te;)Wt(j[ut],ut);return _;function Wt(Ze,Zt){pe.resolve(Ze).then(Se,function(D){de||(de=!0,h.reject(_,D))});function Se(D){Ae[Zt]=D,++dt===te&&!de&&(de=!0,h.resolve(_,Ae))}}}m.race=ht;function ht(j){var pe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,de=!1;if(!te)return this.resolve([]);for(var Ae=-1,dt=new this(c);++Ae<te;)ut(j[Ae]);return dt;function ut(_){pe.resolve(_).then(function(Wt){de||(de=!0,h.resolve(dt,Wt))},function(Wt){de||(de=!0,h.reject(dt,Wt))})}}},{1:1}],3:[function(s,o,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,a){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y};function c(y,E){if(!(y instanceof E))throw new TypeError("Cannot call a class as a function")}function h(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=h();function f(){try{if(!d||!d.open)return!1;var y=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),E=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!y||E)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function g(y,E){y=y||[],E=E||{};try{return new Blob(y,E)}catch(P){if(P.name!=="TypeError")throw P;for(var C=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,N=new C,R=0;R<y.length;R+=1)N.append(y[R]);return N.getBlob(E.type)}}typeof Promise>"u"&&s(3);var m=Promise;function b(y,E){E&&y.then(function(C){E(null,C)},function(C){E(C)})}function I(y,E,C){typeof E=="function"&&y.then(E),typeof C=="function"&&y.catch(C)}function A(y){return typeof y!="string"&&(console.warn(y+" used as a key, but it is not a string."),y=String(y)),y}function F(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var V="local-forage-detect-blob-support",M=void 0,J={},Ne=Object.prototype.toString,ht="readonly",j="readwrite";function pe(y){for(var E=y.length,C=new ArrayBuffer(E),N=new Uint8Array(C),R=0;R<E;R++)N[R]=y.charCodeAt(R);return C}function te(y){return new m(function(E){var C=y.transaction(V,j),N=g([""]);C.objectStore(V).put(N,"key"),C.onabort=function(R){R.preventDefault(),R.stopPropagation(),E(!1)},C.oncomplete=function(){var R=navigator.userAgent.match(/Chrome\/(\d+)/),P=navigator.userAgent.match(/Edge\//);E(P||!R||parseInt(R[1],10)>=43)}}).catch(function(){return!1})}function de(y){return typeof M=="boolean"?m.resolve(M):te(y).then(function(E){return M=E,M})}function Ae(y){var E=J[y.name],C={};C.promise=new m(function(N,R){C.resolve=N,C.reject=R}),E.deferredOperations.push(C),E.dbReady?E.dbReady=E.dbReady.then(function(){return C.promise}):E.dbReady=C.promise}function dt(y){var E=J[y.name],C=E.deferredOperations.pop();if(C)return C.resolve(),C.promise}function ut(y,E){var C=J[y.name],N=C.deferredOperations.pop();if(N)return N.reject(E),N.promise}function _(y,E){return new m(function(C,N){if(J[y.name]=J[y.name]||_e(),y.db)if(E)Ae(y),y.db.close();else return C(y.db);var R=[y.name];E&&R.push(y.version);var P=d.open.apply(d,R);E&&(P.onupgradeneeded=function(U){var H=P.result;try{H.createObjectStore(y.storeName),U.oldVersion<=1&&H.createObjectStore(V)}catch(W){if(W.name==="ConstraintError")console.warn('The database "'+y.name+'" has been upgraded from version '+U.oldVersion+" to version "+U.newVersion+', but the storage "'+y.storeName+'" already exists.');else throw W}}),P.onerror=function(U){U.preventDefault(),N(P.error)},P.onsuccess=function(){var U=P.result;U.onversionchange=function(H){H.target.close()},C(U),dt(y)}})}function Wt(y){return _(y,!1)}function Ze(y){return _(y,!0)}function Zt(y,E){if(!y.db)return!0;var C=!y.db.objectStoreNames.contains(y.storeName),N=y.version<y.db.version,R=y.version>y.db.version;if(N&&(y.version!==E&&console.warn('The database "'+y.name+`" can't be downgraded from version `+y.db.version+" to version "+y.version+"."),y.version=y.db.version),R||C){if(C){var P=y.db.version+1;P>y.version&&(y.version=P)}return!0}return!1}function Se(y){return new m(function(E,C){var N=new FileReader;N.onerror=C,N.onloadend=function(R){var P=btoa(R.target.result||"");E({__local_forage_encoded_blob:!0,data:P,type:y.type})},N.readAsBinaryString(y)})}function D(y){var E=pe(atob(y.data));return g([E],{type:y.type})}function x(y){return y&&y.__local_forage_encoded_blob}function Z(y){var E=this,C=E._initReady().then(function(){var N=J[E._dbInfo.name];if(N&&N.dbReady)return N.dbReady});return I(C,y,y),C}function ne(y){Ae(y);for(var E=J[y.name],C=E.forages,N=0;N<C.length;N++){var R=C[N];R._dbInfo.db&&(R._dbInfo.db.close(),R._dbInfo.db=null)}return y.db=null,Wt(y).then(function(P){return y.db=P,Zt(y)?Ze(y):P}).then(function(P){y.db=E.db=P;for(var U=0;U<C.length;U++)C[U]._dbInfo.db=P}).catch(function(P){throw ut(y,P),P})}function ae(y,E,C,N){N===void 0&&(N=1);try{var R=y.db.transaction(y.storeName,E);C(null,R)}catch(P){if(N>0&&(!y.db||P.name==="InvalidStateError"||P.name==="NotFoundError"))return m.resolve().then(function(){if(!y.db||P.name==="NotFoundError"&&!y.db.objectStoreNames.contains(y.storeName)&&y.version<=y.db.version)return y.db&&(y.version=y.db.version+1),Ze(y)}).then(function(){return ne(y).then(function(){ae(y,E,C,N-1)})}).catch(C);C(P)}}function _e(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ve(y){var E=this,C={db:null};if(y)for(var N in y)C[N]=y[N];var R=J[C.name];R||(R=_e(),J[C.name]=R),R.forages.push(E),E._initReady||(E._initReady=E.ready,E.ready=Z);var P=[];function U(){return m.resolve()}for(var H=0;H<R.forages.length;H++){var W=R.forages[H];W!==E&&P.push(W._initReady().catch(U))}var z=R.forages.slice(0);return m.all(P).then(function(){return C.db=R.db,Wt(C)}).then(function($){return C.db=$,Zt(C,E._defaultConfig.version)?Ze(C):$}).then(function($){C.db=R.db=$,E._dbInfo=C;for(var ce=0;ce<z.length;ce++){var Xe=z[ce];Xe!==E&&(Xe._dbInfo.db=C.db,Xe._dbInfo.version=C.version)}})}function ue(y,E){var C=this;y=A(y);var N=new m(function(R,P){C.ready().then(function(){ae(C._dbInfo,ht,function(U,H){if(U)return P(U);try{var W=H.objectStore(C._dbInfo.storeName),z=W.get(y);z.onsuccess=function(){var $=z.result;$===void 0&&($=null),x($)&&($=D($)),R($)},z.onerror=function(){P(z.error)}}catch($){P($)}})}).catch(P)});return b(N,E),N}function Ce(y,E){var C=this,N=new m(function(R,P){C.ready().then(function(){ae(C._dbInfo,ht,function(U,H){if(U)return P(U);try{var W=H.objectStore(C._dbInfo.storeName),z=W.openCursor(),$=1;z.onsuccess=function(){var ce=z.result;if(ce){var Xe=ce.value;x(Xe)&&(Xe=D(Xe));var Dt=y(Xe,ce.key,$++);Dt!==void 0?R(Dt):ce.continue()}else R()},z.onerror=function(){P(z.error)}}catch(ce){P(ce)}})}).catch(P)});return b(N,E),N}function je(y,E,C){var N=this;y=A(y);var R=new m(function(P,U){var H;N.ready().then(function(){return H=N._dbInfo,Ne.call(E)==="[object Blob]"?de(H.db).then(function(W){return W?E:Se(E)}):E}).then(function(W){ae(N._dbInfo,j,function(z,$){if(z)return U(z);try{var ce=$.objectStore(N._dbInfo.storeName);W===null&&(W=void 0);var Xe=ce.put(W,y);$.oncomplete=function(){W===void 0&&(W=null),P(W)},$.onabort=$.onerror=function(){var Dt=Xe.error?Xe.error:Xe.transaction.error;U(Dt)}}catch(Dt){U(Dt)}})}).catch(U)});return b(R,C),R}function Pt(y,E){var C=this;y=A(y);var N=new m(function(R,P){C.ready().then(function(){ae(C._dbInfo,j,function(U,H){if(U)return P(U);try{var W=H.objectStore(C._dbInfo.storeName),z=W.delete(y);H.oncomplete=function(){R()},H.onerror=function(){P(z.error)},H.onabort=function(){var $=z.error?z.error:z.transaction.error;P($)}}catch($){P($)}})}).catch(P)});return b(N,E),N}function He(y){var E=this,C=new m(function(N,R){E.ready().then(function(){ae(E._dbInfo,j,function(P,U){if(P)return R(P);try{var H=U.objectStore(E._dbInfo.storeName),W=H.clear();U.oncomplete=function(){N()},U.onabort=U.onerror=function(){var z=W.error?W.error:W.transaction.error;R(z)}}catch(z){R(z)}})}).catch(R)});return b(C,y),C}function tt(y){var E=this,C=new m(function(N,R){E.ready().then(function(){ae(E._dbInfo,ht,function(P,U){if(P)return R(P);try{var H=U.objectStore(E._dbInfo.storeName),W=H.count();W.onsuccess=function(){N(W.result)},W.onerror=function(){R(W.error)}}catch(z){R(z)}})}).catch(R)});return b(C,y),C}function Bt(y,E){var C=this,N=new m(function(R,P){if(y<0){R(null);return}C.ready().then(function(){ae(C._dbInfo,ht,function(U,H){if(U)return P(U);try{var W=H.objectStore(C._dbInfo.storeName),z=!1,$=W.openKeyCursor();$.onsuccess=function(){var ce=$.result;if(!ce){R(null);return}y===0||z?R(ce.key):(z=!0,ce.advance(y))},$.onerror=function(){P($.error)}}catch(ce){P(ce)}})}).catch(P)});return b(N,E),N}function ke(y){var E=this,C=new m(function(N,R){E.ready().then(function(){ae(E._dbInfo,ht,function(P,U){if(P)return R(P);try{var H=U.objectStore(E._dbInfo.storeName),W=H.openKeyCursor(),z=[];W.onsuccess=function(){var $=W.result;if(!$){N(z);return}z.push($.key),$.continue()},W.onerror=function(){R(W.error)}}catch($){R($)}})}).catch(R)});return b(C,y),C}function u(y,E){E=F.apply(this,arguments);var C=this.config();y=typeof y!="function"&&y||{},y.name||(y.name=y.name||C.name,y.storeName=y.storeName||C.storeName);var N=this,R;if(!y.name)R=m.reject("Invalid arguments");else{var P=y.name===C.name&&N._dbInfo.db,U=P?m.resolve(N._dbInfo.db):Wt(y).then(function(H){var W=J[y.name],z=W.forages;W.db=H;for(var $=0;$<z.length;$++)z[$]._dbInfo.db=H;return H});y.storeName?R=U.then(function(H){if(H.objectStoreNames.contains(y.storeName)){var W=H.version+1;Ae(y);var z=J[y.name],$=z.forages;H.close();for(var ce=0;ce<$.length;ce++){var Xe=$[ce];Xe._dbInfo.db=null,Xe._dbInfo.version=W}var Dt=new m(function(_t,Qt){var Xt=d.open(y.name,W);Xt.onerror=function(ar){var Oh=Xt.result;Oh.close(),Qt(ar)},Xt.onupgradeneeded=function(){var ar=Xt.result;ar.deleteObjectStore(y.storeName)},Xt.onsuccess=function(){var ar=Xt.result;ar.close(),_t(ar)}});return Dt.then(function(_t){z.db=_t;for(var Qt=0;Qt<$.length;Qt++){var Xt=$[Qt];Xt._dbInfo.db=_t,dt(Xt._dbInfo)}}).catch(function(_t){throw(ut(y,_t)||m.resolve()).catch(function(){}),_t})}}):R=U.then(function(H){Ae(y);var W=J[y.name],z=W.forages;H.close();for(var $=0;$<z.length;$++){var ce=z[$];ce._dbInfo.db=null}var Xe=new m(function(Dt,_t){var Qt=d.deleteDatabase(y.name);Qt.onerror=function(){var Xt=Qt.result;Xt&&Xt.close(),_t(Qt.error)},Qt.onblocked=function(){console.warn('dropInstance blocked for database "'+y.name+'" until all open connections are closed')},Qt.onsuccess=function(){var Xt=Qt.result;Xt&&Xt.close(),Dt(Xt)}});return Xe.then(function(Dt){W.db=Dt;for(var _t=0;_t<z.length;_t++){var Qt=z[_t];dt(Qt._dbInfo)}}).catch(function(Dt){throw(ut(y,Dt)||m.resolve()).catch(function(){}),Dt})})}return b(R,E),R}var p={_driver:"asyncStorage",_initStorage:ve,_support:f(),iterate:Ce,getItem:ue,setItem:je,removeItem:Pt,clear:He,length:tt,key:Bt,keys:ke,dropInstance:u};function v(){return typeof openDatabase=="function"}var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L="~~local_forage_type~",B=/^~~local_forage_type~([^~]+)~/,Q="__lfsc__:",rt=Q.length,Ke="arbf",Le="blob",pt="si08",ee="ui08",De="uic8",ge="si16",it="si32",En="ur16",_n="ui32",lt="fl32",me="fl64",On=rt+Ke.length,rs=Object.prototype.toString;function za(y){var E=y.length*.75,C=y.length,N,R=0,P,U,H,W;y[y.length-1]==="="&&(E--,y[y.length-2]==="="&&E--);var z=new ArrayBuffer(E),$=new Uint8Array(z);for(N=0;N<C;N+=4)P=T.indexOf(y[N]),U=T.indexOf(y[N+1]),H=T.indexOf(y[N+2]),W=T.indexOf(y[N+3]),$[R++]=P<<2|U>>4,$[R++]=(U&15)<<4|H>>2,$[R++]=(H&3)<<6|W&63;return z}function wh(y){var E=new Uint8Array(y),C="",N;for(N=0;N<E.length;N+=3)C+=T[E[N]>>2],C+=T[(E[N]&3)<<4|E[N+1]>>4],C+=T[(E[N+1]&15)<<2|E[N+2]>>6],C+=T[E[N+2]&63];return E.length%3===2?C=C.substring(0,C.length-1)+"=":E.length%3===1&&(C=C.substring(0,C.length-2)+"=="),C}function eI(y,E){var C="";if(y&&(C=rs.call(y)),y&&(C==="[object ArrayBuffer]"||y.buffer&&rs.call(y.buffer)==="[object ArrayBuffer]")){var N,R=Q;y instanceof ArrayBuffer?(N=y,R+=Ke):(N=y.buffer,C==="[object Int8Array]"?R+=pt:C==="[object Uint8Array]"?R+=ee:C==="[object Uint8ClampedArray]"?R+=De:C==="[object Int16Array]"?R+=ge:C==="[object Uint16Array]"?R+=En:C==="[object Int32Array]"?R+=it:C==="[object Uint32Array]"?R+=_n:C==="[object Float32Array]"?R+=lt:C==="[object Float64Array]"?R+=me:E(new Error("Failed to get type for BinaryArray"))),E(R+wh(N))}else if(C==="[object Blob]"){var P=new FileReader;P.onload=function(){var U=L+y.type+"~"+wh(this.result);E(Q+Le+U)},P.readAsArrayBuffer(y)}else try{E(JSON.stringify(y))}catch(U){console.error("Couldn't convert value into a JSON string: ",y),E(null,U)}}function tI(y){if(y.substring(0,rt)!==Q)return JSON.parse(y);var E=y.substring(On),C=y.substring(rt,On),N;if(C===Le&&B.test(E)){var R=E.match(B);N=R[1],E=E.substring(R[0].length)}var P=za(E);switch(C){case Ke:return P;case Le:return g([P],{type:N});case pt:return new Int8Array(P);case ee:return new Uint8Array(P);case De:return new Uint8ClampedArray(P);case ge:return new Int16Array(P);case En:return new Uint16Array(P);case it:return new Int32Array(P);case _n:return new Uint32Array(P);case lt:return new Float32Array(P);case me:return new Float64Array(P);default:throw new Error("Unkown type: "+C)}}var bh={serialize:eI,deserialize:tI,stringToBuffer:za,bufferToString:wh};function LE(y,E,C,N){y.executeSql("CREATE TABLE IF NOT EXISTS "+E.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],C,N)}function _T(y){var E=this,C={db:null};if(y)for(var N in y)C[N]=typeof y[N]!="string"?y[N].toString():y[N];var R=new m(function(P,U){try{C.db=openDatabase(C.name,String(C.version),C.description,C.size)}catch(H){return U(H)}C.db.transaction(function(H){LE(H,C,function(){E._dbInfo=C,P()},function(W,z){U(z)})},U)});return C.serializer=bh,R}function Qi(y,E,C,N,R,P){y.executeSql(C,N,R,function(U,H){H.code===H.SYNTAX_ERR?U.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[E.storeName],function(W,z){z.rows.length?P(W,H):LE(W,E,function(){W.executeSql(C,N,R,P)},P)},P):P(U,H)},P)}function ET(y,E){var C=this;y=A(y);var N=new m(function(R,P){C.ready().then(function(){var U=C._dbInfo;U.db.transaction(function(H){Qi(H,U,"SELECT * FROM "+U.storeName+" WHERE key = ? LIMIT 1",[y],function(W,z){var $=z.rows.length?z.rows.item(0).value:null;$&&($=U.serializer.deserialize($)),R($)},function(W,z){P(z)})})}).catch(P)});return b(N,E),N}function Cx(y,E){var C=this,N=new m(function(R,P){C.ready().then(function(){var U=C._dbInfo;U.db.transaction(function(H){Qi(H,U,"SELECT * FROM "+U.storeName,[],function(W,z){for(var $=z.rows,ce=$.length,Xe=0;Xe<ce;Xe++){var Dt=$.item(Xe),_t=Dt.value;if(_t&&(_t=U.serializer.deserialize(_t)),_t=y(_t,Dt.key,Xe+1),_t!==void 0){R(_t);return}}R()},function(W,z){P(z)})})}).catch(P)});return b(N,E),N}function ME(y,E,C,N){var R=this;y=A(y);var P=new m(function(U,H){R.ready().then(function(){E===void 0&&(E=null);var W=E,z=R._dbInfo;z.serializer.serialize(E,function($,ce){ce?H(ce):z.db.transaction(function(Xe){Qi(Xe,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[y,$],function(){U(W)},function(Dt,_t){H(_t)})},function(Xe){if(Xe.code===Xe.QUOTA_ERR){if(N>0){U(ME.apply(R,[y,W,C,N-1]));return}H(Xe)}})})}).catch(H)});return b(P,C),P}function Tx(y,E,C){return ME.apply(this,[y,E,C,1])}function Dx(y,E){var C=this;y=A(y);var N=new m(function(R,P){C.ready().then(function(){var U=C._dbInfo;U.db.transaction(function(H){Qi(H,U,"DELETE FROM "+U.storeName+" WHERE key = ?",[y],function(){R()},function(W,z){P(z)})})}).catch(P)});return b(N,E),N}function HD(y){var E=this,C=new m(function(N,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(U){Qi(U,P,"DELETE FROM "+P.storeName,[],function(){N()},function(H,W){R(W)})})}).catch(R)});return b(C,y),C}function QD(y){var E=this,C=new m(function(N,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(U){Qi(U,P,"SELECT COUNT(key) as c FROM "+P.storeName,[],function(H,W){var z=W.rows.item(0).c;N(z)},function(H,W){R(W)})})}).catch(R)});return b(C,y),C}function ak(y,E){var C=this,N=new m(function(R,P){C.ready().then(function(){var U=C._dbInfo;U.db.transaction(function(H){Qi(H,U,"SELECT key FROM "+U.storeName+" WHERE id = ? LIMIT 1",[y+1],function(W,z){var $=z.rows.length?z.rows.item(0).key:null;R($)},function(W,z){P(z)})})}).catch(P)});return b(N,E),N}function Lk(y){var E=this,C=new m(function(N,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(U){Qi(U,P,"SELECT key FROM "+P.storeName,[],function(H,W){for(var z=[],$=0;$<W.rows.length;$++)z.push(W.rows.item($).key);N(z)},function(H,W){R(W)})})}).catch(R)});return b(C,y),C}function Bk(y){return new m(function(E,C){y.transaction(function(N){N.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(R,P){for(var U=[],H=0;H<P.rows.length;H++)U.push(P.rows.item(H).name);E({db:y,storeNames:U})},function(R,P){C(P)})},function(N){C(N)})})}function Fk(y,E){E=F.apply(this,arguments);var C=this.config();y=typeof y!="function"&&y||{},y.name||(y.name=y.name||C.name,y.storeName=y.storeName||C.storeName);var N=this,R;return y.name?R=new m(function(P){var U;y.name===C.name?U=N._dbInfo.db:U=openDatabase(y.name,"","",0),y.storeName?P({db:U,storeNames:[y.storeName]}):P(Bk(U))}).then(function(P){return new m(function(U,H){P.db.transaction(function(W){function z(Dt){return new m(function(_t,Qt){W.executeSql("DROP TABLE IF EXISTS "+Dt,[],function(){_t()},function(Xt,ar){Qt(ar)})})}for(var $=[],ce=0,Xe=P.storeNames.length;ce<Xe;ce++)$.push(z(P.storeNames[ce]));m.all($).then(function(){U()}).catch(function(Dt){H(Dt)})},function(W){H(W)})})}):R=m.reject("Invalid arguments"),b(R,E),R}var eR={_driver:"webSQLStorage",_initStorage:_T,_support:v(),iterate:Cx,getItem:ET,setItem:Tx,removeItem:Dx,clear:HD,length:QD,key:ak,keys:Lk,dropInstance:Fk};function tR(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function FE(y,E){var C=y.name+"/";return y.storeName!==E.storeName&&(C+=y.storeName+"/"),C}function nR(){var y="_localforage_support_test";try{return localStorage.setItem(y,!0),localStorage.removeItem(y),!1}catch{return!0}}function rR(){return!nR()||localStorage.length>0}function iR(y){var E=this,C={};if(y)for(var N in y)C[N]=y[N];return C.keyPrefix=FE(y,E._defaultConfig),rR()?(E._dbInfo=C,C.serializer=bh,m.resolve()):m.reject()}function sR(y){var E=this,C=E.ready().then(function(){for(var N=E._dbInfo.keyPrefix,R=localStorage.length-1;R>=0;R--){var P=localStorage.key(R);P.indexOf(N)===0&&localStorage.removeItem(P)}});return b(C,y),C}function oR(y,E){var C=this;y=A(y);var N=C.ready().then(function(){var R=C._dbInfo,P=localStorage.getItem(R.keyPrefix+y);return P&&(P=R.serializer.deserialize(P)),P});return b(N,E),N}function aR(y,E){var C=this,N=C.ready().then(function(){for(var R=C._dbInfo,P=R.keyPrefix,U=P.length,H=localStorage.length,W=1,z=0;z<H;z++){var $=localStorage.key(z);if($.indexOf(P)===0){var ce=localStorage.getItem($);if(ce&&(ce=R.serializer.deserialize(ce)),ce=y(ce,$.substring(U),W++),ce!==void 0)return ce}}});return b(N,E),N}function lR(y,E){var C=this,N=C.ready().then(function(){var R=C._dbInfo,P;try{P=localStorage.key(y)}catch{P=null}return P&&(P=P.substring(R.keyPrefix.length)),P});return b(N,E),N}function cR(y){var E=this,C=E.ready().then(function(){for(var N=E._dbInfo,R=localStorage.length,P=[],U=0;U<R;U++){var H=localStorage.key(U);H.indexOf(N.keyPrefix)===0&&P.push(H.substring(N.keyPrefix.length))}return P});return b(C,y),C}function uR(y){var E=this,C=E.keys().then(function(N){return N.length});return b(C,y),C}function hR(y,E){var C=this;y=A(y);var N=C.ready().then(function(){var R=C._dbInfo;localStorage.removeItem(R.keyPrefix+y)});return b(N,E),N}function dR(y,E,C){var N=this;y=A(y);var R=N.ready().then(function(){E===void 0&&(E=null);var P=E;return new m(function(U,H){var W=N._dbInfo;W.serializer.serialize(E,function(z,$){if($)H($);else try{localStorage.setItem(W.keyPrefix+y,z),U(P)}catch(ce){(ce.name==="QuotaExceededError"||ce.name==="NS_ERROR_DOM_QUOTA_REACHED")&&H(ce),H(ce)}})})});return b(R,C),R}function pR(y,E){if(E=F.apply(this,arguments),y=typeof y!="function"&&y||{},!y.name){var C=this.config();y.name=y.name||C.name,y.storeName=y.storeName||C.storeName}var N=this,R;return y.name?R=new m(function(P){y.storeName?P(FE(y,N._defaultConfig)):P(y.name+"/")}).then(function(P){for(var U=localStorage.length-1;U>=0;U--){var H=localStorage.key(U);H.indexOf(P)===0&&localStorage.removeItem(H)}}):R=m.reject("Invalid arguments"),b(R,E),R}var fR={_driver:"localStorageWrapper",_initStorage:iR,_support:tR(),iterate:aR,getItem:oR,setItem:dR,removeItem:hR,clear:sR,length:uR,key:lR,keys:cR,dropInstance:pR},gR=function(y,E){return y===E||typeof y=="number"&&typeof E=="number"&&isNaN(y)&&isNaN(E)},mR=function(y,E){for(var C=y.length,N=0;N<C;){if(gR(y[N],E))return!0;N++}return!1},bS=Array.isArray||function(y){return Object.prototype.toString.call(y)==="[object Array]"},Pl={},ES={},Ls={INDEXEDDB:p,WEBSQL:eR,LOCALSTORAGE:fR},vR=[Ls.INDEXEDDB._driver,Ls.WEBSQL._driver,Ls.LOCALSTORAGE._driver],Dc=["dropInstance"],Eh=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Dc),_R={description:"",driver:vR.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function yR(y,E){y[E]=function(){var C=arguments;return y.ready().then(function(){return y[E].apply(y,C)})}}function Ch(){for(var y=1;y<arguments.length;y++){var E=arguments[y];if(E)for(var C in E)E.hasOwnProperty(C)&&(bS(E[C])?arguments[0][C]=E[C].slice():arguments[0][C]=E[C])}return arguments[0]}var wR=function(){function y(E){c(this,y);for(var C in Ls)if(Ls.hasOwnProperty(C)){var N=Ls[C],R=N._driver;this[C]=R,Pl[R]||this.defineDriver(N)}this._defaultConfig=Ch({},_R),this._config=Ch({},this._defaultConfig,E),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return y.prototype.config=function(E){if((typeof E>"u"?"undefined":l(E))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var C in E){if(C==="storeName"&&(E[C]=E[C].replace(/\W/g,"_")),C==="version"&&typeof E[C]!="number")return new Error("Database version must be a number.");this._config[C]=E[C]}return"driver"in E&&E.driver?this.setDriver(this._config.driver):!0}else return typeof E=="string"?this._config[E]:this._config},y.prototype.defineDriver=function(E,C,N){var R=new m(function(P,U){try{var H=E._driver,W=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!E._driver){U(W);return}for(var z=Eh.concat("_initStorage"),$=0,ce=z.length;$<ce;$++){var Xe=z[$],Dt=!mR(Dc,Xe);if((Dt||E[Xe])&&typeof E[Xe]!="function"){U(W);return}}var _t=function(){for(var Xt=function(ER){return function(){var SR=new Error("Method "+ER+" is not implemented by the current driver"),SS=m.reject(SR);return b(SS,arguments[arguments.length-1]),SS}},ar=0,Oh=Dc.length;ar<Oh;ar++){var kh=Dc[ar];E[kh]||(E[kh]=Xt(kh))}};_t();var Qt=function(Xt){Pl[H]&&console.info("Redefining LocalForage driver: "+H),Pl[H]=E,ES[H]=Xt,P()};"_support"in E?E._support&&typeof E._support=="function"?E._support().then(Qt,U):Qt(!!E._support):Qt(!0)}catch(Xt){U(Xt)}});return I(R,C,N),R},y.prototype.driver=function(){return this._driver||null},y.prototype.getDriver=function(E,C,N){var R=Pl[E]?m.resolve(Pl[E]):m.reject(new Error("Driver not found."));return I(R,C,N),R},y.prototype.getSerializer=function(E){var C=m.resolve(bh);return I(C,E),C},y.prototype.ready=function(E){var C=this,N=C._driverSet.then(function(){return C._ready===null&&(C._ready=C._initDriver()),C._ready});return I(N,E,E),N},y.prototype.setDriver=function(E,C,N){var R=this;bS(E)||(E=[E]);var P=this._getSupportedDrivers(E);function U(){R._config.driver=R.driver()}function H($){return R._extend($),U(),R._ready=R._initStorage(R._config),R._ready}function W($){return function(){var ce=0;function Xe(){for(;ce<$.length;){var Dt=$[ce];return ce++,R._dbInfo=null,R._ready=null,R.getDriver(Dt).then(H).catch(Xe)}U();var _t=new Error("No available storage method found.");return R._driverSet=m.reject(_t),R._driverSet}return Xe()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=z.then(function(){var $=P[0];return R._dbInfo=null,R._ready=null,R.getDriver($).then(function(ce){R._driver=ce._driver,U(),R._wrapLibraryMethodsWithReady(),R._initDriver=W(P)})}).catch(function(){U();var $=new Error("No available storage method found.");return R._driverSet=m.reject($),R._driverSet}),I(this._driverSet,C,N),this._driverSet},y.prototype.supports=function(E){return!!ES[E]},y.prototype._extend=function(E){Ch(this,E)},y.prototype._getSupportedDrivers=function(E){for(var C=[],N=0,R=E.length;N<R;N++){var P=E[N];this.supports(P)&&C.push(P)}return C},y.prototype._wrapLibraryMethodsWithReady=function(){for(var E=0,C=Eh.length;E<C;E++)yR(this,Eh[E])},y.prototype.createInstance=function(E){return new y(E)},y}(),bR=new wR;o.exports=bR},{3:3}]},{},[4])(4)})}),Of=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MustacheUtils=void 0;var t=class CS{static escapeHtml(r){return String(r).replace(/"/g,i=>CS.entityMap[i])}};e.MustacheUtils=t,t.entityMap={'"':"""}}),k_=jn((e,t)=>{"use strict";(function(n,r){typeof e=="object"&&typeof t<"u"?t.exports=r():typeof define=="function"&&define.amd?define(r):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=r())})(e,function(){"use strict";var n=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!r(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!r(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(a,o),function(l,c){var h=o.retries,d=o.retryDelay,f=o.retryOn;if(c&&c.retries!==void 0)if(r(c.retries))h=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(r(c.retryDelay)||typeof c.retryDelay=="function")d=c.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(c&&c.retryOn)if(Array.isArray(c.retryOn)||typeof c.retryOn=="function")f=c.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(g,m){var b=function(A){var F=typeof Request<"u"&&l instanceof Request?l.clone():l;s(F,c).then(function(V){if(Array.isArray(f)&&f.indexOf(V.status)===-1)g(V);else if(typeof f=="function")try{return Promise.resolve(f(A,null,V)).then(function(M){M?I(A,null,V):g(V)}).catch(m)}catch(M){m(M)}else A<h?I(A,null,V):g(V)}).catch(function(V){if(typeof f=="function")try{Promise.resolve(f(A,V,null)).then(function(M){M?I(A,V,null):m(V)}).catch(function(M){m(M)})}catch(M){m(M)}else A<h?I(A,V,null):m(V)})};function I(A,F,V){var M=typeof d=="function"?d(A,F,V):d;setTimeout(function(){b(++A)},M)}b(0)})}};function r(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return n})}),ip=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PriceRuleType=e.DiscountType=void 0;var t=function(r){return r[r.NONE=0]="NONE",r[r.STATIC=1]="STATIC",r[r.UNIQUE_FLAT=2]="UNIQUE_FLAT",r[r.UNIQUE_FLAT_ITEMS=3]="UNIQUE_FLAT_ITEMS",r[r.UNIQUE_FIXED_ITEMS=4]="UNIQUE_FIXED_ITEMS",r[r.UNIQUE_CHEAPEST_ITEM_FREE=5]="UNIQUE_CHEAPEST_ITEM_FREE",r[r.BXGY=6]="BXGY",r}(t||(e.DiscountType=t={})),n=function(r){return r.FIXED_AMOUNT="fixed_amount",r.PERCENTAGE="percentage",r}(n||(e.PriceRuleType=n={}))}),L_=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLBuilder=void 0;var t=function(){function n(r){try{this.base=new URL(r),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return n.prototype.appendQueryParam=function(r,i){this.params.append(r,i?i.toString():"")},n.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},n.prototype.deleteQueryParam=function(r){this.params.delete(r)},n.prototype.getBase=function(){return this.base},n.prototype.getPath=function(){return this.base.pathname},n.prototype.getHostname=function(){return this.base.hostname},n.prototype.getParams=function(){return this.params},n.prototype.getQueryParam=function(r){if(!this.params)return"";var i=this.params.get(r);return!i||i==="undefined"||i==="null"?void 0:i},n.prototype.getQueryString=function(){return this.params.toString()},n.prototype.setPath=function(r){return this.base.pathname=r,this},n.prototype.setQueryParam=function(r,i){return this.params.set(r,i?i.toString():""),this},n.prototype.setQueryString=function(r){if(r)return r[0]==="?"&&(r=r.slice(1)),this.params=new URLSearchParams(r),this},n.prototype.toString=function(){var r=this.params.toString();return r===""?this.base.search="":this.base.search="?"+r,this.base.toString()},n}();e.URLBuilder=t}),U_=jn((e,t)=>{"use strict";(function(n,r){"use strict";var i="1.0.40",s="",o="?",a="function",l="undefined",c="object",h="string",d="major",f="model",g="name",m="type",b="vendor",I="version",A="architecture",F="console",V="mobile",M="tablet",J="smarttv",Ne="wearable",ht="embedded",j=500,pe="Amazon",te="Apple",de="ASUS",Ae="BlackBerry",dt="Browser",ut="Chrome",_="Edge",Wt="Firefox",Ze="Google",Zt="Huawei",Se="LG",D="Microsoft",x="Motorola",Z="Opera",ne="Samsung",ae="Sharp",_e="Sony",ve="Xiaomi",ue="Zebra",Ce="Facebook",je="Chromium OS",Pt="Mac OS",He=" Browser",tt=function(ee,De){var ge={};for(var it in ee)De[it]&&De[it].length%2===0?ge[it]=De[it].concat(ee[it]):ge[it]=ee[it];return ge},Bt=function(ee){for(var De={},ge=0;ge<ee.length;ge++)De[ee[ge].toUpperCase()]=ee[ge];return De},ke=function(ee,De){return typeof ee===h?u(De).indexOf(u(ee))!==-1:!1},u=function(ee){return ee.toLowerCase()},p=function(ee){return typeof ee===h?ee.replace(/[^\d\.]/g,s).split(".")[0]:r},v=function(ee,De){if(typeof ee===h)return ee=ee.replace(/^\s\s*/,s),typeof De===l?ee:ee.substring(0,j)},T=function(ee,De){for(var ge=0,it,En,_n,lt,me,On;ge<De.length&&!me;){var rs=De[ge],za=De[ge+1];for(it=En=0;it<rs.length&&!me&&rs[it];)if(me=rs[it++].exec(ee),me)for(_n=0;_n<za.length;_n++)On=me[++En],lt=za[_n],typeof lt===c&<.length>0?lt.length===2?typeof lt[1]==a?this[lt[0]]=lt[1].call(this,On):this[lt[0]]=lt[1]:lt.length===3?typeof lt[1]===a&&!(lt[1].exec&<[1].test)?this[lt[0]]=On?lt[1].call(this,On,lt[2]):r:this[lt[0]]=On?On.replace(lt[1],lt[2]):r:lt.length===4&&(this[lt[0]]=On?lt[3].call(this,On.replace(lt[1],lt[2])):r):this[lt]=On||r;ge+=2}},L=function(ee,De){for(var ge in De)if(typeof De[ge]===c&&De[ge].length>0){for(var it=0;it<De[ge].length;it++)if(ke(De[ge][it],ee))return ge===o?r:ge}else if(ke(De[ge],ee))return ge===o?r:ge;return De.hasOwnProperty("*")?De["*"]:ee},B={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Q={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},rt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[I,[g,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[I,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,I],[/opios[\/ ]+([\w\.]+)/i],[I,[g,Z+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[I,[g,Z+" GX"]],[/\bopr\/([\w\.]+)/i],[I,[g,Z]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[I,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[I,[g,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[g,I],[/quark(?:pc)?\/([-\w\.]+)/i],[I,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[I,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[I,[g,"UC"+dt]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[I,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[I,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[I,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[I,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[I,[g,"Smart Lenovo "+dt]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+dt],I],[/\bfocus\/([\w\.]+)/i],[I,[g,Wt+" Focus"]],[/\bopt\/([\w\.]+)/i],[I,[g,Z+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[I,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[I,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[I,[g,Z+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[I,[g,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[I,[g,Wt]],[/\bqihoobrowser\/?([\w\.]*)/i],[I,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],I],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+He],I],[/samsungbrowser\/([\w\.]+)/i],[I,[g,ne+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[I,[g,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,"Sogou Mobile"],I],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,I],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[g],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[I,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,Ce],I],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[g,I],[/\bgsa\/([\w\.]+) .*safari\//i],[I,[g,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[I,[g,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[I,[g,ut+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,ut+" WebView"],I],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[I,[g,"Android "+dt]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,I],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[I,[g,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[I,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[I,L,B]],[/(webkit|khtml)\/([\w\.]+)/i],[g,I],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],I],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,I],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[I,[g,Wt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[g,[I,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[I,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,u]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,s,u]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,u]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[b,ne],[m,M]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[f,[b,ne],[m,V]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[b,te],[m,V]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[b,te],[m,M]],[/(macintosh);/i],[f,[b,te]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[b,ae],[m,V]],[/(?:honor)([-\w ]+)[;\)]/i],[f,[b,"Honor"],[m,V]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[b,Zt],[m,M]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[b,Zt],[m,V]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[f,/_/g," "],[b,ve],[m,V]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[b,ve],[m,M]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[b,"OPPO"],[m,V]],[/\b(opd2\d{3}a?) bui/i],[f,[b,"OPPO"],[m,M]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[b,"Vivo"],[m,V]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[b,"Realme"],[m,V]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[b,x],[m,V]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[b,x],[m,M]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[b,Se],[m,M]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[b,Se],[m,V]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[b,"Lenovo"],[m,M]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[b,"Nokia"],[m,V]],[/(pixel c)\b/i],[f,[b,Ze],[m,M]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[b,Ze],[m,V]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[b,_e],[m,V]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[b,_e],[m,M]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[b,"OnePlus"],[m,V]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[b,pe],[m,M]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[b,pe],[m,V]],[/(playbook);[-\w\),; ]+(rim)/i],[f,b,[m,M]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[b,Ae],[m,V]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[b,de],[m,M]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[b,de],[m,V]],[/(nexus 9)/i],[f,[b,"HTC"],[m,M]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[f,/_/g," "],[m,V]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[f,[b,"TCL"],[m,M]],[/(itel) ((\w+))/i],[[b,u],f,[m,L,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[b,"Acer"],[m,M]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[b,"Meizu"],[m,V]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[b,"Ulefone"],[m,V]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[f,[b,"Energizer"],[m,V]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[f,[b,"Cat"],[m,V]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[f,[b,"Smartfren"],[m,V]],[/droid.+; (a(?:015|06[35]|142p?))/i],[f,[b,"Nothing"],[m,V]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[b,f,[m,V]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[b,f,[m,M]],[/(surface duo)/i],[f,[b,D],[m,M]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[b,"Fairphone"],[m,V]],[/(u304aa)/i],[f,[b,"AT&T"],[m,V]],[/\bsie-(\w*)/i],[f,[b,"Siemens"],[m,V]],[/\b(rct\w+) b/i],[f,[b,"RCA"],[m,M]],[/\b(venue[\d ]{2,7}) b/i],[f,[b,"Dell"],[m,M]],[/\b(q(?:mv|ta)\w+) b/i],[f,[b,"Verizon"],[m,M]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[b,"Barnes & Noble"],[m,M]],[/\b(tm\d{3}\w+) b/i],[f,[b,"NuVision"],[m,M]],[/\b(k88) b/i],[f,[b,"ZTE"],[m,M]],[/\b(nx\d{3}j) b/i],[f,[b,"ZTE"],[m,V]],[/\b(gen\d{3}) b.+49h/i],[f,[b,"Swiss"],[m,V]],[/\b(zur\d{3}) b/i],[f,[b,"Swiss"],[m,M]],[/\b((zeki)?tb.*\b) b/i],[f,[b,"Zeki"],[m,M]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],f,[m,M]],[/\b(ns-?\w{0,9}) b/i],[f,[b,"Insignia"],[m,M]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[b,"NextBook"],[m,M]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[b,"Voice"],f,[m,V]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],f,[m,V]],[/\b(ph-1) /i],[f,[b,"Essential"],[m,V]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[b,"Envizen"],[m,M]],[/\b(trio[-\w\. ]+) b/i],[f,[b,"MachSpeed"],[m,M]],[/\btu_(1491) b/i],[f,[b,"Rotor"],[m,M]],[/(shield[\w ]+) b/i],[f,[b,"Nvidia"],[m,M]],[/(sprint) (\w+)/i],[b,f,[m,V]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[b,D],[m,V]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[b,ue],[m,M]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[b,ue],[m,V]],[/smart-tv.+(samsung)/i],[b,[m,J]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[b,ne],[m,J]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,Se],[m,J]],[/(apple) ?tv/i],[b,[f,te+" TV"],[m,J]],[/crkey/i],[[f,ut+"cast"],[b,Ze],[m,J]],[/droid.+aft(\w+)( bui|\))/i],[f,[b,pe],[m,J]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[b,ae],[m,J]],[/(bravia[\w ]+)( bui|\))/i],[f,[b,_e],[m,J]],[/(mitv-\w{5}) bui/i],[f,[b,ve],[m,J]],[/Hbbtv.*(technisat) (.*);/i],[b,f,[m,J]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,v],[f,v],[m,J]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,J]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,f,[m,F]],[/droid.+; (shield) bui/i],[f,[b,"Nvidia"],[m,F]],[/(playstation [345portablevi]+)/i],[f,[b,_e],[m,F]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[b,D],[m,F]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[f,[b,ne],[m,Ne]],[/((pebble))app/i],[b,f,[m,Ne]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[b,te],[m,Ne]],[/droid.+; (glass) \d/i],[f,[b,Ze],[m,Ne]],[/droid.+; (wt63?0{2,3})\)/i],[f,[b,ue],[m,Ne]],[/droid.+; (glass) \d/i],[f,[b,Ze],[m,Ne]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,f,[m,Ne]],[/; (quest( \d| pro)?)/i],[f,[b,Ce],[m,Ne]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[m,ht]],[/(aeobc)\b/i],[f,[b,pe],[m,ht]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[m,V]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,M]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,M]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,V]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[I,[g,_+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,I],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[I,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,I],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[I,g]],os:[[/microsoft (windows) (vista|xp)/i],[g,I],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[g,[I,L,Q]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[I,L,Q],[g,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[I,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[g,Pt],[I,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[I,g],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[g,I],[/\(bb(10);/i],[I,[g,Ae]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[I,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[I,[g,Wt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[I,[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[I,[g,"watchOS"]],[/crkey\/([\d\.]+)/i],[I,[g,ut+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,je],I],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[g,I],[/(sunos) ?([\w\.\d]*)/i],[[g,"Solaris"],I],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,I]]},Ke=function(ee,De){if(typeof ee===c&&(De=ee,ee=r),!(this instanceof Ke))return new Ke(ee,De).getResult();var ge=typeof n!==l&&n.navigator?n.navigator:r,it=ee||(ge&&ge.userAgent?ge.userAgent:s),En=ge&&ge.userAgentData?ge.userAgentData:r,_n=De?tt(rt,De):rt,lt=ge&&ge.userAgent==it;return this.getBrowser=function(){var me={};return me[g]=r,me[I]=r,T.call(me,it,_n.browser),me[d]=p(me[I]),lt&&ge&&ge.brave&&typeof ge.brave.isBrave==a&&(me[g]="Brave"),me},this.getCPU=function(){var me={};return me[A]=r,T.call(me,it,_n.cpu),me},this.getDevice=function(){var me={};return me[b]=r,me[f]=r,me[m]=r,T.call(me,it,_n.device),lt&&!me[m]&&En&&En.mobile&&(me[m]=V),lt&&me[f]=="Macintosh"&&ge&&typeof ge.standalone!==l&&ge.maxTouchPoints&&ge.maxTouchPoints>2&&(me[f]="iPad",me[m]=M),me},this.getEngine=function(){var me={};return me[g]=r,me[I]=r,T.call(me,it,_n.engine),me},this.getOS=function(){var me={};return me[g]=r,me[I]=r,T.call(me,it,_n.os),lt&&!me[g]&&En&&En.platform&&En.platform!="Unknown"&&(me[g]=En.platform.replace(/chrome os/i,je).replace(/macos/i,Pt)),me},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return it},this.setUA=function(me){return it=typeof me===h&&me.length>j?v(me,j):me,this},this.setUA(it),this};Ke.VERSION=i,Ke.BROWSER=Bt([g,I,d]),Ke.CPU=Bt([A]),Ke.DEVICE=Bt([f,b,m,F,V,J,M,Ne,ht]),Ke.ENGINE=Ke.OS=Bt([g,I]),typeof e!==l?(typeof t!==l&&t.exports&&(e=t.exports=Ke),e.UAParser=Ke):typeof define===a&&define.amd?define(function(){return Ke}):typeof n!==l&&(n.UAParser=Ke);var Le=typeof n!==l&&(n.jQuery||n.Zepto);if(Le&&!Le.ua){var pt=new Ke;Le.ua=pt.getResult(),Le.ua.get=function(){return pt.getUA()},Le.ua.set=function(ee){pt.setUA(ee);var De=pt.getResult();for(var ge in De)Le.ua[ge]=De[ge]}}})(typeof window=="object"?window:e)}),j_=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayUtils=void 0;var t=class IS{static of(r,i){return i!==void 0?new Array(r).fill(i):Array.from({length:r},(s,o)=>o)}static remove(r,i){let s=r.indexOf(i);return s===-1?!1:(r.splice(s,1),!0)}static swap(r,i,s){[r[i],r[s]]=[r[s],r[i]]}static sum(r,i){return r.reduce((s,o)=>s+Math.max(i?i(o):+o,0),0)}static unique(r,i){return r.filter((s,o,a)=>a.findIndex(l=>l[i]===s[i])===o)}static shuffle(r){let i=r.length;for(;i!=0;){let s=Math.floor(Math.random()*i);i--,IS.swap(r,i,s)}}};e.ArrayUtils=t}),Sx=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssetType=void 0;var t=function(n){return n[n.IMAGE=1]="IMAGE",n[n.VIDEO=2]="VIDEO",n[n.GIF=3]="GIF",n[n.SCREENSHOT=4]="SCREENSHOT",n[n.THREE_D=5]="THREE_D",n[n.FONT=6]="FONT",n[n.TEXT=7]="TEXT",n[n.JSON=8]="JSON",n[n.SVG=9]="SVG",n[n.HTML=10]="HTML",n[n.LOGO=11]="LOGO",n[n.OTHERS=1e3]="OTHERS",n}(t||(e.AssetType=t={}))}),Ix=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TemplateStatus=void 0;var t=function(n){return n[n.DRAFT=1]="DRAFT",n[n.PUBLISHED=2]="PUBLISHED",n[n.DISABLED=3]="DISABLED",n}(t||(e.TemplateStatus=t={}))}),xx=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=void 0;var t=function(n){return n.VIEW_ITEM="VIEW_ITEM",n.ADD_TO_CART="ADD_TO_CART",n.VIEW_CATEGORY="VIEW_CATEGORY",n.VIEW_TAG="VIEW_TAG",n.SEARCH="SEARCH",n.APPLY_COUPON="APPLY_COUPON",n}(t||(e.ActionType=t={}))}),Rx=jn(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(r,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,a)}:function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]}),n=e&&e.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(Sx(),e),n(Ix(),e),n(Qn(),e),n(xx(),e)});function zR(e,t){return Object.is(e,t)}var en=null,lu=!1,Bh=1,Ii=Symbol("SIGNAL");function $e(e){let t=en;return en=e,t}function jE(){return en}var uu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function $E(e){if(lu)throw new Error("");if(en===null)return;en.consumerOnSignalRead(e);let t=en.nextProducerIndex++;if(fu(en),t<en.producerNode.length&&en.producerNode[t]!==e&&Tc(en)){let n=en.producerNode[t];du(n,en.producerIndexOfThis[t])}en.producerNode[t]!==e&&(en.producerNode[t]=e,en.producerIndexOfThis[t]=Tc(en)?qE(e,en,t):0),en.producerLastReadVersion[t]=e.version}function qR(){Bh++}function YR(e){if(!(Tc(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Bh)){if(!e.producerMustRecompute(e)&&!Uh(e)){HE(e);return}e.producerRecomputeValue(e),HE(e)}}function WE(e){if(e.liveConsumerNode===void 0)return;let t=lu;lu=!0;try{for(let n of e.liveConsumerNode)n.dirty||KR(n)}finally{lu=t}}function GE(){return en?.consumerAllowSignalWrites!==!1}function KR(e){e.dirty=!0,WE(e),e.consumerMarkedDirty?.(e)}function HE(e){e.dirty=!1,e.lastCleanEpoch=Bh}function Vh(e){return e&&(e.nextProducerIndex=0),$e(e)}function zE(e,t){if($e(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(Tc(e))for(let n=e.nextProducerIndex;n<e.producerNode.length;n++)du(e.producerNode[n],e.producerIndexOfThis[n]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Uh(e){fu(e);for(let t=0;t<e.producerNode.length;t++){let n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(YR(n),r!==n.version))return!0}return!1}function Hh(e){if(fu(e),Tc(e))for(let t=0;t<e.producerNode.length;t++)du(e.producerNode[t],e.producerIndexOfThis[t]);e.producerNode.length=e.producerLastReadVersion.length=e.producerIndexOfThis.length=0,e.liveConsumerNode&&(e.liveConsumerNode.length=e.liveConsumerIndexOfThis.length=0)}function qE(e,t,n){if(YE(e),e.liveConsumerNode.length===0&&KE(e))for(let r=0;r<e.producerNode.length;r++)e.producerIndexOfThis[r]=qE(e.producerNode[r],e,r);return e.liveConsumerIndexOfThis.push(n),e.liveConsumerNode.push(t)-1}function du(e,t){if(YE(e),e.liveConsumerNode.length===1&&KE(e))for(let r=0;r<e.producerNode.length;r++)du(e.producerNode[r],e.producerIndexOfThis[r]);let n=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[n],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[n],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let r=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];fu(i),i.producerIndexOfThis[r]=t}}function Tc(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function fu(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function YE(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function KE(e){return e.producerNode!==void 0}function ZR(){throw new Error}var ZE=ZR;function XE(e){ZE(e)}function JE(e){ZE=e}var XR=null;function QE(e){let t=Object.create(tw);t.value=e;let n=()=>($E(t),t.value);return n[Ii]=t,n}function jh(e,t){GE()||XE(e),e.equal(e.value,t)||(e.value=t,JR(e))}function ew(e,t){GE()||XE(e),jh(e,t(e.value))}var tw=re(w({},uu),{equal:zR,value:void 0,kind:"signal"});function JR(e){e.version++,qR(),WE(e),XR?.()}function Ie(e){return typeof e=="function"}function pu(e){let t=e(n=>{Error.call(n),n.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var hu=pu(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
|
|
1
|
+
"use strict";(()=>{var BR=Object.create,Fh=Object.defineProperty,VR=Object.defineProperties,UR=Object.getOwnPropertyDescriptor,HR=Object.getOwnPropertyDescriptors,jR=Object.getOwnPropertyNames,BE=Object.getOwnPropertySymbols,$R=Object.getPrototypeOf,UE=Object.prototype.hasOwnProperty,WR=Object.prototype.propertyIsEnumerable,VE=(e,t,n)=>t in e?Fh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||={})UE.call(t,n)&&VE(e,n,t[n]);if(BE)for(var n of BE(t))WR.call(t,n)&&VE(e,n,t[n]);return e},re=(e,t)=>VR(e,HR(t)),Ic=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),GR=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jR(t))!UE.call(e,i)&&i!==n&&Fh(e,i,{get:()=>t[i],enumerable:!(r=UR(t,i))||r.enumerable});return e},Fe=(e,t,n)=>(n=e!=null?BR($R(e)):{},GR(t||!e||!e.__esModule?Fh(n,"default",{value:e,enumerable:!0}):n,e)),is=jn((e,t)=>{"use strict";(function(n){"use strict";var r={};r.VERSION="1.6.1";var i,s={},o=function(d,f){return function(){return f.apply(d,arguments)}},a=function(){var d=arguments,f=d[0],g,m;for(m=1;m<d.length;m++)for(g in d[m])!(g in f)&&d[m].hasOwnProperty(g)&&(f[g]=d[m][g]);return f},l=function(d,f){return{value:d,name:f}};r.TRACE=l(1,"TRACE"),r.DEBUG=l(2,"DEBUG"),r.INFO=l(3,"INFO"),r.TIME=l(4,"TIME"),r.WARN=l(5,"WARN"),r.ERROR=l(8,"ERROR"),r.OFF=l(99,"OFF");var c=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};c.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var f=this.context.filterLevel;return d.value>=f.value},trace:function(){this.invoke(r.TRACE,arguments)},debug:function(){this.invoke(r.DEBUG,arguments)},info:function(){this.invoke(r.INFO,arguments)},warn:function(){this.invoke(r.WARN,arguments)},error:function(){this.invoke(r.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(r.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(r.TIME,[d,"end"])},invoke:function(d,f){i&&this.enabledFor(d)&&i(f,a({level:d},this.context))}};var h=new c({filterLevel:r.OFF});(function(){var d=r;d.enabledFor=o(h,h.enabledFor),d.trace=o(h,h.trace),d.debug=o(h,h.debug),d.time=o(h,h.time),d.timeEnd=o(h,h.timeEnd),d.info=o(h,h.info),d.warn=o(h,h.warn),d.error=o(h,h.error),d.log=d.info})(),r.setHandler=function(d){i=d},r.setLevel=function(d){h.setLevel(d);for(var f in s)s.hasOwnProperty(f)&&s[f].setLevel(d)},r.getLevel=function(){return h.getLevel()},r.get=function(d){return s[d]||(s[d]=new c(a({name:d},h.context)))},r.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(m,b){b.name&&m.unshift("["+b.name+"]")};var f={},g=function(m,b){Function.prototype.apply.call(m,console,b)};return typeof console>"u"?function(){}:function(m,b){m=Array.prototype.slice.call(m);var I=console.log,A;b.level===r.TIME?(A=(b.name?"["+b.name+"] ":"")+m[0],m[1]==="start"?console.time?console.time(A):f[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):g(I,[A+": "+(new Date().getTime()-f[A])+"ms"])):(b.level===r.WARN&&console.warn?I=console.warn:b.level===r.ERROR&&console.error?I=console.error:b.level===r.INFO&&console.info?I=console.info:b.level===r.DEBUG&&console.debug?I=console.debug:b.level===r.TRACE&&console.trace&&(I=console.trace),d.formatter(m,b),g(I,m))}},r.useDefaults=function(d){r.setLevel(d&&d.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(d))},r.setDefaults=r.useDefaults,typeof define=="function"&&define.amd?define(r):typeof t<"u"&&t.exports?t.exports=r:(r._prevLogger=n.Logger,r.noConflict=function(){return n.Logger=r._prevLogger,r},n.Logger=r)})(e)}),er=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MilestoneRewardType=e.ProgressBarLayout=e.EngagementContentSource=e.EngagementObjective=e.OnsiteDeliveryType=e.ClickActionType=e.FrequencyGapUnit=e.FrequencyType=e.RedirectBehaviour=e.EngagementPlacementPosition=e.EngagementCollectionSource=e.PromotionType=e.CartFilterEnum=e.CartCurrencyOperator=e.CartCriteria=e.URLCriteria=e.UTMCriteria=e.CartItemSource=e.EngagementItemSource=e.PurchasedVisitor=e.LoggedInVisitor=e.VisitorType=e.SessionType=e.EngagementContentType=e.TriggerType=e.EngagementType=e.EngagementStatus=e.TimePreference=e.ScheduleFrequency=e.CriteriaFrequency=void 0;var t=function(_){return _[_.ONCE_PER_USER=1]="ONCE_PER_USER",_[_.ONCE_PER_SESSION=2]="ONCE_PER_SESSION",_[_.EVERY_TIME=3]="EVERY_TIME",_}(t||(e.CriteriaFrequency=t={})),n=function(_){return _[_.ONE_TIME=1]="ONE_TIME",_[_.MULTIPLE=2]="MULTIPLE",_[_.RECURRING=3]="RECURRING",_}(n||(e.ScheduleFrequency=n={})),r=function(_){return _[_.NOW=1]="NOW",_[_.LATER=2]="LATER",_[_.NEVER=3]="NEVER",_}(r||(e.TimePreference=r={})),i=function(_){return _[_.PUBLISHED=1]="PUBLISHED",_[_.DRAFT=2]="DRAFT",_[_.PAUSED=3]="PAUSED",_[_.FAILED=4]="FAILED",_[_.STOPPED=5]="STOPPED",_[_.COMPLETED=6]="COMPLETED",_[_.ARCHIVED=7]="ARCHIVED",_[_.UNINSTALLED=8]="UNINSTALLED",_}(i||(e.EngagementStatus=i={})),s=function(_){return _[_.POPUP=1]="POPUP",_[_.LEAD_GENERATION=2]="LEAD_GENERATION",_[_.PRODUCT_WIDGET=3]="PRODUCT_WIDGET",_[_.PRODUCT_BUNDLE=4]="PRODUCT_BUNDLE",_[_.ANNOUNCEMENT_BAR=5]="ANNOUNCEMENT_BAR",_[_.CART_REMINDER=6]="CART_REMINDER",_[_.CRO_COPILOT=10]="CRO_COPILOT",_[_.OTHER=11]="OTHER",_}(s||(e.EngagementType=s={})),o=function(_){return _[_.NONE=0]="NONE",_[_.RULE_BASED=1]="RULE_BASED",_[_.INTENT_BASED=2]="INTENT_BASED",_}(o||(e.TriggerType=o={})),a=function(_){return _[_.SINGLE=1]="SINGLE",_[_.EXCLUSION=2]="EXCLUSION",_[_.ABTESTING=3]="ABTESTING",_}(a||(e.EngagementContentType=a={})),l=function(_){return _[_.ALL=0]="ALL",_[_.NEW_ONLY=1]="NEW_ONLY",_[_.RETURNING_ONLY=2]="RETURNING_ONLY",_}(l||(e.SessionType=l={})),c=function(_){return _[_.ALL=0]="ALL",_[_.LOGGED_IN_ONLY=3]="LOGGED_IN_ONLY",_[_.NON_LOGGED_IN_ONLY=4]="NON_LOGGED_IN_ONLY",_[_.PURCHASED=5]="PURCHASED",_[_.NON_PURCHASED=6]="NON_PURCHASED",_[_.ABANDON_CART=7]="ABANDON_CART",_[_.RETURNING_AND_NON_PURCHASED=8]="RETURNING_AND_NON_PURCHASED",_}(c||(e.VisitorType=c={})),h=function(_){return _.ALL="ALL",_.LOGGED_IN="LOGGED_IN",_.NON_LOGGED_IN="NON_LOGGED_IN",_}(h||(e.LoggedInVisitor=h={})),d=function(_){return _.ALL="ALL",_.PURCHASED="PURCHASED",_.NON_PURCHASED="NON_PURCHASED",_}(d||(e.PurchasedVisitor=d={})),f=function(_){return _[_.NONE=0]="NONE",_[_.ITEM_RECOMMENDATION=1]="ITEM_RECOMMENDATION",_[_.MULTIPLE_ITEMS=2]="MULTIPLE_ITEMS",_[_.SINGLE_ITEM=3]="SINGLE_ITEM",_[_.TOP_SELLING=4]="TOP_SELLING",_[_.STOCK_CLEARANCE=5]="STOCK_CLEARANCE",_[_.NEW_ARRIVALS=6]="NEW_ARRIVALS",_[_.RECENTLY_VIEWED=7]="RECENTLY_VIEWED",_[_.EVENT_ITEM=8]="EVENT_ITEM",_[_.CART_ITEM=9]="CART_ITEM",_[_.BUNDLE=10]="BUNDLE",_[_.CURRENT_ITEM=11]="CURRENT_ITEM",_[_.PURCHASED_PREVIOUSLY=12]="PURCHASED_PREVIOUSLY",_[_.COLLECTION_ITEMS=13]="COLLECTION_ITEMS",_[_.TRENDING_ITEMS=14]="TRENDING_ITEMS",_}(f||(e.EngagementItemSource=f={})),g=function(_){return _[_.LAST_ADDED=1]="LAST_ADDED",_[_.FIRST_ADDED=2]="FIRST_ADDED",_[_.HIGHEST_PRICE=3]="HIGHEST_PRICE",_[_.LOWEST_PRICE=4]="LOWEST_PRICE",_[_.FIRST_MATCHING_TAG=5]="FIRST_MATCHING_TAG",_[_.ALL=6]="ALL",_}(g||(e.CartItemSource=g={})),m=function(_){return _[_.ALL=0]="ALL",_[_.ONLY_ORGANIC=1]="ONLY_ORGANIC",_[_.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",_[_.INCLUDES=3]="INCLUDES",_[_.EXCLUDES=4]="EXCLUDES",_}(m||(e.UTMCriteria=m={})),b=function(_){return _[_.NONE=0]="NONE",_[_.LIKE=1]="LIKE",_[_.NOT_LIKE=2]="NOT_LIKE",_[_.EQUALS=3]="EQUALS",_[_.NOT_EQUALS=4]="NOT_EQUALS",_}(b||(e.URLCriteria=b={})),I=function(_){return _[_.NONE=0]="NONE",_[_.LESS_THAN=1]="LESS_THAN",_[_.GREATER_THAN=2]="GREATER_THAN",_[_.BETWEEN=3]="BETWEEN",_[_.EQUALS=4]="EQUALS",_}(I||(e.CartCriteria=I={})),A=function(_){return _[_.ALL=0]="ALL",_[_.INCLUDES=1]="INCLUDES",_[_.EXCLUDES=2]="EXCLUDES",_}(A||(e.CartCurrencyOperator=A={})),F=function(_){return _[_.NONE=0]="NONE",_[_.AMOUNT=1]="AMOUNT",_[_.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",_[_.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",_}(F||(e.CartFilterEnum=F={})),V=function(_){return _[_.NONE=0]="NONE",_[_.ITEM=1]="ITEM",_[_.COLLECTION=2]="COLLECTION",_}(V||(e.PromotionType=V={})),M=function(_){return _[_.NONE=0]="NONE",_[_.SINGLE=1]="SINGLE",_[_.MULTIPLE=2]="MULTIPLE",_}(M||(e.EngagementCollectionSource=M={})),J=function(_){return _.BEFORE="before",_.AFTER="after",_.INSIDE_FIRST="insideFirst",_.INSIDE_LAST="insideLast",_}(J||(e.EngagementPlacementPosition=J={})),Ne=function(_){return _.SHOPIFY_CHECKOUT="shopify_checkout",_.THIRD_PARTY_CHECKOUT="third_party_checkout",_.CART_PAGE="cart_page",_.CART_DRAWER="cart_drawer",_}(Ne||(e.RedirectBehaviour=Ne={})),ht=function(_){return _.ONCE_IN_SESSION="ONCE_IN_SESSION",_.ACROSS_SESSIONS="ACROSS_SESSIONS",_}(ht||(e.FrequencyType=ht={})),j=function(_){return _.DAYS="DAYS",_.HOURS="HOURS",_.MINUTES="MINUTES",_.SECONDS="SECONDS",_}(j||(e.FrequencyGapUnit=j={})),pe=function(_){return _[_.NONE=0]="NONE",_[_.REJECT_POPUP=1]="REJECT_POPUP",_[_.ACCEPT_POPUP=2]="ACCEPT_POPUP",_[_.GO_TO_URL=4]="GO_TO_URL",_[_.SHARE=5]="SHARE",_[_.KEY_VALUE=100]="KEY_VALUE",_[_.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",_[_.ADD_TO_CART=102]="ADD_TO_CART",_[_.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",_[_.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",_[_.OPEN_CART=105]="OPEN_CART",_[_.SUBMIT_FORM=106]="SUBMIT_FORM",_[_.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",_[_.ADD_BUNDLE=108]="ADD_BUNDLE",_[_.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",_}(pe||(e.ClickActionType=pe={})),te=function(_){return _.POPUP="POPUP",_.PAGE_EMBED="PAGE_EMBED",_.CART_EMBED="CART_EMBED",_.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",_}(te||(e.OnsiteDeliveryType=te={})),de=function(_){return _.PRODUCT_PROMOTION="PRODUCT_PROMOTION",_.BUNDLE_AND_UPSELL="BUNDLE_AND_UPSELL",_.CART_RECOVERY="CART_RECOVERY",_.ANNOUNCEMENT="ANNOUNCEMENT",_.LEAD_GENERATION="LEAD_GENERATION",_.DATA_COLLECTION="DATA_COLLECTION",_.SALE_PROMOTION="SALE_PROMOTION",_.SUBSCRIPTION_UPSELL="SUBSCRIPTION_UPSELL",_.SHOPPABLE_VIDEO="SHOPPABLE_VIDEO",_.BYOB="BYOB",_.PROGRESS_BAR="PROGRESS_BAR",_.BUY_NOW="BUY_NOW",_}(de||(e.EngagementObjective=de={})),Ae=function(_){return _.COOEE="COOEE",_.KLAVIYO="KLAVIYO",_}(Ae||(e.EngagementContentSource=Ae={})),dt=function(_){return _.ICONS="ICONS",_.TILES="TILES",_}(dt||(e.ProgressBarLayout=dt={})),ut=function(_){return _.FREE_SHIPPING="FREE_SHIPPING",_.DISCOUNT="DISCOUNT",_.FREE_AUTO_GIFT="FREE_AUTO_GIFT",_.FREE_GIFT_SELECT="FREE_GIFT_SELECT",_}(ut||(e.MilestoneRewardType=ut={}))}),va=jn(e=>{"use strict";var t=e&&e.__awaiter||function(r,i,s,o){function a(l){return l instanceof s?l:new s(function(c){c(l)})}return new(s||(s=Promise))(function(l,c){function h(g){try{f(o.next(g))}catch(m){c(m)}}function d(g){try{f(o.throw(g))}catch(m){c(m)}}function f(g){g.done?l(g.value):a(g.value).then(h,d)}f((o=o.apply(r,i||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.JSUtils=void 0;var n=class{static isObject(r){return typeof r=="object"&&!Array.isArray(r)&&r!==null}static parseToAny(r){try{return JSON.parse(r.toString())}catch{}return r.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(r.toString()):r}static sleep(r){return t(this,void 0,void 0,function*(){return new Promise(i=>setTimeout(i,r))})}static hasKeys(r){return r?Object.keys(r).length>=1:!1}static convertObjectToArray(r,i){return i.reduce((s,o)=>(r.hasOwnProperty(o)&&r[o]!=null&&s.push({[o]:r[o]}),s),[])}static removeNullUndefinedKeys(r){return Object.keys(r).reduce((i,s)=>(r[s]!==null&&r[s]!==void 0&&(i[s]=r[s]),i),{})}static stringify(r){return JSON.stringify(r,function(i,s){return s===void 0?null:s})}};e.JSUtils=n,n.ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)}),QS=jn((e,t)=>{"use strict";(function(n){if(typeof e=="object"&&typeof t<"u")t.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var r;typeof window<"u"?r=window:typeof global<"u"?r=global:typeof self<"u"?r=self:r=this,r.localforage=n()}})(function(){var n,r,i;return function s(o,a,l){function c(f,g){if(!a[f]){if(!o[f]){var m=typeof Ic=="function"&&Ic;if(!g&&m)return m(f,!0);if(h)return h(f,!0);var b=new Error("Cannot find module '"+f+"'");throw b.code="MODULE_NOT_FOUND",b}var I=a[f]={exports:{}};o[f][0].call(I.exports,function(A){var F=o[f][1][A];return c(F||A)},I,I.exports,s,o,a,l)}return a[f].exports}for(var h=typeof Ic=="function"&&Ic,d=0;d<l.length;d++)c(l[d]);return c}({1:[function(s,o,a){(function(l){"use strict";var c=l.MutationObserver||l.WebKitMutationObserver,h;if(c){var d=0,f=new c(A),g=l.document.createTextNode("");f.observe(g,{characterData:!0}),h=function(){g.data=d=++d%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var m=new l.MessageChannel;m.port1.onmessage=A,h=function(){m.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?h=function(){var V=l.document.createElement("script");V.onreadystatechange=function(){A(),V.onreadystatechange=null,V.parentNode.removeChild(V),V=null},l.document.documentElement.appendChild(V)}:h=function(){setTimeout(A,0)};var b,I=[];function A(){b=!0;for(var V,M,J=I.length;J;){for(M=I,I=[],V=-1;++V<J;)M[V]();J=I.length}b=!1}o.exports=F;function F(V){I.push(V)===1&&!b&&h()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,a){"use strict";var l=s(1);function c(){}var h={},d=["REJECTED"],f=["FULFILLED"],g=["PENDING"];o.exports=m;function m(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,j!==c&&F(this,j)}m.prototype.catch=function(j){return this.then(null,j)},m.prototype.then=function(j,pe){if(typeof j!="function"&&this.state===f||typeof pe!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==g){var de=this.state===f?j:pe;I(te,de,this.outcome)}else this.queue.push(new b(te,j,pe));return te};function b(j,pe,te){this.promise=j,typeof pe=="function"&&(this.onFulfilled=pe,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}b.prototype.callFulfilled=function(j){h.resolve(this.promise,j)},b.prototype.otherCallFulfilled=function(j){I(this.promise,this.onFulfilled,j)},b.prototype.callRejected=function(j){h.reject(this.promise,j)},b.prototype.otherCallRejected=function(j){I(this.promise,this.onRejected,j)};function I(j,pe,te){l(function(){var de;try{de=pe(te)}catch(Ae){return h.reject(j,Ae)}de===j?h.reject(j,new TypeError("Cannot resolve promise with itself")):h.resolve(j,de)})}h.resolve=function(j,pe){var te=V(A,pe);if(te.status==="error")return h.reject(j,te.value);var de=te.value;if(de)F(j,de);else{j.state=f,j.outcome=pe;for(var Ae=-1,dt=j.queue.length;++Ae<dt;)j.queue[Ae].callFulfilled(pe)}return j},h.reject=function(j,pe){j.state=d,j.outcome=pe;for(var te=-1,de=j.queue.length;++te<de;)j.queue[te].callRejected(pe);return j};function A(j){var pe=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof pe=="function")return function(){pe.apply(j,arguments)}}function F(j,pe){var te=!1;function de(_){te||(te=!0,h.reject(j,_))}function Ae(_){te||(te=!0,h.resolve(j,_))}function dt(){pe(Ae,de)}var ut=V(dt);ut.status==="error"&&de(ut.value)}function V(j,pe){var te={};try{te.value=j(pe),te.status="success"}catch(de){te.status="error",te.value=de}return te}m.resolve=M;function M(j){return j instanceof this?j:h.resolve(new this(c),j)}m.reject=J;function J(j){var pe=new this(c);return h.reject(pe,j)}m.all=Ne;function Ne(j){var pe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,de=!1;if(!te)return this.resolve([]);for(var Ae=new Array(te),dt=0,ut=-1,_=new this(c);++ut<te;)Gt(j[ut],ut);return _;function Gt(Ze,Zt){pe.resolve(Ze).then(Se,function(D){de||(de=!0,h.reject(_,D))});function Se(D){Ae[Zt]=D,++dt===te&&!de&&(de=!0,h.resolve(_,Ae))}}}m.race=ht;function ht(j){var pe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,de=!1;if(!te)return this.resolve([]);for(var Ae=-1,dt=new this(c);++Ae<te;)ut(j[Ae]);return dt;function ut(_){pe.resolve(_).then(function(Gt){de||(de=!0,h.resolve(dt,Gt))},function(Gt){de||(de=!0,h.reject(dt,Gt))})}}},{1:1}],3:[function(s,o,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,a){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y};function c(y,E){if(!(y instanceof E))throw new TypeError("Cannot call a class as a function")}function h(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=h();function f(){try{if(!d||!d.open)return!1;var y=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),E=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!y||E)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function g(y,E){y=y||[],E=E||{};try{return new Blob(y,E)}catch(P){if(P.name!=="TypeError")throw P;for(var C=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,N=new C,R=0;R<y.length;R+=1)N.append(y[R]);return N.getBlob(E.type)}}typeof Promise>"u"&&s(3);var m=Promise;function b(y,E){E&&y.then(function(C){E(null,C)},function(C){E(C)})}function I(y,E,C){typeof E=="function"&&y.then(E),typeof C=="function"&&y.catch(C)}function A(y){return typeof y!="string"&&(console.warn(y+" used as a key, but it is not a string."),y=String(y)),y}function F(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var V="local-forage-detect-blob-support",M=void 0,J={},Ne=Object.prototype.toString,ht="readonly",j="readwrite";function pe(y){for(var E=y.length,C=new ArrayBuffer(E),N=new Uint8Array(C),R=0;R<E;R++)N[R]=y.charCodeAt(R);return C}function te(y){return new m(function(E){var C=y.transaction(V,j),N=g([""]);C.objectStore(V).put(N,"key"),C.onabort=function(R){R.preventDefault(),R.stopPropagation(),E(!1)},C.oncomplete=function(){var R=navigator.userAgent.match(/Chrome\/(\d+)/),P=navigator.userAgent.match(/Edge\//);E(P||!R||parseInt(R[1],10)>=43)}}).catch(function(){return!1})}function de(y){return typeof M=="boolean"?m.resolve(M):te(y).then(function(E){return M=E,M})}function Ae(y){var E=J[y.name],C={};C.promise=new m(function(N,R){C.resolve=N,C.reject=R}),E.deferredOperations.push(C),E.dbReady?E.dbReady=E.dbReady.then(function(){return C.promise}):E.dbReady=C.promise}function dt(y){var E=J[y.name],C=E.deferredOperations.pop();if(C)return C.resolve(),C.promise}function ut(y,E){var C=J[y.name],N=C.deferredOperations.pop();if(N)return N.reject(E),N.promise}function _(y,E){return new m(function(C,N){if(J[y.name]=J[y.name]||_e(),y.db)if(E)Ae(y),y.db.close();else return C(y.db);var R=[y.name];E&&R.push(y.version);var P=d.open.apply(d,R);E&&(P.onupgradeneeded=function(U){var H=P.result;try{H.createObjectStore(y.storeName),U.oldVersion<=1&&H.createObjectStore(V)}catch(W){if(W.name==="ConstraintError")console.warn('The database "'+y.name+'" has been upgraded from version '+U.oldVersion+" to version "+U.newVersion+', but the storage "'+y.storeName+'" already exists.');else throw W}}),P.onerror=function(U){U.preventDefault(),N(P.error)},P.onsuccess=function(){var U=P.result;U.onversionchange=function(H){H.target.close()},C(U),dt(y)}})}function Gt(y){return _(y,!1)}function Ze(y){return _(y,!0)}function Zt(y,E){if(!y.db)return!0;var C=!y.db.objectStoreNames.contains(y.storeName),N=y.version<y.db.version,R=y.version>y.db.version;if(N&&(y.version!==E&&console.warn('The database "'+y.name+`" can't be downgraded from version `+y.db.version+" to version "+y.version+"."),y.version=y.db.version),R||C){if(C){var P=y.db.version+1;P>y.version&&(y.version=P)}return!0}return!1}function Se(y){return new m(function(E,C){var N=new FileReader;N.onerror=C,N.onloadend=function(R){var P=btoa(R.target.result||"");E({__local_forage_encoded_blob:!0,data:P,type:y.type})},N.readAsBinaryString(y)})}function D(y){var E=pe(atob(y.data));return g([E],{type:y.type})}function x(y){return y&&y.__local_forage_encoded_blob}function Z(y){var E=this,C=E._initReady().then(function(){var N=J[E._dbInfo.name];if(N&&N.dbReady)return N.dbReady});return I(C,y,y),C}function ne(y){Ae(y);for(var E=J[y.name],C=E.forages,N=0;N<C.length;N++){var R=C[N];R._dbInfo.db&&(R._dbInfo.db.close(),R._dbInfo.db=null)}return y.db=null,Gt(y).then(function(P){return y.db=P,Zt(y)?Ze(y):P}).then(function(P){y.db=E.db=P;for(var U=0;U<C.length;U++)C[U]._dbInfo.db=P}).catch(function(P){throw ut(y,P),P})}function ae(y,E,C,N){N===void 0&&(N=1);try{var R=y.db.transaction(y.storeName,E);C(null,R)}catch(P){if(N>0&&(!y.db||P.name==="InvalidStateError"||P.name==="NotFoundError"))return m.resolve().then(function(){if(!y.db||P.name==="NotFoundError"&&!y.db.objectStoreNames.contains(y.storeName)&&y.version<=y.db.version)return y.db&&(y.version=y.db.version+1),Ze(y)}).then(function(){return ne(y).then(function(){ae(y,E,C,N-1)})}).catch(C);C(P)}}function _e(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ve(y){var E=this,C={db:null};if(y)for(var N in y)C[N]=y[N];var R=J[C.name];R||(R=_e(),J[C.name]=R),R.forages.push(E),E._initReady||(E._initReady=E.ready,E.ready=Z);var P=[];function U(){return m.resolve()}for(var H=0;H<R.forages.length;H++){var W=R.forages[H];W!==E&&P.push(W._initReady().catch(U))}var z=R.forages.slice(0);return m.all(P).then(function(){return C.db=R.db,Gt(C)}).then(function($){return C.db=$,Zt(C,E._defaultConfig.version)?Ze(C):$}).then(function($){C.db=R.db=$,E._dbInfo=C;for(var ce=0;ce<z.length;ce++){var Xe=z[ce];Xe!==E&&(Xe._dbInfo.db=C.db,Xe._dbInfo.version=C.version)}})}function ue(y,E){var C=this;y=A(y);var N=new m(function(R,P){C.ready().then(function(){ae(C._dbInfo,ht,function(U,H){if(U)return P(U);try{var W=H.objectStore(C._dbInfo.storeName),z=W.get(y);z.onsuccess=function(){var $=z.result;$===void 0&&($=null),x($)&&($=D($)),R($)},z.onerror=function(){P(z.error)}}catch($){P($)}})}).catch(P)});return b(N,E),N}function Ce(y,E){var C=this,N=new m(function(R,P){C.ready().then(function(){ae(C._dbInfo,ht,function(U,H){if(U)return P(U);try{var W=H.objectStore(C._dbInfo.storeName),z=W.openCursor(),$=1;z.onsuccess=function(){var ce=z.result;if(ce){var Xe=ce.value;x(Xe)&&(Xe=D(Xe));var Dt=y(Xe,ce.key,$++);Dt!==void 0?R(Dt):ce.continue()}else R()},z.onerror=function(){P(z.error)}}catch(ce){P(ce)}})}).catch(P)});return b(N,E),N}function je(y,E,C){var N=this;y=A(y);var R=new m(function(P,U){var H;N.ready().then(function(){return H=N._dbInfo,Ne.call(E)==="[object Blob]"?de(H.db).then(function(W){return W?E:Se(E)}):E}).then(function(W){ae(N._dbInfo,j,function(z,$){if(z)return U(z);try{var ce=$.objectStore(N._dbInfo.storeName);W===null&&(W=void 0);var Xe=ce.put(W,y);$.oncomplete=function(){W===void 0&&(W=null),P(W)},$.onabort=$.onerror=function(){var Dt=Xe.error?Xe.error:Xe.transaction.error;U(Dt)}}catch(Dt){U(Dt)}})}).catch(U)});return b(R,C),R}function kt(y,E){var C=this;y=A(y);var N=new m(function(R,P){C.ready().then(function(){ae(C._dbInfo,j,function(U,H){if(U)return P(U);try{var W=H.objectStore(C._dbInfo.storeName),z=W.delete(y);H.oncomplete=function(){R()},H.onerror=function(){P(z.error)},H.onabort=function(){var $=z.error?z.error:z.transaction.error;P($)}}catch($){P($)}})}).catch(P)});return b(N,E),N}function He(y){var E=this,C=new m(function(N,R){E.ready().then(function(){ae(E._dbInfo,j,function(P,U){if(P)return R(P);try{var H=U.objectStore(E._dbInfo.storeName),W=H.clear();U.oncomplete=function(){N()},U.onabort=U.onerror=function(){var z=W.error?W.error:W.transaction.error;R(z)}}catch(z){R(z)}})}).catch(R)});return b(C,y),C}function tt(y){var E=this,C=new m(function(N,R){E.ready().then(function(){ae(E._dbInfo,ht,function(P,U){if(P)return R(P);try{var H=U.objectStore(E._dbInfo.storeName),W=H.count();W.onsuccess=function(){N(W.result)},W.onerror=function(){R(W.error)}}catch(z){R(z)}})}).catch(R)});return b(C,y),C}function Bt(y,E){var C=this,N=new m(function(R,P){if(y<0){R(null);return}C.ready().then(function(){ae(C._dbInfo,ht,function(U,H){if(U)return P(U);try{var W=H.objectStore(C._dbInfo.storeName),z=!1,$=W.openKeyCursor();$.onsuccess=function(){var ce=$.result;if(!ce){R(null);return}y===0||z?R(ce.key):(z=!0,ce.advance(y))},$.onerror=function(){P($.error)}}catch(ce){P(ce)}})}).catch(P)});return b(N,E),N}function ke(y){var E=this,C=new m(function(N,R){E.ready().then(function(){ae(E._dbInfo,ht,function(P,U){if(P)return R(P);try{var H=U.objectStore(E._dbInfo.storeName),W=H.openKeyCursor(),z=[];W.onsuccess=function(){var $=W.result;if(!$){N(z);return}z.push($.key),$.continue()},W.onerror=function(){R(W.error)}}catch($){R($)}})}).catch(R)});return b(C,y),C}function u(y,E){E=F.apply(this,arguments);var C=this.config();y=typeof y!="function"&&y||{},y.name||(y.name=y.name||C.name,y.storeName=y.storeName||C.storeName);var N=this,R;if(!y.name)R=m.reject("Invalid arguments");else{var P=y.name===C.name&&N._dbInfo.db,U=P?m.resolve(N._dbInfo.db):Gt(y).then(function(H){var W=J[y.name],z=W.forages;W.db=H;for(var $=0;$<z.length;$++)z[$]._dbInfo.db=H;return H});y.storeName?R=U.then(function(H){if(H.objectStoreNames.contains(y.storeName)){var W=H.version+1;Ae(y);var z=J[y.name],$=z.forages;H.close();for(var ce=0;ce<$.length;ce++){var Xe=$[ce];Xe._dbInfo.db=null,Xe._dbInfo.version=W}var Dt=new m(function(_t,Qt){var Xt=d.open(y.name,W);Xt.onerror=function(cr){var Oh=Xt.result;Oh.close(),Qt(cr)},Xt.onupgradeneeded=function(){var cr=Xt.result;cr.deleteObjectStore(y.storeName)},Xt.onsuccess=function(){var cr=Xt.result;cr.close(),_t(cr)}});return Dt.then(function(_t){z.db=_t;for(var Qt=0;Qt<$.length;Qt++){var Xt=$[Qt];Xt._dbInfo.db=_t,dt(Xt._dbInfo)}}).catch(function(_t){throw(ut(y,_t)||m.resolve()).catch(function(){}),_t})}}):R=U.then(function(H){Ae(y);var W=J[y.name],z=W.forages;H.close();for(var $=0;$<z.length;$++){var ce=z[$];ce._dbInfo.db=null}var Xe=new m(function(Dt,_t){var Qt=d.deleteDatabase(y.name);Qt.onerror=function(){var Xt=Qt.result;Xt&&Xt.close(),_t(Qt.error)},Qt.onblocked=function(){console.warn('dropInstance blocked for database "'+y.name+'" until all open connections are closed')},Qt.onsuccess=function(){var Xt=Qt.result;Xt&&Xt.close(),Dt(Xt)}});return Xe.then(function(Dt){W.db=Dt;for(var _t=0;_t<z.length;_t++){var Qt=z[_t];dt(Qt._dbInfo)}}).catch(function(Dt){throw(ut(y,Dt)||m.resolve()).catch(function(){}),Dt})})}return b(R,E),R}var p={_driver:"asyncStorage",_initStorage:ve,_support:f(),iterate:Ce,getItem:ue,setItem:je,removeItem:kt,clear:He,length:tt,key:Bt,keys:ke,dropInstance:u};function v(){return typeof openDatabase=="function"}var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L="~~local_forage_type~",B=/^~~local_forage_type~([^~]+)~/,Q="__lfsc__:",rt=Q.length,Ke="arbf",Le="blob",pt="si08",ee="ui08",De="uic8",ge="si16",it="si32",En="ur16",_n="ui32",lt="fl32",me="fl64",On=rt+Ke.length,rs=Object.prototype.toString;function za(y){var E=y.length*.75,C=y.length,N,R=0,P,U,H,W;y[y.length-1]==="="&&(E--,y[y.length-2]==="="&&E--);var z=new ArrayBuffer(E),$=new Uint8Array(z);for(N=0;N<C;N+=4)P=T.indexOf(y[N]),U=T.indexOf(y[N+1]),H=T.indexOf(y[N+2]),W=T.indexOf(y[N+3]),$[R++]=P<<2|U>>4,$[R++]=(U&15)<<4|H>>2,$[R++]=(H&3)<<6|W&63;return z}function wh(y){var E=new Uint8Array(y),C="",N;for(N=0;N<E.length;N+=3)C+=T[E[N]>>2],C+=T[(E[N]&3)<<4|E[N+1]>>4],C+=T[(E[N+1]&15)<<2|E[N+2]>>6],C+=T[E[N+2]&63];return E.length%3===2?C=C.substring(0,C.length-1)+"=":E.length%3===1&&(C=C.substring(0,C.length-2)+"=="),C}function eI(y,E){var C="";if(y&&(C=rs.call(y)),y&&(C==="[object ArrayBuffer]"||y.buffer&&rs.call(y.buffer)==="[object ArrayBuffer]")){var N,R=Q;y instanceof ArrayBuffer?(N=y,R+=Ke):(N=y.buffer,C==="[object Int8Array]"?R+=pt:C==="[object Uint8Array]"?R+=ee:C==="[object Uint8ClampedArray]"?R+=De:C==="[object Int16Array]"?R+=ge:C==="[object Uint16Array]"?R+=En:C==="[object Int32Array]"?R+=it:C==="[object Uint32Array]"?R+=_n:C==="[object Float32Array]"?R+=lt:C==="[object Float64Array]"?R+=me:E(new Error("Failed to get type for BinaryArray"))),E(R+wh(N))}else if(C==="[object Blob]"){var P=new FileReader;P.onload=function(){var U=L+y.type+"~"+wh(this.result);E(Q+Le+U)},P.readAsArrayBuffer(y)}else try{E(JSON.stringify(y))}catch(U){console.error("Couldn't convert value into a JSON string: ",y),E(null,U)}}function tI(y){if(y.substring(0,rt)!==Q)return JSON.parse(y);var E=y.substring(On),C=y.substring(rt,On),N;if(C===Le&&B.test(E)){var R=E.match(B);N=R[1],E=E.substring(R[0].length)}var P=za(E);switch(C){case Ke:return P;case Le:return g([P],{type:N});case pt:return new Int8Array(P);case ee:return new Uint8Array(P);case De:return new Uint8ClampedArray(P);case ge:return new Int16Array(P);case En:return new Uint16Array(P);case it:return new Int32Array(P);case _n:return new Uint32Array(P);case lt:return new Float32Array(P);case me:return new Float64Array(P);default:throw new Error("Unkown type: "+C)}}var bh={serialize:eI,deserialize:tI,stringToBuffer:za,bufferToString:wh};function LE(y,E,C,N){y.executeSql("CREATE TABLE IF NOT EXISTS "+E.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],C,N)}function _T(y){var E=this,C={db:null};if(y)for(var N in y)C[N]=typeof y[N]!="string"?y[N].toString():y[N];var R=new m(function(P,U){try{C.db=openDatabase(C.name,String(C.version),C.description,C.size)}catch(H){return U(H)}C.db.transaction(function(H){LE(H,C,function(){E._dbInfo=C,P()},function(W,z){U(z)})},U)});return C.serializer=bh,R}function Qi(y,E,C,N,R,P){y.executeSql(C,N,R,function(U,H){H.code===H.SYNTAX_ERR?U.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[E.storeName],function(W,z){z.rows.length?P(W,H):LE(W,E,function(){W.executeSql(C,N,R,P)},P)},P):P(U,H)},P)}function ET(y,E){var C=this;y=A(y);var N=new m(function(R,P){C.ready().then(function(){var U=C._dbInfo;U.db.transaction(function(H){Qi(H,U,"SELECT * FROM "+U.storeName+" WHERE key = ? LIMIT 1",[y],function(W,z){var $=z.rows.length?z.rows.item(0).value:null;$&&($=U.serializer.deserialize($)),R($)},function(W,z){P(z)})})}).catch(P)});return b(N,E),N}function Cx(y,E){var C=this,N=new m(function(R,P){C.ready().then(function(){var U=C._dbInfo;U.db.transaction(function(H){Qi(H,U,"SELECT * FROM "+U.storeName,[],function(W,z){for(var $=z.rows,ce=$.length,Xe=0;Xe<ce;Xe++){var Dt=$.item(Xe),_t=Dt.value;if(_t&&(_t=U.serializer.deserialize(_t)),_t=y(_t,Dt.key,Xe+1),_t!==void 0){R(_t);return}}R()},function(W,z){P(z)})})}).catch(P)});return b(N,E),N}function ME(y,E,C,N){var R=this;y=A(y);var P=new m(function(U,H){R.ready().then(function(){E===void 0&&(E=null);var W=E,z=R._dbInfo;z.serializer.serialize(E,function($,ce){ce?H(ce):z.db.transaction(function(Xe){Qi(Xe,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[y,$],function(){U(W)},function(Dt,_t){H(_t)})},function(Xe){if(Xe.code===Xe.QUOTA_ERR){if(N>0){U(ME.apply(R,[y,W,C,N-1]));return}H(Xe)}})})}).catch(H)});return b(P,C),P}function Tx(y,E,C){return ME.apply(this,[y,E,C,1])}function Dx(y,E){var C=this;y=A(y);var N=new m(function(R,P){C.ready().then(function(){var U=C._dbInfo;U.db.transaction(function(H){Qi(H,U,"DELETE FROM "+U.storeName+" WHERE key = ?",[y],function(){R()},function(W,z){P(z)})})}).catch(P)});return b(N,E),N}function HD(y){var E=this,C=new m(function(N,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(U){Qi(U,P,"DELETE FROM "+P.storeName,[],function(){N()},function(H,W){R(W)})})}).catch(R)});return b(C,y),C}function QD(y){var E=this,C=new m(function(N,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(U){Qi(U,P,"SELECT COUNT(key) as c FROM "+P.storeName,[],function(H,W){var z=W.rows.item(0).c;N(z)},function(H,W){R(W)})})}).catch(R)});return b(C,y),C}function ak(y,E){var C=this,N=new m(function(R,P){C.ready().then(function(){var U=C._dbInfo;U.db.transaction(function(H){Qi(H,U,"SELECT key FROM "+U.storeName+" WHERE id = ? LIMIT 1",[y+1],function(W,z){var $=z.rows.length?z.rows.item(0).key:null;R($)},function(W,z){P(z)})})}).catch(P)});return b(N,E),N}function Lk(y){var E=this,C=new m(function(N,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(U){Qi(U,P,"SELECT key FROM "+P.storeName,[],function(H,W){for(var z=[],$=0;$<W.rows.length;$++)z.push(W.rows.item($).key);N(z)},function(H,W){R(W)})})}).catch(R)});return b(C,y),C}function Bk(y){return new m(function(E,C){y.transaction(function(N){N.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(R,P){for(var U=[],H=0;H<P.rows.length;H++)U.push(P.rows.item(H).name);E({db:y,storeNames:U})},function(R,P){C(P)})},function(N){C(N)})})}function Fk(y,E){E=F.apply(this,arguments);var C=this.config();y=typeof y!="function"&&y||{},y.name||(y.name=y.name||C.name,y.storeName=y.storeName||C.storeName);var N=this,R;return y.name?R=new m(function(P){var U;y.name===C.name?U=N._dbInfo.db:U=openDatabase(y.name,"","",0),y.storeName?P({db:U,storeNames:[y.storeName]}):P(Bk(U))}).then(function(P){return new m(function(U,H){P.db.transaction(function(W){function z(Dt){return new m(function(_t,Qt){W.executeSql("DROP TABLE IF EXISTS "+Dt,[],function(){_t()},function(Xt,cr){Qt(cr)})})}for(var $=[],ce=0,Xe=P.storeNames.length;ce<Xe;ce++)$.push(z(P.storeNames[ce]));m.all($).then(function(){U()}).catch(function(Dt){H(Dt)})},function(W){H(W)})})}):R=m.reject("Invalid arguments"),b(R,E),R}var eR={_driver:"webSQLStorage",_initStorage:_T,_support:v(),iterate:Cx,getItem:ET,setItem:Tx,removeItem:Dx,clear:HD,length:QD,key:ak,keys:Lk,dropInstance:Fk};function tR(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function FE(y,E){var C=y.name+"/";return y.storeName!==E.storeName&&(C+=y.storeName+"/"),C}function nR(){var y="_localforage_support_test";try{return localStorage.setItem(y,!0),localStorage.removeItem(y),!1}catch{return!0}}function rR(){return!nR()||localStorage.length>0}function iR(y){var E=this,C={};if(y)for(var N in y)C[N]=y[N];return C.keyPrefix=FE(y,E._defaultConfig),rR()?(E._dbInfo=C,C.serializer=bh,m.resolve()):m.reject()}function sR(y){var E=this,C=E.ready().then(function(){for(var N=E._dbInfo.keyPrefix,R=localStorage.length-1;R>=0;R--){var P=localStorage.key(R);P.indexOf(N)===0&&localStorage.removeItem(P)}});return b(C,y),C}function oR(y,E){var C=this;y=A(y);var N=C.ready().then(function(){var R=C._dbInfo,P=localStorage.getItem(R.keyPrefix+y);return P&&(P=R.serializer.deserialize(P)),P});return b(N,E),N}function aR(y,E){var C=this,N=C.ready().then(function(){for(var R=C._dbInfo,P=R.keyPrefix,U=P.length,H=localStorage.length,W=1,z=0;z<H;z++){var $=localStorage.key(z);if($.indexOf(P)===0){var ce=localStorage.getItem($);if(ce&&(ce=R.serializer.deserialize(ce)),ce=y(ce,$.substring(U),W++),ce!==void 0)return ce}}});return b(N,E),N}function lR(y,E){var C=this,N=C.ready().then(function(){var R=C._dbInfo,P;try{P=localStorage.key(y)}catch{P=null}return P&&(P=P.substring(R.keyPrefix.length)),P});return b(N,E),N}function cR(y){var E=this,C=E.ready().then(function(){for(var N=E._dbInfo,R=localStorage.length,P=[],U=0;U<R;U++){var H=localStorage.key(U);H.indexOf(N.keyPrefix)===0&&P.push(H.substring(N.keyPrefix.length))}return P});return b(C,y),C}function uR(y){var E=this,C=E.keys().then(function(N){return N.length});return b(C,y),C}function hR(y,E){var C=this;y=A(y);var N=C.ready().then(function(){var R=C._dbInfo;localStorage.removeItem(R.keyPrefix+y)});return b(N,E),N}function dR(y,E,C){var N=this;y=A(y);var R=N.ready().then(function(){E===void 0&&(E=null);var P=E;return new m(function(U,H){var W=N._dbInfo;W.serializer.serialize(E,function(z,$){if($)H($);else try{localStorage.setItem(W.keyPrefix+y,z),U(P)}catch(ce){(ce.name==="QuotaExceededError"||ce.name==="NS_ERROR_DOM_QUOTA_REACHED")&&H(ce),H(ce)}})})});return b(R,C),R}function pR(y,E){if(E=F.apply(this,arguments),y=typeof y!="function"&&y||{},!y.name){var C=this.config();y.name=y.name||C.name,y.storeName=y.storeName||C.storeName}var N=this,R;return y.name?R=new m(function(P){y.storeName?P(FE(y,N._defaultConfig)):P(y.name+"/")}).then(function(P){for(var U=localStorage.length-1;U>=0;U--){var H=localStorage.key(U);H.indexOf(P)===0&&localStorage.removeItem(H)}}):R=m.reject("Invalid arguments"),b(R,E),R}var fR={_driver:"localStorageWrapper",_initStorage:iR,_support:tR(),iterate:aR,getItem:oR,setItem:dR,removeItem:hR,clear:sR,length:uR,key:lR,keys:cR,dropInstance:pR},gR=function(y,E){return y===E||typeof y=="number"&&typeof E=="number"&&isNaN(y)&&isNaN(E)},mR=function(y,E){for(var C=y.length,N=0;N<C;){if(gR(y[N],E))return!0;N++}return!1},bS=Array.isArray||function(y){return Object.prototype.toString.call(y)==="[object Array]"},Pl={},ES={},Ls={INDEXEDDB:p,WEBSQL:eR,LOCALSTORAGE:fR},vR=[Ls.INDEXEDDB._driver,Ls.WEBSQL._driver,Ls.LOCALSTORAGE._driver],Dc=["dropInstance"],Eh=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Dc),_R={description:"",driver:vR.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function yR(y,E){y[E]=function(){var C=arguments;return y.ready().then(function(){return y[E].apply(y,C)})}}function Ch(){for(var y=1;y<arguments.length;y++){var E=arguments[y];if(E)for(var C in E)E.hasOwnProperty(C)&&(bS(E[C])?arguments[0][C]=E[C].slice():arguments[0][C]=E[C])}return arguments[0]}var wR=function(){function y(E){c(this,y);for(var C in Ls)if(Ls.hasOwnProperty(C)){var N=Ls[C],R=N._driver;this[C]=R,Pl[R]||this.defineDriver(N)}this._defaultConfig=Ch({},_R),this._config=Ch({},this._defaultConfig,E),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return y.prototype.config=function(E){if((typeof E>"u"?"undefined":l(E))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var C in E){if(C==="storeName"&&(E[C]=E[C].replace(/\W/g,"_")),C==="version"&&typeof E[C]!="number")return new Error("Database version must be a number.");this._config[C]=E[C]}return"driver"in E&&E.driver?this.setDriver(this._config.driver):!0}else return typeof E=="string"?this._config[E]:this._config},y.prototype.defineDriver=function(E,C,N){var R=new m(function(P,U){try{var H=E._driver,W=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!E._driver){U(W);return}for(var z=Eh.concat("_initStorage"),$=0,ce=z.length;$<ce;$++){var Xe=z[$],Dt=!mR(Dc,Xe);if((Dt||E[Xe])&&typeof E[Xe]!="function"){U(W);return}}var _t=function(){for(var Xt=function(ER){return function(){var SR=new Error("Method "+ER+" is not implemented by the current driver"),SS=m.reject(SR);return b(SS,arguments[arguments.length-1]),SS}},cr=0,Oh=Dc.length;cr<Oh;cr++){var kh=Dc[cr];E[kh]||(E[kh]=Xt(kh))}};_t();var Qt=function(Xt){Pl[H]&&console.info("Redefining LocalForage driver: "+H),Pl[H]=E,ES[H]=Xt,P()};"_support"in E?E._support&&typeof E._support=="function"?E._support().then(Qt,U):Qt(!!E._support):Qt(!0)}catch(Xt){U(Xt)}});return I(R,C,N),R},y.prototype.driver=function(){return this._driver||null},y.prototype.getDriver=function(E,C,N){var R=Pl[E]?m.resolve(Pl[E]):m.reject(new Error("Driver not found."));return I(R,C,N),R},y.prototype.getSerializer=function(E){var C=m.resolve(bh);return I(C,E),C},y.prototype.ready=function(E){var C=this,N=C._driverSet.then(function(){return C._ready===null&&(C._ready=C._initDriver()),C._ready});return I(N,E,E),N},y.prototype.setDriver=function(E,C,N){var R=this;bS(E)||(E=[E]);var P=this._getSupportedDrivers(E);function U(){R._config.driver=R.driver()}function H($){return R._extend($),U(),R._ready=R._initStorage(R._config),R._ready}function W($){return function(){var ce=0;function Xe(){for(;ce<$.length;){var Dt=$[ce];return ce++,R._dbInfo=null,R._ready=null,R.getDriver(Dt).then(H).catch(Xe)}U();var _t=new Error("No available storage method found.");return R._driverSet=m.reject(_t),R._driverSet}return Xe()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=z.then(function(){var $=P[0];return R._dbInfo=null,R._ready=null,R.getDriver($).then(function(ce){R._driver=ce._driver,U(),R._wrapLibraryMethodsWithReady(),R._initDriver=W(P)})}).catch(function(){U();var $=new Error("No available storage method found.");return R._driverSet=m.reject($),R._driverSet}),I(this._driverSet,C,N),this._driverSet},y.prototype.supports=function(E){return!!ES[E]},y.prototype._extend=function(E){Ch(this,E)},y.prototype._getSupportedDrivers=function(E){for(var C=[],N=0,R=E.length;N<R;N++){var P=E[N];this.supports(P)&&C.push(P)}return C},y.prototype._wrapLibraryMethodsWithReady=function(){for(var E=0,C=Eh.length;E<C;E++)yR(this,Eh[E])},y.prototype.createInstance=function(E){return new y(E)},y}(),bR=new wR;o.exports=bR},{3:3}]},{},[4])(4)})}),Of=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MustacheUtils=void 0;var t=class CS{static escapeHtml(r){return String(r).replace(/"/g,i=>CS.entityMap[i])}};e.MustacheUtils=t,t.entityMap={'"':"""}}),k_=jn((e,t)=>{"use strict";(function(n,r){typeof e=="object"&&typeof t<"u"?t.exports=r():typeof define=="function"&&define.amd?define(r):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=r())})(e,function(){"use strict";var n=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!r(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!r(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(a,o),function(l,c){var h=o.retries,d=o.retryDelay,f=o.retryOn;if(c&&c.retries!==void 0)if(r(c.retries))h=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(r(c.retryDelay)||typeof c.retryDelay=="function")d=c.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(c&&c.retryOn)if(Array.isArray(c.retryOn)||typeof c.retryOn=="function")f=c.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(g,m){var b=function(A){var F=typeof Request<"u"&&l instanceof Request?l.clone():l;s(F,c).then(function(V){if(Array.isArray(f)&&f.indexOf(V.status)===-1)g(V);else if(typeof f=="function")try{return Promise.resolve(f(A,null,V)).then(function(M){M?I(A,null,V):g(V)}).catch(m)}catch(M){m(M)}else A<h?I(A,null,V):g(V)}).catch(function(V){if(typeof f=="function")try{Promise.resolve(f(A,V,null)).then(function(M){M?I(A,V,null):m(V)}).catch(function(M){m(M)})}catch(M){m(M)}else A<h?I(A,V,null):m(V)})};function I(A,F,V){var M=typeof d=="function"?d(A,F,V):d;setTimeout(function(){b(++A)},M)}b(0)})}};function r(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return n})}),ip=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PriceRuleType=e.DiscountType=void 0;var t=function(r){return r[r.NONE=0]="NONE",r[r.STATIC=1]="STATIC",r[r.UNIQUE_FLAT=2]="UNIQUE_FLAT",r[r.UNIQUE_FLAT_ITEMS=3]="UNIQUE_FLAT_ITEMS",r[r.UNIQUE_FIXED_ITEMS=4]="UNIQUE_FIXED_ITEMS",r[r.UNIQUE_CHEAPEST_ITEM_FREE=5]="UNIQUE_CHEAPEST_ITEM_FREE",r[r.BXGY=6]="BXGY",r}(t||(e.DiscountType=t={})),n=function(r){return r.FIXED_AMOUNT="fixed_amount",r.PERCENTAGE="percentage",r}(n||(e.PriceRuleType=n={}))}),L_=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLBuilder=void 0;var t=function(){function n(r){try{this.base=new URL(r),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return n.prototype.appendQueryParam=function(r,i){this.params.append(r,i?i.toString():"")},n.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},n.prototype.deleteQueryParam=function(r){this.params.delete(r)},n.prototype.getBase=function(){return this.base},n.prototype.getPath=function(){return this.base.pathname},n.prototype.getHostname=function(){return this.base.hostname},n.prototype.getParams=function(){return this.params},n.prototype.getQueryParam=function(r){if(!this.params)return"";var i=this.params.get(r);return!i||i==="undefined"||i==="null"?void 0:i},n.prototype.getQueryString=function(){return this.params.toString()},n.prototype.setPath=function(r){return this.base.pathname=r,this},n.prototype.setQueryParam=function(r,i){return this.params.set(r,i?i.toString():""),this},n.prototype.setQueryString=function(r){if(r)return r[0]==="?"&&(r=r.slice(1)),this.params=new URLSearchParams(r),this},n.prototype.toString=function(){var r=this.params.toString();return r===""?this.base.search="":this.base.search="?"+r,this.base.toString()},n}();e.URLBuilder=t}),U_=jn((e,t)=>{"use strict";(function(n,r){"use strict";var i="1.0.40",s="",o="?",a="function",l="undefined",c="object",h="string",d="major",f="model",g="name",m="type",b="vendor",I="version",A="architecture",F="console",V="mobile",M="tablet",J="smarttv",Ne="wearable",ht="embedded",j=500,pe="Amazon",te="Apple",de="ASUS",Ae="BlackBerry",dt="Browser",ut="Chrome",_="Edge",Gt="Firefox",Ze="Google",Zt="Huawei",Se="LG",D="Microsoft",x="Motorola",Z="Opera",ne="Samsung",ae="Sharp",_e="Sony",ve="Xiaomi",ue="Zebra",Ce="Facebook",je="Chromium OS",kt="Mac OS",He=" Browser",tt=function(ee,De){var ge={};for(var it in ee)De[it]&&De[it].length%2===0?ge[it]=De[it].concat(ee[it]):ge[it]=ee[it];return ge},Bt=function(ee){for(var De={},ge=0;ge<ee.length;ge++)De[ee[ge].toUpperCase()]=ee[ge];return De},ke=function(ee,De){return typeof ee===h?u(De).indexOf(u(ee))!==-1:!1},u=function(ee){return ee.toLowerCase()},p=function(ee){return typeof ee===h?ee.replace(/[^\d\.]/g,s).split(".")[0]:r},v=function(ee,De){if(typeof ee===h)return ee=ee.replace(/^\s\s*/,s),typeof De===l?ee:ee.substring(0,j)},T=function(ee,De){for(var ge=0,it,En,_n,lt,me,On;ge<De.length&&!me;){var rs=De[ge],za=De[ge+1];for(it=En=0;it<rs.length&&!me&&rs[it];)if(me=rs[it++].exec(ee),me)for(_n=0;_n<za.length;_n++)On=me[++En],lt=za[_n],typeof lt===c&<.length>0?lt.length===2?typeof lt[1]==a?this[lt[0]]=lt[1].call(this,On):this[lt[0]]=lt[1]:lt.length===3?typeof lt[1]===a&&!(lt[1].exec&<[1].test)?this[lt[0]]=On?lt[1].call(this,On,lt[2]):r:this[lt[0]]=On?On.replace(lt[1],lt[2]):r:lt.length===4&&(this[lt[0]]=On?lt[3].call(this,On.replace(lt[1],lt[2])):r):this[lt]=On||r;ge+=2}},L=function(ee,De){for(var ge in De)if(typeof De[ge]===c&&De[ge].length>0){for(var it=0;it<De[ge].length;it++)if(ke(De[ge][it],ee))return ge===o?r:ge}else if(ke(De[ge],ee))return ge===o?r:ge;return De.hasOwnProperty("*")?De["*"]:ee},B={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Q={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},rt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[I,[g,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[I,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,I],[/opios[\/ ]+([\w\.]+)/i],[I,[g,Z+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[I,[g,Z+" GX"]],[/\bopr\/([\w\.]+)/i],[I,[g,Z]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[I,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[I,[g,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[g,I],[/quark(?:pc)?\/([-\w\.]+)/i],[I,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[I,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[I,[g,"UC"+dt]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[I,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[I,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[I,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[I,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[I,[g,"Smart Lenovo "+dt]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+dt],I],[/\bfocus\/([\w\.]+)/i],[I,[g,Gt+" Focus"]],[/\bopt\/([\w\.]+)/i],[I,[g,Z+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[I,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[I,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[I,[g,Z+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[I,[g,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[I,[g,Gt]],[/\bqihoobrowser\/?([\w\.]*)/i],[I,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],I],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+He],I],[/samsungbrowser\/([\w\.]+)/i],[I,[g,ne+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[I,[g,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,"Sogou Mobile"],I],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,I],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[g],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[I,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,Ce],I],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[g,I],[/\bgsa\/([\w\.]+) .*safari\//i],[I,[g,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[I,[g,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[I,[g,ut+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,ut+" WebView"],I],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[I,[g,"Android "+dt]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,I],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[I,[g,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[I,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[I,L,B]],[/(webkit|khtml)\/([\w\.]+)/i],[g,I],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],I],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,I],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[I,[g,Gt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[g,[I,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[I,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,u]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,s,u]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,u]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[b,ne],[m,M]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[f,[b,ne],[m,V]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[b,te],[m,V]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[b,te],[m,M]],[/(macintosh);/i],[f,[b,te]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[b,ae],[m,V]],[/(?:honor)([-\w ]+)[;\)]/i],[f,[b,"Honor"],[m,V]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[b,Zt],[m,M]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[b,Zt],[m,V]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[f,/_/g," "],[b,ve],[m,V]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[b,ve],[m,M]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[b,"OPPO"],[m,V]],[/\b(opd2\d{3}a?) bui/i],[f,[b,"OPPO"],[m,M]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[b,"Vivo"],[m,V]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[b,"Realme"],[m,V]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[b,x],[m,V]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[b,x],[m,M]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[b,Se],[m,M]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[b,Se],[m,V]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[b,"Lenovo"],[m,M]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[b,"Nokia"],[m,V]],[/(pixel c)\b/i],[f,[b,Ze],[m,M]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[b,Ze],[m,V]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[b,_e],[m,V]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[b,_e],[m,M]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[b,"OnePlus"],[m,V]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[b,pe],[m,M]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[b,pe],[m,V]],[/(playbook);[-\w\),; ]+(rim)/i],[f,b,[m,M]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[b,Ae],[m,V]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[b,de],[m,M]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[b,de],[m,V]],[/(nexus 9)/i],[f,[b,"HTC"],[m,M]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[f,/_/g," "],[m,V]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[f,[b,"TCL"],[m,M]],[/(itel) ((\w+))/i],[[b,u],f,[m,L,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[b,"Acer"],[m,M]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[b,"Meizu"],[m,V]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[b,"Ulefone"],[m,V]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[f,[b,"Energizer"],[m,V]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[f,[b,"Cat"],[m,V]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[f,[b,"Smartfren"],[m,V]],[/droid.+; (a(?:015|06[35]|142p?))/i],[f,[b,"Nothing"],[m,V]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[b,f,[m,V]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[b,f,[m,M]],[/(surface duo)/i],[f,[b,D],[m,M]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[b,"Fairphone"],[m,V]],[/(u304aa)/i],[f,[b,"AT&T"],[m,V]],[/\bsie-(\w*)/i],[f,[b,"Siemens"],[m,V]],[/\b(rct\w+) b/i],[f,[b,"RCA"],[m,M]],[/\b(venue[\d ]{2,7}) b/i],[f,[b,"Dell"],[m,M]],[/\b(q(?:mv|ta)\w+) b/i],[f,[b,"Verizon"],[m,M]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[b,"Barnes & Noble"],[m,M]],[/\b(tm\d{3}\w+) b/i],[f,[b,"NuVision"],[m,M]],[/\b(k88) b/i],[f,[b,"ZTE"],[m,M]],[/\b(nx\d{3}j) b/i],[f,[b,"ZTE"],[m,V]],[/\b(gen\d{3}) b.+49h/i],[f,[b,"Swiss"],[m,V]],[/\b(zur\d{3}) b/i],[f,[b,"Swiss"],[m,M]],[/\b((zeki)?tb.*\b) b/i],[f,[b,"Zeki"],[m,M]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],f,[m,M]],[/\b(ns-?\w{0,9}) b/i],[f,[b,"Insignia"],[m,M]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[b,"NextBook"],[m,M]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[b,"Voice"],f,[m,V]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],f,[m,V]],[/\b(ph-1) /i],[f,[b,"Essential"],[m,V]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[b,"Envizen"],[m,M]],[/\b(trio[-\w\. ]+) b/i],[f,[b,"MachSpeed"],[m,M]],[/\btu_(1491) b/i],[f,[b,"Rotor"],[m,M]],[/(shield[\w ]+) b/i],[f,[b,"Nvidia"],[m,M]],[/(sprint) (\w+)/i],[b,f,[m,V]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[b,D],[m,V]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[b,ue],[m,M]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[b,ue],[m,V]],[/smart-tv.+(samsung)/i],[b,[m,J]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[b,ne],[m,J]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,Se],[m,J]],[/(apple) ?tv/i],[b,[f,te+" TV"],[m,J]],[/crkey/i],[[f,ut+"cast"],[b,Ze],[m,J]],[/droid.+aft(\w+)( bui|\))/i],[f,[b,pe],[m,J]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[b,ae],[m,J]],[/(bravia[\w ]+)( bui|\))/i],[f,[b,_e],[m,J]],[/(mitv-\w{5}) bui/i],[f,[b,ve],[m,J]],[/Hbbtv.*(technisat) (.*);/i],[b,f,[m,J]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,v],[f,v],[m,J]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,J]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,f,[m,F]],[/droid.+; (shield) bui/i],[f,[b,"Nvidia"],[m,F]],[/(playstation [345portablevi]+)/i],[f,[b,_e],[m,F]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[b,D],[m,F]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[f,[b,ne],[m,Ne]],[/((pebble))app/i],[b,f,[m,Ne]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[b,te],[m,Ne]],[/droid.+; (glass) \d/i],[f,[b,Ze],[m,Ne]],[/droid.+; (wt63?0{2,3})\)/i],[f,[b,ue],[m,Ne]],[/droid.+; (glass) \d/i],[f,[b,Ze],[m,Ne]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,f,[m,Ne]],[/; (quest( \d| pro)?)/i],[f,[b,Ce],[m,Ne]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[m,ht]],[/(aeobc)\b/i],[f,[b,pe],[m,ht]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[m,V]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,M]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,M]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,V]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[I,[g,_+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,I],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[I,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,I],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[I,g]],os:[[/microsoft (windows) (vista|xp)/i],[g,I],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[g,[I,L,Q]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[I,L,Q],[g,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[I,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[g,kt],[I,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[I,g],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[g,I],[/\(bb(10);/i],[I,[g,Ae]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[I,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[I,[g,Gt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[I,[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[I,[g,"watchOS"]],[/crkey\/([\d\.]+)/i],[I,[g,ut+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,je],I],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[g,I],[/(sunos) ?([\w\.\d]*)/i],[[g,"Solaris"],I],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,I]]},Ke=function(ee,De){if(typeof ee===c&&(De=ee,ee=r),!(this instanceof Ke))return new Ke(ee,De).getResult();var ge=typeof n!==l&&n.navigator?n.navigator:r,it=ee||(ge&&ge.userAgent?ge.userAgent:s),En=ge&&ge.userAgentData?ge.userAgentData:r,_n=De?tt(rt,De):rt,lt=ge&&ge.userAgent==it;return this.getBrowser=function(){var me={};return me[g]=r,me[I]=r,T.call(me,it,_n.browser),me[d]=p(me[I]),lt&&ge&&ge.brave&&typeof ge.brave.isBrave==a&&(me[g]="Brave"),me},this.getCPU=function(){var me={};return me[A]=r,T.call(me,it,_n.cpu),me},this.getDevice=function(){var me={};return me[b]=r,me[f]=r,me[m]=r,T.call(me,it,_n.device),lt&&!me[m]&&En&&En.mobile&&(me[m]=V),lt&&me[f]=="Macintosh"&&ge&&typeof ge.standalone!==l&&ge.maxTouchPoints&&ge.maxTouchPoints>2&&(me[f]="iPad",me[m]=M),me},this.getEngine=function(){var me={};return me[g]=r,me[I]=r,T.call(me,it,_n.engine),me},this.getOS=function(){var me={};return me[g]=r,me[I]=r,T.call(me,it,_n.os),lt&&!me[g]&&En&&En.platform&&En.platform!="Unknown"&&(me[g]=En.platform.replace(/chrome os/i,je).replace(/macos/i,kt)),me},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return it},this.setUA=function(me){return it=typeof me===h&&me.length>j?v(me,j):me,this},this.setUA(it),this};Ke.VERSION=i,Ke.BROWSER=Bt([g,I,d]),Ke.CPU=Bt([A]),Ke.DEVICE=Bt([f,b,m,F,V,J,M,Ne,ht]),Ke.ENGINE=Ke.OS=Bt([g,I]),typeof e!==l?(typeof t!==l&&t.exports&&(e=t.exports=Ke),e.UAParser=Ke):typeof define===a&&define.amd?define(function(){return Ke}):typeof n!==l&&(n.UAParser=Ke);var Le=typeof n!==l&&(n.jQuery||n.Zepto);if(Le&&!Le.ua){var pt=new Ke;Le.ua=pt.getResult(),Le.ua.get=function(){return pt.getUA()},Le.ua.set=function(ee){pt.setUA(ee);var De=pt.getResult();for(var ge in De)Le.ua[ge]=De[ge]}}})(typeof window=="object"?window:e)}),j_=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayUtils=void 0;var t=class IS{static of(r,i){return i!==void 0?new Array(r).fill(i):Array.from({length:r},(s,o)=>o)}static remove(r,i){let s=r.indexOf(i);return s===-1?!1:(r.splice(s,1),!0)}static swap(r,i,s){[r[i],r[s]]=[r[s],r[i]]}static sum(r,i){return r.reduce((s,o)=>s+Math.max(i?i(o):+o,0),0)}static unique(r,i){return r.filter((s,o,a)=>a.findIndex(l=>l[i]===s[i])===o)}static shuffle(r){let i=r.length;for(;i!=0;){let s=Math.floor(Math.random()*i);i--,IS.swap(r,i,s)}}};e.ArrayUtils=t}),Sx=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssetType=void 0;var t=function(n){return n[n.IMAGE=1]="IMAGE",n[n.VIDEO=2]="VIDEO",n[n.GIF=3]="GIF",n[n.SCREENSHOT=4]="SCREENSHOT",n[n.THREE_D=5]="THREE_D",n[n.FONT=6]="FONT",n[n.TEXT=7]="TEXT",n[n.JSON=8]="JSON",n[n.SVG=9]="SVG",n[n.HTML=10]="HTML",n[n.LOGO=11]="LOGO",n[n.OTHERS=1e3]="OTHERS",n}(t||(e.AssetType=t={}))}),Ix=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TemplateStatus=void 0;var t=function(n){return n[n.DRAFT=1]="DRAFT",n[n.PUBLISHED=2]="PUBLISHED",n[n.DISABLED=3]="DISABLED",n}(t||(e.TemplateStatus=t={}))}),xx=jn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=void 0;var t=function(n){return n.VIEW_ITEM="VIEW_ITEM",n.ADD_TO_CART="ADD_TO_CART",n.VIEW_CATEGORY="VIEW_CATEGORY",n.VIEW_TAG="VIEW_TAG",n.SEARCH="SEARCH",n.APPLY_COUPON="APPLY_COUPON",n}(t||(e.ActionType=t={}))}),Rx=jn(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(r,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,a)}:function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]}),n=e&&e.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(Sx(),e),n(Ix(),e),n(er(),e),n(xx(),e)});function zR(e,t){return Object.is(e,t)}var en=null,lu=!1,Bh=1,Ii=Symbol("SIGNAL");function $e(e){let t=en;return en=e,t}function jE(){return en}var uu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function $E(e){if(lu)throw new Error("");if(en===null)return;en.consumerOnSignalRead(e);let t=en.nextProducerIndex++;if(fu(en),t<en.producerNode.length&&en.producerNode[t]!==e&&Tc(en)){let n=en.producerNode[t];du(n,en.producerIndexOfThis[t])}en.producerNode[t]!==e&&(en.producerNode[t]=e,en.producerIndexOfThis[t]=Tc(en)?qE(e,en,t):0),en.producerLastReadVersion[t]=e.version}function qR(){Bh++}function YR(e){if(!(Tc(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Bh)){if(!e.producerMustRecompute(e)&&!Uh(e)){HE(e);return}e.producerRecomputeValue(e),HE(e)}}function WE(e){if(e.liveConsumerNode===void 0)return;let t=lu;lu=!0;try{for(let n of e.liveConsumerNode)n.dirty||KR(n)}finally{lu=t}}function GE(){return en?.consumerAllowSignalWrites!==!1}function KR(e){e.dirty=!0,WE(e),e.consumerMarkedDirty?.(e)}function HE(e){e.dirty=!1,e.lastCleanEpoch=Bh}function Vh(e){return e&&(e.nextProducerIndex=0),$e(e)}function zE(e,t){if($e(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(Tc(e))for(let n=e.nextProducerIndex;n<e.producerNode.length;n++)du(e.producerNode[n],e.producerIndexOfThis[n]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Uh(e){fu(e);for(let t=0;t<e.producerNode.length;t++){let n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(YR(n),r!==n.version))return!0}return!1}function Hh(e){if(fu(e),Tc(e))for(let t=0;t<e.producerNode.length;t++)du(e.producerNode[t],e.producerIndexOfThis[t]);e.producerNode.length=e.producerLastReadVersion.length=e.producerIndexOfThis.length=0,e.liveConsumerNode&&(e.liveConsumerNode.length=e.liveConsumerIndexOfThis.length=0)}function qE(e,t,n){if(YE(e),e.liveConsumerNode.length===0&&KE(e))for(let r=0;r<e.producerNode.length;r++)e.producerIndexOfThis[r]=qE(e.producerNode[r],e,r);return e.liveConsumerIndexOfThis.push(n),e.liveConsumerNode.push(t)-1}function du(e,t){if(YE(e),e.liveConsumerNode.length===1&&KE(e))for(let r=0;r<e.producerNode.length;r++)du(e.producerNode[r],e.producerIndexOfThis[r]);let n=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[n],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[n],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let r=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];fu(i),i.producerIndexOfThis[r]=t}}function Tc(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function fu(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function YE(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function KE(e){return e.producerNode!==void 0}function ZR(){throw new Error}var ZE=ZR;function XE(e){ZE(e)}function JE(e){ZE=e}var XR=null;function QE(e){let t=Object.create(tw);t.value=e;let n=()=>($E(t),t.value);return n[Ii]=t,n}function jh(e,t){GE()||XE(e),e.equal(e.value,t)||(e.value=t,JR(e))}function ew(e,t){GE()||XE(e),jh(e,t(e.value))}var tw=re(w({},uu),{equal:zR,value:void 0,kind:"signal"});function JR(e){e.version++,qR(),WE(e),XR?.()}function Ie(e){return typeof e=="function"}function pu(e){let t=e(n=>{Error.call(n),n.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var hu=pu(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
|
|
2
2
|
${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
|
|
3
|
-
`)}`:"",this.name="UnsubscriptionError",this.errors=t});function Ro(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var mt=class Ph{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let s of n)s.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(Ie(r))try{r()}catch(s){t=s instanceof hu?s.errors:[s]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let s of i)try{nw(s)}catch(o){t=t??[],o instanceof hu?t=[...t,...o.errors]:t.push(o)}}if(t)throw new hu(t)}}add(t){var n;if(t&&t!==this)if(this.closed)nw(t);else{if(t instanceof Ph){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Ro(n,t)}remove(t){let{_finalizers:n}=this;n&&Ro(n,t),t instanceof Ph&&t._removeParent(this)}};mt.EMPTY=(()=>{let e=new mt;return e.closed=!0,e})();var $h=mt.EMPTY;function mu(e){return e instanceof mt||e&&"closed"in e&&Ie(e.remove)&&Ie(e.add)&&Ie(e.unsubscribe)}function nw(e){Ie(e)?e():e.unsubscribe()}var Dr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Fs={setTimeout(e,t,...n){let{delegate:r}=Fs;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Fs;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function gu(e){Fs.setTimeout(()=>{let{onUnhandledError:t}=Dr;if(t)t(e);else throw e})}function xc(){}var rw=Wh("C",void 0,void 0);function iw(e){return Wh("E",void 0,e)}function ow(e){return Wh("N",e,void 0)}function Wh(e,t,n){return{kind:e,value:t,error:n}}var No=null;function Bs(e){if(Dr.useDeprecatedSynchronousErrorHandling){let t=!No;if(t&&(No={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=No;if(No=null,n)throw r}}else e()}function sw(e){Dr.useDeprecatedSynchronousErrorHandling&&No&&(No.errorThrown=!0,No.error=e)}var Ao=class extends mt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,mu(e)&&e.add(this)):this.destination=tN}static create(e,t,n){return new Vs(e,t,n)}next(e){this.isStopped?zh(ow(e),this):this._next(e)}error(e){this.isStopped?zh(iw(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?zh(rw,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},QR=Function.prototype.bind;function Gh(e,t){return QR.call(e,t)}var qh=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){vu(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){vu(n)}else vu(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){vu(t)}}},Vs=class extends Ao{constructor(e,t,n){super();let r;if(Ie(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let i;this&&Dr.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Gh(e.next,i),error:e.error&&Gh(e.error,i),complete:e.complete&&Gh(e.complete,i)}):r=e}this.destination=new qh(r)}};function vu(e){Dr.useDeprecatedSynchronousErrorHandling?sw(e):gu(e)}function eN(e){throw e}function zh(e,t){let{onStoppedNotification:n}=Dr;n&&Fs.setTimeout(()=>n(e,t))}var tN={closed:!0,next:xc,error:eN,complete:xc},Us=typeof Symbol=="function"&&Symbol.observable||"@@observable";function eo(e){return e}function aw(e){return e.length===0?eo:e.length===1?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}var ot=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){let s=rN(n)?n:new Vs(n,r,i);return Bs(()=>{let{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=cw(r),new r((i,s)=>{let o=new Vs({next:a=>{try{n(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:i});this.subscribe(o)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[Us](){return this}pipe(...n){return aw(n)(this)}toPromise(n){return n=cw(n),new n((r,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>r(s))})}}return e.create=t=>new e(t),e})();function cw(e){var t;return(t=e??Dr.Promise)!==null&&t!==void 0?t:Promise}function nN(e){return e&&Ie(e.next)&&Ie(e.error)&&Ie(e.complete)}function rN(e){return e&&e instanceof Ao||nN(e)&&mu(e)}function iN(e){return Ie(e?.lift)}function It(e){return t=>{if(iN(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function xt(e,t,n,r,i){return new Yh(e,t,n,r,i)}var Yh=class extends Ao{constructor(e,t,n,r,i,s){super(e),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=t?function(o){try{t(o)}catch(a){e.error(a)}}:super._next,this._error=r?function(o){try{r(o)}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(o){e.error(o)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}},Hs={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=Hs;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let i=t(s=>{n=void 0,e(s)});return new mt(()=>n?.(i))},requestAnimationFrame(...e){let{delegate:t}=Hs;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=Hs;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},lw=pu(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),ie=(()=>{class e extends ot{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new yu(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new lw}next(n){Bs(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){Bs(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){Bs(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:s}=this;return r||i?$h:(this.currentObservers=null,s.push(n),new mt(()=>{this.currentObservers=null,Ro(s,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:s}=this;r?n.error(i):s&&n.complete()}asObservable(){let n=new ot;return n.source=this,n}}return e.create=(t,n)=>new yu(t,n),e})(),yu=class extends ie{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:$h}},Ir=class extends ie{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}},Rc={now(){return(Rc.delegate||Date).now()},delegate:void 0},Mo=class extends ie{constructor(e=1/0,t=1/0,n=Rc){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:i,_windowTime:s}=this;t||(n.push(e),!r&&n.push(i.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:r}=this,i=r.slice();for(let s=0;s<i.length&&!e.closed;s+=n?1:2)e.next(i[s]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:n,_infiniteTimeWindow:r}=this,i=(r?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!r){let s=t.now(),o=0;for(let a=1;a<n.length&&n[a]<=s;a+=2)o=a;o&&n.splice(0,o+1)}}},_u=class extends mt{constructor(e,t){super()}schedule(e,t=0){return this}},Nc={setInterval(e,t,...n){let{delegate:r}=Nc;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=Nc;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},js=class extends _u{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var n;if(this.closed)return this;this.state=e;let r=this.id,i=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,n=0){return Nc.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Nc.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r;try{this.work(e)}catch(i){n=!0,r=i||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Ro(n,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},$s=class TS{constructor(t,n=TS.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};$s.now=Rc.now;var Ws=class extends $s{constructor(e,t=$s.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},Oo=new Ws(js),uw=Oo,Eu=class extends js{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=Hs.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:i}=e;t!=null&&((r=i[i.length-1])===null||r===void 0?void 0:r.id)!==t&&(Hs.cancelAnimationFrame(t),e._scheduled=void 0)}},wu=class extends Ws{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}},bu=new wu(Eu),Cu=new ot(e=>e.complete());function Su(e){return e&&Ie(e.schedule)}function dw(e){return e[e.length-1]}function to(e){return Su(dw(e))?e.pop():void 0}function fw(e,t){return typeof dw(e)=="number"?e.pop():t}function hw(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{c(r.next(h))}catch(d){o(d)}}function l(h){try{c(r.throw(h))}catch(d){o(d)}}function c(h){h.done?s(h.value):i(h.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function pw(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Po(e){return this instanceof Po?(this.v=e,this):new Po(e)}function mw(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(g){return function(m){return Promise.resolve(m).then(g,d)}}function a(g,m){r[g]&&(i[g]=function(b){return new Promise(function(I,A){s.push([g,b,I,A])>1||l(g,b)})},m&&(i[g]=m(i[g])))}function l(g,m){try{c(r[g](m))}catch(b){f(s[0][3],b)}}function c(g){g.value instanceof Po?Promise.resolve(g.value.v).then(h,d):f(s[0][2],g)}function h(g){l("next",g)}function d(g){l("throw",g)}function f(g,m){g(m),s.shift(),s.length&&l(s[0][0],s[0][1])}}function gw(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof pw=="function"?pw(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(o){return new Promise(function(a,l){o=e[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}var Gs=e=>e&&typeof e.length=="number"&&typeof e!="function";function Du(e){return Ie(e?.then)}function Iu(e){return Ie(e[Us])}function Tu(e){return Symbol.asyncIterator&&Ie(e?.[Symbol.asyncIterator])}function xu(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function oN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ru=oN();function Nu(e){return Ie(e?.[Ru])}function Au(e){return mw(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:n,done:r}=yield Po(t.read());if(r)return yield Po(void 0);yield yield Po(n)}}finally{t.releaseLock()}})}function Mu(e){return Ie(e?.getReader)}function Ht(e){if(e instanceof ot)return e;if(e!=null){if(Iu(e))return sN(e);if(Gs(e))return aN(e);if(Du(e))return cN(e);if(Tu(e))return vw(e);if(Nu(e))return lN(e);if(Mu(e))return uN(e)}throw xu(e)}function sN(e){return new ot(t=>{let n=e[Us]();if(Ie(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function aN(e){return new ot(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function cN(e){return new ot(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,gu)})}function lN(e){return new ot(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function vw(e){return new ot(t=>{dN(e,t).catch(n=>t.error(n))})}function uN(e){return vw(Au(e))}function dN(e,t){var n,r,i,s;return hw(this,void 0,void 0,function*(){try{for(n=gw(e);r=yield n.next(),!r.done;){let o=r.value;if(t.next(o),t.closed)return}}catch(o){i={error:o}}finally{try{r&&!r.done&&(s=n.return)&&(yield s.call(n))}finally{if(i)throw i.error}}t.complete()})}function cr(e,t,n,r=0,i=!1){let s=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(s),!i)return s}function Ou(e,t=0){return It((n,r)=>{n.subscribe(xt(r,i=>cr(r,e,()=>r.next(i),t),()=>cr(r,e,()=>r.complete(),t),i=>cr(r,e,()=>r.error(i),t)))})}function Pu(e,t=0){return It((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function yw(e,t){return Ht(e).pipe(Pu(t),Ou(t))}function _w(e,t){return Ht(e).pipe(Pu(t),Ou(t))}function Ew(e,t){return new ot(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function ww(e,t){return new ot(n=>{let r;return cr(n,t,()=>{r=e[Ru](),cr(n,t,()=>{let i,s;try{({value:i,done:s}=r.next())}catch(o){n.error(o);return}s?n.complete():n.next(i)},0,!0)}),()=>Ie(r?.return)&&r.return()})}function ku(e,t){if(!e)throw new Error("Iterable cannot be null");return new ot(n=>{cr(n,t,()=>{let r=e[Symbol.asyncIterator]();cr(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function bw(e,t){return ku(Au(e),t)}function Cw(e,t){if(e!=null){if(Iu(e))return yw(e,t);if(Gs(e))return Ew(e,t);if(Du(e))return _w(e,t);if(Tu(e))return ku(e,t);if(Nu(e))return ww(e,t);if(Mu(e))return bw(e,t)}throw xu(e)}function zs(e,t){return t?Cw(e,t):Ht(e)}function ko(...e){let t=to(e);return zs(e,t)}function Sw(e){return e instanceof Date&&!isNaN(e)}function lr(e,t){return It((n,r)=>{let i=0;n.subscribe(xt(r,s=>{r.next(e.call(t,s,i++))}))})}var{isArray:fN}=Array;function pN(e,t){return fN(t)?e(...t):e(t)}function Dw(e){return lr(t=>pN(e,t))}function Iw(e,t,n,r,i,s,o,a){let l=[],c=0,h=0,d=!1,f=()=>{d&&!l.length&&!c&&t.complete()},g=b=>c<r?m(b):l.push(b),m=b=>{s&&t.next(b),c++;let I=!1;Ht(n(b,h++)).subscribe(xt(t,A=>{i?.(A),s?g(A):t.next(A)},()=>{I=!0},void 0,()=>{if(I)try{for(c--;l.length&&c<r;){let A=l.shift();o?cr(t,o,()=>m(A)):m(A)}f()}catch(A){t.error(A)}}))};return e.subscribe(xt(t,g,()=>{d=!0,f()})),()=>{a?.()}}function Ac(e,t,n=1/0){return Ie(t)?Ac((r,i)=>lr((s,o)=>t(r,s,i,o))(Ht(e(r,i))),n):(typeof t=="number"&&(n=t),It((r,i)=>Iw(r,i,e,n)))}function Lu(e=1/0){return Ac(eo,e)}function Tw(){return Lu(1)}function Kh(...e){return Tw()(zs(e,to(e)))}function Zh(e){return new ot(t=>{Ht(e()).subscribe(t)})}var hN=["addListener","removeListener"],mN=["addEventListener","removeEventListener"],gN=["on","off"];function Lo(e,t,n,r){if(Ie(n)&&(r=n,n=void 0),r)return Lo(e,t,n).pipe(Dw(r));let[i,s]=_N(e)?mN.map(o=>a=>e[o](t,a,n)):vN(e)?hN.map(xw(e,t)):yN(e)?gN.map(xw(e,t)):[];if(!i&&Gs(e))return Ac(o=>Lo(o,t,n))(Ht(e));if(!i)throw new TypeError("Invalid event target");return new ot(o=>{let a=(...l)=>o.next(1<l.length?l:l[0]);return i(a),()=>s(a)})}function xw(e,t){return n=>r=>e[n](t,r)}function vN(e){return Ie(e.addListener)&&Ie(e.removeListener)}function yN(e){return Ie(e.on)&&Ie(e.off)}function _N(e){return Ie(e.addEventListener)&&Ie(e.removeEventListener)}function Fu(e=0,t,n=uw){let r=-1;return t!=null&&(Su(t)?n=t:r=t),new ot(i=>{let s=Sw(e)?+e-n.now():e;s<0&&(s=0);let o=0;return n.schedule(function(){i.closed||(i.next(o++),0<=r?this.schedule(void 0,r):i.complete())},s)})}function Xh(e=0,t=Oo){return e<0&&(e=0),Fu(e,e,t)}function no(...e){let t=to(e),n=fw(e,1/0),r=e;return r.length?r.length===1?Ht(r[0]):Lu(n)(zs(r,t)):Cu}function Fo(e,t){return It((n,r)=>{let i=0;n.subscribe(xt(r,s=>e.call(t,s,i++)&&r.next(s)))})}function Rw(e){return It((t,n)=>{let r=!1,i=null,s=null,o=!1,a=()=>{if(s?.unsubscribe(),s=null,r){r=!1;let c=i;i=null,n.next(c)}o&&n.complete()},l=()=>{s=null,o&&n.complete()};t.subscribe(xt(n,c=>{r=!0,i=c,s||Ht(e(c)).subscribe(s=xt(n,a,l))},()=>{o=!0,(!r||!s||s.closed)&&n.complete()}))})}function Bu(e,t=Oo){return Rw(()=>Fu(e,t))}function Tr(e,t=Oo){return It((n,r)=>{let i=null,s=null,o=null,a=()=>{if(i){i.unsubscribe(),i=null;let c=s;s=null,r.next(c)}};function l(){let c=o+e,h=t.now();if(h<c){i=this.schedule(void 0,c-h),r.add(i);return}a()}n.subscribe(xt(r,c=>{s=c,o=t.now(),i||(i=t.schedule(l,e),r.add(i))},()=>{a(),r.complete()},void 0,()=>{s=i=null}))})}function Jh(e){return e<=0?()=>Cu:It((t,n)=>{let r=0;t.subscribe(xt(n,i=>{++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Vu(e,t=eo){return e=e??EN,It((n,r)=>{let i,s=!0;n.subscribe(xt(r,o=>{let a=t(o);(s||!e(i,a))&&(s=!1,i=a,r.next(o))}))})}function EN(e,t){return e===t}function Qh(e){return Fo((t,n)=>e<=n)}function Ti(...e){let t=to(e);return It((n,r)=>{(t?Kh(e,n,t):Kh(e,n)).subscribe(r)})}function qs(e,t){return It((n,r)=>{let i=null,s=0,o=!1,a=()=>o&&!i&&r.complete();n.subscribe(xt(r,l=>{i?.unsubscribe();let c=0,h=s++;Ht(e(l,h)).subscribe(i=xt(r,d=>r.next(t?t(l,d,h,c++):d),()=>{i=null,a()}))},()=>{o=!0,a()}))})}function Gr(e){return It((t,n)=>{Ht(e).subscribe(xt(n,()=>n.complete(),xc)),!n.closed&&t.subscribe(n)})}function em(e,t,n){let r=Ie(e)||t||n?{next:e,error:t,complete:n}:e;return r?It((i,s)=>{var o;(o=r.subscribe)===null||o===void 0||o.call(r);let a=!0;i.subscribe(xt(s,l=>{var c;(c=r.next)===null||c===void 0||c.call(r,l),s.next(l)},()=>{var l;a=!1,(l=r.complete)===null||l===void 0||l.call(r),s.complete()},l=>{var c;a=!1,(c=r.error)===null||c===void 0||c.call(r,l),s.error(l)},()=>{var l,c;a&&((l=r.unsubscribe)===null||l===void 0||l.call(r)),(c=r.finalize)===null||c===void 0||c.call(r)}))}):eo}var _b="https://g.co/ng/security#xss",Me=class extends Error{code;constructor(e,t){super(Eg(e,t)),this.code=e}};function Eg(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}function Ed(e){return{toString:e}.toString()}var Uu="__parameters__";function wN(e){return function(...t){if(e){let n=e(...t);for(let r in n)this[r]=n[r]}}}function Eb(e,t,n){return Ed(()=>{let r=wN(t);function i(...s){if(this instanceof i)return r.apply(this,s),this;let o=new i(...s);return a.annotation=o,a;function a(l,c,h){let d=l.hasOwnProperty(Uu)?l[Uu]:Object.defineProperty(l,Uu,{value:[]})[Uu];for(;d.length<=h;)d.push(null);return(d[h]=d[h]||[]).push(o),l}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}var Lc=globalThis;function Rt(e){for(let t in e)if(e[t]===Rt)return t;throw Error("Could not find renamed property on target object.")}function bN(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function ur(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(ur).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return""+n;let r=n.indexOf(`
|
|
4
|
-
`);return r>=0?n.slice(0,r):n}function Nw(e,t){return e?t?`${e} ${t}`:e:t||""}var CN=Rt({__forward_ref__:Rt});function wg(e){return e.__forward_ref__=wg,e.toString=function(){return
|
|
3
|
+
`)}`:"",this.name="UnsubscriptionError",this.errors=t});function Ro(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var mt=class Ph{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let s of n)s.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(Ie(r))try{r()}catch(s){t=s instanceof hu?s.errors:[s]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let s of i)try{nw(s)}catch(o){t=t??[],o instanceof hu?t=[...t,...o.errors]:t.push(o)}}if(t)throw new hu(t)}}add(t){var n;if(t&&t!==this)if(this.closed)nw(t);else{if(t instanceof Ph){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Ro(n,t)}remove(t){let{_finalizers:n}=this;n&&Ro(n,t),t instanceof Ph&&t._removeParent(this)}};mt.EMPTY=(()=>{let e=new mt;return e.closed=!0,e})();var $h=mt.EMPTY;function mu(e){return e instanceof mt||e&&"closed"in e&&Ie(e.remove)&&Ie(e.add)&&Ie(e.unsubscribe)}function nw(e){Ie(e)?e():e.unsubscribe()}var Tr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Fs={setTimeout(e,t,...n){let{delegate:r}=Fs;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Fs;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function gu(e){Fs.setTimeout(()=>{let{onUnhandledError:t}=Tr;if(t)t(e);else throw e})}function xc(){}var rw=Wh("C",void 0,void 0);function iw(e){return Wh("E",void 0,e)}function ow(e){return Wh("N",e,void 0)}function Wh(e,t,n){return{kind:e,value:t,error:n}}var No=null;function Bs(e){if(Tr.useDeprecatedSynchronousErrorHandling){let t=!No;if(t&&(No={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=No;if(No=null,n)throw r}}else e()}function sw(e){Tr.useDeprecatedSynchronousErrorHandling&&No&&(No.errorThrown=!0,No.error=e)}var Ao=class extends mt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,mu(e)&&e.add(this)):this.destination=tN}static create(e,t,n){return new Vs(e,t,n)}next(e){this.isStopped?zh(ow(e),this):this._next(e)}error(e){this.isStopped?zh(iw(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?zh(rw,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},QR=Function.prototype.bind;function Gh(e,t){return QR.call(e,t)}var qh=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){vu(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){vu(n)}else vu(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){vu(t)}}},Vs=class extends Ao{constructor(e,t,n){super();let r;if(Ie(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let i;this&&Tr.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Gh(e.next,i),error:e.error&&Gh(e.error,i),complete:e.complete&&Gh(e.complete,i)}):r=e}this.destination=new qh(r)}};function vu(e){Tr.useDeprecatedSynchronousErrorHandling?sw(e):gu(e)}function eN(e){throw e}function zh(e,t){let{onStoppedNotification:n}=Tr;n&&Fs.setTimeout(()=>n(e,t))}var tN={closed:!0,next:xc,error:eN,complete:xc},Us=typeof Symbol=="function"&&Symbol.observable||"@@observable";function eo(e){return e}function aw(e){return e.length===0?eo:e.length===1?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}var ot=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){let s=rN(n)?n:new Vs(n,r,i);return Bs(()=>{let{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=cw(r),new r((i,s)=>{let o=new Vs({next:a=>{try{n(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:i});this.subscribe(o)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[Us](){return this}pipe(...n){return aw(n)(this)}toPromise(n){return n=cw(n),new n((r,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>r(s))})}}return e.create=t=>new e(t),e})();function cw(e){var t;return(t=e??Tr.Promise)!==null&&t!==void 0?t:Promise}function nN(e){return e&&Ie(e.next)&&Ie(e.error)&&Ie(e.complete)}function rN(e){return e&&e instanceof Ao||nN(e)&&mu(e)}function iN(e){return Ie(e?.lift)}function It(e){return t=>{if(iN(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function xt(e,t,n,r,i){return new Yh(e,t,n,r,i)}var Yh=class extends Ao{constructor(e,t,n,r,i,s){super(e),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=t?function(o){try{t(o)}catch(a){e.error(a)}}:super._next,this._error=r?function(o){try{r(o)}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(o){e.error(o)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}},Hs={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=Hs;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let i=t(s=>{n=void 0,e(s)});return new mt(()=>n?.(i))},requestAnimationFrame(...e){let{delegate:t}=Hs;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=Hs;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},lw=pu(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),ie=(()=>{class e extends ot{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new yu(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new lw}next(n){Bs(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){Bs(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){Bs(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:s}=this;return r||i?$h:(this.currentObservers=null,s.push(n),new mt(()=>{this.currentObservers=null,Ro(s,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:s}=this;r?n.error(i):s&&n.complete()}asObservable(){let n=new ot;return n.source=this,n}}return e.create=(t,n)=>new yu(t,n),e})(),yu=class extends ie{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:$h}},xr=class extends ie{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}},Rc={now(){return(Rc.delegate||Date).now()},delegate:void 0},Mo=class extends ie{constructor(e=1/0,t=1/0,n=Rc){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:i,_windowTime:s}=this;t||(n.push(e),!r&&n.push(i.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:r}=this,i=r.slice();for(let s=0;s<i.length&&!e.closed;s+=n?1:2)e.next(i[s]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:n,_infiniteTimeWindow:r}=this,i=(r?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!r){let s=t.now(),o=0;for(let a=1;a<n.length&&n[a]<=s;a+=2)o=a;o&&n.splice(0,o+1)}}},_u=class extends mt{constructor(e,t){super()}schedule(e,t=0){return this}},Nc={setInterval(e,t,...n){let{delegate:r}=Nc;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=Nc;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},js=class extends _u{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var n;if(this.closed)return this;this.state=e;let r=this.id,i=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,n=0){return Nc.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Nc.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r;try{this.work(e)}catch(i){n=!0,r=i||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Ro(n,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},$s=class TS{constructor(t,n=TS.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};$s.now=Rc.now;var Ws=class extends $s{constructor(e,t=$s.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},Oo=new Ws(js),uw=Oo,Eu=class extends js{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=Hs.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:i}=e;t!=null&&((r=i[i.length-1])===null||r===void 0?void 0:r.id)!==t&&(Hs.cancelAnimationFrame(t),e._scheduled=void 0)}},wu=class extends Ws{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}},bu=new wu(Eu),Cu=new ot(e=>e.complete());function Su(e){return e&&Ie(e.schedule)}function dw(e){return e[e.length-1]}function to(e){return Su(dw(e))?e.pop():void 0}function fw(e,t){return typeof dw(e)=="number"?e.pop():t}function hw(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{c(r.next(h))}catch(d){o(d)}}function l(h){try{c(r.throw(h))}catch(d){o(d)}}function c(h){h.done?s(h.value):i(h.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function pw(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Po(e){return this instanceof Po?(this.v=e,this):new Po(e)}function mw(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(g){return function(m){return Promise.resolve(m).then(g,d)}}function a(g,m){r[g]&&(i[g]=function(b){return new Promise(function(I,A){s.push([g,b,I,A])>1||l(g,b)})},m&&(i[g]=m(i[g])))}function l(g,m){try{c(r[g](m))}catch(b){f(s[0][3],b)}}function c(g){g.value instanceof Po?Promise.resolve(g.value.v).then(h,d):f(s[0][2],g)}function h(g){l("next",g)}function d(g){l("throw",g)}function f(g,m){g(m),s.shift(),s.length&&l(s[0][0],s[0][1])}}function gw(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof pw=="function"?pw(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(o){return new Promise(function(a,l){o=e[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}var Gs=e=>e&&typeof e.length=="number"&&typeof e!="function";function Du(e){return Ie(e?.then)}function Iu(e){return Ie(e[Us])}function Tu(e){return Symbol.asyncIterator&&Ie(e?.[Symbol.asyncIterator])}function xu(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function oN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ru=oN();function Nu(e){return Ie(e?.[Ru])}function Au(e){return mw(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:n,done:r}=yield Po(t.read());if(r)return yield Po(void 0);yield yield Po(n)}}finally{t.releaseLock()}})}function Mu(e){return Ie(e?.getReader)}function jt(e){if(e instanceof ot)return e;if(e!=null){if(Iu(e))return sN(e);if(Gs(e))return aN(e);if(Du(e))return cN(e);if(Tu(e))return vw(e);if(Nu(e))return lN(e);if(Mu(e))return uN(e)}throw xu(e)}function sN(e){return new ot(t=>{let n=e[Us]();if(Ie(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function aN(e){return new ot(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function cN(e){return new ot(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,gu)})}function lN(e){return new ot(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function vw(e){return new ot(t=>{dN(e,t).catch(n=>t.error(n))})}function uN(e){return vw(Au(e))}function dN(e,t){var n,r,i,s;return hw(this,void 0,void 0,function*(){try{for(n=gw(e);r=yield n.next(),!r.done;){let o=r.value;if(t.next(o),t.closed)return}}catch(o){i={error:o}}finally{try{r&&!r.done&&(s=n.return)&&(yield s.call(n))}finally{if(i)throw i.error}}t.complete()})}function lr(e,t,n,r=0,i=!1){let s=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(s),!i)return s}function Ou(e,t=0){return It((n,r)=>{n.subscribe(xt(r,i=>lr(r,e,()=>r.next(i),t),()=>lr(r,e,()=>r.complete(),t),i=>lr(r,e,()=>r.error(i),t)))})}function Pu(e,t=0){return It((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function yw(e,t){return jt(e).pipe(Pu(t),Ou(t))}function _w(e,t){return jt(e).pipe(Pu(t),Ou(t))}function Ew(e,t){return new ot(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function ww(e,t){return new ot(n=>{let r;return lr(n,t,()=>{r=e[Ru](),lr(n,t,()=>{let i,s;try{({value:i,done:s}=r.next())}catch(o){n.error(o);return}s?n.complete():n.next(i)},0,!0)}),()=>Ie(r?.return)&&r.return()})}function ku(e,t){if(!e)throw new Error("Iterable cannot be null");return new ot(n=>{lr(n,t,()=>{let r=e[Symbol.asyncIterator]();lr(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function bw(e,t){return ku(Au(e),t)}function Cw(e,t){if(e!=null){if(Iu(e))return yw(e,t);if(Gs(e))return Ew(e,t);if(Du(e))return _w(e,t);if(Tu(e))return ku(e,t);if(Nu(e))return ww(e,t);if(Mu(e))return bw(e,t)}throw xu(e)}function zs(e,t){return t?Cw(e,t):jt(e)}function ko(...e){let t=to(e);return zs(e,t)}function Sw(e){return e instanceof Date&&!isNaN(e)}function ur(e,t){return It((n,r)=>{let i=0;n.subscribe(xt(r,s=>{r.next(e.call(t,s,i++))}))})}var{isArray:fN}=Array;function pN(e,t){return fN(t)?e(...t):e(t)}function Dw(e){return ur(t=>pN(e,t))}function Iw(e,t,n,r,i,s,o,a){let l=[],c=0,h=0,d=!1,f=()=>{d&&!l.length&&!c&&t.complete()},g=b=>c<r?m(b):l.push(b),m=b=>{s&&t.next(b),c++;let I=!1;jt(n(b,h++)).subscribe(xt(t,A=>{i?.(A),s?g(A):t.next(A)},()=>{I=!0},void 0,()=>{if(I)try{for(c--;l.length&&c<r;){let A=l.shift();o?lr(t,o,()=>m(A)):m(A)}f()}catch(A){t.error(A)}}))};return e.subscribe(xt(t,g,()=>{d=!0,f()})),()=>{a?.()}}function Ac(e,t,n=1/0){return Ie(t)?Ac((r,i)=>ur((s,o)=>t(r,s,i,o))(jt(e(r,i))),n):(typeof t=="number"&&(n=t),It((r,i)=>Iw(r,i,e,n)))}function Lu(e=1/0){return Ac(eo,e)}function Tw(){return Lu(1)}function Kh(...e){return Tw()(zs(e,to(e)))}function Zh(e){return new ot(t=>{jt(e()).subscribe(t)})}var hN=["addListener","removeListener"],mN=["addEventListener","removeEventListener"],gN=["on","off"];function Lo(e,t,n,r){if(Ie(n)&&(r=n,n=void 0),r)return Lo(e,t,n).pipe(Dw(r));let[i,s]=_N(e)?mN.map(o=>a=>e[o](t,a,n)):vN(e)?hN.map(xw(e,t)):yN(e)?gN.map(xw(e,t)):[];if(!i&&Gs(e))return Ac(o=>Lo(o,t,n))(jt(e));if(!i)throw new TypeError("Invalid event target");return new ot(o=>{let a=(...l)=>o.next(1<l.length?l:l[0]);return i(a),()=>s(a)})}function xw(e,t){return n=>r=>e[n](t,r)}function vN(e){return Ie(e.addListener)&&Ie(e.removeListener)}function yN(e){return Ie(e.on)&&Ie(e.off)}function _N(e){return Ie(e.addEventListener)&&Ie(e.removeEventListener)}function Fu(e=0,t,n=uw){let r=-1;return t!=null&&(Su(t)?n=t:r=t),new ot(i=>{let s=Sw(e)?+e-n.now():e;s<0&&(s=0);let o=0;return n.schedule(function(){i.closed||(i.next(o++),0<=r?this.schedule(void 0,r):i.complete())},s)})}function Xh(e=0,t=Oo){return e<0&&(e=0),Fu(e,e,t)}function no(...e){let t=to(e),n=fw(e,1/0),r=e;return r.length?r.length===1?jt(r[0]):Lu(n)(zs(r,t)):Cu}function Fo(e,t){return It((n,r)=>{let i=0;n.subscribe(xt(r,s=>e.call(t,s,i++)&&r.next(s)))})}function Rw(e){return It((t,n)=>{let r=!1,i=null,s=null,o=!1,a=()=>{if(s?.unsubscribe(),s=null,r){r=!1;let c=i;i=null,n.next(c)}o&&n.complete()},l=()=>{s=null,o&&n.complete()};t.subscribe(xt(n,c=>{r=!0,i=c,s||jt(e(c)).subscribe(s=xt(n,a,l))},()=>{o=!0,(!r||!s||s.closed)&&n.complete()}))})}function Bu(e,t=Oo){return Rw(()=>Fu(e,t))}function Rr(e,t=Oo){return It((n,r)=>{let i=null,s=null,o=null,a=()=>{if(i){i.unsubscribe(),i=null;let c=s;s=null,r.next(c)}};function l(){let c=o+e,h=t.now();if(h<c){i=this.schedule(void 0,c-h),r.add(i);return}a()}n.subscribe(xt(r,c=>{s=c,o=t.now(),i||(i=t.schedule(l,e),r.add(i))},()=>{a(),r.complete()},void 0,()=>{s=i=null}))})}function Jh(e){return e<=0?()=>Cu:It((t,n)=>{let r=0;t.subscribe(xt(n,i=>{++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Vu(e,t=eo){return e=e??EN,It((n,r)=>{let i,s=!0;n.subscribe(xt(r,o=>{let a=t(o);(s||!e(i,a))&&(s=!1,i=a,r.next(o))}))})}function EN(e,t){return e===t}function Qh(e){return Fo((t,n)=>e<=n)}function Ti(...e){let t=to(e);return It((n,r)=>{(t?Kh(e,n,t):Kh(e,n)).subscribe(r)})}function qs(e,t){return It((n,r)=>{let i=null,s=0,o=!1,a=()=>o&&!i&&r.complete();n.subscribe(xt(r,l=>{i?.unsubscribe();let c=0,h=s++;jt(e(l,h)).subscribe(i=xt(r,d=>r.next(t?t(l,d,h,c++):d),()=>{i=null,a()}))},()=>{o=!0,a()}))})}function Gr(e){return It((t,n)=>{jt(e).subscribe(xt(n,()=>n.complete(),xc)),!n.closed&&t.subscribe(n)})}function em(e,t,n){let r=Ie(e)||t||n?{next:e,error:t,complete:n}:e;return r?It((i,s)=>{var o;(o=r.subscribe)===null||o===void 0||o.call(r);let a=!0;i.subscribe(xt(s,l=>{var c;(c=r.next)===null||c===void 0||c.call(r,l),s.next(l)},()=>{var l;a=!1,(l=r.complete)===null||l===void 0||l.call(r),s.complete()},l=>{var c;a=!1,(c=r.error)===null||c===void 0||c.call(r,l),s.error(l)},()=>{var l,c;a&&((l=r.unsubscribe)===null||l===void 0||l.call(r)),(c=r.finalize)===null||c===void 0||c.call(r)}))}):eo}var _b="https://g.co/ng/security#xss",Me=class extends Error{code;constructor(e,t){super(Eg(e,t)),this.code=e}};function Eg(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}function Ed(e){return{toString:e}.toString()}var Uu="__parameters__";function wN(e){return function(...t){if(e){let n=e(...t);for(let r in n)this[r]=n[r]}}}function Eb(e,t,n){return Ed(()=>{let r=wN(t);function i(...s){if(this instanceof i)return r.apply(this,s),this;let o=new i(...s);return a.annotation=o,a;function a(l,c,h){let d=l.hasOwnProperty(Uu)?l[Uu]:Object.defineProperty(l,Uu,{value:[]})[Uu];for(;d.length<=h;)d.push(null);return(d[h]=d[h]||[]).push(o),l}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}var Lc=globalThis;function Rt(e){for(let t in e)if(e[t]===Rt)return t;throw Error("Could not find renamed property on target object.")}function bN(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function dr(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(dr).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return""+n;let r=n.indexOf(`
|
|
4
|
+
`);return r>=0?n.slice(0,r):n}function Nw(e,t){return e?t?`${e} ${t}`:e:t||""}var CN=Rt({__forward_ref__:Rt});function wg(e){return e.__forward_ref__=wg,e.toString=function(){return dr(this())},e}function Pn(e){return wb(e)?e():e}function wb(e){return typeof e=="function"&&e.hasOwnProperty(CN)&&e.__forward_ref__===wg}function oe(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function bg(e){return Aw(e,bb)||Aw(e,Cb)}function Aw(e,t){return e.hasOwnProperty(t)?e[t]:null}function SN(e){return e&&(e[bb]||e[Cb])||null}function Mw(e){return e&&(e.hasOwnProperty(Ow)||e.hasOwnProperty(DN))?e[Ow]:null}var bb=Rt({\u0275prov:Rt}),Ow=Rt({\u0275inj:Rt}),Cb=Rt({ngInjectableDef:Rt}),DN=Rt({ngInjectorDef:Rt}),he=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=oe({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Sb(e){return e&&!!e.\u0275providers}var IN=Rt({\u0275cmp:Rt}),TN=Rt({\u0275dir:Rt}),xN=Rt({\u0275pipe:Rt}),Xu=Rt({\u0275fac:Rt}),kc=Rt({__NG_ELEMENT_ID__:Rt}),Pw=Rt({__NG_ENV_ID__:Rt});function Zc(e){return typeof e=="string"?e:e==null?"":String(e)}function RN(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():Zc(e)}function NN(e,t){throw new Me(-200,e)}function Cg(e,t){throw new Me(-201,!1)}var Je=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Je||{}),mm;function Db(){return mm}function $n(e){let t=mm;return mm=e,t}function Ib(e,t,n){let r=bg(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&Je.Optional)return null;if(t!==void 0)return t;Cg(e,"Injector")}var AN={},Fc=AN,gm="__NG_DI_FLAG__",Ju="ngTempTokenPath",MN="ngTokenPath",ON=/\n/gm,PN="\u0275",kw="__source",Js;function kN(){return Js}function ro(e){let t=Js;return Js=e,t}function LN(e,t=Je.Default){if(Js===void 0)throw new Me(-203,!1);return Js===null?Ib(e,void 0,t):Js.get(e,t&Je.Optional?null:void 0,t)}function et(e,t=Je.Default){return(Db()||LN)(Pn(e),t)}function O(e,t=Je.Default){return et(e,wd(t))}function wd(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function vm(e){let t=[];for(let n=0;n<e.length;n++){let r=Pn(e[n]);if(Array.isArray(r)){if(r.length===0)throw new Me(900,!1);let i,s=Je.Default;for(let o=0;o<r.length;o++){let a=r[o],l=FN(a);typeof l=="number"?l===-1?i=a.token:s|=l:i=a}t.push(et(i,s))}else t.push(et(r))}return t}function Tb(e,t){return e[gm]=t,e.prototype[gm]=t,e}function FN(e){return e[gm]}function BN(e,t,n,r){let i=e[Ju];throw t[kw]&&i.unshift(t[kw]),e.message=VN(`
|
|
5
5
|
`+e.message,i,n,r),e[MN]=i,e[Ju]=null,e}function VN(e,t,n,r=null){e=e&&e.charAt(0)===`
|
|
6
|
-
`&&e.charAt(1)==PN?e.slice(2):e;let i=
|
|
7
|
-
`)}`}var Sg=Tb(Eb("Optional"),8),UN=Tb(Eb("SkipSelf"),4);function Vo(e,t){return e.hasOwnProperty(Xu)?e[Xu]:null}function HN(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(n&&(i=n(i),s=n(s)),s!==i)return!1}return!0}function jN(e){return e.flat(Number.POSITIVE_INFINITY)}function Dg(e,t){e.forEach(n=>Array.isArray(n)?Dg(n,t):t(n))}function xb(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Qu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function $N(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=n,e[t+1]=r}}function WN(e,t,n){let r=Xc(e,t);return r>=0?e[r|1]=n:(r=~r,$N(e,r,t,n)),r}function tm(e,t){let n=Xc(e,t);if(n>=0)return e[n|1]}function Xc(e,t){return GN(e,t,1)}function GN(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let s=r+(i-r>>1),o=e[s<<n];if(t===o)return s<<n;o>t?i=s:r=s+1}return~(i<<n)}var Uo={},so=[],Bc=new he(""),Rb=new he("",-1),Nb=new he(""),ed=class{get(e,t=Fc){if(t===Fc){let n=new Error(`NullInjectorError: No provider for ${ur(e)}!`);throw n.name="NullInjectorError",n}return t}};function Ho(e){return e[IN]||null}function Ab(e){return e[TN]||null}function Mb(e){return e[xN]||null}function zN(e){let t=Ho(e)||Ab(e)||Mb(e);return t!==null&&t.standalone}function Ob(e){return{\u0275providers:e}}function qN(...e){return{\u0275providers:Pb(!0,e),\u0275fromNgModule:!0}}function Pb(e,...t){let n=[],r=new Set,i,s=o=>{n.push(o)};return Dg(t,o=>{let a=o;ym(a,s,[],r)&&(i||=[],i.push(a))}),i!==void 0&&kb(i,s),n}function kb(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Ig(i,s=>{t(s,r)})}}function ym(e,t,n,r){if(e=Pn(e),!e)return!1;let i=null,s=Mw(e),o=!s&&Ho(e);if(!s&&!o){let l=e.ngModule;if(s=Mw(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=r.has(i);if(o){if(a)return!1;if(r.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)ym(c,t,n,r)}}else if(s){if(s.imports!=null&&!a){r.add(i);let c;try{Dg(s.imports,h=>{ym(h,t,n,r)&&(c||=[],c.push(h))})}finally{}c!==void 0&&kb(c,t)}if(!a){let c=Vo(i)||(()=>new i);t({provide:i,useFactory:c,deps:so},i),t({provide:Nb,useValue:i,multi:!0},i),t({provide:Bc,useValue:()=>et(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;Ig(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Ig(e,t){for(let n of e)Sb(n)&&(n=n.\u0275providers),Array.isArray(n)?Ig(n,t):t(n)}var YN=Rt({provide:String,useValue:Rt});function Lb(e){return e!==null&&typeof e=="object"&&YN in e}function KN(e){return!!(e&&e.useExisting)}function ZN(e){return!!(e&&e.useFactory)}function ta(e){return typeof e=="function"}function XN(e){return!!e.useClass}var bd=new he(""),Gu={},JN={},nm;function Cd(){return nm===void 0&&(nm=new ed),nm}var Wn=class{},Vc=class extends Wn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Em(e,s=>this.processProvider(s)),this.records.set(Rb,Ys(void 0,this)),r.has("environment")&&this.records.set(Wn,Ys(void 0,this));let i=this.records.get(bd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Nb,so,Je.Self))}destroy(){Oc(this),this._destroyed=!0;let e=$e(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),$e(e)}}onDestroy(e){return Oc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Oc(this);let t=ro(this),n=$n(void 0),r;try{return e()}finally{ro(t),$n(n)}}get(e,t=Fc,n=Je.Default){if(Oc(this),e.hasOwnProperty(Pw))return e[Pw](this);n=wd(n);let r,i=ro(this),s=$n(void 0);try{if(!(n&Je.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=rA(e)&&bg(e);l&&this.injectableDefInScope(l)?a=Ys(_m(e),Gu):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=n&Je.Self?Cd():this.parent;return t=n&Je.Optional&&t===Fc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ju]=o[Ju]||[]).unshift(ur(e)),i)throw o;return BN(o,e,"R3InjectorError",this.source)}else throw o}finally{$n(s),ro(i)}}resolveInjectorInitializers(){let e=$e(null),t=ro(this),n=$n(void 0),r;try{let i=this.get(Bc,so,Je.Self);for(let s of i)s()}finally{ro(t),$n(n),$e(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(ur(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Pn(e);let t=ta(e)?e:Pn(e&&e.provide),n=eA(e);if(!ta(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Ys(void 0,Gu,!0),r.factory=()=>vm(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=$e(null);try{return t.value===Gu&&(t.value=JN,t.value=t.factory()),typeof t.value=="object"&&t.value&&nA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{$e(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Pn(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function _m(e){let t=bg(e),n=t!==null?t.factory:Vo(e);if(n!==null)return n;if(e instanceof he)throw new Me(204,!1);if(e instanceof Function)return QN(e);throw new Me(204,!1)}function QN(e){if(e.length>0)throw new Me(204,!1);let t=SN(e);return t!==null?()=>t.factory(e):()=>new e}function eA(e){if(Lb(e))return Ys(void 0,e.useValue);{let t=Fb(e);return Ys(t,Gu)}}function Fb(e,t,n){let r;if(ta(e)){let i=Pn(e);return Vo(i)||_m(i)}else if(Lb(e))r=()=>Pn(e.useValue);else if(ZN(e))r=()=>e.useFactory(...vm(e.deps||[]));else if(KN(e))r=()=>et(Pn(e.useExisting));else{let i=Pn(e&&(e.useClass||e.provide));if(tA(e))r=()=>new i(...vm(e.deps));else return Vo(i)||_m(i)}return r}function Oc(e){if(e.destroyed)throw new Me(205,!1)}function Ys(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function tA(e){return!!e.deps}function nA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function rA(e){return typeof e=="function"||typeof e=="object"&&e instanceof he}function Em(e,t){for(let n of e)Array.isArray(n)?Em(n,t):n&&Sb(n)?Em(n.\u0275providers,t):t(n)}function Bb(e,t){e instanceof Vc&&Oc(e);let n,r=ro(e),i=$n(void 0);try{return t()}finally{ro(r),$n(i)}}function Vb(){return Db()!==void 0||kN()!=null}function Ub(e){if(!Vb())throw new Me(-203,!1)}function iA(e){return typeof e=="function"}var ki=0,Te=1,Ee=2,xn=3,Rr=4,Mr=5,Uc=6,td=7,tn=8,Hc=9,xi=10,cn=11,jc=12,Lw=13,sa=14,Nr=15,jo=16,Ks=17,Ri=18,Sd=19,Hb=20,io=21,rm=22,nd=23,Xn=24,Qs=25,wn=26,jb=1,$o=7,rd=8,na=9,Tn=10;function oo(e){return Array.isArray(e)&&typeof e[jb]=="object"}function Li(e){return Array.isArray(e)&&e[jb]===!0}function $b(e){return(e.flags&4)!==0}function aa(e){return e.componentOffset>-1}function Tg(e){return(e.flags&1)===1}function qr(e){return!!e.template}function id(e){return(e[Ee]&512)!==0}function Jc(e){return(e[Ee]&256)===256}var wm=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Wb(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var ca=(()=>{let e=()=>Gb;return e.ngInherit=!0,e})();function Gb(e){return e.type.prototype.ngOnChanges&&(e.setInput=sA),oA}function oA(){let e=qb(this),t=e?.current;if(t){let n=e.previous;if(n===Uo)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function sA(e,t,n,r,i){let s=this.declaredInputs[r],o=qb(e)||aA(e,{previous:Uo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new wm(c&&c.currentValue,n,l===Uo),Wb(e,t,i,n)}var zb="__ngSimpleChanges__";function qb(e){return e[zb]||null}function aA(e,t){return e[zb]=t}var Fw=null,vt=function(e,t=null,n){Fw?.(e,t,n)},Yb="svg",cA="math";function Yr(e){for(;Array.isArray(e);)e=e[ki];return e}function Kb(e,t){return Yr(t[e])}function Jr(e,t){return Yr(t[e.index])}function xg(e,t){return e.data[t]}function Rg(e,t){return e[t]}function Kr(e,t){let n=t[e];return oo(n)?n:n[ki]}function lA(e){return(e[Ee]&4)===4}function Ng(e){return(e[Ee]&128)===128}function uA(e){return Li(e[xn])}function ra(e,t){return t==null?null:e[t]}function Zb(e){e[Ks]=0}function Ag(e){e[Ee]&1024||(e[Ee]|=1024,Ng(e)&&Qc(e))}function dA(e,t){for(;e>0;)t=t[sa],e--;return t}function Dd(e){return!!(e[Ee]&9216||e[Xn]?.dirty)}function bm(e){e[xi].changeDetectionScheduler?.notify(8),e[Ee]&64&&(e[Ee]|=1024),Dd(e)&&Qc(e)}function Qc(e){e[xi].changeDetectionScheduler?.notify(0);let t=Wo(e);for(;t!==null&&!(t[Ee]&8192||(t[Ee]|=8192,!Ng(t)));)t=Wo(t)}function Xb(e,t){if(Jc(e))throw new Me(911,!1);e[io]===null&&(e[io]=[]),e[io].push(t)}function fA(e,t){if(e[io]===null)return;let n=e[io].indexOf(t);n!==-1&&e[io].splice(n,1)}function Wo(e){let t=e[xn];return Li(t)?t[xn]:t}function Jb(e){return e[td]??=[]}function Qb(e){return e.cleanup??=[]}function pA(e,t,n,r){let i=Jb(t);i.push(n),e.firstCreatePass&&Qb(e).push(r,i.length-1)}var xe={lFrame:aC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Cm=!1;function hA(){return xe.lFrame.elementDepthCount}function mA(){xe.lFrame.elementDepthCount++}function gA(){xe.lFrame.elementDepthCount--}function eC(){return xe.bindingsEnabled}function vA(){return xe.skipHydrationRootTNode!==null}function yA(e){return xe.skipHydrationRootTNode===e}function _A(){xe.skipHydrationRootTNode=null}function Ge(){return xe.lFrame.lView}function un(){return xe.lFrame.tView}function ze(e){return xe.lFrame.contextLView=e,e[tn]}function qe(e){return xe.lFrame.contextLView=null,e}function fr(){let e=tC();for(;e!==null&&e.type===64;)e=e.parent;return e}function tC(){return xe.lFrame.currentTNode}function EA(){let e=xe.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function la(e,t){let n=xe.lFrame;n.currentTNode=e,n.isParent=t}function nC(){return xe.lFrame.isParent}function wA(){xe.lFrame.isParent=!1}function bA(){return xe.lFrame.contextLView}function rC(){return Cm}function Bw(e){let t=Cm;return Cm=e,t}function Mg(){let e=xe.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function CA(e){return xe.lFrame.bindingIndex=e}function el(){return xe.lFrame.bindingIndex++}function SA(e){let t=xe.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function DA(){return xe.lFrame.inI18n}function IA(e,t){let n=xe.lFrame;n.bindingIndex=n.bindingRootIndex=e,Sm(t)}function TA(){return xe.lFrame.currentDirectiveIndex}function Sm(e){xe.lFrame.currentDirectiveIndex=e}function xA(e){let t=xe.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function iC(){return xe.lFrame.currentQueryIndex}function Og(e){xe.lFrame.currentQueryIndex=e}function RA(e){let t=e[Te];return t.type===2?t.declTNode:t.type===1?e[Mr]:null}function oC(e,t,n){if(n&Je.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(n&Je.Host))&&(i=RA(s),!(i===null||(s=s[sa],i.type&10))););if(i===null)return!1;t=i,e=s}let r=xe.lFrame=sC();return r.currentTNode=t,r.lView=e,!0}function Pg(e){let t=sC(),n=e[Te];xe.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function sC(){let e=xe.lFrame,t=e===null?null:e.child;return t===null?aC(e):t}function aC(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function cC(){let e=xe.lFrame;return xe.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var lC=cC;function kg(){let e=cC();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function NA(e){return(xe.lFrame.contextLView=dA(e,xe.lFrame.contextLView))[tn]}function co(){return xe.lFrame.selectedIndex}function Go(e){xe.lFrame.selectedIndex=e}function Lg(){let e=xe.lFrame;return xg(e.tView,e.selectedIndex)}function Gn(){xe.lFrame.currentNamespace=Yb}function Fi(){AA()}function AA(){xe.lFrame.currentNamespace=null}function MA(){return xe.lFrame.currentNamespace}var uC=!0;function Fg(){return uC}function Bg(e){uC=e}function OA(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(r){let o=Gb(t);(n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o)}i&&(n.preOrderHooks??=[]).push(0-e,i),s&&((n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s))}function dC(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-n,s),o&&((e.contentHooks??=[]).push(n,o),(e.contentCheckHooks??=[]).push(n,o)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),c!=null&&(e.destroyHooks??=[]).push(n,c)}}function zu(e,t,n){fC(e,t,3,n)}function qu(e,t,n,r){(e[Ee]&3)===n&&fC(e,t,n,r)}function im(e,t){let n=e[Ee];(n&3)===t&&(n&=16383,n+=1,e[Ee]=n)}function fC(e,t,n,r){let i=r!==void 0?e[Ks]&65535:0,s=r??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[Ks]+=65536),(a<s||s==-1)&&(PA(e,n,t,l),e[Ks]=(e[Ks]&4294901760)+l+2),l++}function Vw(e,t){vt(4,e,t);let n=$e(null);try{t.call(e)}finally{$e(n),vt(5,e,t)}}function PA(e,t,n,r){let i=n[r]<0,s=n[r+1],o=i?-n[r]:n[r],a=e[o];i?e[Ee]>>14<e[Ks]>>16&&(e[Ee]&3)===t&&(e[Ee]+=16384,Vw(a,s)):Vw(a,s)}var ea=-1,zo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function kA(e){return e instanceof zo}function LA(e){return(e.flags&8)!==0}function FA(e){return(e.flags&16)!==0}function BA(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let s=n[r++],o=n[r++],a=n[r++];e.setAttribute(t,o,a,s)}else{let s=i,o=n[++r];UA(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),r++}}return r}function VA(e){return e===3||e===4||e===6}function UA(e){return e.charCodeAt(0)===64}function $c(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?Uw(e,n,i,null,t[++r]):Uw(e,n,i,null,null))}}return e}function Uw(e,t,n,r,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[s+1]=i);return}else if(r===e[s+1]){e[s+2]=i;return}}s++,r!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,n),r!==null&&e.splice(s++,0,r),i!==null&&e.splice(s++,0,i)}var om={},Dm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=wd(n);let r=this.injector.get(e,om,n);return r!==om||t===om?r:this.parentInjector.get(e,t,n)}};function pC(e){return e!==ea}function od(e){return e&32767}function HA(e){return e>>16}function sd(e,t){let n=HA(e),r=t;for(;n>0;)r=r[sa],n--;return r}var Im=!0;function ad(e){let t=Im;return Im=e,t}var jA=256,hC=jA-1,mC=5,$A=0,zr={};function WA(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(kc)&&(r=n[kc]),r==null&&(r=n[kc]=$A++);let i=r&hC,s=1<<i;t.data[e+(i>>mC)]|=s}function cd(e,t){let n=gC(e,t);if(n!==-1)return n;let r=t[Te];r.firstCreatePass&&(e.injectorIndex=t.length,sm(r.data,e),sm(t,null),sm(r.blueprint,null));let i=Vg(e,t),s=e.injectorIndex;if(pC(i)){let o=od(i),a=sd(i,t),l=a[Te].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function sm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function gC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Vg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=wC(i),r===null)return ea;if(n++,i=i[sa],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return ea}function Tm(e,t,n){WA(e,t,n)}function vC(e,t,n){if(n&Je.Optional||e!==void 0)return e;Cg(t,"NodeInjector")}function yC(e,t,n,r){if(n&Je.Optional&&r===void 0&&(r=null),(n&(Je.Self|Je.Host))===0){let i=e[Hc],s=$n(void 0);try{return i?i.get(t,r,n&Je.Optional):Ib(t,r,n&Je.Optional)}finally{$n(s)}}return vC(r,t,n)}function _C(e,t,n,r=Je.Default,i){if(e!==null){if(t[Ee]&2048&&!(r&Je.Self)){let o=YA(e,t,n,r,zr);if(o!==zr)return o}let s=EC(e,t,n,r,zr);if(s!==zr)return s}return yC(t,n,r,i)}function EC(e,t,n,r,i){let s=zA(n);if(typeof s=="function"){if(!oC(t,e,r))return r&Je.Host?vC(i,n,r):yC(t,n,r,i);try{let o;if(o=s(r),o==null&&!(r&Je.Optional))Cg(n);else return o}finally{lC()}}else if(typeof s=="number"){let o=null,a=gC(e,t),l=ea,c=r&Je.Host?t[Nr][Mr]:null;for((a===-1||r&Je.SkipSelf)&&(l=a===-1?Vg(e,t):t[a+8],l===ea||!jw(r,!1)?a=-1:(o=t[Te],a=od(l),t=sd(l,t)));a!==-1;){let h=t[Te];if(Hw(s,a,h.data)){let d=GA(a,t,n,o,r,c);if(d!==zr)return d}l=t[a+8],l!==ea&&jw(r,t[Te].data[a+8]===c)&&Hw(s,a,t)?(o=h,a=od(l),t=sd(l,t)):a=-1}}return i}function GA(e,t,n,r,i,s){let o=t[Te],a=o.data[e+8],l=r==null?aa(a)&&Im:r!=o&&(a.type&3)!==0,c=i&Je.Host&&s===a,h=Yu(a,o,n,l,c);return h!==null?Wc(t,o,h,a):zr}function Yu(e,t,n,r,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=r?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=o[l];if(g&&qr(g)&&g.type===n)return l}return null}function Wc(e,t,n,r){let i=e[n],s=t.data;if(kA(i)){let o=i;o.resolving&&NN(RN(s[n]));let a=ad(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?$n(o.injectImpl):null,h=oC(e,r,Je.Default);try{i=e[n]=o.factory(void 0,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&OA(n,s[n],t)}finally{c!==null&&$n(c),ad(a),o.resolving=!1,lC()}}return i}function zA(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(kc)?e[kc]:void 0;return typeof t=="number"?t>=0?t&hC:qA:t}function Hw(e,t,n){let r=1<<e;return!!(n[t+(e>>mC)]&r)}function jw(e,t){return!(e&Je.Self)&&!(e&Je.Host&&t)}var Bo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return _C(this._tNode,this._lView,e,wd(n),t)}};function qA(){return new Bo(fr(),Ge())}function Id(e){return Ed(()=>{let t=e.prototype.constructor,n=t[Xu]||xm(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let s=i[Xu]||xm(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function xm(e){return wb(e)?()=>{let t=xm(Pn(e));return t&&t()}:Vo(e)}function YA(e,t,n,r,i){let s=e,o=t;for(;s!==null&&o!==null&&o[Ee]&2048&&!id(o);){let a=EC(s,o,n,r|Je.Self,zr);if(a!==zr)return a;let l=s.parent;if(!l){let c=o[Hb];if(c){let h=c.get(n,zr,r);if(h!==zr)return h}l=wC(o),o=o[sa]}s=l}return i}function wC(e){let t=e[Te],n=t.type;return n===2?t.declTNode:n===1?e[Mr]:null}function $w(e,t=null,n=null,r){let i=KA(e,t,n,r);return i.resolveInjectorInitializers(),i}function KA(e,t=null,n=null,r,i=new Set){let s=[n||so,qN(e)];return r=r||(typeof e=="object"?void 0:ur(e)),new Vc(s,t||Cd(),r||null,i)}var yt=class xS{static THROW_IF_NOT_FOUND=Fc;static NULL=new ed;static create(t,n){if(Array.isArray(t))return $w({name:""},n,t,"");{let r=t.name??"";return $w({name:r},t.parent,t.providers,r)}}static \u0275prov=oe({token:xS,providedIn:"any",factory:()=>et(Rb)});static __NG_ELEMENT_ID__=-1},ZA=new he("");ZA.__NG_ELEMENT_ID__=e=>{let t=fr();if(t===null)throw new Me(204,!1);if(t.type&2)return t.value;if(e&Je.Optional)return null;throw new Me(204,!1)};var bC=!1,Ug=(()=>{class e{static __NG_ELEMENT_ID__=XA;static __NG_ENV_ID__=n=>n}return e})(),Rm=class extends Ug{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return Xb(this._lView,e),()=>fA(this._lView,e)}};function XA(){return new Rm(Ge())}var Ni=class{},Td=new he("",{providedIn:"root",factory:()=>!1}),CC=new he(""),Hg=new he(""),xd=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Ir(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),Nm=class extends ie{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Vb()&&(this.destroyRef=O(Ug,{optional:!0})??void 0,this.pendingTasks=O(xd,{optional:!0})??void 0)}emit(e){let t=$e(null);try{super.next(e)}finally{$e(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),s=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:r,error:i,complete:s});return e instanceof mt&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},We=Nm;function ld(...e){}function SC(e){let t,n;function r(){e=ld;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Ww(e){return queueMicrotask(()=>e()),()=>{e=ld}}var jg="isAngularZone",ud=jg+"_ID",JA=0,Be=class Ah{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new We(!1);onMicrotaskEmpty=new We(!1);onStable=new We(!1);onError=new We(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=bC}=t;if(typeof Zone>"u")throw new Me(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&r,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,tM(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(jg)===!0}static assertInAngularZone(){if(!Ah.isInAngularZone())throw new Me(909,!1)}static assertNotInAngularZone(){if(Ah.isInAngularZone())throw new Me(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,QA,ld,ld);try{return s.runTask(o,n,r)}finally{s.cancelTask(o)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},QA={};function $g(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function eM(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){SC(()=>{e.callbackScheduled=!1,Am(e),e.isCheckStableRunning=!0,$g(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Am(e)}function tM(e){let t=()=>{eM(e)},n=JA++;e._inner=e._inner.fork({name:"angular",properties:{[jg]:!0,[ud]:n,[ud+n]:!0},onInvokeTask:(r,i,s,o,a,l)=>{if(nM(l))return r.invokeTask(s,o,a,l);try{return Gw(e),r.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),zw(e)}},onInvoke:(r,i,s,o,a,l,c)=>{try{return Gw(e),r.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!rM(l)&&t(),zw(e)}},onHasTask:(r,i,s,o)=>{r.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Am(e),$g(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,i,s,o)=>(r.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Am(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Gw(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function zw(e){e._nesting--,$g(e)}var dd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new We;onMicrotaskEmpty=new We;onStable=new We;onError=new We;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function nM(e){return DC(e,"__ignore_ng_zone__")}function rM(e){return DC(e,"__scheduler_tick__")}function DC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Ai=class{_console=console;handleError(e){this._console.error("ERROR",e)}},iM=new he("",{providedIn:"root",factory:()=>{let e=O(Be),t=O(Ai);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function oM(){return ua(fr(),Ge())}function ua(e,t){return new Nt(Jr(e,t))}var Nt=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=oM}return e})();function sM(e){return e instanceof Nt?e.nativeElement:e}function Bi(e,t){let n=QE(e),r=n[Ii];return t?.equal&&(r.equal=t.equal),n.set=i=>jh(r,i),n.update=i=>ew(r,i),n.asReadonly=aM.bind(n),n}function aM(){let e=this[Ii];if(e.readonlyFn===void 0){let t=()=>this();t[Ii]=e,e.readonlyFn=t}return e.readonlyFn}function cM(){return this._results[Symbol.iterator]()}var Mm=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new ie}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=jN(e);(this._changesDetected=!HN(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=cM};function IC(e){return(e.flags&128)===128}var TC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(TC||{}),xC=new Map,lM=0;function uM(){return lM++}function dM(e){xC.set(e[Sd],e)}function Om(e){xC.delete(e[Sd])}var qw="__ngContext__";function tl(e,t){oo(t)?(e[qw]=t[Sd],dM(t)):e[qw]=t}function RC(e){return AC(e[jc])}function NC(e){return AC(e[Rr])}function AC(e){for(;e!==null&&!Li(e);)e=e[Rr];return e}var Pm;function MC(e){Pm=e}function OC(){if(Pm!==void 0)return Pm;if(typeof document<"u")return document;throw new Me(210,!1)}var nl=new he("",{providedIn:"root",factory:()=>fM}),fM="ng",Wg=new he(""),Ko=new he("",{providedIn:"platform",factory:()=>"unknown"}),PC=new he(""),Gg=new he("",{providedIn:"root",factory:()=>OC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),pM="h",hM="b",kC=!1,mM=new he("",{providedIn:"root",factory:()=>kC}),zg=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(zg||{}),da=new he(""),Yw=new Set;function lo(e){Yw.has(e)||(Yw.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var LC=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=gM}return e})();function gM(){return new LC(Ge(),fr())}var Zs=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Zs||{}),FC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),vM=[Zs.EarlyRead,Zs.Write,Zs.MixedReadWrite,Zs.Read],yM=(()=>{class e{ngZone=O(Be);scheduler=O(Ni);errorHandler=O(Ai,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(da,{optional:!0})}execute(){let n=this.sequences.size>0;n&&vt(16),this.executing=!0;for(let r of vM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[r];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&vt(17)}register(n){let{view:r}=n;r!==void 0?((r[Qs]??=[]).push(n),Qc(r),r[Ee]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(zg.AFTER_NEXT_RENDER,n):n()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),km=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,s=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[Qs];e&&(this.view[Qs]=e.filter(t=>t!==this))}};function qg(e,t){!t?.injector&&Ub(qg);let n=t?.injector??O(yt);return lo("NgAfterRender"),BC(e,n,t,!1)}function Qr(e,t){!t?.injector&&Ub(Qr);let n=t?.injector??O(yt);return lo("NgAfterNextRender"),BC(e,n,t,!0)}function _M(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function BC(e,t,n,r){let i=t.get(FC);i.impl??=t.get(yM);let s=t.get(da,null,{optional:!0}),o=n?.phase??Zs.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(Ug):null,l=t.get(LC,null,{optional:!0}),c=new km(i.impl,_M(e,o),l?.view,r,a,s?.snapshot(null));return i.impl.register(c),c}var EM=()=>null;function VC(e,t,n=!1){return EM(e,t,n)}function UC(e,t){let n=e.contentQueries;if(n!==null){let r=$e(null);try{for(let i=0;i<n.length;i+=2){let s=n[i],o=n[i+1];if(o!==-1){let a=e.data[o];Og(s),a.contentQueries(2,t[o],o)}}}finally{$e(r)}}}function Lm(e,t,n){Og(0);let r=$e(null);try{t(e,n)}finally{$e(r)}}function HC(e,t,n){if($b(t)){let r=$e(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=n[o];a.contentQueries(1,l,o)}}}finally{$e(r)}}}var Zr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Zr||{}),Hu;function wM(){if(Hu===void 0&&(Hu=null,Lc.trustedTypes))try{Hu=Lc.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Hu}function Rd(e){return wM()?.createHTML(e)||e}var ju;function bM(){if(ju===void 0&&(ju=null,Lc.trustedTypes))try{ju=Lc.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return ju}function Kw(e){return bM()?.createHTML(e)||e}var Mi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${_b})`}},Fm=class extends Mi{getTypeName(){return"HTML"}},Bm=class extends Mi{getTypeName(){return"Style"}},Vm=class extends Mi{getTypeName(){return"Script"}},Um=class extends Mi{getTypeName(){return"URL"}},Hm=class extends Mi{getTypeName(){return"ResourceURL"}};function ei(e){return e instanceof Mi?e.changingThisBreaksApplicationSecurity:e}function uo(e,t){let n=CM(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${_b})`)}return n===t}function CM(e){return e instanceof Mi&&e.getTypeName()||null}function jC(e){return new Fm(e)}function $C(e){return new Bm(e)}function WC(e){return new Vm(e)}function GC(e){return new Um(e)}function zC(e){return new Hm(e)}function SM(e){let t=new $m(e);return DM()?new jm(t):t}var jm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(Rd(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},$m=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=Rd(e),t}};function DM(){try{return!!new window.DOMParser().parseFromString(Rd(""),"text/html")}catch{return!1}}var IM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Nd(e){return e=String(e),e.match(IM)?e:"unsafe:"+e}function Vi(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function rl(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var qC=Vi("area,br,col,hr,img,wbr"),YC=Vi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),KC=Vi("rp,rt"),TM=rl(KC,YC),xM=rl(YC,Vi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),RM=rl(KC,Vi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Zw=rl(qC,xM,RM,TM),ZC=Vi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),NM=Vi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),AM=Vi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),MM=rl(ZC,NM,AM),OM=Vi("script,style,template"),Wm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=LM(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=kM(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=Xw(e).toLowerCase();if(!Zw.hasOwnProperty(t))return this.sanitizedSomething=!0,!OM.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),s=i.name,o=s.toLowerCase();if(!MM.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;ZC[o]&&(a=Nd(a)),this.buf.push(" ",s,'="',Jw(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=Xw(e).toLowerCase();Zw.hasOwnProperty(t)&&!qC.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(Jw(e))}};function PM(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function kM(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw XC(t);return t}function LM(e){let t=e.firstChild;if(t&&PM(e,t))throw XC(t);return t}function Xw(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function XC(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var FM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,BM=/([^\#-~ |!])/g;function Jw(e){return e.replace(/&/g,"&").replace(FM,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(BM,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var $u;function Yg(e,t){let n=null;try{$u=$u||SM(e);let r=t?String(t):"";n=$u.getInertBodyElement(r);let i=5,s=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=s,s=n.innerHTML,n=$u.getInertBodyElement(r)}while(r!==s);let o=new Wm().sanitizeChildren(Qw(n)||n);return Rd(o)}finally{if(n){let r=Qw(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function Qw(e){return"content"in e&&VM(e)?e.content:null}function VM(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ti=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ti||{});function il(e){let t=JC();return t?Kw(t.sanitize(ti.HTML,e)||""):uo(e,"HTML")?Kw(ei(e)):Yg(OC(),Zc(e))}function Gt(e){let t=JC();return t?t.sanitize(ti.URL,e)||"":uo(e,"URL")?ei(e):Nd(Zc(e))}function JC(){let e=Ge();return e&&e[xi].sanitizer}function QC(e){return e.ownerDocument.defaultView}function UM(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===r||e.charCodeAt(i+s)<=32)return i}n=i+1}}var e0="ng-template";function HM(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&UM(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(Kg(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===n)return!0}return!1}function Kg(e){return e.type===4&&e.value!==e0}function jM(e,t,n){let r=e.type===4&&!n?e0:e.value;return t===r}function $M(e,t,n){let r=4,i=e.attrs,s=i!==null?zM(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!xr(r)&&!xr(l))return!1;if(o&&xr(l))continue;o=!1,r=l|r&1;continue}if(!o)if(r&4){if(r=2|r&1,l!==""&&!jM(e,l,n)||l===""&&t.length===1){if(xr(r))return!1;o=!0}}else if(r&8){if(i===null||!HM(e,i,l,n)){if(xr(r))return!1;o=!0}}else{let c=t[++a],h=WM(l,i,Kg(e),n);if(h===-1){if(xr(r))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),r&2&&c!==d){if(xr(r))return!1;o=!0}}}}return xr(r)||o}function xr(e){return(e&1)===0}function WM(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return qM(t,e)}function GM(e,t,n=!1){for(let r=0;r<t.length;r++)if($M(e,t[r],n))return!0;return!1}function zM(e){for(let t=0;t<e.length;t++){let n=e[t];if(VA(n))return t}return e.length}function qM(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function eb(e,t){return e?":not("+t.trim()+")":t}function YM(e){let t=e[0],n=1,r=2,i="",s=!1;for(;n<e.length;){let o=e[n];if(typeof o=="string")if(r&2){let a=e[++n];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+o:r&4&&(i+=" "+o);else i!==""&&!xr(o)&&(t+=eb(s,i),i=""),r=o,s=s||!xr(r);n++}return i!==""&&(t+=eb(s,i)),t}function KM(e){return e.map(YM).join(",")}function ZM(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let s=e[r];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++r]):i===8&&n.push(s);else{if(!xr(i))break;i=s}r++}return n.length&&t.push(1,...n),t}var Ui={};function XM(e,t){return e.createText(t)}function JM(e,t,n){e.setValue(t,n)}function t0(e,t,n){return e.createElement(t,n)}function fd(e,t,n,r,i){e.insertBefore(t,n,r,i)}function n0(e,t,n){e.appendChild(t,n)}function tb(e,t,n,r,i){r!==null?fd(e,t,n,r,i):n0(e,t,n)}function QM(e,t,n){e.removeChild(null,t,n)}function eO(e,t,n){e.setAttribute(t,"style",n)}function tO(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function r0(e,t,n){let{mergedAttrs:r,classes:i,styles:s}=n;r!==null&&BA(e,t,r),i!==null&&tO(e,t,i),s!==null&&eO(e,t,s)}function Zg(e,t,n,r,i,s,o,a,l,c,h){let d=wn+r,f=d+i,g=nO(d,f),m=typeof c=="function"?c():c;return g[Te]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function nO(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Ui);return n}function rO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Zg(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function Xg(e,t,n,r,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[ki]=i,d[Ee]=r|4|128|8|64|1024,(c!==null||e&&e[Ee]&2048)&&(d[Ee]|=2048),Zb(d),d[xn]=d[sa]=e,d[tn]=n,d[xi]=o||e&&e[xi],d[cn]=a||e&&e[cn],d[Hc]=l||e&&e[Hc]||null,d[Mr]=s,d[Sd]=uM(),d[Uc]=h,d[Hb]=c,d[Nr]=t.type==2?e[Nr]:d,d}function iO(e,t,n){let r=Jr(t,e),i=rO(n),s=e[xi].rendererFactory,o=Jg(e,Xg(e,i,null,i0(n),r,t,null,s.createRenderer(r,n),null,null,null));return e[t.index]=o}function i0(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function o0(e,t,n,r){if(n===0)return-1;let i=t.length;for(let s=0;s<n;s++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function Jg(e,t){return e[jc]?e[Lw][Rr]=t:e[jc]=t,e[Lw]=t,t}function q(e=1){s0(un(),Ge(),co()+e,!1)}function s0(e,t,n,r){if(!r)if((t[Ee]&3)===3){let i=e.preOrderCheckHooks;i!==null&&zu(t,i,n)}else{let i=e.preOrderHooks;i!==null&&qu(t,i,0,n)}Go(n)}var Ad=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Ad||{});function Gm(e,t,n,r){let i=$e(null);try{let[s,o,a]=e.inputs[n],l=null;(o&Ad.SignalBased)!==0&&(l=t[s][Ii]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,l,r,n,s):Wb(t,l,s,r)}finally{$e(i)}}function a0(e,t,n,r,i){let s=co(),o=r&2;try{Go(-1),o&&t.length>wn&&s0(e,t,wn,!1),vt(o?2:0,i),n(r,i)}finally{Go(s),vt(o?3:1,i)}}function Qg(e,t,n){uO(e,t,n),(n.flags&64)===64&&dO(e,t,n)}function c0(e,t,n=Jr){let r=t.localNames;if(r!==null){let i=t.index+1;for(let s=0;s<r.length;s+=2){let o=r[s+1],a=o===-1?n(t,e):e[o];e[i++]=a}}}function oO(e,t,n,r){let i=r.get(mM,kC)||n===Zr.ShadowDom,s=e.selectRootElement(t,i);return sO(s),s}function sO(e){aO(e)}var aO=()=>null;function cO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function l0(e,t,n,r,i,s,o,a){if(!a&&ev(t,e,n,r,i)){aa(t)&&lO(n,t.index);return}if(t.type&3){let l=Jr(t,n);r=cO(r),i=o!=null?o(i,t.value||"",r):i,s.setProperty(l,r,i)}else t.type&12}function lO(e,t){let n=Kr(t,e);n[Ee]&16||(n[Ee]|=64)}function uO(e,t,n){let r=n.directiveStart,i=n.directiveEnd;aa(n)&&iO(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||cd(n,t);let s=n.initialInputs;for(let o=r;o<i;o++){let a=e.data[o],l=Wc(t,e,o,n);if(tl(l,t),s!==null&&mO(t,o-r,l,a,n,s),qr(a)){let c=Kr(n.index,t);c[tn]=Wc(t,e,o,n)}}}function dO(e,t,n){let r=n.directiveStart,i=n.directiveEnd,s=n.index,o=TA();try{Go(s);for(let a=r;a<i;a++){let l=e.data[a],c=t[a];Sm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&fO(l,c)}}finally{Go(-1),Sm(o)}}function fO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function u0(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let s=n[i];GM(t,s.selectors,!1)&&(r??=[],qr(s)?r.unshift(s):r.push(s))}return r}function pO(e,t,n,r,i,s){let o=Jr(e,t);hO(t[cn],o,s,e.value,n,r,i)}function hO(e,t,n,r,i,s,o){if(s==null)e.removeAttribute(t,i,n);else{let a=o==null?Zc(s):o(s,r||"",i);e.setAttribute(t,i,a,n)}}function mO(e,t,n,r,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];Gm(r,n,l,c)}}function d0(e,t){let n=e[Hc],r=n?n.get(Ai,null):null;r&&r.handleError(t)}function ev(e,t,n,r,i){let s=e.inputs?.[r],o=e.hostDirectiveInputs?.[r],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];Gm(d,n[c],h,i),a=!0}if(s)for(let l of s){let c=n[l],h=t.data[l];Gm(h,c,r,i),a=!0}return a}function gO(e,t){let n=Kr(t,e),r=n[Te];vO(r,n);let i=n[ki];i!==null&&n[Uc]===null&&(n[Uc]=VC(i,n[Hc])),vt(18),tv(r,n,n[tn]),vt(19,n[tn])}function vO(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function tv(e,t,n){Pg(t);try{let r=e.viewQuery;r!==null&&Lm(1,r,n);let i=e.template;i!==null&&a0(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ri]?.finishViewCreation(e),e.staticContentQueries&&UC(e,t),e.staticViewQueries&&Lm(2,e.viewQuery,n);let s=e.components;s!==null&&yO(t,s)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[Ee]&=-5,kg()}}function yO(e,t){for(let n=0;n<t.length;n++)gO(e,t[n])}function Md(e,t,n,r){let i=$e(null);try{let s=t.tView,o=e[Ee]&4096?4096:16,a=Xg(e,s,n,o,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[jo]=l;let c=e[Ri];return c!==null&&(a[Ri]=c.createEmbeddedView(s)),tv(s,a,n),a}finally{$e(i)}}function Gc(e,t){return!t||t.firstChild===null||IC(e)}var _O;function nv(e,t){return _O(e,t)}var Xr=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Xr||{});function f0(e){return(e.flags&32)===32}function Xs(e,t,n,r,i){if(r!=null){let s,o=!1;Li(r)?s=r:oo(r)&&(o=!0,r=r[ki]);let a=Yr(r);e===0&&n!==null?i==null?n0(t,n,a):fd(t,n,a,i||null,!0):e===1&&n!==null?fd(t,n,a,i||null,!0):e===2?QM(t,a,o):e===3&&t.destroyNode(a),s!=null&&AO(t,e,s,n,i)}}function EO(e,t){p0(e,t),t[ki]=null,t[Mr]=null}function wO(e,t,n,r,i,s){r[ki]=i,r[Mr]=t,Pd(e,r,n,1,i,s)}function p0(e,t){t[xi].changeDetectionScheduler?.notify(9),Pd(e,t,t[cn],2,null,null)}function bO(e){let t=e[jc];if(!t)return am(e[Te],e);for(;t;){let n=null;if(oo(t))n=t[jc];else{let r=t[Tn];r&&(n=r)}if(!n){for(;t&&!t[Rr]&&t!==e;)oo(t)&&am(t[Te],t),t=t[xn];t===null&&(t=e),oo(t)&&am(t[Te],t),n=t&&t[Rr]}t=n}}function rv(e,t){let n=e[na],r=n.indexOf(t);n.splice(r,1)}function Od(e,t){if(Jc(t))return;let n=t[cn];n.destroyNode&&Pd(e,t,n,3,null,null),bO(t)}function am(e,t){if(Jc(t))return;let n=$e(null);try{t[Ee]&=-129,t[Ee]|=256,t[Xn]&&Hh(t[Xn]),SO(e,t),CO(e,t),t[Te].type===1&&t[cn].destroy();let r=t[jo];if(r!==null&&Li(t[xn])){r!==t[xn]&&rv(r,t);let i=t[Ri];i!==null&&i.detachView(e)}Om(t)}finally{$e(n)}}function CO(e,t){let n=e.cleanup,r=t[td];if(n!==null)for(let o=0;o<n.length-1;o+=2)if(typeof n[o]=="string"){let a=n[o+3];a>=0?r[a]():r[-a].unsubscribe(),o+=2}else{let a=r[n[o+1]];n[o].call(a)}r!==null&&(t[td]=null);let i=t[io];if(i!==null){t[io]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[nd];if(s!==null){t[nd]=null;for(let o of s)o.destroy()}}function SO(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=t[n[r]];if(!(i instanceof zo)){let s=n[r+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];vt(4,a,l);try{l.call(a)}finally{vt(5,a,l)}}else{vt(4,i,s);try{s.call(i)}finally{vt(5,i,s)}}}}}function DO(e,t,n){return IO(e,t.parent,n)}function IO(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[ki];if(aa(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Zr.None||i===Zr.Emulated)return null}return Jr(r,n)}function TO(e,t,n){return RO(e,t,n)}function xO(e,t,n){return e.type&40?Jr(e,n):null}var RO=xO,nb;function iv(e,t,n,r){let i=DO(e,r,t),s=t[cn],o=r.parent||t[Mr],a=TO(o,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)tb(s,i,n[l],a,!1);else tb(s,i,n,a,!1);nb!==void 0&&nb(s,r,t,n,i)}function Pc(e,t){if(t!==null){let n=t.type;if(n&3)return Jr(t,e);if(n&4)return zm(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Pc(e,r);{let i=e[t.index];return Li(i)?zm(-1,i):Yr(i)}}else{if(n&128)return Pc(e,t.next);if(n&32)return nv(t,e)()||Yr(e[t.index]);{let r=h0(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Wo(e[Nr]);return Pc(i,r)}else return Pc(e,t.next)}}}return null}function h0(e,t){if(t!==null){let n=e[Nr][Mr],r=t.projection;return n.projection[r]}return null}function zm(e,t){let n=Tn+e+1;if(n<t.length){let r=t[n],i=r[Te].firstChild;if(i!==null)return Pc(r,i)}return t[$o]}function ov(e,t,n,r,i,s,o){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(o&&t===0&&(a&&tl(Yr(a),r),n.flags|=2),!f0(n))if(l&8)ov(e,t,n.child,r,i,s,!1),Xs(t,e,i,a,s);else if(l&32){let c=nv(n,r),h;for(;h=c();)Xs(t,e,i,h,s);Xs(t,e,i,a,s)}else l&16?NO(e,t,r,n,i,s):Xs(t,e,i,a,s);n=o?n.projectionNext:n.next}}function Pd(e,t,n,r,i,s){ov(n,r,e.firstChild,t,i,s,!1)}function NO(e,t,n,r,i,s){let o=n[Nr],a=o[Mr].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];Xs(t,e,i,c,s)}else{let l=a,c=o[xn];IC(r)&&(l.flags|=128),ov(e,t,l,c,i,s,!0)}}function AO(e,t,n,r,i){let s=n[$o],o=Yr(n);s!==o&&Xs(t,e,r,s,i);for(let a=Tn;a<n.length;a++){let l=n[a];Pd(l[Te],l,e,t,r,s)}}function MO(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let s=r.indexOf("-")===-1?void 0:Xr.DashCase;i==null?e.removeStyle(n,r,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Xr.Important),e.setStyle(n,r,i,s))}}function pd(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let s=t[n.index];s!==null&&r.push(Yr(s)),Li(s)&&OO(s,r);let o=n.type;if(o&8)pd(e,t,n.child,r);else if(o&32){let a=nv(n,t),l;for(;l=a();)r.push(l)}else if(o&16){let a=h0(t,n);if(Array.isArray(a))r.push(...a);else{let l=Wo(t[Nr]);pd(l[Te],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function OO(e,t){for(let n=Tn;n<e.length;n++){let r=e[n],i=r[Te].firstChild;i!==null&&pd(r[Te],r,i,t)}e[$o]!==e[ki]&&t.push(e[$o])}function m0(e){if(e[Qs]!==null){for(let t of e[Qs])t.impl.addSequence(t);e[Qs].length=0}}var g0=[];function PO(e){return e[Xn]??kO(e)}function kO(e){let t=g0.pop()??Object.create(FO);return t.lView=e,t}function LO(e){e.lView[Xn]!==e&&(e.lView=null,g0.push(e))}var FO=re(w({},uu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{Qc(e.lView)},consumerOnSignalRead(){this.lView[Xn]=this}});function BO(e){let t=e[Xn]??Object.create(VO);return t.lView=e,t}var VO=re(w({},uu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Wo(e.lView);for(;t&&!v0(t[Te]);)t=Wo(t);t&&Ag(t)},consumerOnSignalRead(){this.lView[Xn]=this}});function v0(e){return e.type!==2}function y0(e){if(e[nd]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[nd])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[Ee]&8192)}}var UO=100;function _0(e,t=!0,n=0){let r=e[xi].rendererFactory,i=!1;i||r.begin?.();try{HO(e,n)}catch(s){throw t&&d0(e,s),s}finally{i||r.end?.()}}function HO(e,t){let n=rC();try{Bw(!0),qm(e,t);let r=0;for(;Dd(e);){if(r===UO)throw new Me(103,!1);r++,qm(e,1)}}finally{Bw(n)}}function jO(e,t,n,r){if(Jc(t))return;let i=t[Ee],s=!1,o=!1;Pg(t);let a=!0,l=null,c=null;s||(v0(e)?(c=PO(t),l=Vh(c)):jE()===null?(a=!1,c=BO(t),l=Vh(c)):t[Xn]&&(Hh(t[Xn]),t[Xn]=null));try{Zb(t),CA(e.bindingStartIndex),n!==null&&a0(e,t,n,2,r);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&zu(t,g,null)}else{let g=e.preOrderHooks;g!==null&&qu(t,g,0,null),im(t,0)}if(o||$O(t),y0(t),E0(t,0),e.contentQueries!==null&&UC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&zu(t,g)}else{let g=e.contentHooks;g!==null&&qu(t,g,1),im(t,1)}GO(e,t);let d=e.components;d!==null&&b0(t,d,0);let f=e.viewQuery;if(f!==null&&Lm(2,f,r),!s)if(h){let g=e.viewCheckHooks;g!==null&&zu(t,g)}else{let g=e.viewHooks;g!==null&&qu(t,g,2),im(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[rm]){for(let g of t[rm])g();t[rm]=null}s||(m0(t),t[Ee]&=-73)}catch(h){throw s||Qc(t),h}finally{c!==null&&(zE(c,l),a&&LO(c)),kg()}}function E0(e,t){for(let n=RC(e);n!==null;n=NC(n))for(let r=Tn;r<n.length;r++){let i=n[r];w0(i,t)}}function $O(e){for(let t=RC(e);t!==null;t=NC(t)){if(!(t[Ee]&2))continue;let n=t[na];for(let r=0;r<n.length;r++){let i=n[r];Ag(i)}}}function WO(e,t,n){vt(18);let r=Kr(t,e);w0(r,n),vt(19,r[tn])}function w0(e,t){Ng(e)&&qm(e,t)}function qm(e,t){let n=e[Te],r=e[Ee],i=e[Xn],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(i?.dirty&&Uh(i)),s||=!1,i&&(i.dirty=!1),e[Ee]&=-9217,s)jO(n,e,n.template,e[tn]);else if(r&8192){y0(e),E0(e,1);let o=n.components;o!==null&&b0(e,o,1),m0(e)}}function b0(e,t,n){for(let r=0;r<t.length;r++)WO(e,t[r],n)}function GO(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)Go(~i);else{let s=i,o=n[++r],a=n[++r];IA(o,s);let l=t[s];vt(24,l),a(2,l),vt(25,l)}}}finally{Go(-1)}}function sv(e,t){let n=rC()?64:1088;for(e[xi].changeDetectionScheduler?.notify(t);e;){e[Ee]|=n;let r=Wo(e);if(id(e)&&!r)return e;e=r}return null}function C0(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function S0(e,t){let n=Tn+t;if(n<e.length)return e[n]}function kd(e,t,n,r=!0){let i=t[Te];if(zO(i,t,e,n),r){let o=zm(n,e),a=t[cn],l=a.parentNode(e[$o]);l!==null&&wO(i,e[Mr],a,t,l,o)}let s=t[Uc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function D0(e,t){let n=zc(e,t);return n!==void 0&&Od(n[Te],n),n}function zc(e,t){if(e.length<=Tn)return;let n=Tn+t,r=e[n];if(r){let i=r[jo];i!==null&&i!==e&&rv(i,r),t>0&&(e[n-1][Rr]=r[Rr]);let s=Qu(e,Tn+t);EO(r[Te],r);let o=s[Ri];o!==null&&o.detachView(s[Te]),r[xn]=null,r[Rr]=null,r[Ee]&=-129}return r}function zO(e,t,n,r){let i=Tn+r,s=n.length;r>0&&(n[i-1][Rr]=t),r<s-Tn?(t[Rr]=n[i],xb(n,Tn+r,t)):(n.push(t),t[Rr]=null),t[xn]=n;let o=t[jo];o!==null&&n!==o&&I0(o,t);let a=t[Ri];a!==null&&a.insertView(e),bm(t),t[Ee]|=128}function I0(e,t){let n=e[na],r=t[xn];if(oo(r))e[Ee]|=2;else{let i=r[xn][Nr];t[Nr]!==i&&(e[Ee]|=2)}n===null?e[na]=[t]:n.push(t)}var qo=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[Te];return pd(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[tn]}get dirty(){return!!(this._lView[Ee]&9280)||!!this._lView[Xn]?.dirty}set context(e){this._lView[tn]=e}get destroyed(){return Jc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[xn];if(Li(e)){let t=e[rd],n=t?t.indexOf(this):-1;n>-1&&(zc(e,n),Qu(t,n))}this._attachedToViewContainer=!1}Od(this._lView[Te],this._lView)}onDestroy(e){Xb(this._lView,e)}markForCheck(){sv(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Ag(this._cdRefInjectingView||this._lView)}detach(){this._lView[Ee]&=-129}reattach(){bm(this._lView),this._lView[Ee]|=128}detectChanges(){this._lView[Ee]|=1024,_0(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Me(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=id(this._lView),t=this._lView[jo];t!==null&&!e&&rv(t,this._lView),p0(this._lView[Te],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Me(902,!1);this._appRef=e;let t=id(this._lView),n=this._lView[jo];n!==null&&!t&&I0(n,this._lView),bm(this._lView)}},Ar=(()=>{class e{static __NG_ELEMENT_ID__=KO}return e})(),qO=Ar,YO=class extends qO{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Md(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new qo(r)}};function KO(){return av(fr(),Ge())}function av(e,t){return e.type&4?new YO(t,e,ua(e,t)):null}function Ld(e,t,n,r,i){let s=e.data[t];if(s===null)s=ZO(e,t,n,r,i),DA()&&(s.flags|=32);else if(s.type&64){s.type=n,s.value=r,s.attrs=i;let o=EA();s.injectorIndex=o===null?-1:o.injectorIndex}return la(s,!0),s}function ZO(e,t,n,r,i){let s=tC(),o=nC(),a=o?s:s&&s.parent,l=e.data[t]=JO(e,a,n,t,r,i);return XO(e,l,s,o),l}function XO(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function JO(e,t,n,r,i,s){let o=t?t.injectorIndex:-1,a=0;return vA()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var bW=new RegExp(`^(\\d+)*(${hM}|${pM})*(.*)`),QO=()=>null;function qc(e,t){return QO(e,t)}var Ym=class{},hd=class{},Km=class{resolveComponentFactory(e){throw Error(`No component factory found for ${ur(e)}.`)}},ao=class{static NULL=new Km},ln=class{},Zo=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>eP()}return e})();function eP(){let e=Ge(),t=fr(),n=Kr(t.index,e);return(oo(n)?n:e)[cn]}var tP=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>null})}return e})();function rb(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=Nw(i,a);else if(s==2){let l=a,c=t[++o];r=Nw(r,l+": "+c+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function bt(e,t=Je.Default){let n=Ge();if(n===null)return et(e,t);let r=fr();return _C(r,n,Pn(e),t)}function T0(e,t,n,r,i){let s=r===null?null:{"":-1},o=i(e,n);if(o!==null){let a,l=null,c=null,h=rP(o);h===null?a=o:[a,l,c]=h,sP(e,t,n,a,s,l,c)}s!==null&&r!==null&&nP(n,r,s)}function nP(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=n[t[i+1]];if(s==null)throw new Me(-301,!1);r.push(t[i],s)}}function rP(e){let t=null,n=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&qr(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,s??=new Map,iP(o,r,s,i)),o===t&&(r??=[],r.push(o));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,s]):null}function iP(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function oP(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function sP(e,t,n,r,i,s,o){let a=r.length,l=!1;for(let f=0;f<a;f++){let g=r[f];!l&&qr(g)&&(l=!0,oP(e,n,f)),Tm(cd(n,t),e,g.type)}fP(n,e.data.length,a);for(let f=0;f<a;f++){let g=r[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=o0(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=r[f];if(n.mergedAttrs=$c(n.mergedAttrs,g.hostAttrs),cP(e,n,t,d,g),dP(d,g,i),o!==null&&o.has(g)){let[b,I]=o.get(g);n.directiveToIndex.set(g.type,[d,b+n.directiveStart,I+n.directiveStart])}else(s===null||!s.has(g))&&n.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),h=!0),d++}aP(e,n,s)}function aP(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))ib(0,t,i,r),ib(1,t,i,r),sb(t,r,!1);else{let s=n.get(i);ob(0,t,s,r),ob(1,t,s,r),sb(t,r,!0)}}}function ib(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(r),x0(t,s)}}function ob(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(r,s),x0(t,o)}}function x0(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function sb(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:s}=e;if(r===null||!n&&i===null||n&&s===null||Kg(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<r.length;){let l=r[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!n&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,r[a+1]);break}}else if(n&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function cP(e,t,n,r,i){e.data[r]=i;let s=i.factory||(i.factory=Vo(i.type,!0)),o=new zo(s,qr(i),bt);e.blueprint[r]=o,n[r]=o,lP(e,t,r,o0(e,n,i.hostVars,Ui),i)}function lP(e,t,n,r,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;uP(o)!=a&&o.push(a),o.push(n,r,s)}}function uP(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function dP(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;qr(t)&&(n[""]=e)}}function fP(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function R0(e,t,n,r,i,s,o,a){let l=t.consts,c=ra(l,o),h=Ld(t,e,2,r,c);return s&&T0(t,n,h,ra(l,a),i),h.mergedAttrs=$c(h.mergedAttrs,h.attrs),h.attrs!==null&&rb(h,h.attrs,!1),h.mergedAttrs!==null&&rb(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function N0(e,t){dC(e,t),$b(t)&&e.queries.elementEnd(t)}var Zm=class extends ao{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Ho(e);return new Yc(t,this.ngModule)}};function pP(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],s={propName:n,templateName:t,isSignal:(r&Ad.SignalBased)!==0};return i&&(s.transform=i),s})}function hP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function mP(e,t,n){let r=t instanceof Wn?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Dm(n,r):n}function gP(e){let t=e.get(ln,null);if(t===null)throw new Me(407,!1);let n=e.get(tP,null),r=e.get(Ni,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function vP(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return t0(t,n,n==="svg"?Yb:n==="math"?cA:null)}var Yc=class extends hd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return pP(this.componentDef.inputs)}get outputs(){return hP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=KM(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){vt(22);let i=$e(null);try{let s=this.componentDef,o=n?["ng-version","19.2.0"]:ZM(this.componentDef.selectors[0]),a=Zg(0,null,null,1,0,null,null,null,null,[o],null),l=mP(s,r||this.ngModule,e),c=gP(l),h=c.rendererFactory.createRenderer(null,s),d=n?oO(h,n,s.encapsulation,l):vP(s,h),f=Xg(null,a,null,512|i0(s),null,null,c,h,l,null,VC(d,l,!0));f[wn]=d,Pg(f);let g=null;try{let m=R0(wn,a,f,"#host",()=>[this.componentDef],!0,0);d&&(r0(h,d,m),tl(d,f)),Qg(a,f,m),HC(a,m,f),N0(a,m),t!==void 0&&yP(m,this.ngContentSelectors,t),g=Kr(m.index,f),f[tn]=g[tn],tv(a,f,null)}catch(m){throw g!==null&&Om(g),Om(f),m}finally{vt(23),kg()}return new Xm(this.componentType,f)}finally{$e(i)}}},Xm=class extends Ym{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=xg(t[Te],wn),this.location=ua(this._tNode,t),this.instance=Kr(this._tNode.index,t)[tn],this.hostView=this.changeDetectorRef=new qo(t,void 0,!1),this.componentType=e}setInput(e,t){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,i=ev(n,r[Te],r,e,t);this.previousInputValues.set(e,t);let s=Kr(n.index,r);sv(s,1)}get injector(){return new Bo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function yP(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let s=n[i];r.push(s!=null&&s.length?Array.from(s):null)}}var ni=(()=>{class e{static __NG_ELEMENT_ID__=_P}return e})();function _P(){let e=fr();return M0(e,Ge())}var EP=ni,A0=class extends EP{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return ua(this._hostTNode,this._hostLView)}get injector(){return new Bo(this._hostTNode,this._hostLView)}get parentInjector(){let e=Vg(this._hostTNode,this._hostLView);if(pC(e)){let t=sd(e,this._hostLView),n=od(e),r=t[Te].data[n+8];return new Bo(r,t)}else return new Bo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=ab(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Tn}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let s=qc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,r,Gc(this._hostTNode,s)),o}createComponent(e,t,n,r,i){let s=e&&!iA(e),o;if(s)o=t;else{let g=t||{};o=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new Yc(Ho(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Wn,null);g&&(i=g)}let c=Ho(a.componentType??{}),h=qc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,r,d,i);return this.insertImpl(f.hostView,o,Gc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(uA(r)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=r[xn],l=new A0(a,a[Mr],a[xn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return kd(s,r,i,n),e.attachToViewContainerRef(),xb(cm(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=ab(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);n&&(Qu(cm(this._lContainer),t),Od(n[Te],n))}detach(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);return n&&Qu(cm(this._lContainer),t)!=null?new qo(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function ab(e){return e[rd]}function cm(e){return e[rd]||(e[rd]=[])}function M0(e,t){let n,r=t[e.index];return Li(r)?n=r:(n=C0(r,t,null,e),t[e.index]=n,Jg(t,n)),bP(n,t,e,r),new A0(n,e,t)}function wP(e,t){let n=e[cn],r=n.createComment(""),i=Jr(t,e),s=n.parentNode(i);return fd(n,s,r,n.nextSibling(i),!1),r}var bP=DP,CP=()=>!1;function SP(e,t,n){return CP(e,t,n)}function DP(e,t,n,r){if(e[$o])return;let i;n.type&8?i=Yr(r):i=wP(t,n),e[$o]=i}var Jm=class DS{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new DS(this.queryList)}setDirty(){this.queryList.setDirty()}},Qm=class OS{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let s=0;s<r;s++){let o=n.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new OS(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)cv(t,n).matches!==null&&this.queries[n].setDirty()}},eg=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=OP(e):this.predicate=e}},tg=class kS{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,s=this.getByIndex(r).embeddedTView(t,i);s&&(s.indexInDeclarationView=r,n!==null?n.push(s):n=[s])}return n!==null?new kS(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},ng=class RS{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new RS(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let s=r[i];this.matchTNodeWithReadOption(t,n,IP(n,s)),this.matchTNodeWithReadOption(t,n,Yu(n,t,s,!1,!1))}else r===Ar?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Yu(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Nt||i===ni||i===Ar&&n.type&4)this.addMatch(n.index,-2);else{let s=Yu(n,t,i,!1,!1);s!==null&&this.addMatch(n.index,s)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function IP(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function TP(e,t){return e.type&11?ua(e,t):e.type&4?av(e,t):null}function xP(e,t,n,r){return n===-1?TP(t,e):n===-2?RP(e,t,r):Wc(e,e[Te],n,t)}function RP(e,t,n){if(n===Nt)return ua(t,e);if(n===Ar)return av(t,e);if(n===ni)return M0(t,e)}function O0(e,t,n,r){let i=t[Ri].queries[r];if(i.matches===null){let s=e.data,o=n.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(xP(t,h,o[l+1],n.metadata.read))}}i.matches=a}return i.matches}function rg(e,t,n,r){let i=e.queries.getByIndex(n),s=i.matches;if(s!==null){let o=O0(e,t,i,n);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)r.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=Tn;d<h.length;d++){let f=h[d];f[jo]===f[xn]&&rg(f[Te],f,c,r)}if(h[na]!==null){let d=h[na];for(let f=0;f<d.length;f++){let g=d[f];rg(g[Te],g,c,r)}}}}}return r}function NP(e,t){return e[Ri].queries[t].queryList}function AP(e,t,n){let r=new Mm((n&4)===4);return pA(e,t,r,r.destroy),(t[Ri]??=new Qm).queries.push(new Jm(r))-1}function MP(e,t,n){let r=un();return r.firstCreatePass&&(PP(r,new eg(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),AP(r,Ge(),t)}function OP(e){return e.split(",").map(t=>t.trim())}function PP(e,t,n){e.queries===null&&(e.queries=new tg),e.queries.track(new ng(t,n))}function cv(e,t){return e.queries.getByIndex(t)}function kP(e,t){let n=e[Te],r=cv(n,t);return r.crossesNgTemplate?rg(n,e,t,[]):O0(n,e,r,t)}var Oi=class{},md=class extends Oi{injector;componentFactoryResolver=new Zm(this);instance=null;constructor(e){super();let t=new Vc([...e.providers,{provide:Oi,useValue:this},{provide:ao,useValue:this.componentFactoryResolver}],e.parent||Cd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function LP(e,t,n=null){return new md({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var FP=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=Pb(!1,n.type),i=r.length>0?LP([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=oe({token:e,providedIn:"environment",factory:()=>new e(et(Wn))})}return e})();function at(e){return Ed(()=>{let t=P0(e),n=re(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===TC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(FP).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Zr.Emulated,styles:e.styles||so,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&lo("NgStandalone"),k0(n);let r=e.dependencies;return n.directiveDefs=cb(r,!1),n.pipeDefs=cb(r,!0),n.id=jP(n),n})}function BP(e){return Ho(e)||Ab(e)}function VP(e){return e!==null}function UP(e,t){if(e==null)return Uo;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Ad.None,l=null),n[s]=[r,a,l],t[s]=o}return n}function HP(e){if(e==null)return Uo;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Or(e){return Ed(()=>{let t=P0(e);return k0(t),t})}function Xo(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function P0(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||Uo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||so,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:UP(e.inputs,t),outputs:HP(e.outputs),debugInfo:null}}function k0(e){e.features?.forEach(t=>t(e))}function cb(e,t){if(!e)return null;let n=t?Mb:BP;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(VP)}function jP(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function $P(e){return Object.getPrototypeOf(e.prototype).constructor}function ri(e){let t=$P(e.type),n=!0,r=[e];for(;t;){let i;if(qr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Me(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let o=e;o.inputs=lm(e.inputs),o.declaredInputs=lm(e.declaredInputs),o.outputs=lm(e.outputs);let a=i.hostBindings;a&&YP(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&zP(e,l),c&&qP(e,c),WP(e,i),bN(e.outputs,i.outputs),qr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===ri&&(n=!1)}}t=Object.getPrototypeOf(t)}GP(r)}function WP(e,t){for(let n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function GP(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=$c(i.hostAttrs,n=$c(n,i.hostAttrs))}}function lm(e){return e===Uo?{}:e===so?[]:e}function zP(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function qP(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,s)=>{t(r,i,s),n(r,i,s)}:e.contentQueries=t}function YP(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function L0(e){return e!==null&&(typeof e=="function"||typeof e=="object")}function F0(e,t,n){return e[t]=n}function Pi(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function KP(e,t,n,r){let i=Pi(e,t,n);return Pi(e,t+1,r)||i}function ZP(e,t,n,r,i,s,o,a,l){let c=t.consts,h=Ld(t,e,4,o||null,a||null);eC()&&T0(t,n,h,ra(c,l),u0),h.mergedAttrs=$c(h.mergedAttrs,h.attrs),dC(t,h);let d=h.tView=Zg(2,h,r,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function ig(e,t,n,r,i,s,o,a,l,c){let h=n+wn,d=t.firstCreatePass?ZP(h,t,e,r,i,s,o,a,l):t.data[h];la(d,!1);let f=XP(t,e,d,n);Fg()&&iv(t,e,f,d),tl(f,e);let g=C0(f,e,f,d);return e[h]=g,Jg(e,g),SP(g,d,e),Tg(d)&&Qg(t,e,d),l!=null&&c0(e,d,c),d}function kt(e,t,n,r,i,s,o,a){let l=Ge(),c=un(),h=ra(c.consts,s);return ig(l,c,e,t,n,r,i,h,o,a),kt}var XP=JP;function JP(e,t,n,r){return Bg(!0),t[cn].createComment("")}var B0=new he(""),QP=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new og})}return e})(),og=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function lv(e){return!!e&&typeof e.then=="function"}function V0(e){return!!e&&typeof e.subscribe=="function"}var e1=new he(""),U0=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=O(e1,{optional:!0})??[];injector=O(yt);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=Bb(this.injector,i);if(lv(s))n.push(s);else if(V0(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});n.push(o)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),t1=new he("");function n1(){JE(()=>{throw new Me(600,!1)})}function r1(e){return e.isBoundToModule}var i1=10,dr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(iM);afterRenderManager=O(FC);zonelessEnabled=O(Td);rootEffectScheduler=O(QP);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new ie;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(xd).hasPendingTasks.pipe(lr(n=>!n));constructor(){O(da,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=O(Wn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){vt(10);let i=n instanceof hd;if(!this._injector.get(U0).done){let d=!i&&zN(n),f=!1;throw new Me(405,f)}let s;i?s=n:s=this._injector.get(ao).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let o=r1(s)?void 0:this._injector.get(Oi),a=r||s.selector,l=s.create(yt.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(B0,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),Ku(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),vt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){vt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(zg.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Me(101,!1);let n=$e(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,$e(n),this.afterTick.next(),vt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(ln,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<i1;)vt(14),this.synchronizeOnce(),vt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)o1(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>Dd(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;Ku(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(t1,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Ku(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Me(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ku(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function o1(e,t,n,r){!n&&!Dd(e)||_0(e,t,n&&!r?0:1)}function fo(e,t,n,r){let i=Ge(),s=el();if(Pi(i,s,t)){let o=un(),a=Lg();pO(a,i,e,t,n,r)}return fo}function H0(e,t,n,r){return Pi(e,el(),n)?t+Zc(n)+r:Ui}function Wu(e,t){return e<<17|t<<2}function Yo(e){return e>>17&32767}function s1(e){return(e&2)==2}function a1(e,t){return e&131071|t<<17}function sg(e){return e|2}function ia(e){return(e&131068)>>2}function um(e,t){return e&-131069|t<<2}function c1(e){return(e&1)===1}function ag(e){return e|1}function l1(e,t,n,r,i,s){let o=s?t.classBindings:t.styleBindings,a=Yo(o),l=ia(o);e[r]=n;let c=!1,h;if(Array.isArray(n)){let d=n;h=d[1],(h===null||Xc(d,h)>0)&&(c=!0)}else h=n;if(i)if(l!==0){let d=Yo(e[a+1]);e[r+1]=Wu(d,a),d!==0&&(e[d+1]=um(e[d+1],r)),e[a+1]=a1(e[a+1],r)}else e[r+1]=Wu(a,0),a!==0&&(e[a+1]=um(e[a+1],r)),a=r;else e[r+1]=Wu(l,0),a===0?a=r:e[l+1]=um(e[l+1],r),l=r;c&&(e[r+1]=sg(e[r+1])),lb(e,h,r,!0),lb(e,h,r,!1),u1(t,h,e,r,s),o=Wu(a,l),s?t.classBindings=o:t.styleBindings=o}function u1(e,t,n,r,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Xc(s,t)>=0&&(n[r+1]=ag(n[r+1]))}function lb(e,t,n,r){let i=e[n+1],s=t===null,o=r?Yo(i):ia(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];d1(l,t)&&(a=!0,e[o+1]=r?ag(c):sg(c)),o=r?Yo(c):ia(c)}a&&(e[n+1]=r?sg(i):ag(i))}function d1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Xc(e,t)>=0:!1}function be(e,t,n){let r=Ge(),i=el();if(Pi(r,i,t)){let s=un(),o=Lg();l0(s,o,r,e,t,r[cn],n,!1)}return be}function ub(e,t,n,r,i){ev(t,e,n,i?"class":"style",r)}function po(e,t,n){return j0(e,t,n,!1),po}function ii(e,t){return j0(e,t,null,!0),ii}function j0(e,t,n,r){let i=Ge(),s=un(),o=SA(2);if(s.firstUpdatePass&&p1(s,e,o,r),t!==Ui&&Pi(i,o,t)){let a=s.data[co()];y1(s,a,i,i[cn],e,i[o+1]=_1(t,n),r,o)}}function f1(e,t){return t>=e.expandoStartIndex}function p1(e,t,n,r){let i=e.data;if(i[n+1]===null){let s=i[co()],o=f1(e,n);E1(s,r)&&t===null&&!o&&(t=!1),t=h1(i,s,t,r),l1(i,s,t,n,o,r)}}function h1(e,t,n,r){let i=xA(e),s=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=dm(null,e,t,n,r),n=Kc(n,t.attrs,r),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(n=dm(i,e,t,n,r),s===null){let a=m1(e,t,r);a!==void 0&&Array.isArray(a)&&(a=dm(null,e,t,a[1],r),a=Kc(a,t.attrs,r),g1(e,t,r,a))}else s=v1(e,t,r)}return s!==void 0&&(r?t.residualClasses=s:t.residualStyles=s),n}function m1(e,t,n){let r=n?t.classBindings:t.styleBindings;if(ia(r)!==0)return e[Yo(r)]}function g1(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Yo(i)]=r}function v1(e,t,n){let r,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;r=Kc(r,o,n)}return Kc(r,t.attrs,n)}function dm(e,t,n,r,i){let s=null,o=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<o&&(s=t[a],r=Kc(r,s.hostAttrs,i),s!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Kc(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),WN(e,o,n?!0:t[++s]))}return e===void 0?null:e}function y1(e,t,n,r,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=c1(c)?db(l,t,n,i,ia(c),o):void 0;if(!gd(h)){gd(s)||s1(c)&&(s=db(l,null,n,i,a,o));let d=Kb(co(),n);MO(r,o,d,i,s)}}function db(e,t,n,r,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=n[i+1];f===Ui&&(f=d?so:void 0);let g=d?tm(f,r):h===r?f:void 0;if(c&&!gd(g)&&(g=tm(l,r)),gd(g)&&(a=g,o))return a;let m=e[i+1];i=o?Yo(m):ia(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=tm(l,r))}return a}function gd(e){return e!==void 0}function _1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=ur(ei(e)))),e}function E1(e,t){return(e.flags&(t?8:16))!==0}var cg=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,i),this.attach(r,s)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function fm(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function w1(e,t,n){let r,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=fm(s,c,s,h,n);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=fm(o,f,l,g,n);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=n(s,c),I=n(o,f),A=n(s,h);if(Object.is(A,I)){let F=n(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(r??=new vd,i??=pb(e,s,o,n),lg(e,r,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))r.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)fb(e,r,n,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=fm(s,h,s,d,n);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{r??=new vd,i??=pb(e,s,o,n);let g=n(s,d);if(lg(e,r,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=n(s,h);r.set(m,e.detach(s)),o--}}}for(;!c.done;)fb(e,r,n,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));r?.forEach(l=>{e.destroy(l)})}function lg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function fb(e,t,n,r,i){if(lg(e,t,r,n(r,i)))e.updateValue(r,i);else{let s=e.create(r,i);e.attach(r,s)}}function pb(e,t,n,r){let i=new Set;for(let s=t;s<=n;s++)i.add(r(s,e.at(s)));return i}var vd=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function jt(e,t){lo("NgControlFlow");let n=Ge(),r=el(),i=n[r]!==Ui?n[r]:-1,s=i!==-1?yd(n,wn+i):void 0,o=0;if(Pi(n,r,e)){let a=$e(null);try{if(s!==void 0&&D0(s,o),e!==-1){let l=wn+e,c=yd(n,l),h=pg(n[Te],l),d=qc(c,h.tView.ssrId),f=Md(n,h,t,{dehydratedView:d});kd(c,f,o,Gc(h,d))}}finally{$e(a)}}else if(s!==void 0){let a=S0(s,o);a!==void 0&&(a[tn]=t)}}var ug=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Tn}};function Pr(e,t){return t}var dg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function At(e,t,n,r,i,s,o,a,l,c,h,d,f){lo("NgControlFlow");let g=Ge(),m=un(),b=l!==void 0,I=Ge(),A=a?o.bind(I[Nr][tn]):o,F=new dg(b,A);I[wn+e]=F,ig(g,m,e+1,t,n,r,i,ra(m.consts,s)),b&&ig(g,m,e+2,l,c,h,d,ra(m.consts,f))}var fg=class extends cg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-Tn}at(e){return this.getLView(e)[tn].$implicit}attach(e,t){let n=t[Uc];this.needsIndexUpdate||=e!==this.length,kd(this.lContainer,t,e,Gc(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,b1(this.lContainer,e)}create(e,t){let n=qc(this.lContainer,this.templateTNode.tView.ssrId),r=Md(this.hostLView,this.templateTNode,new ug(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){Od(e[Te],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[tn].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[tn].$index=e}getLView(e){return C1(this.lContainer,e)}};function Mt(e){let t=$e(null),n=co();try{let r=Ge(),i=r[Te],s=r[n],o=n+1,a=yd(r,o);if(s.liveCollection===void 0){let c=pg(i,o);s.liveCollection=new fg(a,r,c)}else s.liveCollection.reset();let l=s.liveCollection;if(w1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=el(),h=l.length===0;if(Pi(r,c,h)){let d=n+2,f=yd(r,d);if(h){let g=pg(i,d),m=qc(f,g.tView.ssrId),b=Md(r,g,void 0,{dehydratedView:m});kd(f,b,0,Gc(g,m))}else D0(f,0)}}}finally{$e(t)}}function yd(e,t){return e[t]}function b1(e,t){return zc(e,t)}function C1(e,t){return S0(e,t)}function pg(e,t){return xg(e,t)}function Y(e,t,n,r){let i=Ge(),s=un(),o=wn+e,a=i[cn],l=s.firstCreatePass?R0(o,s,i,t,u0,eC(),n,r):s.data[o],c=S1(s,i,l,a,t,e);i[o]=c;let h=Tg(l);return la(l,!0),r0(a,c,l),!f0(l)&&Fg()&&iv(s,i,c,l),(hA()===0||h)&&tl(c,i),mA(),h&&(Qg(s,i,l),HC(s,l,i)),r!==null&&c0(i,l),Y}function X(){let e=fr();nC()?wA():(e=e.parent,la(e,!1));let t=e;yA(t)&&_A(),gA();let n=un();return n.firstCreatePass&&N0(n,t),t.classesWithoutHost!=null&&LA(t)&&ub(n,t,Ge(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&FA(t)&&ub(n,t,Ge(),t.stylesWithoutHost,!1),X}function Re(e,t,n,r){return Y(e,t,n,r),X(),Re}var S1=(e,t,n,r,i,s)=>(Bg(!0),t0(r,i,MA()));function dn(){return Ge()}var _d="en-US",D1=_d;function I1(e){typeof e=="string"&&(D1=e.toLowerCase().replace(/_/g,"-"))}var T1=(e,t,n)=>{};function Qe(e,t,n,r){let i=Ge(),s=un(),o=fr();return R1(s,i,i[cn],o,e,t,r),Qe}function x1(e,t,n,r){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===n&&i[s+1]===r){let a=t[td],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function R1(e,t,n,r,i,s,o){let a=Tg(r),l=e.firstCreatePass?Qb(e):null,c=t[tn],h=Jb(t),d=!0;if(r.type&3||o){let f=Jr(r,t),g=o?o(f):f,m=h.length,b=o?A=>o(Yr(A[r.index])):r.index,I=null;if(!o&&a&&(I=x1(e,t,i,r.index)),I!==null){let A=I.__ngLastListenerFn__||I;A.__ngNextListenerFn__=s,I.__ngLastListenerFn__=s,d=!1}else{s=gb(r,t,c,s),T1(f,i,s);let A=n.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=gb(r,t,c,s);if(d){let f=r.outputs?.[i],g=r.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],I=g[m+1];hb(r,e,t,b,I,i,s,h,l)}if(f&&f.length)for(let m of f)hb(r,e,t,m,i,i,s,h,l)}}function hb(e,t,n,r,i,s,o,a,l){let c=n[r],h=t.data[r].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function mb(e,t,n,r){let i=$e(null);try{return vt(6,t,n),n(r)!==!1}catch(s){return d0(e,s),!1}finally{vt(7,t,n),$e(i)}}function gb(e,t,n,r){return function i(s){if(s===Function)return r;let o=aa(e)?Kr(e.index,t):t;sv(o,5);let a=mb(t,n,r,s),l=i.__ngNextListenerFn__;for(;l;)a=mb(t,n,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function K(e=1){return NA(e)}function bn(e,t,n){return kr(e,"",t,"",n),bn}function kr(e,t,n,r,i){let s=Ge(),o=H0(s,t,n,r);if(o!==Ui){let a=un(),l=Lg();l0(a,l,s,e,o,s[cn],i,!1)}return kr}function Jo(e,t,n){MP(e,t,n)}function Qo(e){let t=Ge(),n=un(),r=iC();Og(r+1);let i=cv(n,r);if(e.dirty&&lA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=kP(t,r);e.reset(s,sM),e.notifyOnChanges()}return!0}return!1}function es(){return NP(Ge(),iC())}function uv(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function zt(e,t=""){let n=Ge(),r=un(),i=e+wn,s=r.firstCreatePass?Ld(r,i,1,t,null):r.data[i],o=N1(r,n,s,t,e);n[i]=o,Fg()&&iv(r,n,o,s),la(s,!1)}var N1=(e,t,n,r,i)=>(Bg(!0),XM(t[cn],r));function fa(e){return Lr("",e,""),fa}function Lr(e,t,n){let r=Ge(),i=H0(r,e,t,n);return i!==Ui&&A1(r,co(),i),Lr}function A1(e,t,n){let r=Kb(t,e);JM(e[cn],r,n)}var $0={};function Fr(e){let t=un(),n=Ge(),r=e+wn,i=Ld(t,r,128,null,null);return la(i,!1),uv(t,n,r,$0),Fr}function ho(e){lo("NgLet");let t=un(),n=Ge(),r=co();return uv(t,n,r,e),e}function pr(e){let t=bA(),n=Rg(t,wn+e);if(n===$0)throw new Me(314,!1);return n}function M1(e,t,n){let r=un();if(r.firstCreatePass){let i=qr(e);hg(n,r.data,r.blueprint,i,!0),hg(t,r.data,r.blueprint,i,!1)}}function hg(e,t,n,r,i){if(e=Pn(e),Array.isArray(e))for(let s=0;s<e.length;s++)hg(e[s],t,n,r,i);else{let s=un(),o=Ge(),a=fr(),l=ta(e)?e:Pn(e.provide),c=Fb(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(ta(e)||!e.multi){let g=new zo(c,i,bt),m=hm(l,t,i?h:h+f,d);m===-1?(Tm(cd(a,o),s,l),pm(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(g),o.push(g)):(n[m]=g,o[m]=g)}else{let g=hm(l,t,h+f,d),m=hm(l,t,h,h+f),b=g>=0&&n[g],I=m>=0&&n[m];if(i&&!I||!i&&!b){Tm(cd(a,o),s,l);let A=k1(i?P1:O1,n.length,i,r,c);!i&&I&&(n[m].providerFactory=A),pm(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),o.push(A)}else{let A=W0(n[i?m:g],c,!i&&r);pm(s,e,g>-1?g:m,A)}!i&&r&&I&&n[m].componentProviders++}}}function pm(e,t,n,r){let i=ta(t),s=XN(t);if(i||s){let o=(s?Pn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,o]):a[l+1].push(r,o)}else a.push(n,o)}}}function W0(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function hm(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function O1(e,t,n,r){return mg(this.multi,[])}function P1(e,t,n,r){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=Wc(n,n[Te],this.providerFactory.index,r);s=a.slice(0,o),mg(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],mg(i,s);return s}function mg(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function k1(e,t,n,r,i){let s=new zo(e,n,bt);return s.multi=[],s.index=t,s.componentProviders=0,W0(s,i,r&&!n),s}function Fd(e,t=[]){return n=>{n.providersResolver=(r,i)=>M1(r,i?i(e):e,t)}}function pa(e,t,n,r){return z0(Ge(),Mg(),e,t,n,r)}function G0(e,t){let n=e[t];return n===Ui?void 0:n}function z0(e,t,n,r,i,s){let o=t+n;return Pi(e,o,i)?F0(e,o+1,s?r.call(s,i):r(i)):G0(e,o+1)}function L1(e,t,n,r,i,s,o){let a=t+n;return KP(e,a,i,s)?F0(e,a+2,o?r.call(o,i,s):r(i,s)):G0(e,a+2)}function hr(e,t){let n=un(),r,i=e+wn;n.firstCreatePass?(r=F1(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let s=r.factory||(r.factory=Vo(r.type,!0)),o,a=$n(bt);try{let l=ad(!1),c=s();return ad(l),uv(n,Ge(),i,c),c}finally{$n(a)}}function F1(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Br(e,t,n){let r=e+wn,i=Ge(),s=Rg(i,r);return Y0(i,r)?z0(i,Mg(),t,s.transform,n,s):s.transform(n)}function q0(e,t,n,r){let i=e+wn,s=Ge(),o=Rg(s,i);return Y0(s,i)?L1(s,Mg(),t,o.transform,n,r,o):o.transform(n,r)}function Y0(e,t){return e[Te].data[t].pure}var oa=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},dv=new oa("19.2.0"),B1=(()=>{class e{zone=O(Be);changeDetectionScheduler=O(Ni);applicationRef=O(dr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function V1({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Be(re(w({},U1()),{scheduleInRootZone:n})),[{provide:Be,useFactory:e},{provide:Bc,multi:!0,useFactory:()=>{let r=O(B1,{optional:!0});return()=>r.initialize()}},{provide:Bc,multi:!0,useFactory:()=>{let r=O(H1);return()=>{r.initialize()}}},t===!0?{provide:CC,useValue:!0}:[],{provide:Hg,useValue:n??bC}]}function U1(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var H1=(()=>{class e{subscription=new mt;initialized=!1;zone=O(Be);pendingTasks=O(xd);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Be.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Be.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),K0=(()=>{class e{appRef=O(dr);taskService=O(xd);ngZone=O(Be);zonelessEnabled=O(Td);tracing=O(da,{optional:!0});disableScheduling=O(CC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new mt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ud):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Hg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof dd||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?Ww:SC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ud+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Ww(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Z0(){return lo("NgZoneless"),Ob([{provide:Ni,useExisting:K0},{provide:Be,useClass:dd},{provide:Td,useValue:!0},{provide:Hg,useValue:!1},[]])}function j1(){return typeof $localize<"u"&&$localize.locale||_d}var fv=new he("",{providedIn:"root",factory:()=>O(fv,Je.Optional|Je.SkipSelf)||j1()}),gg=new he(""),$1=new he("");function Mc(e){return!e.moduleRef}function W1(e){let t=Mc(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Be);return n.run(()=>{Mc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ai,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:s=>{r.handleError(s)}})}),Mc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(gg);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(gg);o.add(s),e.moduleRef.onDestroy(()=>{Ku(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return z1(r,n,()=>{let s=t.get(U0);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(fv,_d);if(I1(o||_d),!t.get($1,!0))return Mc(e)?t.get(dr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Mc(e)){let a=t.get(dr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return G1(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function G1(e,t){let n=e.injector.get(dr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new Me(-403,!1);t.push(e)}function z1(e,t,n){try{let r=n();return lv(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var Zu=null;function q1(e=[],t){return yt.create({name:t,providers:[{provide:bd,useValue:"platform"},{provide:gg,useValue:new Set([()=>Zu=null])},...e]})}function Y1(e=[]){if(Zu)return Zu;let t=q1(e);return Zu=t,n1(),K1(t),t}function K1(e){let t=e.get(Wg,null);Bb(e,()=>{t?.forEach(n=>n())})}var Vr=(()=>{class e{static __NG_ELEMENT_ID__=Z1}return e})();function Z1(e){return X1(fr(),Ge(),(e&16)===16)}function X1(e,t,n){if(aa(e)&&!n){let r=Kr(e.index,t);return new qo(r,r)}else if(e.type&175){let r=t[Nr];return new qo(r,t)}return null}var vg=class{constructor(){}supports(e){return e instanceof Map||L0(e)}create(){return new yg}},yg=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(e){let t;for(t=this._mapHead;t!==null;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;t!==null;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;t!==null;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;t!==null;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;t!==null;t=t._nextRemoved)e(t)}diff(e){if(!e)e=new Map;else if(!(e instanceof Map||L0(e)))throw new Me(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(n,r)=>{if(t&&t.key===r)this._maybeAddToChanges(t,n),this._appendAfter=t,t=t._next;else{let i=this._getOrCreateRecordForKey(r,n);t=this._insertBeforeOrAppend(t,i)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let n=t;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){let n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){let r=this._records.get(e);this._maybeAddToChanges(r,t);let i=r._prev,s=r._next;return i&&(i._next=s),s&&(s._prev=i),r._next=null,r._prev=null,r}let n=new _g(e);return this._records.set(e,n),n.currentValue=t,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(n=>t(e[n],n))}},_g=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(e){this.key=e}};function vb(){return new pv([new vg])}var pv=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:vb});factories;constructor(n){this.factories=n}static create(n,r){if(r){let i=r.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||vb()),deps:[[e,new UN,new Sg]]}}find(n){let r=this.factories.find(i=>i.supports(n));if(r)return r;throw new Me(901,!1)}}return e})();function X0(e){vt(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=Y1(r),s=[V1({}),{provide:Ni,useExisting:K0},...n||[]],o=new md({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return W1({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{vt(9)}}function ha(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function hv(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function mv(e){let t=$e(null);try{return e()}finally{$e(t)}}var yb=class{[Ii];constructor(e){this[Ii]=e}destroy(){this[Ii].destroy()}};function Bd(e,t){let n=Ho(e),r=t.elementInjector||Cd();return new Yc(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var J1={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function Q1(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ek(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var gv;function tk(e,t){if(!gv){let n=Element.prototype;gv=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?gv.call(e,t):!1}function nk(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[Q1(r)]=[n,i]}),t}function rk(e,t){return t.get(ao).resolveComponentFactory(e).inputs}function ik(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=n.length;s<o;++s){let a=n[s],l=ok(a,t,i);l!==-1&&r[l].push(a)}return r}function ok(e,t,n){let r=n;return ek(e)&&t.some((i,s)=>i!=="*"&&tk(e,i)?(r=s,!0):!1),r}var sk=10,vv=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(ao).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new yv(this.componentFactory,e,this.inputMap)}},yv=class{componentFactory;injector;inputMap;eventEmitters=new Mo(1);events=this.eventEmitters.pipe(qs(e=>no(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,n){this.componentFactory=e,this.injector=t,this.inputMap=n,this.ngZone=this.injector.get(Be),this.appRef=this.injector.get(dr),this.cdScheduler=t.get(Ni),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=J1.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},sk))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=yt.create({providers:[],parent:this.injector}),n=ik(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=e.instance[n];return new ot(s=>{let o=i.subscribe(a=>s.next({name:r,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},_v=class extends HTMLElement{ngElementEventsSubscription=null};function J0(e,t){let n=rk(e,t.injector),r=t.strategyFactory||new vv(e,t.injector),i=nk(n);class s extends _v{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||t.injector);n.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,c,f)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return n.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var nS=null;function ma(){return nS}function rS(e){nS??=e}var Vd=class{},nt=new he(""),iS=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:()=>O(ck),providedIn:"platform"})}return e})(),ck=(()=>{class e extends iS{_location;_history;_doc=O(nt);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ma().getBaseHref(this._doc)}onPopState(n){let r=ma().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=ma().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function oS(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function Q0(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function ts(e){return e&&e[0]!=="?"?`?${e}`:e}var wv=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:()=>O(uk),providedIn:"root"})}return e})(),lk=new he(""),uk=(()=>{class e extends wv{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??O(nt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return oS(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+ts(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,s){let o=this.prepareExternalUrl(i+ts(s));this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){let o=this.prepareExternalUrl(i+ts(s));this._platformLocation.replaceState(n,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(n){return new(n||e)(et(iS),et(lk,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),bv=(()=>{class e{_subject=new ie;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=pk(Q0(eS(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+ts(r))}normalize(n){return e.stripTrailingSlash(fk(this._basePath,eS(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+ts(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+ts(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=ts;static joinWithSlash=oS;static stripTrailingSlash=Q0;static \u0275fac=function(n){return new(n||e)(et(wv))};static \u0275prov=oe({token:e,factory:()=>dk(),providedIn:"root"})}return e})();function dk(){return new bv(et(wv))}function fk(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function eS(e){return e.replace(/\/index.html$/,"")}function pk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function sS(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,s]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Ev=/\s+/,tS=[],Hd=(()=>{class e{_ngEl;_renderer;initialClasses=tS;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Ev):tS}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Ev):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(Ev).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||e)(bt(Nt),bt(Zo))};static \u0275dir=Or({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),aS=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(n,r,i){this._ngEl=n,this._differs=r,this._renderer=i}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,r){let[i,s]=n.split("."),o=i.indexOf("-")===-1?void 0:Xr.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,s?`${r}${s}`:r,o):this._renderer.removeStyle(this._ngEl.nativeElement,i,o)}_applyChanges(n){n.forEachRemovedItem(r=>this._setStyle(r.key,null)),n.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),n.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(n){return new(n||e)(bt(Nt),bt(pv),bt(Zo))};static \u0275dir=Or({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),Cv="browser",hk="server";function cS(e){return e===Cv}function Sv(e){return e===hk}var Ud=class{},Iv=class extends Vd{supportsDOMEvents=!0},Tv=class NS extends Iv{static makeCurrent(){rS(new NS)}onAndCancel(t,n,r,i){return t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=mk();return n==null?null:gk(n)}resetBaseElement(){ol=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return sS(document.cookie,t)}},ol=null;function mk(){return ol=ol||document.querySelector("base"),ol?ol.getAttribute("href"):null}function gk(e){return new URL(e,document.baseURI).pathname}var vk=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),xv=new he(""),hS=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,s){return this._findPluginFor(r).addEventListener(n,r,i,s)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new Me(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(et(xv),et(Be))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),$d=class{_doc;constructor(e){this._doc=e}manager},jd="ng-app-id";function lS(e){for(let t of e)t.remove()}function uS(e,t){let n=t.createElement("style");return n.textContent=e,n}function yk(e,t,n,r){let i=e.head?.querySelectorAll(`style[${jd}="${t}"],link[${jd}="${t}"]`);if(i)for(let s of i)s.removeAttribute(jd),s instanceof HTMLLinkElement?r.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&n.set(s.textContent,{usage:0,elements:[s]})}function Rv(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var mS=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,s={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=Sv(s),yk(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,uS);r?.forEach(i=>this.addUsage(i,this.external,Rv))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let s=r.get(n);s?s.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(lS(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])lS(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,uS(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,Rv(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(jd,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(et(nt),et(nl),et(Gg,8),et(Ko))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),Dv={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Av=/%COMP%/g,gS="%COMP%",_k=`_nghost-${gS}`,Ek=`_ngcontent-${gS}`,wk=!0,bk=new he("",{providedIn:"root",factory:()=>wk});function Ck(e){return Ek.replace(Av,e)}function Sk(e){return _k.replace(Av,e)}function vS(e,t){return t.map(n=>n.replace(Av,e))}var dS=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,s,o,a,l,c=null,h=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=Sv(a),this.defaultRenderer=new sl(n,o,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Zr.ShadowDom&&(r=re(w({},r),{encapsulation:Zr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Wd?i.applyToHost(n):i instanceof al&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,s=i.get(r.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Zr.Emulated:s=new Wd(l,c,r,this.appId,h,o,a,d,f);break;case Zr.ShadowDom:return new Nv(l,c,n,r,o,a,this.nonce,d,f);default:s=new al(l,c,r,h,o,a,d,f);break}i.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(et(hS),et(mS),et(nl),et(bk),et(nt),et(Ko),et(Be),et(Gg),et(da,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),sl=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Dv[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(fS(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(fS(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new Me(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let i=Dv[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Dv[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Xr.DashCase|Xr.Important)?e.style.setProperty(t,n,r&Xr.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Xr.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=ma().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function fS(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Nv=class extends sl{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=r.styles;c=vS(r.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=r.getExternalStyles?.();if(h)for(let d of h){let f=Rv(d,i);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},al=class extends sl{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?vS(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Wd=class extends al{contentAttr;hostAttr;constructor(e,t,n,r,i,s,o,a,l){let c=r+"-"+n.id;super(e,t,n,i,s,o,a,l,c),this.contentAttr=Ck(c),this.hostAttr=Sk(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},Dk=(()=>{class e extends $d{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,s){return n.addEventListener(r,i,s),()=>this.removeEventListener(n,r,i,s)}removeEventListener(n,r,i,s){return n.removeEventListener(r,i,s)}static \u0275fac=function(n){return new(n||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),pS=["alt","control","meta","shift"],Ik={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Tk={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},xk=(()=>{class e extends $d{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ma().onAndCancel(n,o.domEventName,a,s))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(r.pop()),o="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),o="code."),pS.forEach(c=>{let h=r.indexOf(c);h>-1&&(r.splice(h,1),o+=c+".")}),o+=s,r.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(n,r){let i=Ik[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(i=n.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),pS.forEach(o=>{if(o!==i){let a=Tk[o];a(n)&&(s+=o+".")}}),s+=i,s===r)}static eventCallback(n,r,i){return s=>{e.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})();function yS(e){return X0(Rk(e))}function Rk(e){return{appProviders:[...Pk,...e?.providers??[]],platformProviders:Ok}}function Nk(){Tv.makeCurrent()}function Ak(){return new Ai}function Mk(){return MC(document),document}var Ok=[{provide:Ko,useValue:Cv},{provide:Wg,useValue:Nk,multi:!0},{provide:nt,useFactory:Mk,deps:[]}],Pk=[{provide:bd,useValue:"root"},{provide:Ai,useFactory:Ak,deps:[]},{provide:xv,useClass:Dk,multi:!0,deps:[nt]},{provide:xv,useClass:xk,multi:!0,deps:[nt]},dS,mS,hS,{provide:ln,useExisting:dS},{provide:Ud,useClass:vk,deps:[]},[]],Mv=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=et(kk),r},providedIn:"root"})}return e})(),kk=(()=>{class e extends Mv{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case ti.NONE:return r;case ti.HTML:return uo(r,"HTML")?ei(r):Yg(this._doc,String(r)).toString();case ti.STYLE:return uo(r,"Style")?ei(r):r;case ti.SCRIPT:if(uo(r,"Script"))return ei(r);throw new Me(5200,!1);case ti.URL:return uo(r,"URL")?ei(r):Nd(String(r));case ti.RESOURCE_URL:if(uo(r,"ResourceURL"))return ei(r);throw new Me(5201,!1);default:throw new Me(5202,!1)}}bypassSecurityTrustHtml(n){return jC(n)}bypassSecurityTrustStyle(n){return $C(n)}bypassSecurityTrustScript(n){return WC(n)}bypassSecurityTrustUrl(n){return GC(n)}bypassSecurityTrustResourceUrl(n){return zC(n)}static \u0275fac=function(n){return new(n||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),_S="9.5.6",k=class Lh{static SDK_VERSION=_S;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static CTA_EVENT="letscooee:outbound:cta";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let t=Lh.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");Lh.SDK_VERSION_CODE=parseInt(t,10)}},Rn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},Jn=Fe(is()),S=class{static log(...e){Jn.default.info(...e)}static debug(...e){Jn.default.debug(...e)}static error(...e){Jn.default.error(...e)}static warn(...e){Jn.default.warn(...e)}static info(...e){Jn.default.info(...e)}static trace(...e){Jn.default.trace(...e)}static configure(e=k.LOG_PREFIX){Jn.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Jn.default.setLevel(Jn.default[localStorage.cooeeLogLevel]):Jn.default.setLevel(Rn.debug?Jn.default.TRACE:Jn.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
|
|
6
|
+
`&&e.charAt(1)==PN?e.slice(2):e;let i=dr(t);if(Array.isArray(t))i=t.map(dr).join(" -> ");else if(typeof t=="object"){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+(typeof a=="string"?JSON.stringify(a):dr(a)))}i=`{${s.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${e.replace(ON,`
|
|
7
|
+
`)}`}var Sg=Tb(Eb("Optional"),8),UN=Tb(Eb("SkipSelf"),4);function Vo(e,t){return e.hasOwnProperty(Xu)?e[Xu]:null}function HN(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(n&&(i=n(i),s=n(s)),s!==i)return!1}return!0}function jN(e){return e.flat(Number.POSITIVE_INFINITY)}function Dg(e,t){e.forEach(n=>Array.isArray(n)?Dg(n,t):t(n))}function xb(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Qu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function $N(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=n,e[t+1]=r}}function WN(e,t,n){let r=Xc(e,t);return r>=0?e[r|1]=n:(r=~r,$N(e,r,t,n)),r}function tm(e,t){let n=Xc(e,t);if(n>=0)return e[n|1]}function Xc(e,t){return GN(e,t,1)}function GN(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let s=r+(i-r>>1),o=e[s<<n];if(t===o)return s<<n;o>t?i=s:r=s+1}return~(i<<n)}var Uo={},so=[],Bc=new he(""),Rb=new he("",-1),Nb=new he(""),ed=class{get(e,t=Fc){if(t===Fc){let n=new Error(`NullInjectorError: No provider for ${dr(e)}!`);throw n.name="NullInjectorError",n}return t}};function Ho(e){return e[IN]||null}function Ab(e){return e[TN]||null}function Mb(e){return e[xN]||null}function zN(e){let t=Ho(e)||Ab(e)||Mb(e);return t!==null&&t.standalone}function Ob(e){return{\u0275providers:e}}function qN(...e){return{\u0275providers:Pb(!0,e),\u0275fromNgModule:!0}}function Pb(e,...t){let n=[],r=new Set,i,s=o=>{n.push(o)};return Dg(t,o=>{let a=o;ym(a,s,[],r)&&(i||=[],i.push(a))}),i!==void 0&&kb(i,s),n}function kb(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Ig(i,s=>{t(s,r)})}}function ym(e,t,n,r){if(e=Pn(e),!e)return!1;let i=null,s=Mw(e),o=!s&&Ho(e);if(!s&&!o){let l=e.ngModule;if(s=Mw(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=r.has(i);if(o){if(a)return!1;if(r.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)ym(c,t,n,r)}}else if(s){if(s.imports!=null&&!a){r.add(i);let c;try{Dg(s.imports,h=>{ym(h,t,n,r)&&(c||=[],c.push(h))})}finally{}c!==void 0&&kb(c,t)}if(!a){let c=Vo(i)||(()=>new i);t({provide:i,useFactory:c,deps:so},i),t({provide:Nb,useValue:i,multi:!0},i),t({provide:Bc,useValue:()=>et(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;Ig(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Ig(e,t){for(let n of e)Sb(n)&&(n=n.\u0275providers),Array.isArray(n)?Ig(n,t):t(n)}var YN=Rt({provide:String,useValue:Rt});function Lb(e){return e!==null&&typeof e=="object"&&YN in e}function KN(e){return!!(e&&e.useExisting)}function ZN(e){return!!(e&&e.useFactory)}function ta(e){return typeof e=="function"}function XN(e){return!!e.useClass}var bd=new he(""),Gu={},JN={},nm;function Cd(){return nm===void 0&&(nm=new ed),nm}var Wn=class{},Vc=class extends Wn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Em(e,s=>this.processProvider(s)),this.records.set(Rb,Ys(void 0,this)),r.has("environment")&&this.records.set(Wn,Ys(void 0,this));let i=this.records.get(bd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Nb,so,Je.Self))}destroy(){Oc(this),this._destroyed=!0;let e=$e(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),$e(e)}}onDestroy(e){return Oc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Oc(this);let t=ro(this),n=$n(void 0),r;try{return e()}finally{ro(t),$n(n)}}get(e,t=Fc,n=Je.Default){if(Oc(this),e.hasOwnProperty(Pw))return e[Pw](this);n=wd(n);let r,i=ro(this),s=$n(void 0);try{if(!(n&Je.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=rA(e)&&bg(e);l&&this.injectableDefInScope(l)?a=Ys(_m(e),Gu):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=n&Je.Self?Cd():this.parent;return t=n&Je.Optional&&t===Fc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ju]=o[Ju]||[]).unshift(dr(e)),i)throw o;return BN(o,e,"R3InjectorError",this.source)}else throw o}finally{$n(s),ro(i)}}resolveInjectorInitializers(){let e=$e(null),t=ro(this),n=$n(void 0),r;try{let i=this.get(Bc,so,Je.Self);for(let s of i)s()}finally{ro(t),$n(n),$e(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(dr(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Pn(e);let t=ta(e)?e:Pn(e&&e.provide),n=eA(e);if(!ta(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Ys(void 0,Gu,!0),r.factory=()=>vm(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=$e(null);try{return t.value===Gu&&(t.value=JN,t.value=t.factory()),typeof t.value=="object"&&t.value&&nA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{$e(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Pn(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function _m(e){let t=bg(e),n=t!==null?t.factory:Vo(e);if(n!==null)return n;if(e instanceof he)throw new Me(204,!1);if(e instanceof Function)return QN(e);throw new Me(204,!1)}function QN(e){if(e.length>0)throw new Me(204,!1);let t=SN(e);return t!==null?()=>t.factory(e):()=>new e}function eA(e){if(Lb(e))return Ys(void 0,e.useValue);{let t=Fb(e);return Ys(t,Gu)}}function Fb(e,t,n){let r;if(ta(e)){let i=Pn(e);return Vo(i)||_m(i)}else if(Lb(e))r=()=>Pn(e.useValue);else if(ZN(e))r=()=>e.useFactory(...vm(e.deps||[]));else if(KN(e))r=()=>et(Pn(e.useExisting));else{let i=Pn(e&&(e.useClass||e.provide));if(tA(e))r=()=>new i(...vm(e.deps));else return Vo(i)||_m(i)}return r}function Oc(e){if(e.destroyed)throw new Me(205,!1)}function Ys(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function tA(e){return!!e.deps}function nA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function rA(e){return typeof e=="function"||typeof e=="object"&&e instanceof he}function Em(e,t){for(let n of e)Array.isArray(n)?Em(n,t):n&&Sb(n)?Em(n.\u0275providers,t):t(n)}function Bb(e,t){e instanceof Vc&&Oc(e);let n,r=ro(e),i=$n(void 0);try{return t()}finally{ro(r),$n(i)}}function Vb(){return Db()!==void 0||kN()!=null}function Ub(e){if(!Vb())throw new Me(-203,!1)}function iA(e){return typeof e=="function"}var ki=0,Te=1,Ee=2,xn=3,Ar=4,Pr=5,Uc=6,td=7,tn=8,Hc=9,xi=10,cn=11,jc=12,Lw=13,sa=14,Mr=15,jo=16,Ks=17,Ri=18,Sd=19,Hb=20,io=21,rm=22,nd=23,Xn=24,Qs=25,wn=26,jb=1,$o=7,rd=8,na=9,Tn=10;function oo(e){return Array.isArray(e)&&typeof e[jb]=="object"}function Li(e){return Array.isArray(e)&&e[jb]===!0}function $b(e){return(e.flags&4)!==0}function aa(e){return e.componentOffset>-1}function Tg(e){return(e.flags&1)===1}function qr(e){return!!e.template}function id(e){return(e[Ee]&512)!==0}function Jc(e){return(e[Ee]&256)===256}var wm=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Wb(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var ca=(()=>{let e=()=>Gb;return e.ngInherit=!0,e})();function Gb(e){return e.type.prototype.ngOnChanges&&(e.setInput=sA),oA}function oA(){let e=qb(this),t=e?.current;if(t){let n=e.previous;if(n===Uo)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function sA(e,t,n,r,i){let s=this.declaredInputs[r],o=qb(e)||aA(e,{previous:Uo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new wm(c&&c.currentValue,n,l===Uo),Wb(e,t,i,n)}var zb="__ngSimpleChanges__";function qb(e){return e[zb]||null}function aA(e,t){return e[zb]=t}var Fw=null,vt=function(e,t=null,n){Fw?.(e,t,n)},Yb="svg",cA="math";function Yr(e){for(;Array.isArray(e);)e=e[ki];return e}function Kb(e,t){return Yr(t[e])}function Jr(e,t){return Yr(t[e.index])}function xg(e,t){return e.data[t]}function Rg(e,t){return e[t]}function Kr(e,t){let n=t[e];return oo(n)?n:n[ki]}function lA(e){return(e[Ee]&4)===4}function Ng(e){return(e[Ee]&128)===128}function uA(e){return Li(e[xn])}function ra(e,t){return t==null?null:e[t]}function Zb(e){e[Ks]=0}function Ag(e){e[Ee]&1024||(e[Ee]|=1024,Ng(e)&&Qc(e))}function dA(e,t){for(;e>0;)t=t[sa],e--;return t}function Dd(e){return!!(e[Ee]&9216||e[Xn]?.dirty)}function bm(e){e[xi].changeDetectionScheduler?.notify(8),e[Ee]&64&&(e[Ee]|=1024),Dd(e)&&Qc(e)}function Qc(e){e[xi].changeDetectionScheduler?.notify(0);let t=Wo(e);for(;t!==null&&!(t[Ee]&8192||(t[Ee]|=8192,!Ng(t)));)t=Wo(t)}function Xb(e,t){if(Jc(e))throw new Me(911,!1);e[io]===null&&(e[io]=[]),e[io].push(t)}function fA(e,t){if(e[io]===null)return;let n=e[io].indexOf(t);n!==-1&&e[io].splice(n,1)}function Wo(e){let t=e[xn];return Li(t)?t[xn]:t}function Jb(e){return e[td]??=[]}function Qb(e){return e.cleanup??=[]}function pA(e,t,n,r){let i=Jb(t);i.push(n),e.firstCreatePass&&Qb(e).push(r,i.length-1)}var xe={lFrame:aC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Cm=!1;function hA(){return xe.lFrame.elementDepthCount}function mA(){xe.lFrame.elementDepthCount++}function gA(){xe.lFrame.elementDepthCount--}function eC(){return xe.bindingsEnabled}function vA(){return xe.skipHydrationRootTNode!==null}function yA(e){return xe.skipHydrationRootTNode===e}function _A(){xe.skipHydrationRootTNode=null}function Ge(){return xe.lFrame.lView}function un(){return xe.lFrame.tView}function ze(e){return xe.lFrame.contextLView=e,e[tn]}function qe(e){return xe.lFrame.contextLView=null,e}function pr(){let e=tC();for(;e!==null&&e.type===64;)e=e.parent;return e}function tC(){return xe.lFrame.currentTNode}function EA(){let e=xe.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function la(e,t){let n=xe.lFrame;n.currentTNode=e,n.isParent=t}function nC(){return xe.lFrame.isParent}function wA(){xe.lFrame.isParent=!1}function bA(){return xe.lFrame.contextLView}function rC(){return Cm}function Bw(e){let t=Cm;return Cm=e,t}function Mg(){let e=xe.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function CA(e){return xe.lFrame.bindingIndex=e}function el(){return xe.lFrame.bindingIndex++}function SA(e){let t=xe.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function DA(){return xe.lFrame.inI18n}function IA(e,t){let n=xe.lFrame;n.bindingIndex=n.bindingRootIndex=e,Sm(t)}function TA(){return xe.lFrame.currentDirectiveIndex}function Sm(e){xe.lFrame.currentDirectiveIndex=e}function xA(e){let t=xe.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function iC(){return xe.lFrame.currentQueryIndex}function Og(e){xe.lFrame.currentQueryIndex=e}function RA(e){let t=e[Te];return t.type===2?t.declTNode:t.type===1?e[Pr]:null}function oC(e,t,n){if(n&Je.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(n&Je.Host))&&(i=RA(s),!(i===null||(s=s[sa],i.type&10))););if(i===null)return!1;t=i,e=s}let r=xe.lFrame=sC();return r.currentTNode=t,r.lView=e,!0}function Pg(e){let t=sC(),n=e[Te];xe.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function sC(){let e=xe.lFrame,t=e===null?null:e.child;return t===null?aC(e):t}function aC(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function cC(){let e=xe.lFrame;return xe.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var lC=cC;function kg(){let e=cC();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function NA(e){return(xe.lFrame.contextLView=dA(e,xe.lFrame.contextLView))[tn]}function co(){return xe.lFrame.selectedIndex}function Go(e){xe.lFrame.selectedIndex=e}function Lg(){let e=xe.lFrame;return xg(e.tView,e.selectedIndex)}function Gn(){xe.lFrame.currentNamespace=Yb}function Fi(){AA()}function AA(){xe.lFrame.currentNamespace=null}function MA(){return xe.lFrame.currentNamespace}var uC=!0;function Fg(){return uC}function Bg(e){uC=e}function OA(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(r){let o=Gb(t);(n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o)}i&&(n.preOrderHooks??=[]).push(0-e,i),s&&((n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s))}function dC(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-n,s),o&&((e.contentHooks??=[]).push(n,o),(e.contentCheckHooks??=[]).push(n,o)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),c!=null&&(e.destroyHooks??=[]).push(n,c)}}function zu(e,t,n){fC(e,t,3,n)}function qu(e,t,n,r){(e[Ee]&3)===n&&fC(e,t,n,r)}function im(e,t){let n=e[Ee];(n&3)===t&&(n&=16383,n+=1,e[Ee]=n)}function fC(e,t,n,r){let i=r!==void 0?e[Ks]&65535:0,s=r??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[Ks]+=65536),(a<s||s==-1)&&(PA(e,n,t,l),e[Ks]=(e[Ks]&4294901760)+l+2),l++}function Vw(e,t){vt(4,e,t);let n=$e(null);try{t.call(e)}finally{$e(n),vt(5,e,t)}}function PA(e,t,n,r){let i=n[r]<0,s=n[r+1],o=i?-n[r]:n[r],a=e[o];i?e[Ee]>>14<e[Ks]>>16&&(e[Ee]&3)===t&&(e[Ee]+=16384,Vw(a,s)):Vw(a,s)}var ea=-1,zo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function kA(e){return e instanceof zo}function LA(e){return(e.flags&8)!==0}function FA(e){return(e.flags&16)!==0}function BA(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let s=n[r++],o=n[r++],a=n[r++];e.setAttribute(t,o,a,s)}else{let s=i,o=n[++r];UA(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),r++}}return r}function VA(e){return e===3||e===4||e===6}function UA(e){return e.charCodeAt(0)===64}function $c(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?Uw(e,n,i,null,t[++r]):Uw(e,n,i,null,null))}}return e}function Uw(e,t,n,r,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[s+1]=i);return}else if(r===e[s+1]){e[s+2]=i;return}}s++,r!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,n),r!==null&&e.splice(s++,0,r),i!==null&&e.splice(s++,0,i)}var om={},Dm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=wd(n);let r=this.injector.get(e,om,n);return r!==om||t===om?r:this.parentInjector.get(e,t,n)}};function pC(e){return e!==ea}function od(e){return e&32767}function HA(e){return e>>16}function sd(e,t){let n=HA(e),r=t;for(;n>0;)r=r[sa],n--;return r}var Im=!0;function ad(e){let t=Im;return Im=e,t}var jA=256,hC=jA-1,mC=5,$A=0,zr={};function WA(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(kc)&&(r=n[kc]),r==null&&(r=n[kc]=$A++);let i=r&hC,s=1<<i;t.data[e+(i>>mC)]|=s}function cd(e,t){let n=gC(e,t);if(n!==-1)return n;let r=t[Te];r.firstCreatePass&&(e.injectorIndex=t.length,sm(r.data,e),sm(t,null),sm(r.blueprint,null));let i=Vg(e,t),s=e.injectorIndex;if(pC(i)){let o=od(i),a=sd(i,t),l=a[Te].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function sm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function gC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Vg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=wC(i),r===null)return ea;if(n++,i=i[sa],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return ea}function Tm(e,t,n){WA(e,t,n)}function vC(e,t,n){if(n&Je.Optional||e!==void 0)return e;Cg(t,"NodeInjector")}function yC(e,t,n,r){if(n&Je.Optional&&r===void 0&&(r=null),(n&(Je.Self|Je.Host))===0){let i=e[Hc],s=$n(void 0);try{return i?i.get(t,r,n&Je.Optional):Ib(t,r,n&Je.Optional)}finally{$n(s)}}return vC(r,t,n)}function _C(e,t,n,r=Je.Default,i){if(e!==null){if(t[Ee]&2048&&!(r&Je.Self)){let o=YA(e,t,n,r,zr);if(o!==zr)return o}let s=EC(e,t,n,r,zr);if(s!==zr)return s}return yC(t,n,r,i)}function EC(e,t,n,r,i){let s=zA(n);if(typeof s=="function"){if(!oC(t,e,r))return r&Je.Host?vC(i,n,r):yC(t,n,r,i);try{let o;if(o=s(r),o==null&&!(r&Je.Optional))Cg(n);else return o}finally{lC()}}else if(typeof s=="number"){let o=null,a=gC(e,t),l=ea,c=r&Je.Host?t[Mr][Pr]:null;for((a===-1||r&Je.SkipSelf)&&(l=a===-1?Vg(e,t):t[a+8],l===ea||!jw(r,!1)?a=-1:(o=t[Te],a=od(l),t=sd(l,t)));a!==-1;){let h=t[Te];if(Hw(s,a,h.data)){let d=GA(a,t,n,o,r,c);if(d!==zr)return d}l=t[a+8],l!==ea&&jw(r,t[Te].data[a+8]===c)&&Hw(s,a,t)?(o=h,a=od(l),t=sd(l,t)):a=-1}}return i}function GA(e,t,n,r,i,s){let o=t[Te],a=o.data[e+8],l=r==null?aa(a)&&Im:r!=o&&(a.type&3)!==0,c=i&Je.Host&&s===a,h=Yu(a,o,n,l,c);return h!==null?Wc(t,o,h,a):zr}function Yu(e,t,n,r,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=r?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=o[l];if(g&&qr(g)&&g.type===n)return l}return null}function Wc(e,t,n,r){let i=e[n],s=t.data;if(kA(i)){let o=i;o.resolving&&NN(RN(s[n]));let a=ad(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?$n(o.injectImpl):null,h=oC(e,r,Je.Default);try{i=e[n]=o.factory(void 0,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&OA(n,s[n],t)}finally{c!==null&&$n(c),ad(a),o.resolving=!1,lC()}}return i}function zA(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(kc)?e[kc]:void 0;return typeof t=="number"?t>=0?t&hC:qA:t}function Hw(e,t,n){let r=1<<e;return!!(n[t+(e>>mC)]&r)}function jw(e,t){return!(e&Je.Self)&&!(e&Je.Host&&t)}var Bo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return _C(this._tNode,this._lView,e,wd(n),t)}};function qA(){return new Bo(pr(),Ge())}function Id(e){return Ed(()=>{let t=e.prototype.constructor,n=t[Xu]||xm(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let s=i[Xu]||xm(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function xm(e){return wb(e)?()=>{let t=xm(Pn(e));return t&&t()}:Vo(e)}function YA(e,t,n,r,i){let s=e,o=t;for(;s!==null&&o!==null&&o[Ee]&2048&&!id(o);){let a=EC(s,o,n,r|Je.Self,zr);if(a!==zr)return a;let l=s.parent;if(!l){let c=o[Hb];if(c){let h=c.get(n,zr,r);if(h!==zr)return h}l=wC(o),o=o[sa]}s=l}return i}function wC(e){let t=e[Te],n=t.type;return n===2?t.declTNode:n===1?e[Pr]:null}function $w(e,t=null,n=null,r){let i=KA(e,t,n,r);return i.resolveInjectorInitializers(),i}function KA(e,t=null,n=null,r,i=new Set){let s=[n||so,qN(e)];return r=r||(typeof e=="object"?void 0:dr(e)),new Vc(s,t||Cd(),r||null,i)}var yt=class xS{static THROW_IF_NOT_FOUND=Fc;static NULL=new ed;static create(t,n){if(Array.isArray(t))return $w({name:""},n,t,"");{let r=t.name??"";return $w({name:r},t.parent,t.providers,r)}}static \u0275prov=oe({token:xS,providedIn:"any",factory:()=>et(Rb)});static __NG_ELEMENT_ID__=-1},ZA=new he("");ZA.__NG_ELEMENT_ID__=e=>{let t=pr();if(t===null)throw new Me(204,!1);if(t.type&2)return t.value;if(e&Je.Optional)return null;throw new Me(204,!1)};var bC=!1,Ug=(()=>{class e{static __NG_ELEMENT_ID__=XA;static __NG_ENV_ID__=n=>n}return e})(),Rm=class extends Ug{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return Xb(this._lView,e),()=>fA(this._lView,e)}};function XA(){return new Rm(Ge())}var Ni=class{},Td=new he("",{providedIn:"root",factory:()=>!1}),CC=new he(""),Hg=new he(""),xd=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new xr(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),Nm=class extends ie{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Vb()&&(this.destroyRef=O(Ug,{optional:!0})??void 0,this.pendingTasks=O(xd,{optional:!0})??void 0)}emit(e){let t=$e(null);try{super.next(e)}finally{$e(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),s=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:r,error:i,complete:s});return e instanceof mt&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},We=Nm;function ld(...e){}function SC(e){let t,n;function r(){e=ld;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Ww(e){return queueMicrotask(()=>e()),()=>{e=ld}}var jg="isAngularZone",ud=jg+"_ID",JA=0,Be=class Ah{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new We(!1);onMicrotaskEmpty=new We(!1);onStable=new We(!1);onError=new We(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=bC}=t;if(typeof Zone>"u")throw new Me(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&r,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,tM(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(jg)===!0}static assertInAngularZone(){if(!Ah.isInAngularZone())throw new Me(909,!1)}static assertNotInAngularZone(){if(Ah.isInAngularZone())throw new Me(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,QA,ld,ld);try{return s.runTask(o,n,r)}finally{s.cancelTask(o)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},QA={};function $g(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function eM(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){SC(()=>{e.callbackScheduled=!1,Am(e),e.isCheckStableRunning=!0,$g(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Am(e)}function tM(e){let t=()=>{eM(e)},n=JA++;e._inner=e._inner.fork({name:"angular",properties:{[jg]:!0,[ud]:n,[ud+n]:!0},onInvokeTask:(r,i,s,o,a,l)=>{if(nM(l))return r.invokeTask(s,o,a,l);try{return Gw(e),r.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),zw(e)}},onInvoke:(r,i,s,o,a,l,c)=>{try{return Gw(e),r.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!rM(l)&&t(),zw(e)}},onHasTask:(r,i,s,o)=>{r.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Am(e),$g(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,i,s,o)=>(r.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Am(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Gw(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function zw(e){e._nesting--,$g(e)}var dd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new We;onMicrotaskEmpty=new We;onStable=new We;onError=new We;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function nM(e){return DC(e,"__ignore_ng_zone__")}function rM(e){return DC(e,"__scheduler_tick__")}function DC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Ai=class{_console=console;handleError(e){this._console.error("ERROR",e)}},iM=new he("",{providedIn:"root",factory:()=>{let e=O(Be),t=O(Ai);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function oM(){return ua(pr(),Ge())}function ua(e,t){return new Nt(Jr(e,t))}var Nt=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=oM}return e})();function sM(e){return e instanceof Nt?e.nativeElement:e}function Bi(e,t){let n=QE(e),r=n[Ii];return t?.equal&&(r.equal=t.equal),n.set=i=>jh(r,i),n.update=i=>ew(r,i),n.asReadonly=aM.bind(n),n}function aM(){let e=this[Ii];if(e.readonlyFn===void 0){let t=()=>this();t[Ii]=e,e.readonlyFn=t}return e.readonlyFn}function cM(){return this._results[Symbol.iterator]()}var Mm=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new ie}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=jN(e);(this._changesDetected=!HN(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=cM};function IC(e){return(e.flags&128)===128}var TC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(TC||{}),xC=new Map,lM=0;function uM(){return lM++}function dM(e){xC.set(e[Sd],e)}function Om(e){xC.delete(e[Sd])}var qw="__ngContext__";function tl(e,t){oo(t)?(e[qw]=t[Sd],dM(t)):e[qw]=t}function RC(e){return AC(e[jc])}function NC(e){return AC(e[Ar])}function AC(e){for(;e!==null&&!Li(e);)e=e[Ar];return e}var Pm;function MC(e){Pm=e}function OC(){if(Pm!==void 0)return Pm;if(typeof document<"u")return document;throw new Me(210,!1)}var nl=new he("",{providedIn:"root",factory:()=>fM}),fM="ng",Wg=new he(""),Ko=new he("",{providedIn:"platform",factory:()=>"unknown"}),PC=new he(""),Gg=new he("",{providedIn:"root",factory:()=>OC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),pM="h",hM="b",kC=!1,mM=new he("",{providedIn:"root",factory:()=>kC}),zg=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(zg||{}),da=new he(""),Yw=new Set;function lo(e){Yw.has(e)||(Yw.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var LC=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=gM}return e})();function gM(){return new LC(Ge(),pr())}var Zs=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Zs||{}),FC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),vM=[Zs.EarlyRead,Zs.Write,Zs.MixedReadWrite,Zs.Read],yM=(()=>{class e{ngZone=O(Be);scheduler=O(Ni);errorHandler=O(Ai,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(da,{optional:!0})}execute(){let n=this.sequences.size>0;n&&vt(16),this.executing=!0;for(let r of vM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[r];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&vt(17)}register(n){let{view:r}=n;r!==void 0?((r[Qs]??=[]).push(n),Qc(r),r[Ee]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(zg.AFTER_NEXT_RENDER,n):n()}static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new e})}return e})(),km=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,s=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[Qs];e&&(this.view[Qs]=e.filter(t=>t!==this))}};function qg(e,t){!t?.injector&&Ub(qg);let n=t?.injector??O(yt);return lo("NgAfterRender"),BC(e,n,t,!1)}function Qr(e,t){!t?.injector&&Ub(Qr);let n=t?.injector??O(yt);return lo("NgAfterNextRender"),BC(e,n,t,!0)}function _M(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function BC(e,t,n,r){let i=t.get(FC);i.impl??=t.get(yM);let s=t.get(da,null,{optional:!0}),o=n?.phase??Zs.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(Ug):null,l=t.get(LC,null,{optional:!0}),c=new km(i.impl,_M(e,o),l?.view,r,a,s?.snapshot(null));return i.impl.register(c),c}var EM=()=>null;function VC(e,t,n=!1){return EM(e,t,n)}function UC(e,t){let n=e.contentQueries;if(n!==null){let r=$e(null);try{for(let i=0;i<n.length;i+=2){let s=n[i],o=n[i+1];if(o!==-1){let a=e.data[o];Og(s),a.contentQueries(2,t[o],o)}}}finally{$e(r)}}}function Lm(e,t,n){Og(0);let r=$e(null);try{t(e,n)}finally{$e(r)}}function HC(e,t,n){if($b(t)){let r=$e(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=n[o];a.contentQueries(1,l,o)}}}finally{$e(r)}}}var Zr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Zr||{}),Hu;function wM(){if(Hu===void 0&&(Hu=null,Lc.trustedTypes))try{Hu=Lc.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Hu}function Rd(e){return wM()?.createHTML(e)||e}var ju;function bM(){if(ju===void 0&&(ju=null,Lc.trustedTypes))try{ju=Lc.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return ju}function Kw(e){return bM()?.createHTML(e)||e}var Mi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${_b})`}},Fm=class extends Mi{getTypeName(){return"HTML"}},Bm=class extends Mi{getTypeName(){return"Style"}},Vm=class extends Mi{getTypeName(){return"Script"}},Um=class extends Mi{getTypeName(){return"URL"}},Hm=class extends Mi{getTypeName(){return"ResourceURL"}};function ei(e){return e instanceof Mi?e.changingThisBreaksApplicationSecurity:e}function uo(e,t){let n=CM(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${_b})`)}return n===t}function CM(e){return e instanceof Mi&&e.getTypeName()||null}function jC(e){return new Fm(e)}function $C(e){return new Bm(e)}function WC(e){return new Vm(e)}function GC(e){return new Um(e)}function zC(e){return new Hm(e)}function SM(e){let t=new $m(e);return DM()?new jm(t):t}var jm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(Rd(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},$m=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=Rd(e),t}};function DM(){try{return!!new window.DOMParser().parseFromString(Rd(""),"text/html")}catch{return!1}}var IM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Nd(e){return e=String(e),e.match(IM)?e:"unsafe:"+e}function Vi(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function rl(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var qC=Vi("area,br,col,hr,img,wbr"),YC=Vi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),KC=Vi("rp,rt"),TM=rl(KC,YC),xM=rl(YC,Vi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),RM=rl(KC,Vi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Zw=rl(qC,xM,RM,TM),ZC=Vi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),NM=Vi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),AM=Vi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),MM=rl(ZC,NM,AM),OM=Vi("script,style,template"),Wm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=LM(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=kM(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=Xw(e).toLowerCase();if(!Zw.hasOwnProperty(t))return this.sanitizedSomething=!0,!OM.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),s=i.name,o=s.toLowerCase();if(!MM.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;ZC[o]&&(a=Nd(a)),this.buf.push(" ",s,'="',Jw(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=Xw(e).toLowerCase();Zw.hasOwnProperty(t)&&!qC.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(Jw(e))}};function PM(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function kM(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw XC(t);return t}function LM(e){let t=e.firstChild;if(t&&PM(e,t))throw XC(t);return t}function Xw(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function XC(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var FM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,BM=/([^\#-~ |!])/g;function Jw(e){return e.replace(/&/g,"&").replace(FM,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(BM,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var $u;function Yg(e,t){let n=null;try{$u=$u||SM(e);let r=t?String(t):"";n=$u.getInertBodyElement(r);let i=5,s=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=s,s=n.innerHTML,n=$u.getInertBodyElement(r)}while(r!==s);let o=new Wm().sanitizeChildren(Qw(n)||n);return Rd(o)}finally{if(n){let r=Qw(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function Qw(e){return"content"in e&&VM(e)?e.content:null}function VM(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ti=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ti||{});function il(e){let t=JC();return t?Kw(t.sanitize(ti.HTML,e)||""):uo(e,"HTML")?Kw(ei(e)):Yg(OC(),Zc(e))}function zt(e){let t=JC();return t?t.sanitize(ti.URL,e)||"":uo(e,"URL")?ei(e):Nd(Zc(e))}function JC(){let e=Ge();return e&&e[xi].sanitizer}function QC(e){return e.ownerDocument.defaultView}function UM(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===r||e.charCodeAt(i+s)<=32)return i}n=i+1}}var e0="ng-template";function HM(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&UM(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(Kg(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===n)return!0}return!1}function Kg(e){return e.type===4&&e.value!==e0}function jM(e,t,n){let r=e.type===4&&!n?e0:e.value;return t===r}function $M(e,t,n){let r=4,i=e.attrs,s=i!==null?zM(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Nr(r)&&!Nr(l))return!1;if(o&&Nr(l))continue;o=!1,r=l|r&1;continue}if(!o)if(r&4){if(r=2|r&1,l!==""&&!jM(e,l,n)||l===""&&t.length===1){if(Nr(r))return!1;o=!0}}else if(r&8){if(i===null||!HM(e,i,l,n)){if(Nr(r))return!1;o=!0}}else{let c=t[++a],h=WM(l,i,Kg(e),n);if(h===-1){if(Nr(r))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),r&2&&c!==d){if(Nr(r))return!1;o=!0}}}}return Nr(r)||o}function Nr(e){return(e&1)===0}function WM(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return qM(t,e)}function GM(e,t,n=!1){for(let r=0;r<t.length;r++)if($M(e,t[r],n))return!0;return!1}function zM(e){for(let t=0;t<e.length;t++){let n=e[t];if(VA(n))return t}return e.length}function qM(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function eb(e,t){return e?":not("+t.trim()+")":t}function YM(e){let t=e[0],n=1,r=2,i="",s=!1;for(;n<e.length;){let o=e[n];if(typeof o=="string")if(r&2){let a=e[++n];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+o:r&4&&(i+=" "+o);else i!==""&&!Nr(o)&&(t+=eb(s,i),i=""),r=o,s=s||!Nr(r);n++}return i!==""&&(t+=eb(s,i)),t}function KM(e){return e.map(YM).join(",")}function ZM(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let s=e[r];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++r]):i===8&&n.push(s);else{if(!Nr(i))break;i=s}r++}return n.length&&t.push(1,...n),t}var Ui={};function XM(e,t){return e.createText(t)}function JM(e,t,n){e.setValue(t,n)}function t0(e,t,n){return e.createElement(t,n)}function fd(e,t,n,r,i){e.insertBefore(t,n,r,i)}function n0(e,t,n){e.appendChild(t,n)}function tb(e,t,n,r,i){r!==null?fd(e,t,n,r,i):n0(e,t,n)}function QM(e,t,n){e.removeChild(null,t,n)}function eO(e,t,n){e.setAttribute(t,"style",n)}function tO(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function r0(e,t,n){let{mergedAttrs:r,classes:i,styles:s}=n;r!==null&&BA(e,t,r),i!==null&&tO(e,t,i),s!==null&&eO(e,t,s)}function Zg(e,t,n,r,i,s,o,a,l,c,h){let d=wn+r,f=d+i,g=nO(d,f),m=typeof c=="function"?c():c;return g[Te]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function nO(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Ui);return n}function rO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Zg(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function Xg(e,t,n,r,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[ki]=i,d[Ee]=r|4|128|8|64|1024,(c!==null||e&&e[Ee]&2048)&&(d[Ee]|=2048),Zb(d),d[xn]=d[sa]=e,d[tn]=n,d[xi]=o||e&&e[xi],d[cn]=a||e&&e[cn],d[Hc]=l||e&&e[Hc]||null,d[Pr]=s,d[Sd]=uM(),d[Uc]=h,d[Hb]=c,d[Mr]=t.type==2?e[Mr]:d,d}function iO(e,t,n){let r=Jr(t,e),i=rO(n),s=e[xi].rendererFactory,o=Jg(e,Xg(e,i,null,i0(n),r,t,null,s.createRenderer(r,n),null,null,null));return e[t.index]=o}function i0(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function o0(e,t,n,r){if(n===0)return-1;let i=t.length;for(let s=0;s<n;s++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function Jg(e,t){return e[jc]?e[Lw][Ar]=t:e[jc]=t,e[Lw]=t,t}function Y(e=1){s0(un(),Ge(),co()+e,!1)}function s0(e,t,n,r){if(!r)if((t[Ee]&3)===3){let i=e.preOrderCheckHooks;i!==null&&zu(t,i,n)}else{let i=e.preOrderHooks;i!==null&&qu(t,i,0,n)}Go(n)}var Ad=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Ad||{});function Gm(e,t,n,r){let i=$e(null);try{let[s,o,a]=e.inputs[n],l=null;(o&Ad.SignalBased)!==0&&(l=t[s][Ii]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,l,r,n,s):Wb(t,l,s,r)}finally{$e(i)}}function a0(e,t,n,r,i){let s=co(),o=r&2;try{Go(-1),o&&t.length>wn&&s0(e,t,wn,!1),vt(o?2:0,i),n(r,i)}finally{Go(s),vt(o?3:1,i)}}function Qg(e,t,n){uO(e,t,n),(n.flags&64)===64&&dO(e,t,n)}function c0(e,t,n=Jr){let r=t.localNames;if(r!==null){let i=t.index+1;for(let s=0;s<r.length;s+=2){let o=r[s+1],a=o===-1?n(t,e):e[o];e[i++]=a}}}function oO(e,t,n,r){let i=r.get(mM,kC)||n===Zr.ShadowDom,s=e.selectRootElement(t,i);return sO(s),s}function sO(e){aO(e)}var aO=()=>null;function cO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function l0(e,t,n,r,i,s,o,a){if(!a&&ev(t,e,n,r,i)){aa(t)&&lO(n,t.index);return}if(t.type&3){let l=Jr(t,n);r=cO(r),i=o!=null?o(i,t.value||"",r):i,s.setProperty(l,r,i)}else t.type&12}function lO(e,t){let n=Kr(t,e);n[Ee]&16||(n[Ee]|=64)}function uO(e,t,n){let r=n.directiveStart,i=n.directiveEnd;aa(n)&&iO(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||cd(n,t);let s=n.initialInputs;for(let o=r;o<i;o++){let a=e.data[o],l=Wc(t,e,o,n);if(tl(l,t),s!==null&&mO(t,o-r,l,a,n,s),qr(a)){let c=Kr(n.index,t);c[tn]=Wc(t,e,o,n)}}}function dO(e,t,n){let r=n.directiveStart,i=n.directiveEnd,s=n.index,o=TA();try{Go(s);for(let a=r;a<i;a++){let l=e.data[a],c=t[a];Sm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&fO(l,c)}}finally{Go(-1),Sm(o)}}function fO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function u0(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let s=n[i];GM(t,s.selectors,!1)&&(r??=[],qr(s)?r.unshift(s):r.push(s))}return r}function pO(e,t,n,r,i,s){let o=Jr(e,t);hO(t[cn],o,s,e.value,n,r,i)}function hO(e,t,n,r,i,s,o){if(s==null)e.removeAttribute(t,i,n);else{let a=o==null?Zc(s):o(s,r||"",i);e.setAttribute(t,i,a,n)}}function mO(e,t,n,r,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];Gm(r,n,l,c)}}function d0(e,t){let n=e[Hc],r=n?n.get(Ai,null):null;r&&r.handleError(t)}function ev(e,t,n,r,i){let s=e.inputs?.[r],o=e.hostDirectiveInputs?.[r],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];Gm(d,n[c],h,i),a=!0}if(s)for(let l of s){let c=n[l],h=t.data[l];Gm(h,c,r,i),a=!0}return a}function gO(e,t){let n=Kr(t,e),r=n[Te];vO(r,n);let i=n[ki];i!==null&&n[Uc]===null&&(n[Uc]=VC(i,n[Hc])),vt(18),tv(r,n,n[tn]),vt(19,n[tn])}function vO(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function tv(e,t,n){Pg(t);try{let r=e.viewQuery;r!==null&&Lm(1,r,n);let i=e.template;i!==null&&a0(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ri]?.finishViewCreation(e),e.staticContentQueries&&UC(e,t),e.staticViewQueries&&Lm(2,e.viewQuery,n);let s=e.components;s!==null&&yO(t,s)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[Ee]&=-5,kg()}}function yO(e,t){for(let n=0;n<t.length;n++)gO(e,t[n])}function Md(e,t,n,r){let i=$e(null);try{let s=t.tView,o=e[Ee]&4096?4096:16,a=Xg(e,s,n,o,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[jo]=l;let c=e[Ri];return c!==null&&(a[Ri]=c.createEmbeddedView(s)),tv(s,a,n),a}finally{$e(i)}}function Gc(e,t){return!t||t.firstChild===null||IC(e)}var _O;function nv(e,t){return _O(e,t)}var Xr=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Xr||{});function f0(e){return(e.flags&32)===32}function Xs(e,t,n,r,i){if(r!=null){let s,o=!1;Li(r)?s=r:oo(r)&&(o=!0,r=r[ki]);let a=Yr(r);e===0&&n!==null?i==null?n0(t,n,a):fd(t,n,a,i||null,!0):e===1&&n!==null?fd(t,n,a,i||null,!0):e===2?QM(t,a,o):e===3&&t.destroyNode(a),s!=null&&AO(t,e,s,n,i)}}function EO(e,t){p0(e,t),t[ki]=null,t[Pr]=null}function wO(e,t,n,r,i,s){r[ki]=i,r[Pr]=t,Pd(e,r,n,1,i,s)}function p0(e,t){t[xi].changeDetectionScheduler?.notify(9),Pd(e,t,t[cn],2,null,null)}function bO(e){let t=e[jc];if(!t)return am(e[Te],e);for(;t;){let n=null;if(oo(t))n=t[jc];else{let r=t[Tn];r&&(n=r)}if(!n){for(;t&&!t[Ar]&&t!==e;)oo(t)&&am(t[Te],t),t=t[xn];t===null&&(t=e),oo(t)&&am(t[Te],t),n=t&&t[Ar]}t=n}}function rv(e,t){let n=e[na],r=n.indexOf(t);n.splice(r,1)}function Od(e,t){if(Jc(t))return;let n=t[cn];n.destroyNode&&Pd(e,t,n,3,null,null),bO(t)}function am(e,t){if(Jc(t))return;let n=$e(null);try{t[Ee]&=-129,t[Ee]|=256,t[Xn]&&Hh(t[Xn]),SO(e,t),CO(e,t),t[Te].type===1&&t[cn].destroy();let r=t[jo];if(r!==null&&Li(t[xn])){r!==t[xn]&&rv(r,t);let i=t[Ri];i!==null&&i.detachView(e)}Om(t)}finally{$e(n)}}function CO(e,t){let n=e.cleanup,r=t[td];if(n!==null)for(let o=0;o<n.length-1;o+=2)if(typeof n[o]=="string"){let a=n[o+3];a>=0?r[a]():r[-a].unsubscribe(),o+=2}else{let a=r[n[o+1]];n[o].call(a)}r!==null&&(t[td]=null);let i=t[io];if(i!==null){t[io]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[nd];if(s!==null){t[nd]=null;for(let o of s)o.destroy()}}function SO(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=t[n[r]];if(!(i instanceof zo)){let s=n[r+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];vt(4,a,l);try{l.call(a)}finally{vt(5,a,l)}}else{vt(4,i,s);try{s.call(i)}finally{vt(5,i,s)}}}}}function DO(e,t,n){return IO(e,t.parent,n)}function IO(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[ki];if(aa(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Zr.None||i===Zr.Emulated)return null}return Jr(r,n)}function TO(e,t,n){return RO(e,t,n)}function xO(e,t,n){return e.type&40?Jr(e,n):null}var RO=xO,nb;function iv(e,t,n,r){let i=DO(e,r,t),s=t[cn],o=r.parent||t[Pr],a=TO(o,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)tb(s,i,n[l],a,!1);else tb(s,i,n,a,!1);nb!==void 0&&nb(s,r,t,n,i)}function Pc(e,t){if(t!==null){let n=t.type;if(n&3)return Jr(t,e);if(n&4)return zm(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Pc(e,r);{let i=e[t.index];return Li(i)?zm(-1,i):Yr(i)}}else{if(n&128)return Pc(e,t.next);if(n&32)return nv(t,e)()||Yr(e[t.index]);{let r=h0(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Wo(e[Mr]);return Pc(i,r)}else return Pc(e,t.next)}}}return null}function h0(e,t){if(t!==null){let n=e[Mr][Pr],r=t.projection;return n.projection[r]}return null}function zm(e,t){let n=Tn+e+1;if(n<t.length){let r=t[n],i=r[Te].firstChild;if(i!==null)return Pc(r,i)}return t[$o]}function ov(e,t,n,r,i,s,o){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(o&&t===0&&(a&&tl(Yr(a),r),n.flags|=2),!f0(n))if(l&8)ov(e,t,n.child,r,i,s,!1),Xs(t,e,i,a,s);else if(l&32){let c=nv(n,r),h;for(;h=c();)Xs(t,e,i,h,s);Xs(t,e,i,a,s)}else l&16?NO(e,t,r,n,i,s):Xs(t,e,i,a,s);n=o?n.projectionNext:n.next}}function Pd(e,t,n,r,i,s){ov(n,r,e.firstChild,t,i,s,!1)}function NO(e,t,n,r,i,s){let o=n[Mr],a=o[Pr].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];Xs(t,e,i,c,s)}else{let l=a,c=o[xn];IC(r)&&(l.flags|=128),ov(e,t,l,c,i,s,!0)}}function AO(e,t,n,r,i){let s=n[$o],o=Yr(n);s!==o&&Xs(t,e,r,s,i);for(let a=Tn;a<n.length;a++){let l=n[a];Pd(l[Te],l,e,t,r,s)}}function MO(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let s=r.indexOf("-")===-1?void 0:Xr.DashCase;i==null?e.removeStyle(n,r,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Xr.Important),e.setStyle(n,r,i,s))}}function pd(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let s=t[n.index];s!==null&&r.push(Yr(s)),Li(s)&&OO(s,r);let o=n.type;if(o&8)pd(e,t,n.child,r);else if(o&32){let a=nv(n,t),l;for(;l=a();)r.push(l)}else if(o&16){let a=h0(t,n);if(Array.isArray(a))r.push(...a);else{let l=Wo(t[Mr]);pd(l[Te],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function OO(e,t){for(let n=Tn;n<e.length;n++){let r=e[n],i=r[Te].firstChild;i!==null&&pd(r[Te],r,i,t)}e[$o]!==e[ki]&&t.push(e[$o])}function m0(e){if(e[Qs]!==null){for(let t of e[Qs])t.impl.addSequence(t);e[Qs].length=0}}var g0=[];function PO(e){return e[Xn]??kO(e)}function kO(e){let t=g0.pop()??Object.create(FO);return t.lView=e,t}function LO(e){e.lView[Xn]!==e&&(e.lView=null,g0.push(e))}var FO=re(w({},uu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{Qc(e.lView)},consumerOnSignalRead(){this.lView[Xn]=this}});function BO(e){let t=e[Xn]??Object.create(VO);return t.lView=e,t}var VO=re(w({},uu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Wo(e.lView);for(;t&&!v0(t[Te]);)t=Wo(t);t&&Ag(t)},consumerOnSignalRead(){this.lView[Xn]=this}});function v0(e){return e.type!==2}function y0(e){if(e[nd]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[nd])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[Ee]&8192)}}var UO=100;function _0(e,t=!0,n=0){let r=e[xi].rendererFactory,i=!1;i||r.begin?.();try{HO(e,n)}catch(s){throw t&&d0(e,s),s}finally{i||r.end?.()}}function HO(e,t){let n=rC();try{Bw(!0),qm(e,t);let r=0;for(;Dd(e);){if(r===UO)throw new Me(103,!1);r++,qm(e,1)}}finally{Bw(n)}}function jO(e,t,n,r){if(Jc(t))return;let i=t[Ee],s=!1,o=!1;Pg(t);let a=!0,l=null,c=null;s||(v0(e)?(c=PO(t),l=Vh(c)):jE()===null?(a=!1,c=BO(t),l=Vh(c)):t[Xn]&&(Hh(t[Xn]),t[Xn]=null));try{Zb(t),CA(e.bindingStartIndex),n!==null&&a0(e,t,n,2,r);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&zu(t,g,null)}else{let g=e.preOrderHooks;g!==null&&qu(t,g,0,null),im(t,0)}if(o||$O(t),y0(t),E0(t,0),e.contentQueries!==null&&UC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&zu(t,g)}else{let g=e.contentHooks;g!==null&&qu(t,g,1),im(t,1)}GO(e,t);let d=e.components;d!==null&&b0(t,d,0);let f=e.viewQuery;if(f!==null&&Lm(2,f,r),!s)if(h){let g=e.viewCheckHooks;g!==null&&zu(t,g)}else{let g=e.viewHooks;g!==null&&qu(t,g,2),im(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[rm]){for(let g of t[rm])g();t[rm]=null}s||(m0(t),t[Ee]&=-73)}catch(h){throw s||Qc(t),h}finally{c!==null&&(zE(c,l),a&&LO(c)),kg()}}function E0(e,t){for(let n=RC(e);n!==null;n=NC(n))for(let r=Tn;r<n.length;r++){let i=n[r];w0(i,t)}}function $O(e){for(let t=RC(e);t!==null;t=NC(t)){if(!(t[Ee]&2))continue;let n=t[na];for(let r=0;r<n.length;r++){let i=n[r];Ag(i)}}}function WO(e,t,n){vt(18);let r=Kr(t,e);w0(r,n),vt(19,r[tn])}function w0(e,t){Ng(e)&&qm(e,t)}function qm(e,t){let n=e[Te],r=e[Ee],i=e[Xn],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(i?.dirty&&Uh(i)),s||=!1,i&&(i.dirty=!1),e[Ee]&=-9217,s)jO(n,e,n.template,e[tn]);else if(r&8192){y0(e),E0(e,1);let o=n.components;o!==null&&b0(e,o,1),m0(e)}}function b0(e,t,n){for(let r=0;r<t.length;r++)WO(e,t[r],n)}function GO(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)Go(~i);else{let s=i,o=n[++r],a=n[++r];IA(o,s);let l=t[s];vt(24,l),a(2,l),vt(25,l)}}}finally{Go(-1)}}function sv(e,t){let n=rC()?64:1088;for(e[xi].changeDetectionScheduler?.notify(t);e;){e[Ee]|=n;let r=Wo(e);if(id(e)&&!r)return e;e=r}return null}function C0(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function S0(e,t){let n=Tn+t;if(n<e.length)return e[n]}function kd(e,t,n,r=!0){let i=t[Te];if(zO(i,t,e,n),r){let o=zm(n,e),a=t[cn],l=a.parentNode(e[$o]);l!==null&&wO(i,e[Pr],a,t,l,o)}let s=t[Uc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function D0(e,t){let n=zc(e,t);return n!==void 0&&Od(n[Te],n),n}function zc(e,t){if(e.length<=Tn)return;let n=Tn+t,r=e[n];if(r){let i=r[jo];i!==null&&i!==e&&rv(i,r),t>0&&(e[n-1][Ar]=r[Ar]);let s=Qu(e,Tn+t);EO(r[Te],r);let o=s[Ri];o!==null&&o.detachView(s[Te]),r[xn]=null,r[Ar]=null,r[Ee]&=-129}return r}function zO(e,t,n,r){let i=Tn+r,s=n.length;r>0&&(n[i-1][Ar]=t),r<s-Tn?(t[Ar]=n[i],xb(n,Tn+r,t)):(n.push(t),t[Ar]=null),t[xn]=n;let o=t[jo];o!==null&&n!==o&&I0(o,t);let a=t[Ri];a!==null&&a.insertView(e),bm(t),t[Ee]|=128}function I0(e,t){let n=e[na],r=t[xn];if(oo(r))e[Ee]|=2;else{let i=r[xn][Mr];t[Mr]!==i&&(e[Ee]|=2)}n===null?e[na]=[t]:n.push(t)}var qo=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[Te];return pd(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[tn]}get dirty(){return!!(this._lView[Ee]&9280)||!!this._lView[Xn]?.dirty}set context(e){this._lView[tn]=e}get destroyed(){return Jc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[xn];if(Li(e)){let t=e[rd],n=t?t.indexOf(this):-1;n>-1&&(zc(e,n),Qu(t,n))}this._attachedToViewContainer=!1}Od(this._lView[Te],this._lView)}onDestroy(e){Xb(this._lView,e)}markForCheck(){sv(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Ag(this._cdRefInjectingView||this._lView)}detach(){this._lView[Ee]&=-129}reattach(){bm(this._lView),this._lView[Ee]|=128}detectChanges(){this._lView[Ee]|=1024,_0(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Me(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=id(this._lView),t=this._lView[jo];t!==null&&!e&&rv(t,this._lView),p0(this._lView[Te],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Me(902,!1);this._appRef=e;let t=id(this._lView),n=this._lView[jo];n!==null&&!t&&I0(n,this._lView),bm(this._lView)}},Or=(()=>{class e{static __NG_ELEMENT_ID__=KO}return e})(),qO=Or,YO=class extends qO{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Md(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new qo(r)}};function KO(){return av(pr(),Ge())}function av(e,t){return e.type&4?new YO(t,e,ua(e,t)):null}function Ld(e,t,n,r,i){let s=e.data[t];if(s===null)s=ZO(e,t,n,r,i),DA()&&(s.flags|=32);else if(s.type&64){s.type=n,s.value=r,s.attrs=i;let o=EA();s.injectorIndex=o===null?-1:o.injectorIndex}return la(s,!0),s}function ZO(e,t,n,r,i){let s=tC(),o=nC(),a=o?s:s&&s.parent,l=e.data[t]=JO(e,a,n,t,r,i);return XO(e,l,s,o),l}function XO(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function JO(e,t,n,r,i,s){let o=t?t.injectorIndex:-1,a=0;return vA()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var SW=new RegExp(`^(\\d+)*(${hM}|${pM})*(.*)`),QO=()=>null;function qc(e,t){return QO(e,t)}var Ym=class{},hd=class{},Km=class{resolveComponentFactory(e){throw Error(`No component factory found for ${dr(e)}.`)}},ao=class{static NULL=new Km},ln=class{},Zo=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>eP()}return e})();function eP(){let e=Ge(),t=pr(),n=Kr(t.index,e);return(oo(n)?n:e)[cn]}var tP=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>null})}return e})();function rb(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=Nw(i,a);else if(s==2){let l=a,c=t[++o];r=Nw(r,l+": "+c+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function bt(e,t=Je.Default){let n=Ge();if(n===null)return et(e,t);let r=pr();return _C(r,n,Pn(e),t)}function T0(e,t,n,r,i){let s=r===null?null:{"":-1},o=i(e,n);if(o!==null){let a,l=null,c=null,h=rP(o);h===null?a=o:[a,l,c]=h,sP(e,t,n,a,s,l,c)}s!==null&&r!==null&&nP(n,r,s)}function nP(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=n[t[i+1]];if(s==null)throw new Me(-301,!1);r.push(t[i],s)}}function rP(e){let t=null,n=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&qr(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,s??=new Map,iP(o,r,s,i)),o===t&&(r??=[],r.push(o));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,s]):null}function iP(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function oP(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function sP(e,t,n,r,i,s,o){let a=r.length,l=!1;for(let f=0;f<a;f++){let g=r[f];!l&&qr(g)&&(l=!0,oP(e,n,f)),Tm(cd(n,t),e,g.type)}fP(n,e.data.length,a);for(let f=0;f<a;f++){let g=r[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=o0(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=r[f];if(n.mergedAttrs=$c(n.mergedAttrs,g.hostAttrs),cP(e,n,t,d,g),dP(d,g,i),o!==null&&o.has(g)){let[b,I]=o.get(g);n.directiveToIndex.set(g.type,[d,b+n.directiveStart,I+n.directiveStart])}else(s===null||!s.has(g))&&n.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),h=!0),d++}aP(e,n,s)}function aP(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))ib(0,t,i,r),ib(1,t,i,r),sb(t,r,!1);else{let s=n.get(i);ob(0,t,s,r),ob(1,t,s,r),sb(t,r,!0)}}}function ib(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(r),x0(t,s)}}function ob(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(r,s),x0(t,o)}}function x0(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function sb(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:s}=e;if(r===null||!n&&i===null||n&&s===null||Kg(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<r.length;){let l=r[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!n&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,r[a+1]);break}}else if(n&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function cP(e,t,n,r,i){e.data[r]=i;let s=i.factory||(i.factory=Vo(i.type,!0)),o=new zo(s,qr(i),bt);e.blueprint[r]=o,n[r]=o,lP(e,t,r,o0(e,n,i.hostVars,Ui),i)}function lP(e,t,n,r,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;uP(o)!=a&&o.push(a),o.push(n,r,s)}}function uP(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function dP(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;qr(t)&&(n[""]=e)}}function fP(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function R0(e,t,n,r,i,s,o,a){let l=t.consts,c=ra(l,o),h=Ld(t,e,2,r,c);return s&&T0(t,n,h,ra(l,a),i),h.mergedAttrs=$c(h.mergedAttrs,h.attrs),h.attrs!==null&&rb(h,h.attrs,!1),h.mergedAttrs!==null&&rb(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function N0(e,t){dC(e,t),$b(t)&&e.queries.elementEnd(t)}var Zm=class extends ao{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Ho(e);return new Yc(t,this.ngModule)}};function pP(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],s={propName:n,templateName:t,isSignal:(r&Ad.SignalBased)!==0};return i&&(s.transform=i),s})}function hP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function mP(e,t,n){let r=t instanceof Wn?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Dm(n,r):n}function gP(e){let t=e.get(ln,null);if(t===null)throw new Me(407,!1);let n=e.get(tP,null),r=e.get(Ni,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function vP(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return t0(t,n,n==="svg"?Yb:n==="math"?cA:null)}var Yc=class extends hd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return pP(this.componentDef.inputs)}get outputs(){return hP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=KM(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){vt(22);let i=$e(null);try{let s=this.componentDef,o=n?["ng-version","19.2.0"]:ZM(this.componentDef.selectors[0]),a=Zg(0,null,null,1,0,null,null,null,null,[o],null),l=mP(s,r||this.ngModule,e),c=gP(l),h=c.rendererFactory.createRenderer(null,s),d=n?oO(h,n,s.encapsulation,l):vP(s,h),f=Xg(null,a,null,512|i0(s),null,null,c,h,l,null,VC(d,l,!0));f[wn]=d,Pg(f);let g=null;try{let m=R0(wn,a,f,"#host",()=>[this.componentDef],!0,0);d&&(r0(h,d,m),tl(d,f)),Qg(a,f,m),HC(a,m,f),N0(a,m),t!==void 0&&yP(m,this.ngContentSelectors,t),g=Kr(m.index,f),f[tn]=g[tn],tv(a,f,null)}catch(m){throw g!==null&&Om(g),Om(f),m}finally{vt(23),kg()}return new Xm(this.componentType,f)}finally{$e(i)}}},Xm=class extends Ym{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=xg(t[Te],wn),this.location=ua(this._tNode,t),this.instance=Kr(this._tNode.index,t)[tn],this.hostView=this.changeDetectorRef=new qo(t,void 0,!1),this.componentType=e}setInput(e,t){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,i=ev(n,r[Te],r,e,t);this.previousInputValues.set(e,t);let s=Kr(n.index,r);sv(s,1)}get injector(){return new Bo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function yP(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let s=n[i];r.push(s!=null&&s.length?Array.from(s):null)}}var ni=(()=>{class e{static __NG_ELEMENT_ID__=_P}return e})();function _P(){let e=pr();return M0(e,Ge())}var EP=ni,A0=class extends EP{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return ua(this._hostTNode,this._hostLView)}get injector(){return new Bo(this._hostTNode,this._hostLView)}get parentInjector(){let e=Vg(this._hostTNode,this._hostLView);if(pC(e)){let t=sd(e,this._hostLView),n=od(e),r=t[Te].data[n+8];return new Bo(r,t)}else return new Bo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=ab(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Tn}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let s=qc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,r,Gc(this._hostTNode,s)),o}createComponent(e,t,n,r,i){let s=e&&!iA(e),o;if(s)o=t;else{let g=t||{};o=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new Yc(Ho(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Wn,null);g&&(i=g)}let c=Ho(a.componentType??{}),h=qc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,r,d,i);return this.insertImpl(f.hostView,o,Gc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(uA(r)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=r[xn],l=new A0(a,a[Pr],a[xn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return kd(s,r,i,n),e.attachToViewContainerRef(),xb(cm(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=ab(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);n&&(Qu(cm(this._lContainer),t),Od(n[Te],n))}detach(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);return n&&Qu(cm(this._lContainer),t)!=null?new qo(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function ab(e){return e[rd]}function cm(e){return e[rd]||(e[rd]=[])}function M0(e,t){let n,r=t[e.index];return Li(r)?n=r:(n=C0(r,t,null,e),t[e.index]=n,Jg(t,n)),bP(n,t,e,r),new A0(n,e,t)}function wP(e,t){let n=e[cn],r=n.createComment(""),i=Jr(t,e),s=n.parentNode(i);return fd(n,s,r,n.nextSibling(i),!1),r}var bP=DP,CP=()=>!1;function SP(e,t,n){return CP(e,t,n)}function DP(e,t,n,r){if(e[$o])return;let i;n.type&8?i=Yr(r):i=wP(t,n),e[$o]=i}var Jm=class DS{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new DS(this.queryList)}setDirty(){this.queryList.setDirty()}},Qm=class OS{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let s=0;s<r;s++){let o=n.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new OS(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)cv(t,n).matches!==null&&this.queries[n].setDirty()}},eg=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=OP(e):this.predicate=e}},tg=class kS{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,s=this.getByIndex(r).embeddedTView(t,i);s&&(s.indexInDeclarationView=r,n!==null?n.push(s):n=[s])}return n!==null?new kS(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},ng=class RS{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new RS(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let s=r[i];this.matchTNodeWithReadOption(t,n,IP(n,s)),this.matchTNodeWithReadOption(t,n,Yu(n,t,s,!1,!1))}else r===Or?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Yu(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Nt||i===ni||i===Or&&n.type&4)this.addMatch(n.index,-2);else{let s=Yu(n,t,i,!1,!1);s!==null&&this.addMatch(n.index,s)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function IP(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function TP(e,t){return e.type&11?ua(e,t):e.type&4?av(e,t):null}function xP(e,t,n,r){return n===-1?TP(t,e):n===-2?RP(e,t,r):Wc(e,e[Te],n,t)}function RP(e,t,n){if(n===Nt)return ua(t,e);if(n===Or)return av(t,e);if(n===ni)return M0(t,e)}function O0(e,t,n,r){let i=t[Ri].queries[r];if(i.matches===null){let s=e.data,o=n.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(xP(t,h,o[l+1],n.metadata.read))}}i.matches=a}return i.matches}function rg(e,t,n,r){let i=e.queries.getByIndex(n),s=i.matches;if(s!==null){let o=O0(e,t,i,n);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)r.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=Tn;d<h.length;d++){let f=h[d];f[jo]===f[xn]&&rg(f[Te],f,c,r)}if(h[na]!==null){let d=h[na];for(let f=0;f<d.length;f++){let g=d[f];rg(g[Te],g,c,r)}}}}}return r}function NP(e,t){return e[Ri].queries[t].queryList}function AP(e,t,n){let r=new Mm((n&4)===4);return pA(e,t,r,r.destroy),(t[Ri]??=new Qm).queries.push(new Jm(r))-1}function MP(e,t,n){let r=un();return r.firstCreatePass&&(PP(r,new eg(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),AP(r,Ge(),t)}function OP(e){return e.split(",").map(t=>t.trim())}function PP(e,t,n){e.queries===null&&(e.queries=new tg),e.queries.track(new ng(t,n))}function cv(e,t){return e.queries.getByIndex(t)}function kP(e,t){let n=e[Te],r=cv(n,t);return r.crossesNgTemplate?rg(n,e,t,[]):O0(n,e,r,t)}var Oi=class{},md=class extends Oi{injector;componentFactoryResolver=new Zm(this);instance=null;constructor(e){super();let t=new Vc([...e.providers,{provide:Oi,useValue:this},{provide:ao,useValue:this.componentFactoryResolver}],e.parent||Cd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function LP(e,t,n=null){return new md({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var FP=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=Pb(!1,n.type),i=r.length>0?LP([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=oe({token:e,providedIn:"environment",factory:()=>new e(et(Wn))})}return e})();function at(e){return Ed(()=>{let t=P0(e),n=re(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===TC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(FP).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Zr.Emulated,styles:e.styles||so,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&lo("NgStandalone"),k0(n);let r=e.dependencies;return n.directiveDefs=cb(r,!1),n.pipeDefs=cb(r,!0),n.id=jP(n),n})}function BP(e){return Ho(e)||Ab(e)}function VP(e){return e!==null}function UP(e,t){if(e==null)return Uo;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Ad.None,l=null),n[s]=[r,a,l],t[s]=o}return n}function HP(e){if(e==null)return Uo;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function kr(e){return Ed(()=>{let t=P0(e);return k0(t),t})}function Xo(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function P0(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||Uo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||so,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:UP(e.inputs,t),outputs:HP(e.outputs),debugInfo:null}}function k0(e){e.features?.forEach(t=>t(e))}function cb(e,t){if(!e)return null;let n=t?Mb:BP;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(VP)}function jP(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function $P(e){return Object.getPrototypeOf(e.prototype).constructor}function ri(e){let t=$P(e.type),n=!0,r=[e];for(;t;){let i;if(qr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Me(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let o=e;o.inputs=lm(e.inputs),o.declaredInputs=lm(e.declaredInputs),o.outputs=lm(e.outputs);let a=i.hostBindings;a&&YP(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&zP(e,l),c&&qP(e,c),WP(e,i),bN(e.outputs,i.outputs),qr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===ri&&(n=!1)}}t=Object.getPrototypeOf(t)}GP(r)}function WP(e,t){for(let n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function GP(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=$c(i.hostAttrs,n=$c(n,i.hostAttrs))}}function lm(e){return e===Uo?{}:e===so?[]:e}function zP(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function qP(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,s)=>{t(r,i,s),n(r,i,s)}:e.contentQueries=t}function YP(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function L0(e){return e!==null&&(typeof e=="function"||typeof e=="object")}function F0(e,t,n){return e[t]=n}function Pi(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function KP(e,t,n,r){let i=Pi(e,t,n);return Pi(e,t+1,r)||i}function ZP(e,t,n,r,i,s,o,a,l){let c=t.consts,h=Ld(t,e,4,o||null,a||null);eC()&&T0(t,n,h,ra(c,l),u0),h.mergedAttrs=$c(h.mergedAttrs,h.attrs),dC(t,h);let d=h.tView=Zg(2,h,r,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function ig(e,t,n,r,i,s,o,a,l,c){let h=n+wn,d=t.firstCreatePass?ZP(h,t,e,r,i,s,o,a,l):t.data[h];la(d,!1);let f=XP(t,e,d,n);Fg()&&iv(t,e,f,d),tl(f,e);let g=C0(f,e,f,d);return e[h]=g,Jg(e,g),SP(g,d,e),Tg(d)&&Qg(t,e,d),l!=null&&c0(e,d,c),d}function At(e,t,n,r,i,s,o,a){let l=Ge(),c=un(),h=ra(c.consts,s);return ig(l,c,e,t,n,r,i,h,o,a),At}var XP=JP;function JP(e,t,n,r){return Bg(!0),t[cn].createComment("")}var B0=new he(""),QP=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:()=>new og})}return e})(),og=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function lv(e){return!!e&&typeof e.then=="function"}function V0(e){return!!e&&typeof e.subscribe=="function"}var e1=new he(""),U0=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=O(e1,{optional:!0})??[];injector=O(yt);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=Bb(this.injector,i);if(lv(s))n.push(s);else if(V0(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});n.push(o)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),t1=new he("");function n1(){JE(()=>{throw new Me(600,!1)})}function r1(e){return e.isBoundToModule}var i1=10,fr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(iM);afterRenderManager=O(FC);zonelessEnabled=O(Td);rootEffectScheduler=O(QP);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new ie;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(xd).hasPendingTasks.pipe(ur(n=>!n));constructor(){O(da,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=O(Wn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){vt(10);let i=n instanceof hd;if(!this._injector.get(U0).done){let d=!i&&zN(n),f=!1;throw new Me(405,f)}let s;i?s=n:s=this._injector.get(ao).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let o=r1(s)?void 0:this._injector.get(Oi),a=r||s.selector,l=s.create(yt.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(B0,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),Ku(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),vt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){vt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(zg.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Me(101,!1);let n=$e(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,$e(n),this.afterTick.next(),vt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(ln,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<i1;)vt(14),this.synchronizeOnce(),vt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)o1(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>Dd(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;Ku(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(t1,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Ku(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Me(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ku(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function o1(e,t,n,r){!n&&!Dd(e)||_0(e,t,n&&!r?0:1)}function fo(e,t,n,r){let i=Ge(),s=el();if(Pi(i,s,t)){let o=un(),a=Lg();pO(a,i,e,t,n,r)}return fo}function H0(e,t,n,r){return Pi(e,el(),n)?t+Zc(n)+r:Ui}function Wu(e,t){return e<<17|t<<2}function Yo(e){return e>>17&32767}function s1(e){return(e&2)==2}function a1(e,t){return e&131071|t<<17}function sg(e){return e|2}function ia(e){return(e&131068)>>2}function um(e,t){return e&-131069|t<<2}function c1(e){return(e&1)===1}function ag(e){return e|1}function l1(e,t,n,r,i,s){let o=s?t.classBindings:t.styleBindings,a=Yo(o),l=ia(o);e[r]=n;let c=!1,h;if(Array.isArray(n)){let d=n;h=d[1],(h===null||Xc(d,h)>0)&&(c=!0)}else h=n;if(i)if(l!==0){let d=Yo(e[a+1]);e[r+1]=Wu(d,a),d!==0&&(e[d+1]=um(e[d+1],r)),e[a+1]=a1(e[a+1],r)}else e[r+1]=Wu(a,0),a!==0&&(e[a+1]=um(e[a+1],r)),a=r;else e[r+1]=Wu(l,0),a===0?a=r:e[l+1]=um(e[l+1],r),l=r;c&&(e[r+1]=sg(e[r+1])),lb(e,h,r,!0),lb(e,h,r,!1),u1(t,h,e,r,s),o=Wu(a,l),s?t.classBindings=o:t.styleBindings=o}function u1(e,t,n,r,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Xc(s,t)>=0&&(n[r+1]=ag(n[r+1]))}function lb(e,t,n,r){let i=e[n+1],s=t===null,o=r?Yo(i):ia(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];d1(l,t)&&(a=!0,e[o+1]=r?ag(c):sg(c)),o=r?Yo(c):ia(c)}a&&(e[n+1]=r?sg(i):ag(i))}function d1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Xc(e,t)>=0:!1}function be(e,t,n){let r=Ge(),i=el();if(Pi(r,i,t)){let s=un(),o=Lg();l0(s,o,r,e,t,r[cn],n,!1)}return be}function ub(e,t,n,r,i){ev(t,e,n,i?"class":"style",r)}function po(e,t,n){return j0(e,t,n,!1),po}function ii(e,t){return j0(e,t,null,!0),ii}function j0(e,t,n,r){let i=Ge(),s=un(),o=SA(2);if(s.firstUpdatePass&&p1(s,e,o,r),t!==Ui&&Pi(i,o,t)){let a=s.data[co()];y1(s,a,i,i[cn],e,i[o+1]=_1(t,n),r,o)}}function f1(e,t){return t>=e.expandoStartIndex}function p1(e,t,n,r){let i=e.data;if(i[n+1]===null){let s=i[co()],o=f1(e,n);E1(s,r)&&t===null&&!o&&(t=!1),t=h1(i,s,t,r),l1(i,s,t,n,o,r)}}function h1(e,t,n,r){let i=xA(e),s=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=dm(null,e,t,n,r),n=Kc(n,t.attrs,r),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(n=dm(i,e,t,n,r),s===null){let a=m1(e,t,r);a!==void 0&&Array.isArray(a)&&(a=dm(null,e,t,a[1],r),a=Kc(a,t.attrs,r),g1(e,t,r,a))}else s=v1(e,t,r)}return s!==void 0&&(r?t.residualClasses=s:t.residualStyles=s),n}function m1(e,t,n){let r=n?t.classBindings:t.styleBindings;if(ia(r)!==0)return e[Yo(r)]}function g1(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Yo(i)]=r}function v1(e,t,n){let r,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;r=Kc(r,o,n)}return Kc(r,t.attrs,n)}function dm(e,t,n,r,i){let s=null,o=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<o&&(s=t[a],r=Kc(r,s.hostAttrs,i),s!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Kc(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),WN(e,o,n?!0:t[++s]))}return e===void 0?null:e}function y1(e,t,n,r,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=c1(c)?db(l,t,n,i,ia(c),o):void 0;if(!gd(h)){gd(s)||s1(c)&&(s=db(l,null,n,i,a,o));let d=Kb(co(),n);MO(r,o,d,i,s)}}function db(e,t,n,r,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=n[i+1];f===Ui&&(f=d?so:void 0);let g=d?tm(f,r):h===r?f:void 0;if(c&&!gd(g)&&(g=tm(l,r)),gd(g)&&(a=g,o))return a;let m=e[i+1];i=o?Yo(m):ia(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=tm(l,r))}return a}function gd(e){return e!==void 0}function _1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=dr(ei(e)))),e}function E1(e,t){return(e.flags&(t?8:16))!==0}var cg=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,i),this.attach(r,s)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function fm(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function w1(e,t,n){let r,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=fm(s,c,s,h,n);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=fm(o,f,l,g,n);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=n(s,c),I=n(o,f),A=n(s,h);if(Object.is(A,I)){let F=n(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(r??=new vd,i??=pb(e,s,o,n),lg(e,r,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))r.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)fb(e,r,n,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=fm(s,h,s,d,n);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{r??=new vd,i??=pb(e,s,o,n);let g=n(s,d);if(lg(e,r,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=n(s,h);r.set(m,e.detach(s)),o--}}}for(;!c.done;)fb(e,r,n,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));r?.forEach(l=>{e.destroy(l)})}function lg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function fb(e,t,n,r,i){if(lg(e,t,r,n(r,i)))e.updateValue(r,i);else{let s=e.create(r,i);e.attach(r,s)}}function pb(e,t,n,r){let i=new Set;for(let s=t;s<=n;s++)i.add(r(s,e.at(s)));return i}var vd=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function Vt(e,t){lo("NgControlFlow");let n=Ge(),r=el(),i=n[r]!==Ui?n[r]:-1,s=i!==-1?yd(n,wn+i):void 0,o=0;if(Pi(n,r,e)){let a=$e(null);try{if(s!==void 0&&D0(s,o),e!==-1){let l=wn+e,c=yd(n,l),h=pg(n[Te],l),d=qc(c,h.tView.ssrId),f=Md(n,h,t,{dehydratedView:d});kd(c,f,o,Gc(h,d))}}finally{$e(a)}}else if(s!==void 0){let a=S0(s,o);a!==void 0&&(a[tn]=t)}}var ug=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Tn}};function Lr(e,t){return t}var dg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Mt(e,t,n,r,i,s,o,a,l,c,h,d,f){lo("NgControlFlow");let g=Ge(),m=un(),b=l!==void 0,I=Ge(),A=a?o.bind(I[Mr][tn]):o,F=new dg(b,A);I[wn+e]=F,ig(g,m,e+1,t,n,r,i,ra(m.consts,s)),b&&ig(g,m,e+2,l,c,h,d,ra(m.consts,f))}var fg=class extends cg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-Tn}at(e){return this.getLView(e)[tn].$implicit}attach(e,t){let n=t[Uc];this.needsIndexUpdate||=e!==this.length,kd(this.lContainer,t,e,Gc(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,b1(this.lContainer,e)}create(e,t){let n=qc(this.lContainer,this.templateTNode.tView.ssrId),r=Md(this.hostLView,this.templateTNode,new ug(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){Od(e[Te],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[tn].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[tn].$index=e}getLView(e){return C1(this.lContainer,e)}};function Ot(e){let t=$e(null),n=co();try{let r=Ge(),i=r[Te],s=r[n],o=n+1,a=yd(r,o);if(s.liveCollection===void 0){let c=pg(i,o);s.liveCollection=new fg(a,r,c)}else s.liveCollection.reset();let l=s.liveCollection;if(w1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=el(),h=l.length===0;if(Pi(r,c,h)){let d=n+2,f=yd(r,d);if(h){let g=pg(i,d),m=qc(f,g.tView.ssrId),b=Md(r,g,void 0,{dehydratedView:m});kd(f,b,0,Gc(g,m))}else D0(f,0)}}}finally{$e(t)}}function yd(e,t){return e[t]}function b1(e,t){return zc(e,t)}function C1(e,t){return S0(e,t)}function pg(e,t){return xg(e,t)}function K(e,t,n,r){let i=Ge(),s=un(),o=wn+e,a=i[cn],l=s.firstCreatePass?R0(o,s,i,t,u0,eC(),n,r):s.data[o],c=S1(s,i,l,a,t,e);i[o]=c;let h=Tg(l);return la(l,!0),r0(a,c,l),!f0(l)&&Fg()&&iv(s,i,c,l),(hA()===0||h)&&tl(c,i),mA(),h&&(Qg(s,i,l),HC(s,l,i)),r!==null&&c0(i,l),K}function X(){let e=pr();nC()?wA():(e=e.parent,la(e,!1));let t=e;yA(t)&&_A(),gA();let n=un();return n.firstCreatePass&&N0(n,t),t.classesWithoutHost!=null&&LA(t)&&ub(n,t,Ge(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&FA(t)&&ub(n,t,Ge(),t.stylesWithoutHost,!1),X}function Re(e,t,n,r){return K(e,t,n,r),X(),Re}var S1=(e,t,n,r,i,s)=>(Bg(!0),t0(r,i,MA()));function dn(){return Ge()}var _d="en-US",D1=_d;function I1(e){typeof e=="string"&&(D1=e.toLowerCase().replace(/_/g,"-"))}var T1=(e,t,n)=>{};function Qe(e,t,n,r){let i=Ge(),s=un(),o=pr();return R1(s,i,i[cn],o,e,t,r),Qe}function x1(e,t,n,r){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===n&&i[s+1]===r){let a=t[td],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function R1(e,t,n,r,i,s,o){let a=Tg(r),l=e.firstCreatePass?Qb(e):null,c=t[tn],h=Jb(t),d=!0;if(r.type&3||o){let f=Jr(r,t),g=o?o(f):f,m=h.length,b=o?A=>o(Yr(A[r.index])):r.index,I=null;if(!o&&a&&(I=x1(e,t,i,r.index)),I!==null){let A=I.__ngLastListenerFn__||I;A.__ngNextListenerFn__=s,I.__ngLastListenerFn__=s,d=!1}else{s=gb(r,t,c,s),T1(f,i,s);let A=n.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=gb(r,t,c,s);if(d){let f=r.outputs?.[i],g=r.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],I=g[m+1];hb(r,e,t,b,I,i,s,h,l)}if(f&&f.length)for(let m of f)hb(r,e,t,m,i,i,s,h,l)}}function hb(e,t,n,r,i,s,o,a,l){let c=n[r],h=t.data[r].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function mb(e,t,n,r){let i=$e(null);try{return vt(6,t,n),n(r)!==!1}catch(s){return d0(e,s),!1}finally{vt(7,t,n),$e(i)}}function gb(e,t,n,r){return function i(s){if(s===Function)return r;let o=aa(e)?Kr(e.index,t):t;sv(o,5);let a=mb(t,n,r,s),l=i.__ngNextListenerFn__;for(;l;)a=mb(t,n,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function q(e=1){return NA(e)}function bn(e,t,n){return Fr(e,"",t,"",n),bn}function Fr(e,t,n,r,i){let s=Ge(),o=H0(s,t,n,r);if(o!==Ui){let a=un(),l=Lg();l0(a,l,s,e,o,s[cn],i,!1)}return Fr}function Jo(e,t,n){MP(e,t,n)}function Qo(e){let t=Ge(),n=un(),r=iC();Og(r+1);let i=cv(n,r);if(e.dirty&&lA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=kP(t,r);e.reset(s,sM),e.notifyOnChanges()}return!0}return!1}function es(){return NP(Ge(),iC())}function uv(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function $t(e,t=""){let n=Ge(),r=un(),i=e+wn,s=r.firstCreatePass?Ld(r,i,1,t,null):r.data[i],o=N1(r,n,s,t,e);n[i]=o,Fg()&&iv(r,n,o,s),la(s,!1)}var N1=(e,t,n,r,i)=>(Bg(!0),XM(t[cn],r));function fa(e){return hr("",e,""),fa}function hr(e,t,n){let r=Ge(),i=H0(r,e,t,n);return i!==Ui&&A1(r,co(),i),hr}function A1(e,t,n){let r=Kb(t,e);JM(e[cn],r,n)}var $0={};function Br(e){let t=un(),n=Ge(),r=e+wn,i=Ld(t,r,128,null,null);return la(i,!1),uv(t,n,r,$0),Br}function ho(e){lo("NgLet");let t=un(),n=Ge(),r=co();return uv(t,n,r,e),e}function mr(e){let t=bA(),n=Rg(t,wn+e);if(n===$0)throw new Me(314,!1);return n}function M1(e,t,n){let r=un();if(r.firstCreatePass){let i=qr(e);hg(n,r.data,r.blueprint,i,!0),hg(t,r.data,r.blueprint,i,!1)}}function hg(e,t,n,r,i){if(e=Pn(e),Array.isArray(e))for(let s=0;s<e.length;s++)hg(e[s],t,n,r,i);else{let s=un(),o=Ge(),a=pr(),l=ta(e)?e:Pn(e.provide),c=Fb(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(ta(e)||!e.multi){let g=new zo(c,i,bt),m=hm(l,t,i?h:h+f,d);m===-1?(Tm(cd(a,o),s,l),pm(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(g),o.push(g)):(n[m]=g,o[m]=g)}else{let g=hm(l,t,h+f,d),m=hm(l,t,h,h+f),b=g>=0&&n[g],I=m>=0&&n[m];if(i&&!I||!i&&!b){Tm(cd(a,o),s,l);let A=k1(i?P1:O1,n.length,i,r,c);!i&&I&&(n[m].providerFactory=A),pm(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),o.push(A)}else{let A=W0(n[i?m:g],c,!i&&r);pm(s,e,g>-1?g:m,A)}!i&&r&&I&&n[m].componentProviders++}}}function pm(e,t,n,r){let i=ta(t),s=XN(t);if(i||s){let o=(s?Pn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,o]):a[l+1].push(r,o)}else a.push(n,o)}}}function W0(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function hm(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function O1(e,t,n,r){return mg(this.multi,[])}function P1(e,t,n,r){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=Wc(n,n[Te],this.providerFactory.index,r);s=a.slice(0,o),mg(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],mg(i,s);return s}function mg(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function k1(e,t,n,r,i){let s=new zo(e,n,bt);return s.multi=[],s.index=t,s.componentProviders=0,W0(s,i,r&&!n),s}function Fd(e,t=[]){return n=>{n.providersResolver=(r,i)=>M1(r,i?i(e):e,t)}}function pa(e,t,n,r){return z0(Ge(),Mg(),e,t,n,r)}function G0(e,t){let n=e[t];return n===Ui?void 0:n}function z0(e,t,n,r,i,s){let o=t+n;return Pi(e,o,i)?F0(e,o+1,s?r.call(s,i):r(i)):G0(e,o+1)}function L1(e,t,n,r,i,s,o){let a=t+n;return KP(e,a,i,s)?F0(e,a+2,o?r.call(o,i,s):r(i,s)):G0(e,a+2)}function Jn(e,t){let n=un(),r,i=e+wn;n.firstCreatePass?(r=F1(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let s=r.factory||(r.factory=Vo(r.type,!0)),o,a=$n(bt);try{let l=ad(!1),c=s();return ad(l),uv(n,Ge(),i,c),c}finally{$n(a)}}function F1(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function gr(e,t,n){let r=e+wn,i=Ge(),s=Rg(i,r);return Y0(i,r)?z0(i,Mg(),t,s.transform,n,s):s.transform(n)}function q0(e,t,n,r){let i=e+wn,s=Ge(),o=Rg(s,i);return Y0(s,i)?L1(s,Mg(),t,o.transform,n,r,o):o.transform(n,r)}function Y0(e,t){return e[Te].data[t].pure}var oa=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},dv=new oa("19.2.0"),B1=(()=>{class e{zone=O(Be);changeDetectionScheduler=O(Ni);applicationRef=O(fr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function V1({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Be(re(w({},U1()),{scheduleInRootZone:n})),[{provide:Be,useFactory:e},{provide:Bc,multi:!0,useFactory:()=>{let r=O(B1,{optional:!0});return()=>r.initialize()}},{provide:Bc,multi:!0,useFactory:()=>{let r=O(H1);return()=>{r.initialize()}}},t===!0?{provide:CC,useValue:!0}:[],{provide:Hg,useValue:n??bC}]}function U1(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var H1=(()=>{class e{subscription=new mt;initialized=!1;zone=O(Be);pendingTasks=O(xd);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Be.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Be.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),K0=(()=>{class e{appRef=O(fr);taskService=O(xd);ngZone=O(Be);zonelessEnabled=O(Td);tracing=O(da,{optional:!0});disableScheduling=O(CC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new mt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ud):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Hg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof dd||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?Ww:SC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ud+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Ww(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Z0(){return lo("NgZoneless"),Ob([{provide:Ni,useExisting:K0},{provide:Be,useClass:dd},{provide:Td,useValue:!0},{provide:Hg,useValue:!1},[]])}function j1(){return typeof $localize<"u"&&$localize.locale||_d}var fv=new he("",{providedIn:"root",factory:()=>O(fv,Je.Optional|Je.SkipSelf)||j1()}),gg=new he(""),$1=new he("");function Mc(e){return!e.moduleRef}function W1(e){let t=Mc(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Be);return n.run(()=>{Mc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Ai,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:s=>{r.handleError(s)}})}),Mc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(gg);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(gg);o.add(s),e.moduleRef.onDestroy(()=>{Ku(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return z1(r,n,()=>{let s=t.get(U0);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(fv,_d);if(I1(o||_d),!t.get($1,!0))return Mc(e)?t.get(fr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Mc(e)){let a=t.get(fr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return G1(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function G1(e,t){let n=e.injector.get(fr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new Me(-403,!1);t.push(e)}function z1(e,t,n){try{let r=n();return lv(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var Zu=null;function q1(e=[],t){return yt.create({name:t,providers:[{provide:bd,useValue:"platform"},{provide:gg,useValue:new Set([()=>Zu=null])},...e]})}function Y1(e=[]){if(Zu)return Zu;let t=q1(e);return Zu=t,n1(),K1(t),t}function K1(e){let t=e.get(Wg,null);Bb(e,()=>{t?.forEach(n=>n())})}var Vr=(()=>{class e{static __NG_ELEMENT_ID__=Z1}return e})();function Z1(e){return X1(pr(),Ge(),(e&16)===16)}function X1(e,t,n){if(aa(e)&&!n){let r=Kr(e.index,t);return new qo(r,r)}else if(e.type&175){let r=t[Mr];return new qo(r,t)}return null}var vg=class{constructor(){}supports(e){return e instanceof Map||L0(e)}create(){return new yg}},yg=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(e){let t;for(t=this._mapHead;t!==null;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;t!==null;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;t!==null;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;t!==null;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;t!==null;t=t._nextRemoved)e(t)}diff(e){if(!e)e=new Map;else if(!(e instanceof Map||L0(e)))throw new Me(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(n,r)=>{if(t&&t.key===r)this._maybeAddToChanges(t,n),this._appendAfter=t,t=t._next;else{let i=this._getOrCreateRecordForKey(r,n);t=this._insertBeforeOrAppend(t,i)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let n=t;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){let n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){let r=this._records.get(e);this._maybeAddToChanges(r,t);let i=r._prev,s=r._next;return i&&(i._next=s),s&&(s._prev=i),r._next=null,r._prev=null,r}let n=new _g(e);return this._records.set(e,n),n.currentValue=t,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(n=>t(e[n],n))}},_g=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(e){this.key=e}};function vb(){return new pv([new vg])}var pv=(()=>{class e{static \u0275prov=oe({token:e,providedIn:"root",factory:vb});factories;constructor(n){this.factories=n}static create(n,r){if(r){let i=r.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||vb()),deps:[[e,new UN,new Sg]]}}find(n){let r=this.factories.find(i=>i.supports(n));if(r)return r;throw new Me(901,!1)}}return e})();function X0(e){vt(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=Y1(r),s=[V1({}),{provide:Ni,useExisting:K0},...n||[]],o=new md({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return W1({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{vt(9)}}function ha(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function hv(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function mv(e){let t=$e(null);try{return e()}finally{$e(t)}}var yb=class{[Ii];constructor(e){this[Ii]=e}destroy(){this[Ii].destroy()}};function Bd(e,t){let n=Ho(e),r=t.elementInjector||Cd();return new Yc(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var J1={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function Q1(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ek(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var gv;function tk(e,t){if(!gv){let n=Element.prototype;gv=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?gv.call(e,t):!1}function nk(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[Q1(r)]=[n,i]}),t}function rk(e,t){return t.get(ao).resolveComponentFactory(e).inputs}function ik(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=n.length;s<o;++s){let a=n[s],l=ok(a,t,i);l!==-1&&r[l].push(a)}return r}function ok(e,t,n){let r=n;return ek(e)&&t.some((i,s)=>i!=="*"&&tk(e,i)?(r=s,!0):!1),r}var sk=10,vv=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(ao).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new yv(this.componentFactory,e,this.inputMap)}},yv=class{componentFactory;injector;inputMap;eventEmitters=new Mo(1);events=this.eventEmitters.pipe(qs(e=>no(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,n){this.componentFactory=e,this.injector=t,this.inputMap=n,this.ngZone=this.injector.get(Be),this.appRef=this.injector.get(fr),this.cdScheduler=t.get(Ni),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=J1.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},sk))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=yt.create({providers:[],parent:this.injector}),n=ik(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=e.instance[n];return new ot(s=>{let o=i.subscribe(a=>s.next({name:r,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},_v=class extends HTMLElement{ngElementEventsSubscription=null};function J0(e,t){let n=rk(e,t.injector),r=t.strategyFactory||new vv(e,t.injector),i=nk(n);class s extends _v{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||t.injector);n.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,c,f)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return n.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var nS=null;function ma(){return nS}function rS(e){nS??=e}var Vd=class{},nt=new he(""),iS=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:()=>O(ck),providedIn:"platform"})}return e})(),ck=(()=>{class e extends iS{_location;_history;_doc=O(nt);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ma().getBaseHref(this._doc)}onPopState(n){let r=ma().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=ma().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function oS(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function Q0(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function ts(e){return e&&e[0]!=="?"?`?${e}`:e}var wv=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:()=>O(uk),providedIn:"root"})}return e})(),lk=new he(""),uk=(()=>{class e extends wv{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??O(nt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return oS(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+ts(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,s){let o=this.prepareExternalUrl(i+ts(s));this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){let o=this.prepareExternalUrl(i+ts(s));this._platformLocation.replaceState(n,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(n){return new(n||e)(et(iS),et(lk,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),bv=(()=>{class e{_subject=new ie;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=pk(Q0(eS(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+ts(r))}normalize(n){return e.stripTrailingSlash(fk(this._basePath,eS(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+ts(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+ts(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=ts;static joinWithSlash=oS;static stripTrailingSlash=Q0;static \u0275fac=function(n){return new(n||e)(et(wv))};static \u0275prov=oe({token:e,factory:()=>dk(),providedIn:"root"})}return e})();function dk(){return new bv(et(wv))}function fk(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function eS(e){return e.replace(/\/index.html$/,"")}function pk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function sS(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,s]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Ev=/\s+/,tS=[],Hd=(()=>{class e{_ngEl;_renderer;initialClasses=tS;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Ev):tS}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Ev):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(Ev).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||e)(bt(Nt),bt(Zo))};static \u0275dir=kr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),aS=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(n,r,i){this._ngEl=n,this._differs=r,this._renderer=i}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,r){let[i,s]=n.split("."),o=i.indexOf("-")===-1?void 0:Xr.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,s?`${r}${s}`:r,o):this._renderer.removeStyle(this._ngEl.nativeElement,i,o)}_applyChanges(n){n.forEachRemovedItem(r=>this._setStyle(r.key,null)),n.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),n.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(n){return new(n||e)(bt(Nt),bt(pv),bt(Zo))};static \u0275dir=kr({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),Cv="browser",hk="server";function cS(e){return e===Cv}function Sv(e){return e===hk}var Ud=class{},Iv=class extends Vd{supportsDOMEvents=!0},Tv=class NS extends Iv{static makeCurrent(){rS(new NS)}onAndCancel(t,n,r,i){return t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=mk();return n==null?null:gk(n)}resetBaseElement(){ol=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return sS(document.cookie,t)}},ol=null;function mk(){return ol=ol||document.querySelector("base"),ol?ol.getAttribute("href"):null}function gk(e){return new URL(e,document.baseURI).pathname}var vk=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),xv=new he(""),hS=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,s){return this._findPluginFor(r).addEventListener(n,r,i,s)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new Me(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(et(xv),et(Be))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),$d=class{_doc;constructor(e){this._doc=e}manager},jd="ng-app-id";function lS(e){for(let t of e)t.remove()}function uS(e,t){let n=t.createElement("style");return n.textContent=e,n}function yk(e,t,n,r){let i=e.head?.querySelectorAll(`style[${jd}="${t}"],link[${jd}="${t}"]`);if(i)for(let s of i)s.removeAttribute(jd),s instanceof HTMLLinkElement?r.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&n.set(s.textContent,{usage:0,elements:[s]})}function Rv(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var mS=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,s={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=Sv(s),yk(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,uS);r?.forEach(i=>this.addUsage(i,this.external,Rv))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let s=r.get(n);s?s.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(lS(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])lS(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,uS(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,Rv(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(jd,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(et(nt),et(nl),et(Gg,8),et(Ko))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),Dv={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Av=/%COMP%/g,gS="%COMP%",_k=`_nghost-${gS}`,Ek=`_ngcontent-${gS}`,wk=!0,bk=new he("",{providedIn:"root",factory:()=>wk});function Ck(e){return Ek.replace(Av,e)}function Sk(e){return _k.replace(Av,e)}function vS(e,t){return t.map(n=>n.replace(Av,e))}var dS=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,s,o,a,l,c=null,h=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=Sv(a),this.defaultRenderer=new sl(n,o,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Zr.ShadowDom&&(r=re(w({},r),{encapsulation:Zr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Wd?i.applyToHost(n):i instanceof al&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,s=i.get(r.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Zr.Emulated:s=new Wd(l,c,r,this.appId,h,o,a,d,f);break;case Zr.ShadowDom:return new Nv(l,c,n,r,o,a,this.nonce,d,f);default:s=new al(l,c,r,h,o,a,d,f);break}i.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(et(hS),et(mS),et(nl),et(bk),et(nt),et(Ko),et(Be),et(Gg),et(da,8))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),sl=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Dv[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(fS(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(fS(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new Me(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let i=Dv[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Dv[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Xr.DashCase|Xr.Important)?e.style.setProperty(t,n,r&Xr.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Xr.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=ma().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function fS(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Nv=class extends sl{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=r.styles;c=vS(r.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=r.getExternalStyles?.();if(h)for(let d of h){let f=Rv(d,i);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},al=class extends sl{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?vS(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Wd=class extends al{contentAttr;hostAttr;constructor(e,t,n,r,i,s,o,a,l){let c=r+"-"+n.id;super(e,t,n,i,s,o,a,l,c),this.contentAttr=Ck(c),this.hostAttr=Sk(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},Dk=(()=>{class e extends $d{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,s){return n.addEventListener(r,i,s),()=>this.removeEventListener(n,r,i,s)}removeEventListener(n,r,i,s){return n.removeEventListener(r,i,s)}static \u0275fac=function(n){return new(n||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})(),pS=["alt","control","meta","shift"],Ik={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Tk={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},xk=(()=>{class e extends $d{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ma().onAndCancel(n,o.domEventName,a,s))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(r.pop()),o="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),o="code."),pS.forEach(c=>{let h=r.indexOf(c);h>-1&&(r.splice(h,1),o+=c+".")}),o+=s,r.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(n,r){let i=Ik[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(i=n.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),pS.forEach(o=>{if(o!==i){let a=Tk[o];a(n)&&(s+=o+".")}}),s+=i,s===r)}static eventCallback(n,r,i){return s=>{e.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac})}return e})();function yS(e){return X0(Rk(e))}function Rk(e){return{appProviders:[...Pk,...e?.providers??[]],platformProviders:Ok}}function Nk(){Tv.makeCurrent()}function Ak(){return new Ai}function Mk(){return MC(document),document}var Ok=[{provide:Ko,useValue:Cv},{provide:Wg,useValue:Nk,multi:!0},{provide:nt,useFactory:Mk,deps:[]}],Pk=[{provide:bd,useValue:"root"},{provide:Ai,useFactory:Ak,deps:[]},{provide:xv,useClass:Dk,multi:!0,deps:[nt]},{provide:xv,useClass:xk,multi:!0,deps:[nt]},dS,mS,hS,{provide:ln,useExisting:dS},{provide:Ud,useClass:vk,deps:[]},[]],Mv=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=et(kk),r},providedIn:"root"})}return e})(),kk=(()=>{class e extends Mv{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case ti.NONE:return r;case ti.HTML:return uo(r,"HTML")?ei(r):Yg(this._doc,String(r)).toString();case ti.STYLE:return uo(r,"Style")?ei(r):r;case ti.SCRIPT:if(uo(r,"Script"))return ei(r);throw new Me(5200,!1);case ti.URL:return uo(r,"URL")?ei(r):Nd(String(r));case ti.RESOURCE_URL:if(uo(r,"ResourceURL"))return ei(r);throw new Me(5201,!1);default:throw new Me(5202,!1)}}bypassSecurityTrustHtml(n){return jC(n)}bypassSecurityTrustStyle(n){return $C(n)}bypassSecurityTrustScript(n){return WC(n)}bypassSecurityTrustUrl(n){return GC(n)}bypassSecurityTrustResourceUrl(n){return zC(n)}static \u0275fac=function(n){return new(n||e)(et(nt))};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),_S="9.5.7",k=class Lh{static SDK_VERSION=_S;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static CTA_EVENT="letscooee:outbound:cta";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let t=Lh.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");Lh.SDK_VERSION_CODE=parseInt(t,10)}},Rn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},Qn=Fe(is()),S=class{static log(...e){Qn.default.info(...e)}static debug(...e){Qn.default.debug(...e)}static error(...e){Qn.default.error(...e)}static warn(...e){Qn.default.warn(...e)}static info(...e){Qn.default.info(...e)}static trace(...e){Qn.default.trace(...e)}static configure(e=k.LOG_PREFIX){Qn.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Qn.default.setLevel(Qn.default[localStorage.cooeeLogLevel]):Qn.default.setLevel(Rn.debug?Qn.default.TRACE:Qn.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
|
|
8
8
|
display: inline-block;
|
|
9
9
|
font-size: 14px;
|
|
10
10
|
background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);
|
|
@@ -19,14 +19,14 @@ ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
|
|
|
19
19
|
`,t+=`
|
|
20
20
|
|
|
21
21
|
`,t+=`Learn more: https://www.letscooee.com
|
|
22
|
-
Cooee SDK: v${k.SDK_VERSION}`,console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",e),console.log(`%c${t}`,"font-size: 13px; line-height: 1.8;"),console.groupEnd()}},wS={providers:[Z0()]},Lf=Fe(Qn()),Ot=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}},zd=class{static format(e,t){let n=/{{\s*(\w+)\s*}}/;return t.replace(n,(r,i)=>{switch(i){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return r}})}static formatWithDelimiters(e,t=2,n=",",r="."){if(isNaN(e)||e==null)return"0";let i=(e/100).toFixed(t).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),o=i[1]?r+i[1]:"";return s+o}},fn=class{id;mID;vID;vName;imageURL;name;link;quantity;price;constructor(e){this.id=e.id,this.mID=e.mID,this.vID=e.vID,this.vName=e.vName,this.imageURL=e.imageURL,this.name=e.name,this.link=e.link,this.quantity=e.quantity,this.price=e.price}},Oe=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new fn(e)}},EI=Fe(va()),Pv=Fe(QS());function ya(e){return Pv.default.createInstance({name:"lc",storeName:e,driver:Pv.default.LOCALSTORAGE})}var mo=class{static storage;static async get(e,t){return await this.storage?.getItem(e)??t}static set(e,t){return this.storage?.setItem(e,t)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},ft=class extends mo{static storeName="usr";static{this.storage=ya(this.storeName)}},we=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"},pn=class extends mo{static storeName="ses";static{this.storage=ya(this.storeName)}},eD=Object.prototype.toString;function os(e){switch(eD.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return oi(e,Error)}}function Ea(e,t){return eD.call(e)===`[object ${t}]`}function Yd(e){return Ea(e,"ErrorEvent")}function Kd(e){return Ea(e,"DOMError")}function kv(e){return Ea(e,"DOMException")}function kn(e){return Ea(e,"String")}function wa(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ss(e){return e===null||wa(e)||typeof e!="object"&&typeof e!="function"}function Ur(e){return Ea(e,"Object")}function as(e){return typeof Event<"u"&&oi(e,Event)}function Lv(e){return typeof Element<"u"&&oi(e,Element)}function Fv(e){return Ea(e,"RegExp")}function Hi(e){return!!(e&&e.then&&typeof e.then=="function")}function Bv(e){return Ur(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function oi(e,t){try{return e instanceof t}catch{return!1}}function cl(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function si(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Zd(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];try{cl(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function tD(e,t,n=!1){return kn(e)?Fv(t)?t.test(e):kn(t)?n?e===t:e.includes(t):!1:!1}function ba(e,t=[],n=!1){return t.some(r=>tD(e,r,n))}function Uv(e,t,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!oi(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=Vk(Vv(e,t,i,o.originalException,r,s.exception.values,a,0),n))}function Vv(e,t,n,r,i,s,o,a){if(s.length>=n+1)return s;let l=[...s];if(oi(r[i],Error)){nD(o,a);let c=e(t,r[i]),h=l.length;rD(c,i,h,a),l=Vv(e,t,n,r[i],i,[c,...l],c,h)}return Array.isArray(r.errors)&&r.errors.forEach((c,h)=>{if(oi(c,Error)){nD(o,a);let d=e(t,c),f=l.length;rD(d,`errors[${h}]`,f,a),l=Vv(e,t,n,c,i,[d,...l],d,f)}}),l}function nD(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w(w({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function rD(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function Vk(e,t){return e.map(n=>(n.value&&(n.value=si(n.value,t)),n))}var mr="8.18.0",ye=globalThis;function Ca(e,t,n){let r=n||ye,i=r.__SENTRY__=r.__SENTRY__||{},s=i[mr]=i[mr]||{};return s[e]||(s[e]=t())}var Hv=ye,Uk=80;function ll(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,i=[],s=0,o=0,a=" > ",l=a.length,c,h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Uk;for(;n&&s++<r&&(c=Hk(n,h),!(c==="html"||s>1&&o+i.length*l+c.length>=d));)i.push(c),o+=c.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function Hk(e,t){let n=e,r=[];if(!n||!n.tagName)return"";if(Hv.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let o=n.className;if(o&&kn(o)){let a=o.split(/\s+/);for(let l of a)r.push(`.${l}`)}}let s=["aria-label","type","name","title","alt"];for(let o of s){let a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function jv(){try{return Hv.document.location.href}catch{return""}}function $v(e){if(!Hv.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}var ai=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,jk="Sentry Logger ",ul=["debug","info","warn","error","log","assert","trace"],Sa={};function Da(e){if(!("console"in ye))return e();let t=ye.console,n={},r=Object.keys(Sa);r.forEach(i=>{let s=Sa[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function $k(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ai?ul.forEach(n=>{t[n]=(...r)=>{e&&Da(()=>{ye.console[n](`${jk}[${n}]:`,...r)})}}):ul.forEach(n=>{t[n]=()=>{}}),t}var se=$k(),Wk=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Gk(e){return e==="http"||e==="https"}function ci(e,t=!1){let{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function iD(e){let t=Wk.exec(e);if(!t){Da(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",s="",o="",a=""]=t.slice(1),l="",c=a,h=c.split("/");if(h.length>1&&(l=h.slice(0,-1).join("/"),c=h.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return oD({host:s,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function oD(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function zk(e){if(!ai)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(se.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Gk(r)?t&&isNaN(parseInt(t,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Xd(e){let t=typeof e=="string"?iD(e):oD(e);if(!(!t||!zk(t)))return t}var Nn=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function Lt(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i=="function"&&Jd(i,r),e[t]=i}function Ln(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ai&&se.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Jd(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Ln(e,"__sentry_original__",t)}catch{}}function cs(e){return e.__sentry_original__}function Gv(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Qd(e){if(os(e))return w({message:e.message,name:e.name,stack:e.stack},aD(e));if(as(e)){let t=w({type:e.type,target:sD(e.target),currentTarget:sD(e.currentTarget)},aD(e));return typeof CustomEvent<"u"&&oi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function sD(e){try{return Lv(e)?ll(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function aD(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function zv(e,t=40){let n=Object.keys(Qd(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return si(r,t);for(let i=n.length;i>0;i--){let s=n.slice(0,i).join(", ");if(!(s.length>t))return i===n.length?s:si(s,t)}return""}function nn(e){return Wv(e,new Map)}function Wv(e,t){if(qk(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let i of Object.keys(e))typeof e[i]<"u"&&(r[i]=Wv(e[i],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(i=>{r.push(Wv(i,t))}),r}return e}function qk(e){if(!Ur(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var li="?",cD=/\(error: (.*)\)/,lD=/captureMessage|captureException/;function Yv(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let s=[],o=n.split(`
|
|
23
|
-
`);for(let a=r;a<o.length;a++){let l=o[a];if(l.length>1024)continue;let c=cD.test(l)?l.replace(cD,"$1"):l;if(!c.match(/\S*Error: /)){for(let h of t){let d=h(c);if(d){s.push(d);break}}if(s.length>=50+i)break}}return uD(s.slice(i))}}function uD(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ef(t).function||"")&&t.pop(),t.reverse(),lD.test(ef(t).function||"")&&(t.pop(),lD.test(ef(t).function||"")&&t.pop()),t.slice(0,50).map(n=>re(w({},n),{filename:n.filename||ef(t).filename,function:n.function||li}))}function ef(e){return e[e.length-1]||{}}var qv="<anonymous>";function
|
|
22
|
+
Cooee SDK: v${k.SDK_VERSION}`,console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",e),console.log(`%c${t}`,"font-size: 13px; line-height: 1.8;"),console.groupEnd()}},wS={providers:[Z0()]},Lf=Fe(er()),Pt=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}},zd=class{static format(e,t){let n=/{{\s*(\w+)\s*}}/;return t.replace(n,(r,i)=>{switch(i){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return r}})}static formatWithDelimiters(e,t=2,n=",",r="."){if(isNaN(e)||e==null)return"0";let i=(e/100).toFixed(t).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),o=i[1]?r+i[1]:"";return s+o}},fn=class{id;mID;vID;vName;imageURL;name;link;quantity;price;constructor(e){this.id=e.id,this.mID=e.mID,this.vID=e.vID,this.vName=e.vName,this.imageURL=e.imageURL,this.name=e.name,this.link=e.link,this.quantity=e.quantity,this.price=e.price}},Oe=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new fn(e)}},EI=Fe(va()),Pv=Fe(QS());function ya(e){return Pv.default.createInstance({name:"lc",storeName:e,driver:Pv.default.LOCALSTORAGE})}var mo=class{static storage;static async get(e,t){return await this.storage?.getItem(e)??t}static set(e,t){return this.storage?.setItem(e,t)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},ft=class extends mo{static storeName="usr";static{this.storage=ya(this.storeName)}},we=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"},pn=class extends mo{static storeName="ses";static{this.storage=ya(this.storeName)}},eD=Object.prototype.toString;function os(e){switch(eD.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return oi(e,Error)}}function Ea(e,t){return eD.call(e)===`[object ${t}]`}function Yd(e){return Ea(e,"ErrorEvent")}function Kd(e){return Ea(e,"DOMError")}function kv(e){return Ea(e,"DOMException")}function kn(e){return Ea(e,"String")}function wa(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ss(e){return e===null||wa(e)||typeof e!="object"&&typeof e!="function"}function Ur(e){return Ea(e,"Object")}function as(e){return typeof Event<"u"&&oi(e,Event)}function Lv(e){return typeof Element<"u"&&oi(e,Element)}function Fv(e){return Ea(e,"RegExp")}function Hi(e){return!!(e&&e.then&&typeof e.then=="function")}function Bv(e){return Ur(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function oi(e,t){try{return e instanceof t}catch{return!1}}function cl(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function si(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Zd(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];try{cl(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function tD(e,t,n=!1){return kn(e)?Fv(t)?t.test(e):kn(t)?n?e===t:e.includes(t):!1:!1}function ba(e,t=[],n=!1){return t.some(r=>tD(e,r,n))}function Uv(e,t,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!oi(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=Vk(Vv(e,t,i,o.originalException,r,s.exception.values,a,0),n))}function Vv(e,t,n,r,i,s,o,a){if(s.length>=n+1)return s;let l=[...s];if(oi(r[i],Error)){nD(o,a);let c=e(t,r[i]),h=l.length;rD(c,i,h,a),l=Vv(e,t,n,r[i],i,[c,...l],c,h)}return Array.isArray(r.errors)&&r.errors.forEach((c,h)=>{if(oi(c,Error)){nD(o,a);let d=e(t,c),f=l.length;rD(d,`errors[${h}]`,f,a),l=Vv(e,t,n,c,i,[d,...l],d,f)}}),l}function nD(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w(w({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function rD(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=re(w({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function Vk(e,t){return e.map(n=>(n.value&&(n.value=si(n.value,t)),n))}var vr="8.18.0",ye=globalThis;function Ca(e,t,n){let r=n||ye,i=r.__SENTRY__=r.__SENTRY__||{},s=i[vr]=i[vr]||{};return s[e]||(s[e]=t())}var Hv=ye,Uk=80;function ll(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,i=[],s=0,o=0,a=" > ",l=a.length,c,h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Uk;for(;n&&s++<r&&(c=Hk(n,h),!(c==="html"||s>1&&o+i.length*l+c.length>=d));)i.push(c),o+=c.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function Hk(e,t){let n=e,r=[];if(!n||!n.tagName)return"";if(Hv.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let o=n.className;if(o&&kn(o)){let a=o.split(/\s+/);for(let l of a)r.push(`.${l}`)}}let s=["aria-label","type","name","title","alt"];for(let o of s){let a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function jv(){try{return Hv.document.location.href}catch{return""}}function $v(e){if(!Hv.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}var ai=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,jk="Sentry Logger ",ul=["debug","info","warn","error","log","assert","trace"],Sa={};function Da(e){if(!("console"in ye))return e();let t=ye.console,n={},r=Object.keys(Sa);r.forEach(i=>{let s=Sa[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function $k(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ai?ul.forEach(n=>{t[n]=(...r)=>{e&&Da(()=>{ye.console[n](`${jk}[${n}]:`,...r)})}}):ul.forEach(n=>{t[n]=()=>{}}),t}var se=$k(),Wk=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Gk(e){return e==="http"||e==="https"}function ci(e,t=!1){let{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function iD(e){let t=Wk.exec(e);if(!t){Da(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",s="",o="",a=""]=t.slice(1),l="",c=a,h=c.split("/");if(h.length>1&&(l=h.slice(0,-1).join("/"),c=h.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return oD({host:s,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function oD(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function zk(e){if(!ai)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(se.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Gk(r)?t&&isNaN(parseInt(t,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Xd(e){let t=typeof e=="string"?iD(e):oD(e);if(!(!t||!zk(t)))return t}var Nn=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function Lt(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i=="function"&&Jd(i,r),e[t]=i}function Ln(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ai&&se.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Jd(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Ln(e,"__sentry_original__",t)}catch{}}function cs(e){return e.__sentry_original__}function Gv(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Qd(e){if(os(e))return w({message:e.message,name:e.name,stack:e.stack},aD(e));if(as(e)){let t=w({type:e.type,target:sD(e.target),currentTarget:sD(e.currentTarget)},aD(e));return typeof CustomEvent<"u"&&oi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function sD(e){try{return Lv(e)?ll(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function aD(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function zv(e,t=40){let n=Object.keys(Qd(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return si(r,t);for(let i=n.length;i>0;i--){let s=n.slice(0,i).join(", ");if(!(s.length>t))return i===n.length?s:si(s,t)}return""}function nn(e){return Wv(e,new Map)}function Wv(e,t){if(qk(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let i of Object.keys(e))typeof e[i]<"u"&&(r[i]=Wv(e[i],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(i=>{r.push(Wv(i,t))}),r}return e}function qk(e){if(!Ur(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var li="?",cD=/\(error: (.*)\)/,lD=/captureMessage|captureException/;function Yv(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let s=[],o=n.split(`
|
|
23
|
+
`);for(let a=r;a<o.length;a++){let l=o[a];if(l.length>1024)continue;let c=cD.test(l)?l.replace(cD,"$1"):l;if(!c.match(/\S*Error: /)){for(let h of t){let d=h(c);if(d){s.push(d);break}}if(s.length>=50+i)break}}return uD(s.slice(i))}}function uD(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ef(t).function||"")&&t.pop(),t.reverse(),lD.test(ef(t).function||"")&&(t.pop(),lD.test(ef(t).function||"")&&t.pop()),t.slice(0,50).map(n=>re(w({},n),{filename:n.filename||ef(t).filename,function:n.function||li}))}function ef(e){return e[e.length-1]||{}}var qv="<anonymous>";function yr(e){try{return!e||typeof e!="function"?qv:e.name||qv}catch{return qv}}function tf(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var nf={},dD={};function Fn(e,t){nf[e]=nf[e]||[],nf[e].push(t)}function Bn(e,t){dD[e]||(t(),dD[e]=!0)}function rn(e,t){let n=e&&nf[e];if(n)for(let r of n)try{r(t)}catch(i){ai&&se.error(`Error while triggering instrumentation handler.
|
|
24
24
|
Type: ${e}
|
|
25
|
-
Name: ${
|
|
26
|
-
Error:`,i)}}function Kv(e){let t="console";Fn(t,e),Bn(t,Yk)}function Yk(){"console"in ye&&ul.forEach(function(e){e in ye.console&&Lt(ye.console,e,function(t){return Sa[e]=t,function(...n){rn("console",{args:n,level:e});let r=Sa[e];r&&r.apply(ye.console,n)}})})}var Zv=ye;function fD(){if(!("fetch"in Zv))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function dl(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Xv(){if(typeof EdgeRuntime=="string")return!0;if(!fD())return!1;if(dl(Zv.fetch))return!0;let e=!1,t=Zv.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=dl(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ai&&se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}var pD=1e3;function ui(){return Date.now()/pD}function Kk(){let{performance:e}=ye;if(!e||!e.now)return ui;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/pD}var
|
|
25
|
+
Name: ${yr(r)}
|
|
26
|
+
Error:`,i)}}function Kv(e){let t="console";Fn(t,e),Bn(t,Yk)}function Yk(){"console"in ye&&ul.forEach(function(e){e in ye.console&&Lt(ye.console,e,function(t){return Sa[e]=t,function(...n){rn("console",{args:n,level:e});let r=Sa[e];r&&r.apply(ye.console,n)}})})}var Zv=ye;function fD(){if(!("fetch"in Zv))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function dl(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Xv(){if(typeof EdgeRuntime=="string")return!0;if(!fD())return!1;if(dl(Zv.fetch))return!0;let e=!1,t=Zv.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=dl(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ai&&se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}var pD=1e3;function ui(){return Date.now()/pD}function Kk(){let{performance:e}=ye;if(!e||!e.now)return ui;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/pD}var tr=Kk(),fl,Zk=(()=>{let{performance:e}=ye;if(!e||!e.now){fl="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=i<t,o=e.timing&&e.timing.navigationStart,a=typeof o=="number"?Math.abs(o+n-r):t,l=a<t;return s||l?i<=a?(fl="timeOrigin",e.timeOrigin):(fl="navigationStart",o):(fl="dateNow",r)})();function Qv(e){let t="fetch";Fn(t,e),Bn(t,Xk)}function Xk(){Xv()&&Lt(ye,"fetch",function(e){return function(...t){let{method:n,url:r}=Jk(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:tr()*1e3};rn("fetch",w({},i));let s=new Error().stack;return e.apply(ye,t).then(o=>{let a=re(w({},i),{endTimestamp:tr()*1e3,response:o});return rn("fetch",a),o},o=>{let a=re(w({},i),{endTimestamp:tr()*1e3,error:o});throw rn("fetch",a),os(o)&&o.stack===void 0&&(o.stack=s,Ln(o,"framesToPop",1)),o})}})}function Jv(e,t){return!!e&&typeof e=="object"&&!!e[t]}function hD(e){return typeof e=="string"?e:e?Jv(e,"url")?e.url:e.toString?e.toString():"":""}function Jk(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:hD(n),method:Jv(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:hD(t),method:Jv(t,"method")?String(t.method).toUpperCase():"GET"}}var rf=null;function ey(e){let t="error";Fn(t,e),Bn(t,Qk)}function Qk(){rf=ye.onerror,ye.onerror=function(e,t,n,r,i){return rn("error",{column:r,error:i,line:n,msg:e,url:t}),rf&&!rf.__SENTRY_LOADER__?rf.apply(this,arguments):!1},ye.onerror.__SENTRY_INSTRUMENTED__=!0}var of=null;function ty(e){let t="unhandledrejection";Fn(t,e),Bn(t,eL)}function eL(){of=ye.onunhandledrejection,ye.onunhandledrejection=function(e){return rn("unhandledrejection",e),of&&!of.__SENTRY_LOADER__?of.apply(this,arguments):!0},ye.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function ny(){return"npm"}function mD(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let s=0;s<t.length;s++)if(t[s]===i)return!0;return t.push(i),!1}function r(i){if(e)t.delete(i);else for(let s=0;s<t.length;s++)if(t[s]===i){t.splice(s,1);break}}return[n,r]}function hn(){let e=ye,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function gD(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Hr(e){let{message:t,event_id:n}=e;if(t)return t;let r=gD(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ia(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function ji(e,t){let n=gD(e);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=w(w(w({},r),i),t),t&&"data"in t){let s=w(w({},i&&i.data),t.data);n.mechanism.data=s}}function sf(e){if(e&&e.__sentry_captured__)return!0;try{Ln(e,"__sentry_captured__",!0)}catch{}return!1}function af(e){return Array.isArray(e)?e:[e]}function jr(e,t=100,n=1/0){try{return ry("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function cf(e,t=3,n=100*1024){let r=jr(e,t);return iL(r)>n?cf(e,t-1,n):r}function ry(e,t,n=1/0,r=1/0,i=mD()){let[s,o]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;let a=tL(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let c=t;if(c&&typeof c.toJSON=="function")try{let g=c.toJSON();return ry("",g,l-1,r,i)}catch{}let h=Array.isArray(t)?[]:{},d=0,f=Qd(t);for(let g in f){if(!Object.prototype.hasOwnProperty.call(f,g))continue;if(d>=r){h[g]="[MaxProperties ~]";break}let m=f[g];h[g]=ry(g,m,l-1,r,i),d++}return o(t),h}function tL(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(cl(t))return"[VueViewModel]";if(Bv(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${yr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=nL(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function nL(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function rL(e){return~-encodeURI(e).split(/%..|./).length}function iL(e){return rL(JSON.stringify(e))}var $i;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let n=2;e[e.REJECTED=n]="REJECTED"})($i||($i={}));function _r(e){return new $r(t=>{t(e)})}function go(e){return new $r((t,n)=>{n(e)})}var $r=class ns{constructor(t){ns.prototype.__init.call(this),ns.prototype.__init2.call(this),ns.prototype.__init3.call(this),ns.prototype.__init4.call(this),this._state=$i.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new ns((r,i)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(o){i(o)}},s=>{if(!n)i(s);else try{r(n(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ns((n,r)=>{let i,s;return this.then(o=>{s=!1,i=o,t&&t()},o=>{s=!0,i=o,t&&t()}).then(()=>{if(s){r(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult($i.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult($i.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===$i.PENDING){if(Hi(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===$i.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===$i.RESOLVED&&n[1](this._value),this._state===$i.REJECTED&&n[2](this._value),n[0]=!0)})}}};function iy(e){let t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function i(o){if(!n())return go(new Nn("Not adding Promise because buffer limit was reached."));let a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function s(o){return new $r((a,l)=>{let c=t.length;if(!c)return a(!0);let h=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{_r(d).then(()=>{--c||(clearTimeout(h),a(!0))},l)})})}return{$:t,add:i,drain:s}}function pl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}var vD=["fatal","error","warning","log","info","debug"];function oy(e){return e==="warn"?"warning":vD.includes(e)?e:"log"}var _D="sentry-",ED=/^sentry-/;function sy(e){let t=wD(e);if(!t)return;let n=Object.entries(t).reduce((r,[i,s])=>{if(i.match(ED)){let o=i.slice(_D.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function wD(e){if(!(!e||!kn(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=yD(n);return Object.entries(r).forEach(([i,s])=>{t[i]=s}),t},{}):yD(e)}function yD(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function di(e,t=[]){return[e,t]}function cy(e,t){let[n,r]=e;return[n,[...r,t]]}function lf(e,t){let n=e[1];for(let r of n){let i=r[0].type;if(t(r,i))return!0}return!1}function ay(e){return ye.__SENTRY__&&ye.__SENTRY__.encodePolyfill?ye.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function ly(e){let[t,n]=e,r=JSON.stringify(t);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[ay(r),s]:r.push(typeof s=="string"?ay(s):s)}for(let s of n){let[o,a]=s;if(i(`
|
|
27
27
|
${JSON.stringify(o)}
|
|
28
|
-
`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(jr(a))}i(l)}}return typeof r=="string"?r:oL(r)}function oL(e){let t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}function uy(e){let t=typeof e.data=="string"?ay(e.data):e.data;return[nn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var sL={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function uf(e){return sL[e]}function df(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function dy(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return w(w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:ci(r)}),i&&{trace:nn(w({},i))})}function fy(e,t,n){let r=[{type:"client_report"},{timestamp:n||ui(),discarded_events:e}];return di(t?{dsn:t}:{},[r])}function bD(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function CD(e,t){return e[t]||e.all||0}function py(e,t,n=Date.now()){return CD(e,t)>n}function hy(e,{statusCode:t,headers:n},r=Date.now()){let i=w({},e),s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(let a of s.trim().split(",")){let[l,c,,,h]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=r+f;else for(let g of c.split(";"))g==="metric_bucket"?(!h||h.split(";").includes("custom"))&&(i[g]=r+f):i[g]=r+f}else o?i.all=r+bD(o,r):t===429&&(i.all=r+60*1e3);return i}function ff(){return{traceId:hn(),spanId:hn().substring(16)}}var pf=ye;function my(){let e=pf.chrome,t=e&&e.app&&e.app.runtime,n="history"in pf&&!!pf.history.pushState&&!!pf.history.replaceState;return!t&&n}var gt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ls(){return hl(ye),ye}function hl(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||mr,t[mr]=t[mr]||{}}function ml(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||er(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:hn()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}var gy="_sentrySpan";function vy(e,t){t?Ln(e,gy,t):delete e[gy]}function yy(e){return e[gy]}var lL=100,_y=class PS{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ff()}clone(){let t=new PS;return t._breadcrumbs=[...this._breadcrumbs],t._tags=w({},this._tags),t._extra=w({},this._extra),t._contexts=w({},this._contexts),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata=w({},this._sdkProcessingMetadata),t._propagationContext=w({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,vy(t,yy(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ml(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags=w(w({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=re(w({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=w(w({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=re(w({},this._extra),{[t]:n}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,[r,i]=n instanceof An?[n.getScopeData(),n.getRequestSession()]:Ur(n)?[t,t.requestSession]:[],{tags:s,extra:o,user:a,contexts:l,level:c,fingerprint:h=[],propagationContext:d}=r||{};return this._tags=w(w({},this._tags),s),this._extra=w(w({},this._extra),o),this._contexts=w(w({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),h.length&&(this._fingerprint=h),d&&(this._propagationContext=d),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,vy(this,void 0),this._attachments=[],this._propagationContext=ff(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:lL;if(r<=0)return this;let i=w({timestamp:ui()},t),s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>r?s.slice(-r):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:yy(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=w(w({},this._sdkProcessingMetadata),t),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:hn();if(!this._client)return se.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(t,re(w({originalException:t,syntheticException:i},n),{event_id:r}),this),r}captureMessage(t,n,r){let i=r&&r.event_id?r.event_id:hn();if(!this._client)return se.warn("No client configured on scope - will not capture message!"),i;let s=new Error(t);return this._client.captureMessage(t,n,re(w({originalException:t,syntheticException:s},r),{event_id:i}),this),i}captureEvent(t,n){let r=n&&n.event_id?n.event_id:hn();return this._client?(this._client.captureEvent(t,re(w({},n),{event_id:r}),this),r):(se.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}},An=_y;function SD(){return Ca("defaultCurrentScope",()=>new An)}function DD(){return Ca("defaultIsolationScope",()=>new An)}var Ey=class{constructor(e,t){let n;e?n=e:n=new An;let r;t?r=t:r=new An,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(r){throw this._popScope(),r}return Hi(n)?n.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Ta(){let e=ls(),t=hl(e);return t.stack=t.stack||new Ey(SD(),DD())}function uL(e){return Ta().withScope(e)}function dL(e,t){let n=Ta();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function ID(e){return Ta().withScope(()=>e(Ta().getIsolationScope()))}function TD(){return{withIsolationScope:ID,withScope:uL,withSetScope:dL,withSetIsolationScope:(e,t)=>ID(t),getCurrentScope:()=>Ta().getScope(),getIsolationScope:()=>Ta().getIsolationScope()}}function hf(e){let t=hl(e);return t.acs?t.acs:TD()}function us(){let e=ls();return hf(e).getCurrentScope()}function ds(){let e=ls();return hf(e).getIsolationScope()}function mf(){return Ca("globalScope",()=>new An)}function gf(...e){let t=ls(),n=hf(t);if(e.length===2){let[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Vt(){return us().getClient()}var fL="_sentryMetrics";function xD(e){let t=e[fL];if(!t)return;let n={};for(let[,[r,i]]of t)(n[r]||(n[r]=[])).push(nn(i));return n}var wy="sentry.source",by="sentry.sample_rate",Cy="sentry.op",Sy="sentry.origin",pL=1;function AD(e){let{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=fs(e);return nn({parent_span_id:r,span_id:t,trace_id:n})}function RD(e){return typeof e=="number"?ND(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ND(e.getTime()):er()}function ND(e){return e>9999999999?e/1e3:e}function fs(e){if(mL(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(hL(e)){let{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:a,status:l}=e;return nn({span_id:t,trace_id:n,data:r,description:s,parent_span_id:a,start_timestamp:RD(i),timestamp:RD(o)||void 0,status:gL(l),op:r[Cy],origin:r[Sy],_metrics_summary:xD(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function hL(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function mL(e){return typeof e.getSpanJSON=="function"}function MD(e){let{traceFlags:t}=e.spanContext();return t===pL}function gL(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var vL="_sentryRootSpan";function gl(e){return e[vL]||e}var vf="production",yL="_frozenDsc";function Dy(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=nn({environment:n.environment||vf,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function OD(e){let t=Vt();if(!t)return{};let n=Dy(fs(e).trace_id||"",t),r=gl(e),i=r[yL];if(i)return i;let s=r.spanContext().traceState,o=s&&s.get("sentry.dsc"),a=o&&sy(o);if(a)return a;let l=fs(r),c=l.data||{},h=c[by];h!=null&&(n.sample_rate=`${h}`);let d=c[wy],f=l.description;return d!=="url"&&f&&(n.transaction=f),n.sampled=String(MD(r)),t.emit("createDsc",n,r),n}function PD(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){gt&&se.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function _L(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function kD(e,t,n,r){let i=df(n),s=w(w({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:ci(t)}),o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return di(s,[o])}function LD(e,t,n,r){let i=df(n),s=e.type&&e.type!=="replay_event"?e.type:"event";_L(e,n&&n.sdk);let o=dy(e,i,r,t);return delete e.sdkProcessingMetadata,di(o,[[{type:s},e]])}function yf(e,t,n,r=0){return new $r((i,s)=>{let o=e[r];if(t===null||typeof o!="function")i(t);else{let a=o(w({},t),n);gt&&o.id&&a===null&&se.log(`Event processor "${o.id}" dropped event`),Hi(a)?a.then(l=>yf(e,l,n,r+1).then(i)).then(null,s):yf(e,a,n,r+1).then(i).then(null,s)}})}function FD(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;EL(e,t),r&&CL(e,r),SL(e,n),wL(e,i),bL(e,s)}function Iy(e,t){let{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:h,attachments:d,propagationContext:f,transactionName:g,span:m}=t;vl(e,"extra",n),vl(e,"tags",r),vl(e,"user",i),vl(e,"contexts",s),vl(e,"sdkProcessingMetadata",a),o&&(e.level=o),g&&(e.transactionName=g),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext=w(w({},e.propagationContext),f)}function vl(e,t,n){if(n&&Object.keys(n).length){e[t]=w({},e[t]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function EL(e,t){let{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=t,l=nn(n);l&&Object.keys(l).length&&(e.extra=w(w({},l),e.extra));let c=nn(r);c&&Object.keys(c).length&&(e.tags=w(w({},c),e.tags));let h=nn(i);h&&Object.keys(h).length&&(e.user=w(w({},h),e.user));let d=nn(s);d&&Object.keys(d).length&&(e.contexts=w(w({},d),e.contexts)),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function wL(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function bL(e,t){e.sdkProcessingMetadata=w(w({},e.sdkProcessingMetadata),t)}function CL(e,t){e.contexts=w({trace:AD(t)},e.contexts),e.sdkProcessingMetadata=w({dynamicSamplingContext:OD(t)},e.sdkProcessingMetadata);let n=gl(t),r=fs(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function SL(e,t){e.fingerprint=e.fingerprint?af(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function VD(e,t,n,r,i,s){let{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l=re(w({},t),{event_id:t.event_id||n.event_id||hn(),timestamp:t.timestamp||ui()}),c=n.integrations||e.integrations.map(b=>b.name);DL(l,e),xL(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&IL(l,e.stackParser);let h=NL(r,n.captureContext);n.mechanism&&ji(l,n.mechanism);let d=i?i.getEventProcessors():[],f=mf().getScopeData();if(s){let b=s.getScopeData();Iy(f,b)}if(h){let b=h.getScopeData();Iy(f,b)}let g=[...n.attachments||[],...f.attachments];g.length&&(n.attachments=g),FD(l,f);let m=[...d,...f.eventProcessors];return yf(m,l,n).then(b=>(b&&TL(b),typeof o=="number"&&o>0?RL(b,o,a):b))}function DL(e,t){let{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:vf),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=si(e.message,s));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=si(o.value,s));let a=e.request;a&&a.url&&(a.url=si(a.url,s))}var BD=new WeakMap;function IL(e,t){let n=ye._sentryDebugIds;if(!n)return;let r,i=BD.get(t);i?r=i:(r=new Map,BD.set(t,r));let s=Object.entries(n).reduce((o,[a,l])=>{let c,h=r.get(a);h?c=h:(c=t(a),r.set(a,c));for(let d=c.length-1;d>=0;d--){let f=c[d];if(f.filename){o[f.filename]=l;break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=s[a.filename])})})}catch{}}function TL(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function xL(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function RL(e,t,n){if(!e)return null;let r=w(w(w(w(w({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>w(w({},i),i.data&&{data:jr(i.data,t,n)}))}),e.user&&{user:jr(e.user,t,n)}),e.contexts&&{contexts:jr(e.contexts,t,n)}),e.extra&&{extra:jr(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=jr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>w(w({},i),i.data&&{data:jr(i.data,t,n)}))),r}function NL(e,t){if(!t)return e;let n=e?e.clone():new An;return n.update(t),n}function UD(e){if(e)return AL(e)?{captureContext:e}:OL(e)?{captureContext:e}:e}function AL(e){return e instanceof An||typeof e=="function"}var ML=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function OL(e){return Object.keys(e).some(t=>ML.includes(t))}function _f(e,t){return us().captureException(e,UD(t))}function yl(e,t){return us().captureEvent(e,t)}var PL="7";function kL(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function LL(e){return`${kL(e)}${e.projectId}/envelope/`}function FL(e,t){return Gv(w({sentry_key:e.publicKey,sentry_version:PL},t&&{sentry_client:`${t.name}/${t.version}`}))}function jD(e,t,n){return t||`${LL(e)}?${FL(e,n)}`}var $D=[];function WD(e,t){let n={};return t.forEach(r=>{r&&xy(e,r,n)}),n}function Ty(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function xy(e,t,n){if(n[t.name]){gt&&se.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,$D.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),$D.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>r(i,s,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),i=Object.assign((s,o)=>r(s,o,e),{id:t.name});e.addEventProcessor(i)}gt&&se.log(`Integration installed: ${t.name}`)}var GD="Not capturing exception because it's already been captured.",_l=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Xd(e.dsn):gt&&se.warn("No DSN provided, client will not send events."),this._dsn){let t=jD(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(re(w({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){let r=hn();if(sf(e))return gt&&se.log(GD),r;let i=w({event_id:r},t);return this._process(this.eventFromException(e,i).then(s=>this._captureEvent(s,i,n))),i.event_id}captureMessage(e,t,n,r){let i=w({event_id:hn()},n),s=wa(e)?e:String(e),o=ss(e)?this.eventFromMessage(s,t,i):this.eventFromException(e,i);return this._process(o.then(a=>this._captureEvent(a,i,r))),i.event_id}captureEvent(e,t,n){let r=hn();if(t&&t.originalException&&sf(t.originalException))return gt&&se.log(GD),r;let i=w({event_id:r},t),s=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,s||n)),i.event_id}captureSession(e){typeof e.release!="string"?gt&&se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ml(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(r=>n&&r))):vr(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];xy(this,e,this._integrations),t||Ty(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=LD(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])n=cy(n,uy(i));let r=this.sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=kD(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;gt&&se.log(`Adding outcome: "${r}"`),this._outcomes[r]=(this._outcomes[r]||0)+1}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let r=n.indexOf(t);r>-1&&n.splice(r,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(r=>r(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,t=>(gt&&se.error("Error while sending event:",t),t)):(gt&&se.error("Transport disabled"),vr({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=WD(this,e),Ty(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let o of i){let a=o.mechanism;if(a&&a.handled===!1){n=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&n)&&(ml(e,re(w({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e))}_isClientDoneProcessing(e){return new $r(t=>{let n=0,r=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),t(!0)):(n+=r,e&&n>=e&&(clearInterval(i),t(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r=ds()){let i=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s.length>0&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),VD(i,e,t,n,this,r).then(o=>{if(o===null)return o;let a=w(w({},r.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(o.contexts&&o.contexts.trace)&&a){let{traceId:l,spanId:c,parentSpanId:h,dsc:d}=a;o.contexts=w({trace:nn({trace_id:l,span_id:c,parent_span_id:h})},o.contexts);let f=d||Dy(l,this);o.sdkProcessingMetadata=w({dynamicSamplingContext:f},o.sdkProcessingMetadata)}return o})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(r=>r.event_id,r=>{if(gt){let i=r;i.logLevel==="log"?se.log(i.message):se.warn(i)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,s=Ry(e),o=zD(e),a=e.type||"error",l=`before send for type \`${a}\``,c=typeof i>"u"?void 0:PD(i);if(o&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),go(new Nn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let h=a==="replay_event"?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",h,e),new Nn("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return f;let g=VL(this,r,f,t);return BL(g,l)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",h,e),Ry(e)){let b=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+b}throw new Nn(`${l} returned \`null\`, will not send event.`,"log")}let g=n&&n.getSession();!s&&g&&this._updateSessionFromEvent(g,f);let m=f.transaction_info;if(s&&m&&f.transaction!==e.transaction){let b="custom";f.transaction_info=re(w({},m),{source:b})}return this.sendEvent(f,t),f}).then(null,f=>{throw f instanceof Nn?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Nn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
29
|
-
Reason: ${f}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,n])=>{let[r,i]=t.split(":");return{reason:r,category:i,quantity:n}})}};function BL(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Hi(e))return e.then(r=>{if(!Ur(r)&&r!==null)throw new Nn(n);return r},r=>{throw new Nn(`${t} rejected with ${r}`)});if(!Ur(e)&&e!==null)throw new Nn(n);return e}function VL(e,t,n,r){let{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=t;if(zD(n)&&i)return i(n,r);if(Ry(n)){if(n.spans&&o){let a=[];for(let l of n.spans){let c=o(l);c?a.push(c):e.recordDroppedEvent("before_send","span")}n.spans=a}if(s)return s(n,r)}return n}function zD(e){return e.type===void 0}function Ry(e){return e.type==="transaction"}var UL=64;function Ef(e,t,n=iy(e.bufferSize||UL)){let r={},i=o=>n.drain(o);function s(o){let a=[];if(lf(o,(d,f)=>{let g=uf(f);if(py(r,g)){let m=qD(d,f);e.recordDroppedEvent("ratelimit_backoff",g,m)}else a.push(d)}),a.length===0)return
|
|
28
|
+
`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(jr(a))}i(l)}}return typeof r=="string"?r:oL(r)}function oL(e){let t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}function uy(e){let t=typeof e.data=="string"?ay(e.data):e.data;return[nn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var sL={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function uf(e){return sL[e]}function df(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function dy(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return w(w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:ci(r)}),i&&{trace:nn(w({},i))})}function fy(e,t,n){let r=[{type:"client_report"},{timestamp:n||ui(),discarded_events:e}];return di(t?{dsn:t}:{},[r])}function bD(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function CD(e,t){return e[t]||e.all||0}function py(e,t,n=Date.now()){return CD(e,t)>n}function hy(e,{statusCode:t,headers:n},r=Date.now()){let i=w({},e),s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(let a of s.trim().split(",")){let[l,c,,,h]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=r+f;else for(let g of c.split(";"))g==="metric_bucket"?(!h||h.split(";").includes("custom"))&&(i[g]=r+f):i[g]=r+f}else o?i.all=r+bD(o,r):t===429&&(i.all=r+60*1e3);return i}function ff(){return{traceId:hn(),spanId:hn().substring(16)}}var pf=ye;function my(){let e=pf.chrome,t=e&&e.app&&e.app.runtime,n="history"in pf&&!!pf.history.pushState&&!!pf.history.replaceState;return!t&&n}var gt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ls(){return hl(ye),ye}function hl(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||vr,t[vr]=t[vr]||{}}function ml(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||tr(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:hn()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}var gy="_sentrySpan";function vy(e,t){t?Ln(e,gy,t):delete e[gy]}function yy(e){return e[gy]}var lL=100,_y=class PS{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ff()}clone(){let t=new PS;return t._breadcrumbs=[...this._breadcrumbs],t._tags=w({},this._tags),t._extra=w({},this._extra),t._contexts=w({},this._contexts),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata=w({},this._sdkProcessingMetadata),t._propagationContext=w({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,vy(t,yy(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ml(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags=w(w({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=re(w({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=w(w({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=re(w({},this._extra),{[t]:n}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,[r,i]=n instanceof An?[n.getScopeData(),n.getRequestSession()]:Ur(n)?[t,t.requestSession]:[],{tags:s,extra:o,user:a,contexts:l,level:c,fingerprint:h=[],propagationContext:d}=r||{};return this._tags=w(w({},this._tags),s),this._extra=w(w({},this._extra),o),this._contexts=w(w({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),h.length&&(this._fingerprint=h),d&&(this._propagationContext=d),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,vy(this,void 0),this._attachments=[],this._propagationContext=ff(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:lL;if(r<=0)return this;let i=w({timestamp:ui()},t),s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>r?s.slice(-r):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:yy(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=w(w({},this._sdkProcessingMetadata),t),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:hn();if(!this._client)return se.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(t,re(w({originalException:t,syntheticException:i},n),{event_id:r}),this),r}captureMessage(t,n,r){let i=r&&r.event_id?r.event_id:hn();if(!this._client)return se.warn("No client configured on scope - will not capture message!"),i;let s=new Error(t);return this._client.captureMessage(t,n,re(w({originalException:t,syntheticException:s},r),{event_id:i}),this),i}captureEvent(t,n){let r=n&&n.event_id?n.event_id:hn();return this._client?(this._client.captureEvent(t,re(w({},n),{event_id:r}),this),r):(se.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}},An=_y;function SD(){return Ca("defaultCurrentScope",()=>new An)}function DD(){return Ca("defaultIsolationScope",()=>new An)}var Ey=class{constructor(e,t){let n;e?n=e:n=new An;let r;t?r=t:r=new An,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(r){throw this._popScope(),r}return Hi(n)?n.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Ta(){let e=ls(),t=hl(e);return t.stack=t.stack||new Ey(SD(),DD())}function uL(e){return Ta().withScope(e)}function dL(e,t){let n=Ta();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function ID(e){return Ta().withScope(()=>e(Ta().getIsolationScope()))}function TD(){return{withIsolationScope:ID,withScope:uL,withSetScope:dL,withSetIsolationScope:(e,t)=>ID(t),getCurrentScope:()=>Ta().getScope(),getIsolationScope:()=>Ta().getIsolationScope()}}function hf(e){let t=hl(e);return t.acs?t.acs:TD()}function us(){let e=ls();return hf(e).getCurrentScope()}function ds(){let e=ls();return hf(e).getIsolationScope()}function mf(){return Ca("globalScope",()=>new An)}function gf(...e){let t=ls(),n=hf(t);if(e.length===2){let[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Ut(){return us().getClient()}var fL="_sentryMetrics";function xD(e){let t=e[fL];if(!t)return;let n={};for(let[,[r,i]]of t)(n[r]||(n[r]=[])).push(nn(i));return n}var wy="sentry.source",by="sentry.sample_rate",Cy="sentry.op",Sy="sentry.origin",pL=1;function AD(e){let{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=fs(e);return nn({parent_span_id:r,span_id:t,trace_id:n})}function RD(e){return typeof e=="number"?ND(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ND(e.getTime()):tr()}function ND(e){return e>9999999999?e/1e3:e}function fs(e){if(mL(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(hL(e)){let{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:a,status:l}=e;return nn({span_id:t,trace_id:n,data:r,description:s,parent_span_id:a,start_timestamp:RD(i),timestamp:RD(o)||void 0,status:gL(l),op:r[Cy],origin:r[Sy],_metrics_summary:xD(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function hL(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function mL(e){return typeof e.getSpanJSON=="function"}function MD(e){let{traceFlags:t}=e.spanContext();return t===pL}function gL(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var vL="_sentryRootSpan";function gl(e){return e[vL]||e}var vf="production",yL="_frozenDsc";function Dy(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=nn({environment:n.environment||vf,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function OD(e){let t=Ut();if(!t)return{};let n=Dy(fs(e).trace_id||"",t),r=gl(e),i=r[yL];if(i)return i;let s=r.spanContext().traceState,o=s&&s.get("sentry.dsc"),a=o&&sy(o);if(a)return a;let l=fs(r),c=l.data||{},h=c[by];h!=null&&(n.sample_rate=`${h}`);let d=c[wy],f=l.description;return d!=="url"&&f&&(n.transaction=f),n.sampled=String(MD(r)),t.emit("createDsc",n,r),n}function PD(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){gt&&se.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function _L(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function kD(e,t,n,r){let i=df(n),s=w(w({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:ci(t)}),o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return di(s,[o])}function LD(e,t,n,r){let i=df(n),s=e.type&&e.type!=="replay_event"?e.type:"event";_L(e,n&&n.sdk);let o=dy(e,i,r,t);return delete e.sdkProcessingMetadata,di(o,[[{type:s},e]])}function yf(e,t,n,r=0){return new $r((i,s)=>{let o=e[r];if(t===null||typeof o!="function")i(t);else{let a=o(w({},t),n);gt&&o.id&&a===null&&se.log(`Event processor "${o.id}" dropped event`),Hi(a)?a.then(l=>yf(e,l,n,r+1).then(i)).then(null,s):yf(e,a,n,r+1).then(i).then(null,s)}})}function FD(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;EL(e,t),r&&CL(e,r),SL(e,n),wL(e,i),bL(e,s)}function Iy(e,t){let{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:h,attachments:d,propagationContext:f,transactionName:g,span:m}=t;vl(e,"extra",n),vl(e,"tags",r),vl(e,"user",i),vl(e,"contexts",s),vl(e,"sdkProcessingMetadata",a),o&&(e.level=o),g&&(e.transactionName=g),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext=w(w({},e.propagationContext),f)}function vl(e,t,n){if(n&&Object.keys(n).length){e[t]=w({},e[t]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function EL(e,t){let{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=t,l=nn(n);l&&Object.keys(l).length&&(e.extra=w(w({},l),e.extra));let c=nn(r);c&&Object.keys(c).length&&(e.tags=w(w({},c),e.tags));let h=nn(i);h&&Object.keys(h).length&&(e.user=w(w({},h),e.user));let d=nn(s);d&&Object.keys(d).length&&(e.contexts=w(w({},d),e.contexts)),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function wL(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function bL(e,t){e.sdkProcessingMetadata=w(w({},e.sdkProcessingMetadata),t)}function CL(e,t){e.contexts=w({trace:AD(t)},e.contexts),e.sdkProcessingMetadata=w({dynamicSamplingContext:OD(t)},e.sdkProcessingMetadata);let n=gl(t),r=fs(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function SL(e,t){e.fingerprint=e.fingerprint?af(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function VD(e,t,n,r,i,s){let{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l=re(w({},t),{event_id:t.event_id||n.event_id||hn(),timestamp:t.timestamp||ui()}),c=n.integrations||e.integrations.map(b=>b.name);DL(l,e),xL(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&IL(l,e.stackParser);let h=NL(r,n.captureContext);n.mechanism&&ji(l,n.mechanism);let d=i?i.getEventProcessors():[],f=mf().getScopeData();if(s){let b=s.getScopeData();Iy(f,b)}if(h){let b=h.getScopeData();Iy(f,b)}let g=[...n.attachments||[],...f.attachments];g.length&&(n.attachments=g),FD(l,f);let m=[...d,...f.eventProcessors];return yf(m,l,n).then(b=>(b&&TL(b),typeof o=="number"&&o>0?RL(b,o,a):b))}function DL(e,t){let{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:vf),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=si(e.message,s));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=si(o.value,s));let a=e.request;a&&a.url&&(a.url=si(a.url,s))}var BD=new WeakMap;function IL(e,t){let n=ye._sentryDebugIds;if(!n)return;let r,i=BD.get(t);i?r=i:(r=new Map,BD.set(t,r));let s=Object.entries(n).reduce((o,[a,l])=>{let c,h=r.get(a);h?c=h:(c=t(a),r.set(a,c));for(let d=c.length-1;d>=0;d--){let f=c[d];if(f.filename){o[f.filename]=l;break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=s[a.filename])})})}catch{}}function TL(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function xL(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function RL(e,t,n){if(!e)return null;let r=w(w(w(w(w({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>w(w({},i),i.data&&{data:jr(i.data,t,n)}))}),e.user&&{user:jr(e.user,t,n)}),e.contexts&&{contexts:jr(e.contexts,t,n)}),e.extra&&{extra:jr(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=jr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>w(w({},i),i.data&&{data:jr(i.data,t,n)}))),r}function NL(e,t){if(!t)return e;let n=e?e.clone():new An;return n.update(t),n}function UD(e){if(e)return AL(e)?{captureContext:e}:OL(e)?{captureContext:e}:e}function AL(e){return e instanceof An||typeof e=="function"}var ML=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function OL(e){return Object.keys(e).some(t=>ML.includes(t))}function _f(e,t){return us().captureException(e,UD(t))}function yl(e,t){return us().captureEvent(e,t)}var PL="7";function kL(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function LL(e){return`${kL(e)}${e.projectId}/envelope/`}function FL(e,t){return Gv(w({sentry_key:e.publicKey,sentry_version:PL},t&&{sentry_client:`${t.name}/${t.version}`}))}function jD(e,t,n){return t||`${LL(e)}?${FL(e,n)}`}var $D=[];function WD(e,t){let n={};return t.forEach(r=>{r&&xy(e,r,n)}),n}function Ty(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function xy(e,t,n){if(n[t.name]){gt&&se.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,$D.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),$D.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>r(i,s,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),i=Object.assign((s,o)=>r(s,o,e),{id:t.name});e.addEventProcessor(i)}gt&&se.log(`Integration installed: ${t.name}`)}var GD="Not capturing exception because it's already been captured.",_l=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Xd(e.dsn):gt&&se.warn("No DSN provided, client will not send events."),this._dsn){let t=jD(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(re(w({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){let r=hn();if(sf(e))return gt&&se.log(GD),r;let i=w({event_id:r},t);return this._process(this.eventFromException(e,i).then(s=>this._captureEvent(s,i,n))),i.event_id}captureMessage(e,t,n,r){let i=w({event_id:hn()},n),s=wa(e)?e:String(e),o=ss(e)?this.eventFromMessage(s,t,i):this.eventFromException(e,i);return this._process(o.then(a=>this._captureEvent(a,i,r))),i.event_id}captureEvent(e,t,n){let r=hn();if(t&&t.originalException&&sf(t.originalException))return gt&&se.log(GD),r;let i=w({event_id:r},t),s=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,s||n)),i.event_id}captureSession(e){typeof e.release!="string"?gt&&se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ml(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(r=>n&&r))):_r(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];xy(this,e,this._integrations),t||Ty(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=LD(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])n=cy(n,uy(i));let r=this.sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=kD(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;gt&&se.log(`Adding outcome: "${r}"`),this._outcomes[r]=(this._outcomes[r]||0)+1}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let r=n.indexOf(t);r>-1&&n.splice(r,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(r=>r(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,t=>(gt&&se.error("Error while sending event:",t),t)):(gt&&se.error("Transport disabled"),_r({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=WD(this,e),Ty(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let o of i){let a=o.mechanism;if(a&&a.handled===!1){n=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&n)&&(ml(e,re(w({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e))}_isClientDoneProcessing(e){return new $r(t=>{let n=0,r=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),t(!0)):(n+=r,e&&n>=e&&(clearInterval(i),t(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r=ds()){let i=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s.length>0&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),VD(i,e,t,n,this,r).then(o=>{if(o===null)return o;let a=w(w({},r.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(o.contexts&&o.contexts.trace)&&a){let{traceId:l,spanId:c,parentSpanId:h,dsc:d}=a;o.contexts=w({trace:nn({trace_id:l,span_id:c,parent_span_id:h})},o.contexts);let f=d||Dy(l,this);o.sdkProcessingMetadata=w({dynamicSamplingContext:f},o.sdkProcessingMetadata)}return o})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(r=>r.event_id,r=>{if(gt){let i=r;i.logLevel==="log"?se.log(i.message):se.warn(i)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,s=Ry(e),o=zD(e),a=e.type||"error",l=`before send for type \`${a}\``,c=typeof i>"u"?void 0:PD(i);if(o&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),go(new Nn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let h=a==="replay_event"?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",h,e),new Nn("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return f;let g=VL(this,r,f,t);return BL(g,l)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",h,e),Ry(e)){let b=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+b}throw new Nn(`${l} returned \`null\`, will not send event.`,"log")}let g=n&&n.getSession();!s&&g&&this._updateSessionFromEvent(g,f);let m=f.transaction_info;if(s&&m&&f.transaction!==e.transaction){let b="custom";f.transaction_info=re(w({},m),{source:b})}return this.sendEvent(f,t),f}).then(null,f=>{throw f instanceof Nn?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Nn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
29
|
+
Reason: ${f}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,n])=>{let[r,i]=t.split(":");return{reason:r,category:i,quantity:n}})}};function BL(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Hi(e))return e.then(r=>{if(!Ur(r)&&r!==null)throw new Nn(n);return r},r=>{throw new Nn(`${t} rejected with ${r}`)});if(!Ur(e)&&e!==null)throw new Nn(n);return e}function VL(e,t,n,r){let{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=t;if(zD(n)&&i)return i(n,r);if(Ry(n)){if(n.spans&&o){let a=[];for(let l of n.spans){let c=o(l);c?a.push(c):e.recordDroppedEvent("before_send","span")}n.spans=a}if(s)return s(n,r)}return n}function zD(e){return e.type===void 0}function Ry(e){return e.type==="transaction"}var UL=64;function Ef(e,t,n=iy(e.bufferSize||UL)){let r={},i=o=>n.drain(o);function s(o){let a=[];if(lf(o,(d,f)=>{let g=uf(f);if(py(r,g)){let m=qD(d,f);e.recordDroppedEvent("ratelimit_backoff",g,m)}else a.push(d)}),a.length===0)return _r({});let l=di(o[0],a),c=d=>{lf(l,(f,g)=>{let m=qD(f,g);e.recordDroppedEvent(d,uf(g),m)})},h=()=>t({body:ly(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&>&&se.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=hy(r,d),d),d=>{throw c("network_error"),d});return n.add(h).then(d=>d,d=>{if(d instanceof Nn)return gt&&se.error("Skipped sending event because buffer is full."),c("queue_overflow"),_r({});throw d})}return{send:s,flush:i}}function qD(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Ny(e,t,n=[t],r="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:vr})),version:vr}),e._metadata=i}var HL=100;function fi(e,t){let n=Ut(),r=ds();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=HL}=n.getOptions();if(s<=0)return;let o=ui(),a=w({timestamp:o},e),l=i?Da(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,s))}var YD,jL="FunctionToString",KD=new WeakMap,$L=()=>({name:jL,setupOnce(){YD=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=cs(this),n=KD.has(Ut())&&t!==void 0?t:this;return YD.apply(n,e)}}catch{}},setup(e){KD.set(e,!0)}}),wf=$L,WL=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],GL="InboundFilters",zL=(e={})=>({name:GL,processEvent(t,n,r){let i=r.getOptions(),s=qL(e,i);return YL(t,s)?null:t}}),Cf=zL;function qL(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:WL],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function YL(e,t){return t.ignoreInternal&&eF(e)?(gt&&se.warn(`Event dropped due to being internal Sentry Error.
|
|
30
30
|
Event: ${Hr(e)}`),!0):KL(e,t.ignoreErrors)?(gt&&se.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
31
31
|
Event: ${Hr(e)}`),!0):nF(e)?(gt&&se.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
32
32
|
Event: ${Hr(e)}`),!0):ZL(e,t.ignoreTransactions)?(gt&&se.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
@@ -34,23 +34,23 @@ Event: ${Hr(e)}`),!0):XL(e,t.denyUrls)?(gt&&se.warn(`Event dropped due to being
|
|
|
34
34
|
Event: ${Hr(e)}.
|
|
35
35
|
Url: ${bf(e)}`),!0):JL(e,t.allowUrls)?!1:(gt&&se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
36
36
|
Event: ${Hr(e)}.
|
|
37
|
-
Url: ${bf(e)}`),!0)}function KL(e,t){return e.type||!t||!t.length?!1:QL(e).some(n=>ba(n,t))}function ZL(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?ba(n,t):!1}function XL(e,t){if(!t||!t.length)return!1;let n=bf(e);return n?ba(n,t):!1}function JL(e,t){if(!t||!t.length)return!0;let n=bf(e);return n?ba(n,t):!0}function QL(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function eF(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function tF(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function bf(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?tF(t):null}catch{return gt&&se.error(`Cannot extract url for event ${Hr(e)}`),null}}function nF(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}var rF="Dedupe",iF=()=>{let e;return{name:rF,processEvent(t){if(t.type)return t;try{if(oF(t,e))return gt&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Sf=iF;function oF(e,t){return t?!!(sF(e,t)||aF(e,t)):!1}function sF(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!JD(e,t)||!XD(e,t))}function aF(e,t){let n=ZD(t),r=ZD(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!JD(e,t)||!XD(e,t))}function XD(e,t){let n=tf(e),r=tf(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let s=r[i],o=n[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function JD(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function ZD(e){return e.exception&&e.exception.values&&e.exception.values[0]}var qt=ye,Ay=0;function My(){return Ay>0}function EF(){Ay++,setTimeout(()=>{Ay--})}function ps(e,t={},n){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(cs(e))return e}catch{return e}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let s=i.map(o=>ps(o,t));return e.apply(this,s)}catch(s){throw EF(),gf(o=>{o.addEventProcessor(a=>(t.mechanism&&(Ia(a,void 0,void 0),ji(a,t.mechanism)),a.extra=re(w({},a.extra),{arguments:i}),a)),_f(s)}),s}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}Jd(r,e),Ln(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var Wi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Df(e,t){let n=ky(e,t),r={type:t&&t.name,value:DF(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function wF(e,t,n,r){let i=Vt(),s=i&&i.getOptions().normalizeDepth,o=xF(t),a={__serialized__:cf(t,s)};if(o)return{exception:{values:[Df(e,o)]},extra:a};let l={exception:{values:[{type:as(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:IF(t,{isUnhandledRejection:r})}]},extra:a};if(n){let c=ky(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function Oy(e,t){return{exception:{values:[Df(e,t)]}}}function ky(e,t){let n=t.stacktrace||t.stack||"",r=CF(t),i=SF(t);try{return e(n,r,i)}catch{}return[]}var bF=/Minified React error #\d+;/i;function CF(e){return e&&bF.test(e.message)?1:0}function SF(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function DF(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function nI(e,t,n,r){let i=n&&n.syntheticException||void 0,s=If(e,t,i,r);return ji(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),vr(s)}function rI(e,t,n="info",r,i){let s=r&&r.syntheticException||void 0,o=Py(e,t,s,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),vr(o)}function If(e,t,n,r,i){let s;if(Yd(t)&&t.error)return Oy(e,t.error);if(Kd(t)||kv(t)){let o=t;if("stack"in t)s=Oy(e,t);else{let a=o.name||(Kd(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Py(e,l,n,r),Ia(s,l)}return"code"in o&&(s.tags=re(w({},s.tags),{"DOMException.code":`${o.code}`})),s}return os(t)?Oy(e,t):Ur(t)||as(t)?(s=wF(e,t,n,i),ji(s,{synthetic:!0}),s):(s=Py(e,t,n,r),Ia(s,`${t}`,void 0),ji(s,{synthetic:!0}),s)}function Py(e,t,n,r){let i={};if(r&&n){let s=ky(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(wa(t)){let{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function IF(e,{isUnhandledRejection:t}){let n=zv(e),r=t?"promise rejection":"exception";return Yd(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:as(e)?`Event \`${TF(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function TF(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function xF(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function iI(e,{metadata:t,tunnel:n,dsn:r}){let i=w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:ci(r)}),s=RF(e);return di(i,[s])}function RF(e){return[{type:"user_report"},e]}var El=class extends _l{constructor(e){let t=w({parentSpanIsAlwaysRootSpan:!0},e),n=qt.SENTRY_SDK_SOURCE||ny();Ny(t,"browser",["browser"],n),super(t),t.sendClientReports&&qt.document&&qt.document.addEventListener("visibilitychange",()=>{qt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return nI(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return rI(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Wi&&se.warn("SDK not enabled, will not capture user feedback.");return}let t=iI(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){Wi&&se.log("No outcomes to send");return}if(!this._dsn){Wi&&se.log("No dsn provided, will not send outcomes");return}Wi&&se.log("Sending outcomes:",e);let t=fy(e,this._options.tunnel&&ci(this._dsn));this.sendEnvelope(t)}},oI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Jt=ye,NF=1e3,sI,Ly,Fy;function By(e){let t="dom";Fn(t,e),Bn(t,AF)}function AF(){if(!Jt.document)return;let e=rn.bind(null,"dom"),t=aI(e,!0);Jt.document.addEventListener("click",t,!1),Jt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=Jt[n]&&Jt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Lt(r,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},h=c[s]=c[s]||{refCount:0};if(!h.handler){let d=aI(e);h.handler=d,i.call(this,s,d,a)}h.refCount++}catch{}return i.call(this,s,o,a)}}),Lt(r,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__||{},h=c[s];h&&(h.refCount--,h.refCount<=0&&(i.call(this,s,h.handler,a),h.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}function MF(e){if(e.type!==Ly)return!1;try{if(!e.target||e.target._sentryId!==Fy)return!1}catch{}return!0}function OF(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function aI(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=PF(n);if(OF(n.type,r))return;Ln(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ln(r,"_sentryId",hn());let i=n.type==="keypress"?"input":n.type;MF(n)||(e({event:n,name:i,global:t}),Ly=n.type,Fy=r?r._sentryId:void 0),clearTimeout(sI),sI=Jt.setTimeout(()=>{Fy=void 0,Ly=void 0},NF)}}function PF(e){try{return e.target}catch{return null}}var Tf;function Vy(e){let t="history";Fn(t,e),Bn(t,kF)}function kF(){if(!my())return;let e=Jt.onpopstate;Jt.onpopstate=function(...n){let r=Jt.location.href,i=Tf;if(Tf=r,rn("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let s=Tf,o=String(i);Tf=o,rn("history",{from:s,to:o})}return n.apply(this,r)}}Lt(Jt.history,"pushState",t),Lt(Jt.history,"replaceState",t)}var xf={};function Uy(e){let t=xf[e];if(t)return t;let n=Jt[e];if(dl(n))return xf[e]=n.bind(Jt);let r=Jt.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let s=i.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(i)}catch(i){oI&&se.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(xf[e]=n.bind(Jt))}function Rf(e){xf[e]=void 0}var hs="__sentry_xhr_v3__";function Hy(e){let t="xhr";Fn(t,e),Bn(t,LF)}function LF(){if(!Jt.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Lt(e,"open",function(t){return function(...n){let r=er()*1e3,i=kn(n[0])?n[0].toUpperCase():void 0,s=FF(n[1]);if(!i||!s)return t.apply(this,n);this[hs]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[hs];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:er()*1e3,startTimestamp:r,xhr:this};rn("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Lt(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),Lt(this,"setRequestHeader",function(a){return function(...l){let[c,h]=l,d=this[hs];return d&&kn(c)&&kn(h)&&(d.request_headers[c.toLowerCase()]=h),a.apply(this,l)}}),t.apply(this,n)}}),Lt(e,"send",function(t){return function(...n){let r=this[hs];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:er()*1e3,xhr:this};return rn("xhr",i),t.apply(this,n)}})}function FF(e){if(kn(e))return e;try{return e.toString()}catch{}}function jy(e,t=Uy("fetch")){let n=0,r=0;function i(s){let o=s.body.length;n+=o,r++;let a=w({body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);if(!t)return Rf("fetch"),go("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Rf("fetch"),n-=o,r--,go(l)}}return Ef(e,i)}var BF=30,VF=50;function $y(e,t,n,r){let i={filename:e,function:t==="<anonymous>"?li:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var UF=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,HF=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,jF=/\((\S*)(?::(\d+))(?::(\d+))\)/,$F=e=>{let t=UF.exec(e);if(t){let[,r,i,s]=t;return $y(r,li,+i,+s)}let n=HF.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=jF.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[r,i]=dI(n[1]||li,n[2]);return $y(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},cI=[BF,$F],WF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,GF=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,zF=e=>{let t=WF.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=GF.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||li;return[r,n]=dI(r,n),$y(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},lI=[VF,zF],uI=[cI,lI],Wy=Yv(...uI),dI=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:li,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Nf=1024,YF="Breadcrumbs",KF=(e={})=>{let t=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:YF,setup(n){t.console&&Kv(JF(n)),t.dom&&By(XF(n,t.dom)),t.xhr&&Hy(QF(n)),t.fetch&&Qv(eB(n)),t.history&&Vy(tB(n)),t.sentry&&n.on("beforeSendEvent",ZF(n))}}},fI=KF;function ZF(e){return function(t){Vt()===e&&fi({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Hr(t)},{event:t})}}function XF(e,t){return function(n){if(Vt()!==e)return;let r,i,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>Nf&&(Wi&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Nf}, but a value of ${o} was configured. Sentry will use ${Nf} instead.`),o=Nf),typeof s=="string"&&(s=[s]);try{let l=n.event,c=nB(l)?l.target:l;r=ll(c,{keyAttrs:s,maxStringLength:o}),i=$v(c)}catch{r="<unknown>"}if(r.length===0)return;let a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),fi(a,{event:n.event,name:n.name,global:n.global})}}function JF(e){return function(t){if(Vt()!==e)return;let n={category:"console",data:{arguments:t.args,logger:"console"},level:oy(t.level),message:Zd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${Zd(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1);else return;fi(n,{input:t.args,level:t.level})}}function QF(e){return function(t){if(Vt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[hs];if(!n||!r||!i)return;let{method:s,url:o,status_code:a,body:l}=i,c={method:s,url:o,status_code:a},h={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r};fi({category:"xhr",data:c,type:"http"},h)}}function eB(e){return function(t){if(Vt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let i=t.fetchData,s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};fi({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=t.response,s=re(w({},t.fetchData),{status_code:i&&i.status}),o={input:t.args,response:i,startTimestamp:n,endTimestamp:r};fi({category:"fetch",data:s,type:"http"},o)}}}function tB(e){return function(t){if(Vt()!==e)return;let n=t.from,r=t.to,i=pl(qt.location.href),s=n?pl(n):void 0,o=pl(r);(!s||!s.path)&&(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),fi({category:"navigation",data:{from:n,to:r}})}}function nB(e){return!!e&&!!e.target}var rB=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],iB="BrowserApiErrors",oB=(e={})=>{let t=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:iB,setupOnce(){t.setTimeout&&Lt(qt,"setTimeout",pI),t.setInterval&&Lt(qt,"setInterval",pI),t.requestAnimationFrame&&Lt(qt,"requestAnimationFrame",sB),t.XMLHttpRequest&&"XMLHttpRequest"in qt&&Lt(XMLHttpRequest.prototype,"send",aB);let n=t.eventTarget;n&&(Array.isArray(n)?n:rB).forEach(cB)}}},hI=oB;function pI(e){return function(...t){let n=t[0];return t[0]=ps(n,{mechanism:{data:{function:gr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function sB(e){return function(t){return e.apply(this,[ps(t,{mechanism:{data:{function:"requestAnimationFrame",handler:gr(e)},handled:!1,type:"instrument"}})])}}function aB(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Lt(n,r,function(i){let s={mechanism:{data:{function:r,handler:gr(i)},handled:!1,type:"instrument"}},o=cs(i);return o&&(s.mechanism.data.handler=gr(o)),ps(i,s)})}),e.apply(this,t)}}function cB(e){let t=qt,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Lt(n,"addEventListener",function(r){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=ps(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:gr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,ps(s,{mechanism:{data:{function:"addEventListener",handler:gr(s),target:e},handled:!1,type:"instrument"}}),o])}}),Lt(n,"removeEventListener",function(r){return function(i,s,o){let a=s;try{let l=a&&a.__sentry_wrapped__;l&&r.call(this,i,l,o)}catch{}return r.call(this,i,a,o)}}))}var lB="GlobalHandlers",uB=(e={})=>{let t=w({onerror:!0,onunhandledrejection:!0},e);return{name:lB,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(dB(n),mI("onerror")),t.onunhandledrejection&&(fB(n),mI("onunhandledrejection"))}}},gI=uB;function dB(e){ey(t=>{let{stackParser:n,attachStacktrace:r}=vI();if(Vt()!==e||My())return;let{msg:i,url:s,line:o,column:a,error:l}=t,c=mB(If(n,l||i,void 0,r,!1),s,o,a);c.level="error",yl(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function fB(e){ty(t=>{let{stackParser:n,attachStacktrace:r}=vI();if(Vt()!==e||My())return;let i=pB(t),s=ss(i)?hB(i):If(n,i,void 0,r,!0);s.level="error",yl(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function pB(e){if(ss(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function hB(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function mB(e,t,n,r){let i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,h=isNaN(parseInt(n,10))?void 0:n,d=kn(t)&&t.length>0?t:jv();return l.length===0&&l.push({colno:c,filename:d,function:li,in_app:!0,lineno:h}),e}function mI(e){Wi&&se.log(`Global Handler attached: ${e}`)}function vI(){let e=Vt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var yI=()=>({name:"HttpContext",preprocessEvent(e){if(!qt.navigator&&!qt.location&&!qt.document)return;let t=e.request&&e.request.url||qt.location&&qt.location.href,{referrer:n}=qt.document||{},{userAgent:r}=qt.navigator||{},i=w(w(w({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=re(w(w({},e.request),t&&{url:t}),{headers:i});e.request=s}}),gB="cause",vB=5,yB="LinkedErrors",_B=(e={})=>{let t=e.limit||vB,n=e.key||gB;return{name:yB,preprocessEvent(r,i,s){let o=s.getOptions();Uv(Df,o.stackParser,o.maxValueLength,n,t,r,i)}}},_I=_B;function Gy(e){return[Cf(),wf(),hI(),fI(),gI(),_I(),Sf(),yI()]}var zy=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},Ct=class AS{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new AS),this.INSTANCE}captureException(t,n,r){S.error(t),this.getNewScope(n,r).captureException(t)}captureMessage(t,n,r,i){this.getNewScope(r,i).captureMessage(t,n??"error")}captureError(t,n,r,i){S.error(t,n);let s=this.getNewScope(r,i),o=new zy(t,n);s.captureException(o)}setGlobalContext(t,n){this.contexts[t]=w({context:n},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,n){let r=new An;if(r.setClient(this.client),r.setUser(this.user),t?.triggerContext){let i=t.triggerContext;r.setExtras(i.triggerData.sentryContext()),delete t.triggerContext}return t&&r.setExtras(t),this.tags&&r.setTags(this.tags),n&&r.setTags(n),Object.keys(this.contexts).forEach(i=>{r.setContext(i,this.contexts[i])}),r.setTag("language",navigator.language),r.setTag("timezone",fe.getTimezone()),r}init(){let t=Gy({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new El({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:jy,stackParser:Wy,integrations:t,environment:Rn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:Rn.debug}),this.client.init()}},fe=class{static tz;static isValidURL(e){try{return new URL(e)}catch{return}}static isNull(e){return!e||e==="null"||e==="undefined"}static removeFromArray(e,t){let n=e.indexOf(t);return n===-1?!1:(e.splice(n,1),!0)}static formatCurrency(e,t){if(e==0&&t)return"Free";let n=Oe.get(),r=Ot.get(),i=n.shopCurrencyCode||r.currency,s=n.currencyCode;s||S.warn("Currency code is not set in RuntimeData");let o=r.money?.format??n.moneyFormat,a;if(o&&i===s)a=zd.format(e*100,o);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:s||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(c){return Ct.getInstance().captureException(c,{currentCurrency:s,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),r.money?.showCurrency&&s!=="INR"&&(a=a.concat(` ${s}`))}return a}static formatNumber(e){return new Intl.NumberFormat(this.getLang(),{notation:"compact"}).format(e)}static getLang(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}static getTimezone(){if(this.tz)return this.tz;try{return this.tz=Intl.DateTimeFormat().resolvedOptions().timeZone,this.tz}catch{return""}}static documentReady(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}static onDocumentLoaded(e){document.readyState==="complete"?e():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&e()})}static showSnackbar(e){let t=document.createElement("span");t.id="snackbar",t.innerText=e,document.body.appendChild(t),t.className="show",setTimeout(()=>{t.classList.remove("show"),document.body.removeChild(t)},3e3)}static async retrySelectorForElements(e,t=10,n=document){let r=0,i=document.querySelectorAll("nonexistent-tag");for(;r<t;){let s=Math.min(100*2**r,5e3);if(await EI.JSUtils.sleep(s),i=n.querySelectorAll(e),i.length)return S.debug(`Attempt ${r+1}: ${i.length} elements found with ${e}`),i;S.debug(`Attempt ${r+1}: Elements not found with ${e}. Retrying after ${s}ms.`),r++}return S.warn(`Max attempts reached. Element not found with ${e}.`),i}static async retrySelector(e,t=10,n=document){return(await this.retrySelectorForElements(e,t,n)).item(0)}static async getCartAttributes(){let e=await ft.get(we.DEVICE_ID),t=await pn.get(we.ID,"");return[{key:"letscooee_did",value:e},{key:"letscooee_sid",value:t},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}static onNodesRemoved(e,t,n=document.body){let r=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{(o===e||o.contains(e))&&(t(),r.disconnect())})})});r.observe(n,{childList:!0})}};function xa(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:n})}var pi=class Mh{transform(t){return t==null?null:fe.formatCurrency(t)}static \u0275fac=function(t){return new(t||Mh)};static \u0275pipe=Xo({name:"cooeeCurrency",type:Mh,pure:!0})},CI=Fe(Of()),EB=Object.prototype.toString,Na=Array.isArray||function(e){return EB.call(e)==="[object Array]"};function Yy(e){return typeof e=="function"}function wB(e){return Na(e)?"array":typeof e}function qy(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function wI(e,t){return e!=null&&typeof e=="object"&&t in e}function bB(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var CB=RegExp.prototype.test;function SB(e,t){return CB.call(e,t)}var DB=/\S/;function IB(e){return!SB(DB,e)}var TB={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function xB(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return TB[t]})}var RB=/\s*/,NB=/\s+/,bI=/\s*=/,AB=/\s*\}/,MB=/#|\^|\/|>|\{|&|=|!/;function OB(e,t){if(!e)return[];var n=!1,r=[],i=[],s=[],o=!1,a=!1,l="",c=0;function h(){if(o&&!a)for(;s.length;)delete i[s.pop()];else s=[];o=!1,a=!1}var d,f,g;function m(j){if(typeof j=="string"&&(j=j.split(NB,2)),!Na(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(qy(j[0])+"\\s*"),f=new RegExp("\\s*"+qy(j[1])),g=new RegExp("\\s*"+qy("}"+j[1]))}m(t||yr.tags);for(var b=new bl(e),I,A,F,V,M,J;!b.eos();){if(I=b.pos,F=b.scanUntil(d),F)for(var Ne=0,ht=F.length;Ne<ht;++Ne)V=F.charAt(Ne),IB(V)?(s.push(i.length),l+=V):(a=!0,n=!0,l+=" "),i.push(["text",V,I,I+1]),I+=1,V===`
|
|
38
|
-
`&&(h(),l="",c=0,n=!1);if(!b.scan(d))break;if(o=!0,A=b.scan(MB)||"name",b.scan(RB),A==="="?(F=b.scanUntil(bI),b.scan(bI),b.scanUntil(f)):A==="{"?(F=b.scanUntil(g),b.scan(AB),b.scanUntil(f),A="&"):F=b.scanUntil(f),!b.scan(f))throw new Error("Unclosed tag at "+b.pos);if(A==">"?M=[A,F,I,b.pos,l,c,n]:M=[A,F,I,b.pos],c++,i.push(M),A==="#"||A==="^")r.push(M);else if(A==="/"){if(J=r.pop(),!J)throw new Error('Unopened section "'+F+'" at '+I);if(J[1]!==F)throw new Error('Unclosed section "'+J[1]+'" at '+I)}else A==="name"||A==="{"||A==="&"?a=!0:A==="="&&m(F)}if(h(),J=r.pop(),J)throw new Error('Unclosed section "'+J[1]+'" at '+b.pos);return kB(PB(i))}function PB(e){for(var t=[],n,r,i=0,s=e.length;i<s;++i)n=e[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(t.push(n),r=n));return t}function kB(e){for(var t=[],n=t,r=[],i,s,o=0,a=e.length;o<a;++o)switch(i=e[o],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":s=r.pop(),s[5]=i[2],n=r.length>0?r[r.length-1][4]:t;break;default:n.push(i)}return t}function bl(e){this.string=e,this.tail=e,this.pos=0}bl.prototype.eos=function(){return this.tail===""};bl.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};bl.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Ra(e,t){this.view=e,this.cache={".":this.view},this.parent=t}Ra.prototype.push=function(e){return new Ra(e,this)};Ra.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var r=this,i,s,o,a=!1;r;){if(e.indexOf(".")>0)for(i=r.view,s=e.split("."),o=0;i!=null&&o<s.length;)o===s.length-1&&(a=wI(i,s[o])||bB(i,s[o])),i=i[s[o++]];else i=r.view[e],a=wI(r.view,e);if(a){n=i;break}r=r.parent}t[e]=n}return Yy(n)&&(n=n.call(this.view)),n};function Vn(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Vn.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Vn.prototype.parse=function(e,t){var n=this.templateCache,r=e+":"+(t||
|
|
37
|
+
Url: ${bf(e)}`),!0)}function KL(e,t){return e.type||!t||!t.length?!1:QL(e).some(n=>ba(n,t))}function ZL(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?ba(n,t):!1}function XL(e,t){if(!t||!t.length)return!1;let n=bf(e);return n?ba(n,t):!1}function JL(e,t){if(!t||!t.length)return!0;let n=bf(e);return n?ba(n,t):!0}function QL(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function eF(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function tF(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function bf(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?tF(t):null}catch{return gt&&se.error(`Cannot extract url for event ${Hr(e)}`),null}}function nF(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}var rF="Dedupe",iF=()=>{let e;return{name:rF,processEvent(t){if(t.type)return t;try{if(oF(t,e))return gt&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Sf=iF;function oF(e,t){return t?!!(sF(e,t)||aF(e,t)):!1}function sF(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!JD(e,t)||!XD(e,t))}function aF(e,t){let n=ZD(t),r=ZD(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!JD(e,t)||!XD(e,t))}function XD(e,t){let n=tf(e),r=tf(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let s=r[i],o=n[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function JD(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function ZD(e){return e.exception&&e.exception.values&&e.exception.values[0]}var qt=ye,Ay=0;function My(){return Ay>0}function EF(){Ay++,setTimeout(()=>{Ay--})}function ps(e,t={},n){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(cs(e))return e}catch{return e}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let s=i.map(o=>ps(o,t));return e.apply(this,s)}catch(s){throw EF(),gf(o=>{o.addEventProcessor(a=>(t.mechanism&&(Ia(a,void 0,void 0),ji(a,t.mechanism)),a.extra=re(w({},a.extra),{arguments:i}),a)),_f(s)}),s}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}Jd(r,e),Ln(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var Wi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Df(e,t){let n=ky(e,t),r={type:t&&t.name,value:DF(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function wF(e,t,n,r){let i=Ut(),s=i&&i.getOptions().normalizeDepth,o=xF(t),a={__serialized__:cf(t,s)};if(o)return{exception:{values:[Df(e,o)]},extra:a};let l={exception:{values:[{type:as(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:IF(t,{isUnhandledRejection:r})}]},extra:a};if(n){let c=ky(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function Oy(e,t){return{exception:{values:[Df(e,t)]}}}function ky(e,t){let n=t.stacktrace||t.stack||"",r=CF(t),i=SF(t);try{return e(n,r,i)}catch{}return[]}var bF=/Minified React error #\d+;/i;function CF(e){return e&&bF.test(e.message)?1:0}function SF(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function DF(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function nI(e,t,n,r){let i=n&&n.syntheticException||void 0,s=If(e,t,i,r);return ji(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),_r(s)}function rI(e,t,n="info",r,i){let s=r&&r.syntheticException||void 0,o=Py(e,t,s,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),_r(o)}function If(e,t,n,r,i){let s;if(Yd(t)&&t.error)return Oy(e,t.error);if(Kd(t)||kv(t)){let o=t;if("stack"in t)s=Oy(e,t);else{let a=o.name||(Kd(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Py(e,l,n,r),Ia(s,l)}return"code"in o&&(s.tags=re(w({},s.tags),{"DOMException.code":`${o.code}`})),s}return os(t)?Oy(e,t):Ur(t)||as(t)?(s=wF(e,t,n,i),ji(s,{synthetic:!0}),s):(s=Py(e,t,n,r),Ia(s,`${t}`,void 0),ji(s,{synthetic:!0}),s)}function Py(e,t,n,r){let i={};if(r&&n){let s=ky(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(wa(t)){let{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function IF(e,{isUnhandledRejection:t}){let n=zv(e),r=t?"promise rejection":"exception";return Yd(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:as(e)?`Event \`${TF(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function TF(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function xF(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function iI(e,{metadata:t,tunnel:n,dsn:r}){let i=w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:ci(r)}),s=RF(e);return di(i,[s])}function RF(e){return[{type:"user_report"},e]}var El=class extends _l{constructor(e){let t=w({parentSpanIsAlwaysRootSpan:!0},e),n=qt.SENTRY_SDK_SOURCE||ny();Ny(t,"browser",["browser"],n),super(t),t.sendClientReports&&qt.document&&qt.document.addEventListener("visibilitychange",()=>{qt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return nI(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return rI(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Wi&&se.warn("SDK not enabled, will not capture user feedback.");return}let t=iI(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){Wi&&se.log("No outcomes to send");return}if(!this._dsn){Wi&&se.log("No dsn provided, will not send outcomes");return}Wi&&se.log("Sending outcomes:",e);let t=fy(e,this._options.tunnel&&ci(this._dsn));this.sendEnvelope(t)}},oI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Jt=ye,NF=1e3,sI,Ly,Fy;function By(e){let t="dom";Fn(t,e),Bn(t,AF)}function AF(){if(!Jt.document)return;let e=rn.bind(null,"dom"),t=aI(e,!0);Jt.document.addEventListener("click",t,!1),Jt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=Jt[n]&&Jt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Lt(r,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},h=c[s]=c[s]||{refCount:0};if(!h.handler){let d=aI(e);h.handler=d,i.call(this,s,d,a)}h.refCount++}catch{}return i.call(this,s,o,a)}}),Lt(r,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__||{},h=c[s];h&&(h.refCount--,h.refCount<=0&&(i.call(this,s,h.handler,a),h.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}function MF(e){if(e.type!==Ly)return!1;try{if(!e.target||e.target._sentryId!==Fy)return!1}catch{}return!0}function OF(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function aI(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=PF(n);if(OF(n.type,r))return;Ln(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ln(r,"_sentryId",hn());let i=n.type==="keypress"?"input":n.type;MF(n)||(e({event:n,name:i,global:t}),Ly=n.type,Fy=r?r._sentryId:void 0),clearTimeout(sI),sI=Jt.setTimeout(()=>{Fy=void 0,Ly=void 0},NF)}}function PF(e){try{return e.target}catch{return null}}var Tf;function Vy(e){let t="history";Fn(t,e),Bn(t,kF)}function kF(){if(!my())return;let e=Jt.onpopstate;Jt.onpopstate=function(...n){let r=Jt.location.href,i=Tf;if(Tf=r,rn("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let s=Tf,o=String(i);Tf=o,rn("history",{from:s,to:o})}return n.apply(this,r)}}Lt(Jt.history,"pushState",t),Lt(Jt.history,"replaceState",t)}var xf={};function Uy(e){let t=xf[e];if(t)return t;let n=Jt[e];if(dl(n))return xf[e]=n.bind(Jt);let r=Jt.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let s=i.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(i)}catch(i){oI&&se.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(xf[e]=n.bind(Jt))}function Rf(e){xf[e]=void 0}var hs="__sentry_xhr_v3__";function Hy(e){let t="xhr";Fn(t,e),Bn(t,LF)}function LF(){if(!Jt.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Lt(e,"open",function(t){return function(...n){let r=tr()*1e3,i=kn(n[0])?n[0].toUpperCase():void 0,s=FF(n[1]);if(!i||!s)return t.apply(this,n);this[hs]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[hs];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:tr()*1e3,startTimestamp:r,xhr:this};rn("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Lt(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),Lt(this,"setRequestHeader",function(a){return function(...l){let[c,h]=l,d=this[hs];return d&&kn(c)&&kn(h)&&(d.request_headers[c.toLowerCase()]=h),a.apply(this,l)}}),t.apply(this,n)}}),Lt(e,"send",function(t){return function(...n){let r=this[hs];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:tr()*1e3,xhr:this};return rn("xhr",i),t.apply(this,n)}})}function FF(e){if(kn(e))return e;try{return e.toString()}catch{}}function jy(e,t=Uy("fetch")){let n=0,r=0;function i(s){let o=s.body.length;n+=o,r++;let a=w({body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);if(!t)return Rf("fetch"),go("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Rf("fetch"),n-=o,r--,go(l)}}return Ef(e,i)}var BF=30,VF=50;function $y(e,t,n,r){let i={filename:e,function:t==="<anonymous>"?li:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var UF=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,HF=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,jF=/\((\S*)(?::(\d+))(?::(\d+))\)/,$F=e=>{let t=UF.exec(e);if(t){let[,r,i,s]=t;return $y(r,li,+i,+s)}let n=HF.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=jF.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[r,i]=dI(n[1]||li,n[2]);return $y(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},cI=[BF,$F],WF=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,GF=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,zF=e=>{let t=WF.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=GF.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||li;return[r,n]=dI(r,n),$y(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},lI=[VF,zF],uI=[cI,lI],Wy=Yv(...uI),dI=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:li,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Nf=1024,YF="Breadcrumbs",KF=(e={})=>{let t=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:YF,setup(n){t.console&&Kv(JF(n)),t.dom&&By(XF(n,t.dom)),t.xhr&&Hy(QF(n)),t.fetch&&Qv(eB(n)),t.history&&Vy(tB(n)),t.sentry&&n.on("beforeSendEvent",ZF(n))}}},fI=KF;function ZF(e){return function(t){Ut()===e&&fi({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Hr(t)},{event:t})}}function XF(e,t){return function(n){if(Ut()!==e)return;let r,i,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>Nf&&(Wi&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Nf}, but a value of ${o} was configured. Sentry will use ${Nf} instead.`),o=Nf),typeof s=="string"&&(s=[s]);try{let l=n.event,c=nB(l)?l.target:l;r=ll(c,{keyAttrs:s,maxStringLength:o}),i=$v(c)}catch{r="<unknown>"}if(r.length===0)return;let a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),fi(a,{event:n.event,name:n.name,global:n.global})}}function JF(e){return function(t){if(Ut()!==e)return;let n={category:"console",data:{arguments:t.args,logger:"console"},level:oy(t.level),message:Zd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${Zd(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1);else return;fi(n,{input:t.args,level:t.level})}}function QF(e){return function(t){if(Ut()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[hs];if(!n||!r||!i)return;let{method:s,url:o,status_code:a,body:l}=i,c={method:s,url:o,status_code:a},h={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r};fi({category:"xhr",data:c,type:"http"},h)}}function eB(e){return function(t){if(Ut()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let i=t.fetchData,s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};fi({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=t.response,s=re(w({},t.fetchData),{status_code:i&&i.status}),o={input:t.args,response:i,startTimestamp:n,endTimestamp:r};fi({category:"fetch",data:s,type:"http"},o)}}}function tB(e){return function(t){if(Ut()!==e)return;let n=t.from,r=t.to,i=pl(qt.location.href),s=n?pl(n):void 0,o=pl(r);(!s||!s.path)&&(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),fi({category:"navigation",data:{from:n,to:r}})}}function nB(e){return!!e&&!!e.target}var rB=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],iB="BrowserApiErrors",oB=(e={})=>{let t=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:iB,setupOnce(){t.setTimeout&&Lt(qt,"setTimeout",pI),t.setInterval&&Lt(qt,"setInterval",pI),t.requestAnimationFrame&&Lt(qt,"requestAnimationFrame",sB),t.XMLHttpRequest&&"XMLHttpRequest"in qt&&Lt(XMLHttpRequest.prototype,"send",aB);let n=t.eventTarget;n&&(Array.isArray(n)?n:rB).forEach(cB)}}},hI=oB;function pI(e){return function(...t){let n=t[0];return t[0]=ps(n,{mechanism:{data:{function:yr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function sB(e){return function(t){return e.apply(this,[ps(t,{mechanism:{data:{function:"requestAnimationFrame",handler:yr(e)},handled:!1,type:"instrument"}})])}}function aB(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Lt(n,r,function(i){let s={mechanism:{data:{function:r,handler:yr(i)},handled:!1,type:"instrument"}},o=cs(i);return o&&(s.mechanism.data.handler=yr(o)),ps(i,s)})}),e.apply(this,t)}}function cB(e){let t=qt,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Lt(n,"addEventListener",function(r){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=ps(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:yr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,ps(s,{mechanism:{data:{function:"addEventListener",handler:yr(s),target:e},handled:!1,type:"instrument"}}),o])}}),Lt(n,"removeEventListener",function(r){return function(i,s,o){let a=s;try{let l=a&&a.__sentry_wrapped__;l&&r.call(this,i,l,o)}catch{}return r.call(this,i,a,o)}}))}var lB="GlobalHandlers",uB=(e={})=>{let t=w({onerror:!0,onunhandledrejection:!0},e);return{name:lB,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(dB(n),mI("onerror")),t.onunhandledrejection&&(fB(n),mI("onunhandledrejection"))}}},gI=uB;function dB(e){ey(t=>{let{stackParser:n,attachStacktrace:r}=vI();if(Ut()!==e||My())return;let{msg:i,url:s,line:o,column:a,error:l}=t,c=mB(If(n,l||i,void 0,r,!1),s,o,a);c.level="error",yl(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function fB(e){ty(t=>{let{stackParser:n,attachStacktrace:r}=vI();if(Ut()!==e||My())return;let i=pB(t),s=ss(i)?hB(i):If(n,i,void 0,r,!0);s.level="error",yl(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function pB(e){if(ss(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function hB(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function mB(e,t,n,r){let i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,h=isNaN(parseInt(n,10))?void 0:n,d=kn(t)&&t.length>0?t:jv();return l.length===0&&l.push({colno:c,filename:d,function:li,in_app:!0,lineno:h}),e}function mI(e){Wi&&se.log(`Global Handler attached: ${e}`)}function vI(){let e=Ut();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var yI=()=>({name:"HttpContext",preprocessEvent(e){if(!qt.navigator&&!qt.location&&!qt.document)return;let t=e.request&&e.request.url||qt.location&&qt.location.href,{referrer:n}=qt.document||{},{userAgent:r}=qt.navigator||{},i=w(w(w({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=re(w(w({},e.request),t&&{url:t}),{headers:i});e.request=s}}),gB="cause",vB=5,yB="LinkedErrors",_B=(e={})=>{let t=e.limit||vB,n=e.key||gB;return{name:yB,preprocessEvent(r,i,s){let o=s.getOptions();Uv(Df,o.stackParser,o.maxValueLength,n,t,r,i)}}},_I=_B;function Gy(e){return[Cf(),wf(),hI(),fI(),gI(),_I(),Sf(),yI()]}var zy=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},Ct=class AS{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new AS),this.INSTANCE}captureException(t,n,r){S.error(t),this.getNewScope(n,r).captureException(t)}captureMessage(t,n,r,i){this.getNewScope(r,i).captureMessage(t,n??"error")}captureError(t,n,r,i){S.error(t,n);let s=this.getNewScope(r,i),o=new zy(t,n);s.captureException(o)}setGlobalContext(t,n){this.contexts[t]=w({context:n},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,n){let r=new An;if(r.setClient(this.client),r.setUser(this.user),t?.triggerContext){let i=t.triggerContext;r.setExtras(i.triggerData.sentryContext()),delete t.triggerContext}return t&&r.setExtras(t),this.tags&&r.setTags(this.tags),n&&r.setTags(n),Object.keys(this.contexts).forEach(i=>{r.setContext(i,this.contexts[i])}),r.setTag("language",navigator.language),r.setTag("timezone",fe.getTimezone()),r}init(){let t=Gy({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new El({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:jy,stackParser:Wy,integrations:t,environment:Rn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:Rn.debug}),this.client.init()}},fe=class{static tz;static isValidURL(e){try{return new URL(e)}catch{return}}static isNull(e){return!e||e==="null"||e==="undefined"}static removeFromArray(e,t){let n=e.indexOf(t);return n===-1?!1:(e.splice(n,1),!0)}static formatCurrency(e,t){if(e==0&&t)return"Free";let n=Oe.get(),r=Pt.get(),i=n.shopCurrencyCode||r.currency,s=n.currencyCode;s||S.warn("Currency code is not set in RuntimeData");let o=r.money?.format??n.moneyFormat,a;if(o&&i===s)a=zd.format(e*100,o);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:s||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(c){return Ct.getInstance().captureException(c,{currentCurrency:s,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),r.money?.showCurrency&&s!=="INR"&&(a=a.concat(` ${s}`))}return a}static formatNumber(e){return new Intl.NumberFormat(this.getLang(),{notation:"compact"}).format(e)}static getLang(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}static getTimezone(){if(this.tz)return this.tz;try{return this.tz=Intl.DateTimeFormat().resolvedOptions().timeZone,this.tz}catch{return""}}static documentReady(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}static onDocumentLoaded(e){document.readyState==="complete"?e():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&e()})}static showSnackbar(e){let t=document.createElement("span");t.id="snackbar",t.innerText=e,document.body.appendChild(t),t.className="show",setTimeout(()=>{t.classList.remove("show"),document.body.removeChild(t)},3e3)}static async retrySelectorForElements(e,t=10,n=document){let r=0,i=document.querySelectorAll("nonexistent-tag");for(;r<t;){let s=Math.min(100*2**r,5e3);if(await EI.JSUtils.sleep(s),i=n.querySelectorAll(e),i.length)return S.debug(`Attempt ${r+1}: ${i.length} elements found with ${e}`),i;S.debug(`Attempt ${r+1}: Elements not found with ${e}. Retrying after ${s}ms.`),r++}return S.warn(`Max attempts reached. Element not found with ${e}.`),i}static async retrySelector(e,t=10,n=document){return(await this.retrySelectorForElements(e,t,n)).item(0)}static async getCartAttributes(){let e=await ft.get(we.DEVICE_ID),t=await pn.get(we.ID,"");return[{key:"letscooee_did",value:e},{key:"letscooee_sid",value:t},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}static onNodesRemoved(e,t,n=document.body){let r=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{(o===e||o.contains(e))&&(t(),r.disconnect())})})});r.observe(n,{childList:!0})}};function xa(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:n})}var pi=class Mh{transform(t){return t==null?null:fe.formatCurrency(t)}static \u0275fac=function(t){return new(t||Mh)};static \u0275pipe=Xo({name:"cooeeCurrency",type:Mh,pure:!0})},CI=Fe(Of()),EB=Object.prototype.toString,Na=Array.isArray||function(e){return EB.call(e)==="[object Array]"};function Yy(e){return typeof e=="function"}function wB(e){return Na(e)?"array":typeof e}function qy(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function wI(e,t){return e!=null&&typeof e=="object"&&t in e}function bB(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var CB=RegExp.prototype.test;function SB(e,t){return CB.call(e,t)}var DB=/\S/;function IB(e){return!SB(DB,e)}var TB={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function xB(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return TB[t]})}var RB=/\s*/,NB=/\s+/,bI=/\s*=/,AB=/\s*\}/,MB=/#|\^|\/|>|\{|&|=|!/;function OB(e,t){if(!e)return[];var n=!1,r=[],i=[],s=[],o=!1,a=!1,l="",c=0;function h(){if(o&&!a)for(;s.length;)delete i[s.pop()];else s=[];o=!1,a=!1}var d,f,g;function m(j){if(typeof j=="string"&&(j=j.split(NB,2)),!Na(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(qy(j[0])+"\\s*"),f=new RegExp("\\s*"+qy(j[1])),g=new RegExp("\\s*"+qy("}"+j[1]))}m(t||Er.tags);for(var b=new bl(e),I,A,F,V,M,J;!b.eos();){if(I=b.pos,F=b.scanUntil(d),F)for(var Ne=0,ht=F.length;Ne<ht;++Ne)V=F.charAt(Ne),IB(V)?(s.push(i.length),l+=V):(a=!0,n=!0,l+=" "),i.push(["text",V,I,I+1]),I+=1,V===`
|
|
38
|
+
`&&(h(),l="",c=0,n=!1);if(!b.scan(d))break;if(o=!0,A=b.scan(MB)||"name",b.scan(RB),A==="="?(F=b.scanUntil(bI),b.scan(bI),b.scanUntil(f)):A==="{"?(F=b.scanUntil(g),b.scan(AB),b.scanUntil(f),A="&"):F=b.scanUntil(f),!b.scan(f))throw new Error("Unclosed tag at "+b.pos);if(A==">"?M=[A,F,I,b.pos,l,c,n]:M=[A,F,I,b.pos],c++,i.push(M),A==="#"||A==="^")r.push(M);else if(A==="/"){if(J=r.pop(),!J)throw new Error('Unopened section "'+F+'" at '+I);if(J[1]!==F)throw new Error('Unclosed section "'+J[1]+'" at '+I)}else A==="name"||A==="{"||A==="&"?a=!0:A==="="&&m(F)}if(h(),J=r.pop(),J)throw new Error('Unclosed section "'+J[1]+'" at '+b.pos);return kB(PB(i))}function PB(e){for(var t=[],n,r,i=0,s=e.length;i<s;++i)n=e[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(t.push(n),r=n));return t}function kB(e){for(var t=[],n=t,r=[],i,s,o=0,a=e.length;o<a;++o)switch(i=e[o],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":s=r.pop(),s[5]=i[2],n=r.length>0?r[r.length-1][4]:t;break;default:n.push(i)}return t}function bl(e){this.string=e,this.tail=e,this.pos=0}bl.prototype.eos=function(){return this.tail===""};bl.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};bl.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Ra(e,t){this.view=e,this.cache={".":this.view},this.parent=t}Ra.prototype.push=function(e){return new Ra(e,this)};Ra.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var r=this,i,s,o,a=!1;r;){if(e.indexOf(".")>0)for(i=r.view,s=e.split("."),o=0;i!=null&&o<s.length;)o===s.length-1&&(a=wI(i,s[o])||bB(i,s[o])),i=i[s[o++]];else i=r.view[e],a=wI(r.view,e);if(a){n=i;break}r=r.parent}t[e]=n}return Yy(n)&&(n=n.call(this.view)),n};function Vn(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Vn.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Vn.prototype.parse=function(e,t){var n=this.templateCache,r=e+":"+(t||Er.tags).join(":"),i=typeof n<"u",s=i?n.get(r):void 0;return s==null&&(s=OB(e,t),i&&n.set(r,s)),s};Vn.prototype.render=function(e,t,n,r){var i=this.getConfigTags(r),s=this.parse(e,i),o=t instanceof Ra?t:new Ra(t,void 0);return this.renderTokens(s,o,n,e,r)};Vn.prototype.renderTokens=function(e,t,n,r,i){for(var s="",o,a,l,c=0,h=e.length;c<h;++c)l=void 0,o=e[c],a=o[0],a==="#"?l=this.renderSection(o,t,n,r,i):a==="^"?l=this.renderInverted(o,t,n,r,i):a===">"?l=this.renderPartial(o,t,n,i):a==="&"?l=this.unescapedValue(o,t):a==="name"?l=this.escapedValue(o,t,i):a==="text"&&(l=this.rawValue(o)),l!==void 0&&(s+=l);return s};Vn.prototype.renderSection=function(e,t,n,r,i){var s=this,o="",a=t.lookup(e[1]);function l(d){return s.render(d,t,n,i)}if(a){if(Na(a))for(var c=0,h=a.length;c<h;++c)o+=this.renderTokens(e[4],t.push(a[c]),n,r,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")o+=this.renderTokens(e[4],t.push(a),n,r,i);else if(Yy(a)){if(typeof r!="string")throw new Error("Cannot use higher-order sections without the original template");a=a.call(t.view,r.slice(e[3],e[5]),l),a!=null&&(o+=a)}else o+=this.renderTokens(e[4],t,n,r,i);return o}};Vn.prototype.renderInverted=function(e,t,n,r,i){var s=t.lookup(e[1]);if(!s||Na(s)&&s.length===0)return this.renderTokens(e[4],t,n,r,i)};Vn.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),i=e.split(`
|
|
39
39
|
`),s=0;s<i.length;s++)i[s].length&&(s>0||!n)&&(i[s]=r+i[s]);return i.join(`
|
|
40
|
-
`)};Vn.prototype.renderPartial=function(e,t,n,r){if(n){var i=this.getConfigTags(r),s=Yy(n)?n(e[1]):n[e[1]];if(s!=null){var o=e[6],a=e[5],l=e[4],c=s;a==0&&l&&(c=this.indentPartial(s,l,o));var h=this.parse(c,i);return this.renderTokens(h,t,n,c,r)}}};Vn.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Vn.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||
|
|
41
|
-
`);try{D=new Worker(URL.createObjectURL(new Blob([ae])))}catch(_e){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",_e),null}ne(D)}return D}}(),g={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function m(D,x){return x?x(D):D}function b(D){return D!=null}function I(D,x,Z){return m(D&&b(D[x])?D[x]:g[x],Z)}function A(D){return D<0?0:Math.floor(D)}function F(D,x){return Math.floor(Math.random()*(x-D))+D}function V(D){return parseInt(D,16)}function M(D){return D.map(J)}function J(D){var x=String(D).replace(/[^0-9a-f]/gi,"");return x.length<6&&(x=x[0]+x[0]+x[1]+x[1]+x[2]+x[2]),{r:V(x.substring(0,2)),g:V(x.substring(2,4)),b:V(x.substring(4,6))}}function Ne(D){var x=I(D,"origin",Object);return x.x=I(x,"x",Number),x.y=I(x,"y",Number),x}function ht(D){D.width=document.documentElement.clientWidth,D.height=document.documentElement.clientHeight}function j(D){var x=D.getBoundingClientRect();D.width=x.width,D.height=x.height}function pe(D){var x=document.createElement("canvas");return x.style.position="fixed",x.style.top="0px",x.style.left="0px",x.style.pointerEvents="none",x.style.zIndex=D,x}function te(D,x,Z,ne,ae,_e,ve,ue,Ce){D.save(),D.translate(x,Z),D.rotate(_e),D.scale(ne,ae),D.arc(0,0,1,ve,ue,Ce),D.restore()}function de(D){var x=D.angle*(Math.PI/180),Z=D.spread*(Math.PI/180);return{x:D.x,y:D.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:D.startVelocity*.5+Math.random()*D.startVelocity,angle2D:-x+(.5*Z-Math.random()*Z),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:D.color,shape:D.shape,tick:0,totalTicks:D.ticks,decay:D.decay,drift:D.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:D.gravity*3,ovalScalar:.6,scalar:D.scalar,flat:D.flat}}function Ae(D,x){x.x+=Math.cos(x.angle2D)*x.velocity+x.drift,x.y+=Math.sin(x.angle2D)*x.velocity+x.gravity,x.velocity*=x.decay,x.flat?(x.wobble=0,x.wobbleX=x.x+10*x.scalar,x.wobbleY=x.y+10*x.scalar,x.tiltSin=0,x.tiltCos=0,x.random=1):(x.wobble+=x.wobbleSpeed,x.wobbleX=x.x+10*x.scalar*Math.cos(x.wobble),x.wobbleY=x.y+10*x.scalar*Math.sin(x.wobble),x.tiltAngle+=.1,x.tiltSin=Math.sin(x.tiltAngle),x.tiltCos=Math.cos(x.tiltAngle),x.random=Math.random()+2);var Z=x.tick++/x.totalTicks,ne=x.x+x.random*x.tiltCos,ae=x.y+x.random*x.tiltSin,_e=x.wobbleX+x.random*x.tiltCos,ve=x.wobbleY+x.random*x.tiltSin;if(D.fillStyle="rgba("+x.color.r+", "+x.color.g+", "+x.color.b+", "+(1-Z)+")",D.beginPath(),o&&x.shape.type==="path"&&typeof x.shape.path=="string"&&Array.isArray(x.shape.matrix))D.fill(Ze(x.shape.path,x.shape.matrix,x.x,x.y,Math.abs(_e-ne)*.1,Math.abs(ve-ae)*.1,Math.PI/10*x.wobble));else if(x.shape.type==="bitmap"){var ue=Math.PI/10*x.wobble,Ce=Math.abs(_e-ne)*.1,je=Math.abs(ve-ae)*.1,Pt=x.shape.bitmap.width*x.scalar,He=x.shape.bitmap.height*x.scalar,tt=new DOMMatrix([Math.cos(ue)*Ce,Math.sin(ue)*Ce,-Math.sin(ue)*je,Math.cos(ue)*je,x.x,x.y]);tt.multiplySelf(new DOMMatrix(x.shape.matrix));var Bt=D.createPattern(h.transform(x.shape.bitmap),"no-repeat");Bt.setTransform(tt),D.globalAlpha=1-Z,D.fillStyle=Bt,D.fillRect(x.x-Pt/2,x.y-He/2,Pt,He),D.globalAlpha=1}else if(x.shape==="circle")D.ellipse?D.ellipse(x.x,x.y,Math.abs(_e-ne)*x.ovalScalar,Math.abs(ve-ae)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI):te(D,x.x,x.y,Math.abs(_e-ne)*x.ovalScalar,Math.abs(ve-ae)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI);else if(x.shape==="star")for(var ke=Math.PI/2*3,u=4*x.scalar,p=8*x.scalar,v=x.x,T=x.y,L=5,B=Math.PI/L;L--;)v=x.x+Math.cos(ke)*p,T=x.y+Math.sin(ke)*p,D.lineTo(v,T),ke+=B,v=x.x+Math.cos(ke)*u,T=x.y+Math.sin(ke)*u,D.lineTo(v,T),ke+=B;else D.moveTo(Math.floor(x.x),Math.floor(x.y)),D.lineTo(Math.floor(x.wobbleX),Math.floor(ae)),D.lineTo(Math.floor(_e),Math.floor(ve)),D.lineTo(Math.floor(ne),Math.floor(x.wobbleY));return D.closePath(),D.fill(),x.tick<x.totalTicks}function dt(D,x,Z,ne,ae){var _e=x.slice(),ve=D.getContext("2d"),ue,Ce,je=c(function(Pt){function He(){ue=Ce=null,ve.clearRect(0,0,ne.width,ne.height),h.clear(),ae(),Pt()}function tt(){r&&!(ne.width===i.width&&ne.height===i.height)&&(ne.width=D.width=i.width,ne.height=D.height=i.height),!ne.width&&!ne.height&&(Z(D),ne.width=D.width,ne.height=D.height),ve.clearRect(0,0,ne.width,ne.height),_e=_e.filter(function(Bt){return Ae(ve,Bt)}),_e.length?ue=d.frame(tt):He()}ue=d.frame(tt),Ce=He});return{addFettis:function(Pt){return _e=_e.concat(Pt),je},canvas:D,promise:je,reset:function(){ue&&d.cancel(ue),Ce&&Ce()}}}function ut(D,x){var Z=!D,ne=!!I(x||{},"resize"),ae=!1,_e=I(x,"disableForReducedMotion",Boolean),ve=s&&!!I(x||{},"useWorker"),ue=ve?f():null,Ce=Z?ht:j,je=D&&ue?!!D.__confetti_initialized:!1,Pt=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,He;function tt(ke,u,p){for(var v=I(ke,"particleCount",A),T=I(ke,"angle",Number),L=I(ke,"spread",Number),B=I(ke,"startVelocity",Number),Q=I(ke,"decay",Number),rt=I(ke,"gravity",Number),Ke=I(ke,"drift",Number),Le=I(ke,"colors",M),pt=I(ke,"ticks",Number),ee=I(ke,"shapes"),De=I(ke,"scalar"),ge=!!I(ke,"flat"),it=Ne(ke),En=v,_n=[],lt=D.width*it.x,me=D.height*it.y;En--;)_n.push(de({x:lt,y:me,angle:T,spread:L,startVelocity:B,color:Le[En%Le.length],shape:ee[F(0,ee.length)],ticks:pt,decay:Q,gravity:rt,drift:Ke,scalar:De,flat:ge}));return He?He.addFettis(_n):(He=dt(D,_n,Ce,u,p),He.promise)}function Bt(ke){var u=_e||I(ke,"disableForReducedMotion",Boolean),p=I(ke,"zIndex",Number);if(u&&Pt)return c(function(B){B()});Z&&He?D=He.canvas:Z&&!D&&(D=pe(p),document.body.appendChild(D)),ne&&!je&&Ce(D);var v={width:D.width,height:D.height};ue&&!je&&ue.init(D),je=!0,ue&&(D.__confetti_initialized=!0);function T(){if(ue){var B={getBoundingClientRect:function(){if(!Z)return D.getBoundingClientRect()}};Ce(B),ue.postMessage({resize:{width:B.width,height:B.height}});return}v.width=v.height=null}function L(){He=null,ne&&(ae=!1,t.removeEventListener("resize",T)),Z&&D&&(document.body.contains(D)&&document.body.removeChild(D),D=null,je=!1)}return ne&&!ae&&(ae=!0,t.addEventListener("resize",T,!1)),ue?ue.fire(ke,v,L):tt(ke,v,L)}return Bt.reset=function(){ue&&ue.reset(),He&&He.reset()},Bt}var _;function Wt(){return _||(_=ut(null,{useWorker:!0,resize:!0})),_}function Ze(D,x,Z,ne,ae,_e,ve){var ue=new Path2D(D),Ce=new Path2D;Ce.addPath(ue,new DOMMatrix(x));var je=new Path2D;return je.addPath(Ce,new DOMMatrix([Math.cos(ve)*ae,Math.sin(ve)*ae,-Math.sin(ve)*_e,Math.cos(ve)*_e,Z,ne])),je}function Zt(D){if(!o)throw new Error("path confetti are not supported in this browser");var x,Z;typeof D=="string"?x=D:(x=D.path,Z=D.matrix);var ne=new Path2D(x),ae=document.createElement("canvas"),_e=ae.getContext("2d");if(!Z){for(var ve=1e3,ue=ve,Ce=ve,je=0,Pt=0,He,tt,Bt=0;Bt<ve;Bt+=2)for(var ke=0;ke<ve;ke+=2)_e.isPointInPath(ne,Bt,ke,"nonzero")&&(ue=Math.min(ue,Bt),Ce=Math.min(Ce,ke),je=Math.max(je,Bt),Pt=Math.max(Pt,ke));He=je-ue,tt=Pt-Ce;var u=10,p=Math.min(u/He,u/tt);Z=[p,0,0,p,-Math.round(He/2+ue)*p,-Math.round(tt/2+Ce)*p]}return{type:"path",path:x,matrix:Z}}function Se(D){var x,Z=1,ne="#000000",ae='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof D=="string"?x=D:(x=D.text,Z="scalar"in D?D.scalar:Z,ae="fontFamily"in D?D.fontFamily:ae,ne="color"in D?D.color:ne);var _e=10*Z,ve=""+_e+"px "+ae,ue=new OffscreenCanvas(_e,_e),Ce=ue.getContext("2d");Ce.font=ve;var je=Ce.measureText(x),Pt=Math.ceil(je.actualBoundingBoxRight+je.actualBoundingBoxLeft),He=Math.ceil(je.actualBoundingBoxAscent+je.actualBoundingBoxDescent),tt=2,Bt=je.actualBoundingBoxLeft+tt,ke=je.actualBoundingBoxAscent+tt;Pt+=tt+tt,He+=tt+tt,ue=new OffscreenCanvas(Pt,He),Ce=ue.getContext("2d"),Ce.font=ve,Ce.fillStyle=ne,Ce.fillText(x,Bt,ke);var u=1/Z;return{type:"bitmap",bitmap:ue.transferToImageBitmap(),matrix:[u,0,0,u,-Pt*u/2,-He*u/2]}}n.exports=function(){return Wt().apply(this,arguments)},n.exports.reset=function(){Wt().reset()},n.exports.create=ut,n.exports.shapeFromPath=Zt,n.exports.shapeFromText=Se})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),Ky,!1);var SI=Ky.exports,F7=Ky.exports.create,kf=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(e=100){let t=[],n=Date.now()+2e3,r=()=>{t.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<n&&e>0&&(requestAnimationFrame(r),e--)};r(),await Promise.all(t)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(e){Object.assign(e,this.DEFAULTS,e),e.particleCount=e.particleCount??this.DEFAULTS.colors.length,await SI(e)}static async realisticFire(e,t){let n={origin:{y:.7}};await this.fire(Object.assign({},n,t,{particleCount:Math.floor(200*e)}))}},Aa=class qd{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||qd)(bt(Mv,16))};static \u0275pipe=Xo({name:"safeHtml",type:qd,pure:!0})},LB=(e,t)=>t.minValue;function FB(e,t){if(e&1&&(Y(0,"li",6)(1,"div",7),Re(2,"div",8),hr(3,"cooeeCurrency"),hr(4,"safeHtml"),Re(5,"img",9),Y(6,"div",10),zt(7),X()()()),e&2){let n=t.$implicit,r=K(2);po("left",n.calculatedAlignment+"%"),q(2),be("innerHTML",Br(4,7,Br(3,5,n.minValue)),il),q(3),be("src",r.getIconURL(n),Gt),q(2),fa(n.label)}}function BB(e,t){if(e&1&&(Fr(0)(1),Re(2,"div",0),hr(3,"cooeeDynamicVariables"),hr(4,"safeHtml"),Y(5,"div",1)(6,"ul",2)(7,"div",3),Re(8,"div",4),X(),At(9,FB,8,9,"li",5,LB),X()()),e&2){let n=K(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;q(2),be("innerHTML",Br(4,6,q0(3,3,i,n.localDynamicVariables())),il),q(6),po("width",r.cartValuePercentage+"%"),q(),Mt(r.milestones)}}var Ff=class sp{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=Bi({});calculatedState=Bi({});_engagementTrigger=Bi(null);set engagementTrigger(t){this._engagementTrigger.set(t)}ngOnInit(){S.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){S.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===Lf.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===Lf.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===Lf.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>S.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){S.warn("Milestones not available in progress bar config",t);return}let n=await this.cart.getNormalisedCart(),r=t.progressBarConfig,i=r.milestones.at(-1),s=i.minValue+Math.floor(i.minValue*5/100),o=n.originalAmount,a=Math.min(o,s),l=100/r.milestones.length,c=l;for(let g of r.milestones)g.calculatedAlignment=c,c+=l;let h=this.calculateTrackedProgress(a,r.milestones);S.debug("Cart value:",o,`, percentage: ${h}%`),this.celebrate(t,o);let d={milestonesReady:!0,cartValuePercentage:h,milestones:r.milestones},f=r.milestones.find(g=>g.minValue>o);if(f){this.localDynamicVariables.set({amount_left:fe.formatCurrency(f.minValue-o)}),d.nextMilestone=f,this.calculatedState.set(d);return}d.lastMilestone=i,this.calculatedState.set(d)}celebrate(t,n){let r=[...t.progressBarConfig.milestones].reverse().find(s=>s.minValue<n);if(!r)return;let i=`lc/en/${t.shortID}/${r.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),kf.realistic())}calculateTrackedProgress(t,n){if(t<=n[0].minValue)return t/n[0].minValue*n[0].calculatedAlignment;if(t>=n[n.length-1].minValue)return 100;for(let r=0;r<n.length-1;r++){let i=n[r].minValue,s=n[r+1].minValue,o=n[r].calculatedAlignment,a=n[r+1].calculatedAlignment;if(t>=i&&t<=s)return(t-i)/(s-i)*(a-o)+o}return 0}static \u0275fac=function(t){return new(t||sp)(bt(Nt))};static \u0275cmp=at({type:sp,selectors:[["cooee-progressbar"]],inputs:{cart:"cart",engagementTrigger:"engagementTrigger"},decls:1,vars:1,consts:[["id","lc-heading",1,"lc:font-medium","lc:text-center","lc:text-[12px]","lc-primary-text",3,"innerHTML"],[1,"lc:mt-4","lc:w-[95%]"],["id","lc-milestone-list",1,"lc:flex","lc:items-center","lc:relative","lc:text-[10px]","lc:font-medium"],["id","lc-untracked-path",1,"lc:w-full","lc:bg-gray-200","lc:h-1","lc:absolute","lc-progress-rail"],["id","lc-tracked-path",1,"lc:bg-green-700","lc:h-full","lc:block!"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]",3,"left"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:justify-between","lc:absolute","lc:h-full","lc:w-[100px]"],["id","lc-milestone-value",1,"lc-milestone-value",3,"innerHTML"],["width","20","height","20","id","lc-milestone-icon","alt","milestone icon",1,"lc-milestone-icon","lc:bg-green-700",3,"src"],["id","lc-milestone-label",1,"lc="]],template:function(t,n){t&1&&kt(0,BB,11,8),t&2&&jt(n.calculatedState().milestonesReady?0:-1)},dependencies:[Pf,Aa,pi],styles:["[_nghost-%COMP%]{display:block;padding:10px;background:linear-gradient(0deg,rgba(44,135,74,.1) 0%,transparent 100%)}.lc-milestone-icon[_ngcontent-%COMP%]{padding:5px;border-radius:1000px}.lc-progress-rail[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{transition:width .5s ease-in-out}"]})};function VB(e,t){return t={exports:{}},e(t,t.exports),t.exports}var UB=WB,HB=zB,jB=KB,gi=[],Er=[],$B=typeof Uint8Array<"u"?Uint8Array:Array,Zy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ms=0,DI=Zy.length;ms<DI;++ms)gi[ms]=Zy[ms],Er[Zy.charCodeAt(ms)]=ms;var ms,DI;Er[45]=62;Er[95]=63;function HI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function WB(e){var t=HI(e),n=t[0],r=t[1];return(n+r)*3/4-r}function GB(e,t,n){return(t+n)*3/4-n}function zB(e){var t,n=HI(e),r=n[0],i=n[1],s=new $B(GB(e,r,i)),o=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)t=Er[e.charCodeAt(l)]<<18|Er[e.charCodeAt(l+1)]<<12|Er[e.charCodeAt(l+2)]<<6|Er[e.charCodeAt(l+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=Er[e.charCodeAt(l)]<<2|Er[e.charCodeAt(l+1)]>>4,s[o++]=t&255),i===1&&(t=Er[e.charCodeAt(l)]<<10|Er[e.charCodeAt(l+1)]<<4|Er[e.charCodeAt(l+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function qB(e){return gi[e>>18&63]+gi[e>>12&63]+gi[e>>6&63]+gi[e&63]}function YB(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(qB(r));return i.join("")}function KB(e){for(var t,n=e.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(YB(e,o,o+s>a?a:o+s));return r===1?(t=e[n-1],i.push(gi[t>>2]+gi[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(gi[t>>10]+gi[t>>4&63]+gi[t<<2&63]+"=")),i.join("")}var Xy={byteLength:UB,toByteArray:HB,fromByteArray:jB},ZB=function(e,t,n,r,i){var s,o,a=i*8-r-1,l=(1<<a)-1,c=l>>1,h=-7,d=n?i-1:0,f=n?-1:1,g=e[t+d];for(d+=f,s=g&(1<<-h)-1,g>>=-h,h+=a;h>0;s=s*256+e[t+d],d+=f,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=r;h>0;o=o*256+e[t+d],d+=f,h-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-c}return(g?-1:1)*o*Math.pow(2,s-r)},XB=function(e,t,n,r,i,s){var o,a,l,c=s*8-i-1,h=(1<<c)-1,d=h>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:s-1,m=r?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=h?(a=0,o=h):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+g]=a&255,g+=m,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+g]=o&255,g+=m,o/=256,c-=8);e[n+g-m]|=b*128},Ma={read:ZB,write:XB},Uf=VB(function(e,t){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;var r=2147483647;t.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var u=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(u,p),u.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(u){if(u>r)throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=new Uint8Array(u);return Object.setPrototypeOf(p,o.prototype),p}function o(u,p,v){if(typeof u=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(u)}return a(u,p,v)}o.poolSize=8192;function a(u,p,v){if(typeof u=="string")return d(u,p);if(ArrayBuffer.isView(u))return g(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u));if(tt(u,ArrayBuffer)||u&&tt(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(u,SharedArrayBuffer)||u&&tt(u.buffer,SharedArrayBuffer)))return m(u,p,v);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var T=u.valueOf&&u.valueOf();if(T!=null&&T!==u)return o.from(T,p,v);var L=b(u);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return o.from(u[Symbol.toPrimitive]("string"),p,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u))}o.from=function(u,p,v){return a(u,p,v)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function c(u,p,v){return l(u),u<=0?s(u):p!==void 0?typeof v=="string"?s(u).fill(p,v):s(u).fill(p):s(u)}o.alloc=function(u,p,v){return c(u,p,v)};function h(u){return l(u),s(u<0?0:I(u)|0)}o.allocUnsafe=function(u){return h(u)},o.allocUnsafeSlow=function(u){return h(u)};function d(u,p){if((typeof p!="string"||p==="")&&(p="utf8"),!o.isEncoding(p))throw new TypeError("Unknown encoding: "+p);var v=F(u,p)|0,T=s(v),L=T.write(u,p);return L!==v&&(T=T.slice(0,L)),T}function f(u){for(var p=u.length<0?0:I(u.length)|0,v=s(p),T=0;T<p;T+=1)v[T]=u[T]&255;return v}function g(u){if(tt(u,Uint8Array)){var p=new Uint8Array(u);return m(p.buffer,p.byteOffset,p.byteLength)}return f(u)}function m(u,p,v){if(p<0||u.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<p+(v||0))throw new RangeError('"length" is outside of buffer bounds');var T;return p===void 0&&v===void 0?T=new Uint8Array(u):v===void 0?T=new Uint8Array(u,p):T=new Uint8Array(u,p,v),Object.setPrototypeOf(T,o.prototype),T}function b(u){if(o.isBuffer(u)){var p=I(u.length)|0,v=s(p);return v.length===0||u.copy(v,0,0,p),v}if(u.length!==void 0)return typeof u.length!="number"||Bt(u.length)?s(0):f(u);if(u.type==="Buffer"&&Array.isArray(u.data))return f(u.data)}function I(u){if(u>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return u|0}function A(u){return+u!=u&&(u=0),o.alloc(+u)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,p){if(tt(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),tt(p,Uint8Array)&&(p=o.from(p,p.offset,p.byteLength)),!o.isBuffer(u)||!o.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===p)return 0;for(var v=u.length,T=p.length,L=0,B=Math.min(v,T);L<B;++L)if(u[L]!==p[L]){v=u[L],T=p[L];break}return v<T?-1:T<v?1:0},o.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(u,p){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);var v;if(p===void 0)for(p=0,v=0;v<u.length;++v)p+=u[v].length;var T=o.allocUnsafe(p),L=0;for(v=0;v<u.length;++v){var B=u[v];if(tt(B,Uint8Array))L+B.length>T.length?o.from(B).copy(T,L):Uint8Array.prototype.set.call(T,B,L);else if(o.isBuffer(B))B.copy(T,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=B.length}return T};function F(u,p){if(o.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||tt(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(u));var v=u.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&v===0)return 0;for(var L=!1;;)switch(p){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return ue(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return Pt(u).length;default:if(L)return T?-1:ue(u).length;p=(""+p).toLowerCase(),L=!0}}o.byteLength=F;function V(u,p,v){var T=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,p>>>=0,v<=p))return"";for(u||(u="utf8");;)switch(u){case"hex":return Zt(this,p,v);case"utf8":case"utf-8":return dt(this,p,v);case"ascii":return Wt(this,p,v);case"latin1":case"binary":return Ze(this,p,v);case"base64":return Ae(this,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,p,v);default:if(T)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),T=!0}}o.prototype._isBuffer=!0;function M(u,p,v){var T=u[p];u[p]=u[v],u[v]=T}o.prototype.swap16=function(){var u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var p=0;p<u;p+=2)M(this,p,p+1);return this},o.prototype.swap32=function(){var u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var p=0;p<u;p+=4)M(this,p,p+3),M(this,p+1,p+2);return this},o.prototype.swap64=function(){var u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var p=0;p<u;p+=8)M(this,p,p+7),M(this,p+1,p+6),M(this,p+2,p+5),M(this,p+3,p+4);return this},o.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?dt(this,0,u):V.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.prototype.inspect=function(){var u="",p=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(u+=" ... "),"<Buffer "+u+">"},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(u,p,v,T,L){if(tt(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(u));if(p===void 0&&(p=0),v===void 0&&(v=u?u.length:0),T===void 0&&(T=0),L===void 0&&(L=this.length),p<0||v>u.length||T<0||L>this.length)throw new RangeError("out of range index");if(T>=L&&p>=v)return 0;if(T>=L)return-1;if(p>=v)return 1;if(p>>>=0,v>>>=0,T>>>=0,L>>>=0,this===u)return 0;for(var B=L-T,Q=v-p,rt=Math.min(B,Q),Ke=this.slice(T,L),Le=u.slice(p,v),pt=0;pt<rt;++pt)if(Ke[pt]!==Le[pt]){B=Ke[pt],Q=Le[pt];break}return B<Q?-1:Q<B?1:0};function J(u,p,v,T,L){if(u.length===0)return-1;if(typeof v=="string"?(T=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,Bt(v)&&(v=L?0:u.length-1),v<0&&(v=u.length+v),v>=u.length){if(L)return-1;v=u.length-1}else if(v<0)if(L)v=0;else return-1;if(typeof p=="string"&&(p=o.from(p,T)),o.isBuffer(p))return p.length===0?-1:Ne(u,p,v,T,L);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(u,p,v):Uint8Array.prototype.lastIndexOf.call(u,p,v):Ne(u,[p],v,T,L);throw new TypeError("val must be string, number or Buffer")}function Ne(u,p,v,T,L){var B=1,Q=u.length,rt=p.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(u.length<2||p.length<2)return-1;B=2,Q/=2,rt/=2,v/=2}function Ke(ge,it){return B===1?ge[it]:ge.readUInt16BE(it*B)}var Le;if(L){var pt=-1;for(Le=v;Le<Q;Le++)if(Ke(u,Le)===Ke(p,pt===-1?0:Le-pt)){if(pt===-1&&(pt=Le),Le-pt+1===rt)return pt*B}else pt!==-1&&(Le-=Le-pt),pt=-1}else for(v+rt>Q&&(v=Q-rt),Le=v;Le>=0;Le--){for(var ee=!0,De=0;De<rt;De++)if(Ke(u,Le+De)!==Ke(p,De)){ee=!1;break}if(ee)return Le}return-1}o.prototype.includes=function(u,p,v){return this.indexOf(u,p,v)!==-1},o.prototype.indexOf=function(u,p,v){return J(this,u,p,v,!0)},o.prototype.lastIndexOf=function(u,p,v){return J(this,u,p,v,!1)};function ht(u,p,v,T){v=Number(v)||0;var L=u.length-v;T?(T=Number(T),T>L&&(T=L)):T=L;var B=p.length;T>B/2&&(T=B/2);for(var Q=0;Q<T;++Q){var rt=parseInt(p.substr(Q*2,2),16);if(Bt(rt))return Q;u[v+Q]=rt}return Q}function j(u,p,v,T){return He(ue(p,u.length-v),u,v,T)}function pe(u,p,v,T){return He(Ce(p),u,v,T)}function te(u,p,v,T){return He(Pt(p),u,v,T)}function de(u,p,v,T){return He(je(p,u.length-v),u,v,T)}o.prototype.write=function(u,p,v,T){if(p===void 0)T="utf8",v=this.length,p=0;else if(v===void 0&&typeof p=="string")T=p,v=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(v)?(v=v>>>0,T===void 0&&(T="utf8")):(T=v,v=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-p;if((v===void 0||v>L)&&(v=L),u.length>0&&(v<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var B=!1;;)switch(T){case"hex":return ht(this,u,p,v);case"utf8":case"utf-8":return j(this,u,p,v);case"ascii":case"latin1":case"binary":return pe(this,u,p,v);case"base64":return te(this,u,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,u,p,v);default:if(B)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),B=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ae(u,p,v){return p===0&&v===u.length?Xy.fromByteArray(u):Xy.fromByteArray(u.slice(p,v))}function dt(u,p,v){v=Math.min(u.length,v);for(var T=[],L=p;L<v;){var B=u[L],Q=null,rt=B>239?4:B>223?3:B>191?2:1;if(L+rt<=v){var Ke,Le,pt,ee;switch(rt){case 1:B<128&&(Q=B);break;case 2:Ke=u[L+1],(Ke&192)===128&&(ee=(B&31)<<6|Ke&63,ee>127&&(Q=ee));break;case 3:Ke=u[L+1],Le=u[L+2],(Ke&192)===128&&(Le&192)===128&&(ee=(B&15)<<12|(Ke&63)<<6|Le&63,ee>2047&&(ee<55296||ee>57343)&&(Q=ee));break;case 4:Ke=u[L+1],Le=u[L+2],pt=u[L+3],(Ke&192)===128&&(Le&192)===128&&(pt&192)===128&&(ee=(B&15)<<18|(Ke&63)<<12|(Le&63)<<6|pt&63,ee>65535&&ee<1114112&&(Q=ee))}}Q===null?(Q=65533,rt=1):Q>65535&&(Q-=65536,T.push(Q>>>10&1023|55296),Q=56320|Q&1023),T.push(Q),L+=rt}return _(T)}var ut=4096;function _(u){var p=u.length;if(p<=ut)return String.fromCharCode.apply(String,u);for(var v="",T=0;T<p;)v+=String.fromCharCode.apply(String,u.slice(T,T+=ut));return v}function Wt(u,p,v){var T="";v=Math.min(u.length,v);for(var L=p;L<v;++L)T+=String.fromCharCode(u[L]&127);return T}function Ze(u,p,v){var T="";v=Math.min(u.length,v);for(var L=p;L<v;++L)T+=String.fromCharCode(u[L]);return T}function Zt(u,p,v){var T=u.length;(!p||p<0)&&(p=0),(!v||v<0||v>T)&&(v=T);for(var L="",B=p;B<v;++B)L+=ke[u[B]];return L}function Se(u,p,v){for(var T=u.slice(p,v),L="",B=0;B<T.length-1;B+=2)L+=String.fromCharCode(T[B]+T[B+1]*256);return L}o.prototype.slice=function(u,p){var v=this.length;u=~~u,p=p===void 0?v:~~p,u<0?(u+=v,u<0&&(u=0)):u>v&&(u=v),p<0?(p+=v,p<0&&(p=0)):p>v&&(p=v),p<u&&(p=u);var T=this.subarray(u,p);return Object.setPrototypeOf(T,o.prototype),T};function D(u,p,v){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+p>v)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=this[u],L=1,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return T},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=this[u+--p],L=1;p>0&&(L*=256);)T+=this[u+--p]*L;return T},o.prototype.readUint8=o.prototype.readUInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},o.prototype.readIntLE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=this[u],L=1,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return L*=128,T>=L&&(T-=Math.pow(2,8*p)),T},o.prototype.readIntBE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=p,L=1,B=this[u+--T];T>0&&(L*=256);)B+=this[u+--T]*L;return L*=128,B>=L&&(B-=Math.pow(2,8*p)),B},o.prototype.readInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},o.prototype.readInt16LE=function(u,p){u=u>>>0,p||D(u,2,this.length);var v=this[u]|this[u+1]<<8;return v&32768?v|4294901760:v},o.prototype.readInt16BE=function(u,p){u=u>>>0,p||D(u,2,this.length);var v=this[u+1]|this[u]<<8;return v&32768?v|4294901760:v},o.prototype.readInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},o.prototype.readInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},o.prototype.readFloatLE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Ma.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Ma.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ma.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ma.read(this,u,!1,52,8)};function x(u,p,v,T,L,B){if(!o.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>L||p<B)throw new RangeError('"value" argument is out of bounds');if(v+T>u.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,p,v,T){if(u=+u,p=p>>>0,v=v>>>0,!T){var L=Math.pow(2,8*v)-1;x(this,u,p,v,L,0)}var B=1,Q=0;for(this[p]=u&255;++Q<v&&(B*=256);)this[p+Q]=u/B&255;return p+v},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,p,v,T){if(u=+u,p=p>>>0,v=v>>>0,!T){var L=Math.pow(2,8*v)-1;x(this,u,p,v,L,0)}var B=v-1,Q=1;for(this[p+B]=u&255;--B>=0&&(Q*=256);)this[p+B]=u/Q&255;return p+v},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,1,255,0),this[p]=u&255,p+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,65535,0),this[p]=u&255,this[p+1]=u>>>8,p+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,65535,0),this[p]=u>>>8,this[p+1]=u&255,p+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,4294967295,0),this[p+3]=u>>>24,this[p+2]=u>>>16,this[p+1]=u>>>8,this[p]=u&255,p+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,4294967295,0),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4},o.prototype.writeIntLE=function(u,p,v,T){if(u=+u,p=p>>>0,!T){var L=Math.pow(2,8*v-1);x(this,u,p,v,L-1,-L)}var B=0,Q=1,rt=0;for(this[p]=u&255;++B<v&&(Q*=256);)u<0&&rt===0&&this[p+B-1]!==0&&(rt=1),this[p+B]=(u/Q>>0)-rt&255;return p+v},o.prototype.writeIntBE=function(u,p,v,T){if(u=+u,p=p>>>0,!T){var L=Math.pow(2,8*v-1);x(this,u,p,v,L-1,-L)}var B=v-1,Q=1,rt=0;for(this[p+B]=u&255;--B>=0&&(Q*=256);)u<0&&rt===0&&this[p+B+1]!==0&&(rt=1),this[p+B]=(u/Q>>0)-rt&255;return p+v},o.prototype.writeInt8=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,1,127,-128),u<0&&(u=255+u+1),this[p]=u&255,p+1},o.prototype.writeInt16LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,32767,-32768),this[p]=u&255,this[p+1]=u>>>8,p+2},o.prototype.writeInt16BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,32767,-32768),this[p]=u>>>8,this[p+1]=u&255,p+2},o.prototype.writeInt32LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,2147483647,-2147483648),this[p]=u&255,this[p+1]=u>>>8,this[p+2]=u>>>16,this[p+3]=u>>>24,p+4},o.prototype.writeInt32BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4};function Z(u,p,v,T,L,B){if(v+T>u.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function ne(u,p,v,T,L){return p=+p,v=v>>>0,L||Z(u,p,v,4),Ma.write(u,p,v,T,23,4),v+4}o.prototype.writeFloatLE=function(u,p,v){return ne(this,u,p,!0,v)},o.prototype.writeFloatBE=function(u,p,v){return ne(this,u,p,!1,v)};function ae(u,p,v,T,L){return p=+p,v=v>>>0,L||Z(u,p,v,8),Ma.write(u,p,v,T,52,8),v+8}o.prototype.writeDoubleLE=function(u,p,v){return ae(this,u,p,!0,v)},o.prototype.writeDoubleBE=function(u,p,v){return ae(this,u,p,!1,v)},o.prototype.copy=function(u,p,v,T){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(v||(v=0),!T&&T!==0&&(T=this.length),p>=u.length&&(p=u.length),p||(p=0),T>0&&T<v&&(T=v),T===v||u.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),u.length-p<T-v&&(T=u.length-p+v);var L=T-v;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(p,v,T):Uint8Array.prototype.set.call(u,this.subarray(v,T),p),L},o.prototype.fill=function(u,p,v,T){if(typeof u=="string"){if(typeof p=="string"?(T=p,p=0,v=this.length):typeof v=="string"&&(T=v,v=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!o.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(u.length===1){var L=u.charCodeAt(0);(T==="utf8"&&L<128||T==="latin1")&&(u=L)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(p<0||this.length<p||this.length<v)throw new RangeError("Out of range index");if(v<=p)return this;p=p>>>0,v=v===void 0?this.length:v>>>0,u||(u=0);var B;if(typeof u=="number")for(B=p;B<v;++B)this[B]=u;else{var Q=o.isBuffer(u)?u:o.from(u,T),rt=Q.length;if(rt===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(B=0;B<v-p;++B)this[B+p]=Q[B%rt]}return this};var _e=/[^+/0-9A-Za-z-_]/g;function ve(u){if(u=u.split("=")[0],u=u.trim().replace(_e,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function ue(u,p){p=p||1/0;for(var v,T=u.length,L=null,B=[],Q=0;Q<T;++Q){if(v=u.charCodeAt(Q),v>55295&&v<57344){if(!L){if(v>56319){(p-=3)>-1&&B.push(239,191,189);continue}else if(Q+1===T){(p-=3)>-1&&B.push(239,191,189);continue}L=v;continue}if(v<56320){(p-=3)>-1&&B.push(239,191,189),L=v;continue}v=(L-55296<<10|v-56320)+65536}else L&&(p-=3)>-1&&B.push(239,191,189);if(L=null,v<128){if((p-=1)<0)break;B.push(v)}else if(v<2048){if((p-=2)<0)break;B.push(v>>6|192,v&63|128)}else if(v<65536){if((p-=3)<0)break;B.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((p-=4)<0)break;B.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return B}function Ce(u){for(var p=[],v=0;v<u.length;++v)p.push(u.charCodeAt(v)&255);return p}function je(u,p){for(var v,T,L,B=[],Q=0;Q<u.length&&!((p-=2)<0);++Q)v=u.charCodeAt(Q),T=v>>8,L=v%256,B.push(L),B.push(T);return B}function Pt(u){return Xy.toByteArray(ve(u))}function He(u,p,v,T){for(var L=0;L<T&&!(L+v>=p.length||L>=u.length);++L)p[L+v]=u[L];return L}function tt(u,p){return u instanceof p||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===p.name}function Bt(u){return u!==u}var ke=function(){for(var u="0123456789abcdef",p=new Array(256),v=0;v<16;++v)for(var T=v*16,L=0;L<16;++L)p[T+L]=u[v]+u[L];return p}()}),ct=Uf.Buffer;Uf.SlowBuffer;Uf.INSPECT_MAX_BYTES;Uf.kMaxLength;var n_=function(e,t){return n_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},n_(e,t)};function Hf(e,t){n_(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var vs=function(e){Hf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),$t=function(e){Hf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function Bf(e){return e&&e.Math==Math&&e}function jI(){return Bf(typeof globalThis=="object"&&globalThis)||Bf(typeof window=="object"&&window)||Bf(typeof self=="object"&&self)||Bf(typeof global=="object"&&global)||Function("return this")()}function JB(){var e=jI();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var QB=function(e){var t=JB()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(t);for(var n=ct.alloc(e),r=0;r<e;++r)n[r]=Math.floor(Math.random()*256);return n},eV=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(ct.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(ct.alloc(t))}:QB}},$I=eV();function tV(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function i_(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function nV(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function rV(e){return Il(e)&&Object.prototype.toString.call(e)==="[object Date]"}function Il(e){return typeof e=="object"&&e!==null}function jf(e,t){var n=!1;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return n||(console.warn(t),n=!0),e.apply(this,i)}return r}function Vf(e){if(ArrayBuffer.isView(e))return ct.from(e.buffer,e.byteOffset,e.byteLength);if(tV(e))return ct.from(e);throw new $t("Must use either Buffer or TypedArray")}var iV=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,WI=function(e){return typeof e=="string"&&iV.test(e)},r_=function(e){if(!WI(e))throw new $t('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return ct.from(t,"hex")},II=function(e,t){return t===void 0&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},tK=Math.pow(2,63)-1,nK=-Math.pow(2,63),oV=Math.pow(2,53),sV=-Math.pow(2,53),GI=4,ys=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(t!=null&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!(t instanceof ArrayBuffer)&&!Array.isArray(t))throw new $t("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??e.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=ct.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=ct.from(t,"binary"):Array.isArray(t)?this.buffer=ct.from(t):this.buffer=Vf(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new $t("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new $t("only accepts single character Uint8Array or Array");var n;if(typeof t=="string"?n=t.charCodeAt(0):typeof t=="number"?n=t:n=t[0],n<0||n>255)throw new $t("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=ct.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},e.prototype.write=function(t,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+t.length){var r=ct.alloc(this.buffer.length+t.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(t)?(this.buffer.set(Vf(t),n),this.position=n+t.byteLength>this.position?n+t.length:this.position):typeof t=="string"&&(this.buffer.write(t,n,t.length,"binary"),this.position=n+t.length>this.position?n+t.length:this.position)},e.prototype.read=function(t,n){return n=n&&n>0?n:this.position,this.buffer.slice(t,t+n)},e.prototype.value=function(t){return t=!!t,t&&this.buffer.length===this.position?this.buffer:t?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(t){return this.buffer.toString(t)},e.prototype.toExtendedJSON=function(t){t=t||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new TI(this.buffer.slice(0,this.position));throw new vs('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){n=n||{};var r,i;if("$binary"in t?n.legacy&&typeof t.$binary=="string"&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,r=ct.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=ct.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=r_(t.$uuid)),!r)throw new $t("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===GI?new TI(r):new e(r,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.value(!0);return'new Binary(Buffer.from("'.concat(t.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(ys.prototype,"_bsontype",{value:"Binary"});var Jy=16,TI=function(e){Hf(t,e);function t(n){var r=this,i,s;if(n==null)i=t.generate();else if(n instanceof t)i=ct.from(n.buffer),s=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===Jy)i=Vf(n);else if(typeof n=="string")i=r_(n);else throw new $t("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=e.call(this,i,GI)||this,r.__id=s,r}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,t.cacheHexString&&(this.__id=II(n))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(n){if(n===void 0&&(n=!0),t.cacheHexString&&this.__id)return this.__id;var r=II(this.id,n);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(n){if(!n)return!1;if(n instanceof t)return n.id.equals(this.id);try{return new t(n).id.equals(this.id)}catch{return!1}},t.prototype.toBinary=function(){return new ys(this.id,ys.SUBTYPE_UUID)},t.generate=function(){var n=$I(Jy);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,ct.from(n)},t.isValid=function(n){return n?n instanceof t?!0:typeof n=="string"?WI(n):i_(n)?n.length!==Jy?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},t.createFromHexString=function(n){var r=r_(n);return new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(ys),$f=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toJSON();return'new Code("'.concat(String(t.code),'"').concat(t.scope?", ".concat(JSON.stringify(t.scope)):"",")")},e}();Object.defineProperty($f.prototype,"_bsontype",{value:"Code"});function aV(e){return Il(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var Sl=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var s=t.split(".");s.length===2&&(r=s.shift(),t=s.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(t){this.collection=t},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t},e.prototype.toExtendedJSON=function(t){t=t||{};var n={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(t),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(Sl.prototype,"_bsontype",{value:"DBRef"});var _r=void 0;try{_r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var xI=65536,cV=1<<24,Pa=xI*xI,zI=Pa*Pa,RI=zI/2,NI={},AI={},le=function(){function e(t,n,r){if(t===void 0&&(t=0),!(this instanceof e))return new e(t,n,r);typeof t=="bigint"?Object.assign(this,e.fromBigInt(t,!!n)):typeof t=="string"?Object.assign(this,e.fromString(t,!!n)):(this.low=t|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,i,s;return n?(t>>>=0,(s=0<=t&&t<256)&&(i=AI[t],i)?i:(r=e.fromBits(t,(t|0)<0?-1:0,!0),s&&(AI[t]=r),r)):(t|=0,(s=-128<=t&&t<128)&&(i=NI[t],i)?i:(r=e.fromBits(t,t<0?-1:0,!1),s&&(NI[t]=r),r))},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=zI)return e.MAX_UNSIGNED_VALUE}else{if(t<=-RI)return e.MIN_VALUE;if(t+1>=RI)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%Pa|0,t/Pa|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return e.fromString(t.substring(1),n,r).neg();for(var s=e.fromNumber(Math.pow(r,8)),o=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+l),r);if(l<8){var h=e.fromNumber(Math.pow(r,l));o=o.mul(h).add(e.fromNumber(c))}else o=o.mul(s),o=o.add(e.fromNumber(c))}return o.unsigned=n,o},e.fromBytes=function(t,n,r){return r?e.fromBytesLE(t,n):e.fromBytesBE(t,n)},e.fromBytesLE=function(t,n){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},e.fromBytesBE=function(t,n){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},e.isLong=function(t){return Il(t)&&t.__isLong__===!0},e.fromValue=function(t,n){return typeof t=="number"?e.fromNumber(t,n):typeof t=="string"?e.fromString(t,n):e.fromBits(t.low,t.high,typeof n=="boolean"?n:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,s=this.low&65535,o=t.high>>>16,a=t.high&65535,l=t.low>>>16,c=t.low&65535,h=0,d=0,f=0,g=0;return g+=s+c,f+=g>>>16,g&=65535,f+=i+l,d+=f>>>16,f&=65535,d+=r+a,h+=d>>>16,d&=65535,h+=n+o,h&=65535,e.fromBits(f<<16|g,h<<16|d,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(t){return this.compare(t)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(_r){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?_r.div_u:_r.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,_r.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;s=e.UZERO}else{if(this.eq(e.MIN_VALUE)){if(t.eq(e.ONE)||t.eq(e.NEG_ONE))return e.MIN_VALUE;if(t.eq(e.MIN_VALUE))return e.ONE;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),s=r.add(i.div(t)),s)}else if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=e.ZERO}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),c=e.fromNumber(r),h=c.mul(t);h.isNegative()||h.gt(i);)r-=l,c=e.fromNumber(r,this.unsigned),h=c.mul(t);c.isZero()&&(c=e.ONE),s=s.add(c),i=i.sub(h)}return s},e.prototype.div=function(t){return this.divide(t)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},e.prototype.eq=function(t){return this.equals(t)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(t&1<<n)===0;n--);return this.high!==0?n+33:n+1},e.prototype.greaterThan=function(t){return this.comp(t)>0},e.prototype.gt=function(t){return this.greaterThan(t)},e.prototype.greaterThanOrEqual=function(t){return this.comp(t)>=0},e.prototype.gte=function(t){return this.greaterThanOrEqual(t)},e.prototype.ge=function(t){return this.greaterThanOrEqual(t)},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.lessThan=function(t){return this.comp(t)<0},e.prototype.lt=function(t){return this.lessThan(t)},e.prototype.lessThanOrEqual=function(t){return this.comp(t)<=0},e.prototype.lte=function(t){return this.lessThanOrEqual(t)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),_r){var n=(this.unsigned?_r.rem_u:_r.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,_r.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(t){return this.modulo(t)},e.prototype.rem=function(t){return this.modulo(t)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),_r){var n=_r.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,_r.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,s=this.low>>>16,o=this.low&65535,a=t.high>>>16,l=t.high&65535,c=t.low>>>16,h=t.low&65535,d=0,f=0,g=0,m=0;return m+=o*h,g+=m>>>16,m&=65535,g+=s*h,f+=g>>>16,g&=65535,g+=o*c,f+=g>>>16,g&=65535,f+=i*h,d+=f>>>16,f&=65535,f+=s*c,d+=f>>>16,f&=65535,f+=o*l,d+=f>>>16,f&=65535,d+=r*h+i*c+s*l+o*a,d&=65535,e.fromBits(g<<16|m,d<<16|f,this.unsigned)},e.prototype.mul=function(t){return this.multiply(t)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(t){return!this.equals(t)},e.prototype.neq=function(t){return this.notEquals(t)},e.prototype.ne=function(t){return this.notEquals(t)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(t){return this.shiftLeft(t)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(t){return this.shiftRight(t)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(t){return this.shiftRightUnsigned(t)},e.prototype.shru=function(t){return this.shiftRightUnsigned(t)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(t){return this.subtract(t)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*Pa+(this.low>>>0):this.high*Pa+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},e.prototype.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(e.MIN_VALUE)){var n=e.fromNumber(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var s=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,a="";;){var l=o.div(s),c=o.sub(l.mul(s)).toInt()>>>0,h=c.toString(t);if(o=l,o.isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(t){return this.lessThanOrEqual(t)},e.prototype.toExtendedJSON=function(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(cV),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(le.prototype,"__isLong__",{value:!0});Object.defineProperty(le.prototype,"_bsontype",{value:"Long"});var lV=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,uV=/^(\+|-)?(Infinity|inf)$/i,dV=/^(\+|-)?NaN$/i,Cl=6111,Qy=-6176,MI=6176,fV=34,e_=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),OI=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),PI=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),pV=/^([-+])?(\d+)?$/,hV=31,kI=16383,mV=30,gV=31;function LI(e){return!isNaN(parseInt(e,10))}function vV(e){var t=le.fromNumber(1e9),n=le.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new le(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function yV(e,t){if(!e&&!t)return{high:le.fromNumber(0),low:le.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new le(e.getLowBits(),0),i=t.shiftRightUnsigned(32),s=new le(t.getLowBits(),0),o=n.multiply(i),a=n.multiply(s),l=r.multiply(i),c=r.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new le(a.getLowBits(),0).add(l).add(c.shiftRightUnsigned(32)),o=o.add(a.shiftRightUnsigned(32)),c=a.shiftLeft(32).add(new le(c.getLowBits(),0)),{high:o,low:c}}function _V(e,t){var n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){var i=e.low>>>0,s=t.low>>>0;if(i<s)return!0}return!1}function Oa(e,t){throw new $t('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var o_=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(i_(t)){if(t.byteLength!==16)throw new $t("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new $t("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var n=!1,r=!1,i=!1,s=0,o=0,a=0,l=0,c=0,h=[0],d=0,f=0,g=0,m=0,b=0,I=0,A=new le(0,0),F=new le(0,0),V=0,M=0;if(t.length>=7e3)throw new $t(""+t+" not a valid Decimal128 string");var J=t.match(lV),Ne=t.match(uV),ht=t.match(dV);if(!J&&!Ne&&!ht||t.length===0)throw new $t(""+t+" not a valid Decimal128 string");if(J){var j=J[2],pe=J[4],te=J[5],de=J[6];pe&&de===void 0&&Oa(t,"missing exponent power"),pe&&j===void 0&&Oa(t,"missing exponent base"),pe===void 0&&(te||de)&&Oa(t,"missing e before exponent")}if((t[M]==="+"||t[M]==="-")&&(n=t[M++]==="-"),!LI(t[M])&&t[M]!=="."){if(t[M]==="i"||t[M]==="I")return new e(ct.from(n?OI:PI));if(t[M]==="N")return new e(ct.from(e_))}for(;LI(t[M])||t[M]===".";){if(t[M]==="."){r&&Oa(t,"contains multiple periods"),r=!0,M=M+1;continue}d<34&&(t[M]!=="0"||i)&&(i||(c=o),i=!0,h[f++]=parseInt(t[M],10),d=d+1),i&&(a=a+1),r&&(l=l+1),o=o+1,M=M+1}if(r&&!o)throw new $t(""+t+" not a valid Decimal128 string");if(t[M]==="e"||t[M]==="E"){var Ae=t.substr(++M).match(pV);if(!Ae||!Ae[2])return new e(ct.from(e_));b=parseInt(Ae[0],10),M=M+Ae[0].length}if(t[M])return new e(ct.from(e_));if(g=0,!d)g=0,m=0,h[0]=0,a=1,d=1,s=0;else if(m=d-1,s=a,s!==1)for(;h[c+s-1]===0;)s=s-1;for(b<=l&&l-b>16384?b=Qy:b=b-l;b>Cl;){if(m=m+1,m-g>fV){var dt=h.join("");if(dt.match(/^0+$/)){b=Cl;break}Oa(t,"overflow")}b=b-1}for(;b<Qy||d<a;){if(m===0&&s<d){b=Qy,s=0;break}if(d<a?a=a-1:m=m-1,b<Cl)b=b+1;else{var dt=h.join("");if(dt.match(/^0+$/)){b=Cl;break}Oa(t,"overflow")}}if(m-g+1<s){var ut=o;r&&(c=c+1,ut=ut+1),n&&(c=c+1,ut=ut+1);var _=parseInt(t[c+m+1],10),Wt=0;if(_>=5&&(Wt=1,_===5)){for(Wt=h[m]%2===1?1:0,I=c+m+2;I<ut;I++)if(parseInt(t[I],10)){Wt=1;break}}if(Wt){for(var Ze=m;Ze>=0;Ze--)if(++h[Ze]>9&&(h[Ze]=0,Ze===0))if(b<Cl)b=b+1,h[Ze]=1;else return new e(ct.from(n?OI:PI))}}if(A=le.fromNumber(0),F=le.fromNumber(0),s===0)A=le.fromNumber(0),F=le.fromNumber(0);else if(m-g<17){var Ze=g;for(F=le.fromNumber(h[Ze++]),A=new le(0,0);Ze<=m;Ze++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Ze]))}else{var Ze=g;for(A=le.fromNumber(h[Ze++]);Ze<=m-17;Ze++)A=A.multiply(le.fromNumber(10)),A=A.add(le.fromNumber(h[Ze]));for(F=le.fromNumber(h[Ze++]);Ze<=m;Ze++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Ze]))}var Zt=yV(A,le.fromString("100000000000000000"));Zt.low=Zt.low.add(F),_V(Zt.low,F)&&(Zt.high=Zt.high.add(le.fromNumber(1))),V=b+MI;var Se={low:le.fromNumber(0),high:le.fromNumber(0)};Zt.high.shiftRightUnsigned(49).and(le.fromNumber(1)).equals(le.fromNumber(1))?(Se.high=Se.high.or(le.fromNumber(3).shiftLeft(61)),Se.high=Se.high.or(le.fromNumber(V).and(le.fromNumber(16383).shiftLeft(47))),Se.high=Se.high.or(Zt.high.and(le.fromNumber(0x7fffffffffff)))):(Se.high=Se.high.or(le.fromNumber(V&16383).shiftLeft(49)),Se.high=Se.high.or(Zt.high.and(le.fromNumber(562949953421311)))),Se.low=Zt.low,n&&(Se.high=Se.high.or(le.fromString("9223372036854775808")));var D=ct.alloc(16);return M=0,D[M++]=Se.low.low&255,D[M++]=Se.low.low>>8&255,D[M++]=Se.low.low>>16&255,D[M++]=Se.low.low>>24&255,D[M++]=Se.low.high&255,D[M++]=Se.low.high>>8&255,D[M++]=Se.low.high>>16&255,D[M++]=Se.low.high>>24&255,D[M++]=Se.high.low&255,D[M++]=Se.high.low>>8&255,D[M++]=Se.high.low>>16&255,D[M++]=Se.high.low>>24&255,D[M++]=Se.high.high&255,D[M++]=Se.high.high>>8&255,D[M++]=Se.high.high>>16&255,D[M++]=Se.high.high>>24&255,new e(D)},e.prototype.toString=function(){for(var t,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var s=0,o=!1,a,l={parts:[0,0,0,0]},c,h,d=[];s=0;var f=this.bytes,g=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,m=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,b=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,I=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24;s=0;var A={low:new le(g,m),high:new le(b,I)};A.high.lessThan(le.ZERO)&&d.push("-");var F=I>>26&hV;if(F>>3===3){if(F===mV)return d.join("")+"Infinity";if(F===gV)return"NaN";t=I>>15&kI,a=8+(I>>14&1)}else a=I>>14&7,t=I>>17&kI;var V=t-MI;if(l.parts[0]=(I&16383)+((a&15)<<14),l.parts[1]=b,l.parts[2]=m,l.parts[3]=g,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)o=!0;else for(h=3;h>=0;h--){var M=0,J=vV(l);if(l=J.quotient,M=J.rem.low,!!M)for(c=8;c>=0;c--)r[h*9+c]=M%10,M=Math.floor(M/10)}if(o)n=1,r[s]=0;else for(n=36;!r[s];)n=n-1,s=s+1;var Ne=n-1+V;if(Ne>=34||Ne<=-7||V>0){if(n>34)return d.push("".concat(0)),V>0?d.push("E+".concat(V)):V<0&&d.push("E".concat(V)),d.join("");d.push("".concat(r[s++])),n=n-1,n&&d.push(".");for(var i=0;i<n;i++)d.push("".concat(r[s++]));d.push("E"),Ne>0?d.push("+".concat(Ne)):d.push("".concat(Ne))}else if(V>=0)for(var i=0;i<n;i++)d.push("".concat(r[s++]));else{var ht=n+V;if(ht>0)for(var i=0;i<ht;i++)d.push("".concat(r[s++]));else d.push("0");for(d.push(".");ht++<0;)d.push("0");for(var i=0;i<n-Math.max(ht-1,0);i++)d.push("".concat(r[s++]))}return d.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(o_.prototype,"_bsontype",{value:"Decimal128"});var Wf=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toExtendedJSON=function(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,n){var r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toExtendedJSON();return"new Double(".concat(t.$numberDouble,")")},e}();Object.defineProperty(Wf.prototype,"_bsontype",{value:"Double"});var Gf=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t|0}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Gf.prototype,"_bsontype",{value:"Int32"});var s_=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(s_.prototype,"_bsontype",{value:"MaxKey"});var a_=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(a_.prototype,"_bsontype",{value:"MinKey"});var EV=new RegExp("^[0-9a-fA-F]{24}$"),gs=null,mi=Symbol("id"),on=function(){function e(t){if(!(this instanceof e))return new e(t);var n;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new $t("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=ct.from(t.toHexString(),"hex"):n=t.id}else n=t;if(n==null||typeof n=="number")this[mi]=e.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[mi]=n instanceof ct?n:Vf(n);else if(typeof n=="string")if(n.length===12){var r=ct.from(n);if(r.byteLength===12)this[mi]=r;else throw new $t("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&EV.test(n))this[mi]=ct.from(n,"hex");else throw new $t("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new $t("Argument passed in does not match the accepted types");e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[mi]},set:function(t){this[mi]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(t){this.id.writeUInt32BE(t,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));var n=e.getInc(),r=ct.alloc(12);return r.writeUInt32BE(t,0),gs===null&&(gs=$I(5)),r[4]=gs[0],r[5]=gs[1],r[6]=gs[2],r[7]=gs[3],r[8]=gs[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},e.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(t==null)return!1;if(t instanceof e)return this[mi][11]===t[mi][11]&&this[mi].equals(t[mi]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&i_(this.id))return t===ct.prototype.toString.call(this.id,"latin1");if(typeof t=="string"&&e.isValid(t)&&t.length===24)return t.toLowerCase()===this.toHexString();if(typeof t=="string"&&e.isValid(t)&&t.length===12)return ct.from(t).equals(this.id);if(typeof t=="object"&&"toHexString"in t&&typeof t.toHexString=="function"){var n=t.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},e.prototype.getTimestamp=function(){var t=new Date,n=this.id.readUInt32BE(0);return t.setTime(Math.floor(n)*1e3),t},e.createPk=function(){return new e},e.createFromTime=function(t){var n=ct.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new $t("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(ct.from(t,"hex"))},e.isValid=function(t){if(t==null)return!1;try{return new e(t),!0}catch{return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(Math.random()*16777215),e}();Object.defineProperty(on.prototype,"generate",{value:jf(function(e){return on.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(on.prototype,"getInc",{value:jf(function(){return on.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(on.prototype,"get_inc",{value:jf(function(){return on.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(on,"get_inc",{value:jf(function(){return on.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(on.prototype,"_bsontype",{value:"ObjectID"});function wV(e){return e.split("").sort().join("")}var Dl=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=wV(n??""),this.pattern.indexOf("\0")!==-1)throw new vs("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new vs("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new vs("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(t){return t?t.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new e(t.$regex,e.parseOptions(t.$options));if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new $t("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(Dl.prototype,"_bsontype",{value:"BSONRegExp"});var c_=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(c_.prototype,"_bsontype",{value:"Symbol"});var bV=le,qI=function(e){Hf(t,e);function t(n,r){var i=this;return i instanceof t?(le.isLong(n)?i=e.call(this,n.low,n.high,!0)||this:Il(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=e.call(this,n.i,n.t,!0)||this:i=e.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(n,r)}return t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(n){return new t(le.fromInt(n,!0))},t.fromNumber=function(n){return new t(le.fromNumber(n,!0))},t.fromBits=function(n,r){return new t(n,r)},t.fromString=function(n,r){return new t(le.fromString(n,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(n){return new t(n.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=le.MAX_UNSIGNED_VALUE,t}(bV);function CV(e){return Il(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var YI=2147483647,KI=-2147483648,ZI=9223372036854776e3,XI=-9223372036854776e3,SV={$oid:on,$binary:ys,$uuid:ys,$symbol:c_,$numberInt:Gf,$numberDecimal:o_,$numberDouble:Wf,$numberLong:le,$minKey:a_,$maxKey:s_,$regex:Dl,$regularExpression:Dl,$timestamp:qI};function JI(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=KI&&e<=YI)return new Gf(e);if(e>=XI&&e<=ZI)return le.fromNumber(e)}return new Wf(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter(function(d){return d.startsWith("$")&&e[d]!=null}),r=0;r<n.length;r++){var i=SV[n[r]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var s=e.$date,o=new Date;return t.legacy?typeof s=="number"?o.setTime(s):typeof s=="string"&&o.setTime(Date.parse(s)):typeof s=="string"?o.setTime(Date.parse(s)):le.isLong(s)?o.setTime(s.toNumber()):typeof s=="number"&&t.relaxed&&o.setTime(s),o}if(e.$code!=null){var a=Object.assign({},e);return e.$scope&&(a.$scope=JI(e.$scope)),$f.fromExtendedJSON(e)}if(aV(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(l instanceof Sl)return l;var c=Object.keys(l).filter(function(d){return d.startsWith("$")}),h=!0;if(c.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(h=!1)}),h)return Sl.fromExtendedJSON(l)}return e}function DV(e,t){return e.map(function(n,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return vo(n,t)}finally{t.seenObjects.pop()}})}function FI(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function vo(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var n=t.seenObjects.findIndex(function(A){return A.obj===e});if(n!==-1){var r=t.seenObjects.map(function(A){return A.propertyName}),i=r.slice(0,n).map(function(A){return"".concat(A," -> ")}).join(""),s=r[n],o=" -> "+r.slice(n+1,r.length-1).map(function(A){return"".concat(A," -> ")}).join(""),a=r[r.length-1],l=" ".repeat(i.length+s.length/2),c="-".repeat(o.length+(s.length+a.length)/2-1);throw new $t(`Converting circular structure to EJSON:
|
|
40
|
+
`)};Vn.prototype.renderPartial=function(e,t,n,r){if(n){var i=this.getConfigTags(r),s=Yy(n)?n(e[1]):n[e[1]];if(s!=null){var o=e[6],a=e[5],l=e[4],c=s;a==0&&l&&(c=this.indentPartial(s,l,o));var h=this.parse(c,i);return this.renderTokens(h,t,n,c,r)}}};Vn.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Vn.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||Er.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&r===Er.escape?String(i):r(i)};Vn.prototype.rawValue=function(e){return e[1]};Vn.prototype.getConfigTags=function(e){return Na(e)?e:e&&typeof e=="object"?e.tags:void 0};Vn.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Na(e))return e.escape};var Er={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){wl.templateCache=e},get templateCache(){return wl.templateCache}},wl=new Vn;Er.clearCache=function(){return wl.clearCache()};Er.parse=function(e,t){return wl.parse(e,t)};Er.render=function(e,t,n,r){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+wB(e)+'" was given as the first argument for mustache#render(template, view, partials)');return wl.render(e,t,n,r)};Er.escape=xB;Er.Scanner=bl;Er.Context=Ra;Er.Writer=Vn;var mn=Er;mn.escape=CI.MustacheUtils.escapeHtml;var Pf=class Gd{transform(t,n){return t?mn.render(t,w({},n)):null}static \u0275fac=function(t){return new(t||Gd)};static \u0275pipe=Xo({name:"cooeeDynamicVariables",type:Gd,pure:!0})},Ky={};(function e(t,n,r,i){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var D=new OffscreenCanvas(1,1),x=D.getContext("2d");x.fillRect(0,0,1,1);var Z=D.transferToImageBitmap();try{x.createPattern(Z,"no-repeat")}catch{return!1}return!0}();function l(){}function c(D){var x=n.exports.Promise,Z=x!==void 0?x:t.Promise;return typeof Z=="function"?new Z(D):(D(l,l),null)}var h=function(D,x){return{transform:function(Z){if(D)return Z;if(x.has(Z))return x.get(Z);var ne=new OffscreenCanvas(Z.width,Z.height),ae=ne.getContext("2d");return ae.drawImage(Z,0,0),x.set(Z,ne),ne},clear:function(){x.clear()}}}(a,new Map),d=function(){var D=Math.floor(16.666666666666668),x,Z,ne={},ae=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(x=function(_e){var ve=Math.random();return ne[ve]=requestAnimationFrame(function ue(Ce){ae===Ce||ae+D-1<Ce?(ae=Ce,delete ne[ve],_e()):ne[ve]=requestAnimationFrame(ue)}),ve},Z=function(_e){ne[_e]&&cancelAnimationFrame(ne[_e])}):(x=function(_e){return setTimeout(_e,D)},Z=function(_e){return clearTimeout(_e)}),{frame:x,cancel:Z}}(),f=function(){var D,x,Z={};function ne(ae){function _e(ve,ue){ae.postMessage({options:ve||{},callback:ue})}ae.init=function(ve){var ue=ve.transferControlToOffscreen();ae.postMessage({canvas:ue},[ue])},ae.fire=function(ve,ue,Ce){if(x)return _e(ve,null),x;var je=Math.random().toString(36).slice(2);return x=c(function(kt){function He(tt){tt.data.callback===je&&(delete Z[je],ae.removeEventListener("message",He),x=null,h.clear(),Ce(),kt())}ae.addEventListener("message",He),_e(ve,je),Z[je]=He.bind(null,{data:{callback:je}})}),x},ae.reset=function(){ae.postMessage({reset:!0});for(var ve in Z)Z[ve](),delete Z[ve]}}return function(){if(D)return D;if(!r&&s){var ae=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
|
|
41
|
+
`);try{D=new Worker(URL.createObjectURL(new Blob([ae])))}catch(_e){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",_e),null}ne(D)}return D}}(),g={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function m(D,x){return x?x(D):D}function b(D){return D!=null}function I(D,x,Z){return m(D&&b(D[x])?D[x]:g[x],Z)}function A(D){return D<0?0:Math.floor(D)}function F(D,x){return Math.floor(Math.random()*(x-D))+D}function V(D){return parseInt(D,16)}function M(D){return D.map(J)}function J(D){var x=String(D).replace(/[^0-9a-f]/gi,"");return x.length<6&&(x=x[0]+x[0]+x[1]+x[1]+x[2]+x[2]),{r:V(x.substring(0,2)),g:V(x.substring(2,4)),b:V(x.substring(4,6))}}function Ne(D){var x=I(D,"origin",Object);return x.x=I(x,"x",Number),x.y=I(x,"y",Number),x}function ht(D){D.width=document.documentElement.clientWidth,D.height=document.documentElement.clientHeight}function j(D){var x=D.getBoundingClientRect();D.width=x.width,D.height=x.height}function pe(D){var x=document.createElement("canvas");return x.style.position="fixed",x.style.top="0px",x.style.left="0px",x.style.pointerEvents="none",x.style.zIndex=D,x}function te(D,x,Z,ne,ae,_e,ve,ue,Ce){D.save(),D.translate(x,Z),D.rotate(_e),D.scale(ne,ae),D.arc(0,0,1,ve,ue,Ce),D.restore()}function de(D){var x=D.angle*(Math.PI/180),Z=D.spread*(Math.PI/180);return{x:D.x,y:D.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:D.startVelocity*.5+Math.random()*D.startVelocity,angle2D:-x+(.5*Z-Math.random()*Z),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:D.color,shape:D.shape,tick:0,totalTicks:D.ticks,decay:D.decay,drift:D.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:D.gravity*3,ovalScalar:.6,scalar:D.scalar,flat:D.flat}}function Ae(D,x){x.x+=Math.cos(x.angle2D)*x.velocity+x.drift,x.y+=Math.sin(x.angle2D)*x.velocity+x.gravity,x.velocity*=x.decay,x.flat?(x.wobble=0,x.wobbleX=x.x+10*x.scalar,x.wobbleY=x.y+10*x.scalar,x.tiltSin=0,x.tiltCos=0,x.random=1):(x.wobble+=x.wobbleSpeed,x.wobbleX=x.x+10*x.scalar*Math.cos(x.wobble),x.wobbleY=x.y+10*x.scalar*Math.sin(x.wobble),x.tiltAngle+=.1,x.tiltSin=Math.sin(x.tiltAngle),x.tiltCos=Math.cos(x.tiltAngle),x.random=Math.random()+2);var Z=x.tick++/x.totalTicks,ne=x.x+x.random*x.tiltCos,ae=x.y+x.random*x.tiltSin,_e=x.wobbleX+x.random*x.tiltCos,ve=x.wobbleY+x.random*x.tiltSin;if(D.fillStyle="rgba("+x.color.r+", "+x.color.g+", "+x.color.b+", "+(1-Z)+")",D.beginPath(),o&&x.shape.type==="path"&&typeof x.shape.path=="string"&&Array.isArray(x.shape.matrix))D.fill(Ze(x.shape.path,x.shape.matrix,x.x,x.y,Math.abs(_e-ne)*.1,Math.abs(ve-ae)*.1,Math.PI/10*x.wobble));else if(x.shape.type==="bitmap"){var ue=Math.PI/10*x.wobble,Ce=Math.abs(_e-ne)*.1,je=Math.abs(ve-ae)*.1,kt=x.shape.bitmap.width*x.scalar,He=x.shape.bitmap.height*x.scalar,tt=new DOMMatrix([Math.cos(ue)*Ce,Math.sin(ue)*Ce,-Math.sin(ue)*je,Math.cos(ue)*je,x.x,x.y]);tt.multiplySelf(new DOMMatrix(x.shape.matrix));var Bt=D.createPattern(h.transform(x.shape.bitmap),"no-repeat");Bt.setTransform(tt),D.globalAlpha=1-Z,D.fillStyle=Bt,D.fillRect(x.x-kt/2,x.y-He/2,kt,He),D.globalAlpha=1}else if(x.shape==="circle")D.ellipse?D.ellipse(x.x,x.y,Math.abs(_e-ne)*x.ovalScalar,Math.abs(ve-ae)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI):te(D,x.x,x.y,Math.abs(_e-ne)*x.ovalScalar,Math.abs(ve-ae)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI);else if(x.shape==="star")for(var ke=Math.PI/2*3,u=4*x.scalar,p=8*x.scalar,v=x.x,T=x.y,L=5,B=Math.PI/L;L--;)v=x.x+Math.cos(ke)*p,T=x.y+Math.sin(ke)*p,D.lineTo(v,T),ke+=B,v=x.x+Math.cos(ke)*u,T=x.y+Math.sin(ke)*u,D.lineTo(v,T),ke+=B;else D.moveTo(Math.floor(x.x),Math.floor(x.y)),D.lineTo(Math.floor(x.wobbleX),Math.floor(ae)),D.lineTo(Math.floor(_e),Math.floor(ve)),D.lineTo(Math.floor(ne),Math.floor(x.wobbleY));return D.closePath(),D.fill(),x.tick<x.totalTicks}function dt(D,x,Z,ne,ae){var _e=x.slice(),ve=D.getContext("2d"),ue,Ce,je=c(function(kt){function He(){ue=Ce=null,ve.clearRect(0,0,ne.width,ne.height),h.clear(),ae(),kt()}function tt(){r&&!(ne.width===i.width&&ne.height===i.height)&&(ne.width=D.width=i.width,ne.height=D.height=i.height),!ne.width&&!ne.height&&(Z(D),ne.width=D.width,ne.height=D.height),ve.clearRect(0,0,ne.width,ne.height),_e=_e.filter(function(Bt){return Ae(ve,Bt)}),_e.length?ue=d.frame(tt):He()}ue=d.frame(tt),Ce=He});return{addFettis:function(kt){return _e=_e.concat(kt),je},canvas:D,promise:je,reset:function(){ue&&d.cancel(ue),Ce&&Ce()}}}function ut(D,x){var Z=!D,ne=!!I(x||{},"resize"),ae=!1,_e=I(x,"disableForReducedMotion",Boolean),ve=s&&!!I(x||{},"useWorker"),ue=ve?f():null,Ce=Z?ht:j,je=D&&ue?!!D.__confetti_initialized:!1,kt=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,He;function tt(ke,u,p){for(var v=I(ke,"particleCount",A),T=I(ke,"angle",Number),L=I(ke,"spread",Number),B=I(ke,"startVelocity",Number),Q=I(ke,"decay",Number),rt=I(ke,"gravity",Number),Ke=I(ke,"drift",Number),Le=I(ke,"colors",M),pt=I(ke,"ticks",Number),ee=I(ke,"shapes"),De=I(ke,"scalar"),ge=!!I(ke,"flat"),it=Ne(ke),En=v,_n=[],lt=D.width*it.x,me=D.height*it.y;En--;)_n.push(de({x:lt,y:me,angle:T,spread:L,startVelocity:B,color:Le[En%Le.length],shape:ee[F(0,ee.length)],ticks:pt,decay:Q,gravity:rt,drift:Ke,scalar:De,flat:ge}));return He?He.addFettis(_n):(He=dt(D,_n,Ce,u,p),He.promise)}function Bt(ke){var u=_e||I(ke,"disableForReducedMotion",Boolean),p=I(ke,"zIndex",Number);if(u&&kt)return c(function(B){B()});Z&&He?D=He.canvas:Z&&!D&&(D=pe(p),document.body.appendChild(D)),ne&&!je&&Ce(D);var v={width:D.width,height:D.height};ue&&!je&&ue.init(D),je=!0,ue&&(D.__confetti_initialized=!0);function T(){if(ue){var B={getBoundingClientRect:function(){if(!Z)return D.getBoundingClientRect()}};Ce(B),ue.postMessage({resize:{width:B.width,height:B.height}});return}v.width=v.height=null}function L(){He=null,ne&&(ae=!1,t.removeEventListener("resize",T)),Z&&D&&(document.body.contains(D)&&document.body.removeChild(D),D=null,je=!1)}return ne&&!ae&&(ae=!0,t.addEventListener("resize",T,!1)),ue?ue.fire(ke,v,L):tt(ke,v,L)}return Bt.reset=function(){ue&&ue.reset(),He&&He.reset()},Bt}var _;function Gt(){return _||(_=ut(null,{useWorker:!0,resize:!0})),_}function Ze(D,x,Z,ne,ae,_e,ve){var ue=new Path2D(D),Ce=new Path2D;Ce.addPath(ue,new DOMMatrix(x));var je=new Path2D;return je.addPath(Ce,new DOMMatrix([Math.cos(ve)*ae,Math.sin(ve)*ae,-Math.sin(ve)*_e,Math.cos(ve)*_e,Z,ne])),je}function Zt(D){if(!o)throw new Error("path confetti are not supported in this browser");var x,Z;typeof D=="string"?x=D:(x=D.path,Z=D.matrix);var ne=new Path2D(x),ae=document.createElement("canvas"),_e=ae.getContext("2d");if(!Z){for(var ve=1e3,ue=ve,Ce=ve,je=0,kt=0,He,tt,Bt=0;Bt<ve;Bt+=2)for(var ke=0;ke<ve;ke+=2)_e.isPointInPath(ne,Bt,ke,"nonzero")&&(ue=Math.min(ue,Bt),Ce=Math.min(Ce,ke),je=Math.max(je,Bt),kt=Math.max(kt,ke));He=je-ue,tt=kt-Ce;var u=10,p=Math.min(u/He,u/tt);Z=[p,0,0,p,-Math.round(He/2+ue)*p,-Math.round(tt/2+Ce)*p]}return{type:"path",path:x,matrix:Z}}function Se(D){var x,Z=1,ne="#000000",ae='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof D=="string"?x=D:(x=D.text,Z="scalar"in D?D.scalar:Z,ae="fontFamily"in D?D.fontFamily:ae,ne="color"in D?D.color:ne);var _e=10*Z,ve=""+_e+"px "+ae,ue=new OffscreenCanvas(_e,_e),Ce=ue.getContext("2d");Ce.font=ve;var je=Ce.measureText(x),kt=Math.ceil(je.actualBoundingBoxRight+je.actualBoundingBoxLeft),He=Math.ceil(je.actualBoundingBoxAscent+je.actualBoundingBoxDescent),tt=2,Bt=je.actualBoundingBoxLeft+tt,ke=je.actualBoundingBoxAscent+tt;kt+=tt+tt,He+=tt+tt,ue=new OffscreenCanvas(kt,He),Ce=ue.getContext("2d"),Ce.font=ve,Ce.fillStyle=ne,Ce.fillText(x,Bt,ke);var u=1/Z;return{type:"bitmap",bitmap:ue.transferToImageBitmap(),matrix:[u,0,0,u,-kt*u/2,-He*u/2]}}n.exports=function(){return Gt().apply(this,arguments)},n.exports.reset=function(){Gt().reset()},n.exports.create=ut,n.exports.shapeFromPath=Zt,n.exports.shapeFromText=Se})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),Ky,!1);var SI=Ky.exports,V7=Ky.exports.create,kf=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(e=100){let t=[],n=Date.now()+2e3,r=()=>{t.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<n&&e>0&&(requestAnimationFrame(r),e--)};r(),await Promise.all(t)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(e){Object.assign(e,this.DEFAULTS,e),e.particleCount=e.particleCount??this.DEFAULTS.colors.length,await SI(e)}static async realisticFire(e,t){let n={origin:{y:.7}};await this.fire(Object.assign({},n,t,{particleCount:Math.floor(200*e)}))}},Aa=class qd{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||qd)(bt(Mv,16))};static \u0275pipe=Xo({name:"safeHtml",type:qd,pure:!0})},LB=(e,t)=>t.minValue;function FB(e,t){if(e&1&&(K(0,"li",6)(1,"div",7),Re(2,"div",8),Jn(3,"cooeeCurrency"),Jn(4,"safeHtml"),Re(5,"img",9),K(6,"div",10),$t(7),X()()()),e&2){let n=t.$implicit,r=q(2);po("left",n.calculatedAlignment+"%"),Y(2),be("innerHTML",gr(4,7,gr(3,5,n.minValue)),il),Y(3),be("src",r.getIconURL(n),zt),Y(2),fa(n.label)}}function BB(e,t){if(e&1&&(Br(0)(1),Re(2,"div",0),Jn(3,"cooeeDynamicVariables"),Jn(4,"safeHtml"),K(5,"div",1)(6,"ul",2)(7,"div",3),Re(8,"div",4),X(),Mt(9,FB,8,9,"li",5,LB),X()()),e&2){let n=q(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;Y(2),be("innerHTML",gr(4,6,q0(3,3,i,n.localDynamicVariables())),il),Y(6),po("width",r.cartValuePercentage+"%"),Y(),Ot(r.milestones)}}var Ff=class sp{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=Bi({});calculatedState=Bi({});_engagementTrigger=Bi(null);set engagementTrigger(t){this._engagementTrigger.set(t)}ngOnInit(){S.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){S.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===Lf.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===Lf.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===Lf.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>S.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){S.warn("Milestones not available in progress bar config",t);return}let n=await this.cart.getNormalisedCart(),r=t.progressBarConfig,i=r.milestones.at(-1),s=i.minValue+Math.floor(i.minValue*5/100),o=n.originalAmount,a=Math.min(o,s),l=100/r.milestones.length,c=l;for(let g of r.milestones)g.calculatedAlignment=c,c+=l;let h=this.calculateTrackedProgress(a,r.milestones);S.debug("Cart value:",o,`, percentage: ${h}%`),this.celebrate(t,o);let d={milestonesReady:!0,cartValuePercentage:h,milestones:r.milestones},f=r.milestones.find(g=>g.minValue>o);if(f){this.localDynamicVariables.set({amount_left:fe.formatCurrency(f.minValue-o)}),d.nextMilestone=f,this.calculatedState.set(d);return}d.lastMilestone=i,this.calculatedState.set(d)}celebrate(t,n){let r=[...t.progressBarConfig.milestones].reverse().find(s=>s.minValue<n);if(!r)return;let i=`lc/en/${t.shortID}/${r.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),kf.realistic())}calculateTrackedProgress(t,n){if(t<=n[0].minValue)return t/n[0].minValue*n[0].calculatedAlignment;if(t>=n[n.length-1].minValue)return 100;for(let r=0;r<n.length-1;r++){let i=n[r].minValue,s=n[r+1].minValue,o=n[r].calculatedAlignment,a=n[r+1].calculatedAlignment;if(t>=i&&t<=s)return(t-i)/(s-i)*(a-o)+o}return 0}static \u0275fac=function(t){return new(t||sp)(bt(Nt))};static \u0275cmp=at({type:sp,selectors:[["cooee-progressbar"]],inputs:{cart:"cart",engagementTrigger:"engagementTrigger"},decls:1,vars:1,consts:[["id","lc-heading",1,"lc:font-medium","lc:text-center","lc:text-[12px]","lc-primary-text",3,"innerHTML"],[1,"lc:mt-4","lc:w-[95%]"],["id","lc-milestone-list",1,"lc:flex","lc:items-center","lc:relative","lc:text-[10px]","lc:font-medium"],["id","lc-untracked-path",1,"lc:w-full","lc:bg-gray-200","lc:h-1","lc:absolute","lc-progress-rail"],["id","lc-tracked-path",1,"lc:bg-green-700","lc:h-full","lc:block!"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]",3,"left"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:justify-between","lc:absolute","lc:h-full","lc:w-[100px]"],["id","lc-milestone-value",1,"lc-milestone-value",3,"innerHTML"],["width","20","height","20","id","lc-milestone-icon","alt","milestone icon",1,"lc-milestone-icon","lc:bg-green-700",3,"src"],["id","lc-milestone-label",1,"lc="]],template:function(t,n){t&1&&At(0,BB,11,8),t&2&&Vt(n.calculatedState().milestonesReady?0:-1)},dependencies:[Pf,Aa,pi],styles:["[_nghost-%COMP%]{display:block;padding:10px;background:linear-gradient(0deg,rgba(44,135,74,.1) 0%,transparent 100%)}.lc-milestone-icon[_ngcontent-%COMP%]{padding:5px;border-radius:1000px}.lc-progress-rail[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{transition:width .5s ease-in-out}"]})};function VB(e,t){return t={exports:{}},e(t,t.exports),t.exports}var UB=WB,HB=zB,jB=KB,gi=[],br=[],$B=typeof Uint8Array<"u"?Uint8Array:Array,Zy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ms=0,DI=Zy.length;ms<DI;++ms)gi[ms]=Zy[ms],br[Zy.charCodeAt(ms)]=ms;var ms,DI;br[45]=62;br[95]=63;function HI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function WB(e){var t=HI(e),n=t[0],r=t[1];return(n+r)*3/4-r}function GB(e,t,n){return(t+n)*3/4-n}function zB(e){var t,n=HI(e),r=n[0],i=n[1],s=new $B(GB(e,r,i)),o=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)t=br[e.charCodeAt(l)]<<18|br[e.charCodeAt(l+1)]<<12|br[e.charCodeAt(l+2)]<<6|br[e.charCodeAt(l+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=br[e.charCodeAt(l)]<<2|br[e.charCodeAt(l+1)]>>4,s[o++]=t&255),i===1&&(t=br[e.charCodeAt(l)]<<10|br[e.charCodeAt(l+1)]<<4|br[e.charCodeAt(l+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function qB(e){return gi[e>>18&63]+gi[e>>12&63]+gi[e>>6&63]+gi[e&63]}function YB(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(qB(r));return i.join("")}function KB(e){for(var t,n=e.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(YB(e,o,o+s>a?a:o+s));return r===1?(t=e[n-1],i.push(gi[t>>2]+gi[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(gi[t>>10]+gi[t>>4&63]+gi[t<<2&63]+"=")),i.join("")}var Xy={byteLength:UB,toByteArray:HB,fromByteArray:jB},ZB=function(e,t,n,r,i){var s,o,a=i*8-r-1,l=(1<<a)-1,c=l>>1,h=-7,d=n?i-1:0,f=n?-1:1,g=e[t+d];for(d+=f,s=g&(1<<-h)-1,g>>=-h,h+=a;h>0;s=s*256+e[t+d],d+=f,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=r;h>0;o=o*256+e[t+d],d+=f,h-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-c}return(g?-1:1)*o*Math.pow(2,s-r)},XB=function(e,t,n,r,i,s){var o,a,l,c=s*8-i-1,h=(1<<c)-1,d=h>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:s-1,m=r?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=h?(a=0,o=h):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+g]=a&255,g+=m,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+g]=o&255,g+=m,o/=256,c-=8);e[n+g-m]|=b*128},Ma={read:ZB,write:XB},Uf=VB(function(e,t){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;var r=2147483647;t.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var u=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(u,p),u.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(u){if(u>r)throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=new Uint8Array(u);return Object.setPrototypeOf(p,o.prototype),p}function o(u,p,v){if(typeof u=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(u)}return a(u,p,v)}o.poolSize=8192;function a(u,p,v){if(typeof u=="string")return d(u,p);if(ArrayBuffer.isView(u))return g(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u));if(tt(u,ArrayBuffer)||u&&tt(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(u,SharedArrayBuffer)||u&&tt(u.buffer,SharedArrayBuffer)))return m(u,p,v);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var T=u.valueOf&&u.valueOf();if(T!=null&&T!==u)return o.from(T,p,v);var L=b(u);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return o.from(u[Symbol.toPrimitive]("string"),p,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u))}o.from=function(u,p,v){return a(u,p,v)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function c(u,p,v){return l(u),u<=0?s(u):p!==void 0?typeof v=="string"?s(u).fill(p,v):s(u).fill(p):s(u)}o.alloc=function(u,p,v){return c(u,p,v)};function h(u){return l(u),s(u<0?0:I(u)|0)}o.allocUnsafe=function(u){return h(u)},o.allocUnsafeSlow=function(u){return h(u)};function d(u,p){if((typeof p!="string"||p==="")&&(p="utf8"),!o.isEncoding(p))throw new TypeError("Unknown encoding: "+p);var v=F(u,p)|0,T=s(v),L=T.write(u,p);return L!==v&&(T=T.slice(0,L)),T}function f(u){for(var p=u.length<0?0:I(u.length)|0,v=s(p),T=0;T<p;T+=1)v[T]=u[T]&255;return v}function g(u){if(tt(u,Uint8Array)){var p=new Uint8Array(u);return m(p.buffer,p.byteOffset,p.byteLength)}return f(u)}function m(u,p,v){if(p<0||u.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<p+(v||0))throw new RangeError('"length" is outside of buffer bounds');var T;return p===void 0&&v===void 0?T=new Uint8Array(u):v===void 0?T=new Uint8Array(u,p):T=new Uint8Array(u,p,v),Object.setPrototypeOf(T,o.prototype),T}function b(u){if(o.isBuffer(u)){var p=I(u.length)|0,v=s(p);return v.length===0||u.copy(v,0,0,p),v}if(u.length!==void 0)return typeof u.length!="number"||Bt(u.length)?s(0):f(u);if(u.type==="Buffer"&&Array.isArray(u.data))return f(u.data)}function I(u){if(u>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return u|0}function A(u){return+u!=u&&(u=0),o.alloc(+u)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,p){if(tt(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),tt(p,Uint8Array)&&(p=o.from(p,p.offset,p.byteLength)),!o.isBuffer(u)||!o.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===p)return 0;for(var v=u.length,T=p.length,L=0,B=Math.min(v,T);L<B;++L)if(u[L]!==p[L]){v=u[L],T=p[L];break}return v<T?-1:T<v?1:0},o.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(u,p){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);var v;if(p===void 0)for(p=0,v=0;v<u.length;++v)p+=u[v].length;var T=o.allocUnsafe(p),L=0;for(v=0;v<u.length;++v){var B=u[v];if(tt(B,Uint8Array))L+B.length>T.length?o.from(B).copy(T,L):Uint8Array.prototype.set.call(T,B,L);else if(o.isBuffer(B))B.copy(T,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=B.length}return T};function F(u,p){if(o.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||tt(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(u));var v=u.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&v===0)return 0;for(var L=!1;;)switch(p){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return ue(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return kt(u).length;default:if(L)return T?-1:ue(u).length;p=(""+p).toLowerCase(),L=!0}}o.byteLength=F;function V(u,p,v){var T=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,p>>>=0,v<=p))return"";for(u||(u="utf8");;)switch(u){case"hex":return Zt(this,p,v);case"utf8":case"utf-8":return dt(this,p,v);case"ascii":return Gt(this,p,v);case"latin1":case"binary":return Ze(this,p,v);case"base64":return Ae(this,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,p,v);default:if(T)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),T=!0}}o.prototype._isBuffer=!0;function M(u,p,v){var T=u[p];u[p]=u[v],u[v]=T}o.prototype.swap16=function(){var u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var p=0;p<u;p+=2)M(this,p,p+1);return this},o.prototype.swap32=function(){var u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var p=0;p<u;p+=4)M(this,p,p+3),M(this,p+1,p+2);return this},o.prototype.swap64=function(){var u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var p=0;p<u;p+=8)M(this,p,p+7),M(this,p+1,p+6),M(this,p+2,p+5),M(this,p+3,p+4);return this},o.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?dt(this,0,u):V.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.prototype.inspect=function(){var u="",p=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(u+=" ... "),"<Buffer "+u+">"},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(u,p,v,T,L){if(tt(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(u));if(p===void 0&&(p=0),v===void 0&&(v=u?u.length:0),T===void 0&&(T=0),L===void 0&&(L=this.length),p<0||v>u.length||T<0||L>this.length)throw new RangeError("out of range index");if(T>=L&&p>=v)return 0;if(T>=L)return-1;if(p>=v)return 1;if(p>>>=0,v>>>=0,T>>>=0,L>>>=0,this===u)return 0;for(var B=L-T,Q=v-p,rt=Math.min(B,Q),Ke=this.slice(T,L),Le=u.slice(p,v),pt=0;pt<rt;++pt)if(Ke[pt]!==Le[pt]){B=Ke[pt],Q=Le[pt];break}return B<Q?-1:Q<B?1:0};function J(u,p,v,T,L){if(u.length===0)return-1;if(typeof v=="string"?(T=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,Bt(v)&&(v=L?0:u.length-1),v<0&&(v=u.length+v),v>=u.length){if(L)return-1;v=u.length-1}else if(v<0)if(L)v=0;else return-1;if(typeof p=="string"&&(p=o.from(p,T)),o.isBuffer(p))return p.length===0?-1:Ne(u,p,v,T,L);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(u,p,v):Uint8Array.prototype.lastIndexOf.call(u,p,v):Ne(u,[p],v,T,L);throw new TypeError("val must be string, number or Buffer")}function Ne(u,p,v,T,L){var B=1,Q=u.length,rt=p.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(u.length<2||p.length<2)return-1;B=2,Q/=2,rt/=2,v/=2}function Ke(ge,it){return B===1?ge[it]:ge.readUInt16BE(it*B)}var Le;if(L){var pt=-1;for(Le=v;Le<Q;Le++)if(Ke(u,Le)===Ke(p,pt===-1?0:Le-pt)){if(pt===-1&&(pt=Le),Le-pt+1===rt)return pt*B}else pt!==-1&&(Le-=Le-pt),pt=-1}else for(v+rt>Q&&(v=Q-rt),Le=v;Le>=0;Le--){for(var ee=!0,De=0;De<rt;De++)if(Ke(u,Le+De)!==Ke(p,De)){ee=!1;break}if(ee)return Le}return-1}o.prototype.includes=function(u,p,v){return this.indexOf(u,p,v)!==-1},o.prototype.indexOf=function(u,p,v){return J(this,u,p,v,!0)},o.prototype.lastIndexOf=function(u,p,v){return J(this,u,p,v,!1)};function ht(u,p,v,T){v=Number(v)||0;var L=u.length-v;T?(T=Number(T),T>L&&(T=L)):T=L;var B=p.length;T>B/2&&(T=B/2);for(var Q=0;Q<T;++Q){var rt=parseInt(p.substr(Q*2,2),16);if(Bt(rt))return Q;u[v+Q]=rt}return Q}function j(u,p,v,T){return He(ue(p,u.length-v),u,v,T)}function pe(u,p,v,T){return He(Ce(p),u,v,T)}function te(u,p,v,T){return He(kt(p),u,v,T)}function de(u,p,v,T){return He(je(p,u.length-v),u,v,T)}o.prototype.write=function(u,p,v,T){if(p===void 0)T="utf8",v=this.length,p=0;else if(v===void 0&&typeof p=="string")T=p,v=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(v)?(v=v>>>0,T===void 0&&(T="utf8")):(T=v,v=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-p;if((v===void 0||v>L)&&(v=L),u.length>0&&(v<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var B=!1;;)switch(T){case"hex":return ht(this,u,p,v);case"utf8":case"utf-8":return j(this,u,p,v);case"ascii":case"latin1":case"binary":return pe(this,u,p,v);case"base64":return te(this,u,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,u,p,v);default:if(B)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),B=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ae(u,p,v){return p===0&&v===u.length?Xy.fromByteArray(u):Xy.fromByteArray(u.slice(p,v))}function dt(u,p,v){v=Math.min(u.length,v);for(var T=[],L=p;L<v;){var B=u[L],Q=null,rt=B>239?4:B>223?3:B>191?2:1;if(L+rt<=v){var Ke,Le,pt,ee;switch(rt){case 1:B<128&&(Q=B);break;case 2:Ke=u[L+1],(Ke&192)===128&&(ee=(B&31)<<6|Ke&63,ee>127&&(Q=ee));break;case 3:Ke=u[L+1],Le=u[L+2],(Ke&192)===128&&(Le&192)===128&&(ee=(B&15)<<12|(Ke&63)<<6|Le&63,ee>2047&&(ee<55296||ee>57343)&&(Q=ee));break;case 4:Ke=u[L+1],Le=u[L+2],pt=u[L+3],(Ke&192)===128&&(Le&192)===128&&(pt&192)===128&&(ee=(B&15)<<18|(Ke&63)<<12|(Le&63)<<6|pt&63,ee>65535&&ee<1114112&&(Q=ee))}}Q===null?(Q=65533,rt=1):Q>65535&&(Q-=65536,T.push(Q>>>10&1023|55296),Q=56320|Q&1023),T.push(Q),L+=rt}return _(T)}var ut=4096;function _(u){var p=u.length;if(p<=ut)return String.fromCharCode.apply(String,u);for(var v="",T=0;T<p;)v+=String.fromCharCode.apply(String,u.slice(T,T+=ut));return v}function Gt(u,p,v){var T="";v=Math.min(u.length,v);for(var L=p;L<v;++L)T+=String.fromCharCode(u[L]&127);return T}function Ze(u,p,v){var T="";v=Math.min(u.length,v);for(var L=p;L<v;++L)T+=String.fromCharCode(u[L]);return T}function Zt(u,p,v){var T=u.length;(!p||p<0)&&(p=0),(!v||v<0||v>T)&&(v=T);for(var L="",B=p;B<v;++B)L+=ke[u[B]];return L}function Se(u,p,v){for(var T=u.slice(p,v),L="",B=0;B<T.length-1;B+=2)L+=String.fromCharCode(T[B]+T[B+1]*256);return L}o.prototype.slice=function(u,p){var v=this.length;u=~~u,p=p===void 0?v:~~p,u<0?(u+=v,u<0&&(u=0)):u>v&&(u=v),p<0?(p+=v,p<0&&(p=0)):p>v&&(p=v),p<u&&(p=u);var T=this.subarray(u,p);return Object.setPrototypeOf(T,o.prototype),T};function D(u,p,v){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+p>v)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=this[u],L=1,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return T},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=this[u+--p],L=1;p>0&&(L*=256);)T+=this[u+--p]*L;return T},o.prototype.readUint8=o.prototype.readUInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},o.prototype.readIntLE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=this[u],L=1,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return L*=128,T>=L&&(T-=Math.pow(2,8*p)),T},o.prototype.readIntBE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=p,L=1,B=this[u+--T];T>0&&(L*=256);)B+=this[u+--T]*L;return L*=128,B>=L&&(B-=Math.pow(2,8*p)),B},o.prototype.readInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},o.prototype.readInt16LE=function(u,p){u=u>>>0,p||D(u,2,this.length);var v=this[u]|this[u+1]<<8;return v&32768?v|4294901760:v},o.prototype.readInt16BE=function(u,p){u=u>>>0,p||D(u,2,this.length);var v=this[u+1]|this[u]<<8;return v&32768?v|4294901760:v},o.prototype.readInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},o.prototype.readInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},o.prototype.readFloatLE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Ma.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Ma.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ma.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ma.read(this,u,!1,52,8)};function x(u,p,v,T,L,B){if(!o.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>L||p<B)throw new RangeError('"value" argument is out of bounds');if(v+T>u.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,p,v,T){if(u=+u,p=p>>>0,v=v>>>0,!T){var L=Math.pow(2,8*v)-1;x(this,u,p,v,L,0)}var B=1,Q=0;for(this[p]=u&255;++Q<v&&(B*=256);)this[p+Q]=u/B&255;return p+v},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,p,v,T){if(u=+u,p=p>>>0,v=v>>>0,!T){var L=Math.pow(2,8*v)-1;x(this,u,p,v,L,0)}var B=v-1,Q=1;for(this[p+B]=u&255;--B>=0&&(Q*=256);)this[p+B]=u/Q&255;return p+v},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,1,255,0),this[p]=u&255,p+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,65535,0),this[p]=u&255,this[p+1]=u>>>8,p+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,65535,0),this[p]=u>>>8,this[p+1]=u&255,p+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,4294967295,0),this[p+3]=u>>>24,this[p+2]=u>>>16,this[p+1]=u>>>8,this[p]=u&255,p+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,4294967295,0),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4},o.prototype.writeIntLE=function(u,p,v,T){if(u=+u,p=p>>>0,!T){var L=Math.pow(2,8*v-1);x(this,u,p,v,L-1,-L)}var B=0,Q=1,rt=0;for(this[p]=u&255;++B<v&&(Q*=256);)u<0&&rt===0&&this[p+B-1]!==0&&(rt=1),this[p+B]=(u/Q>>0)-rt&255;return p+v},o.prototype.writeIntBE=function(u,p,v,T){if(u=+u,p=p>>>0,!T){var L=Math.pow(2,8*v-1);x(this,u,p,v,L-1,-L)}var B=v-1,Q=1,rt=0;for(this[p+B]=u&255;--B>=0&&(Q*=256);)u<0&&rt===0&&this[p+B+1]!==0&&(rt=1),this[p+B]=(u/Q>>0)-rt&255;return p+v},o.prototype.writeInt8=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,1,127,-128),u<0&&(u=255+u+1),this[p]=u&255,p+1},o.prototype.writeInt16LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,32767,-32768),this[p]=u&255,this[p+1]=u>>>8,p+2},o.prototype.writeInt16BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,32767,-32768),this[p]=u>>>8,this[p+1]=u&255,p+2},o.prototype.writeInt32LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,2147483647,-2147483648),this[p]=u&255,this[p+1]=u>>>8,this[p+2]=u>>>16,this[p+3]=u>>>24,p+4},o.prototype.writeInt32BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4};function Z(u,p,v,T,L,B){if(v+T>u.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function ne(u,p,v,T,L){return p=+p,v=v>>>0,L||Z(u,p,v,4),Ma.write(u,p,v,T,23,4),v+4}o.prototype.writeFloatLE=function(u,p,v){return ne(this,u,p,!0,v)},o.prototype.writeFloatBE=function(u,p,v){return ne(this,u,p,!1,v)};function ae(u,p,v,T,L){return p=+p,v=v>>>0,L||Z(u,p,v,8),Ma.write(u,p,v,T,52,8),v+8}o.prototype.writeDoubleLE=function(u,p,v){return ae(this,u,p,!0,v)},o.prototype.writeDoubleBE=function(u,p,v){return ae(this,u,p,!1,v)},o.prototype.copy=function(u,p,v,T){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(v||(v=0),!T&&T!==0&&(T=this.length),p>=u.length&&(p=u.length),p||(p=0),T>0&&T<v&&(T=v),T===v||u.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),u.length-p<T-v&&(T=u.length-p+v);var L=T-v;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(p,v,T):Uint8Array.prototype.set.call(u,this.subarray(v,T),p),L},o.prototype.fill=function(u,p,v,T){if(typeof u=="string"){if(typeof p=="string"?(T=p,p=0,v=this.length):typeof v=="string"&&(T=v,v=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!o.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(u.length===1){var L=u.charCodeAt(0);(T==="utf8"&&L<128||T==="latin1")&&(u=L)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(p<0||this.length<p||this.length<v)throw new RangeError("Out of range index");if(v<=p)return this;p=p>>>0,v=v===void 0?this.length:v>>>0,u||(u=0);var B;if(typeof u=="number")for(B=p;B<v;++B)this[B]=u;else{var Q=o.isBuffer(u)?u:o.from(u,T),rt=Q.length;if(rt===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(B=0;B<v-p;++B)this[B+p]=Q[B%rt]}return this};var _e=/[^+/0-9A-Za-z-_]/g;function ve(u){if(u=u.split("=")[0],u=u.trim().replace(_e,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function ue(u,p){p=p||1/0;for(var v,T=u.length,L=null,B=[],Q=0;Q<T;++Q){if(v=u.charCodeAt(Q),v>55295&&v<57344){if(!L){if(v>56319){(p-=3)>-1&&B.push(239,191,189);continue}else if(Q+1===T){(p-=3)>-1&&B.push(239,191,189);continue}L=v;continue}if(v<56320){(p-=3)>-1&&B.push(239,191,189),L=v;continue}v=(L-55296<<10|v-56320)+65536}else L&&(p-=3)>-1&&B.push(239,191,189);if(L=null,v<128){if((p-=1)<0)break;B.push(v)}else if(v<2048){if((p-=2)<0)break;B.push(v>>6|192,v&63|128)}else if(v<65536){if((p-=3)<0)break;B.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((p-=4)<0)break;B.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return B}function Ce(u){for(var p=[],v=0;v<u.length;++v)p.push(u.charCodeAt(v)&255);return p}function je(u,p){for(var v,T,L,B=[],Q=0;Q<u.length&&!((p-=2)<0);++Q)v=u.charCodeAt(Q),T=v>>8,L=v%256,B.push(L),B.push(T);return B}function kt(u){return Xy.toByteArray(ve(u))}function He(u,p,v,T){for(var L=0;L<T&&!(L+v>=p.length||L>=u.length);++L)p[L+v]=u[L];return L}function tt(u,p){return u instanceof p||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===p.name}function Bt(u){return u!==u}var ke=function(){for(var u="0123456789abcdef",p=new Array(256),v=0;v<16;++v)for(var T=v*16,L=0;L<16;++L)p[T+L]=u[v]+u[L];return p}()}),ct=Uf.Buffer;Uf.SlowBuffer;Uf.INSPECT_MAX_BYTES;Uf.kMaxLength;var n_=function(e,t){return n_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},n_(e,t)};function Hf(e,t){n_(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var vs=function(e){Hf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),Wt=function(e){Hf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function Bf(e){return e&&e.Math==Math&&e}function jI(){return Bf(typeof globalThis=="object"&&globalThis)||Bf(typeof window=="object"&&window)||Bf(typeof self=="object"&&self)||Bf(typeof global=="object"&&global)||Function("return this")()}function JB(){var e=jI();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var QB=function(e){var t=JB()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(t);for(var n=ct.alloc(e),r=0;r<e;++r)n[r]=Math.floor(Math.random()*256);return n},eV=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(ct.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(ct.alloc(t))}:QB}},$I=eV();function tV(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function i_(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function nV(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function rV(e){return Il(e)&&Object.prototype.toString.call(e)==="[object Date]"}function Il(e){return typeof e=="object"&&e!==null}function jf(e,t){var n=!1;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return n||(console.warn(t),n=!0),e.apply(this,i)}return r}function Vf(e){if(ArrayBuffer.isView(e))return ct.from(e.buffer,e.byteOffset,e.byteLength);if(tV(e))return ct.from(e);throw new Wt("Must use either Buffer or TypedArray")}var iV=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,WI=function(e){return typeof e=="string"&&iV.test(e)},r_=function(e){if(!WI(e))throw new Wt('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return ct.from(t,"hex")},II=function(e,t){return t===void 0&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},rK=Math.pow(2,63)-1,iK=-Math.pow(2,63),oV=Math.pow(2,53),sV=-Math.pow(2,53),GI=4,ys=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(t!=null&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!(t instanceof ArrayBuffer)&&!Array.isArray(t))throw new Wt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??e.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=ct.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=ct.from(t,"binary"):Array.isArray(t)?this.buffer=ct.from(t):this.buffer=Vf(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new Wt("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new Wt("only accepts single character Uint8Array or Array");var n;if(typeof t=="string"?n=t.charCodeAt(0):typeof t=="number"?n=t:n=t[0],n<0||n>255)throw new Wt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=ct.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},e.prototype.write=function(t,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+t.length){var r=ct.alloc(this.buffer.length+t.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(t)?(this.buffer.set(Vf(t),n),this.position=n+t.byteLength>this.position?n+t.length:this.position):typeof t=="string"&&(this.buffer.write(t,n,t.length,"binary"),this.position=n+t.length>this.position?n+t.length:this.position)},e.prototype.read=function(t,n){return n=n&&n>0?n:this.position,this.buffer.slice(t,t+n)},e.prototype.value=function(t){return t=!!t,t&&this.buffer.length===this.position?this.buffer:t?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(t){return this.buffer.toString(t)},e.prototype.toExtendedJSON=function(t){t=t||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new TI(this.buffer.slice(0,this.position));throw new vs('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){n=n||{};var r,i;if("$binary"in t?n.legacy&&typeof t.$binary=="string"&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,r=ct.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=ct.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=r_(t.$uuid)),!r)throw new Wt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===GI?new TI(r):new e(r,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.value(!0);return'new Binary(Buffer.from("'.concat(t.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(ys.prototype,"_bsontype",{value:"Binary"});var Jy=16,TI=function(e){Hf(t,e);function t(n){var r=this,i,s;if(n==null)i=t.generate();else if(n instanceof t)i=ct.from(n.buffer),s=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===Jy)i=Vf(n);else if(typeof n=="string")i=r_(n);else throw new Wt("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=e.call(this,i,GI)||this,r.__id=s,r}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,t.cacheHexString&&(this.__id=II(n))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(n){if(n===void 0&&(n=!0),t.cacheHexString&&this.__id)return this.__id;var r=II(this.id,n);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(n){if(!n)return!1;if(n instanceof t)return n.id.equals(this.id);try{return new t(n).id.equals(this.id)}catch{return!1}},t.prototype.toBinary=function(){return new ys(this.id,ys.SUBTYPE_UUID)},t.generate=function(){var n=$I(Jy);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,ct.from(n)},t.isValid=function(n){return n?n instanceof t?!0:typeof n=="string"?WI(n):i_(n)?n.length!==Jy?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},t.createFromHexString=function(n){var r=r_(n);return new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(ys),$f=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toJSON();return'new Code("'.concat(String(t.code),'"').concat(t.scope?", ".concat(JSON.stringify(t.scope)):"",")")},e}();Object.defineProperty($f.prototype,"_bsontype",{value:"Code"});function aV(e){return Il(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var Sl=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var s=t.split(".");s.length===2&&(r=s.shift(),t=s.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(t){this.collection=t},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t},e.prototype.toExtendedJSON=function(t){t=t||{};var n={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(t),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(Sl.prototype,"_bsontype",{value:"DBRef"});var wr=void 0;try{wr=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var xI=65536,cV=1<<24,Pa=xI*xI,zI=Pa*Pa,RI=zI/2,NI={},AI={},le=function(){function e(t,n,r){if(t===void 0&&(t=0),!(this instanceof e))return new e(t,n,r);typeof t=="bigint"?Object.assign(this,e.fromBigInt(t,!!n)):typeof t=="string"?Object.assign(this,e.fromString(t,!!n)):(this.low=t|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,i,s;return n?(t>>>=0,(s=0<=t&&t<256)&&(i=AI[t],i)?i:(r=e.fromBits(t,(t|0)<0?-1:0,!0),s&&(AI[t]=r),r)):(t|=0,(s=-128<=t&&t<128)&&(i=NI[t],i)?i:(r=e.fromBits(t,t<0?-1:0,!1),s&&(NI[t]=r),r))},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=zI)return e.MAX_UNSIGNED_VALUE}else{if(t<=-RI)return e.MIN_VALUE;if(t+1>=RI)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%Pa|0,t/Pa|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return e.fromString(t.substring(1),n,r).neg();for(var s=e.fromNumber(Math.pow(r,8)),o=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+l),r);if(l<8){var h=e.fromNumber(Math.pow(r,l));o=o.mul(h).add(e.fromNumber(c))}else o=o.mul(s),o=o.add(e.fromNumber(c))}return o.unsigned=n,o},e.fromBytes=function(t,n,r){return r?e.fromBytesLE(t,n):e.fromBytesBE(t,n)},e.fromBytesLE=function(t,n){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},e.fromBytesBE=function(t,n){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},e.isLong=function(t){return Il(t)&&t.__isLong__===!0},e.fromValue=function(t,n){return typeof t=="number"?e.fromNumber(t,n):typeof t=="string"?e.fromString(t,n):e.fromBits(t.low,t.high,typeof n=="boolean"?n:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,s=this.low&65535,o=t.high>>>16,a=t.high&65535,l=t.low>>>16,c=t.low&65535,h=0,d=0,f=0,g=0;return g+=s+c,f+=g>>>16,g&=65535,f+=i+l,d+=f>>>16,f&=65535,d+=r+a,h+=d>>>16,d&=65535,h+=n+o,h&=65535,e.fromBits(f<<16|g,h<<16|d,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(t){return this.compare(t)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(wr){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?wr.div_u:wr.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,wr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;s=e.UZERO}else{if(this.eq(e.MIN_VALUE)){if(t.eq(e.ONE)||t.eq(e.NEG_ONE))return e.MIN_VALUE;if(t.eq(e.MIN_VALUE))return e.ONE;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),s=r.add(i.div(t)),s)}else if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=e.ZERO}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),c=e.fromNumber(r),h=c.mul(t);h.isNegative()||h.gt(i);)r-=l,c=e.fromNumber(r,this.unsigned),h=c.mul(t);c.isZero()&&(c=e.ONE),s=s.add(c),i=i.sub(h)}return s},e.prototype.div=function(t){return this.divide(t)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},e.prototype.eq=function(t){return this.equals(t)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(t&1<<n)===0;n--);return this.high!==0?n+33:n+1},e.prototype.greaterThan=function(t){return this.comp(t)>0},e.prototype.gt=function(t){return this.greaterThan(t)},e.prototype.greaterThanOrEqual=function(t){return this.comp(t)>=0},e.prototype.gte=function(t){return this.greaterThanOrEqual(t)},e.prototype.ge=function(t){return this.greaterThanOrEqual(t)},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.lessThan=function(t){return this.comp(t)<0},e.prototype.lt=function(t){return this.lessThan(t)},e.prototype.lessThanOrEqual=function(t){return this.comp(t)<=0},e.prototype.lte=function(t){return this.lessThanOrEqual(t)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),wr){var n=(this.unsigned?wr.rem_u:wr.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,wr.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(t){return this.modulo(t)},e.prototype.rem=function(t){return this.modulo(t)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),wr){var n=wr.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,wr.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,s=this.low>>>16,o=this.low&65535,a=t.high>>>16,l=t.high&65535,c=t.low>>>16,h=t.low&65535,d=0,f=0,g=0,m=0;return m+=o*h,g+=m>>>16,m&=65535,g+=s*h,f+=g>>>16,g&=65535,g+=o*c,f+=g>>>16,g&=65535,f+=i*h,d+=f>>>16,f&=65535,f+=s*c,d+=f>>>16,f&=65535,f+=o*l,d+=f>>>16,f&=65535,d+=r*h+i*c+s*l+o*a,d&=65535,e.fromBits(g<<16|m,d<<16|f,this.unsigned)},e.prototype.mul=function(t){return this.multiply(t)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(t){return!this.equals(t)},e.prototype.neq=function(t){return this.notEquals(t)},e.prototype.ne=function(t){return this.notEquals(t)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(t){return this.shiftLeft(t)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(t){return this.shiftRight(t)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(t){return this.shiftRightUnsigned(t)},e.prototype.shru=function(t){return this.shiftRightUnsigned(t)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(t){return this.subtract(t)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*Pa+(this.low>>>0):this.high*Pa+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},e.prototype.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(e.MIN_VALUE)){var n=e.fromNumber(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var s=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,a="";;){var l=o.div(s),c=o.sub(l.mul(s)).toInt()>>>0,h=c.toString(t);if(o=l,o.isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(t){return this.lessThanOrEqual(t)},e.prototype.toExtendedJSON=function(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(cV),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(le.prototype,"__isLong__",{value:!0});Object.defineProperty(le.prototype,"_bsontype",{value:"Long"});var lV=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,uV=/^(\+|-)?(Infinity|inf)$/i,dV=/^(\+|-)?NaN$/i,Cl=6111,Qy=-6176,MI=6176,fV=34,e_=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),OI=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),PI=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),pV=/^([-+])?(\d+)?$/,hV=31,kI=16383,mV=30,gV=31;function LI(e){return!isNaN(parseInt(e,10))}function vV(e){var t=le.fromNumber(1e9),n=le.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new le(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function yV(e,t){if(!e&&!t)return{high:le.fromNumber(0),low:le.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new le(e.getLowBits(),0),i=t.shiftRightUnsigned(32),s=new le(t.getLowBits(),0),o=n.multiply(i),a=n.multiply(s),l=r.multiply(i),c=r.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new le(a.getLowBits(),0).add(l).add(c.shiftRightUnsigned(32)),o=o.add(a.shiftRightUnsigned(32)),c=a.shiftLeft(32).add(new le(c.getLowBits(),0)),{high:o,low:c}}function _V(e,t){var n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){var i=e.low>>>0,s=t.low>>>0;if(i<s)return!0}return!1}function Oa(e,t){throw new Wt('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var o_=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(i_(t)){if(t.byteLength!==16)throw new Wt("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new Wt("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var n=!1,r=!1,i=!1,s=0,o=0,a=0,l=0,c=0,h=[0],d=0,f=0,g=0,m=0,b=0,I=0,A=new le(0,0),F=new le(0,0),V=0,M=0;if(t.length>=7e3)throw new Wt(""+t+" not a valid Decimal128 string");var J=t.match(lV),Ne=t.match(uV),ht=t.match(dV);if(!J&&!Ne&&!ht||t.length===0)throw new Wt(""+t+" not a valid Decimal128 string");if(J){var j=J[2],pe=J[4],te=J[5],de=J[6];pe&&de===void 0&&Oa(t,"missing exponent power"),pe&&j===void 0&&Oa(t,"missing exponent base"),pe===void 0&&(te||de)&&Oa(t,"missing e before exponent")}if((t[M]==="+"||t[M]==="-")&&(n=t[M++]==="-"),!LI(t[M])&&t[M]!=="."){if(t[M]==="i"||t[M]==="I")return new e(ct.from(n?OI:PI));if(t[M]==="N")return new e(ct.from(e_))}for(;LI(t[M])||t[M]===".";){if(t[M]==="."){r&&Oa(t,"contains multiple periods"),r=!0,M=M+1;continue}d<34&&(t[M]!=="0"||i)&&(i||(c=o),i=!0,h[f++]=parseInt(t[M],10),d=d+1),i&&(a=a+1),r&&(l=l+1),o=o+1,M=M+1}if(r&&!o)throw new Wt(""+t+" not a valid Decimal128 string");if(t[M]==="e"||t[M]==="E"){var Ae=t.substr(++M).match(pV);if(!Ae||!Ae[2])return new e(ct.from(e_));b=parseInt(Ae[0],10),M=M+Ae[0].length}if(t[M])return new e(ct.from(e_));if(g=0,!d)g=0,m=0,h[0]=0,a=1,d=1,s=0;else if(m=d-1,s=a,s!==1)for(;h[c+s-1]===0;)s=s-1;for(b<=l&&l-b>16384?b=Qy:b=b-l;b>Cl;){if(m=m+1,m-g>fV){var dt=h.join("");if(dt.match(/^0+$/)){b=Cl;break}Oa(t,"overflow")}b=b-1}for(;b<Qy||d<a;){if(m===0&&s<d){b=Qy,s=0;break}if(d<a?a=a-1:m=m-1,b<Cl)b=b+1;else{var dt=h.join("");if(dt.match(/^0+$/)){b=Cl;break}Oa(t,"overflow")}}if(m-g+1<s){var ut=o;r&&(c=c+1,ut=ut+1),n&&(c=c+1,ut=ut+1);var _=parseInt(t[c+m+1],10),Gt=0;if(_>=5&&(Gt=1,_===5)){for(Gt=h[m]%2===1?1:0,I=c+m+2;I<ut;I++)if(parseInt(t[I],10)){Gt=1;break}}if(Gt){for(var Ze=m;Ze>=0;Ze--)if(++h[Ze]>9&&(h[Ze]=0,Ze===0))if(b<Cl)b=b+1,h[Ze]=1;else return new e(ct.from(n?OI:PI))}}if(A=le.fromNumber(0),F=le.fromNumber(0),s===0)A=le.fromNumber(0),F=le.fromNumber(0);else if(m-g<17){var Ze=g;for(F=le.fromNumber(h[Ze++]),A=new le(0,0);Ze<=m;Ze++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Ze]))}else{var Ze=g;for(A=le.fromNumber(h[Ze++]);Ze<=m-17;Ze++)A=A.multiply(le.fromNumber(10)),A=A.add(le.fromNumber(h[Ze]));for(F=le.fromNumber(h[Ze++]);Ze<=m;Ze++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Ze]))}var Zt=yV(A,le.fromString("100000000000000000"));Zt.low=Zt.low.add(F),_V(Zt.low,F)&&(Zt.high=Zt.high.add(le.fromNumber(1))),V=b+MI;var Se={low:le.fromNumber(0),high:le.fromNumber(0)};Zt.high.shiftRightUnsigned(49).and(le.fromNumber(1)).equals(le.fromNumber(1))?(Se.high=Se.high.or(le.fromNumber(3).shiftLeft(61)),Se.high=Se.high.or(le.fromNumber(V).and(le.fromNumber(16383).shiftLeft(47))),Se.high=Se.high.or(Zt.high.and(le.fromNumber(0x7fffffffffff)))):(Se.high=Se.high.or(le.fromNumber(V&16383).shiftLeft(49)),Se.high=Se.high.or(Zt.high.and(le.fromNumber(562949953421311)))),Se.low=Zt.low,n&&(Se.high=Se.high.or(le.fromString("9223372036854775808")));var D=ct.alloc(16);return M=0,D[M++]=Se.low.low&255,D[M++]=Se.low.low>>8&255,D[M++]=Se.low.low>>16&255,D[M++]=Se.low.low>>24&255,D[M++]=Se.low.high&255,D[M++]=Se.low.high>>8&255,D[M++]=Se.low.high>>16&255,D[M++]=Se.low.high>>24&255,D[M++]=Se.high.low&255,D[M++]=Se.high.low>>8&255,D[M++]=Se.high.low>>16&255,D[M++]=Se.high.low>>24&255,D[M++]=Se.high.high&255,D[M++]=Se.high.high>>8&255,D[M++]=Se.high.high>>16&255,D[M++]=Se.high.high>>24&255,new e(D)},e.prototype.toString=function(){for(var t,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var s=0,o=!1,a,l={parts:[0,0,0,0]},c,h,d=[];s=0;var f=this.bytes,g=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,m=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,b=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,I=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24;s=0;var A={low:new le(g,m),high:new le(b,I)};A.high.lessThan(le.ZERO)&&d.push("-");var F=I>>26&hV;if(F>>3===3){if(F===mV)return d.join("")+"Infinity";if(F===gV)return"NaN";t=I>>15&kI,a=8+(I>>14&1)}else a=I>>14&7,t=I>>17&kI;var V=t-MI;if(l.parts[0]=(I&16383)+((a&15)<<14),l.parts[1]=b,l.parts[2]=m,l.parts[3]=g,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)o=!0;else for(h=3;h>=0;h--){var M=0,J=vV(l);if(l=J.quotient,M=J.rem.low,!!M)for(c=8;c>=0;c--)r[h*9+c]=M%10,M=Math.floor(M/10)}if(o)n=1,r[s]=0;else for(n=36;!r[s];)n=n-1,s=s+1;var Ne=n-1+V;if(Ne>=34||Ne<=-7||V>0){if(n>34)return d.push("".concat(0)),V>0?d.push("E+".concat(V)):V<0&&d.push("E".concat(V)),d.join("");d.push("".concat(r[s++])),n=n-1,n&&d.push(".");for(var i=0;i<n;i++)d.push("".concat(r[s++]));d.push("E"),Ne>0?d.push("+".concat(Ne)):d.push("".concat(Ne))}else if(V>=0)for(var i=0;i<n;i++)d.push("".concat(r[s++]));else{var ht=n+V;if(ht>0)for(var i=0;i<ht;i++)d.push("".concat(r[s++]));else d.push("0");for(d.push(".");ht++<0;)d.push("0");for(var i=0;i<n-Math.max(ht-1,0);i++)d.push("".concat(r[s++]))}return d.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(o_.prototype,"_bsontype",{value:"Decimal128"});var Wf=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toExtendedJSON=function(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,n){var r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toExtendedJSON();return"new Double(".concat(t.$numberDouble,")")},e}();Object.defineProperty(Wf.prototype,"_bsontype",{value:"Double"});var Gf=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t|0}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Gf.prototype,"_bsontype",{value:"Int32"});var s_=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(s_.prototype,"_bsontype",{value:"MaxKey"});var a_=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(a_.prototype,"_bsontype",{value:"MinKey"});var EV=new RegExp("^[0-9a-fA-F]{24}$"),gs=null,mi=Symbol("id"),on=function(){function e(t){if(!(this instanceof e))return new e(t);var n;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new Wt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=ct.from(t.toHexString(),"hex"):n=t.id}else n=t;if(n==null||typeof n=="number")this[mi]=e.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[mi]=n instanceof ct?n:Vf(n);else if(typeof n=="string")if(n.length===12){var r=ct.from(n);if(r.byteLength===12)this[mi]=r;else throw new Wt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&EV.test(n))this[mi]=ct.from(n,"hex");else throw new Wt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Wt("Argument passed in does not match the accepted types");e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[mi]},set:function(t){this[mi]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(t){this.id.writeUInt32BE(t,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));var n=e.getInc(),r=ct.alloc(12);return r.writeUInt32BE(t,0),gs===null&&(gs=$I(5)),r[4]=gs[0],r[5]=gs[1],r[6]=gs[2],r[7]=gs[3],r[8]=gs[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},e.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(t==null)return!1;if(t instanceof e)return this[mi][11]===t[mi][11]&&this[mi].equals(t[mi]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&i_(this.id))return t===ct.prototype.toString.call(this.id,"latin1");if(typeof t=="string"&&e.isValid(t)&&t.length===24)return t.toLowerCase()===this.toHexString();if(typeof t=="string"&&e.isValid(t)&&t.length===12)return ct.from(t).equals(this.id);if(typeof t=="object"&&"toHexString"in t&&typeof t.toHexString=="function"){var n=t.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},e.prototype.getTimestamp=function(){var t=new Date,n=this.id.readUInt32BE(0);return t.setTime(Math.floor(n)*1e3),t},e.createPk=function(){return new e},e.createFromTime=function(t){var n=ct.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new Wt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(ct.from(t,"hex"))},e.isValid=function(t){if(t==null)return!1;try{return new e(t),!0}catch{return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(Math.random()*16777215),e}();Object.defineProperty(on.prototype,"generate",{value:jf(function(e){return on.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(on.prototype,"getInc",{value:jf(function(){return on.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(on.prototype,"get_inc",{value:jf(function(){return on.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(on,"get_inc",{value:jf(function(){return on.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(on.prototype,"_bsontype",{value:"ObjectID"});function wV(e){return e.split("").sort().join("")}var Dl=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=wV(n??""),this.pattern.indexOf("\0")!==-1)throw new vs("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new vs("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new vs("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(t){return t?t.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new e(t.$regex,e.parseOptions(t.$options));if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new Wt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(Dl.prototype,"_bsontype",{value:"BSONRegExp"});var c_=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(c_.prototype,"_bsontype",{value:"Symbol"});var bV=le,qI=function(e){Hf(t,e);function t(n,r){var i=this;return i instanceof t?(le.isLong(n)?i=e.call(this,n.low,n.high,!0)||this:Il(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=e.call(this,n.i,n.t,!0)||this:i=e.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(n,r)}return t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(n){return new t(le.fromInt(n,!0))},t.fromNumber=function(n){return new t(le.fromNumber(n,!0))},t.fromBits=function(n,r){return new t(n,r)},t.fromString=function(n,r){return new t(le.fromString(n,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(n){return new t(n.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=le.MAX_UNSIGNED_VALUE,t}(bV);function CV(e){return Il(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var YI=2147483647,KI=-2147483648,ZI=9223372036854776e3,XI=-9223372036854776e3,SV={$oid:on,$binary:ys,$uuid:ys,$symbol:c_,$numberInt:Gf,$numberDecimal:o_,$numberDouble:Wf,$numberLong:le,$minKey:a_,$maxKey:s_,$regex:Dl,$regularExpression:Dl,$timestamp:qI};function JI(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=KI&&e<=YI)return new Gf(e);if(e>=XI&&e<=ZI)return le.fromNumber(e)}return new Wf(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter(function(d){return d.startsWith("$")&&e[d]!=null}),r=0;r<n.length;r++){var i=SV[n[r]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var s=e.$date,o=new Date;return t.legacy?typeof s=="number"?o.setTime(s):typeof s=="string"&&o.setTime(Date.parse(s)):typeof s=="string"?o.setTime(Date.parse(s)):le.isLong(s)?o.setTime(s.toNumber()):typeof s=="number"&&t.relaxed&&o.setTime(s),o}if(e.$code!=null){var a=Object.assign({},e);return e.$scope&&(a.$scope=JI(e.$scope)),$f.fromExtendedJSON(e)}if(aV(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(l instanceof Sl)return l;var c=Object.keys(l).filter(function(d){return d.startsWith("$")}),h=!0;if(c.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(h=!1)}),h)return Sl.fromExtendedJSON(l)}return e}function DV(e,t){return e.map(function(n,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return vo(n,t)}finally{t.seenObjects.pop()}})}function FI(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function vo(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var n=t.seenObjects.findIndex(function(A){return A.obj===e});if(n!==-1){var r=t.seenObjects.map(function(A){return A.propertyName}),i=r.slice(0,n).map(function(A){return"".concat(A," -> ")}).join(""),s=r[n],o=" -> "+r.slice(n+1,r.length-1).map(function(A){return"".concat(A," -> ")}).join(""),a=r[r.length-1],l=" ".repeat(i.length+s.length/2),c="-".repeat(o.length+(s.length+a.length)/2-1);throw new Wt(`Converting circular structure to EJSON:
|
|
42
42
|
`+" ".concat(i).concat(s).concat(o).concat(a,`
|
|
43
|
-
`)+" ".concat(l,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return DV(e,t);if(e===void 0)return null;if(e instanceof Date||rV(e)){var h=e.getTime(),d=h>-1&&h<2534023188e5;return t.legacy?t.relaxed&&d?{$date:e.getTime()}:{$date:FI(e)}:t.relaxed&&d?{$date:FI(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var f=e>=KI&&e<=YI,g=e>=XI&&e<=ZI;if(f)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||nV(e)){var m=e.flags;if(m===void 0){var b=e.toString().match(/[gimuy]*$/);b&&(m=b[0])}var I=new Dl(e.source,m);return I.toExtendedJSON(t)}return e!=null&&typeof e=="object"?TV(e,t):e}var IV={Binary:function(e){return new ys(e.value(),e.sub_type)},Code:function(e){return new $f(e.code,e.scope)},DBRef:function(e){return new Sl(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new o_(e.bytes)},Double:function(e){return new Wf(e.value)},Int32:function(e){return new Gf(e.value)},Long:function(e){return le.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new s_},MinKey:function(){return new a_},ObjectID:function(e){return new on(e)},ObjectId:function(e){return new on(e)},BSONRegExp:function(e){return new Dl(e.pattern,e.options)},Symbol:function(e){return new c_(e.value)},Timestamp:function(e){return qI.fromBits(e.low,e.high)}};function TV(e,t){if(e==null||typeof e!="object")throw new vs("not an object instance");var n=e._bsontype;if(typeof n>"u"){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var s=vo(e[i],t);i==="__proto__"?Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):r[i]=s}finally{t.seenObjects.pop()}}return r}else if(CV(e)){var o=e;if(typeof o.toExtendedJSON!="function"){var a=IV[e._bsontype];if(!a)throw new $t("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return n==="Code"&&o.scope?o=new $f(o.code,vo(o.scope,t)):n==="DBRef"&&o.oid&&(o=new Sl(vo(o.collection,t),vo(o.oid,t),vo(o.db,t),vo(o.fields,t))),o.toExtendedJSON(t)}else throw new vs("_bsontype must be a string, but was: "+typeof n)}var BI;(function(e){function t(s,o){var a=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(s,function(l,c){if(l.indexOf("\0")!==-1)throw new vs("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return JI(c,a)})}e.parse=t;function n(s,o,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(l=o,o=void 0,a=0);var c=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),h=vo(s,c);return JSON.stringify(h,o,a)}e.stringify=n;function r(s,o){return o=o||{},JSON.parse(n(s,o))}e.serialize=r;function i(s,o){return o=o||{},t(JSON.stringify(s),o)}e.deserialize=i})(BI||(BI={}));var VI,UI=jI();UI.Map?VI=UI.Map:VI=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var n=0;n<t.length;n++)if(t[n]!=null){var r=t[n],i=r[0],s=r[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var n=this._values[t];return n==null?!1:(delete this._values[t],this._keys.splice(n.i,1),!0)},e.prototype.entries=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?[r,t._values[r].v]:void 0,done:r===void 0}}}},e.prototype.forEach=function(t,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];t.call(n,this._values[i].v,i,n)}},e.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},e.prototype.has=function(t){return this._values[t]!=null},e.prototype.keys=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},e.prototype.set=function(t,n){return this._values[t]?(this._values[t].v=n,this):(this._keys.push(t),this._values[t]={v:n,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?t._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var rK=le.fromNumber(oV),iK=le.fromNumber(sV),t_=new Uint8Array(8),oK=new DataView(t_.buffer,t_.byteOffset,t_.byteLength),xV=1024*1024*17,sK=ct.alloc(xV),ka=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}},Pe=class{constructor(e,t={},n,r){this.name=e,this.properties=t,this.id=r?new on(r):new on,this.occurred=new Date,n&&(this.trigger=new ka(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},Tl=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},La=class extends Tl{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,n,r,i){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.projectableNodes=i}},Fa=class extends Tl{templateRef;viewContainerRef;context;injector;constructor(e,t,n,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}},l_=class extends Tl{element;constructor(e){super(),this.element=e instanceof Nt?e.nativeElement:e}},Ba=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof La)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Fa)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof l_)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},zf=class extends Ba{outletElement;_appRef;_defaultInjector;_document;constructor(e,t,n,r,i){super(),this.outletElement=e,this._appRef=n,this._defaultInjector=r,this._document=i}attachComponentPortal(e){let t;if(e.viewContainerRef){let n=e.injector||e.viewContainerRef.injector,r=n.get(Oi,null,{optional:!0})||void 0;t=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>t.destroy())}else{let n=this._appRef,r=e.injector||this._defaultInjector||yt.NULL,i=r.get(Wn,n.injector);t=Bd(e.component,{elementInjector:r,environmentInjector:i,projectableNodes:e.projectableNodes||void 0}),n.attachView(t.hostView),this.setDisposeFn(()=>{n.viewCount>0&&n.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=e,t}attachTemplatePortal(e){let t=e.viewContainerRef,n=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);r!==-1&&t.remove(r)}),this._attachedPortal=e,n}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");t.parentNode.insertBefore(n,t),this.outletElement.appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},u_=(()=>{class e extends Ba{_moduleRef=O(Oi,{optional:!0});_document=O(nt);_viewContainerRef=O(ni);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new We;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(n){return new(n||e)};static \u0275dir=Or({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ri]})}return e})();function qf(e){return e.buttons===0||e.detail===0}function Yf(e){let t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var d_;function RV(){if(d_==null){let e=typeof document<"u"?document.head:null;d_=!!(e&&(e.createShadowRoot||e.attachShadow))}return d_}function Va(e){if(RV()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Kf(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}function zn(e){return e.composedPath?e.composedPath()[0]:e.target}function Cn(e,t,n,r,i){let s=parseInt(dv.major),o=parseInt(dv.minor);return s>19||s===19&&o>0||s===0&&o===0?e.listen(t,n,r,i):(t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)})}var f_;try{f_=typeof Intl<"u"&&Intl.v8BreakIterator}catch{f_=!1}var qn=(()=>{class e{_platformId=O(Ko);isBrowser=this._platformId?cS(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||f_)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xl;function NV(){if(xl==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>xl=!0}))}finally{xl=xl||!1}return xl}function QI(e){return NV()?e:!!e.capture}function p_(e,t=0){return AV(e)?Number(e):arguments.length===2?t:0}function AV(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Yn(e){return e instanceof Nt?e.nativeElement:e}var MV=new he("cdk-input-modality-detector-options"),OV={ignoreKeys:[18,17,224,91,16]},eT=650,h_={passive:!0,capture:!0},PV=(()=>{class e{_platform=O(qn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Ir(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=zn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<eT||(this._modality.next(qf(n)?"keyboard":"mouse"),this._mostRecentTarget=zn(n))};_onTouchstart=n=>{if(Yf(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=zn(n)};constructor(){let n=O(Be),r=O(nt),i=O(MV,{optional:!0});if(this._options=w(w({},OV),i),this.modalityDetected=this._modality.pipe(Qh(1)),this.modalityChanged=this.modalityDetected.pipe(Vu()),this._platform.isBrowser){let s=O(ln).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Cn(s,r,"keydown",this._onKeydown,h_),Cn(s,r,"mousedown",this._onMousedown,h_),Cn(s,r,"touchstart",this._onTouchstart,h_)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Xf=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(Xf||{}),kV=new he("cdk-focus-monitor-default-options"),Zf=QI({passive:!0,capture:!0}),tT=(()=>{class e{_ngZone=O(Be);_platform=O(qn);_inputModalityDetector=O(PV);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=O(nt,{optional:!0});_stopInputModalityDetector=new ie;constructor(){let n=O(kV,{optional:!0});this._detectionMode=n?.detectionMode||Xf.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=zn(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=Yn(n);if(!this._platform.isBrowser||i.nodeType!==1)return ko();let s=Va(i)||this._getDocument(),o=this._elementInfo.get(i);if(o)return r&&(o.checkChildren=!0),o.subject;let a={checkChildren:r,subject:new ie,rootNode:s};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=Yn(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let s=Yn(n),o=this._getDocument().activeElement;s===o?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,r,l)):(this._setOrigin(r),typeof s.focus=="function"&&s.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===Xf.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===Xf.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?eT:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),s=zn(n);!i||!i.checkChildren&&r!==s||this._originChanged(r,this._getFocusOrigin(s),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,Zf),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Zf)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Gr(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Zf),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Zf),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,s)=>{(s===n||i.checkChildren&&s.contains(n))&&r.push([s,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let o=0;o<s.length;o++)if(s[o].contains(r))return!0}return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Jf=new WeakMap,_s=(()=>{class e{_appRef;_injector=O(yt);_environmentInjector=O(Wn);load(n){let r=this._appRef=this._appRef||this._injector.get(dr),i=Jf.get(r);i||(i={loaders:new Set,refs:[]},Jf.set(r,i),r.onDestroy(()=>{Jf.get(r)?.refs.forEach(s=>s.destroy()),Jf.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(Bd(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),nT=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=at({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
|
|
43
|
+
`)+" ".concat(l,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return DV(e,t);if(e===void 0)return null;if(e instanceof Date||rV(e)){var h=e.getTime(),d=h>-1&&h<2534023188e5;return t.legacy?t.relaxed&&d?{$date:e.getTime()}:{$date:FI(e)}:t.relaxed&&d?{$date:FI(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var f=e>=KI&&e<=YI,g=e>=XI&&e<=ZI;if(f)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||nV(e)){var m=e.flags;if(m===void 0){var b=e.toString().match(/[gimuy]*$/);b&&(m=b[0])}var I=new Dl(e.source,m);return I.toExtendedJSON(t)}return e!=null&&typeof e=="object"?TV(e,t):e}var IV={Binary:function(e){return new ys(e.value(),e.sub_type)},Code:function(e){return new $f(e.code,e.scope)},DBRef:function(e){return new Sl(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new o_(e.bytes)},Double:function(e){return new Wf(e.value)},Int32:function(e){return new Gf(e.value)},Long:function(e){return le.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new s_},MinKey:function(){return new a_},ObjectID:function(e){return new on(e)},ObjectId:function(e){return new on(e)},BSONRegExp:function(e){return new Dl(e.pattern,e.options)},Symbol:function(e){return new c_(e.value)},Timestamp:function(e){return qI.fromBits(e.low,e.high)}};function TV(e,t){if(e==null||typeof e!="object")throw new vs("not an object instance");var n=e._bsontype;if(typeof n>"u"){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var s=vo(e[i],t);i==="__proto__"?Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):r[i]=s}finally{t.seenObjects.pop()}}return r}else if(CV(e)){var o=e;if(typeof o.toExtendedJSON!="function"){var a=IV[e._bsontype];if(!a)throw new Wt("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return n==="Code"&&o.scope?o=new $f(o.code,vo(o.scope,t)):n==="DBRef"&&o.oid&&(o=new Sl(vo(o.collection,t),vo(o.oid,t),vo(o.db,t),vo(o.fields,t))),o.toExtendedJSON(t)}else throw new vs("_bsontype must be a string, but was: "+typeof n)}var BI;(function(e){function t(s,o){var a=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(s,function(l,c){if(l.indexOf("\0")!==-1)throw new vs("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return JI(c,a)})}e.parse=t;function n(s,o,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(l=o,o=void 0,a=0);var c=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),h=vo(s,c);return JSON.stringify(h,o,a)}e.stringify=n;function r(s,o){return o=o||{},JSON.parse(n(s,o))}e.serialize=r;function i(s,o){return o=o||{},t(JSON.stringify(s),o)}e.deserialize=i})(BI||(BI={}));var VI,UI=jI();UI.Map?VI=UI.Map:VI=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var n=0;n<t.length;n++)if(t[n]!=null){var r=t[n],i=r[0],s=r[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var n=this._values[t];return n==null?!1:(delete this._values[t],this._keys.splice(n.i,1),!0)},e.prototype.entries=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?[r,t._values[r].v]:void 0,done:r===void 0}}}},e.prototype.forEach=function(t,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];t.call(n,this._values[i].v,i,n)}},e.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},e.prototype.has=function(t){return this._values[t]!=null},e.prototype.keys=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},e.prototype.set=function(t,n){return this._values[t]?(this._values[t].v=n,this):(this._keys.push(t),this._values[t]={v:n,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?t._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var oK=le.fromNumber(oV),sK=le.fromNumber(sV),t_=new Uint8Array(8),aK=new DataView(t_.buffer,t_.byteOffset,t_.byteLength),xV=1024*1024*17,cK=ct.alloc(xV),ka=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}},Pe=class{constructor(e,t={},n,r){this.name=e,this.properties=t,this.id=r?new on(r):new on,this.occurred=new Date,n&&(this.trigger=new ka(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},Tl=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},La=class extends Tl{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,n,r,i){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.projectableNodes=i}},Fa=class extends Tl{templateRef;viewContainerRef;context;injector;constructor(e,t,n,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}},l_=class extends Tl{element;constructor(e){super(),this.element=e instanceof Nt?e.nativeElement:e}},Ba=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof La)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Fa)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof l_)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},zf=class extends Ba{outletElement;_appRef;_defaultInjector;_document;constructor(e,t,n,r,i){super(),this.outletElement=e,this._appRef=n,this._defaultInjector=r,this._document=i}attachComponentPortal(e){let t;if(e.viewContainerRef){let n=e.injector||e.viewContainerRef.injector,r=n.get(Oi,null,{optional:!0})||void 0;t=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>t.destroy())}else{let n=this._appRef,r=e.injector||this._defaultInjector||yt.NULL,i=r.get(Wn,n.injector);t=Bd(e.component,{elementInjector:r,environmentInjector:i,projectableNodes:e.projectableNodes||void 0}),n.attachView(t.hostView),this.setDisposeFn(()=>{n.viewCount>0&&n.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=e,t}attachTemplatePortal(e){let t=e.viewContainerRef,n=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);r!==-1&&t.remove(r)}),this._attachedPortal=e,n}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");t.parentNode.insertBefore(n,t),this.outletElement.appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},u_=(()=>{class e extends Ba{_moduleRef=O(Oi,{optional:!0});_document=O(nt);_viewContainerRef=O(ni);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new We;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(n){return new(n||e)};static \u0275dir=kr({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ri]})}return e})();function qf(e){return e.buttons===0||e.detail===0}function Yf(e){let t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var d_;function RV(){if(d_==null){let e=typeof document<"u"?document.head:null;d_=!!(e&&(e.createShadowRoot||e.attachShadow))}return d_}function Va(e){if(RV()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Kf(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}function zn(e){return e.composedPath?e.composedPath()[0]:e.target}function Cn(e,t,n,r,i){let s=parseInt(dv.major),o=parseInt(dv.minor);return s>19||s===19&&o>0||s===0&&o===0?e.listen(t,n,r,i):(t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)})}var f_;try{f_=typeof Intl<"u"&&Intl.v8BreakIterator}catch{f_=!1}var qn=(()=>{class e{_platformId=O(Ko);isBrowser=this._platformId?cS(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||f_)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xl;function NV(){if(xl==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>xl=!0}))}finally{xl=xl||!1}return xl}function QI(e){return NV()?e:!!e.capture}function p_(e,t=0){return AV(e)?Number(e):arguments.length===2?t:0}function AV(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Yn(e){return e instanceof Nt?e.nativeElement:e}var MV=new he("cdk-input-modality-detector-options"),OV={ignoreKeys:[18,17,224,91,16]},eT=650,h_={passive:!0,capture:!0},PV=(()=>{class e{_platform=O(qn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new xr(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=zn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<eT||(this._modality.next(qf(n)?"keyboard":"mouse"),this._mostRecentTarget=zn(n))};_onTouchstart=n=>{if(Yf(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=zn(n)};constructor(){let n=O(Be),r=O(nt),i=O(MV,{optional:!0});if(this._options=w(w({},OV),i),this.modalityDetected=this._modality.pipe(Qh(1)),this.modalityChanged=this.modalityDetected.pipe(Vu()),this._platform.isBrowser){let s=O(ln).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Cn(s,r,"keydown",this._onKeydown,h_),Cn(s,r,"mousedown",this._onMousedown,h_),Cn(s,r,"touchstart",this._onTouchstart,h_)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Xf=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(Xf||{}),kV=new he("cdk-focus-monitor-default-options"),Zf=QI({passive:!0,capture:!0}),tT=(()=>{class e{_ngZone=O(Be);_platform=O(qn);_inputModalityDetector=O(PV);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=O(nt,{optional:!0});_stopInputModalityDetector=new ie;constructor(){let n=O(kV,{optional:!0});this._detectionMode=n?.detectionMode||Xf.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=zn(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=Yn(n);if(!this._platform.isBrowser||i.nodeType!==1)return ko();let s=Va(i)||this._getDocument(),o=this._elementInfo.get(i);if(o)return r&&(o.checkChildren=!0),o.subject;let a={checkChildren:r,subject:new ie,rootNode:s};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=Yn(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let s=Yn(n),o=this._getDocument().activeElement;s===o?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,r,l)):(this._setOrigin(r),typeof s.focus=="function"&&s.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===Xf.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===Xf.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?eT:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),s=zn(n);!i||!i.checkChildren&&r!==s||this._originChanged(r,this._getFocusOrigin(s),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,Zf),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Zf)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Gr(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Zf),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Zf),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,s)=>{(s===n||i.checkChildren&&s.contains(n))&&r.push([s,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let o=0;o<s.length;o++)if(s[o].contains(r))return!0}return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Jf=new WeakMap,_s=(()=>{class e{_appRef;_injector=O(yt);_environmentInjector=O(Wn);load(n){let r=this._appRef=this._appRef||this._injector.get(fr),i=Jf.get(r);i||(i={loaders:new Set,refs:[]},Jf.set(r,i),r.onDestroy(()=>{Jf.get(r)?.refs.forEach(s=>s.destroy()),Jf.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(Bd(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),nT=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=at({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
|
|
44
44
|
`],encapsulation:2,changeDetection:0})}return e})();function m_(e){return Array.isArray(e)?e:[e]}var v_=(()=>{class e{_platform=O(qn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return FV(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=LV(GV(n));if(r&&(rT(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),s=rT(n);return n.hasAttribute("contenteditable")?s!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!$V(n)?!1:i==="audio"?n.hasAttribute("controls")?s!==-1:!1:i==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return WV(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function LV(e){try{return e.frameElement}catch{return null}}function FV(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function BV(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function VV(e){return HV(e)&&e.type=="hidden"}function UV(e){return jV(e)&&e.hasAttribute("href")}function HV(e){return e.nodeName.toLowerCase()=="input"}function jV(e){return e.nodeName.toLowerCase()=="a"}function iT(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function rT(e){if(!iT(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function $V(e){let t=e.nodeName.toLowerCase(),n=t==="input"&&e.type;return n==="text"||n==="password"||t==="select"||t==="textarea"}function WV(e){return VV(e)?!1:BV(e)||UV(e)||e.hasAttribute("contenteditable")||iT(e)}function GV(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var g_=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,t,n,r,i=!1,s){this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._injector=s,i||this.attachAnchors()}destroy(){let e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let n=this._getFirstTabbableElement(t);return n?.focus(e),!!n}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){let t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=0;n<t.length;n++){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[n]):null;if(r)return r}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=t.length-1;n>=0;n--){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?Qr(e,{injector:this._injector}):setTimeout(e)}},oT=(()=>{class e{_checker=O(v_);_ngZone=O(Be);_document=O(nt);_injector=O(yt);constructor(){O(_s).load(nT)}create(n,r=!1){return new g_(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function y_(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function Yt(e){return e==null?"":typeof e=="string"?e:`${e}px`}var zV=new he("cdk-dir-doc",{providedIn:"root",factory:qV});function qV(){return O(nt)}var YV=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function KV(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?YV.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Es=(()=>{class e{value="ltr";change=new We;constructor(){let n=O(zV,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=KV(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ws;function sT(){if(ws==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return ws=!1,ws;if("scrollBehavior"in document.documentElement.style)ws=!0;else{let e=Element.prototype.scrollTo;e?ws=!/\{\s*\[native code\]\s*\}/.test(e.toString()):ws=!1}}return ws}var ZV=20,__=(()=>{class e{_ngZone=O(Be);_platform=O(qn);_renderer=O(ln).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new ie;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=ZV){return this._platform.isBrowser?new ot(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(Bu(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):ko()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(Fo(s=>!s||i.indexOf(s)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,s)=>{this._scrollableContainsElement(s,n)&&r.push(s)}),r}_scrollableContainsElement(n,r){let i=Yn(r),s=n.getElementRef().nativeElement;do if(i==s)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),XV=20,Rl=(()=>{class e{_platform=O(qn);_listeners;_viewportSize;_change=new ie;_document=O(nt,{optional:!0});constructor(){let n=O(Be),r=O(ln).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=s=>this._change.next(s);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,s=i.getBoundingClientRect(),o=-s.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-s.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:o,left:a}}change(n=XV){return n>0?this._change.pipe(Bu(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),E_={},Qf=(()=>{class e{_appId=O(nl);getId(n){return this._appId!=="ng"&&(n+=this._appId),E_.hasOwnProperty(n)||(E_[n]=0),`${n}${E_[n]++}`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function aT(e,...t){return t.length?t.some(n=>e[n]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var cT=sT(),w_=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,t){this._viewportRuler=e,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=Yt(-this._previousScrollPosition.left),e.style.top=Yt(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,i=n.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),cT&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),cT&&(n.scrollBehavior=i,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}},b_=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Fo(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},ep=class{enable(){}disable(){}attach(){}};function C_(e,t){return t.some(n=>{let r=e.bottom<n.top,i=e.top>n.bottom,s=e.right<n.left,o=e.left>n.right;return r||i||s||o})}function lT(e,t){return t.some(n=>{let r=e.top<n.top,i=e.bottom>n.bottom,s=e.left<n.left,o=e.right>n.right;return r||i||s||o})}var S_=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();C_(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},QV=(()=>{class e{_scrollDispatcher=O(__);_viewportRuler=O(Rl);_ngZone=O(Be);_document=O(nt);constructor(){}noop=()=>new ep;close=n=>new b_(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new w_(this._viewportRuler,this._document);reposition=n=>new S_(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Nl=class{positionStrategy;scrollStrategy=new ep;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}},D_=class{connectionPair;scrollableViewProperties;constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}},mT=(()=>{class e{_attachedOverlays=[];_document=O(nt);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),e2=(()=>{class e extends mT{_ngZone=O(Be);_renderer=O(ln).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=Id(e)))(r||e)}})();static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),t2=(()=>{class e extends mT{_platform=O(qn);_ngZone=O(Be);_renderer=O(ln).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Cn(this._renderer,r,"pointerdown",this._pointerDownListener,i),Cn(this._renderer,r,"click",this._clickListener,i),Cn(this._renderer,r,"auxclick",this._clickListener,i),Cn(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=zn(n)};_clickListener=n=>{let r=zn(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let s=this._attachedOverlays.slice();for(let o=s.length-1;o>-1;o--){let a=s[o];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(uT(a.overlayElement,r)||uT(a.overlayElement,i))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(n)):l.next(n)}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=Id(e)))(r||e)}})();static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uT(e,t){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=t;for(;r;){if(r===e)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var gT=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=at({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
|
|
45
|
-
`],encapsulation:2,changeDetection:0})}return e})(),tp=(()=>{class e{_platform=O(qn);_containerElement;_document=O(nt);_styleLoader=O(_s);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||y_()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;s<i.length;s++)i[s].remove()}let r=this._document.createElement("div");r.classList.add(n),y_()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(gT)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),I_=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,t,n,r){this._renderer=t,this._ngZone=n,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=t.listen(this.element,"click",r)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Ua=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new ie;_attachments=new ie;_detachments=new ie;_positionStrategy;_scrollStrategy;_locationChanges=mt.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new ie;_outsidePointerEvents=new ie;_renders=new ie;_afterRenderRef;_afterNextRenderRef;constructor(e,t,n,r,i,s,o,a,l,c=!1,h,d){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=s,this._document=o,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=c,this._injector=h,this._renderer=d,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=mv(()=>qg(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Qr(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=w(w({},this._config),e),this._updateElementSize()}setDirection(e){this._config=re(w({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=Yt(this._config.width),e.height=Yt(this._config.height),e.minWidth=Yt(this._config.minWidth),e.minHeight=Yt(this._config.minHeight),e.maxWidth=Yt(this._config.maxWidth),e.maxHeight=Yt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new I_(this._document,this._renderer,this._ngZone,t=>{this._backdropClick.next(t)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,t,n){let r=m_(t||[]).filter(i=>!!i);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(Gr(no(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},dT="cdk-overlay-connected-position-bounding-box",n2=/([A-Za-z%]+)$/,T_=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new ie;_resizeSubscription=mt.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,t,n,r,i){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=i,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(dT),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,i=[],s;for(let o of this._preferredPositions){let a=this._getOriginPoint(e,r,o),l=this._getOverlayPoint(a,t,o),c=this._getOverlayFit(l,t,n,o);if(c.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(o,a);return}if(this._canFitWithFlexibleDimensions(c,l,n)){i.push({position:o,origin:a,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(a,o)});continue}(!s||s.overlayFit.visibleArea<c.visibleArea)&&(s={overlayFit:c,overlayPoint:l,originPoint:a,position:o,overlayRect:t})}if(i.length){let o=null,a=-1;for(let l of i){let c=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);c>a&&(a=c,o=l)}this._isPushed=!1,this._applyPosition(o.position,o.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&bs(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(dT),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,o=this._isRtl()?e.left:e.right;r=n.originX=="start"?s:o}t.left<0&&(r-=t.left);let i;return n.originY=="center"?i=e.top+e.height/2:i=n.originY=="top"?e.top:e.bottom,t.top<0&&(i-=t.top),{x:r,y:i}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let i;return n.overlayY=="center"?i=-t.height/2:i=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+i}}_getOverlayFit(e,t,n,r){let i=pT(t),{x:s,y:o}=e,a=this._getOffset(r,"x"),l=this._getOffset(r,"y");a&&(s+=a),l&&(o+=l);let c=0-s,h=s+i.width-n.width,d=0-o,f=o+i.height-n.height,g=this._subtractOverflows(i.width,c,h),m=this._subtractOverflows(i.height,d,f),b=g*m;return{visibleArea:b,isCompletelyWithinViewport:i.width*i.height===b,fitsInViewportVertically:m===i.height,fitsInViewportHorizontally:g==i.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,i=n.right-t.x,s=fT(this._overlayRef.getConfig().minHeight),o=fT(this._overlayRef.getConfig().minWidth),a=e.fitsInViewportVertically||s!=null&&s<=r,l=e.fitsInViewportHorizontally||o!=null&&o<=i;return a&&l}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=pT(t),i=this._viewportRect,s=Math.max(e.x+r.width-i.width,0),o=Math.max(e.y+r.height-i.height,0),a=Math.max(i.top-n.top-e.y,0),l=Math.max(i.left-n.left-e.x,0),c=0,h=0;return r.width<=i.width?c=l||-s:c=e.x<this._viewportMargin?i.left-n.left-e.x:0,r.height<=i.height?h=a||-o:h=e.y<this._viewportMargin?i.top-n.top-e.y:0,this._previousPushAmount={x:c,y:h},{x:e.x+c,y:e.y+h}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!r2(this._lastScrollVisibility,n)){let r=new D_(e,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=e.overlayY;e.overlayX==="center"?n="center":this._isRtl()?n=e.overlayX==="start"?"right":"left":n=e.overlayX==="start"?"left":"right";for(let i=0;i<t.length;i++)t[i].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(e,t){let n=this._viewportRect,r=this._isRtl(),i,s,o;if(t.overlayY==="top")s=e.y,i=n.height-s+this._viewportMargin;else if(t.overlayY==="bottom")o=n.height-e.y+this._viewportMargin*2,i=n.height-o+this._viewportMargin;else{let f=Math.min(n.bottom-e.y+n.top,e.y),g=this._lastBoundingBoxSize.height;i=f*2,s=e.y-f,i>g&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-g/2)}let a=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,l=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,c,h,d;if(l)d=n.width-e.x+this._viewportMargin*2,c=e.x-this._viewportMargin;else if(a)h=e.x,c=n.right-e.x;else{let f=Math.min(n.right-e.x+n.left,e.x),g=this._lastBoundingBoxSize.width;c=f*2,h=e.x-f,c>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-g/2)}return{top:s,left:h,bottom:o,right:d,width:c,height:i}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=Yt(n.height),r.top=Yt(n.top),r.bottom=Yt(n.bottom),r.width=Yt(n.width),r.left=Yt(n.left),r.right=Yt(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",i&&(r.maxHeight=Yt(i)),s&&(r.maxWidth=Yt(s))}this._lastBoundingBoxSize=n,bs(this._boundingBox.style,r)}_resetBoundingBoxStyles(){bs(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){bs(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let c=this._viewportRuler.getViewportScrollPosition();bs(n,this._getExactOverlayY(t,e,c)),bs(n,this._getExactOverlayX(t,e,c))}else n.position="static";let o="",a=this._getOffset(t,"x"),l=this._getOffset(t,"y");a&&(o+=`translateX(${a}px) `),l&&(o+=`translateY(${l}px)`),n.transform=o.trim(),s.maxHeight&&(r?n.maxHeight=Yt(s.maxHeight):i&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=Yt(s.maxWidth):i&&(n.maxWidth="")),bs(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(i.y+this._overlayRect.height)}px`}else r.top=Yt(i.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let o=this._document.documentElement.clientWidth;r.right=`${o-(i.x+this._overlayRect.width)}px`}else r.left=Yt(i.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:lT(e,n),isOriginOutsideView:C_(e,n),isOverlayClipped:lT(t,n),isOverlayOutsideView:C_(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&m_(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Nt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function bs(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function fT(e){if(typeof e!="number"&&e!=null){let[t,n]=e.split(n2);return!n||n==="px"?parseFloat(t):null}return e||null}function pT(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}function r2(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var hT="cdk-global-overlay-wrapper",x_=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(hT),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:i,maxWidth:s,maxHeight:o}=n,a=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(i==="100%"||i==="100vh")&&(!o||o==="100%"||o==="100vh"),c=this._xPosition,h=this._xOffset,d=this._overlayRef.getConfig().direction==="rtl",f="",g="",m="";a?m="flex-start":c==="center"?(m="center",d?g=h:f=h):d?c==="left"||c==="end"?(m="flex-end",f=h):(c==="right"||c==="start")&&(m="flex-start",g=h):c==="left"||c==="start"?(m="flex-start",f=h):(c==="right"||c==="end")&&(m="flex-end",g=h),e.position=this._cssPosition,e.marginLeft=a?"0":f,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=a?"0":g,t.justifyContent=m,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(hT),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},i2=(()=>{class e{_viewportRuler=O(Rl);_document=O(nt);_platform=O(qn);_overlayContainer=O(tp);constructor(){}global(){return new x_}flexibleConnectedTo(n){return new T_(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),R_=(()=>{class e{scrollStrategies=O(QV);_overlayContainer=O(tp);_positionBuilder=O(i2);_keyboardDispatcher=O(e2);_injector=O(yt);_ngZone=O(Be);_document=O(nt);_directionality=O(Es);_location=O(bv);_outsideClickDispatcher=O(t2);_animationsModuleType=O(PC,{optional:!0});_idGenerator=O(Qf);_renderer=O(ln).createRenderer(null,null);_appRef;_styleLoader=O(_s);constructor(){}create(n){this._styleLoader.load(gT);let r=this._createHostElement(),i=this._createPaneElement(r),s=this._createPortalOutlet(i),o=new Nl(n);return o.direction=o.direction||this._directionality.value,new Ua(s,r,i,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Wn),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(dr)),new zf(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function o2(e,t){}var Ha=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext},s2=(()=>{class e extends Ba{_elementRef=O(Nt);_focusTrapFactory=O(oT);_config;_interactivityChecker=O(v_);_ngZone=O(Be);_overlayRef=O(Ua);_focusMonitor=O(tT);_renderer=O(Zo);_platform=O(qn);_document=O(nt,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=O(Vr);_injector=O(yt);_isDestroyed=!1;constructor(){super(),this._config=O(Ha,{optional:!0})||new Ha,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{s(),o(),n.removeAttribute("tabindex")},s=this._renderer.listen(n,"blur",i),o=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||Qr(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=Kf(),s=this._elementRef.nativeElement;(!i||i===this._document.body||i===s||s.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=Kf();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Kf()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=at({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&Jo(u_,7),n&2){let i;Qo(i=es())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&fo("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[ri],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&kt(0,o2,0,0,"ng-template",0)},dependencies:[u_],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
46
|
-
`],encapsulation:2})}return e})(),Gi=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new ie;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(e,t){this.overlayRef=e,this.config=t,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!aT(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(e),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},a2=new he("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=O(R_);return()=>e.scrollStrategies.block()}}),Al=new he("DialogData"),c2=new he("DefaultDialogConfig"),vT=(()=>{class e{_overlay=O(R_);_injector=O(yt);_defaultOptions=O(c2,{optional:!0});_parentDialog=O(e,{optional:!0,skipSelf:!0});_overlayContainer=O(tp);_idGenerator=O(Qf);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new ie;_afterOpenedAtThisLevel=new ie;_ariaHiddenElements=new Map;_scrollStrategy=O(a2);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Zh(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ti(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Ha;r=w(w({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let s=this._getOverlayConfig(r),o=this._overlay.create(s),a=new Gi(o,r),l=this._attachContainer(o,a,r);return a.containerInstance=l,this._attachDialogContent(n,a,l,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){N_(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){N_(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),N_(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new Nl({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let s=i.injector||i.viewContainerRef?.injector,o=[{provide:Ha,useValue:i},{provide:Gi,useValue:r},{provide:Ua,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,o.push(...i.container.providers(i))):a=s2;let l=new La(a,i.viewContainerRef,yt.create({parent:s||this._injector,providers:o}));return n.attach(l).instance}_attachDialogContent(n,r,i,s){if(n instanceof Ar){let o=this._createInjector(s,r,i,void 0),a={$implicit:s.data,dialogRef:r};s.templateContext&&(a=w(w({},a),typeof s.templateContext=="function"?s.templateContext():s.templateContext)),i.attachTemplatePortal(new Fa(n,null,a,o))}else{let o=this._createInjector(s,r,i,this._injector),a=i.attachComponentPortal(new La(n,s.viewContainerRef,o));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,s){let o=n.injector||n.viewContainerRef?.injector,a=[{provide:Al,useValue:n.data},{provide:Gi,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!o||!o.get(Es,null,{optional:!0}))&&a.push({provide:Es,useValue:{value:n.direction,change:ko()}}),yt.create({parent:o||s,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let s=r[i];s!==n&&s.nodeName!=="SCRIPT"&&s.nodeName!=="STYLE"&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function N_(e,t){let n=e.length;for(;n--;)t(e[n])}var Sn=class{static injectScriptURL(e,t){if(!e)return;let n=document.createElement("script");n.id=t??"",n.src=e,e.includes("localhost")&&(n.type="module"),document.head.appendChild(n)}static injectRawScript(e){if(!e)return;let t=document.createElement("script");t.id="cooee-app-script",t.innerHTML=e,document.head.appendChild(t)}static injectRawCSS(e,t=document.head){if(!e)return;let n=document.createElement("style");n.textContent=e,t.appendChild(n)}static injectStylesheet(e,t=document.head){if(!e)return;let n=document.createElement("link");n.rel="stylesheet",n.href=e,e==="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"&&(n.crossOrigin="anonymous",n.onload=r=>{let i=r.currentTarget?.sheet?.cssRules;if(i){for(let s of i)if(s.type==CSSRule.FONT_FACE_RULE){let o=e.split("/"),a=o.slice(0,o.length-1).join("/"),l=s.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let c=document.createElement("style");c.appendChild(document.createTextNode(l)),document.head.appendChild(c)}}}),t.appendChild(n)}},M_=Fe(Qn());function l2(e,t){if(e&1&&(Y(0,"div",12),zt(1,"OPEN CART "),X()),e&2){let n=K(2);ii("animate-slide-up-enter",n.atcClicked)("hidden",!n.atcClicked)}}function u2(e,t){if(e&1&&(Y(0,"div",12),zt(1,"ADD TO CART "),X()),e&2){let n=K(2);ii("animate-slide-up-exit",n.atcClicked)("hidden",n.atcClicked)}}function d2(e,t){if(e&1){let n=dn();Y(0,"div",3),Qe("click",function(){let r=ze(n).$implicit,i=K();return qe(i.clicked.emit(r))})("keydown",function(){let r=ze(n).$implicit,i=K();return qe(i.clicked.emit(r))}),Y(1,"div",4),Re(2,"img",5),Y(3,"div",6)(4,"span",7),zt(5),X(),Y(6,"span",8),zt(7),hr(8,"cooeeCurrency"),X()()(),Y(9,"div",9),Qe("click",function(r){let i=ze(n).$implicit,s=K();return qe(s.clickAddToCart(r,i))})("keydown",function(r){let i=ze(n).$implicit,s=K();return qe(s.clickAddToCart(r,i))}),kt(10,l2,2,4,"div",10)(11,u2,2,4,"div",11),X()()}if(e&2){let n=t.$implicit,r=K();q(2),bn("alt",n.name),be("src",n.imageURL,Gt),q(3),Lr(" ",n.name," "),q(2),Lr(" ",Br(8,9,n.price)," "),q(2),ii("lc:bg-pink-500",!r.atcClicked)("lc:bg-black",r.atcClicked),q(),jt(r.atcClicked?10:11)}}var ja=class op{items;clicked=new We;performCTA=new We;atcClicked=!1;clickAddToCart(t,n){t.stopPropagation(),this.performCTA.emit({item:n,cta:this.atcClicked?M_.ClickActionType.OPEN_CART:M_.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||op)};static \u0275cmp=at({type:op,selectors:[["cooee-product-card"]],inputs:{items:"items"},outputs:{clicked:"clicked",performCTA:"performCTA"},decls:4,vars:0,consts:[[1,"lc:absolute","lc:flex","lc:bottom-2","lc:gap-2","lc:w-full","lc:z-10"],[1,"lc:flex","lc:px-18","lc:w-full","lc:gap-2","lc:overflow-x-auto"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-shrink-0","lc:flex-col","lc:gap-1","lc:bg-white/50","lc:rounded-lg","lc:p-2","lc:w-full","lc:cursor-pointer","lc:backdrop-blur-xs"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-shrink-0","lc:flex-col","lc:gap-1","lc:bg-white/50","lc:rounded-lg","lc:p-2","lc:w-full","lc:cursor-pointer","lc:backdrop-blur-xs",3,"click","keydown"],[1,"lc:flex","lc:gap-2","lc:w-full","lc:p-1"],["id","lc-item-image",1,"lc:w-16","lc:h-16","lc:object-cover","lc:box-border","lc:rounded-lg",3,"alt","src"],[1,"lc:flex","lc:flex-col","lc:gap-1","lc:text-xs"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-2"],["id","lc-item-price"],["id","lc-cta-button","tabindex","{0}",1,"lc:py-2","lc:rounded","lc:w-full","lc:text-center","lc:font-normal","lc:cursor-pointer",3,"click","keydown"],[1,"lc:text-white","lc:text-lg","lc:font-bold",3,"animate-slide-up-enter","hidden"],[1,"lc:text-white","lc:text-lg","lc:font-bold",3,"animate-slide-up-exit","hidden"],[1,"lc:text-white","lc:text-lg","lc:font-bold"]],template:function(t,n){t&1&&(Y(0,"div",0)(1,"div",1),At(2,d2,12,11,"div",2,Pr),X()()),t&2&&(q(2),Mt(n.items))},dependencies:[pi],styles:["@keyframes _ngcontent-%COMP%_slideUpExit{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@keyframes _ngcontent-%COMP%_slideUpEnter{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}[_nghost-%COMP%] .animate-slide-up-exit[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpExit .3s ease-out forwards}[_nghost-%COMP%] .animate-slide-up-enter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpEnter .3s ease-out forwards}"]})},Tt=class{static COOEE_URL_PREFIX="?from=cooee";static isShopify(){return!!window.Shopify}static getShopName(){if(this.isShopify())return window.Shopify.shop?.split(".")?.[0]}static getPageName(){if(!this.isShopify())return;let e=new URL(window.location.href).pathname.slice(1).split("/"),t=e[0];if(t==="")return"home";if(t==="collections")return e[2]==="products"?"product":"collection";if(t==="products")return"product";if(t==="cart")return"cart";if(location.href.includes("thank_you"))return"thank_you"}static getProductSlug(e){let t=(e.includes("://")?new URL(e).pathname:e).match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:null}static getRootPrefix(){return window.Shopify?.routes?.root??"/"}static getCartURL(e){return this.getRootPrefix()+e+this.COOEE_URL_PREFIX}},yT=Fe(k_()),f2=(0,yT.default)(fetch),np=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let n,r=Tt.getRootPrefix()+`products/${t}.js`;try{n=await(await f2(r)).json()}catch(i){S.error(`Failed to fetch ${r}`,i);let s=Ct.getInstance();i instanceof Response?s.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:e.mID,path:r}):s.captureException(i,{mID:e.mID,path:r});return}if(!n){S.error("Item not found after AJAX call for:",e.mID);return}return n}static getItemSlug(e){if(e.link)try{let t=new URL(e.link).pathname.match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:void 0}catch{return}}},rp=Fe(Qn()),p2=(e,t)=>t.id;function h2(e,t){if(e&1&&Re(0,"img",10),e&2){let n=t.$implicit,r=K(2);be("src",n,Gt)("alt",r.item.name)}}function m2(e,t){if(e&1&&At(0,h2,1,2,"img",10,Pr),e&2){let n=K();Mt(n.ajaxItem.images)}}function g2(e,t){if(e&1&&Re(0,"img",10),e&2){let n=K();be("src",n.item.imageURL,Gt)("alt",n.item.name)}}function v2(e,t){if(e&1){let n=dn();Y(0,"div",20),Qe("click",function(){let r=ze(n).$implicit,i=K();return qe(i.selectedVariant=r)})("keydown",function(){let r=ze(n).$implicit,i=K();return qe(i.selectedVariant=r)}),Y(1,"span",21),zt(2),X()()}if(e&2){let n=t.$implicit,r=K();ii("lc:bg-pink-100",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id)("lc:border-pink-300",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id)("lc:text-pink-700",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),q(2),fa(n.title)}}function y2(e,t){if(e&1&&(Y(0,"div",16)(1,"h4",22),zt(2,"Description"),X(),Re(3,"div",23),hr(4,"safeHtml"),X()),e&2){let n=K();q(3),be("innerHTML",Br(4,1,n.ajaxItem==null?null:n.ajaxItem.description),il)}}function _2(e,t){e&1&&zt(0," OPEN CART ")}function E2(e,t){e&1&&zt(0," ADD TO CART ")}var $a=class up{item;closeModel=new We;performCTA=new We;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=rp.ClickActionType;async ngOnInit(){this.ajaxItem=await np.getAjaxItem(this.item),this.processVariants()}closeDialog(){this.closeModel.emit()}clickAddToCart(t){t.vID=this.selectedVariant?.id,t.vName=this.selectedVariant?.public_title,this.performCTA.emit({item:t,cta:this.atcClicked?rp.ClickActionType.OPEN_CART:rp.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants.filter(t=>t.available)??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||up)};static \u0275cmp=at({type:up,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:29,vars:7,consts:[[1,"lc:bg-white","lc:flex","lc:flex-col","lc:h-full","lc:w-full"],[1,"lc:flex","lc:items-center","lc:justify-between","lc:px-4","lc:py-3","lc:border-b"],[1,"lc:text-xl","lc:font-bold"],[1,"lc:bg-transparent","lc:text-black/50","lc:border-0","lc:cursor-pointer",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:flex-1","lc:overflow-y-auto","lc:p-4"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:gap-4"],[1,"lc:w-full","lc:flex","lc:overflow-x-auto","lc:gap-2","lc:flex-nowrap"],[1,"lc:w-28","lc:h-28","lc:object-contain",3,"src","alt"],[1,"lc:flex","lc:flex-col","lc:gap-2","lc:mt-4","lc:w-full"],[1,"lc:text-lg","lc:font-bold","lc:m-0"],[1,"lc:text-pink-600","lc:font-bold","lc:text-lg"],[1,"lc:flex","lc:flex-wrap","lc:gap-2","lc:pt-2","lc:w-full"],["tabindex","{0}",1,"lc:px-3","lc:py-2","lc:rounded-lg","lc:bg-gray-100","lc:text-gray-800","lc:text-sm","lc:cursor-pointer","lc:border","lc:border-gray-200","lc:flex","lc:items-center","lc:gap-1",3,"lc:bg-pink-100","lc:border-pink-300","lc:text-pink-700"],[1,"lc:mt-4","lc:border-t","lc:pt-4","lc:w-full"],[1,"lc:flex","lc:justify-center","lc:items-center","lc:px-4","lc:py-4","lc:bg-black/30","lc:rounded-lg","lc:gap-4","lc:rounded-b-none","lc:shadow-zinc-400"],["tabindex","{0}",1,"lc:bg-black","lc:text-white","lc:px-4","lc:py-2","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["tabindex","{0}",1,"lc:bg-pink-100","lc:text-pink-600","lc:px-4","lc:py-2","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["tabindex","{0}",1,"lc:px-3","lc:py-2","lc:rounded-lg","lc:bg-gray-100","lc:text-gray-800","lc:text-sm","lc:cursor-pointer","lc:border","lc:border-gray-200","lc:flex","lc:items-center","lc:gap-1",3,"click","keydown"],[1,"lc:truncate","lc:max-w-[200px]"],[1,"lc:font-semibold","lc:m-0"],[3,"innerHTML"]],template:function(t,n){t&1&&(Y(0,"div",0)(1,"div",1)(2,"h2",2),zt(3,"Shop Now"),X(),Y(4,"button",3),Qe("click",function(){return n.closeDialog()}),Gn(),Y(5,"svg",4),Re(6,"path",5)(7,"path",6),X()()(),Fi(),Y(8,"div",7)(9,"div",8)(10,"div",9),kt(11,m2,2,0)(12,g2,1,2,"img",10),X(),Y(13,"div",11)(14,"h3",12),zt(15),X(),Y(16,"span",13),zt(17),hr(18,"cooeeCurrency"),X()(),Y(19,"div",14),At(20,v2,3,7,"div",15,p2),X(),kt(22,y2,5,3,"div",16),X()(),Y(23,"div",17)(24,"div",18),Qe("click",function(){return n.clickAddToCart(n.item)})("keydown",function(){return n.clickAddToCart(n.item)}),kt(25,_2,1,0)(26,E2,1,0),X(),Y(27,"div",19),Qe("click",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})})("keydown",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})}),zt(28," MORE INFO "),X()()()),t&2&&(q(11),jt(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?11:12),q(4),fa(n.item.name),q(2),Lr(" ",Br(18,5,(n.selectedVariant==null?null:n.selectedVariant.price)/100)," "),q(3),Mt(n.availableVariants),q(2),jt(n.ajaxItem!=null&&n.ajaxItem.description?22:-1),q(3),jt(n.atcClicked?25:26))},dependencies:[Aa,pi],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px;overflow:hidden}"]})};function w2(e,t){e&1&&(Gn(),Y(0,"svg",1),Re(1,"path",2)(2,"path",3),X())}function b2(e,t){e&1&&(Gn(),Y(0,"svg",1),Re(1,"path",2)(2,"path",4),X())}var Wa=class $p{muted;buttonClicked=new We;static \u0275fac=function(t){return new(t||$p)};static \u0275cmp=at({type:$p,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted"},outputs:{buttonClicked:"buttonClicked"},decls:3,vars:1,consts:[["id","lc-mute-button",1,"lc:bg-black/50","lc:rounded-full","lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:border-none","lc:cursor-pointer",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(t,n){t&1&&(Y(0,"button",0),Qe("click",function(){return n.buttonClicked.emit()}),kt(1,w2,3,0,":svg:svg",1)(2,b2,3,0,":svg:svg",1),X()),t&2&&(q(),jt(n.muted?1:2))},encapsulation:2})},Ga=class Af{width;static \u0275fac=function(t){return new(t||Af)};static \u0275cmp=at({type:Af,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(t,n){t&1&&(Y(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Re(4,"div"),X()()()()),t&2&&(q(3),po("width",n.width,"%"))},encapsulation:2})},xo=Fe(Qn()),_x=Fe(ip()),Ex=Fe(is()),C2=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|cookiehubscan|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab",S2=/bot|crawl|http|lighthouse|scan|search|spider/i,Ml;function D2(){if(Ml instanceof RegExp)return Ml;try{Ml=new RegExp(C2,"i")}catch{Ml=S2}return Ml}function wT(e){return!!e&&D2().test(e)}var bT=Fe(L_()),Ol=class{static UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"];static TW_PARAMS={utm_source:"tw_source",utm_campaign:"tw_campaign"};static getReferrer(){if(document.referrer)return document.referrer.replace(location.origin,"")}static getUTMParams(){let e;try{e=new bT.URLBuilder(location.href)}catch{return{}}let t={};this.UTM_PARAMS.forEach(r=>{let i=e.getQueryParam(r);i&&(t[r]=i)});let n={};return Object.keys(this.TW_PARAMS).forEach(r=>{let i=e.getQueryParam(this.TW_PARAMS[r]);i&&(n[r]=i)}),w(w({},n),t)}},vi=class LS{origin;path;qs;name;referrer;utmSource;utmMedium;utmCampaign;utmId;utmTerm;utmContent;constructor(t){this.name=t.name,this.path=t.path,this.qs=t.qs,this.referrer=t.referrer,this.utmSource=t.utmSource||t.utm_source,this.utmMedium=t.utmMedium||t.utm_medium,this.utmCampaign=t.utmCampaign||t.utm_campaign,this.utmId=t.utmId||t.utm_id,this.utmTerm=t.utmTerm||t.utm_term,this.utmContent=t.utmContent||t.utm_content}static parseFromCurrent(){let t=location.pathname==="/"?location.pathname:location.pathname.replace(/\/+$/,"");return new LS(w({origin:location.origin,path:t,qs:location.search,referrer:Ol.getReferrer(),name:Oe.get().pageName},Ol.getUTMParams()))}},Ve=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}},F_={d:(e,t)=>{for(var n in t)F_.o(t,n)&&!F_.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},B_={};F_.d(B_,{A:()=>R2,k:()=>V_});var T2=function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(c){try{l(r.next(c))}catch(h){s(h)}}function a(c){try{l(r.throw(c))}catch(h){s(h)}}function l(c){var h;c.done?i(c.value):(h=c.value,h instanceof n?h:new n(function(d){d(h)})).then(o,a)}l((r=r.apply(e,t||[])).next())})},x2=function(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return function(h){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,h[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&h[0]?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,r=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!((i=i.length>0&&i[i.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){o.label=h[1];break}if(h[0]===6&&o.label<i[1]){o.label=i[1],i=h;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(h);break}i[2]&&o.ops.pop(),o.trys.pop();continue}h=t.call(e,o)}catch(d){h=[6,d],r=0}finally{n=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,c])}}};function V_(){return T2(this,void 0,Promise,function(){return x2(this,function(_a){switch(_a.label){case 0:return[4,new Promise(function(resolve,reject){var browserName="Unknown";function __callback(e){resolve({isPrivate:e,browserName})}function identifyChromium(){var e=navigator.userAgent;return e.match(/Chrome/)?navigator.brave!==void 0?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium"}function assertEvalToString(e){return e===eval.toString().length}function feid(){var toFixedEngineID=0;try{eval("(-1).toFixed(-1);")}catch(e){toFixedEngineID=e.message.length}return toFixedEngineID}function isSafari(){return feid()===44}function isChrome(){return feid()===51}function isFirefox(){return feid()===25}function isMSIE(){return navigator.msSaveBlob!==void 0&&assertEvalToString(39)}function newSafariTest(){var e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){var n,r,i=(n=t.target)===null||n===void 0?void 0:n.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),__callback(!1)}catch(o){var s=o;return o instanceof Error&&(s=(r=o.message)!==null&&r!==void 0?r:o),typeof s!="string"?void __callback(!1):void __callback(s.includes("BlobURLs are not yet supported"))}finally{i.close(),window.indexedDB.deleteDatabase(e)}}}catch{__callback(!1)}}function oldSafariTest(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch{return void __callback(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch{return void __callback(!0)}__callback(!1)}function safariPrivateTest(){navigator.maxTouchPoints!==void 0?newSafariTest():oldSafariTest()}function getQuotaLimit(){var e=window;return e.performance!==void 0&&e.performance.memory!==void 0&&e.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824}function storageQuotaChromePrivateTest(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){__callback(Math.round(t/1048576)<2*Math.round(getQuotaLimit()/1048576))},function(e){reject(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function oldChromePrivateTest(){(0,window.webkitRequestFileSystem)(0,1,function(){__callback(!1)},function(){__callback(!0)})}function chromePrivateTest(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?storageQuotaChromePrivateTest():oldChromePrivateTest()}function firefoxPrivateTest(){__callback(navigator.serviceWorker===void 0)}function msiePrivateTest(){__callback(window.indexedDB===void 0)}function main(){isSafari()?(browserName="Safari",safariPrivateTest()):isChrome()?(browserName=identifyChromium(),chromePrivateTest()):isFirefox()?(browserName="Firefox",firefoxPrivateTest()):isMSIE()?(browserName="Internet Explorer",msiePrivateTest()):reject(new Error("detectIncognito cannot determine the browser"))}main()})];case 1:return[2,_a.sent()]}})})}typeof window<"u"&&(window.detectIncognito=V_);var R2=V_,CT=B_.A,DJ=B_.k,mx=Fe(is()),ST=Fe(U_()),tr=class Di{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new ST.default;constructor(){}static get(){return Di._instance||(Di._instance=new Di),Di._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===Di.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===Di.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(t){let n=t.max,r=t.cont.w,i=t.cont.h,s=t.spc,o=Di.get().getWidth(),a=Di.get().getHeight();n&&(o=o?Math.min(o,n):n,a=a?Math.min(a,n):n),a&&(o-=s.getHorizontal(),a-=s.getVertical(),o/a<r/i?this.scalingFactor=o/r:this.scalingFactor=a/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(t){return this.doc.createElement(t)}appendChild(t,n){t.appendChild(n)}setStyles(t,n){Object.assign(t.style,n)}setStyle(t,n,r){if(n){if(!r){t.style.removeProperty(n);return}t.style.setProperty(n,r,"important")}}setAttribute(t,n,r){t.setAttribute(n,r)}removeInApp(t){let n=document.querySelector(`.${t.rootClassName}`);n&&n.parentElement.removeChild(n)}setParentContainer(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}},ap=class{parser;result={};constructor(){this.parser=tr.get().getUAParser()}async get(){let e=this.result;return this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),await this.getBatteryInfo(),await this.getLocation(),e.locale=navigator.language,e.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},e.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},e.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},e.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},e.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},e.navigatorUA=navigator.userAgent,e.isHeadless=navigator.webdriver,e}getDeviceMemory(){let e=navigator;if(!e.deviceMemory)return;let t=e.deviceMemory;this.result.mem={tot:t*1024}}getNetworkType(){let e=navigator,t=e.connection||e.mozConnection||e.webkitConnection;t?.effectiveType&&(this.result.net={type:t.effectiveType})}getOrientation(){let e=screen.orientation?.type;e&&(this.result.orientation=e)}getDPI(){let e=document.createElement("div");e.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(e);let t=window.devicePixelRatio||1,n=e.offsetWidth*t;return document.body.removeChild(e),n}async getLocation(){if(!(!navigator.geolocation||!navigator.permissions||(await navigator.permissions.query({name:"geolocation"})).state!="granted"))return new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{this.result.coords=[t.coords.latitude,t.coords.longitude],e()},()=>e())})}async getBatteryInfo(){if("getBattery"in navigator)try{let e=await navigator.getBattery();this.result.bat={l:e.level*100,c:e.charging}}catch{}}},qa=class{isLocked=!1;queue=[];async acquire(){if(this.isLocked)await new Promise(e=>this.queue.push(e));else{this.isLocked=!0;return}}release(){if(this.queue.length>0){let e=this.queue.shift();e&&e()}else this.isLocked=!1}},Ye=class MS{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new qa;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new MS),this.CURRENT}async getNormalisedCart(t){await this.fetchCartFromShopify(t);let n=this.convertToCooeeCart();return t&&await ft.set(we.CURRENT_CART,n),n}async addCooeeAttributes(){await this.lock.acquire();let t=await pn.get(we.ID),n=await ft.get(we.DEVICE_ID);if(this.attributes?.letscooee_did===n&&this.attributes?.letscooee_sid===t){S.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let r={letscooee_did:n,letscooee_sid:t,__letscooee_time:new Date().toLocaleString()};S.debug("Updating Shopify cart with attributes:",r);let i=Tt.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:r})})).json();S.debug("Updated cart attributes",JSON.stringify(s)),this.update(s),this.lock.release()}update(t){return this.token=t.token,this.items=t.items,this.total_price=t.total_price,this.original_total_price=t.original_total_price,this.currency=t.currency,this.item_count=t.item_count,this.attributes=t.attributes,Oe.get().currencyCode=this.currency,S.log("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}convertToCooeeCart(){return{amount:this.total_price/100,originalAmount:this.original_total_price/100,currency:this.currency,itemCount:this.item_count,items:this.normaliseItems(this.items),token:this.token}}normaliseItems(t){if(!t)return S.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let n=[];for(let r of t){if(!r.id||!r.title){S.warn("Invalid item received",r);continue}let i={name:r.title,quantity:+r.quantity||1,mID:r.product_id?.toString(),vID:r.id.toString(),price:+r.price/100||0,properties:r.properties,key:r.key},s=r.selling_plan_allocation?.selling_plan;if(!s){n.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:s.fixed_selling_plan,id:s.id,name:s.name,recurringDeliveries:s.recurring_deliveries}},n.push(i)}return n}async fetchCartFromShopify(t){if(!t&&this.token){S.debug("Not fetching cart");return}S.debug("Fetching cart");let n=Tt.getCartURL("cart.js"),r=await(await fetch(n)).json();this.update(r)}},Cs=(e=>(e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e))(Cs||{}),Ya=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let t=Cs[e]?.toLowerCase();t&&(S.debug(`Sending ${t} intent to MS Clarity`),window.clarity("set","Cooee Intent",t))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}},wr=class{static isOn=!1;static element;static watch(){let e=S.getDebugParam();(e==="1"||e==="on")&&Ue.getInstance().updateDeviceProps({debugTill:this.getDebugMillis()}),e==="on"?sessionStorage.cooeeDebug="1":e==="off"&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&(this.isOn=!0,this.renderDebugBar())}static prepend(e){if(!this.isOn)return;let t=document.createElement("div");t.innerHTML="• "+new Date().toLocaleString()+" - "+e,this.element.prepend(t)}static renderDebugBar(){this.element=document.createElement("div"),this.element.id="cooee-debugger",this.element.setAttribute("draggable","true"),document.body.appendChild(this.element)}static dragElement(){let e=0,t=0,n=0,r=0,i=a=>{a=a||window.event,a.preventDefault(),n=a.clientX,r=a.clientY,document.onmouseup=o,document.onmousemove=s},s=a=>{a=a||window.event,a.preventDefault(),e=n-a.clientX,t=r-a.clientY,n=a.clientX,r=a.clientY,this.element.style.top=this.element.offsetTop-t+"px",this.element.style.left=this.element.offsetLeft-e+"px"},o=()=>{document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=i}static getDebugMillis(){return new Date().getTime()+6*60*60*1e3}},kl=class extends mo{static storeName="app";static{this.storage=ya(this.storeName)}},cp=Fe(is()),yi=class VS{static INSTANCE=new VS;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(t,n){this.topics[t]||(this.topics[t]=new ie),this.topics[t].next(n)}subscriber(t){return this.topics[t]||(this.topics[t]=new ie),this.topics[t].asObservable()}},Kt=class hi{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=Ot.get().website??{};currentState=!1;drawerSubject=new Ir({open:!1,firstOpen:!1});mutationObserver;firstOpen=!0;selector;shadowParentElementSelector;iconSelector=['button[drawer-to-open="cart-drawer"]','a[href="/cart"]',".header__icon--cart","#cart-icon-bubble",".cart-icon-bubble",".cart-count",'a[onclick*="handleFloCartBtn"]'].join(",");cartSelector=[hi.DEFAULT_SELECTOR,"#halo-cart-sidebar",'[role="dialog"][class*="cart" i]','[id*="section-cart" i]',"#sidebar-cart","#rebuy-cart","#mini-cart","#flo-cart-wrapper","#drawer-cart","#UpcartPopupBackDrop",'[id$="CartDrawer" i]'].join(",");constructor(){this.initialize(),document.addEventListener(k.CTA_AFTER_REFRESH_UI,this.updateBubble.bind(this))}get element(){return this.cartDrawerElement}static get(){return hi._instance||(hi._instance=new hi),hi._instance}static forceUpdate(){hi._instance=new hi}isOpen(){let t=this.inShadow?this.isPresent():this.isVisible();return cp.default.log(`Cart drawer is currently ${t?"open":"close"}`),t}open(){if(this.isOpen()){S.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let t=document.querySelector(this.iconSelector);if(!t){S.debug("No clickable cart icon found with selector",this.iconSelector);return}t.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===hi.DEFAULT_SELECTOR}isMiniCart(){return this.isShopifyDefaultDrawer()&&this.element?.id==="mini-cart"}refreshUI(t,n=!0){if(this.isMiniCart()&&this.element?._rerenderCart)this.element._rerenderCart({detail:{cart:t}});else if(this.isShopifyDefaultDrawer())this.element?.renderContents&&t&&(this.element.classList.remove("is-empty"),this.element.renderContents?.(t));else if(this.element?.onCartDrawerUpdate)this.element.onCartDrawerUpdate();else if(window.cartGiftUpdate){if(!t?.items?.[0])return;let r=t.items[0].id,i=t.items[0].quantity,s=t.items[0].price;window.cartGiftUpdate(r,s,i,"","ADD_TO_CART")}else if(window.icartCartActivityEvent)window.icartCartActivityEvent();else if(window.theme?.CartDrawer)window.theme?.CartDrawer.init?new window.theme.CartDrawer().init():new window.theme.CartDrawer;else if(window.Hs_CartDrawer?.updateSlideCart)window.Hs_CartDrawer.updateSlideCart();else if(window.theme?.fetch_side_cart)window.theme.fetch_side_cart();else if(window.theme?.Cart?.updateCart)window.theme.Cart.updateCart();else if(window.cartUpdate)window.cartUpdate();else if(this.element?._onCartRefresh)this.element._onCartRefresh();else if(window.cart?.getCart)window.cart.getCart();else if(this.element?.tagName?.toLowerCase()==="cart-drawer-component")document.dispatchEvent(new CustomEvent("action:cart:updateCartandShowCart"));else if(this.element?.id==="sidebar-cart")document.body.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{}}));else if(this.element?.id==="quick-cart"){let r=document.querySelector('a[href="/cart"]');r&&r.click()}else window.Shopify?.KT_onItemAdded?window.Shopify.KT_onItemAdded():S.info("No method found to update the cart without refreshing");document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),n&&yi.get().broadcast(k.CART_UPDATE_BROADCAST)}async initialize(){let t=this.configWebsite.cartDrawerSelector;if(!t){await this.findCartDrawer();return}let n=t.split(k.SHADOW_SPLITTER);n.length===1?(this.selector=n[0],await this.findCartDrawer()):(this.inShadow=!0,this.shadowParentElementSelector=n[0]?.trim(),this.selector=n[1]?.trim(),await this.findCartDrawerWithShadow())}async findCartDrawer(){if(!Tt.isShopify())return;let t=this.selector||this.cartSelector;if(this.cartDrawerElement=await fe.retrySelector(t),!this.cartDrawerElement){cp.default.warn("Max attempts exhausted to find cart drawer");return}cp.default.log("Found",this.cartDrawerElement,`from selector: ${t}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!Tt.isShopify()||!this.shadowParentElementSelector)return;let t=(await fe.retrySelector(this.shadowParentElementSelector))?.shadowRoot;t?.mode==="open"&&(this.cartDrawerShadowElement=t,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;let t=this.cartDrawerElement.getBoundingClientRect(),n=(window.innerHeight||document.documentElement.clientHeight)+.5,r=(window.innerWidth||document.documentElement.clientWidth)+.5,i=t.top<=n&&t.bottom>=0,s=t.left<=r&&t.right>=0,o=i&&s,a=this.cartDrawerElement.tagName.toLowerCase()===hi.DEFAULT_SELECTOR&&this.cartDrawerElement.open,l=getComputedStyle(this.cartDrawerElement),c=l.display!=="none"&&l.visibility!=="hidden"&&parseFloat(l.opacity)>0,h=!this.cartDrawerElement.hidden,d=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,f=l.transform.match(/matrix\(([^)]+)\)/),g=0,m=0;if(f){let J=f[1].split(", ").map(parseFloat);g=J[4],m=J[5]}let b=g+t.left>r||g+t.right<0||m+t.top>n||m+t.bottom<0,I=Math.max(0,Math.min(t.right,r)-Math.max(t.left,0)),A=Math.max(0,Math.min(t.bottom,n)-Math.max(t.top,0)),F=I*A,V=t.width*t.height,M=V>0&&F/V>=.1;return(o||a||!b)&&c&&h&&d&&M}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(fe.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let t=this.cartDrawerElement||this.cartDrawerShadowElement,n=new ie;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{n.next()}),this.mutationObserver.observe(t,{attributes:!0,subtree:!0,childList:this.inShadow}),n.pipe(Tr(500)).subscribe(()=>{let r=this.isOpen();this.currentState!==r&&(this.currentState=r,this.drawerSubject.next({open:r,firstOpen:this.firstOpen}),this.firstOpen&&(this.firstOpen=!1))})}isPresent(){return!this.selector||!this.cartDrawerShadowElement?!1:!!this.cartDrawerShadowElement.querySelector(this.selector)}async updateBubble(){let t=(await Ye.getCurrent().getNormalisedCart(!0)).itemCount,n=document.querySelector(".cart-link__bubble");n&&(n.innerText=t+"")}},lp=class{static processConfiguration(){let e=Ot.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Ue.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await ft.get(we.GA_CLIENT_ID),t=await this.getClientIDViaGTag();if(e!==t)return await ft.set(we.GA_CLIENT_ID,t),t}static async getClientIDViaGTag(){let e=Ot.get().gaMeasurementID;if(!(!e||!window.gtag))return new Promise(t=>{window.gtag("get",e,"client_id",n=>{t(n)})})}},px=Fe(Of()),Un=Fe(Qn()),Co=Fe(ip()),EE=Fe(j_()),hp,st,RT,z_,Ss,DT,NT,$_,AT,q_,W_,G_,N2,Ll={},MT=[],A2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Y_=Array.isArray;function yo(e,t){for(var n in t)e[n]=t[n];return e}function K_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Z_(e,t,n){var r,i,s,o={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?hp.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)o[s]===void 0&&(o[s]=e.defaultProps[s]);return fp(e,o,r,i,null)}function fp(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++RT,__i:-1,__u:0};return i==null&&st.vnode!=null&&st.vnode(s),s}function Ei(e){return e.children}function _i(e,t){this.props=e,this.context=t}function Ka(e,t){if(t==null)return e.__?Ka(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ka(e):null}function OT(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return OT(e)}}function IT(e){(!e.__d&&(e.__d=!0)&&Ss.push(e)&&!pp.__r++||DT!==st.debounceRendering)&&((DT=st.debounceRendering)||NT)(pp)}function pp(){var e,t,n,r,i,s,o,a;for(Ss.sort($_);e=Ss.shift();)e.__d&&(t=Ss.length,r=void 0,s=(i=(n=e).__v).__e,o=[],a=[],n.__P&&((r=yo({},i)).__v=i.__v+1,st.vnode&&st.vnode(r),X_(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[s]:null,o,s??Ka(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,LT(o,r,a),r.__e!=s&&OT(r)),Ss.length>t&&Ss.sort($_));pp.__r=0}function PT(e,t,n,r,i,s,o,a,l,c,h){var d,f,g,m,b,I,A=r&&r.__k||MT,F=t.length;for(l=M2(n,t,A,l,F),d=0;d<F;d++)(g=n.__k[d])!=null&&(f=g.__i===-1?Ll:A[g.__i]||Ll,g.__i=d,I=X_(e,g,f,i,s,o,a,l,c,h),m=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&J_(f.ref,null,g),h.push(g.ref,g.__c||m,g)),b==null&&m!=null&&(b=m),4&g.__u||f.__k===g.__k?l=kT(g,l,e):typeof g.type=="function"&&I!==void 0?l=I:m&&(l=m.nextSibling),g.__u&=-7);return n.__e=b,l}function M2(e,t,n,r,i){var s,o,a,l,c,h=n.length,d=h,f=0;for(e.__k=new Array(i),s=0;s<i;s++)(o=t[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=s+f,(o=e.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?fp(null,o,null,null,null):Y_(o)?fp(Ei,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?fp(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,(c=o.__i=O2(o,n,l,d))!==-1&&(d--,(a=n[c])&&(a.__u|=2)),a==null||a.__v===null?(c==-1&&f--,typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,o.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<h;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Ka(a)),FT(a,a));return r}function kT(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=kT(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Ka(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function O2(e,t,n,r){var i,s,o=e.key,a=e.type,l=t[n];if(l===null||l&&o==l.key&&a===l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,s=n+1;i>=0||s<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&o==l.key&&a===l.type)return i;i--}if(s<t.length){if((l=t[s])&&(2&l.__u)==0&&o==l.key&&a===l.type)return s;s++}}return-1}function TT(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||A2.test(t)?n:n+"px"}function dp(e,t,n,r,i){var s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||TT(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||TT(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(AT,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=q_,e.addEventListener(t,s?G_:W_,s)):e.removeEventListener(t,s?G_:W_,s);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function xT(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=q_++;else if(t.t<n.u)return;return n(st.event?st.event(t):t)}}}function X_(e,t,n,r,i,s,o,a,l,c){var h,d,f,g,m,b,I,A,F,V,M,J,Ne,ht,j,pe,te,de=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(h=st.__b)&&h(t);e:if(typeof de=="function")try{if(A=t.props,F="prototype"in de&&de.prototype.render,V=(h=de.contextType)&&r[h.__c],M=h?V?V.props.value:h.__:r,n.__c?I=(d=t.__c=n.__c).__=d.__E:(F?t.__c=d=new de(A,M):(t.__c=d=new _i(A,M),d.constructor=de,d.render=k2),V&&V.sub(d),d.props=A,d.state||(d.state={}),d.context=M,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),F&&d.__s==null&&(d.__s=d.state),F&&de.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=yo({},d.__s)),yo(d.__s,de.getDerivedStateFromProps(A,d.__s))),g=d.props,m=d.state,d.__v=t,f)F&&de.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),F&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(F&&de.getDerivedStateFromProps==null&&A!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,M)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(d.props=A,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Ae){Ae&&(Ae.__=t)}),J=0;J<d._sb.length;J++)d.__h.push(d._sb[J]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,M),F&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,m,b)})}if(d.context=M,d.props=A,d.__P=e,d.__e=!1,Ne=st.__r,ht=0,F){for(d.state=d.__s,d.__d=!1,Ne&&Ne(t),h=d.render(d.props,d.state,d.context),j=0;j<d._sb.length;j++)d.__h.push(d._sb[j]);d._sb=[]}else do d.__d=!1,Ne&&Ne(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++ht<25);d.state=d.__s,d.getChildContext!=null&&(r=yo(yo({},r),d.getChildContext())),F&&!f&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(g,m)),a=PT(e,Y_(pe=h!=null&&h.type===Ei&&h.key==null?h.props.children:h)?pe:[pe],t,n,r,i,s,o,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),I&&(d.__E=d.__=null)}catch(Ae){if(t.__v=null,l||s!=null)if(Ae.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(te=s.length;te--;)K_(s[te]);else t.__e=n.__e,t.__k=n.__k;st.__e(Ae,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=P2(n.__e,t,n,r,i,s,o,l,c);return(h=st.diffed)&&h(t),128&t.__u?void 0:a}function LT(e,t,n){for(var r=0;r<n.length;r++)J_(n[r],n[++r],n[++r]);st.__c&&st.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){st.__e(s,i.__v)}})}function P2(e,t,n,r,i,s,o,a,l){var c,h,d,f,g,m,b,I=n.props,A=t.props,F=t.type;if(F=="svg"?i="http://www.w3.org/2000/svg":F=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((g=s[c])&&"setAttribute"in g==!!F&&(F?g.localName==F:g.nodeType==3)){e=g,s[c]=null;break}}if(e==null){if(F==null)return document.createTextNode(A);e=document.createElementNS(i,F,A.is&&A),a&&(st.__m&&st.__m(t,s),a=!1),s=null}if(F===null)I===A||a&&e.data===A||(e.data=A);else{if(s=s&&hp.call(e.childNodes),I=n.props||Ll,!a&&s!=null)for(I={},c=0;c<e.attributes.length;c++)I[(g=e.attributes[c]).name]=g.value;for(c in I)if(g=I[c],c!="children"){if(c=="dangerouslySetInnerHTML")d=g;else if(!(c in A)){if(c=="value"&&"defaultValue"in A||c=="checked"&&"defaultChecked"in A)continue;dp(e,c,null,g,i)}}for(c in A)g=A[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?m=g:c=="checked"?b=g:a&&typeof g!="function"||I[c]===g||dp(e,c,g,I[c],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),PT(e,Y_(f)?f:[f],t,n,r,F=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:n.__k&&Ka(n,0),a,l),s!=null)for(c=s.length;c--;)K_(s[c]);a||(c="value",F=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||F=="progress"&&!m||F=="option"&&m!==I[c])&&dp(e,c,m,I[c],i),c="checked",b!==void 0&&b!==e[c]&&dp(e,c,b,I[c],i))}return e}function J_(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){st.__e(i,n)}}function FT(e,t,n){var r,i;if(st.unmount&&st.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||J_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){st.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&FT(r[i],t,n||typeof e.type!="function");n||K_(e.__e),e.__c=e.__=e.__e=void 0}function k2(e,t,n){return this.constructor(e,n)}function BT(e,t,n){var r,i,s,o;t==document&&(t=document.documentElement),st.__&&st.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],o=[],X_(t,e=(!r&&n||t).__k=Z_(Ei,null,[e]),i||Ll,Ll,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?hp.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r,o),LT(s,e,o)}hp=MT.slice,st={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(a){e=a}throw e}},RT=0,z_=function(e){return e!=null&&e.constructor==null},_i.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=yo({},this.state),typeof e=="function"&&(e=e(yo({},n),this.props)),e&&yo(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),IT(this))},_i.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),IT(this))},_i.prototype.render=Ei,Ss=[],NT=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$_=function(e,t){return e.__v.__b-t.__v.__b},pp.__r=0,AT=/(PointerCapture)$|Capture$/i,q_=0,W_=xT(!1),G_=xT(!0),N2=0;var eE,nr,Q_,VT,UT=0,YT=[],sn=st,HT=sn.__b,jT=sn.__r,$T=sn.diffed,WT=sn.__c,GT=sn.unmount,zT=sn.__;function L2(e,t){sn.__h&&sn.__h(nr,e,UT||t),UT=0;var n=nr.__H||(nr.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function nE(e,t){var n=L2(eE++,7);return V2(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function F2(){for(var e;e=YT.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(mp),e.__H.__h.forEach(tE),e.__H.__h=[]}catch(t){e.__H.__h=[],sn.__e(t,e.__v)}}sn.__b=function(e){nr=null,HT&&HT(e)},sn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),zT&&zT(e,t)},sn.__r=function(e){jT&&jT(e),eE=0;var t=(nr=e.__c).__H;t&&(Q_===nr?(t.__h=[],nr.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(mp),t.__h.forEach(tE),t.__h=[],eE=0)),Q_=nr},sn.diffed=function(e){$T&&$T(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(YT.push(t)!==1&&VT===sn.requestAnimationFrame||((VT=sn.requestAnimationFrame)||B2)(F2)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Q_=nr=null},sn.__c=function(e,t){t.some(function(n){try{n.__h.forEach(mp),n.__h=n.__h.filter(function(r){return!r.__||tE(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],sn.__e(r,n.__v)}}),WT&&WT(e,t)},sn.unmount=function(e){GT&>(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{mp(r)}catch(i){t=i}}),n.__H=void 0,t&&sn.__e(t,n.__v))};var qT=typeof requestAnimationFrame=="function";function B2(e){var t,n=function(){clearTimeout(r),qT&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);qT&&(t=requestAnimationFrame(n))}function mp(e){var t=nr,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),nr=t}function tE(e){var t=nr;e.__c=e.__(),nr=t}function V2(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}var U2=Symbol.for("preact-signals");function iE(){if(Za>1)Za--;else{for(var e,t=!1;Fl!==void 0;){var n=Fl;for(Fl=void 0,rE++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&ZT(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(rE=0,Za--,t)throw e}}var St=void 0,Fl=void 0,Za=0,rE=0,gp=0;function KT(e){if(St!==void 0){var t=e.n;if(t===void 0||t.t!==St)return t={i:0,S:e,p:St.s,n:void 0,t:St,e:void 0,x:void 0,r:t},St.s!==void 0&&(St.s.n=t),St.s=t,e.n=t,32&St.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=St.s,t.n=void 0,St.s.n=t,St.s=t),t}}function an(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}an.prototype.brand=U2;an.prototype.h=function(){return!0};an.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};an.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};an.prototype.subscribe=function(e){var t=this;return Dn(function(){var n=t.value,r=St;St=void 0;try{e(n)}finally{St=r}})};an.prototype.valueOf=function(){return this.value};an.prototype.toString=function(){return this.value+""};an.prototype.toJSON=function(){return this.value};an.prototype.peek=function(){var e=St;St=void 0;try{return this.value}finally{St=e}};Object.defineProperty(an.prototype,"value",{get:function(){var e=KT(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(rE>100)throw new Error("Cycle detected");this.v=e,this.i++,gp++,Za++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{iE()}}}});function br(e){return new an(e)}function ZT(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function XT(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function JT(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Xa(e){an.call(this,void 0),this.x=e,this.s=void 0,this.g=gp-1,this.f=4}(Xa.prototype=new an).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===gp))return!0;if(this.g=gp,this.f|=1,this.i>0&&!ZT(this))return this.f&=-2,!0;var e=St;try{XT(this),St=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return St=e,JT(this),this.f&=-2,!0};Xa.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}an.prototype.S.call(this,e)};Xa.prototype.U=function(e){if(this.t!==void 0&&(an.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Xa.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Xa.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=KT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function oE(e){return new Xa(e)}function QT(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Za++;var n=St;St=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,sE(e),r}finally{St=n,iE()}}}function sE(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,QT(e)}function H2(e){if(St!==this)throw new Error("Out-of-order effect");JT(this),St=e,this.f&=-2,8&this.f&&sE(this),iE()}function Bl(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Bl.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Bl.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,QT(this),XT(this),Za++;var e=St;return St=this,H2.bind(this,e)};Bl.prototype.N=function(){2&this.f||(this.f|=2,this.o=Fl,Fl=this)};Bl.prototype.d=function(){this.f|=8,1&this.f||sE(this)};function Dn(e){var t=new Bl(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var cE,aE;function Ja(e,t){st[e]=t.bind(null,st[e]||function(){})}function vp(e){aE&&aE(),aE=e&&e.S()}function ex(e){var t=this,n=e.data,r=$2(n);r.value=n;var i=nE(function(){for(var s=t.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return t.__$u.c=function(){var o,a=t.__$u.S(),l=i.value;a(),z_(l)||((o=t.base)==null?void 0:o.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},oE(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}ex.displayName="_st";Object.defineProperties(an.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ex},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Ja("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var s=r[i];s instanceof an&&(n||(t.__np=n={}),n[i]=s,r[i]=s.peek())}}e(t)});Ja("__r",function(e,t){vp();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var s;return Dn(function(){s=this}),s.c=function(){r.__$f|=1,r.setState({})},s}())),cE=r,vp(n),e(t)});Ja("__e",function(e,t,n,r){vp(),cE=void 0,e(t,n,r)});Ja("diffed",function(e,t){vp(),cE=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var s=n.U;if(s)for(var o in s){var a=s[o];a!==void 0&&!(o in r)&&(a.d(),s[o]=void 0)}else n.U=s={};for(var l in r){var c=s[l],h=r[l];c===void 0?(c=j2(n,l,h,i),s[l]=c):c.o(h,i)}}}e(t)});function j2(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,s=br(n);return{o:function(o,a){s.value=o,r=a},d:Dn(function(){var o=s.value.value;r[t]!==o&&(r[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Ja("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var s=r[i];s&&s.d()}}}}else{var o=t.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}e(t)});Ja("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});_i.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var s in e)if(s!=="__source"&&e[s]!==this.props[s])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function $2(e){return nE(function(){return br(e)},[])}var yp=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}},_p=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}},lE=class{id;mID;name;groupID;groupName;isSelected;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.name=e.name,this.groupID=e.groupID,this.groupName=e.groupName,this.isSelected=e.isSelected??!1}},wi=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(t=>new yp(t))??[],this.link=e.link,this.price=new _p(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=br(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=br(void 0)),this.sellingPlans=e.sellingPlans?.map(t=>{let n=new lE(t);return n.isSelected&&(this.selectedSellingPlan.value=n),n})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}},Kn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=br(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=br(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}set variants(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}update(e){return this.id=e.id,this.mID=e.mID,this.name=e.name,this.status=e.status,this.ctg=e.ctg,this.imgs=e.imgs,this.desc=e.desc,this.sDesc=e.sDesc,this.link=e.link,this.slug=e.slug,this.quantity=e.quantity,this.meta=e.meta,this.category=e.category,this.videos=e.videos,this.reviews=e.reviews,this.portraitVideos=e.videos?.filter(t=>t.orientation==="PORTRAIT"),this.tags=e.tags,e.vars&&(this.vars=e.vars.map(t=>new wi(t))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new fn({id:this.id,mID:this.mID,vID:e.mID,vName:e.name,name:this.name,link:this.link,slug:this.slug,price:e.price.d,imageURL:e.getOneImage()??this.imgs?.[0].url})}},Ep=class{id;mID;handle;title;imageURL;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.handle=e.handle,this.title=e.title,this.imageURL=e.imageURL}},uE=class{enabled;constructor(e){this.enabled=e.enabled}},dE=class extends uE{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},wp=class{productQuantity;constructor(e){e??={},this.productQuantity=new dE(e.productQuantity)}},Ds=class{s;g;i;constructor(e){e.s&&(this.s=new Ut(e.s)),e.g&&(this.g=new Vl(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},Ul="a-f\\d",W2=`#?[${Ul}]{3}[${Ul}]?`,G2=`#?[${Ul}]{6}([${Ul}]{2})?`,z2=new RegExp(`[^#${Ul}]`,"gi"),q2=new RegExp(`^${W2}$|^${G2}$`,"i");function fE(e,t={}){if(typeof e!="string"||z2.test(e)||!q2.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let r=Number.parseInt(e,16),i=r>>16,s=r>>8&255,o=r&255,a=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[i,s,o,a];if(t.format==="css"){let l=a===1?"":` / ${Number((a*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${l})`}return{red:i,green:s,blue:o,alpha:a}}var Ut=class{h;a=100;g;constructor(e){e??={},this.h=e.h,this.a=e.a,this.g=e.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return fE(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}},Is=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new Ut(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return tx[this.s??1]}},tx=(e=>(e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e))(tx||{}),Vl=class US{static DEFAULT_FALLBACK=new Ut({h:"#000000",a:50});r;c;fb;constructor(t){this.r=t.r,t.c&&(this.c=new Ut(t.c)),t.fb&&(this.fb=new Ut(t.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??US.DEFAULT_FALLBACK}},Hl=class{blur;spr;clr;x;y;constructor(e){e=e??{},this.blur=e.blur??0,this.spr=e.spr??0,this.x=e.x??0,this.y=e.y??0,this.clr=new Ut(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}},zi=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(e){e=e??{},this.pl=e.pl??0,this.pr=e.pr??0,this.pt=e.pt??0,this.pb=e.pb??0,this.ml=e.ml??0,this.mr=e.mr??0,this.mt=e.mt??0,this.mb=e.mb??0,this.cent=e.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}},Ts=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}},rr=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new Ds(e.bg)),e.br&&(this.br=new Is(e.br)),e.shd&&(this.shd=new Hl(e.shd)),e.spc&&(this.spc=new zi(e.spc)),this.trf=new Ts(e.trf),this.clc=e.clc,this.w=e.w,this.h=e.h,this.x=e.x,this.y=e.y,this.a=e.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Ft[this.t]}get click(){return this.clc}},Ft=(e=>(e[e.IMAGE=1]="IMAGE",e[e.TEXT=2]="TEXT",e[e.BUTTON=3]="BUTTON",e[e.FLEXBOX=4]="FLEXBOX",e[e.MULTI_COLUMN=5]="MULTI_COLUMN",e[e.CHECKBOX=6]="CHECKBOX",e[e.PRODUCTS=11]="PRODUCTS",e[e.PRODUCT=12]="PRODUCT",e[e.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",e[e.PRODUCT_TITLE=14]="PRODUCT_TITLE",e[e.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",e[e.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",e[e.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",e[e.PRODUCT_RATING=19]="PRODUCT_RATING",e[e.EMAIL_INPUT=51]="EMAIL_INPUT",e[e.PHONE_INPUT=52]="PHONE_INPUT",e[e.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",e[e.CAROUSEL=62]="CAROUSEL",e[e.SHAPE=100]="SHAPE",e))(Ft||{}),xs=class extends rr{constructor(e){super(e)}},qi=class extends rr{src;constructor(e){super(e),this.src=e.src}},Qa=(e=>(e[e.START=0]="START",e[e.CENTER=1]="CENTER",e[e.END=2]="END",e[e.JUSTIFY=3]="JUSTIFY",e))(Qa||{}),bp=class{name;fonts;constructor(e){e=e??{},e.name&&(e.name=e.name!=="Arial"?e.name:""),this.name=e.name,this.fonts=e.fonts?.map(t=>new pE(t))}},pE=class{style;url;constructor(e){e=e??{},this.style=e.style,this.url=e.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}},In=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return Qa[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(e){e=e??{},e.lh&&(this.lh=e.lh),e.tdc&&(this.tdc=new Ut(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new Ut(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new bp(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}},bi=class extends rr{typo;constructor(e){super(e);let t=w(w({},e.f),e.typo);e.alg&&(t.ta=e.alg),e.c&&(t.tc=e.c),this.typo=new In(t)}get color(){return this.typography.tc}get typography(){return this.typo}},_o=class extends bi{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}},Cp=class extends rr{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},ec=class{dd;hh;mm;ss;date;constructor(e){e??={},this.dd=e.dd??0,this.hh=e.hh??0,this.mm=e.mm??0,this.ss=e.ss??0,this.date=e.date?new Date(e.date):void 0}start(e,t){let n=new Date;e===2?(n.setSeconds(n.getSeconds()+this.ss),n.setMinutes(n.getMinutes()+this.mm),n.setHours(n.getHours()+this.hh),n.setDate(n.getDate()+this.dd)):n=this.date??new Date;let r=window.setInterval(()=>{let i=new Date().getTime(),s=n.getTime()-i;if(s<1){clearInterval(r);return}let o=Math.floor(s/(1e3*60*60*24)),a=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),c=Math.floor(s%(1e3*60)/1e3);t({days:o,hours:a,minutes:l,seconds:c})},1e3);return r}},tc=class extends bi{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new ec(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Sp=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Ut(e.c??{})}get text(){return this.txt}get color(){return this.c}},Eo=class extends bi{ph;constructor(e){super(e),this.ph=new Sp(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},nc=class extends Eo{constructor(e){e??={},super(e)}},rc=class extends Eo{},ic=class extends Eo{},oc=class extends qi{},Dp=class{en;ex;constructor(e){e=e??{},this.en=e.en,this.ex=e.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}},jl=class extends rr{gvt;max;cover;anim;embedded;position;constructor(e){e=e??{},super(e),this.gvt=e.gvt??5,this.max=e.max,this.cover=e.cover??!0,this.anim=new Dp(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new zi({pl:k.IN_APP_DEFAULT_PADDING,pr:k.IN_APP_DEFAULT_PADDING,pt:k.IN_APP_DEFAULT_PADDING,pb:k.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}},Ip=class extends jl{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new Cp(e.cont),this.mob=new jl(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(t=>{t.t===1?this.elems.push(new qi(t)):t.t===2?this.elems.push(new _o(t)):t.t===3?this.elems.push(new _o(t)):t.t===100?this.elems.push(new xs(t)):t.t===51?this.elems.push(new rc(t)):t.t===52?this.elems.push(new ic(t)):t.t===61?this.elems.push(new tc(t)):t.t===15||t.t===16?this.elems.push(new nc(t)):t.t===13&&this.elems.push(new oc(t))})}getStylesForWrapper(){if(this.cover)return{};let e;return this.gvt===1?e={top:0,left:0}:this.gvt===2?e={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?e={top:0,right:0}:this.gvt===6?e={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?e={bottom:0,right:0}:this.gvt===8?e={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?e={bottom:0,left:0}:this.gvt===4?e={top:"50%",left:0,transform:"translateY(-50%)"}:e={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},e.overflow="visible",e}getFlexStylesForContainer(){let e={display:"flex",flexDirection:"row"},t,n;return this.gvt===1?(t="flex-start",n="flex-start"):this.gvt===2?(t="center",n="flex-start"):this.gvt===3?(t="flex-end",n="flex-start"):this.gvt===4?(t="flex-start",n="center"):this.gvt===6?(t="flex-end",n="center"):this.gvt===7?(t="flex-start",n="flex-end"):this.gvt===8?(t="center",n="flex-end"):this.gvt===9?(t="flex-end",n="flex-end"):(t="center",n="center"),e.alignItems=n,e.justifyContent=t,e.overflow="visible",e}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}},sc=class{gap;dir;wrap;jc;ai;scroll;constructor(e){e??={},this.gap=e.gap??0,this.dir=e.dir??"row",this.wrap=e.wrap??"nowrap",this.jc=e.jc??"flex-start",this.ai=e.ai??"flex-start",this.scroll=e.scroll}},Tp=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(e){e??={},this.of=e.of,this.disp=e.disp,this.pos=e.pos,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.zIndex=e.zIndex}},xp=class{w;h;maxW;maxH;minW;minH;constructor(e){e??={},this.w=e.w??"100%",this.h=e.h??"auto",this.maxW=e.maxW,this.maxH=e.maxH,this.minW=e.minW,this.minH=e.minH}},Rp=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new zi(e.spc),e.size&&(this.size=new xp(e.size)),e.bg&&(this.bg=new Ds(e.bg)),e.br&&(this.br=new Is(e.br)),e.typo&&(this.typo=new In(e.typo)),e.lout&&(this.lout=new Tp(e.lout)),e.flex&&(this.flex=new sc(e.flex))}},ac=class{sm;lg;constructor(e){e??={},this.sm=new Rp(e.sm),this.lg=new Rp(e.lg)}},gn=class{t;style;hide;when;clc;constructor(e,t){t??={},this.t=e,this.style=new ac(t.style),this.hide=t.hide,t.when?.op&&(this.when=t.when),t.clc&&(this.clc=t.clc)}get stringType(){return Ft[this.t]}},vn=class extends gn{text;constructor(e,t){e?.style?.lg?.typo?.s&&delete e.style.lg.typo.s,e?.style?.sm?.typo?.s&&delete e.style.sm.typo.s,super(t??2,e),e??={},this.text=e.text}},Rs=class extends vn{constructor(e,t){super(e,t??3)}},cc=class extends gn{value;constructor(e){super(6,e),e??={},this.value=e.value}},lc=class extends vn{constructor(e=15,t){super(t,e)}},Np=class extends gn{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Ut(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}},nx=Fe(is()),hE=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Ut(e.color)}},mE=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Ut(e.color)}},$l=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new mE(e.navigation),this.pagination=new hE(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},Ap=class extends gn{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=ir.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new $l(e.conf),this.allowedTypes=e.allowedTypes}},Mp=class extends vn{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new ec(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},wo=class extends gn{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(t=>{let n=ir.getParsedElement(t);n&&this.elems.push(n)})}},Ns=class extends gn{src;sm;lg;constructor(e,t){super(t??1,e),e&&this.update(e)}update(e){this.src=e.src,this.sm=e.sm,this.lg=e.lg}},ir=class BS{static getParsedElements(t){let n=[];return t?.forEach(r=>{let i=BS.getParsedElement(r);i&&n.push(i)}),n}static getParsedElement(t){switch(t.t){case 2:return new vn(t);case 3:return new Rs(t);case 6:return new cc(t);case 11:return new Op(t);case 12:return new bo(t);case 61:return new Mp(t);case 4:return new wo(t);case 1:return new Ns(t);case 13:return new Ns(t,13);case 14:return new vn(t,14);case 15:case 16:return new lc(t.t,t);case 18:return new Rs(t,18);case 62:return new Ap(t);case 19:return new Np(t);default:nx.default.error("Unknown element type",t.t);return}}static parseAlignmentToJustifyContent(t){switch(t){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}},bo=class extends gn{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(e){if(e??={},super(12,e),this.show=e.show,this.elems=ir.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new cc(e.cBox)),this.elems.push(new Ns(e.img,13));let t=new vn(e.title,14);t.hide=!e.show?.title,t.text="{{ product.name }}",this.elems.push(t);let n=new vn(e.price);n.text="{{ product.price }}",n.hide=!e.show?.price;let r=new vn(e.compareAt);r.text="{{ product.compare_price }}",r.hide=!e.show?.price,e.compareAt||(r.style=new ac(n.style),r.style.lg.typo=new In(re(w({},r.style.lg.typo),{td:"line-through"})),r.style.sm.typo=new In(re(w({},r.style.sm.typo),{td:"line-through"})));let i=new wo({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:ir.parseAlignmentToJustifyContent(n.style.lg.typo?.ta)}}}});i.elems.push(r),i.elems.push(n),this.elems.push(i);let s=new lc(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let o=new Rs(e.btn,18);o.hide=!e.show?.btn,this.elems.push(o)}}e.symbol&&(this.symbol=new vn(e.symbol))}},Op=class extends gn{conf;prod;constructor(e){super(11,e),e??={},this.conf=new gE(e.conf),this.prod=new bo(e.prod)}},Pp=class extends $l{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},gE=class{lg;sm;constructor(e){e??={},this.lg=new Pp(e.lg),this.sm=new Pp(e.sm)}},kp=class extends wo{constructor(e){super(e)}},uc=class{cont;elems=[];constructor(e){e=e??{},this.cont=new kp(e.cont),e.elems?.forEach(t=>{this.addRawElement(t)})}addRawElement(e){let t=ir.getParsedElement(e);return t&&this.elems.push(t),t}},rx=Fe(Qn()),vE=class{minValue;rewardType;label;reachingText;reachedText;discount;items;calculatedAlignment;constructor(e){this.minValue=e.minValue,this.rewardType=e.rewardType,this.label=e.label,this.reachingText=e.reachingText,this.reachedText=e.reachedText,this.discount=e.discount,this.items=e.items?.map(t=>new fn(t))}},Lp=class{layout;milestones;onlyLatestGift;constructor(e){this.layout=e.layout??rx.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(t=>new vE(t))??[],this.onlyLatestGift=e.onlyLatestGift}},Fp=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}},Bp=class{id;alt;sources;items;constructor(e={}){this.id=e.id,this.alt=e.alt,this.sources=e.sources,this.items=e.items?e.items.map(t=>new fn(t)):[]}},yE=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))(yE||{}),_E=(e=>(e.SWIPER="SWIPER",e.STORY="STORY",e.FLOATING_POPUP="FLOATING_POPUP",e))(_E||{}),Vp=class{videos;source;template;heading;constructor(e={}){this.videos=e.videos?.map(t=>new Bp(t))??[],this.source=e.source,this.template=e.template,this.heading=e.heading}},wE=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(e){this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.delay=e.delay??0,this.redirectBehaviour=e.redirectBehaviour,this.onsiteDeliveryType=e.onsiteDeliveryType,this.objective=e.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===Un.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===Un.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===Un.EngagementContentType.SINGLE}},or=class FS extends wE{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;discountData=br({});constructor(t){super(t),this.id=t.id,this.nudgeID=t.nudgeID,this.currency=Oe.get().currencyCode??"USD",this.contentID=t.contentID,this.variation=t.variation,t.widget&&(this.widget=new uc(t.widget)),this.previewType=t.previewType,this.occurred=t.occurred??new Date,this.props=t.props,this.embeddedItems=t.embeddedItems?.map(n=>new fn(n)),this.items=t.items?.map(n=>new Kn(n))??[],this.nonMutableItems=t.items?.map(n=>new Kn(n))??[],this.collections=t.collections?.map(n=>new Ep(n))??[],this.discount=t.discount,this.placement=t.placement,this.customerData=t.customerData,this.ian=t.ian?this.processPopup(t.ian):void 0,this.promotionType=t.promotionType,this.manipulation=new wp(t.manipulation),this.contentSource=t.contentSource,this.klaviyoFormID=t.klaviyoFormID,this.hasMultiplePlacement=t.hasMultiplePlacement,this.skipSubscribedItems=t.skipSubscribedItems,t.progressBarConfig&&(this.progressBarConfig=new Lp(t.progressBarConfig)),t.bundleConfig&&(this.bundleConfig=new Fp(t.bundleConfig)),t.bundleFrom&&(this.bundleFrom=new Kn(t.bundleFrom)),t.content?.videoConfig&&(this.content={videoConfig:new Vp(t.content.videoConfig)})}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let t=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-t}isBundle(){return this.objective===Un.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===Un.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===Un.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===Un.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===Un.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===Un.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===Un.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isBYOB(){return this.objective===Un.EngagementObjective.BYOB}isShoppableVideo(){return this.objective===Un.EngagementObjective.SHOPPABLE_VIDEO}processPopup(t){let n=JSON.stringify(t),r=this.items[0],i={},s={};if(r){let l=r.selectedOrFirstVariant.value;i={name:r.name,id:r.mID,link:r.link,vID:l.mID,image:r.variantImage,price:fe.formatCurrency(l.price.d),comparePrice:fe.formatCurrency(l.price.cmp),quantity:r.quantity},s={quantity:l.quantity}}let o={productCount:Ye.getCurrent().item_count},a=mn.render(n,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return r&&(a=a.replace(new RegExp(k.PLACEHOLDER_IMAGE,"gi"),r.variantImage??r.imageURL)),new Ip(JSON.parse(a))}calculateDiscountData(t,n){let r=EE.ArrayUtils.sum(t,s=>s.selectedOrFirstVariant.value.price.d),i={actualPrice:r,discountAmount:0,discountPercentage:0,discountedPrice:r};if(!t?.length||!n||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(i);return}if(Co.DiscountType.BXGY===this.discount.type&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],this.updateEffectivePrice(t,i.discountPercentage,!0),i.discountAmount=i.actualPrice-EE.ArrayUtils.sum(t,s=>s.selectedOrFirstVariant.value.effectivePrice.value);else if([Co.DiscountType.UNIQUE_FLAT_ITEMS,Co.DiscountType.STATIC].includes(this.discount.type)&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],i.discountAmount=i.actualPrice*i.discountPercentage/100,this.updateEffectivePrice(t,i.discountPercentage);else if(this.discount.type===Co.DiscountType.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)i.discountAmount=i.actualPrice-this.discount.values[0],i.discountPercentage=i.discountAmount/i.actualPrice*100,this.updateEffectivePrice(t,i.discountPercentage);else if(this.discount.type===Co.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){t.sort((o,a)=>a.selectedOrFirstVariant.value.price.d-o.selectedOrFirstVariant.value.price.d);let s=t[t.length-1];s.selectedOrFirstVariant.value.effectivePrice.value=0,i.discountAmount=s.selectedOrFirstVariant.value.price.d,i.discountPercentage=i.discountAmount/i.actualPrice*100}i.discountedPrice=i.actualPrice-i.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(i)}getPrivateAttributesForLineItem(){return Ot.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return Ot.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[Co.DiscountType.UNIQUE_FIXED_ITEMS,Co.DiscountType.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){let t=this.widget?.elems.find(r=>FS.SWIPER_ELEMENTS.has(r.t));if(!t)return!1;if(t.t===62)return!0;let n=tr.get().isMobile()?"sm":"lg";return t.conf[n].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let t=Ye.getCurrent();return{productCount:t.item_count,amount:fe.formatCurrency(t.total_price/100),originalAmount:fe.formatCurrency(t.original_total_price/100)}}updateEffectivePrice(t,n,r=!1){let i=Oe.get().getCurrentItem();t.forEach(s=>{let o=s.selectedOrFirstVariant.value,a=o.price;if(r&&s.mID===i.mID)o.effectivePrice.value=a.d;else{let l=a.d*n/100;o.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(t){if(!t)return{};let n={discountPercentage:fe.formatNumber(t.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice"].map(r=>{n[r]=fe.formatCurrency(t[r])}),n}},Ql=Fe(Qn()),ax=Fe(j_()),cx=Fe(va()),dc=class{constructor(e,t){this._startTime=e,this._triggerData=t}intervals=[];selectedEmbeddedItems;renderer;closeCallback;inputFields=[];get startTime(){return this._startTime}get triggerData(){return this._triggerData}get inputs(){return this.inputFields}get rootClassName(){let e=this.triggerData.shortID??this.triggerData.id.slice(-6);return e==="test"&&(e="test-"+this.startTime.getTime().toString()),k.IN_APP_WRAPPER_NAME+"-"+e}get selectedItems(){return this.triggerData.items.filter(e=>e.selected.value)}get shouldGiveFBTDiscount(){let e=this.selectedItems.length;return this.triggerData.bundleConfig?.applyDiscountOnMinimum?this.triggerData.bundleConfig.applyDiscountOnMinimum<=e:e===this.triggerData.items.length}onClose(e){this.closeCallback=e}closeInApp(e,t){t??={};let n=(new Date().getTime()-this.startTime.getTime())/1e3,r=w({eventName:e,duration:n},t);this.stopIntervals(),this.closeCallback&&this.closeCallback(r)}addInputField(e,t){this.inputFields.push({id:e,type:t,isValid:!1})}updateValidation(e,t){this.inputFields.forEach(n=>{if(n.id===e){n.isValid=t;return}})}hasManipulatedProductQuantity(){let e=this.triggerData.manipulation.productQuantity;return e?.enabled&&e.min!=null&&e.max!=null}getManipulatedQuantity(e){let{min:t=1,max:n=100}=this.triggerData.manipulation.productQuantity;if(t>n)return S.error("Invalid range: min should be less than or equal to max."),e;if(e>=t&&e<=n)return e;let r=e%100;return r<t?t:r>n?n:r}stopIntervals(){this.intervals.forEach(e=>clearInterval(e))}},lx=Fe(is()),ix=Fe(k_()),As=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return Tt.isShopify()}},K2=(0,ix.default)(fetch),Z2={retryDelay:k.API_CALL_RETRY_DELAY,retryOn:(e,t,n)=>e>=k.API_CALL_MAX_ATTEMPTS?!1:!!(t!==null||n?.status&&n?.status>=500)},Mn=class jS{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new jS),this.INSTANCE}async validateSession(t){return this.post("/v1/event/validate-session",t)}updateUserData(t){this.put("/v1/user/update",t).then(async n=>{S.log("Updated user profile"),await Ms.getInstance().storeAndPopulateAuthData(n)}).catch(n=>{S.error("Error saving user profile",n)})}trackOrder(t){this.post("/v1/event/track-order",t).then(()=>{S.log("Sent Order")}).catch(n=>{S.error("Error sending track order",n)})}generateDiscount(t){return this.post("/v1/event/generate-discount",t)}updateDeviceProps(t){this.put("/v1/device/update",t).then(()=>{S.log("Updated device property")}).catch(async n=>{S.error("Error saving device property",n)})}setAPIToken(t){this.apiToken=t??""}setFirstSeen(t){this.firstSeen=t?.toUTCString()??""}get(t){return this.requestBackend("GET",t)}post(t,n){return this.requestBackend("POST",t,n)}put(t,n){return this.requestBackend("PUT",t,n)}async requestBackend(t,n,r){if(!As.isECommerceApp()&&!As.getFlags().allowEvents)return S.log(`Rejecting ${t} ${n} as this is not e-commerce app`),Promise.reject();n.startsWith("http")||(n=Rn.apiURL+n);let i=this.getDefaultHeaders(),s="keepalive"in new Request("");if(r&&!s&&JSON.stringify(r).includes("CE App Background"))try{return this.performXMLHttpRequest(n,i,r)}catch(a){return Ct.getInstance().captureException(a,{body:JSON.stringify(r)}),{}}let o={method:t,headers:i,keepalive:!0};return r&&(o.body=JSON.stringify(r)),this.request(n,o)}async request(t,n){let r=w(w({},Z2),n),i=await K2(t,r);if(!i.ok)throw i;return i.json()}performXMLHttpRequest(t,n,r){return new Promise((i,s)=>{let o=new XMLHttpRequest;o.open("POST",t,!0),n.forEach((a,l)=>{o.setRequestHeader(l,a)}),o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE)if(o.status>=200&&o.status<300)try{o.getResponseHeader("Content-Type")?.includes("application/json")?i(JSON.parse(o.responseText)):s(new Error("Content-Type of response header is not json"))}catch(a){s(a)}else s(new Error(`Received status - ${o.status}(${o.statusText})`))},o.onerror=()=>{s(new Error("Network error occurred during the request."))},o.send(JSON.stringify(r))})}getDefaultHeaders(){let t=new Headers;return t.set("content-type","application/json"),t.set("cooee-sdk",k.SDK),t.set("cooee-sdk-code",k.SDK_VERSION_CODE.toString()),t.set("cooee-sdk-version",k.SDK_VERSION),t.set("cooee-first-seen",this.firstSeen),this.apiToken&&t.append("cooee-sdk-token",this.apiToken),Rn.debug&&t.set("cooee-sdk-debug",String(1)),t}},fc=class{static sentryService=Ct.getInstance();static httpApiService=Mn.getInstance();static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let i=(await Ye.getCurrent().getNormalisedCart()).items.map(s=>s.mID);e.items=e.items.filter(s=>!i.includes(s.mID))}if(Ot.get().currencyCount<=1)return e.items;let t=e.items.length,n=e.items.map(i=>this.updatedItem(i,e.engagementID)),r=(await Promise.all(n)).filter(i=>i!=null);if(t&&!r.length){let i="Failed to fetch any product from Ajax API",s=new Pe(k.EVENT_CAMPAIGN_FAILED,{reason:i,currency:e.currency},e);throw Ue.getInstance().sendEvent(s),new Error(i)}if(e.isCartRecovery()){let i=Ye.getCurrent().items,s=[];for(let o of r)for(let a of o.vars){if(!a.isAvailable)continue;let l=i.find(d=>d.variant_id.toString()===a.mID);if(!l)continue;let c=new Kn(o);c.name=l.title;let h=new wi(a);h.name=l.variant_title,h.price.d=l.discounted_price/100,c.variants=[h],s.push(c)}return s}return r}static async updatedItem(e,t){let n=e,r,i=`/products/${n.slug}.js`;try{r=await this.httpApiService.request(i)}catch(o){return S.error(`Failed to fetch ${i}`,o),o instanceof Response?this.sentryService.captureMessage(`Shopify product fetch failed ${o.status}`,"error",{item:n,path:i},{"engagement.id":t}):this.sentryService.captureException(o,{item:n,path:i},{"engagement.id":t}),null}if(!r)return S.error("Item not found after AJAX call for:",n),null;n.name=r.title,n.tags=r.tags;let s=n.selectedOrFirstVariant.value;return n.vars.map(o=>{let a=r.variants.find(l=>l.id===+o.mID);o.name=a.title,o.isAvailable=a.available,o.price.d=a.price?a.price/100:a.price,o.price.effective=o.price.d,o.price.cmp=a.compare_at_price?a.compare_at_price/100:a.compare_at_price,+s.mID===a.id&&(s.effectivePrice.value=o.price.d)}),n}},pc=class{constructor(e){this.scalingFactor=e}getLayoutStyles(e){if(!e)return{display:"block"};let t={display:e.disp};return e.of&&(t.objectFit=e.of),e.pos==="absolute"&&(t.width="auto !important",t.position="absolute",t.right=e.right+"px",t.left=e.left+"px",t.top=e.top+"px",t.bottom=e.bottom+"px"),t}getSizeStyles(e){let t={};return e?.w&&(t.width=e.w),e?.h&&(t.height=e.h),e?.maxW&&(t.maxWidth=e.maxW),e?.maxH&&(t.maxHeight=e.maxH),e?.minW&&(t.minWidth=e.minW),e?.minH&&(t.minHeight=e.minH),t}getBorderStyles(e){if(!e)return{};let t={};return e.radius&&e.radius>0&&(t.borderRadius=this.getSizePx(e.radius)),e.width&&e.width>0&&(t.borderWidth=this.getSizePx(e.width),t.borderStyle=e.style?.toLowerCase(),e.color?this.getColourStyles(e.color,"border-color",t):t.borderColor="black"),t}getFlexStyles(e){return e?{gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai,width:"100%"}:{}}getSpaceStyles(e){let t={};return e?(t.paddingTop=this.getSizePx(e.pt),t.paddingBottom=this.getSizePx(e.pb),t.paddingLeft=this.getSizePx(e.pl),t.paddingRight=this.getSizePx(e.pr),t.marginTop=this.getSizePx(e.mt),t.marginBottom=this.getSizePx(e.mb),t.marginLeft=e.cent?"auto":this.getSizePx(e.ml),t.marginRight=e.cent?"auto":this.getSizePx(e.mr),t):(t.margin="0 !important",t.padding="unset",t)}getBackgroundStyles(e){if(!e)return{};let t={};if(e.glossy){let n="backdrop-filter",r="-webkit-"+n,i=`blur(${e.glossy.radius}px)`;if(!CSS.supports(r,i)&&!CSS.supports(n,i))return{background:e.glossy.fallback.rgba};if(t[r]=i,t[n]=i,e.glossy.color)return this.getColourStyles(e.glossy.color,"background",t)}else if(e.solid){if(e.solid.grad)return this.getGradientStyles(e.solid.grad,"background",t);if(e.solid.hex)return{backgroundColor:e.solid.rgba}}else if(e.img){if(!e.img.src)return{};let n=(e.img.a??0)/100;t.background=`linear-gradient(rgba(0, 0, 0, ${n}), rgba(0, 0, 0, ${n})),url("${e.img.src}") no-repeat center`,t.backgroundSize="cover",e.img.a&&(t["-webkit-backdrop-filter"]=`opacity(${e.img.a})`,t.backdropFilter=`opacity(${e.img.a})`)}return t}getGradientStyles(e,t,n){if(n??={},e.type==="LINEAR"){let r=`linear-gradient(${e.ang}deg, ${e.c1}, ${e.c2}`;e.c3&&(r+=`, ${e.c3}`),r+=")",n[t]=r}return n}getColourStyles(e,t="color",n){return n??={},e?e.grad?this.getGradientStyles(e.grad,t,n):(e.hex&&(n[t]=e.rgba),n):n}getSizePx(e){return this.getScaledSize(e)+"px"}getScaledSize(e){return(e??0)*this.scalingFactor}},Et=class extends _i{stylesConverter=new pc(1);renderer=tr.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new So(this.props.triggerContext,this.props.element)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(re(w(w(w(w(w(w({},this.stylesConverter.getFlexStyles(this.mediaStyle.flex)),this.stylesConverter.getBackgroundStyles(this.mediaStyle.bg)),this.stylesConverter.getBorderStyles(this.mediaStyle.br)),this.stylesConverter.getSizeStyles(this.mediaStyle.size)),this.stylesConverter.getSpaceStyles(this.mediaStyle.spc)),this.stylesConverter.getLayoutStyles(this.mediaStyle.lout)),{boxSizing:"border-box",outline:"none"}),this.getComponentStyles()),this.props.style)}matchWhenCondition(e){if(!e?.op)return!0;let{lhs:t,rhs:n}=e;switch(e.op){case"eq":return t===n;case"gt":return+t>+n;case"gte":return+t>=+n;case"lt":return+t<+n;case"lte":return+t<=+n;case"ne":return t!==n;case"null":return t==null;case"empty":return t.trim()==="";case"in":return new RegExp(`\\b${n}\\b`).test(t);case"nin":return!new RegExp(`\\b${n}\\b`).test(t);default:return S.error(`Invalid operator found for when condition - ${e.op}`),!1}}putStyleAccordingToDevice(){let e=this.props.element;this.mediaStyle=e.style.lg,this.renderer.isMobile()&&e.style.sm&&Object.keys(e.style.sm).length&&(this.mediaStyle=w(w({},this.mediaStyle),e.style.sm))}sendTriggerClicked(e,t){this.clickExecutor.sendTriggerClicked(e,t)}async onClick(e){await this.clickExecutor.execute(e)}},X2=0,hie=Array.isArray;function G(e,t,n,r,i,s){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--X2,__i:-1,__u:0,__source:i,__self:s};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return st.vnode&&st.vnode(c),c}var sr=class extends Et{componentDidMount(){this.setState(()=>({text:this.props.element.text})),Dn(this.onChange.bind(this))}componentWillReceiveProps(e){this.props.element=e.element,this.onChange()}render(){let e=this.getCompiledStyles(),t=this.state.text;return t||(e.display="none",t=""),G("div",{style:e,onClick:this.customOnClick.bind(this),className:"lc-text",children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:t}})})}customOnClick(){this.props.onClick&&this.props.onClick("title")}onChange(){if(this.props.element.text==null)return;let e=this.props.triggerContext.triggerData,t={bundle:e.discountData.value,customer:e.customerData,cart:e.getCartMagicVariables()},n=mn.render(JSON.stringify(this.props.element),t),r=new vn(JSON.parse(n));if(!this.matchWhenCondition(r.when)){this.setState(()=>({text:""}));return}this.setState(()=>({text:r.text}))}getTypoStyles(){let e={},t=this.mediaStyle.typo??new In;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily=t.fam.name||"inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,e.textDecoration=t.td??"none",this.stylesConverter.getColourStyles(t.tc,"color",e),e}getComponentStyles(){return w({},this.getTypoStyles())}getSpanStyle(){return{overflow:"hidden",display:"-webkit-box",webkitBoxOrient:"vertical",webkitLineClamp:2,color:"inherit",fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit"}}},Os=class extends sr{render(){return G("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:()=>this.onClick({item:this.props.item}),children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return re(w({},super.getComponentStyles()),{cursor:"pointer"})}},bE=class extends _i{render(){if(this.props.element.show[this.props.label.toLowerCase()])return this.props.element.lblPos==="end"?G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{children:this.props.time}),G("span",{style:this.getTimeLabelStyle(),children:this.props.label})]}):G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{style:this.getTimeLabelStyle(),children:this.props.label}),G("span",{children:this.props.time})]})}getDesign(){}getTimeLabelStyle(){return{fontSize:"0.5em",alignContent:"center"}}getElementStyle(){let e={display:"flex",flexDirection:"column",placeContent:"center center",textAlign:"center"};return this.props.element.horizontal&&(e.gridTemplateColumns="repeat(2, minmax(0, 1fr))"),e}},Wl=class extends sr{labels={Days:"00",Hours:"00",Minutes:"00",Seconds:"00"};componentWillMount(){super.componentWillMount(),this.setState(()=>w({},this.labels)),this.processAndStartTimer()}render(){return G("div",{style:this.getLabelsParentStyle(),children:Object.keys(this.labels).map(e=>G(bE,{styles:this.getCompiledStyles(),label:e,time:this.state[e],element:this.props.element}))})}getLabelsParentStyle(){return{display:"grid",justifyContent:"center",gridTemplateColumns:"repeat(4, auto)",gap:this.stylesConverter.getSizePx(this.props.element.gap)}}getDisplayStyles(){return{display:"grid",placeContent:"center center"}}getComponentStyles(){return w(w({},super.getComponentStyles()),this.getDisplayStyles())}processAndStartTimer(){this.props.element.timer.start(this.props.element.timerType,e=>{this.labels.Days=String(e.days).padStart(2,"0"),this.labels.Hours=String(e.hours).padStart(2,"0"),this.labels.Minutes=String(e.minutes).padStart(2,"0"),this.labels.Seconds=String(e.seconds).padStart(2,"0"),this.setState(()=>w({},this.labels))})}},Gl=class extends Et{componentDidMount(){Dn(()=>{this.setState(()=>({checked:this.props.item.selected.value}))})}render(){return G("div",{style:this.getCompiledStyles(),className:"lc-checkbox",children:G("input",{type:"checkbox",checked:this.state.checked,onChange:this.onChange.bind(this),style:{appearance:"auto"}})})}onChange(e){let{checked:t}=e.target;this.props.item.selected.value=t}getTypoStyles(){let e={},t=this.mediaStyle.typo??new In;return e.textAlign=t.alignment,e.justifyContent=t.alignment,e}getComponentStyles(){return re(w({},this.getTypoStyles()),{display:"flex"})}},Yi=class extends Et{constructor(e,t){super(e,t)}render(){let e=this.props.element[this.deviceTypeKey],t=e?.src||this.props.element.src||this.props.element.lg?.src;return G("img",{onClick:this.customOnClick.bind(this),className:"lc-image",alt:e?.name||"Image",onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),src:t,style:this.getCompiledStyles()})}customOnClick(){this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let t={zIndex:e.zIndex};return this.mediaStyle.size?.w&&(t.width=this.mediaStyle.size.w),this.mediaStyle.size?.h&&(t.height=this.mediaStyle.size.h),t}handleMouseEnter(e){let t=this.props.element[this.deviceTypeKey]?.secondarySrc;t&&(e.currentTarget.src=t)}handleMouseLeave(e){e.currentTarget.src=this.props.element[this.deviceTypeKey]?.src}},Ki=class extends Et{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(Do,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new sc,t={display:"flex",gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai};return e.wrap==="nowrap"&&e.scroll&&(e.dir==="column"?t["overflow-y"]="auto":t["overflow-x"]="auto"),t}},zl=class extends Ki{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(hc,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}},ql=class extends Et{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.selectedVariant.selectedSellingPlan.value?.mID??"",onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){Dn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new In;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.selectedVariant.sellingPlans?.length||(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[],t=this.props.selectedVariant;if(!t.sellingPlans?.length)return[];this.props.triggerContext.triggerData.skipSubscribedItems?t.selectedSellingPlan.value||(t.sellingPlans[0].isSelected=!0,t.changeSellingPlan(t.sellingPlans[0])):e.push(G("option",{value:"",selected:!t.selectedSellingPlan,children:"One time purchase"}));for(let n of t.sellingPlans??[])e.push(G("option",{value:n.mID,selected:n.isSelected,children:n.name}));return e}onChange(e){let t=e.target.value;t?this.props.selectedVariant.selectedSellingPlan.value=this.props.selectedVariant.sellingPlans.find(n=>n.mID===t):this.props.selectedVariant.selectedSellingPlan.value=void 0}},ox=Fe(Of()),Yl=class extends Et{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),mn.escape=ox.MustacheUtils.escapeHtml}render(){let e=this.getCompiledStyles(),t=this.getRating();return t||(e.display="none",t=""),G("div",{style:e,className:"lc-star-rating",dangerouslySetInnerHTML:{__html:t}})}getRating(){let e=this.props.element.fullStar,t=this.props.element.halfStart,n={size:this.props.element.iconSize,color:this.props.element.c.hex};e=mn.render(e,{svg:n}),t=mn.render(t,{svg:n});let r=this.props.review;if(!r?.rating)return"";let i="";if(this.props.element.showSingleStar)i=e;else{let s=5,o=`${r.rating}`.split(".");for(let a=0;a<+o[0];a++)i+=e,s--;o[1]&&(i+=t,s--);for(let a=0;a<s;a++)i+=e.replace(this.colorRegex,'fill="#f1f1f1')}return i}getComponentStyles(){return{display:"flex",alignItems:"center"}}},Kl=class extends Et{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.item.selectedOrFirstVariant.value.mID,onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){Dn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new In;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"&&(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[];for(let t of this.props.item.vars)e.push(G("option",{value:t.mID,disabled:!t.isAvailable,children:t.name}));return e}onChange(e){let t=e.target.value;this.props.item.selectedOrFirstVariant.value=this.props.item.vars.find(n=>n.mID===t)}},hc=class extends Et{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}renderElement(e){if(!(e.hide||!this.matchWhenCondition(e.when))){if(e.t===4){let t=e;return G(zl,{element:t,triggerContext:this.props.triggerContext,elements:t.elems,item:this.props.item,noLinks:this.props.noLinks})}if(e.t===6)return this.props.triggerContext.triggerData.isBundle()?G(Gl,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):void 0;if(e.t===13){let t=e,n=this.props.item,r=n.variantImage??n.imageURL,i=n.variantSecondaryImage??n.secondaryImageURL;t.lg=t.sm={src:r,name:n.name,secondarySrc:i};let s=G(Yi,{element:t,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?s:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block"},children:s})}if(e.t===14)return this.renderProductTitle(e);if(e.t===15){let t=e;return this.props.triggerContext.triggerData.isCartEmbed()&&this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"?void 0:G(Kl,{element:t,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?G(ql,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?G(Yl,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?G(Os,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):G(Do,{elements:[e],element:this.props.element,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}renderProductTitle(e){let t=G(sr,{element:e,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?t:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block",textDecoration:this.state.decoration},onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),children:t})}customOnClick(e){this.sendTriggerClicked([this.props.item.toEmbed()],{from:e})}onMouseEnter(){this.setState(()=>({decoration:"underline"}))}onMouseLeave(){this.setState(()=>({decoration:"unset"}))}},sx=Fe(ip()),Ps=class extends Et{productElement;constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),t=mn.render(e,this.getProductData());if(this.productElement=new bo(JSON.parse(t)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return G("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:G(hc,{element:this.productElement,elements:this.productElement.elems,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.productElement.noLinks})})}getComponentStyles(){return{flexShrink:0}}getProductData(){if(!this.props.item)return{};let e=this.props.item.selectedOrFirstVariant.value,t=e.price,n=this.props.item.name,r=this.props.item.category,i=fe.formatCurrency(t.d,!0),s=this.props.item.variantImage??this.props.item.imageURL,o=this.props.item.meta,a=this.props.item.tags?.join(",")??"",l=this.props.item.reviews?.rating,c=this.props.item.reviews?.totalReviews,h=t.cmp&&t.cmp>t.d,d=this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(this.props.item.quantity):this.props.item.quantity,f={name:n,price:i,quantity:d,image_url:s,meta:o,category:r,rating:l,reviews:c,tags:a},g=e.effectivePrice.value!==t.d;g&&(f.effective_price=fe.formatCurrency(e.effectivePrice.value));let m=this.props.triggerContext.triggerData.discount.type===sx.DiscountType.BXGY;if(!g&&m&&(f.effective_price=fe.formatCurrency(e.effectivePrice.value),f.price=""),h){f.compare_price=fe.formatCurrency(t.cmp);let I=t.cmp-t.d;f.discount_percent=(I/t.cmp*100).toFixed(0),f.discount_price=fe.formatCurrency(I)}let b={name:e.name,quantity:this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(e.quantity):e.quantity};return{product:f,variant:b,svg:{color:()=>"{{svg.color}}",size:()=>"{{svg.size}}"}}}};function Up(){return new Promise(e=>{let t="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(r=>r.src.includes(t))){e();return}let n=document.createElement("script");n.src=t,n.onload=()=>{e()},document.body.appendChild(n)})}function Hp(e,t){if(!e||!window.Swiper)return;let n=new window.Swiper(e,{loop:!0,slidesPerView:t.maxInRow,spaceBetween:t.gap+"px",pagination:{type:t.pagination.type,el:e.querySelector(".swiper-pagination"),clickable:!0,renderBullet:(r,i)=>`
|
|
45
|
+
`],encapsulation:2,changeDetection:0})}return e})(),tp=(()=>{class e{_platform=O(qn);_containerElement;_document=O(nt);_styleLoader=O(_s);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||y_()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;s<i.length;s++)i[s].remove()}let r=this._document.createElement("div");r.classList.add(n),y_()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(gT)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),I_=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,t,n,r){this._renderer=t,this._ngZone=n,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=t.listen(this.element,"click",r)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Ua=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new ie;_attachments=new ie;_detachments=new ie;_positionStrategy;_scrollStrategy;_locationChanges=mt.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new ie;_outsidePointerEvents=new ie;_renders=new ie;_afterRenderRef;_afterNextRenderRef;constructor(e,t,n,r,i,s,o,a,l,c=!1,h,d){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=s,this._document=o,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=c,this._injector=h,this._renderer=d,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=mv(()=>qg(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Qr(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=w(w({},this._config),e),this._updateElementSize()}setDirection(e){this._config=re(w({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=Yt(this._config.width),e.height=Yt(this._config.height),e.minWidth=Yt(this._config.minWidth),e.minHeight=Yt(this._config.minHeight),e.maxWidth=Yt(this._config.maxWidth),e.maxHeight=Yt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new I_(this._document,this._renderer,this._ngZone,t=>{this._backdropClick.next(t)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,t,n){let r=m_(t||[]).filter(i=>!!i);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(Gr(no(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},dT="cdk-overlay-connected-position-bounding-box",n2=/([A-Za-z%]+)$/,T_=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new ie;_resizeSubscription=mt.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,t,n,r,i){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=i,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(dT),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,i=[],s;for(let o of this._preferredPositions){let a=this._getOriginPoint(e,r,o),l=this._getOverlayPoint(a,t,o),c=this._getOverlayFit(l,t,n,o);if(c.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(o,a);return}if(this._canFitWithFlexibleDimensions(c,l,n)){i.push({position:o,origin:a,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(a,o)});continue}(!s||s.overlayFit.visibleArea<c.visibleArea)&&(s={overlayFit:c,overlayPoint:l,originPoint:a,position:o,overlayRect:t})}if(i.length){let o=null,a=-1;for(let l of i){let c=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);c>a&&(a=c,o=l)}this._isPushed=!1,this._applyPosition(o.position,o.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&bs(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(dT),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,o=this._isRtl()?e.left:e.right;r=n.originX=="start"?s:o}t.left<0&&(r-=t.left);let i;return n.originY=="center"?i=e.top+e.height/2:i=n.originY=="top"?e.top:e.bottom,t.top<0&&(i-=t.top),{x:r,y:i}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let i;return n.overlayY=="center"?i=-t.height/2:i=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+i}}_getOverlayFit(e,t,n,r){let i=pT(t),{x:s,y:o}=e,a=this._getOffset(r,"x"),l=this._getOffset(r,"y");a&&(s+=a),l&&(o+=l);let c=0-s,h=s+i.width-n.width,d=0-o,f=o+i.height-n.height,g=this._subtractOverflows(i.width,c,h),m=this._subtractOverflows(i.height,d,f),b=g*m;return{visibleArea:b,isCompletelyWithinViewport:i.width*i.height===b,fitsInViewportVertically:m===i.height,fitsInViewportHorizontally:g==i.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,i=n.right-t.x,s=fT(this._overlayRef.getConfig().minHeight),o=fT(this._overlayRef.getConfig().minWidth),a=e.fitsInViewportVertically||s!=null&&s<=r,l=e.fitsInViewportHorizontally||o!=null&&o<=i;return a&&l}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=pT(t),i=this._viewportRect,s=Math.max(e.x+r.width-i.width,0),o=Math.max(e.y+r.height-i.height,0),a=Math.max(i.top-n.top-e.y,0),l=Math.max(i.left-n.left-e.x,0),c=0,h=0;return r.width<=i.width?c=l||-s:c=e.x<this._viewportMargin?i.left-n.left-e.x:0,r.height<=i.height?h=a||-o:h=e.y<this._viewportMargin?i.top-n.top-e.y:0,this._previousPushAmount={x:c,y:h},{x:e.x+c,y:e.y+h}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!r2(this._lastScrollVisibility,n)){let r=new D_(e,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=e.overlayY;e.overlayX==="center"?n="center":this._isRtl()?n=e.overlayX==="start"?"right":"left":n=e.overlayX==="start"?"left":"right";for(let i=0;i<t.length;i++)t[i].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(e,t){let n=this._viewportRect,r=this._isRtl(),i,s,o;if(t.overlayY==="top")s=e.y,i=n.height-s+this._viewportMargin;else if(t.overlayY==="bottom")o=n.height-e.y+this._viewportMargin*2,i=n.height-o+this._viewportMargin;else{let f=Math.min(n.bottom-e.y+n.top,e.y),g=this._lastBoundingBoxSize.height;i=f*2,s=e.y-f,i>g&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-g/2)}let a=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,l=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,c,h,d;if(l)d=n.width-e.x+this._viewportMargin*2,c=e.x-this._viewportMargin;else if(a)h=e.x,c=n.right-e.x;else{let f=Math.min(n.right-e.x+n.left,e.x),g=this._lastBoundingBoxSize.width;c=f*2,h=e.x-f,c>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-g/2)}return{top:s,left:h,bottom:o,right:d,width:c,height:i}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=Yt(n.height),r.top=Yt(n.top),r.bottom=Yt(n.bottom),r.width=Yt(n.width),r.left=Yt(n.left),r.right=Yt(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",i&&(r.maxHeight=Yt(i)),s&&(r.maxWidth=Yt(s))}this._lastBoundingBoxSize=n,bs(this._boundingBox.style,r)}_resetBoundingBoxStyles(){bs(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){bs(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let c=this._viewportRuler.getViewportScrollPosition();bs(n,this._getExactOverlayY(t,e,c)),bs(n,this._getExactOverlayX(t,e,c))}else n.position="static";let o="",a=this._getOffset(t,"x"),l=this._getOffset(t,"y");a&&(o+=`translateX(${a}px) `),l&&(o+=`translateY(${l}px)`),n.transform=o.trim(),s.maxHeight&&(r?n.maxHeight=Yt(s.maxHeight):i&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=Yt(s.maxWidth):i&&(n.maxWidth="")),bs(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(i.y+this._overlayRect.height)}px`}else r.top=Yt(i.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let o=this._document.documentElement.clientWidth;r.right=`${o-(i.x+this._overlayRect.width)}px`}else r.left=Yt(i.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:lT(e,n),isOriginOutsideView:C_(e,n),isOverlayClipped:lT(t,n),isOverlayOutsideView:C_(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&m_(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Nt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function bs(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function fT(e){if(typeof e!="number"&&e!=null){let[t,n]=e.split(n2);return!n||n==="px"?parseFloat(t):null}return e||null}function pT(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}function r2(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var hT="cdk-global-overlay-wrapper",x_=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(hT),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:i,maxWidth:s,maxHeight:o}=n,a=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(i==="100%"||i==="100vh")&&(!o||o==="100%"||o==="100vh"),c=this._xPosition,h=this._xOffset,d=this._overlayRef.getConfig().direction==="rtl",f="",g="",m="";a?m="flex-start":c==="center"?(m="center",d?g=h:f=h):d?c==="left"||c==="end"?(m="flex-end",f=h):(c==="right"||c==="start")&&(m="flex-start",g=h):c==="left"||c==="start"?(m="flex-start",f=h):(c==="right"||c==="end")&&(m="flex-end",g=h),e.position=this._cssPosition,e.marginLeft=a?"0":f,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=a?"0":g,t.justifyContent=m,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(hT),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},i2=(()=>{class e{_viewportRuler=O(Rl);_document=O(nt);_platform=O(qn);_overlayContainer=O(tp);constructor(){}global(){return new x_}flexibleConnectedTo(n){return new T_(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),R_=(()=>{class e{scrollStrategies=O(QV);_overlayContainer=O(tp);_positionBuilder=O(i2);_keyboardDispatcher=O(e2);_injector=O(yt);_ngZone=O(Be);_document=O(nt);_directionality=O(Es);_location=O(bv);_outsideClickDispatcher=O(t2);_animationsModuleType=O(PC,{optional:!0});_idGenerator=O(Qf);_renderer=O(ln).createRenderer(null,null);_appRef;_styleLoader=O(_s);constructor(){}create(n){this._styleLoader.load(gT);let r=this._createHostElement(),i=this._createPaneElement(r),s=this._createPortalOutlet(i),o=new Nl(n);return o.direction=o.direction||this._directionality.value,new Ua(s,r,i,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Wn),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(fr)),new zf(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function o2(e,t){}var Ha=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext},s2=(()=>{class e extends Ba{_elementRef=O(Nt);_focusTrapFactory=O(oT);_config;_interactivityChecker=O(v_);_ngZone=O(Be);_overlayRef=O(Ua);_focusMonitor=O(tT);_renderer=O(Zo);_platform=O(qn);_document=O(nt,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=O(Vr);_injector=O(yt);_isDestroyed=!1;constructor(){super(),this._config=O(Ha,{optional:!0})||new Ha,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{s(),o(),n.removeAttribute("tabindex")},s=this._renderer.listen(n,"blur",i),o=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||Qr(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=Kf(),s=this._elementRef.nativeElement;(!i||i===this._document.body||i===s||s.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=Kf();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Kf()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=at({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&Jo(u_,7),n&2){let i;Qo(i=es())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&fo("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[ri],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&At(0,o2,0,0,"ng-template",0)},dependencies:[u_],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
46
|
+
`],encapsulation:2})}return e})(),Gi=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new ie;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(e,t){this.overlayRef=e,this.config=t,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!aT(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(e),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},a2=new he("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=O(R_);return()=>e.scrollStrategies.block()}}),Al=new he("DialogData"),c2=new he("DefaultDialogConfig"),vT=(()=>{class e{_overlay=O(R_);_injector=O(yt);_defaultOptions=O(c2,{optional:!0});_parentDialog=O(e,{optional:!0,skipSelf:!0});_overlayContainer=O(tp);_idGenerator=O(Qf);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new ie;_afterOpenedAtThisLevel=new ie;_ariaHiddenElements=new Map;_scrollStrategy=O(a2);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Zh(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ti(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Ha;r=w(w({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let s=this._getOverlayConfig(r),o=this._overlay.create(s),a=new Gi(o,r),l=this._attachContainer(o,a,r);return a.containerInstance=l,this._attachDialogContent(n,a,l,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){N_(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){N_(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),N_(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new Nl({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let s=i.injector||i.viewContainerRef?.injector,o=[{provide:Ha,useValue:i},{provide:Gi,useValue:r},{provide:Ua,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,o.push(...i.container.providers(i))):a=s2;let l=new La(a,i.viewContainerRef,yt.create({parent:s||this._injector,providers:o}));return n.attach(l).instance}_attachDialogContent(n,r,i,s){if(n instanceof Or){let o=this._createInjector(s,r,i,void 0),a={$implicit:s.data,dialogRef:r};s.templateContext&&(a=w(w({},a),typeof s.templateContext=="function"?s.templateContext():s.templateContext)),i.attachTemplatePortal(new Fa(n,null,a,o))}else{let o=this._createInjector(s,r,i,this._injector),a=i.attachComponentPortal(new La(n,s.viewContainerRef,o));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,s){let o=n.injector||n.viewContainerRef?.injector,a=[{provide:Al,useValue:n.data},{provide:Gi,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!o||!o.get(Es,null,{optional:!0}))&&a.push({provide:Es,useValue:{value:n.direction,change:ko()}}),yt.create({parent:o||s,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let s=r[i];s!==n&&s.nodeName!=="SCRIPT"&&s.nodeName!=="STYLE"&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function N_(e,t){let n=e.length;for(;n--;)t(e[n])}var Sn=class{static injectScriptURL(e,t){if(!e)return;let n=document.createElement("script");n.id=t??"",n.src=e,e.includes("localhost")&&(n.type="module"),document.head.appendChild(n)}static injectRawScript(e){if(!e)return;let t=document.createElement("script");t.id="cooee-app-script",t.innerHTML=e,document.head.appendChild(t)}static injectRawCSS(e,t=document.head){if(!e)return;let n=document.createElement("style");n.textContent=e,t.appendChild(n)}static injectStylesheet(e,t=document.head){if(!e)return;let n=document.createElement("link");n.rel="stylesheet",n.href=e,e==="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"&&(n.crossOrigin="anonymous",n.onload=r=>{let i=r.currentTarget?.sheet?.cssRules;if(i){for(let s of i)if(s.type==CSSRule.FONT_FACE_RULE){let o=e.split("/"),a=o.slice(0,o.length-1).join("/"),l=s.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let c=document.createElement("style");c.appendChild(document.createTextNode(l)),document.head.appendChild(c)}}}),t.appendChild(n)}},M_=Fe(er());function l2(e,t){if(e&1&&(K(0,"div",12),$t(1,"OPEN CART "),X()),e&2){let n=q(2);ii("animate-slide-up-enter",n.atcClicked)("hidden",!n.atcClicked)}}function u2(e,t){if(e&1&&(K(0,"div",12),$t(1,"ADD TO CART "),X()),e&2){let n=q(2);ii("animate-slide-up-exit",n.atcClicked)("hidden",n.atcClicked)}}function d2(e,t){if(e&1){let n=dn();K(0,"div",3),Qe("click",function(){let r=ze(n).$implicit,i=q();return qe(i.clicked.emit(r))})("keydown",function(){let r=ze(n).$implicit,i=q();return qe(i.clicked.emit(r))}),K(1,"div",4),Re(2,"img",5),K(3,"div",6)(4,"span",7),$t(5),X(),K(6,"span",8),$t(7),Jn(8,"cooeeCurrency"),X()()(),K(9,"div",9),Qe("click",function(r){let i=ze(n).$implicit,s=q();return qe(s.clickAddToCart(r,i))})("keydown",function(r){let i=ze(n).$implicit,s=q();return qe(s.clickAddToCart(r,i))}),At(10,l2,2,4,"div",10)(11,u2,2,4,"div",11),X()()}if(e&2){let n=t.$implicit,r=q();Y(2),bn("alt",n.name),be("src",n.imageURL,zt),Y(3),hr(" ",n.name," "),Y(2),hr(" ",gr(8,9,n.price)," "),Y(2),ii("lc:bg-pink-500",!r.atcClicked)("lc:bg-black",r.atcClicked),Y(),Vt(r.atcClicked?10:11)}}var ja=class op{items;clicked=new We;performCTA=new We;atcClicked=!1;clickAddToCart(t,n){t.stopPropagation(),this.performCTA.emit({item:n,cta:this.atcClicked?M_.ClickActionType.OPEN_CART:M_.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||op)};static \u0275cmp=at({type:op,selectors:[["cooee-product-card"]],inputs:{items:"items"},outputs:{clicked:"clicked",performCTA:"performCTA"},decls:4,vars:0,consts:[[1,"lc:absolute","lc:flex","lc:bottom-2","lc:gap-2","lc:w-full","lc:z-10"],[1,"lc:flex","lc:px-18","lc:w-full","lc:gap-2","lc:overflow-x-auto"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-shrink-0","lc:flex-col","lc:gap-1","lc:bg-white/50","lc:rounded-lg","lc:p-2","lc:w-full","lc:cursor-pointer","lc:backdrop-blur-xs"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-shrink-0","lc:flex-col","lc:gap-1","lc:bg-white/50","lc:rounded-lg","lc:p-2","lc:w-full","lc:cursor-pointer","lc:backdrop-blur-xs",3,"click","keydown"],[1,"lc:flex","lc:gap-2","lc:w-full","lc:p-1"],["id","lc-item-image",1,"lc:w-16","lc:h-16","lc:object-cover","lc:box-border","lc:rounded-lg",3,"alt","src"],[1,"lc:flex","lc:flex-col","lc:gap-1","lc:text-xs"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-2"],["id","lc-item-price"],["id","lc-cta-button","tabindex","{0}",1,"lc:py-2","lc:rounded","lc:w-full","lc:text-center","lc:font-normal","lc:cursor-pointer",3,"click","keydown"],[1,"lc:text-white","lc:text-lg","lc:font-bold",3,"animate-slide-up-enter","hidden"],[1,"lc:text-white","lc:text-lg","lc:font-bold",3,"animate-slide-up-exit","hidden"],[1,"lc:text-white","lc:text-lg","lc:font-bold"]],template:function(t,n){t&1&&(K(0,"div",0)(1,"div",1),Mt(2,d2,12,11,"div",2,Lr),X()()),t&2&&(Y(2),Ot(n.items))},dependencies:[pi],styles:["@keyframes _ngcontent-%COMP%_slideUpExit{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@keyframes _ngcontent-%COMP%_slideUpEnter{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}[_nghost-%COMP%] .animate-slide-up-exit[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpExit .3s ease-out forwards}[_nghost-%COMP%] .animate-slide-up-enter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpEnter .3s ease-out forwards}"]})},Tt=class{static COOEE_URL_PREFIX="?from=cooee";static isShopify(){return!!window.Shopify}static getShopName(){if(this.isShopify())return window.Shopify.shop?.split(".")?.[0]}static getPageName(){if(!this.isShopify())return;let e=new URL(window.location.href).pathname.slice(1).split("/"),t=e[0];if(t==="")return"home";if(t==="collections")return e[2]==="products"?"product":"collection";if(t==="products")return"product";if(t==="cart")return"cart";if(location.href.includes("thank_you"))return"thank_you"}static getProductSlug(e){let t=(e.includes("://")?new URL(e).pathname:e).match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:null}static getRootPrefix(){return window.Shopify?.routes?.root??"/"}static getCartURL(e){return this.getRootPrefix()+e+this.COOEE_URL_PREFIX}},yT=Fe(k_()),f2=(0,yT.default)(fetch),np=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let n,r=Tt.getRootPrefix()+`products/${t}.js`;try{n=await(await f2(r)).json()}catch(i){S.error(`Failed to fetch ${r}`,i);let s=Ct.getInstance();i instanceof Response?s.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:e.mID,path:r}):s.captureException(i,{mID:e.mID,path:r});return}if(!n){S.error("Item not found after AJAX call for:",e.mID);return}return n}static getItemSlug(e){if(e.link)try{let t=new URL(e.link).pathname.match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:void 0}catch{return}}},rp=Fe(er()),p2=(e,t)=>t.id;function h2(e,t){if(e&1&&Re(0,"img",10),e&2){let n=t.$implicit,r=q(2);be("src",n,zt)("alt",r.item.name)}}function m2(e,t){if(e&1&&Mt(0,h2,1,2,"img",10,Lr),e&2){let n=q();Ot(n.ajaxItem.images)}}function g2(e,t){if(e&1&&Re(0,"img",10),e&2){let n=q();be("src",n.item.imageURL,zt)("alt",n.item.name)}}function v2(e,t){if(e&1&&($t(0),Jn(1,"cooeeCurrency")),e&2){let n=q();hr(" ",gr(1,1,(n.selectedVariant==null?null:n.selectedVariant.price)/100)," ")}}function y2(e,t){if(e&1&&($t(0),Jn(1,"cooeeCurrency")),e&2){let n=q();hr(" ",gr(1,1,n.item.price)," ")}}function _2(e,t){if(e&1){let n=dn();K(0,"div",20),Qe("click",function(){let r=ze(n).$implicit,i=q();return qe(i.selectedVariant=r)})("keydown",function(){let r=ze(n).$implicit,i=q();return qe(i.selectedVariant=r)}),K(1,"span",21),$t(2),X()()}if(e&2){let n=t.$implicit,r=q();ii("lc:bg-pink-100",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id)("lc:border-pink-300",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id)("lc:text-pink-700",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),Y(2),fa(n.title)}}function E2(e,t){if(e&1&&(K(0,"div",16)(1,"h4",22),$t(2,"Description"),X(),Re(3,"div",23),Jn(4,"safeHtml"),X()),e&2){let n=q();Y(3),be("innerHTML",gr(4,1,n.ajaxItem==null?null:n.ajaxItem.description),il)}}function w2(e,t){e&1&&$t(0," OPEN CART ")}function b2(e,t){e&1&&$t(0," ADD TO CART ")}var $a=class up{item;closeModel=new We;performCTA=new We;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=rp.ClickActionType;async ngOnInit(){this.ajaxItem=await np.getAjaxItem(this.item),this.processVariants()}closeDialog(){this.closeModel.emit()}clickAddToCart(t){t.vID=this.selectedVariant?.id,t.vName=this.selectedVariant?.public_title,this.performCTA.emit({item:t,cta:this.atcClicked?rp.ClickActionType.OPEN_CART:rp.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants.filter(t=>t.available&&t.title!=="Default Title")??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||up)};static \u0275cmp=at({type:up,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:29,vars:5,consts:[[1,"lc:bg-white","lc:flex","lc:flex-col","lc:h-full","lc:w-full"],[1,"lc:flex","lc:items-center","lc:justify-between","lc:px-4","lc:py-3","lc:border-b"],[1,"lc:text-xl","lc:font-bold"],[1,"lc:bg-transparent","lc:text-black/50","lc:border-0","lc:cursor-pointer",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:flex-1","lc:overflow-y-auto","lc:p-4"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:gap-4"],[1,"lc:w-full","lc:flex","lc:overflow-x-auto","lc:gap-2","lc:flex-nowrap"],[1,"lc:w-28","lc:h-28","lc:object-contain",3,"src","alt"],[1,"lc:flex","lc:flex-col","lc:gap-2","lc:mt-4","lc:w-full"],["id","lc-item-name",1,"lc:text-lg","lc:font-bold","lc:m-0"],["id","lc-item-price",1,"lc:text-pink-600","lc:font-bold","lc:text-lg"],[1,"lc:flex","lc:flex-wrap","lc:gap-2","lc:pt-2","lc:w-full"],["tabindex","{0}",1,"lc:px-3","lc:py-2","lc:rounded-lg","lc:bg-gray-100","lc:text-gray-800","lc:text-sm","lc:cursor-pointer","lc:border","lc:border-gray-200","lc:flex","lc:items-center","lc:gap-1",3,"lc:bg-pink-100","lc:border-pink-300","lc:text-pink-700"],[1,"lc:mt-4","lc:border-t","lc:pt-4","lc:w-full"],["id","lc-modal-footer",1,"lc:flex","lc:justify-center","lc:items-center","lc:px-4","lc:py-4","lc:bg-black/30","lc:rounded-lg","lc:gap-4","lc:rounded-b-none","lc:shadow-zinc-400"],["id","lc-cta-button","tabindex","{0}",1,"lc:bg-black","lc:text-white","lc:px-4","lc:py-2","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["id","lc-more-info-button","tabindex","{0}",1,"lc:bg-pink-100","lc:text-pink-600","lc:px-4","lc:py-2","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["tabindex","{0}",1,"lc:px-3","lc:py-2","lc:rounded-lg","lc:bg-gray-100","lc:text-gray-800","lc:text-sm","lc:cursor-pointer","lc:border","lc:border-gray-200","lc:flex","lc:items-center","lc:gap-1",3,"click","keydown"],[1,"lc:truncate","lc:max-w-[200px]"],[1,"lc:font-semibold","lc:m-0"],[3,"innerHTML"]],template:function(t,n){t&1&&(K(0,"div",0)(1,"div",1)(2,"h2",2),$t(3,"Shop Now"),X(),K(4,"button",3),Qe("click",function(){return n.closeDialog()}),Gn(),K(5,"svg",4),Re(6,"path",5)(7,"path",6),X()()(),Fi(),K(8,"div",7)(9,"div",8)(10,"div",9),At(11,m2,2,0)(12,g2,1,2,"img",10),X(),K(13,"div",11)(14,"h3",12),$t(15),X(),K(16,"span",13),At(17,v2,2,3)(18,y2,2,3),X()(),K(19,"div",14),Mt(20,_2,3,7,"div",15,p2),X(),At(22,E2,5,3,"div",16),X()(),K(23,"div",17)(24,"div",18),Qe("click",function(){return n.clickAddToCart(n.item)})("keydown",function(){return n.clickAddToCart(n.item)}),At(25,w2,1,0)(26,b2,1,0),X(),K(27,"div",19),Qe("click",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})})("keydown",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})}),$t(28," MORE INFO "),X()()()),t&2&&(Y(11),Vt(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?11:12),Y(4),fa(n.item.name),Y(2),Vt(n.selectedVariant!=null&&n.selectedVariant.price?17:18),Y(3),Ot(n.availableVariants),Y(2),Vt(n.ajaxItem!=null&&n.ajaxItem.description?22:-1),Y(3),Vt(n.atcClicked?25:26))},dependencies:[Aa,pi],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px;overflow:hidden}"]})};function C2(e,t){e&1&&(Gn(),K(0,"svg",1),Re(1,"path",2)(2,"path",3),X())}function S2(e,t){e&1&&(Gn(),K(0,"svg",1),Re(1,"path",2)(2,"path",4),X())}var Wa=class $p{muted;buttonClicked=new We;static \u0275fac=function(t){return new(t||$p)};static \u0275cmp=at({type:$p,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted"},outputs:{buttonClicked:"buttonClicked"},decls:3,vars:1,consts:[["id","lc-mute-button",1,"lc:bg-black/50","lc:rounded-full","lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:border-none","lc:cursor-pointer",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(t,n){t&1&&(K(0,"button",0),Qe("click",function(){return n.buttonClicked.emit()}),At(1,C2,3,0,":svg:svg",1)(2,S2,3,0,":svg:svg",1),X()),t&2&&(Y(),Vt(n.muted?1:2))},encapsulation:2})},Ga=class Af{width;static \u0275fac=function(t){return new(t||Af)};static \u0275cmp=at({type:Af,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(t,n){t&1&&(K(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Re(4,"div"),X()()()()),t&2&&(Y(3),po("width",n.width,"%"))},encapsulation:2})},xo=Fe(er()),_x=Fe(ip()),Ex=Fe(is()),D2=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|cookiehubscan|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab",I2=/bot|crawl|http|lighthouse|scan|search|spider/i,Ml;function T2(){if(Ml instanceof RegExp)return Ml;try{Ml=new RegExp(D2,"i")}catch{Ml=I2}return Ml}function wT(e){return!!e&&T2().test(e)}var bT=Fe(L_()),Ol=class{static UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"];static TW_PARAMS={utm_source:"tw_source",utm_campaign:"tw_campaign"};static getReferrer(){if(document.referrer)return document.referrer.replace(location.origin,"")}static getUTMParams(){let e;try{e=new bT.URLBuilder(location.href)}catch{return{}}let t={};this.UTM_PARAMS.forEach(r=>{let i=e.getQueryParam(r);i&&(t[r]=i)});let n={};return Object.keys(this.TW_PARAMS).forEach(r=>{let i=e.getQueryParam(this.TW_PARAMS[r]);i&&(n[r]=i)}),w(w({},n),t)}},vi=class LS{origin;path;qs;name;referrer;utmSource;utmMedium;utmCampaign;utmId;utmTerm;utmContent;constructor(t){this.name=t.name,this.path=t.path,this.qs=t.qs,this.referrer=t.referrer,this.utmSource=t.utmSource||t.utm_source,this.utmMedium=t.utmMedium||t.utm_medium,this.utmCampaign=t.utmCampaign||t.utm_campaign,this.utmId=t.utmId||t.utm_id,this.utmTerm=t.utmTerm||t.utm_term,this.utmContent=t.utmContent||t.utm_content}static parseFromCurrent(){let t=location.pathname==="/"?location.pathname:location.pathname.replace(/\/+$/,"");return new LS(w({origin:location.origin,path:t,qs:location.search,referrer:Ol.getReferrer(),name:Oe.get().pageName},Ol.getUTMParams()))}},Ve=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}},F_={d:(e,t)=>{for(var n in t)F_.o(t,n)&&!F_.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},B_={};F_.d(B_,{A:()=>A2,k:()=>V_});var R2=function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(c){try{l(r.next(c))}catch(h){s(h)}}function a(c){try{l(r.throw(c))}catch(h){s(h)}}function l(c){var h;c.done?i(c.value):(h=c.value,h instanceof n?h:new n(function(d){d(h)})).then(o,a)}l((r=r.apply(e,t||[])).next())})},N2=function(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return function(h){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,h[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&h[0]?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,r=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!((i=i.length>0&&i[i.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){o.label=h[1];break}if(h[0]===6&&o.label<i[1]){o.label=i[1],i=h;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(h);break}i[2]&&o.ops.pop(),o.trys.pop();continue}h=t.call(e,o)}catch(d){h=[6,d],r=0}finally{n=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,c])}}};function V_(){return R2(this,void 0,Promise,function(){return N2(this,function(_a){switch(_a.label){case 0:return[4,new Promise(function(resolve,reject){var browserName="Unknown";function __callback(e){resolve({isPrivate:e,browserName})}function identifyChromium(){var e=navigator.userAgent;return e.match(/Chrome/)?navigator.brave!==void 0?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium"}function assertEvalToString(e){return e===eval.toString().length}function feid(){var toFixedEngineID=0;try{eval("(-1).toFixed(-1);")}catch(e){toFixedEngineID=e.message.length}return toFixedEngineID}function isSafari(){return feid()===44}function isChrome(){return feid()===51}function isFirefox(){return feid()===25}function isMSIE(){return navigator.msSaveBlob!==void 0&&assertEvalToString(39)}function newSafariTest(){var e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){var n,r,i=(n=t.target)===null||n===void 0?void 0:n.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),__callback(!1)}catch(o){var s=o;return o instanceof Error&&(s=(r=o.message)!==null&&r!==void 0?r:o),typeof s!="string"?void __callback(!1):void __callback(s.includes("BlobURLs are not yet supported"))}finally{i.close(),window.indexedDB.deleteDatabase(e)}}}catch{__callback(!1)}}function oldSafariTest(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch{return void __callback(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch{return void __callback(!0)}__callback(!1)}function safariPrivateTest(){navigator.maxTouchPoints!==void 0?newSafariTest():oldSafariTest()}function getQuotaLimit(){var e=window;return e.performance!==void 0&&e.performance.memory!==void 0&&e.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824}function storageQuotaChromePrivateTest(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){__callback(Math.round(t/1048576)<2*Math.round(getQuotaLimit()/1048576))},function(e){reject(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function oldChromePrivateTest(){(0,window.webkitRequestFileSystem)(0,1,function(){__callback(!1)},function(){__callback(!0)})}function chromePrivateTest(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?storageQuotaChromePrivateTest():oldChromePrivateTest()}function firefoxPrivateTest(){__callback(navigator.serviceWorker===void 0)}function msiePrivateTest(){__callback(window.indexedDB===void 0)}function main(){isSafari()?(browserName="Safari",safariPrivateTest()):isChrome()?(browserName=identifyChromium(),chromePrivateTest()):isFirefox()?(browserName="Firefox",firefoxPrivateTest()):isMSIE()?(browserName="Internet Explorer",msiePrivateTest()):reject(new Error("detectIncognito cannot determine the browser"))}main()})];case 1:return[2,_a.sent()]}})})}typeof window<"u"&&(window.detectIncognito=V_);var A2=V_,CT=B_.A,TJ=B_.k,mx=Fe(is()),ST=Fe(U_()),nr=class Di{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new ST.default;constructor(){}static get(){return Di._instance||(Di._instance=new Di),Di._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===Di.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===Di.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(t){let n=t.max,r=t.cont.w,i=t.cont.h,s=t.spc,o=Di.get().getWidth(),a=Di.get().getHeight();n&&(o=o?Math.min(o,n):n,a=a?Math.min(a,n):n),a&&(o-=s.getHorizontal(),a-=s.getVertical(),o/a<r/i?this.scalingFactor=o/r:this.scalingFactor=a/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(t){return this.doc.createElement(t)}appendChild(t,n){t.appendChild(n)}setStyles(t,n){Object.assign(t.style,n)}setStyle(t,n,r){if(n){if(!r){t.style.removeProperty(n);return}t.style.setProperty(n,r,"important")}}setAttribute(t,n,r){t.setAttribute(n,r)}removeInApp(t){let n=document.querySelector(`.${t.rootClassName}`);n&&n.parentElement.removeChild(n)}setParentContainer(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}},ap=class{parser;result={};constructor(){this.parser=nr.get().getUAParser()}async get(){let e=this.result;return this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),await this.getBatteryInfo(),await this.getLocation(),e.locale=navigator.language,e.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},e.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},e.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},e.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},e.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},e.navigatorUA=navigator.userAgent,e.isHeadless=navigator.webdriver,e}getDeviceMemory(){let e=navigator;if(!e.deviceMemory)return;let t=e.deviceMemory;this.result.mem={tot:t*1024}}getNetworkType(){let e=navigator,t=e.connection||e.mozConnection||e.webkitConnection;t?.effectiveType&&(this.result.net={type:t.effectiveType})}getOrientation(){let e=screen.orientation?.type;e&&(this.result.orientation=e)}getDPI(){let e=document.createElement("div");e.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(e);let t=window.devicePixelRatio||1,n=e.offsetWidth*t;return document.body.removeChild(e),n}async getLocation(){if(!(!navigator.geolocation||!navigator.permissions||(await navigator.permissions.query({name:"geolocation"})).state!="granted"))return new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{this.result.coords=[t.coords.latitude,t.coords.longitude],e()},()=>e())})}async getBatteryInfo(){if("getBattery"in navigator)try{let e=await navigator.getBattery();this.result.bat={l:e.level*100,c:e.charging}}catch{}}},qa=class{isLocked=!1;queue=[];async acquire(){if(this.isLocked)await new Promise(e=>this.queue.push(e));else{this.isLocked=!0;return}}release(){if(this.queue.length>0){let e=this.queue.shift();e&&e()}else this.isLocked=!1}},Ye=class MS{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new qa;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new MS),this.CURRENT}async getNormalisedCart(t){await this.fetchCartFromShopify(t);let n=this.convertToCooeeCart();return t&&await ft.set(we.CURRENT_CART,n),n}async addCooeeAttributes(){await this.lock.acquire();let t=await pn.get(we.ID),n=await ft.get(we.DEVICE_ID);if(this.attributes?.letscooee_did===n&&this.attributes?.letscooee_sid===t){S.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let r={letscooee_did:n,letscooee_sid:t,__letscooee_time:new Date().toLocaleString()};S.debug("Updating Shopify cart with attributes:",r);let i=Tt.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:r})})).json();S.debug("Updated cart attributes",JSON.stringify(s)),this.update(s),this.lock.release()}update(t){return this.token=t.token,this.items=t.items,this.total_price=t.total_price,this.original_total_price=t.original_total_price,this.currency=t.currency,this.item_count=t.item_count,this.attributes=t.attributes,Oe.get().currencyCode=this.currency,S.log("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}convertToCooeeCart(){return{amount:this.total_price/100,originalAmount:this.original_total_price/100,currency:this.currency,itemCount:this.item_count,items:this.normaliseItems(this.items),token:this.token}}normaliseItems(t){if(!t)return S.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let n=[];for(let r of t){if(!r.id||!r.title){S.warn("Invalid item received",r);continue}let i={name:r.title,quantity:+r.quantity||1,mID:r.product_id?.toString(),vID:r.id.toString(),price:+r.price/100||0,properties:r.properties,key:r.key},s=r.selling_plan_allocation?.selling_plan;if(!s){n.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:s.fixed_selling_plan,id:s.id,name:s.name,recurringDeliveries:s.recurring_deliveries}},n.push(i)}return n}async fetchCartFromShopify(t){if(!t&&this.token){S.debug("Not fetching cart");return}S.debug("Fetching cart");let n=Tt.getCartURL("cart.js"),r=await(await fetch(n)).json();this.update(r)}},Cs=(e=>(e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e))(Cs||{}),Ya=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let t=Cs[e]?.toLowerCase();t&&(S.debug(`Sending ${t} intent to MS Clarity`),window.clarity("set","Cooee Intent",t))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}},Cr=class{static isOn=!1;static element;static watch(){let e=S.getDebugParam();(e==="1"||e==="on")&&Ue.getInstance().updateDeviceProps({debugTill:this.getDebugMillis()}),e==="on"?sessionStorage.cooeeDebug="1":e==="off"&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&(this.isOn=!0,this.renderDebugBar())}static prepend(e){if(!this.isOn)return;let t=document.createElement("div");t.innerHTML="• "+new Date().toLocaleString()+" - "+e,this.element.prepend(t)}static renderDebugBar(){this.element=document.createElement("div"),this.element.id="cooee-debugger",this.element.setAttribute("draggable","true"),document.body.appendChild(this.element)}static dragElement(){let e=0,t=0,n=0,r=0,i=a=>{a=a||window.event,a.preventDefault(),n=a.clientX,r=a.clientY,document.onmouseup=o,document.onmousemove=s},s=a=>{a=a||window.event,a.preventDefault(),e=n-a.clientX,t=r-a.clientY,n=a.clientX,r=a.clientY,this.element.style.top=this.element.offsetTop-t+"px",this.element.style.left=this.element.offsetLeft-e+"px"},o=()=>{document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=i}static getDebugMillis(){return new Date().getTime()+6*60*60*1e3}},kl=class extends mo{static storeName="app";static{this.storage=ya(this.storeName)}},cp=Fe(is()),yi=class VS{static INSTANCE=new VS;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(t,n){this.topics[t]||(this.topics[t]=new ie),this.topics[t].next(n)}subscriber(t){return this.topics[t]||(this.topics[t]=new ie),this.topics[t].asObservable()}},Kt=class hi{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=Pt.get().website??{};currentState=!1;drawerSubject=new xr({open:!1,firstOpen:!1});mutationObserver;firstOpen=!0;selector;shadowParentElementSelector;iconSelector=['button[drawer-to-open="cart-drawer"]','a[href="/cart"]',".header__icon--cart","#cart-icon-bubble",".cart-icon-bubble",".cart-count",'a[onclick*="handleFloCartBtn"]'].join(",");cartSelector=[hi.DEFAULT_SELECTOR,"#halo-cart-sidebar",'[role="dialog"][class*="cart" i]','[id*="section-cart" i]',"#sidebar-cart","#rebuy-cart","#mini-cart","#flo-cart-wrapper","#drawer-cart","#UpcartPopupBackDrop",'[id$="CartDrawer" i]'].join(",");constructor(){this.initialize(),document.addEventListener(k.CTA_AFTER_REFRESH_UI,this.updateBubble.bind(this))}get element(){return this.cartDrawerElement}static get(){return hi._instance||(hi._instance=new hi),hi._instance}static forceUpdate(){hi._instance=new hi}isOpen(){let t=this.inShadow?this.isPresent():this.isVisible();return cp.default.log(`Cart drawer is currently ${t?"open":"close"}`),t}open(){if(this.isOpen()){S.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let t=document.querySelector(this.iconSelector);if(!t){S.debug("No clickable cart icon found with selector",this.iconSelector);return}t.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===hi.DEFAULT_SELECTOR}isMiniCart(){return this.isShopifyDefaultDrawer()&&this.element?.id==="mini-cart"}refreshUI(t,n=!0){if(this.isMiniCart()&&this.element?._rerenderCart)this.element._rerenderCart({detail:{cart:t}});else if(this.isShopifyDefaultDrawer())this.element?.renderContents&&t&&(this.element.classList.remove("is-empty"),this.element.renderContents?.(t));else if(this.element?.onCartDrawerUpdate)this.element.onCartDrawerUpdate();else if(window.cartGiftUpdate){if(!t?.items?.[0])return;let r=t.items[0].id,i=t.items[0].quantity,s=t.items[0].price;window.cartGiftUpdate(r,s,i,"","ADD_TO_CART")}else if(window.icartCartActivityEvent)window.icartCartActivityEvent();else if(window.theme?.CartDrawer)window.theme?.CartDrawer.init?new window.theme.CartDrawer().init():new window.theme.CartDrawer;else if(window.Hs_CartDrawer?.updateSlideCart)window.Hs_CartDrawer.updateSlideCart();else if(window.theme?.fetch_side_cart)window.theme.fetch_side_cart();else if(window.theme?.Cart?.updateCart)window.theme.Cart.updateCart();else if(window.cartUpdate)window.cartUpdate();else if(this.element?._onCartRefresh)this.element._onCartRefresh();else if(window.cart?.getCart)window.cart.getCart();else if(this.element?.tagName?.toLowerCase()==="cart-drawer-component")document.dispatchEvent(new CustomEvent("action:cart:updateCartandShowCart"));else if(this.element?.id==="sidebar-cart")document.body.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{}}));else if(this.element?.id==="quick-cart"){let r=document.querySelector('a[href="/cart"]');r&&r.click()}else window.Shopify?.KT_onItemAdded?window.Shopify.KT_onItemAdded():S.info("No method found to update the cart without refreshing");document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),n&&yi.get().broadcast(k.CART_UPDATE_BROADCAST)}async initialize(){let t=this.configWebsite.cartDrawerSelector;if(!t){await this.findCartDrawer();return}let n=t.split(k.SHADOW_SPLITTER);n.length===1?(this.selector=n[0],await this.findCartDrawer()):(this.inShadow=!0,this.shadowParentElementSelector=n[0]?.trim(),this.selector=n[1]?.trim(),await this.findCartDrawerWithShadow())}async findCartDrawer(){if(!Tt.isShopify())return;let t=this.selector||this.cartSelector;if(this.cartDrawerElement=await fe.retrySelector(t),!this.cartDrawerElement){cp.default.warn("Max attempts exhausted to find cart drawer");return}cp.default.log("Found",this.cartDrawerElement,`from selector: ${t}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!Tt.isShopify()||!this.shadowParentElementSelector)return;let t=(await fe.retrySelector(this.shadowParentElementSelector))?.shadowRoot;t?.mode==="open"&&(this.cartDrawerShadowElement=t,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;let t=this.cartDrawerElement.getBoundingClientRect(),n=(window.innerHeight||document.documentElement.clientHeight)+.5,r=(window.innerWidth||document.documentElement.clientWidth)+.5,i=t.top<=n&&t.bottom>=0,s=t.left<=r&&t.right>=0,o=i&&s,a=this.cartDrawerElement.tagName.toLowerCase()===hi.DEFAULT_SELECTOR&&this.cartDrawerElement.open,l=getComputedStyle(this.cartDrawerElement),c=l.display!=="none"&&l.visibility!=="hidden"&&parseFloat(l.opacity)>0,h=!this.cartDrawerElement.hidden,d=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,f=l.transform.match(/matrix\(([^)]+)\)/),g=0,m=0;if(f){let J=f[1].split(", ").map(parseFloat);g=J[4],m=J[5]}let b=g+t.left>r||g+t.right<0||m+t.top>n||m+t.bottom<0,I=Math.max(0,Math.min(t.right,r)-Math.max(t.left,0)),A=Math.max(0,Math.min(t.bottom,n)-Math.max(t.top,0)),F=I*A,V=t.width*t.height,M=V>0&&F/V>=.1;return(o||a||!b)&&c&&h&&d&&M}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(fe.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let t=this.cartDrawerElement||this.cartDrawerShadowElement,n=new ie;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{n.next()}),this.mutationObserver.observe(t,{attributes:!0,subtree:!0,childList:this.inShadow}),n.pipe(Rr(500)).subscribe(()=>{let r=this.isOpen();this.currentState!==r&&(this.currentState=r,this.drawerSubject.next({open:r,firstOpen:this.firstOpen}),this.firstOpen&&(this.firstOpen=!1))})}isPresent(){return!this.selector||!this.cartDrawerShadowElement?!1:!!this.cartDrawerShadowElement.querySelector(this.selector)}async updateBubble(){let t=(await Ye.getCurrent().getNormalisedCart(!0)).itemCount,n=document.querySelector(".cart-link__bubble");n&&(n.innerText=t+"")}},lp=class{static processConfiguration(){let e=Pt.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Ue.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await ft.get(we.GA_CLIENT_ID),t=await this.getClientIDViaGTag();if(e!==t)return await ft.set(we.GA_CLIENT_ID,t),t}static async getClientIDViaGTag(){let e=Pt.get().gaMeasurementID;if(!(!e||!window.gtag))return new Promise(t=>{window.gtag("get",e,"client_id",n=>{t(n)})})}},px=Fe(Of()),Un=Fe(er()),Co=Fe(ip()),EE=Fe(j_()),hp,st,RT,z_,Ss,DT,NT,$_,AT,q_,W_,G_,M2,Ll={},MT=[],O2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Y_=Array.isArray;function yo(e,t){for(var n in t)e[n]=t[n];return e}function K_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Z_(e,t,n){var r,i,s,o={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?hp.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)o[s]===void 0&&(o[s]=e.defaultProps[s]);return fp(e,o,r,i,null)}function fp(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++RT,__i:-1,__u:0};return i==null&&st.vnode!=null&&st.vnode(s),s}function Ei(e){return e.children}function _i(e,t){this.props=e,this.context=t}function Ka(e,t){if(t==null)return e.__?Ka(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ka(e):null}function OT(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return OT(e)}}function IT(e){(!e.__d&&(e.__d=!0)&&Ss.push(e)&&!pp.__r++||DT!==st.debounceRendering)&&((DT=st.debounceRendering)||NT)(pp)}function pp(){var e,t,n,r,i,s,o,a;for(Ss.sort($_);e=Ss.shift();)e.__d&&(t=Ss.length,r=void 0,s=(i=(n=e).__v).__e,o=[],a=[],n.__P&&((r=yo({},i)).__v=i.__v+1,st.vnode&&st.vnode(r),X_(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[s]:null,o,s??Ka(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,LT(o,r,a),r.__e!=s&&OT(r)),Ss.length>t&&Ss.sort($_));pp.__r=0}function PT(e,t,n,r,i,s,o,a,l,c,h){var d,f,g,m,b,I,A=r&&r.__k||MT,F=t.length;for(l=P2(n,t,A,l,F),d=0;d<F;d++)(g=n.__k[d])!=null&&(f=g.__i===-1?Ll:A[g.__i]||Ll,g.__i=d,I=X_(e,g,f,i,s,o,a,l,c,h),m=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&J_(f.ref,null,g),h.push(g.ref,g.__c||m,g)),b==null&&m!=null&&(b=m),4&g.__u||f.__k===g.__k?l=kT(g,l,e):typeof g.type=="function"&&I!==void 0?l=I:m&&(l=m.nextSibling),g.__u&=-7);return n.__e=b,l}function P2(e,t,n,r,i){var s,o,a,l,c,h=n.length,d=h,f=0;for(e.__k=new Array(i),s=0;s<i;s++)(o=t[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=s+f,(o=e.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?fp(null,o,null,null,null):Y_(o)?fp(Ei,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?fp(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,(c=o.__i=k2(o,n,l,d))!==-1&&(d--,(a=n[c])&&(a.__u|=2)),a==null||a.__v===null?(c==-1&&f--,typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,o.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<h;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Ka(a)),FT(a,a));return r}function kT(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=kT(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Ka(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function k2(e,t,n,r){var i,s,o=e.key,a=e.type,l=t[n];if(l===null||l&&o==l.key&&a===l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,s=n+1;i>=0||s<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&o==l.key&&a===l.type)return i;i--}if(s<t.length){if((l=t[s])&&(2&l.__u)==0&&o==l.key&&a===l.type)return s;s++}}return-1}function TT(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||O2.test(t)?n:n+"px"}function dp(e,t,n,r,i){var s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||TT(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||TT(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(AT,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=q_,e.addEventListener(t,s?G_:W_,s)):e.removeEventListener(t,s?G_:W_,s);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function xT(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=q_++;else if(t.t<n.u)return;return n(st.event?st.event(t):t)}}}function X_(e,t,n,r,i,s,o,a,l,c){var h,d,f,g,m,b,I,A,F,V,M,J,Ne,ht,j,pe,te,de=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(h=st.__b)&&h(t);e:if(typeof de=="function")try{if(A=t.props,F="prototype"in de&&de.prototype.render,V=(h=de.contextType)&&r[h.__c],M=h?V?V.props.value:h.__:r,n.__c?I=(d=t.__c=n.__c).__=d.__E:(F?t.__c=d=new de(A,M):(t.__c=d=new _i(A,M),d.constructor=de,d.render=F2),V&&V.sub(d),d.props=A,d.state||(d.state={}),d.context=M,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),F&&d.__s==null&&(d.__s=d.state),F&&de.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=yo({},d.__s)),yo(d.__s,de.getDerivedStateFromProps(A,d.__s))),g=d.props,m=d.state,d.__v=t,f)F&&de.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),F&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(F&&de.getDerivedStateFromProps==null&&A!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,M)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(d.props=A,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Ae){Ae&&(Ae.__=t)}),J=0;J<d._sb.length;J++)d.__h.push(d._sb[J]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,M),F&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,m,b)})}if(d.context=M,d.props=A,d.__P=e,d.__e=!1,Ne=st.__r,ht=0,F){for(d.state=d.__s,d.__d=!1,Ne&&Ne(t),h=d.render(d.props,d.state,d.context),j=0;j<d._sb.length;j++)d.__h.push(d._sb[j]);d._sb=[]}else do d.__d=!1,Ne&&Ne(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++ht<25);d.state=d.__s,d.getChildContext!=null&&(r=yo(yo({},r),d.getChildContext())),F&&!f&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(g,m)),a=PT(e,Y_(pe=h!=null&&h.type===Ei&&h.key==null?h.props.children:h)?pe:[pe],t,n,r,i,s,o,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),I&&(d.__E=d.__=null)}catch(Ae){if(t.__v=null,l||s!=null)if(Ae.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(te=s.length;te--;)K_(s[te]);else t.__e=n.__e,t.__k=n.__k;st.__e(Ae,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=L2(n.__e,t,n,r,i,s,o,l,c);return(h=st.diffed)&&h(t),128&t.__u?void 0:a}function LT(e,t,n){for(var r=0;r<n.length;r++)J_(n[r],n[++r],n[++r]);st.__c&&st.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){st.__e(s,i.__v)}})}function L2(e,t,n,r,i,s,o,a,l){var c,h,d,f,g,m,b,I=n.props,A=t.props,F=t.type;if(F=="svg"?i="http://www.w3.org/2000/svg":F=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((g=s[c])&&"setAttribute"in g==!!F&&(F?g.localName==F:g.nodeType==3)){e=g,s[c]=null;break}}if(e==null){if(F==null)return document.createTextNode(A);e=document.createElementNS(i,F,A.is&&A),a&&(st.__m&&st.__m(t,s),a=!1),s=null}if(F===null)I===A||a&&e.data===A||(e.data=A);else{if(s=s&&hp.call(e.childNodes),I=n.props||Ll,!a&&s!=null)for(I={},c=0;c<e.attributes.length;c++)I[(g=e.attributes[c]).name]=g.value;for(c in I)if(g=I[c],c!="children"){if(c=="dangerouslySetInnerHTML")d=g;else if(!(c in A)){if(c=="value"&&"defaultValue"in A||c=="checked"&&"defaultChecked"in A)continue;dp(e,c,null,g,i)}}for(c in A)g=A[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?m=g:c=="checked"?b=g:a&&typeof g!="function"||I[c]===g||dp(e,c,g,I[c],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),PT(e,Y_(f)?f:[f],t,n,r,F=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:n.__k&&Ka(n,0),a,l),s!=null)for(c=s.length;c--;)K_(s[c]);a||(c="value",F=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||F=="progress"&&!m||F=="option"&&m!==I[c])&&dp(e,c,m,I[c],i),c="checked",b!==void 0&&b!==e[c]&&dp(e,c,b,I[c],i))}return e}function J_(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){st.__e(i,n)}}function FT(e,t,n){var r,i;if(st.unmount&&st.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||J_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){st.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&FT(r[i],t,n||typeof e.type!="function");n||K_(e.__e),e.__c=e.__=e.__e=void 0}function F2(e,t,n){return this.constructor(e,n)}function BT(e,t,n){var r,i,s,o;t==document&&(t=document.documentElement),st.__&&st.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],o=[],X_(t,e=(!r&&n||t).__k=Z_(Ei,null,[e]),i||Ll,Ll,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?hp.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r,o),LT(s,e,o)}hp=MT.slice,st={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(a){e=a}throw e}},RT=0,z_=function(e){return e!=null&&e.constructor==null},_i.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=yo({},this.state),typeof e=="function"&&(e=e(yo({},n),this.props)),e&&yo(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),IT(this))},_i.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),IT(this))},_i.prototype.render=Ei,Ss=[],NT=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$_=function(e,t){return e.__v.__b-t.__v.__b},pp.__r=0,AT=/(PointerCapture)$|Capture$/i,q_=0,W_=xT(!1),G_=xT(!0),M2=0;var eE,rr,Q_,VT,UT=0,YT=[],sn=st,HT=sn.__b,jT=sn.__r,$T=sn.diffed,WT=sn.__c,GT=sn.unmount,zT=sn.__;function B2(e,t){sn.__h&&sn.__h(rr,e,UT||t),UT=0;var n=rr.__H||(rr.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function nE(e,t){var n=B2(eE++,7);return H2(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function V2(){for(var e;e=YT.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(mp),e.__H.__h.forEach(tE),e.__H.__h=[]}catch(t){e.__H.__h=[],sn.__e(t,e.__v)}}sn.__b=function(e){rr=null,HT&&HT(e)},sn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),zT&&zT(e,t)},sn.__r=function(e){jT&&jT(e),eE=0;var t=(rr=e.__c).__H;t&&(Q_===rr?(t.__h=[],rr.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(mp),t.__h.forEach(tE),t.__h=[],eE=0)),Q_=rr},sn.diffed=function(e){$T&&$T(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(YT.push(t)!==1&&VT===sn.requestAnimationFrame||((VT=sn.requestAnimationFrame)||U2)(V2)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Q_=rr=null},sn.__c=function(e,t){t.some(function(n){try{n.__h.forEach(mp),n.__h=n.__h.filter(function(r){return!r.__||tE(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],sn.__e(r,n.__v)}}),WT&&WT(e,t)},sn.unmount=function(e){GT&>(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{mp(r)}catch(i){t=i}}),n.__H=void 0,t&&sn.__e(t,n.__v))};var qT=typeof requestAnimationFrame=="function";function U2(e){var t,n=function(){clearTimeout(r),qT&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);qT&&(t=requestAnimationFrame(n))}function mp(e){var t=rr,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),rr=t}function tE(e){var t=rr;e.__c=e.__(),rr=t}function H2(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}var j2=Symbol.for("preact-signals");function iE(){if(Za>1)Za--;else{for(var e,t=!1;Fl!==void 0;){var n=Fl;for(Fl=void 0,rE++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&ZT(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(rE=0,Za--,t)throw e}}var St=void 0,Fl=void 0,Za=0,rE=0,gp=0;function KT(e){if(St!==void 0){var t=e.n;if(t===void 0||t.t!==St)return t={i:0,S:e,p:St.s,n:void 0,t:St,e:void 0,x:void 0,r:t},St.s!==void 0&&(St.s.n=t),St.s=t,e.n=t,32&St.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=St.s,t.n=void 0,St.s.n=t,St.s=t),t}}function an(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}an.prototype.brand=j2;an.prototype.h=function(){return!0};an.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};an.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};an.prototype.subscribe=function(e){var t=this;return Dn(function(){var n=t.value,r=St;St=void 0;try{e(n)}finally{St=r}})};an.prototype.valueOf=function(){return this.value};an.prototype.toString=function(){return this.value+""};an.prototype.toJSON=function(){return this.value};an.prototype.peek=function(){var e=St;St=void 0;try{return this.value}finally{St=e}};Object.defineProperty(an.prototype,"value",{get:function(){var e=KT(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(rE>100)throw new Error("Cycle detected");this.v=e,this.i++,gp++,Za++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{iE()}}}});function Sr(e){return new an(e)}function ZT(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function XT(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function JT(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Xa(e){an.call(this,void 0),this.x=e,this.s=void 0,this.g=gp-1,this.f=4}(Xa.prototype=new an).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===gp))return!0;if(this.g=gp,this.f|=1,this.i>0&&!ZT(this))return this.f&=-2,!0;var e=St;try{XT(this),St=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return St=e,JT(this),this.f&=-2,!0};Xa.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}an.prototype.S.call(this,e)};Xa.prototype.U=function(e){if(this.t!==void 0&&(an.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Xa.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Xa.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=KT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function oE(e){return new Xa(e)}function QT(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Za++;var n=St;St=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,sE(e),r}finally{St=n,iE()}}}function sE(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,QT(e)}function $2(e){if(St!==this)throw new Error("Out-of-order effect");JT(this),St=e,this.f&=-2,8&this.f&&sE(this),iE()}function Bl(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Bl.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Bl.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,QT(this),XT(this),Za++;var e=St;return St=this,$2.bind(this,e)};Bl.prototype.N=function(){2&this.f||(this.f|=2,this.o=Fl,Fl=this)};Bl.prototype.d=function(){this.f|=8,1&this.f||sE(this)};function Dn(e){var t=new Bl(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var cE,aE;function Ja(e,t){st[e]=t.bind(null,st[e]||function(){})}function vp(e){aE&&aE(),aE=e&&e.S()}function ex(e){var t=this,n=e.data,r=G2(n);r.value=n;var i=nE(function(){for(var s=t.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return t.__$u.c=function(){var o,a=t.__$u.S(),l=i.value;a(),z_(l)||((o=t.base)==null?void 0:o.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},oE(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}ex.displayName="_st";Object.defineProperties(an.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ex},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Ja("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var s=r[i];s instanceof an&&(n||(t.__np=n={}),n[i]=s,r[i]=s.peek())}}e(t)});Ja("__r",function(e,t){vp();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var s;return Dn(function(){s=this}),s.c=function(){r.__$f|=1,r.setState({})},s}())),cE=r,vp(n),e(t)});Ja("__e",function(e,t,n,r){vp(),cE=void 0,e(t,n,r)});Ja("diffed",function(e,t){vp(),cE=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var s=n.U;if(s)for(var o in s){var a=s[o];a!==void 0&&!(o in r)&&(a.d(),s[o]=void 0)}else n.U=s={};for(var l in r){var c=s[l],h=r[l];c===void 0?(c=W2(n,l,h,i),s[l]=c):c.o(h,i)}}}e(t)});function W2(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,s=Sr(n);return{o:function(o,a){s.value=o,r=a},d:Dn(function(){var o=s.value.value;r[t]!==o&&(r[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Ja("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var s=r[i];s&&s.d()}}}}else{var o=t.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}e(t)});Ja("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});_i.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var s in e)if(s!=="__source"&&e[s]!==this.props[s])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function G2(e){return nE(function(){return Sr(e)},[])}var yp=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}},_p=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}},lE=class{id;mID;name;groupID;groupName;isSelected;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.name=e.name,this.groupID=e.groupID,this.groupName=e.groupName,this.isSelected=e.isSelected??!1}},wi=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(t=>new yp(t))??[],this.link=e.link,this.price=new _p(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=Sr(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=Sr(void 0)),this.sellingPlans=e.sellingPlans?.map(t=>{let n=new lE(t);return n.isSelected&&(this.selectedSellingPlan.value=n),n})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}},Kn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=Sr(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=Sr(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}set variants(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}update(e){return this.id=e.id,this.mID=e.mID,this.name=e.name,this.status=e.status,this.ctg=e.ctg,this.imgs=e.imgs,this.desc=e.desc,this.sDesc=e.sDesc,this.link=e.link,this.slug=e.slug,this.quantity=e.quantity,this.meta=e.meta,this.category=e.category,this.videos=e.videos,this.reviews=e.reviews,this.portraitVideos=e.videos?.filter(t=>t.orientation==="PORTRAIT"),this.tags=e.tags,e.vars&&(this.vars=e.vars.map(t=>new wi(t))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new fn({id:this.id,mID:this.mID,vID:e.mID,vName:e.name,name:this.name,link:this.link,slug:this.slug,price:e.price.d,imageURL:e.getOneImage()??this.imgs?.[0].url})}},Ep=class{id;mID;handle;title;imageURL;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.handle=e.handle,this.title=e.title,this.imageURL=e.imageURL}},uE=class{enabled;constructor(e){this.enabled=e.enabled}},dE=class extends uE{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},wp=class{productQuantity;constructor(e){e??={},this.productQuantity=new dE(e.productQuantity)}},Ds=class{s;g;i;constructor(e){e.s&&(this.s=new Ht(e.s)),e.g&&(this.g=new Vl(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},Ul="a-f\\d",z2=`#?[${Ul}]{3}[${Ul}]?`,q2=`#?[${Ul}]{6}([${Ul}]{2})?`,Y2=new RegExp(`[^#${Ul}]`,"gi"),K2=new RegExp(`^${z2}$|^${q2}$`,"i");function fE(e,t={}){if(typeof e!="string"||Y2.test(e)||!K2.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let r=Number.parseInt(e,16),i=r>>16,s=r>>8&255,o=r&255,a=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[i,s,o,a];if(t.format==="css"){let l=a===1?"":` / ${Number((a*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${l})`}return{red:i,green:s,blue:o,alpha:a}}var Ht=class{h;a=100;g;constructor(e){e??={},this.h=e.h,this.a=e.a,this.g=e.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return fE(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}},Is=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new Ht(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return tx[this.s??1]}},tx=(e=>(e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e))(tx||{}),Vl=class US{static DEFAULT_FALLBACK=new Ht({h:"#000000",a:50});r;c;fb;constructor(t){this.r=t.r,t.c&&(this.c=new Ht(t.c)),t.fb&&(this.fb=new Ht(t.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??US.DEFAULT_FALLBACK}},Hl=class{blur;spr;clr;x;y;constructor(e){e=e??{},this.blur=e.blur??0,this.spr=e.spr??0,this.x=e.x??0,this.y=e.y??0,this.clr=new Ht(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}},zi=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(e){e=e??{},this.pl=e.pl??0,this.pr=e.pr??0,this.pt=e.pt??0,this.pb=e.pb??0,this.ml=e.ml??0,this.mr=e.mr??0,this.mt=e.mt??0,this.mb=e.mb??0,this.cent=e.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}},Ts=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}},ir=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new Ds(e.bg)),e.br&&(this.br=new Is(e.br)),e.shd&&(this.shd=new Hl(e.shd)),e.spc&&(this.spc=new zi(e.spc)),this.trf=new Ts(e.trf),this.clc=e.clc,this.w=e.w,this.h=e.h,this.x=e.x,this.y=e.y,this.a=e.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Ft[this.t]}get click(){return this.clc}},Ft=(e=>(e[e.IMAGE=1]="IMAGE",e[e.TEXT=2]="TEXT",e[e.BUTTON=3]="BUTTON",e[e.FLEXBOX=4]="FLEXBOX",e[e.MULTI_COLUMN=5]="MULTI_COLUMN",e[e.CHECKBOX=6]="CHECKBOX",e[e.PRODUCTS=11]="PRODUCTS",e[e.PRODUCT=12]="PRODUCT",e[e.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",e[e.PRODUCT_TITLE=14]="PRODUCT_TITLE",e[e.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",e[e.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",e[e.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",e[e.PRODUCT_RATING=19]="PRODUCT_RATING",e[e.EMAIL_INPUT=51]="EMAIL_INPUT",e[e.PHONE_INPUT=52]="PHONE_INPUT",e[e.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",e[e.CAROUSEL=62]="CAROUSEL",e[e.SHAPE=100]="SHAPE",e))(Ft||{}),xs=class extends ir{constructor(e){super(e)}},qi=class extends ir{src;constructor(e){super(e),this.src=e.src}},Qa=(e=>(e[e.START=0]="START",e[e.CENTER=1]="CENTER",e[e.END=2]="END",e[e.JUSTIFY=3]="JUSTIFY",e))(Qa||{}),bp=class{name;fonts;constructor(e){e=e??{},e.name&&(e.name=e.name!=="Arial"?e.name:""),this.name=e.name,this.fonts=e.fonts?.map(t=>new pE(t))}},pE=class{style;url;constructor(e){e=e??{},this.style=e.style,this.url=e.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}},In=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return Qa[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(e){e=e??{},e.lh&&(this.lh=e.lh),e.tdc&&(this.tdc=new Ht(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new Ht(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new bp(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}},bi=class extends ir{typo;constructor(e){super(e);let t=w(w({},e.f),e.typo);e.alg&&(t.ta=e.alg),e.c&&(t.tc=e.c),this.typo=new In(t)}get color(){return this.typography.tc}get typography(){return this.typo}},_o=class extends bi{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}},Cp=class extends ir{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},ec=class{dd;hh;mm;ss;date;constructor(e){e??={},this.dd=e.dd??0,this.hh=e.hh??0,this.mm=e.mm??0,this.ss=e.ss??0,this.date=e.date?new Date(e.date):void 0}start(e,t){let n=new Date;e===2?(n.setSeconds(n.getSeconds()+this.ss),n.setMinutes(n.getMinutes()+this.mm),n.setHours(n.getHours()+this.hh),n.setDate(n.getDate()+this.dd)):n=this.date??new Date;let r=window.setInterval(()=>{let i=new Date().getTime(),s=n.getTime()-i;if(s<1){clearInterval(r);return}let o=Math.floor(s/(1e3*60*60*24)),a=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),c=Math.floor(s%(1e3*60)/1e3);t({days:o,hours:a,minutes:l,seconds:c})},1e3);return r}},tc=class extends bi{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new ec(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Sp=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Ht(e.c??{})}get text(){return this.txt}get color(){return this.c}},Eo=class extends bi{ph;constructor(e){super(e),this.ph=new Sp(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},nc=class extends Eo{constructor(e){e??={},super(e)}},rc=class extends Eo{},ic=class extends Eo{},oc=class extends qi{},Dp=class{en;ex;constructor(e){e=e??{},this.en=e.en,this.ex=e.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}},jl=class extends ir{gvt;max;cover;anim;embedded;position;constructor(e){e=e??{},super(e),this.gvt=e.gvt??5,this.max=e.max,this.cover=e.cover??!0,this.anim=new Dp(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new zi({pl:k.IN_APP_DEFAULT_PADDING,pr:k.IN_APP_DEFAULT_PADDING,pt:k.IN_APP_DEFAULT_PADDING,pb:k.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}},Ip=class extends jl{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new Cp(e.cont),this.mob=new jl(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(t=>{t.t===1?this.elems.push(new qi(t)):t.t===2?this.elems.push(new _o(t)):t.t===3?this.elems.push(new _o(t)):t.t===100?this.elems.push(new xs(t)):t.t===51?this.elems.push(new rc(t)):t.t===52?this.elems.push(new ic(t)):t.t===61?this.elems.push(new tc(t)):t.t===15||t.t===16?this.elems.push(new nc(t)):t.t===13&&this.elems.push(new oc(t))})}getStylesForWrapper(){if(this.cover)return{};let e;return this.gvt===1?e={top:0,left:0}:this.gvt===2?e={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?e={top:0,right:0}:this.gvt===6?e={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?e={bottom:0,right:0}:this.gvt===8?e={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?e={bottom:0,left:0}:this.gvt===4?e={top:"50%",left:0,transform:"translateY(-50%)"}:e={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},e.overflow="visible",e}getFlexStylesForContainer(){let e={display:"flex",flexDirection:"row"},t,n;return this.gvt===1?(t="flex-start",n="flex-start"):this.gvt===2?(t="center",n="flex-start"):this.gvt===3?(t="flex-end",n="flex-start"):this.gvt===4?(t="flex-start",n="center"):this.gvt===6?(t="flex-end",n="center"):this.gvt===7?(t="flex-start",n="flex-end"):this.gvt===8?(t="center",n="flex-end"):this.gvt===9?(t="flex-end",n="flex-end"):(t="center",n="center"),e.alignItems=n,e.justifyContent=t,e.overflow="visible",e}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}},sc=class{gap;dir;wrap;jc;ai;scroll;constructor(e){e??={},this.gap=e.gap??0,this.dir=e.dir??"row",this.wrap=e.wrap??"nowrap",this.jc=e.jc??"flex-start",this.ai=e.ai??"flex-start",this.scroll=e.scroll}},Tp=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(e){e??={},this.of=e.of,this.disp=e.disp,this.pos=e.pos,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.zIndex=e.zIndex}},xp=class{w;h;maxW;maxH;minW;minH;constructor(e){e??={},this.w=e.w??"100%",this.h=e.h??"auto",this.maxW=e.maxW,this.maxH=e.maxH,this.minW=e.minW,this.minH=e.minH}},Rp=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new zi(e.spc),e.size&&(this.size=new xp(e.size)),e.bg&&(this.bg=new Ds(e.bg)),e.br&&(this.br=new Is(e.br)),e.typo&&(this.typo=new In(e.typo)),e.lout&&(this.lout=new Tp(e.lout)),e.flex&&(this.flex=new sc(e.flex))}},ac=class{sm;lg;constructor(e){e??={},this.sm=new Rp(e.sm),this.lg=new Rp(e.lg)}},gn=class{t;style;hide;when;clc;constructor(e,t){t??={},this.t=e,this.style=new ac(t.style),this.hide=t.hide,t.when?.op&&(this.when=t.when),t.clc&&(this.clc=t.clc)}get stringType(){return Ft[this.t]}},vn=class extends gn{text;constructor(e,t){e?.style?.lg?.typo?.s&&delete e.style.lg.typo.s,e?.style?.sm?.typo?.s&&delete e.style.sm.typo.s,super(t??2,e),e??={},this.text=e.text}},Rs=class extends vn{constructor(e,t){super(e,t??3)}},cc=class extends gn{value;constructor(e){super(6,e),e??={},this.value=e.value}},lc=class extends vn{constructor(e=15,t){super(t,e)}},Np=class extends gn{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Ht(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}},nx=Fe(is()),hE=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Ht(e.color)}},mE=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Ht(e.color)}},$l=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new mE(e.navigation),this.pagination=new hE(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},Ap=class extends gn{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=or.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new $l(e.conf),this.allowedTypes=e.allowedTypes}},Mp=class extends vn{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new ec(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},wo=class extends gn{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(t=>{let n=or.getParsedElement(t);n&&this.elems.push(n)})}},Ns=class extends gn{src;sm;lg;constructor(e,t){super(t??1,e),e&&this.update(e)}update(e){this.src=e.src,this.sm=e.sm,this.lg=e.lg}},or=class BS{static getParsedElements(t){let n=[];return t?.forEach(r=>{let i=BS.getParsedElement(r);i&&n.push(i)}),n}static getParsedElement(t){switch(t.t){case 2:return new vn(t);case 3:return new Rs(t);case 6:return new cc(t);case 11:return new Op(t);case 12:return new bo(t);case 61:return new Mp(t);case 4:return new wo(t);case 1:return new Ns(t);case 13:return new Ns(t,13);case 14:return new vn(t,14);case 15:case 16:return new lc(t.t,t);case 18:return new Rs(t,18);case 62:return new Ap(t);case 19:return new Np(t);default:nx.default.error("Unknown element type",t.t);return}}static parseAlignmentToJustifyContent(t){switch(t){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}},bo=class extends gn{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(e){if(e??={},super(12,e),this.show=e.show,this.elems=or.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new cc(e.cBox)),this.elems.push(new Ns(e.img,13));let t=new vn(e.title,14);t.hide=!e.show?.title,t.text="{{ product.name }}",this.elems.push(t);let n=new vn(e.price);n.text="{{ product.price }}",n.hide=!e.show?.price;let r=new vn(e.compareAt);r.text="{{ product.compare_price }}",r.hide=!e.show?.price,e.compareAt||(r.style=new ac(n.style),r.style.lg.typo=new In(re(w({},r.style.lg.typo),{td:"line-through"})),r.style.sm.typo=new In(re(w({},r.style.sm.typo),{td:"line-through"})));let i=new wo({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:or.parseAlignmentToJustifyContent(n.style.lg.typo?.ta)}}}});i.elems.push(r),i.elems.push(n),this.elems.push(i);let s=new lc(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let o=new Rs(e.btn,18);o.hide=!e.show?.btn,this.elems.push(o)}}e.symbol&&(this.symbol=new vn(e.symbol))}},Op=class extends gn{conf;prod;constructor(e){super(11,e),e??={},this.conf=new gE(e.conf),this.prod=new bo(e.prod)}},Pp=class extends $l{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},gE=class{lg;sm;constructor(e){e??={},this.lg=new Pp(e.lg),this.sm=new Pp(e.sm)}},kp=class extends wo{constructor(e){super(e)}},uc=class{cont;elems=[];constructor(e){e=e??{},this.cont=new kp(e.cont),e.elems?.forEach(t=>{this.addRawElement(t)})}addRawElement(e){let t=or.getParsedElement(e);return t&&this.elems.push(t),t}},rx=Fe(er()),vE=class{minValue;rewardType;label;reachingText;reachedText;discount;items;calculatedAlignment;constructor(e){this.minValue=e.minValue,this.rewardType=e.rewardType,this.label=e.label,this.reachingText=e.reachingText,this.reachedText=e.reachedText,this.discount=e.discount,this.items=e.items?.map(t=>new fn(t))}},Lp=class{layout;milestones;onlyLatestGift;constructor(e){this.layout=e.layout??rx.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(t=>new vE(t))??[],this.onlyLatestGift=e.onlyLatestGift}},Fp=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}},Bp=class{id;alt;sources;items;constructor(e={}){this.id=e.id,this.alt=e.alt,this.sources=e.sources,this.items=e.items?e.items.map(t=>new fn(t)):[]}},yE=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))(yE||{}),_E=(e=>(e.SWIPER="SWIPER",e.STORY="STORY",e.FLOATING_POPUP="FLOATING_POPUP",e))(_E||{}),Vp=class{videos;source;template;heading;constructor(e={}){this.videos=e.videos?.map(t=>new Bp(t))??[],this.source=e.source,this.template=e.template,this.heading=e.heading}},wE=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(e){this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.delay=e.delay??0,this.redirectBehaviour=e.redirectBehaviour,this.onsiteDeliveryType=e.onsiteDeliveryType,this.objective=e.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===Un.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===Un.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===Un.EngagementContentType.SINGLE}},sr=class FS extends wE{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;discountData=Sr({});constructor(t){super(t),this.id=t.id,this.nudgeID=t.nudgeID,this.currency=Oe.get().currencyCode??"USD",this.contentID=t.contentID,this.variation=t.variation,t.widget&&(this.widget=new uc(t.widget)),this.previewType=t.previewType,this.occurred=t.occurred??new Date,this.props=t.props,this.embeddedItems=t.embeddedItems?.map(n=>new fn(n)),this.items=t.items?.map(n=>new Kn(n))??[],this.nonMutableItems=t.items?.map(n=>new Kn(n))??[],this.collections=t.collections?.map(n=>new Ep(n))??[],this.discount=t.discount,this.placement=t.placement,this.customerData=t.customerData,this.ian=t.ian?this.processPopup(t.ian):void 0,this.promotionType=t.promotionType,this.manipulation=new wp(t.manipulation),this.contentSource=t.contentSource,this.klaviyoFormID=t.klaviyoFormID,this.hasMultiplePlacement=t.hasMultiplePlacement,this.skipSubscribedItems=t.skipSubscribedItems,t.progressBarConfig&&(this.progressBarConfig=new Lp(t.progressBarConfig)),t.bundleConfig&&(this.bundleConfig=new Fp(t.bundleConfig)),t.bundleFrom&&(this.bundleFrom=new Kn(t.bundleFrom)),t.content?.videoConfig&&(this.content={videoConfig:new Vp(t.content.videoConfig)})}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let t=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-t}isBundle(){return this.objective===Un.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===Un.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===Un.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===Un.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===Un.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===Un.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===Un.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isBYOB(){return this.objective===Un.EngagementObjective.BYOB}isShoppableVideo(){return this.objective===Un.EngagementObjective.SHOPPABLE_VIDEO}processPopup(t){let n=JSON.stringify(t),r=this.items[0],i={},s={};if(r){let l=r.selectedOrFirstVariant.value;i={name:r.name,id:r.mID,link:r.link,vID:l.mID,image:r.variantImage,price:fe.formatCurrency(l.price.d),comparePrice:fe.formatCurrency(l.price.cmp),quantity:r.quantity},s={quantity:l.quantity}}let o={productCount:Ye.getCurrent().item_count},a=mn.render(n,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return r&&(a=a.replace(new RegExp(k.PLACEHOLDER_IMAGE,"gi"),r.variantImage??r.imageURL)),new Ip(JSON.parse(a))}calculateDiscountData(t,n){let r=EE.ArrayUtils.sum(t,s=>s.selectedOrFirstVariant.value.price.d),i={actualPrice:r,discountAmount:0,discountPercentage:0,discountedPrice:r};if(!t?.length||!n||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(i);return}if(Co.DiscountType.BXGY===this.discount.type&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],this.updateEffectivePrice(t,i.discountPercentage,!0),i.discountAmount=i.actualPrice-EE.ArrayUtils.sum(t,s=>s.selectedOrFirstVariant.value.effectivePrice.value);else if([Co.DiscountType.UNIQUE_FLAT_ITEMS,Co.DiscountType.STATIC].includes(this.discount.type)&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],i.discountAmount=i.actualPrice*i.discountPercentage/100,this.updateEffectivePrice(t,i.discountPercentage);else if(this.discount.type===Co.DiscountType.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)i.discountAmount=i.actualPrice-this.discount.values[0],i.discountPercentage=i.discountAmount/i.actualPrice*100,this.updateEffectivePrice(t,i.discountPercentage);else if(this.discount.type===Co.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){t.sort((o,a)=>a.selectedOrFirstVariant.value.price.d-o.selectedOrFirstVariant.value.price.d);let s=t[t.length-1];s.selectedOrFirstVariant.value.effectivePrice.value=0,i.discountAmount=s.selectedOrFirstVariant.value.price.d,i.discountPercentage=i.discountAmount/i.actualPrice*100}i.discountedPrice=i.actualPrice-i.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(i)}getPrivateAttributesForLineItem(){return Pt.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return Pt.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[Co.DiscountType.UNIQUE_FIXED_ITEMS,Co.DiscountType.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){let t=this.widget?.elems.find(r=>FS.SWIPER_ELEMENTS.has(r.t));if(!t)return!1;if(t.t===62)return!0;let n=nr.get().isMobile()?"sm":"lg";return t.conf[n].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let t=Ye.getCurrent();return{productCount:t.item_count,amount:fe.formatCurrency(t.total_price/100),originalAmount:fe.formatCurrency(t.original_total_price/100)}}updateEffectivePrice(t,n,r=!1){let i=Oe.get().getCurrentItem();t.forEach(s=>{let o=s.selectedOrFirstVariant.value,a=o.price;if(r&&s.mID===i.mID)o.effectivePrice.value=a.d;else{let l=a.d*n/100;o.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(t){if(!t)return{};let n={discountPercentage:fe.formatNumber(t.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice"].map(r=>{n[r]=fe.formatCurrency(t[r])}),n}},Ql=Fe(er()),ax=Fe(j_()),cx=Fe(va()),dc=class{constructor(e,t){this._startTime=e,this._triggerData=t}intervals=[];selectedEmbeddedItems;renderer;closeCallback;inputFields=[];get startTime(){return this._startTime}get triggerData(){return this._triggerData}get inputs(){return this.inputFields}get rootClassName(){let e=this.triggerData.shortID??this.triggerData.id.slice(-6);return e==="test"&&(e="test-"+this.startTime.getTime().toString()),k.IN_APP_WRAPPER_NAME+"-"+e}get selectedItems(){return this.triggerData.items.filter(e=>e.selected.value)}get shouldGiveFBTDiscount(){let e=this.selectedItems.length;return this.triggerData.bundleConfig?.applyDiscountOnMinimum?this.triggerData.bundleConfig.applyDiscountOnMinimum<=e:e===this.triggerData.items.length}onClose(e){this.closeCallback=e}closeInApp(e,t){t??={};let n=(new Date().getTime()-this.startTime.getTime())/1e3,r=w({eventName:e,duration:n},t);this.stopIntervals(),this.closeCallback&&this.closeCallback(r)}addInputField(e,t){this.inputFields.push({id:e,type:t,isValid:!1})}updateValidation(e,t){this.inputFields.forEach(n=>{if(n.id===e){n.isValid=t;return}})}hasManipulatedProductQuantity(){let e=this.triggerData.manipulation.productQuantity;return e?.enabled&&e.min!=null&&e.max!=null}getManipulatedQuantity(e){let{min:t=1,max:n=100}=this.triggerData.manipulation.productQuantity;if(t>n)return S.error("Invalid range: min should be less than or equal to max."),e;if(e>=t&&e<=n)return e;let r=e%100;return r<t?t:r>n?n:r}stopIntervals(){this.intervals.forEach(e=>clearInterval(e))}},lx=Fe(is()),ix=Fe(k_()),As=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return Tt.isShopify()}},X2=(0,ix.default)(fetch),J2={retryDelay:k.API_CALL_RETRY_DELAY,retryOn:(e,t,n)=>e>=k.API_CALL_MAX_ATTEMPTS?!1:!!(t!==null||n?.status&&n?.status>=500)},Mn=class jS{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new jS),this.INSTANCE}async validateSession(t){return this.post("/v1/event/validate-session",t)}updateUserData(t){this.put("/v1/user/update",t).then(async n=>{S.log("Updated user profile"),await Ms.getInstance().storeAndPopulateAuthData(n)}).catch(n=>{S.error("Error saving user profile",n)})}trackOrder(t){this.post("/v1/event/track-order",t).then(()=>{S.log("Sent Order")}).catch(n=>{S.error("Error sending track order",n)})}generateDiscount(t){return this.post("/v1/event/generate-discount",t)}updateDeviceProps(t){this.put("/v1/device/update",t).then(()=>{S.log("Updated device property")}).catch(async n=>{S.error("Error saving device property",n)})}setAPIToken(t){this.apiToken=t??""}setFirstSeen(t){this.firstSeen=t?.toUTCString()??""}get(t){return this.requestBackend("GET",t)}post(t,n){return this.requestBackend("POST",t,n)}put(t,n){return this.requestBackend("PUT",t,n)}async requestBackend(t,n,r){if(!As.isECommerceApp()&&!As.getFlags().allowEvents)return S.log(`Rejecting ${t} ${n} as this is not e-commerce app`),Promise.reject();n.startsWith("http")||(n=Rn.apiURL+n);let i=this.getDefaultHeaders(),s="keepalive"in new Request("");if(r&&!s&&JSON.stringify(r).includes("CE App Background"))try{return this.performXMLHttpRequest(n,i,r)}catch(a){return Ct.getInstance().captureException(a,{body:JSON.stringify(r)}),{}}let o={method:t,headers:i,keepalive:!0};return r&&(o.body=JSON.stringify(r)),this.request(n,o)}async request(t,n){let r=w(w({},J2),n),i=await X2(t,r);if(!i.ok)throw i;return i.json()}performXMLHttpRequest(t,n,r){return new Promise((i,s)=>{let o=new XMLHttpRequest;o.open("POST",t,!0),n.forEach((a,l)=>{o.setRequestHeader(l,a)}),o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE)if(o.status>=200&&o.status<300)try{o.getResponseHeader("Content-Type")?.includes("application/json")?i(JSON.parse(o.responseText)):s(new Error("Content-Type of response header is not json"))}catch(a){s(a)}else s(new Error(`Received status - ${o.status}(${o.statusText})`))},o.onerror=()=>{s(new Error("Network error occurred during the request."))},o.send(JSON.stringify(r))})}getDefaultHeaders(){let t=new Headers;return t.set("content-type","application/json"),t.set("cooee-sdk",k.SDK),t.set("cooee-sdk-code",k.SDK_VERSION_CODE.toString()),t.set("cooee-sdk-version",k.SDK_VERSION),t.set("cooee-first-seen",this.firstSeen),this.apiToken&&t.append("cooee-sdk-token",this.apiToken),Rn.debug&&t.set("cooee-sdk-debug",String(1)),t}},fc=class{static sentryService=Ct.getInstance();static httpApiService=Mn.getInstance();static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let i=(await Ye.getCurrent().getNormalisedCart()).items.map(s=>s.mID);e.items=e.items.filter(s=>!i.includes(s.mID))}if(Pt.get().currencyCount<=1)return e.items;let t=e.items.length,n=e.items.map(i=>this.updatedItem(i,e.engagementID)),r=(await Promise.all(n)).filter(i=>i!=null);if(t&&!r.length){let i="Failed to fetch any product from Ajax API",s=new Pe(k.EVENT_CAMPAIGN_FAILED,{reason:i,currency:e.currency},e);throw Ue.getInstance().sendEvent(s),new Error(i)}if(e.isCartRecovery()){let i=Ye.getCurrent().items,s=[];for(let o of r)for(let a of o.vars){if(!a.isAvailable)continue;let l=i.find(d=>d.variant_id.toString()===a.mID);if(!l)continue;let c=new Kn(o);c.name=l.title;let h=new wi(a);h.name=l.variant_title,h.price.d=l.discounted_price/100,c.variants=[h],s.push(c)}return s}return r}static async updatedItem(e,t){let n=e,r,i=`/products/${n.slug}.js`;try{r=await this.httpApiService.request(i)}catch(o){return S.error(`Failed to fetch ${i}`,o),o instanceof Response?this.sentryService.captureMessage(`Shopify product fetch failed ${o.status}`,"error",{item:n,path:i},{"engagement.id":t}):this.sentryService.captureException(o,{item:n,path:i},{"engagement.id":t}),null}if(!r)return S.error("Item not found after AJAX call for:",n),null;n.name=r.title,n.tags=r.tags;let s=n.selectedOrFirstVariant.value;return n.vars.map(o=>{let a=r.variants.find(l=>l.id===+o.mID);o.name=a.title,o.isAvailable=a.available,o.price.d=a.price?a.price/100:a.price,o.price.effective=o.price.d,o.price.cmp=a.compare_at_price?a.compare_at_price/100:a.compare_at_price,+s.mID===a.id&&(s.effectivePrice.value=o.price.d)}),n}},pc=class{constructor(e){this.scalingFactor=e}getLayoutStyles(e){if(!e)return{display:"block"};let t={display:e.disp};return e.of&&(t.objectFit=e.of),e.pos==="absolute"&&(t.width="auto !important",t.position="absolute",t.right=e.right+"px",t.left=e.left+"px",t.top=e.top+"px",t.bottom=e.bottom+"px"),t}getSizeStyles(e){let t={};return e?.w&&(t.width=e.w),e?.h&&(t.height=e.h),e?.maxW&&(t.maxWidth=e.maxW),e?.maxH&&(t.maxHeight=e.maxH),e?.minW&&(t.minWidth=e.minW),e?.minH&&(t.minHeight=e.minH),t}getBorderStyles(e){if(!e)return{};let t={};return e.radius&&e.radius>0&&(t.borderRadius=this.getSizePx(e.radius)),e.width&&e.width>0&&(t.borderWidth=this.getSizePx(e.width),t.borderStyle=e.style?.toLowerCase(),e.color?this.getColourStyles(e.color,"border-color",t):t.borderColor="black"),t}getFlexStyles(e){return e?{gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai,width:"100%"}:{}}getSpaceStyles(e){let t={};return e?(t.paddingTop=this.getSizePx(e.pt),t.paddingBottom=this.getSizePx(e.pb),t.paddingLeft=this.getSizePx(e.pl),t.paddingRight=this.getSizePx(e.pr),t.marginTop=this.getSizePx(e.mt),t.marginBottom=this.getSizePx(e.mb),t.marginLeft=e.cent?"auto":this.getSizePx(e.ml),t.marginRight=e.cent?"auto":this.getSizePx(e.mr),t):(t.margin="0 !important",t.padding="unset",t)}getBackgroundStyles(e){if(!e)return{};let t={};if(e.glossy){let n="backdrop-filter",r="-webkit-"+n,i=`blur(${e.glossy.radius}px)`;if(!CSS.supports(r,i)&&!CSS.supports(n,i))return{background:e.glossy.fallback.rgba};if(t[r]=i,t[n]=i,e.glossy.color)return this.getColourStyles(e.glossy.color,"background",t)}else if(e.solid){if(e.solid.grad)return this.getGradientStyles(e.solid.grad,"background",t);if(e.solid.hex)return{backgroundColor:e.solid.rgba}}else if(e.img){if(!e.img.src)return{};let n=(e.img.a??0)/100;t.background=`linear-gradient(rgba(0, 0, 0, ${n}), rgba(0, 0, 0, ${n})),url("${e.img.src}") no-repeat center`,t.backgroundSize="cover",e.img.a&&(t["-webkit-backdrop-filter"]=`opacity(${e.img.a})`,t.backdropFilter=`opacity(${e.img.a})`)}return t}getGradientStyles(e,t,n){if(n??={},e.type==="LINEAR"){let r=`linear-gradient(${e.ang}deg, ${e.c1}, ${e.c2}`;e.c3&&(r+=`, ${e.c3}`),r+=")",n[t]=r}return n}getColourStyles(e,t="color",n){return n??={},e?e.grad?this.getGradientStyles(e.grad,t,n):(e.hex&&(n[t]=e.rgba),n):n}getSizePx(e){return this.getScaledSize(e)+"px"}getScaledSize(e){return(e??0)*this.scalingFactor}},Et=class extends _i{stylesConverter=new pc(1);renderer=nr.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new So(this.props.triggerContext,this.props.element)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(re(w(w(w(w(w(w({},this.stylesConverter.getFlexStyles(this.mediaStyle.flex)),this.stylesConverter.getBackgroundStyles(this.mediaStyle.bg)),this.stylesConverter.getBorderStyles(this.mediaStyle.br)),this.stylesConverter.getSizeStyles(this.mediaStyle.size)),this.stylesConverter.getSpaceStyles(this.mediaStyle.spc)),this.stylesConverter.getLayoutStyles(this.mediaStyle.lout)),{boxSizing:"border-box",outline:"none"}),this.getComponentStyles()),this.props.style)}matchWhenCondition(e){if(!e?.op)return!0;let{lhs:t,rhs:n}=e;switch(e.op){case"eq":return t===n;case"gt":return+t>+n;case"gte":return+t>=+n;case"lt":return+t<+n;case"lte":return+t<=+n;case"ne":return t!==n;case"null":return t==null;case"empty":return t.trim()==="";case"in":return new RegExp(`\\b${n}\\b`).test(t);case"nin":return!new RegExp(`\\b${n}\\b`).test(t);default:return S.error(`Invalid operator found for when condition - ${e.op}`),!1}}putStyleAccordingToDevice(){let e=this.props.element;this.mediaStyle=e.style.lg,this.renderer.isMobile()&&e.style.sm&&Object.keys(e.style.sm).length&&(this.mediaStyle=w(w({},this.mediaStyle),e.style.sm))}sendTriggerClicked(e,t){this.clickExecutor.sendTriggerClicked(e,t)}async onClick(e){await this.clickExecutor.execute(e)}},Q2=0,gie=Array.isArray;function G(e,t,n,r,i,s){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Q2,__i:-1,__u:0,__source:i,__self:s};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return st.vnode&&st.vnode(c),c}var ar=class extends Et{componentDidMount(){this.setState(()=>({text:this.props.element.text})),Dn(this.onChange.bind(this))}componentWillReceiveProps(e){this.props.element=e.element,this.onChange()}render(){let e=this.getCompiledStyles(),t=this.state.text;return t||(e.display="none",t=""),G("div",{style:e,onClick:this.customOnClick.bind(this),className:"lc-text",children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:t}})})}customOnClick(){this.props.onClick&&this.props.onClick("title")}onChange(){if(this.props.element.text==null)return;let e=this.props.triggerContext.triggerData,t={bundle:e.discountData.value,customer:e.customerData,cart:e.getCartMagicVariables()},n=mn.render(JSON.stringify(this.props.element),t),r=new vn(JSON.parse(n));if(!this.matchWhenCondition(r.when)){this.setState(()=>({text:""}));return}this.setState(()=>({text:r.text}))}getTypoStyles(){let e={},t=this.mediaStyle.typo??new In;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily=t.fam.name||"inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,e.textDecoration=t.td??"none",this.stylesConverter.getColourStyles(t.tc,"color",e),e}getComponentStyles(){return w({},this.getTypoStyles())}getSpanStyle(){return{overflow:"hidden",display:"-webkit-box",webkitBoxOrient:"vertical",webkitLineClamp:2,color:"inherit",fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit"}}},Os=class extends ar{render(){return G("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:()=>this.onClick({item:this.props.item}),children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return re(w({},super.getComponentStyles()),{cursor:"pointer"})}},bE=class extends _i{render(){if(this.props.element.show[this.props.label.toLowerCase()])return this.props.element.lblPos==="end"?G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{children:this.props.time}),G("span",{style:this.getTimeLabelStyle(),children:this.props.label})]}):G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{style:this.getTimeLabelStyle(),children:this.props.label}),G("span",{children:this.props.time})]})}getDesign(){}getTimeLabelStyle(){return{fontSize:"0.5em",alignContent:"center"}}getElementStyle(){let e={display:"flex",flexDirection:"column",placeContent:"center center",textAlign:"center"};return this.props.element.horizontal&&(e.gridTemplateColumns="repeat(2, minmax(0, 1fr))"),e}},Wl=class extends ar{labels={Days:"00",Hours:"00",Minutes:"00",Seconds:"00"};componentWillMount(){super.componentWillMount(),this.setState(()=>w({},this.labels)),this.processAndStartTimer()}render(){return G("div",{style:this.getLabelsParentStyle(),children:Object.keys(this.labels).map(e=>G(bE,{styles:this.getCompiledStyles(),label:e,time:this.state[e],element:this.props.element}))})}getLabelsParentStyle(){return{display:"grid",justifyContent:"center",gridTemplateColumns:"repeat(4, auto)",gap:this.stylesConverter.getSizePx(this.props.element.gap)}}getDisplayStyles(){return{display:"grid",placeContent:"center center"}}getComponentStyles(){return w(w({},super.getComponentStyles()),this.getDisplayStyles())}processAndStartTimer(){this.props.element.timer.start(this.props.element.timerType,e=>{this.labels.Days=String(e.days).padStart(2,"0"),this.labels.Hours=String(e.hours).padStart(2,"0"),this.labels.Minutes=String(e.minutes).padStart(2,"0"),this.labels.Seconds=String(e.seconds).padStart(2,"0"),this.setState(()=>w({},this.labels))})}},Gl=class extends Et{componentDidMount(){Dn(()=>{this.setState(()=>({checked:this.props.item.selected.value}))})}render(){return G("div",{style:this.getCompiledStyles(),className:"lc-checkbox",children:G("input",{type:"checkbox",checked:this.state.checked,onChange:this.onChange.bind(this),style:{appearance:"auto"}})})}onChange(e){let{checked:t}=e.target;this.props.item.selected.value=t}getTypoStyles(){let e={},t=this.mediaStyle.typo??new In;return e.textAlign=t.alignment,e.justifyContent=t.alignment,e}getComponentStyles(){return re(w({},this.getTypoStyles()),{display:"flex"})}},Yi=class extends Et{constructor(e,t){super(e,t)}render(){let e=this.props.element[this.deviceTypeKey],t=e?.src||this.props.element.src||this.props.element.lg?.src;return G("img",{onClick:this.customOnClick.bind(this),className:"lc-image",alt:e?.name||"Image",onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),src:t,style:this.getCompiledStyles()})}customOnClick(){this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let t={zIndex:e.zIndex};return this.mediaStyle.size?.w&&(t.width=this.mediaStyle.size.w),this.mediaStyle.size?.h&&(t.height=this.mediaStyle.size.h),t}handleMouseEnter(e){let t=this.props.element[this.deviceTypeKey]?.secondarySrc;t&&(e.currentTarget.src=t)}handleMouseLeave(e){e.currentTarget.src=this.props.element[this.deviceTypeKey]?.src}},Ki=class extends Et{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(Do,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new sc,t={display:"flex",gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai};return e.wrap==="nowrap"&&e.scroll&&(e.dir==="column"?t["overflow-y"]="auto":t["overflow-x"]="auto"),t}},zl=class extends Ki{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(hc,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}},ql=class extends Et{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.selectedVariant.selectedSellingPlan.value?.mID??"",onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){Dn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new In;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.selectedVariant.sellingPlans?.length||(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[],t=this.props.selectedVariant;if(!t.sellingPlans?.length)return[];this.props.triggerContext.triggerData.skipSubscribedItems?t.selectedSellingPlan.value||(t.sellingPlans[0].isSelected=!0,t.changeSellingPlan(t.sellingPlans[0])):e.push(G("option",{value:"",selected:!t.selectedSellingPlan,children:"One time purchase"}));for(let n of t.sellingPlans??[])e.push(G("option",{value:n.mID,selected:n.isSelected,children:n.name}));return e}onChange(e){let t=e.target.value;t?this.props.selectedVariant.selectedSellingPlan.value=this.props.selectedVariant.sellingPlans.find(n=>n.mID===t):this.props.selectedVariant.selectedSellingPlan.value=void 0}},ox=Fe(Of()),Yl=class extends Et{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),mn.escape=ox.MustacheUtils.escapeHtml}render(){let e=this.getCompiledStyles(),t=this.getRating();return t||(e.display="none",t=""),G("div",{style:e,className:"lc-star-rating",dangerouslySetInnerHTML:{__html:t}})}getRating(){let e=this.props.element.fullStar,t=this.props.element.halfStart,n={size:this.props.element.iconSize,color:this.props.element.c.hex};e=mn.render(e,{svg:n}),t=mn.render(t,{svg:n});let r=this.props.review;if(!r?.rating)return"";let i="";if(this.props.element.showSingleStar)i=e;else{let s=5,o=`${r.rating}`.split(".");for(let a=0;a<+o[0];a++)i+=e,s--;o[1]&&(i+=t,s--);for(let a=0;a<s;a++)i+=e.replace(this.colorRegex,'fill="#f1f1f1')}return i}getComponentStyles(){return{display:"flex",alignItems:"center"}}},Kl=class extends Et{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.item.selectedOrFirstVariant.value.mID,onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){Dn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new In;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"&&(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[];for(let t of this.props.item.vars)e.push(G("option",{value:t.mID,disabled:!t.isAvailable,children:t.name}));return e}onChange(e){let t=e.target.value;this.props.item.selectedOrFirstVariant.value=this.props.item.vars.find(n=>n.mID===t)}},hc=class extends Et{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}renderElement(e){if(!(e.hide||!this.matchWhenCondition(e.when))){if(e.t===4){let t=e;return G(zl,{element:t,triggerContext:this.props.triggerContext,elements:t.elems,item:this.props.item,noLinks:this.props.noLinks})}if(e.t===6)return this.props.triggerContext.triggerData.isBundle()?G(Gl,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):void 0;if(e.t===13){let t=e,n=this.props.item,r=n.variantImage??n.imageURL,i=n.variantSecondaryImage??n.secondaryImageURL;t.lg=t.sm={src:r,name:n.name,secondarySrc:i};let s=G(Yi,{element:t,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?s:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block"},children:s})}if(e.t===14)return this.renderProductTitle(e);if(e.t===15){let t=e;return this.props.triggerContext.triggerData.isCartEmbed()&&this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"?void 0:G(Kl,{element:t,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?G(ql,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?G(Yl,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?G(Os,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):G(Do,{elements:[e],element:this.props.element,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}renderProductTitle(e){let t=G(ar,{element:e,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?t:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block",textDecoration:this.state.decoration},onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),children:t})}customOnClick(e){this.sendTriggerClicked([this.props.item.toEmbed()],{from:e})}onMouseEnter(){this.setState(()=>({decoration:"underline"}))}onMouseLeave(){this.setState(()=>({decoration:"unset"}))}},sx=Fe(ip()),Ps=class extends Et{productElement;constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),t=mn.render(e,this.getProductData());if(this.productElement=new bo(JSON.parse(t)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return G("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:G(hc,{element:this.productElement,elements:this.productElement.elems,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.productElement.noLinks})})}getComponentStyles(){return{flexShrink:0}}getProductData(){if(!this.props.item)return{};let e=this.props.item.selectedOrFirstVariant.value,t=e.price,n=this.props.item.name,r=this.props.item.category,i=fe.formatCurrency(t.d,!0),s=this.props.item.variantImage??this.props.item.imageURL,o=this.props.item.meta,a=this.props.item.tags?.join(",")??"",l=this.props.item.reviews?.rating,c=this.props.item.reviews?.totalReviews,h=t.cmp&&t.cmp>t.d,d=this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(this.props.item.quantity):this.props.item.quantity,f={name:n,price:i,quantity:d,image_url:s,meta:o,category:r,rating:l,reviews:c,tags:a},g=e.effectivePrice.value!==t.d;g&&(f.effective_price=fe.formatCurrency(e.effectivePrice.value));let m=this.props.triggerContext.triggerData.discount.type===sx.DiscountType.BXGY;if(!g&&m&&(f.effective_price=fe.formatCurrency(e.effectivePrice.value),f.price=""),h){f.compare_price=fe.formatCurrency(t.cmp);let I=t.cmp-t.d;f.discount_percent=(I/t.cmp*100).toFixed(0),f.discount_price=fe.formatCurrency(I)}let b={name:e.name,quantity:this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(e.quantity):e.quantity};return{product:f,variant:b,svg:{color:()=>"{{svg.color}}",size:()=>"{{svg.size}}"}}}};function Up(){return new Promise(e=>{let t="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(r=>r.src.includes(t))){e();return}let n=document.createElement("script");n.src=t,n.onload=()=>{e()},document.body.appendChild(n)})}function Hp(e,t){if(!e||!window.Swiper)return;let n=new window.Swiper(e,{loop:!0,slidesPerView:t.maxInRow,spaceBetween:t.gap+"px",pagination:{type:t.pagination.type,el:e.querySelector(".swiper-pagination"),clickable:!0,renderBullet:(r,i)=>`
|
|
47
47
|
<span class="${i}"
|
|
48
48
|
style="background-color: ${t.pagination.color?.rgba};"></span>
|
|
49
49
|
`,renderProgressbar:r=>`
|
|
50
50
|
<span class="${r}"
|
|
51
51
|
style="background-color: ${t.pagination.color?.rgba};">
|
|
52
52
|
</span>
|
|
53
|
-
`},navigation:{nextEl:e.querySelector(".swiper-button-next"),prevEl:e.querySelector(".swiper-button-prev")},autoplay:t.autoplay?.enabled?{delay:t.autoplay?.delay,disableOnInteraction:!1}:!1,autoHeight:!0});return e.style.setProperty("--swiper-navigation-size",`${t.navigation.size}px`),n}function jp(e,t,n){let r={color:e.navigation.color?.rgba};return e.pagination.enabled&&(r.transform="translateY(-25%)"),G("div",{class:"swiper-container",ref:t,children:[G("div",{class:"swiper-wrapper",children:n()}),e.navigation.enabled&&G("div",{class:"swiper-button-next",style:r,children:G("span",{})}),e.navigation.enabled&&G("div",{class:"swiper-button-prev",style:r,children:G("span",{})}),e.pagination.enabled&&G("div",{className:"swiper-pagination",style:{bottom:0,top:"unset",position:"relative",color:e.pagination.color?.rgba}})]})}var Zl=class extends Et{swiperRef=null;swiperInstance=null;configuration;gap;constructor(e,t){super(e,t),this.configuration=this.renderer.isMobile()?this.props.element.conf.sm:this.props.element.conf.lg,this.gap=(this.configuration.gap??15)+"px"}componentDidMount(){this.props.element.conf[this.deviceTypeKey].disp===2&&Up().then(()=>{this.swiperInstance=Hp(this.swiperRef,this.props.element.conf[this.deviceTypeKey])})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.triggerContext.triggerData.items;e.splice(this.configuration.maxItems??10);let t;if(this.configuration.disp===2){let n=i=>{this.swiperRef=i},r=()=>e?.map(i=>G("div",{class:"swiper-slide",children:this.getProductFragment(i)}));t=G("div",{style:re(w({},this.getCompiledStyles()),{display:"block"}),class:"lc-product-swiper-list",children:jp(this.configuration,n,r)})}else t=G("div",{style:this.getCompiledStyles(),class:"lc-product-list",children:e?.map((n,r)=>this.getProductFragment(n,r!==e.length-1))});return t}getComponentStyles(){let e=[0,2].includes(this.configuration.disp),t={display:e?"flex":"grid",justifyContent:"safe "+(this.mediaStyle.flex?.jc??"center"),gap:this.gap,flexDirection:this.mediaStyle.flex?.dir??"row"};if(t.flexDirection==="row"){if(e)t.maxWidth="100%",t.overflowY="auto";else if(this.configuration.disp===1){let n=this.props.triggerContext.triggerData,r=n.items.length,i;n.isBundle()?i=this.props.element.prod.symbol?.hide!==!0?r*2-1:r:i=this.props.element.conf[this.deviceTypeKey].maxInRow,t.gridTemplateColumns=`repeat(${i}, auto)`}}return t}getProductFragment(e,t=!1){return G(Ei,{children:[G(Ps,{element:this.props.element.prod,item:e,triggerContext:this.props.triggerContext}),this.props.triggerContext.triggerData.isBundle()&&t&&this.props.element.prod.symbol&&!this.props.element.prod.symbol.hide&&G("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:G(sr,{element:this.props.element.prod.symbol,triggerContext:this.props.triggerContext})})]},e.mID)}},Xl=class extends Et{swiperRef=null;swiperInstance=null;constructor(e,t){super(e,t)}componentDidMount(){Up().then(()=>{this.swiperInstance=Hp(this.swiperRef,this.props.element.conf)})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.element,t=r=>{this.swiperRef=r},n=()=>e.values?.map(r=>G("div",{class:"swiper-slide",onClick:()=>this.onClick({clickAction:this.getClickAction(r)}),children:this.renderElement(r)}));return jp(e.conf,t,n)}getComponentStyles(){return{}}renderElement(e){let t=this.valueAddedSlide(this.props.element.slide,e);switch(t?.t){case 1:return G(Yi,{element:t,triggerContext:this.props.triggerContext});case 4:return G(Ki,{elements:t.elems,element:t,triggerContext:this.props.triggerContext});default:S.warn("Unknown slide type for carousal")}}valueAddedSlide(e,t){let n=JSON.stringify(e),r=mn.render(n,{form:t});return ir.getParsedElement(JSON.parse(r))}getClickAction(e){let t=w({},this.props.element.clc),n=JSON.stringify(t),r=mn.render(n,{form:e});return JSON.parse(r)}},Do=class extends Et{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"})),Dn(()=>{this.setState(()=>({showButton:!this.props.triggerContext.triggerData.isBundle()||!!this.props.triggerContext.selectedItems.length}))})}renderElement(e){if(!e.hide){if(e.t===4){let t=e;return G(Ki,{element:t,triggerContext:this.props.triggerContext,elements:t.elems})}if(e.t===61)return G(Wl,{element:e,triggerContext:this.props.triggerContext});if(e.t===3)return this.state.showButton?G(Os,{element:e,triggerContext:this.props.triggerContext}):void 0;if(e.t===2)return G(sr,{element:e,triggerContext:this.props.triggerContext});if(e.t===1)return G(Yi,{element:e,triggerContext:this.props.triggerContext});if(e.t===11)return G(Zl,{element:e,triggerContext:this.props.triggerContext});if(e.t===12)return G(Ps,{element:e,item:this.props.triggerContext.triggerData.items[0],triggerContext:this.props.triggerContext});if(e.t===62)return G(Xl,{element:e,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}},Jl=class extends Et{clickAction;isClickable;constructor(e,t){super(e,t),this.clickAction=this.props.element.clc,this.isClickable=this.clickAction?.at===4&&this.clickAction.gu?.u}componentDidMount(){Dn(()=>{let e=this.props.triggerContext.triggerData,t=this.props.triggerContext.selectedItems;e.calculateDiscountData(t,this.props.triggerContext.shouldGiveFBTDiscount)})}render(){return G(Ei,{children:[G("div",{style:this.getCompiledStyles(),class:"lc-container",onClick:()=>{this.onClick({clickAction:this.clickAction})},children:G(Do,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})}),this.props.triggerContext.triggerData.id==="preview"&&G("div",{class:"letscooee-preview-badge",children:["#",this.props.triggerContext.triggerData.shortID," preview"]})]})}getComponentStyles(){let e={position:"relative",overflow:"hidden",display:"block"};return this.isClickable&&(e.cursor="pointer"),e}async onClick(e){if(this.isClickable)return super.onClick(e)}},Zn=class ga{constructor(t){this.engagementTrigger=t,this.triggerContext=new dc(new Date,this.engagementTrigger)}static renderedEngagements=[];static engagementIDsWithTrackedDisplay=new Set;static DEBOUNCE_TIME=1e3;rootContainer;widgetElement;widget;triggerContext;observers=[];runtimeData=Oe.get();widgetAPIService=Ve.get(Wr);safeHTTPService=Ve.get(Ue);scrollSubscription;variation;isExclusionWithBVariation;renderSilently(){this.render().catch(t=>Ct.getInstance().captureException(t,w({},this.engagementTrigger.sentryContext())))}destroy(){S.log(`${this.engagementTrigger} will be destroyed`),this.scrollSubscription?.unsubscribe(),this.observers.forEach(t=>{t?.disconnect&&t.disconnect()}),this.rootContainer?.remove(),ga.engagementIDsWithTrackedDisplay.delete(this.engagementTrigger.shortID)}async render(){if(this.engagementTrigger.hasMultiplePlacement){let t=await this.getVariation();this.handleVariationResponse(t)}if(this.rootContainer=await this.getWidgetContainer(!0),!this.rootContainer){S.warn(`${this.engagementTrigger} no section found to render the widget`);return}this.widget=this.engagementTrigger.widget,await this.getVariationIfRequired(),!this.shouldStopRendering()&&(await this.startRendering(),this.attachScroll(),await this.checkAndSendEvent(),this.triggerContext.renderer=this)}isSameTrigger(t){return this.engagementTrigger.shortID===t.shortID}update(t){lx.default.log(`${this.engagementTrigger} will be updated`),this.updateItems(t.items,this.engagementTrigger.items)}shouldStopRendering(){return!this.widget&&!this.isExclusionWithBVariation}async getVariationIfRequired(){if(this.engagementTrigger.isSingleContent()||this.engagementTrigger.widget){S.log(`${this.engagementTrigger} already has required data to render widget`);return}let t=await this.observeWidgetContainerInViewport();this.handleVariationResponse(t)}handleVariationResponse(t){t&&(S.log(`${this.engagementTrigger} visitor has been assigned to variation ${t.variation}`),t.items?.length&&(this.engagementTrigger.items=t.items.map(n=>new Kn(n)),this.engagementTrigger.nonMutableItems=t.items.map(n=>new Kn(n))),t.bundleFrom&&(this.engagementTrigger.bundleFrom=new Kn(t.bundleFrom)),t.discount&&(this.engagementTrigger.discount=t.discount),t.placement&&(this.triggerContext.triggerData.placement=t.placement),t.props&&cx.JSUtils.hasKeys(t.props)&&(this.engagementTrigger.props=w(w({},this.engagementTrigger.props),t.props)),this.triggerContext.triggerData.widget=this.widget=new uc(t.widget),this.triggerContext.triggerData.contentID=t.contentID,this.triggerContext.triggerData.variation=this.variation=t.variation,this.triggerContext.triggerData.placement=t.placement,this.triggerContext.triggerData.manipulation=t.manipulation,this.isExclusionWithBVariation=this.engagementTrigger.isExclusionTesting()&&this.variation==="b",this.isExclusionWithBVariation&&(this.rootContainer.style.height="0.5px"))}addToRendered(){ga.renderedEngagements.push(this)}async getVariation(){S.log(`${this.engagementTrigger} get variation`);let t={engagementID:this.engagementTrigger.engagementID,isPreview:this.engagementTrigger.id==="preview"};try{return await this.widgetAPIService.getVariation(t)}catch(n){S.error(`${this.engagementTrigger} unable to get the variation`,n);return}}async observeWidgetContainerInViewport(){if(!this.rootContainer){S.warn(`${this.engagementTrigger} No root container found to watch for viewport`);return}let t=window.innerHeight*.3,n={root:null,rootMargin:`-${t}px 0px ${t}px 0px`,threshold:0};return await this.isInViewport()?this.getVariation():new Promise(r=>{let i=new IntersectionObserver((s,o)=>{s.forEach(async a=>{if(a.isIntersecting){S.log(`${this.engagementTrigger} root container is near the viewport. Fetching variation`);let l=await this.getVariation();r(l),o.unobserve(this.rootContainer)}})},n);i.observe(this.rootContainer),this.observers.push(i)})}attachScroll(){this.scrollSubscription=Lo(window,"scroll").pipe(Tr(ga.DEBOUNCE_TIME)).subscribe(()=>{this.checkAndSendEvent()})}async checkAndSendEvent(){let t=this.engagementTrigger.shortID;if(ga.engagementIDsWithTrackedDisplay.has(t)||!await this.isInViewport())return;let n={};this.triggerContext.triggerData.items?.length&&(n.promotedMIDs=this.engagementTrigger.items?.map(s=>s.mID));let r=this.isExclusionWithBVariation?k.EVENT_CAMPAIGN_HOLDOUT:k.EVENT_TRIGGER_DISPLAYED,i=new Pe(r,n,this.engagementTrigger);i.name===k.EVENT_CAMPAIGN_HOLDOUT&&(i.trigger.holdout=!0),this.safeHTTPService.sendEvent(i),ga.engagementIDsWithTrackedDisplay.add(t),this.scrollSubscription.unsubscribe()}generateParentElementID(){return`letscooee-${this.engagementTrigger.shortID}`}async isInViewport(){let t=(await this.getWidgetContainer())?.getBoundingClientRect();if(!t)return!1;let n=window.innerHeight||document.documentElement.clientHeight,r=(Math.min(t.bottom,n)-Math.max(t.top,0))*t.width,i=t.width*t.height,s=r/i*100;return this.engagementTrigger.isAnySplit()?s>0:s>=30}async getWidgetContainer(t){if(this.rootContainer?.isConnected)return this.rootContainer;let n=await this.createParentElementWithPlacement(t);if(n)return n;let r=`.letscooee[data-engagement-id="${this.triggerContext.triggerData.shortID}"]`;return document.querySelector(r)}async createParentElementWithPlacement(t){let n=this.engagementTrigger.placement;if(!n?.selector)return S.warn(`${this.engagementTrigger} does not have a selector`),null;let r=n.selector,i;if(r.includes(k.SHADOW_SPLITTER)){let l=r.split(k.SHADOW_SPLITTER);i=(await fe.retrySelector(l[0].trim()))?.shadowRoot,r=l[1].trim(),i&&Sn.injectStylesheet(Rn.styleURL,i);let c=Ot.get().website.commonCSS;i&&c&&Sn.injectRawCSS(c,i)}S.debug(`${this.engagementTrigger} attempt to render ${n.position}-${r}`);let s=await fe.retrySelector(r,10,i??document);if(!s)return S.warn(`${this.engagementTrigger} no placement found with ${r}`),null;let o=this.generateParentElementID(),a=this.getParentElement(o);if(!t)return a;switch(n.position){case Ql.EngagementPlacementPosition.BEFORE:{s.parentElement?.insertBefore(a,s);break}case Ql.EngagementPlacementPosition.INSIDE_FIRST:{s.insertBefore(a,s.firstChild);break}case Ql.EngagementPlacementPosition.INSIDE_LAST:{s.appendChild(a);break}case Ql.EngagementPlacementPosition.AFTER:default:s.parentElement?.insertBefore(a,s.nextSibling)}return a}async startRendering(){let t;try{t=await fc.refreshItems(this.engagementTrigger)}catch(n){S.error(`${this.engagementTrigger} error refreshing the items`,n);return}if(!t?.length&&this.engagementTrigger.isProductPromoted()){S.warn(`${this.engagementTrigger} is of ${this.engagementTrigger.objective} but no product found`);return}this.engagementTrigger.items=t,this.renderContainer()}getParentElement(t,n=document){let r=n.getElementById(t);if(r)return r;let i=this.engagementTrigger.shortID;return r=document.createElement("div"),r.id=t,r.className=`letscooee letscooee-engagement engagement-${i}`,r.dataset.engagementId=i,this.engagementTrigger.id==="preview"&&(r.className+=" letscooee-preview"),r.style.display="block",r.style.minHeight="0.5px",r.style.minWidth="0.5px",r}renderContainer(){if(!this.widget)return;let t=this.rootContainer;if(this.triggerContext.triggerData.hasSwiperElement()){let n=this.rootContainer?.shadowRoot||this.rootContainer?.attachShadow({mode:"open"}),r=Ot.get().website.commonCSS;r&&Sn.injectRawCSS(r,n),Sn.injectStylesheet(Rn.styleURL,n),Sn.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",n),t=n}BT(Z_(Jl,{element:this.widget.cont,triggerContext:this.triggerContext,elements:this.widget.elems}),t),this.addToRendered()}updateItems(t,n){let r=this.getItemDiff(t,n),i=this.getItemDiff(n,t);n.push(...r);for(let s of i)ax.ArrayUtils.remove(n,s)}getItemDiff(t,n){return t.filter(r=>!n.some(i=>i.selectedOrFirstVariant.value.mID===r.selectedOrFirstVariant.value.mID))}},Ci=class HS extends Zn{static renderedEngagements=[];constructor(t){super(t)}addToRendered(){HS.renderedEngagements.push(this)}observeWidgetContainerInViewport(){return this.getVariation()}generateParentElementID(){let t=super.generateParentElementID();return this.engagementTrigger.isSubscriptionUpsell()&&(t+=`-${this.engagementTrigger.items[0].selectedOrFirstVariant.value.mID}`),t}async checkAndSendEvent(){if(!Kt.get().isOpen()&&this.runtimeData.pageName!=="cart"){S.log("Do not send display event as neither the cart drawer nor the cart page is open.");return}return super.checkAndSendEvent()}},Wp=class $S{constructor(t,n){this.engagementTrigger=t,this.element=n,this.cartItems=Ye.getCurrent().items}cartItems;static renderCartUpsell(t){let n=t.placement;if(!n?.selector){S.warn(`No placement available for ${t.objective}`,t.shortID);return}let r=Array.from(document.querySelectorAll(n.selector));if(!r?.length){S.warn(`No placement found for ${t.objective}`,t.shortID);return}for(let i of r)new $S(t,i).render()}render(){let t=this.findCartItemFromHTMLElement();if(!t||this.engagementTrigger.skipSubscribedItems&&t.selling_plan_allocation)return;let n=this.engagementTrigger.items.find(h=>h.mID===t.product_id.toString());if(!n)return;let r=n.vars.find(h=>h.mID===t.id.toString());if(!r)return;let i=new wi(r),s=t.selling_plan_allocation?.selling_plan;if(s)for(let h of i.sellingPlans??[])h.mID===s.id.toString()&&(h.isSelected=!0,i.changeSellingPlan(h));let o=new Kn(n);o.vars=[i],o.selectedOrFirstVariant.value=i;let a=`lc-cart-item-${this.engagementTrigger.shortID}-${n.mID}`;this.element.classList.add(a);let l=new or(this.engagementTrigger);l.placement.selector=`.${a}`,l.items=[o];let c=new Ci(l);c.renderSilently(),this.watchForCartItemDeletion(c,a)}watchForCartItemDeletion(t,n){let r=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{o===this.element&&(S.debug(`${n} has been removed`),t.destroy(),r.disconnect())})})});r.observe(this.element.parentElement,{childList:!0,subtree:!0})}findCartItemFromHTMLElement(){let t=this.element.innerHTML;return this.cartItems.find(n=>{if(!(t.includes(n.url)||t.includes(n.variant_id))&&(!t.includes(n.product_title)||n.variant_title&&!t.includes(n.variant_title)))return!1;let r=n.selling_plan_allocation?.selling_plan?.name;return!(r&&!t.includes(r))})}},dx=Fe(Qn()),Zi=Fe(Qn()),J2=`
|
|
53
|
+
`},navigation:{nextEl:e.querySelector(".swiper-button-next"),prevEl:e.querySelector(".swiper-button-prev")},autoplay:t.autoplay?.enabled?{delay:t.autoplay?.delay,disableOnInteraction:!1}:!1,autoHeight:!0});return e.style.setProperty("--swiper-navigation-size",`${t.navigation.size}px`),n}function jp(e,t,n){let r={color:e.navigation.color?.rgba};return e.pagination.enabled&&(r.transform="translateY(-25%)"),G("div",{class:"swiper-container",ref:t,children:[G("div",{class:"swiper-wrapper",children:n()}),e.navigation.enabled&&G("div",{class:"swiper-button-next",style:r,children:G("span",{})}),e.navigation.enabled&&G("div",{class:"swiper-button-prev",style:r,children:G("span",{})}),e.pagination.enabled&&G("div",{className:"swiper-pagination",style:{bottom:0,top:"unset",position:"relative",color:e.pagination.color?.rgba}})]})}var Zl=class extends Et{swiperRef=null;swiperInstance=null;configuration;gap;constructor(e,t){super(e,t),this.configuration=this.renderer.isMobile()?this.props.element.conf.sm:this.props.element.conf.lg,this.gap=(this.configuration.gap??15)+"px"}componentDidMount(){this.props.element.conf[this.deviceTypeKey].disp===2&&Up().then(()=>{this.swiperInstance=Hp(this.swiperRef,this.props.element.conf[this.deviceTypeKey])})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.triggerContext.triggerData.items;e.splice(this.configuration.maxItems??10);let t;if(this.configuration.disp===2){let n=i=>{this.swiperRef=i},r=()=>e?.map(i=>G("div",{class:"swiper-slide",children:this.getProductFragment(i)}));t=G("div",{style:re(w({},this.getCompiledStyles()),{display:"block"}),class:"lc-product-swiper-list",children:jp(this.configuration,n,r)})}else t=G("div",{style:this.getCompiledStyles(),class:"lc-product-list",children:e?.map((n,r)=>this.getProductFragment(n,r!==e.length-1))});return t}getComponentStyles(){let e=[0,2].includes(this.configuration.disp),t={display:e?"flex":"grid",justifyContent:"safe "+(this.mediaStyle.flex?.jc??"center"),gap:this.gap,flexDirection:this.mediaStyle.flex?.dir??"row"};if(t.flexDirection==="row"){if(e)t.maxWidth="100%",t.overflowY="auto";else if(this.configuration.disp===1){let n=this.props.triggerContext.triggerData,r=n.items.length,i;n.isBundle()?i=this.props.element.prod.symbol?.hide!==!0?r*2-1:r:i=this.props.element.conf[this.deviceTypeKey].maxInRow,t.gridTemplateColumns=`repeat(${i}, auto)`}}return t}getProductFragment(e,t=!1){return G(Ei,{children:[G(Ps,{element:this.props.element.prod,item:e,triggerContext:this.props.triggerContext}),this.props.triggerContext.triggerData.isBundle()&&t&&this.props.element.prod.symbol&&!this.props.element.prod.symbol.hide&&G("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:G(ar,{element:this.props.element.prod.symbol,triggerContext:this.props.triggerContext})})]},e.mID)}},Xl=class extends Et{swiperRef=null;swiperInstance=null;constructor(e,t){super(e,t)}componentDidMount(){Up().then(()=>{this.swiperInstance=Hp(this.swiperRef,this.props.element.conf)})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.element,t=r=>{this.swiperRef=r},n=()=>e.values?.map(r=>G("div",{class:"swiper-slide",onClick:()=>this.onClick({clickAction:this.getClickAction(r)}),children:this.renderElement(r)}));return jp(e.conf,t,n)}getComponentStyles(){return{}}renderElement(e){let t=this.valueAddedSlide(this.props.element.slide,e);switch(t?.t){case 1:return G(Yi,{element:t,triggerContext:this.props.triggerContext});case 4:return G(Ki,{elements:t.elems,element:t,triggerContext:this.props.triggerContext});default:S.warn("Unknown slide type for carousal")}}valueAddedSlide(e,t){let n=JSON.stringify(e),r=mn.render(n,{form:t});return or.getParsedElement(JSON.parse(r))}getClickAction(e){let t=w({},this.props.element.clc),n=JSON.stringify(t),r=mn.render(n,{form:e});return JSON.parse(r)}},Do=class extends Et{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"})),Dn(()=>{this.setState(()=>({showButton:!this.props.triggerContext.triggerData.isBundle()||!!this.props.triggerContext.selectedItems.length}))})}renderElement(e){if(!e.hide){if(e.t===4){let t=e;return G(Ki,{element:t,triggerContext:this.props.triggerContext,elements:t.elems})}if(e.t===61)return G(Wl,{element:e,triggerContext:this.props.triggerContext});if(e.t===3)return this.state.showButton?G(Os,{element:e,triggerContext:this.props.triggerContext}):void 0;if(e.t===2)return G(ar,{element:e,triggerContext:this.props.triggerContext});if(e.t===1)return G(Yi,{element:e,triggerContext:this.props.triggerContext});if(e.t===11)return G(Zl,{element:e,triggerContext:this.props.triggerContext});if(e.t===12)return G(Ps,{element:e,item:this.props.triggerContext.triggerData.items[0],triggerContext:this.props.triggerContext});if(e.t===62)return G(Xl,{element:e,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}},Jl=class extends Et{clickAction;isClickable;constructor(e,t){super(e,t),this.clickAction=this.props.element.clc,this.isClickable=this.clickAction?.at===4&&this.clickAction.gu?.u}componentDidMount(){Dn(()=>{let e=this.props.triggerContext.triggerData,t=this.props.triggerContext.selectedItems;e.calculateDiscountData(t,this.props.triggerContext.shouldGiveFBTDiscount)})}render(){return G(Ei,{children:[G("div",{style:this.getCompiledStyles(),class:"lc-container",onClick:()=>{this.onClick({clickAction:this.clickAction})},children:G(Do,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})}),this.props.triggerContext.triggerData.id==="preview"&&G("div",{class:"letscooee-preview-badge",children:["#",this.props.triggerContext.triggerData.shortID," preview"]})]})}getComponentStyles(){let e={position:"relative",overflow:"hidden",display:"block"};return this.isClickable&&(e.cursor="pointer"),e}async onClick(e){if(this.isClickable)return super.onClick(e)}},Zn=class ga{constructor(t){this.engagementTrigger=t,this.triggerContext=new dc(new Date,this.engagementTrigger)}static renderedEngagements=[];static engagementIDsWithTrackedDisplay=new Set;static DEBOUNCE_TIME=1e3;rootContainer;widgetElement;widget;triggerContext;observers=[];runtimeData=Oe.get();widgetAPIService=Ve.get(Wr);safeHTTPService=Ve.get(Ue);scrollSubscription;variation;isExclusionWithBVariation;renderSilently(){this.render().catch(t=>Ct.getInstance().captureException(t,w({},this.engagementTrigger.sentryContext())))}destroy(){S.log(`${this.engagementTrigger} will be destroyed`),this.scrollSubscription?.unsubscribe(),this.observers.forEach(t=>{t?.disconnect&&t.disconnect()}),this.rootContainer?.remove(),ga.engagementIDsWithTrackedDisplay.delete(this.engagementTrigger.shortID)}async render(){if(this.engagementTrigger.hasMultiplePlacement){let t=await this.getVariation();this.handleVariationResponse(t)}if(this.rootContainer=await this.getWidgetContainer(!0),!this.rootContainer){S.warn(`${this.engagementTrigger} no section found to render the widget`);return}this.widget=this.engagementTrigger.widget,await this.getVariationIfRequired(),!this.shouldStopRendering()&&(await this.startRendering(),this.attachScroll(),await this.checkAndSendEvent(),this.triggerContext.renderer=this)}isSameTrigger(t){return this.engagementTrigger.shortID===t.shortID}update(t){lx.default.log(`${this.engagementTrigger} will be updated`),this.updateItems(t.items,this.engagementTrigger.items)}shouldStopRendering(){return!this.widget&&!this.isExclusionWithBVariation}async getVariationIfRequired(){if(this.engagementTrigger.isSingleContent()||this.engagementTrigger.widget){S.log(`${this.engagementTrigger} already has required data to render widget`);return}let t=await this.observeWidgetContainerInViewport();this.handleVariationResponse(t)}handleVariationResponse(t){t&&(S.log(`${this.engagementTrigger} visitor has been assigned to variation ${t.variation}`),t.items?.length&&(this.engagementTrigger.items=t.items.map(n=>new Kn(n)),this.engagementTrigger.nonMutableItems=t.items.map(n=>new Kn(n))),t.bundleFrom&&(this.engagementTrigger.bundleFrom=new Kn(t.bundleFrom)),t.discount&&(this.engagementTrigger.discount=t.discount),t.placement&&(this.triggerContext.triggerData.placement=t.placement),t.props&&cx.JSUtils.hasKeys(t.props)&&(this.engagementTrigger.props=w(w({},this.engagementTrigger.props),t.props)),this.triggerContext.triggerData.widget=this.widget=new uc(t.widget),this.triggerContext.triggerData.contentID=t.contentID,this.triggerContext.triggerData.variation=this.variation=t.variation,this.triggerContext.triggerData.placement=t.placement,this.triggerContext.triggerData.manipulation=t.manipulation,this.isExclusionWithBVariation=this.engagementTrigger.isExclusionTesting()&&this.variation==="b",this.isExclusionWithBVariation&&(this.rootContainer.style.height="0.5px"))}addToRendered(){ga.renderedEngagements.push(this)}async getVariation(){S.log(`${this.engagementTrigger} get variation`);let t={engagementID:this.engagementTrigger.engagementID,isPreview:this.engagementTrigger.id==="preview"};try{return await this.widgetAPIService.getVariation(t)}catch(n){S.error(`${this.engagementTrigger} unable to get the variation`,n);return}}async observeWidgetContainerInViewport(){if(!this.rootContainer){S.warn(`${this.engagementTrigger} No root container found to watch for viewport`);return}let t=window.innerHeight*.3,n={root:null,rootMargin:`-${t}px 0px ${t}px 0px`,threshold:0};return await this.isInViewport()?this.getVariation():new Promise(r=>{let i=new IntersectionObserver((s,o)=>{s.forEach(async a=>{if(a.isIntersecting){S.log(`${this.engagementTrigger} root container is near the viewport. Fetching variation`);let l=await this.getVariation();r(l),o.unobserve(this.rootContainer)}})},n);i.observe(this.rootContainer),this.observers.push(i)})}attachScroll(){this.scrollSubscription=Lo(window,"scroll").pipe(Rr(ga.DEBOUNCE_TIME)).subscribe(()=>{this.checkAndSendEvent()})}async checkAndSendEvent(){let t=this.engagementTrigger.shortID;if(ga.engagementIDsWithTrackedDisplay.has(t)||!await this.isInViewport())return;let n={};this.triggerContext.triggerData.items?.length&&(n.promotedMIDs=this.engagementTrigger.items?.map(s=>s.mID));let r=this.isExclusionWithBVariation?k.EVENT_CAMPAIGN_HOLDOUT:k.EVENT_TRIGGER_DISPLAYED,i=new Pe(r,n,this.engagementTrigger);i.name===k.EVENT_CAMPAIGN_HOLDOUT&&(i.trigger.holdout=!0),this.safeHTTPService.sendEvent(i),ga.engagementIDsWithTrackedDisplay.add(t),this.scrollSubscription.unsubscribe()}generateParentElementID(){return`letscooee-${this.engagementTrigger.shortID}`}async isInViewport(){let t=(await this.getWidgetContainer())?.getBoundingClientRect();if(!t)return!1;let n=window.innerHeight||document.documentElement.clientHeight,r=(Math.min(t.bottom,n)-Math.max(t.top,0))*t.width,i=t.width*t.height,s=r/i*100;return this.engagementTrigger.isAnySplit()?s>0:s>=30}async getWidgetContainer(t){if(this.rootContainer?.isConnected)return this.rootContainer;let n=await this.createParentElementWithPlacement(t);if(n)return n;let r=`.letscooee[data-engagement-id="${this.triggerContext.triggerData.shortID}"]`;return document.querySelector(r)}async createParentElementWithPlacement(t){let n=this.engagementTrigger.placement;if(!n?.selector)return S.warn(`${this.engagementTrigger} does not have a selector`),null;let r=n.selector,i;if(r.includes(k.SHADOW_SPLITTER)){let l=r.split(k.SHADOW_SPLITTER);i=(await fe.retrySelector(l[0].trim()))?.shadowRoot,r=l[1].trim(),i&&Sn.injectStylesheet(Rn.styleURL,i);let c=Pt.get().website.commonCSS;i&&c&&Sn.injectRawCSS(c,i)}S.debug(`${this.engagementTrigger} attempt to render ${n.position}-${r}`);let s=await fe.retrySelector(r,10,i??document);if(!s)return S.warn(`${this.engagementTrigger} no placement found with ${r}`),null;let o=this.generateParentElementID(),a=this.getParentElement(o);if(!t)return a;switch(n.position){case Ql.EngagementPlacementPosition.BEFORE:{s.parentElement?.insertBefore(a,s);break}case Ql.EngagementPlacementPosition.INSIDE_FIRST:{s.insertBefore(a,s.firstChild);break}case Ql.EngagementPlacementPosition.INSIDE_LAST:{s.appendChild(a);break}case Ql.EngagementPlacementPosition.AFTER:default:s.parentElement?.insertBefore(a,s.nextSibling)}return a}async startRendering(){let t;try{t=await fc.refreshItems(this.engagementTrigger)}catch(n){S.error(`${this.engagementTrigger} error refreshing the items`,n);return}if(!t?.length&&this.engagementTrigger.isProductPromoted()){S.warn(`${this.engagementTrigger} is of ${this.engagementTrigger.objective} but no product found`);return}this.engagementTrigger.items=t,this.renderContainer()}getParentElement(t,n=document){let r=n.getElementById(t);if(r)return r;let i=this.engagementTrigger.shortID;return r=document.createElement("div"),r.id=t,r.className=`letscooee letscooee-engagement engagement-${i}`,r.dataset.engagementId=i,this.engagementTrigger.id==="preview"&&(r.className+=" letscooee-preview"),r.style.display="block",r.style.minHeight="0.5px",r.style.minWidth="0.5px",r}renderContainer(){if(!this.widget)return;let t=this.rootContainer;if(this.triggerContext.triggerData.hasSwiperElement()){let n=this.rootContainer?.shadowRoot||this.rootContainer?.attachShadow({mode:"open"}),r=Pt.get().website.commonCSS;r&&Sn.injectRawCSS(r,n),Sn.injectStylesheet(Rn.styleURL,n),Sn.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",n),t=n}BT(Z_(Jl,{element:this.widget.cont,triggerContext:this.triggerContext,elements:this.widget.elems}),t),this.addToRendered()}updateItems(t,n){let r=this.getItemDiff(t,n),i=this.getItemDiff(n,t);n.push(...r);for(let s of i)ax.ArrayUtils.remove(n,s)}getItemDiff(t,n){return t.filter(r=>!n.some(i=>i.selectedOrFirstVariant.value.mID===r.selectedOrFirstVariant.value.mID))}},Ci=class HS extends Zn{static renderedEngagements=[];constructor(t){super(t)}addToRendered(){HS.renderedEngagements.push(this)}observeWidgetContainerInViewport(){return this.getVariation()}generateParentElementID(){let t=super.generateParentElementID();return this.engagementTrigger.isSubscriptionUpsell()&&(t+=`-${this.engagementTrigger.items[0].selectedOrFirstVariant.value.mID}`),t}async checkAndSendEvent(){if(!Kt.get().isOpen()&&this.runtimeData.pageName!=="cart"){S.log("Do not send display event as neither the cart drawer nor the cart page is open.");return}return super.checkAndSendEvent()}},Wp=class $S{constructor(t,n){this.engagementTrigger=t,this.element=n,this.cartItems=Ye.getCurrent().items}cartItems;static renderCartUpsell(t){let n=t.placement;if(!n?.selector){S.warn(`No placement available for ${t.objective}`,t.shortID);return}let r=Array.from(document.querySelectorAll(n.selector));if(!r?.length){S.warn(`No placement found for ${t.objective}`,t.shortID);return}for(let i of r)new $S(t,i).render()}render(){let t=this.findCartItemFromHTMLElement();if(!t||this.engagementTrigger.skipSubscribedItems&&t.selling_plan_allocation)return;let n=this.engagementTrigger.items.find(h=>h.mID===t.product_id.toString());if(!n)return;let r=n.vars.find(h=>h.mID===t.id.toString());if(!r)return;let i=new wi(r),s=t.selling_plan_allocation?.selling_plan;if(s)for(let h of i.sellingPlans??[])h.mID===s.id.toString()&&(h.isSelected=!0,i.changeSellingPlan(h));let o=new Kn(n);o.vars=[i],o.selectedOrFirstVariant.value=i;let a=`lc-cart-item-${this.engagementTrigger.shortID}-${n.mID}`;this.element.classList.add(a);let l=new sr(this.engagementTrigger);l.placement.selector=`.${a}`,l.items=[o];let c=new Ci(l);c.renderSilently(),this.watchForCartItemDeletion(c,a)}watchForCartItemDeletion(t,n){let r=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{o===this.element&&(S.debug(`${n} has been removed`),t.destroy(),r.disconnect())})})});r.observe(this.element.parentElement,{childList:!0,subtree:!0})}findCartItemFromHTMLElement(){let t=this.element.innerHTML;return this.cartItems.find(n=>{if(!(t.includes(n.url)||t.includes(n.variant_id))&&(!t.includes(n.product_title)||n.variant_title&&!t.includes(n.variant_title)))return!1;let r=n.selling_plan_allocation?.selling_plan?.name;return!(r&&!t.includes(r))})}},dx=Fe(er()),Zi=Fe(er()),eU=`
|
|
54
54
|
mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
|
|
55
55
|
cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {
|
|
56
56
|
cart {
|
|
@@ -62,7 +62,7 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`,Io=class{static navigate(e,t,n){let r=`${location.origin}/discount/${e}`;switch(S.log(`Applying discount code ${e}`,t,n),t){case Zi.RedirectBehaviour.CART_PAGE:location.href=`${r}?redirect=/cart`;break;case Zi.RedirectBehaviour.CART_DRAWER:location.href=`${r}?redirect=${location.pathname}#${k.HASH_OPEN_CART_DRAWER}=1`;break;case Zi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href=`${r}?redirect=/checkout`;break;case Zi.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`${r}?redirect=/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;default:location.href=`${r}?redirect=${n||location.pathname}`}}static navigateWithoutDiscount(e,t){let n=Kt.get();switch(e){case Zi.RedirectBehaviour.CART_PAGE:location.href="/cart";break;case Zi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href="/checkout";break;case Zi.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;case Zi.RedirectBehaviour.CART_DRAWER:{n.open();break}}t&&n.refreshUI(t)}static async applyWithStorefront(e){let t=
|
|
65
|
+
`,Io=class{static navigate(e,t,n){let r=`${location.origin}/discount/${e}`;switch(S.log(`Applying discount code ${e}`,t,n),t){case Zi.RedirectBehaviour.CART_PAGE:location.href=`${r}?redirect=/cart`;break;case Zi.RedirectBehaviour.CART_DRAWER:location.href=`${r}?redirect=${location.pathname}#${k.HASH_OPEN_CART_DRAWER}=1`;break;case Zi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href=`${r}?redirect=/checkout`;break;case Zi.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`${r}?redirect=/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;default:location.href=`${r}?redirect=${n||location.pathname}`}}static navigateWithoutDiscount(e,t){let n=Kt.get();switch(e){case Zi.RedirectBehaviour.CART_PAGE:location.href="/cart";break;case Zi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href="/checkout";break;case Zi.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;case Zi.RedirectBehaviour.CART_DRAWER:{n.open();break}}t&&n.refreshUI(t)}static async applyWithStorefront(e){let t=Pt.get().storefrontToken;if(!t)throw new Error("Storefront token not set for the store");let n=new Headers;n.append("Content-Type","application/json"),n.append("X-Shopify-Storefront-Access-Token",t);let r=JSON.stringify({query:eU,variables:{cartId:`gid://shopify/Cart/${Ye.getCurrent().token}`,discountCodes:[e]}}),i={method:"POST",headers:n,body:r};await Mn.getInstance().request(k.GRAPHQL_API_PATH,i)}static checkThirdPartyMethods(e){window.triggerGokwikCustomCheckout?window.triggerGokwikCustomCheckout():window.shiprocketCheckoutEvents?.buyCart?window.shiprocketCheckoutEvents.buyCart():window.openCheckout?window.openCheckout():window.openRzpCheckout?window.openRzpCheckout():location.href=e}},ux=Fe(va()),tU=`
|
|
66
66
|
mutation cartCreate($input: CartInput) {
|
|
67
67
|
cartCreate(input: $input) {
|
|
68
68
|
cart {
|
|
@@ -75,6 +75,6 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
`,To=class{listen(){document.addEventListener(k.CTA_EVENT,async e=>{await this.processEvent(e)},!1)}async performAddToCart(e,t){if(!e.length)return;let n=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),r=Tt.getCartURL("cart/add.js"),i={items:n},s=Kt.get();s.isMiniCart()?i.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(i.sections=s.element.getSectionsToRender?.().map(a=>a.section??a.id));let o=JSON.stringify(i);try{let a=await fetch(r,{body:o,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return S.log(`Added ${e.length} items to Cart`),fe.showSnackbar("Product added to your cart"),a.json()}catch(a){S.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!ux.JSUtils.hasKeys(t)){S.warn("No update fields provided");return}let n=Tt.getCartURL("cart/change.js"),r=w({id:e.key},t),i=JSON.stringify(r);try{let s=await fetch(n,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(S.log(`Updated ${e}`),Ye.getCurrent().update(s.json()))}catch(s){S.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),S.log(`Code-${e} copied`),fe.showSnackbar("Discount code copied")}catch(t){S.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=Tt.getProductSlug(e.link);t&&(location.pathname=Tt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){S.warn("Trying to upgrade to subscription with no item");return}let n=await Ye.getCurrent().getNormalisedCart(),r=e.selectedOrFirstVariant.value,i=n.items.findIndex(c=>c.vID===r.mID),s=r.selectedSellingPlan.value,o=Tt.getCartURL("cart/change.js"),a={line:i+1,selling_plan:s?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(o,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){S.log(`Upgraded ${e} selling plan`),fe.showSnackbar("Line item updated");let h=await c.json();return Ye.getCurrent().update(h),h}}catch(c){S.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,n){let r=Ot.get().storefrontToken;if(!r)throw new Error("Storefront token not set for the store");if(!e?.vID){S.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:n.getKVFormatPrivateAttributesForLineItem()}],o=await fe.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",r);let l=JSON.stringify({query:Q2,variables:{input:{lines:s,discountCodes:i,attributes:o}}});return(await Mn.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let t=e?.detail;if(!t)return;let n=t.clickAction,r=t.items,i=t.triggerData;if(n.at){let s=n;if(S.log(`Performing ${JSON.stringify(s)} action`),s.at===101)r?.length&&this.performGoToItem(r[0]);else if(s.at===102)r?.length&&await this.performAddToCart(r,i);else if(s.at===103)await this.performCopyCoupon(i.discount.code);else if(s.at===105)Kt.get().open();else if(s.at===104){let o=t.collections;if(!o?.length)return;location.pathname=Tt.getRootPrefix()+"collections/"+o[0].handle}}n.applyDiscount&&i.discount?.code&&Io.navigate(i.discount.code,i.redirectBehaviour)}getVIDAndQuantity(e){let t,n;if(e instanceof fn)t=e.vID,n=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,n=1}return{vID:t,quantity:n}}},Gp=class extends Ci{ctaListener=new To;constructor(e){super(e),yi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Ti(null)).subscribe(this.checkMilestone.bind(this))}update(e){super.update(e),this.widgetElement.update()}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-progressbar");e.className="cooee-root",e.cart=Ye.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await Ye.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let n of t){if(e.amount<n.minValue)break;if(S.log("Current milestone",n),n.rewardType===dx.MilestoneRewardType.FREE_AUTO_GIFT){let r=n.items[0],i=e.items.find(s=>s.vID===r.vID||s.mID===r.mID);if(i)S.log(`Item(vID:${r.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let s=await this.ctaListener.performAddToCart([r],this.engagementTrigger);Kt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await Ye.getCurrent().getNormalisedCart()).items.filter(n=>n.vID!==e?.vID&&n.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let n of t)await this.ctaListener.performUpdate(n,{quantity:0})}},zp=class extends Zn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-shoppable-videos");e.className="cooee-root",e.triggerContext=this.triggerContext,e.addEventListener("sendEvent",t=>{let n=t.detail;this.safeHTTPService.sendEvent(n)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}},fx=Fe(va()),qp=class extends Zn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){let e=this.getParentElement(`inner-letscooee-${this.engagementTrigger.shortID}`);this.rootContainer.appendChild(e),document.addEventListener(k.ADD_BUNDLE_CTA_INBOUND_EVENT,this.inboundCTAListener.bind(this),!1)}async inboundCTAListener(e){let t=this.engagementTrigger,n=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,r=e.detail;if(!fx.JSUtils.hasKeys(r)){S.error(`No detail received for ${n}`);return}S.log("Detail received for BYOB",r);let i=r.campaignID??r.campaignId??r.campaign_id;if(i!==t.shortID&&i!==t.engagementID){S.warn(`Current ${n} is not BYOB. Received: ${i}`);return}let s=r.items;if(!s?.length)return;let o=s.map(a=>new fn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new So(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},mc=class{runtimeData=Oe.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Ci.renderedEngagements];Ci.renderedEngagements.length=0;for(let n of e)S.log(`\u{1F4E3} ${n} received as cart embed`),!this.findAndUpdateCurrent(n,t)&&(S.log(`${n} is new`),n.isProgressBar()?new Gp(n).renderSilently():n.isSubscriptionUpsell()?Wp.renderCartUpsell(n):new Ci(n).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Zn.renderedEngagements];Zn.renderedEngagements.length=0;for(let n of e)S.log(`\u{1F4E3} ${n} received as page embed`),!this.findAndUpdateCurrent(n,t)&&(S.log(`${n} is new`),n.isShoppableVideo()?new zp(n).renderSilently():n.isBYOB()?new qp(n).renderSilently():new Zn(n).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let n=t.findIndex(r=>r.isSameTrigger(e));return n<0||e.isSubscriptionUpsell()?!1:(t[n].update(e),t[n].renderSilently(),t.splice(n,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},Wr=class GS{static INSTANCE;httpService=Ve.get(Mn);sessionManager=Ve.get(yn);runtimeData=Oe.get();loadWidgetsSubject=new ie;constructor(){this.loadWidgetsSubject.pipe(Tr(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>S.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>S.error("Unable to initiate page widgets",t))}),yi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new GS),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){yn.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>S.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){yn.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>S.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){yn.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();S.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async n=>{let r=n.widgets.map(i=>new or(i));new mc().processPageWidgetResponse(r)}).catch(n=>{S.error("Error sending widget getter",n)})}async loadCartWidgets(){let t=await this.getWidgetProps();S.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async n=>{let r=n.widgets.map(i=>new or(i));new mc().processCartWidgetResponse(r)}).catch(n=>{S.error("Error sending widget getter",n)})}async getVariation(t){let n=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),n))}renderCachedCartWidgets(){new mc().processCartWidgetResponse(this.runtimeData.cartEngagements)}async addSessionContext(t){let n=await this.sessionManager.checkSessionAndGetContext();t.sessionID=n[0],t.sessionNumber=n[1],t.landingPage=n[2],t.page=vi.parseFromCurrent()}addAvailableEngagementShortIDs(){let t=document.querySelectorAll(".letscooee-engagement"),n=[];return t.forEach(r=>{let i=r.dataset.engagementId;i&&+i&&n.push(i)}),n}async getWidgetProps(){let t={};t.engagementIDs=this.addAvailableEngagementShortIDs(),t.locale=this.runtimeData.locale,await this.addSessionContext(t),t.currentItem=this.runtimeData.getCurrentItem();try{t.cart=await Ye.getCurrent().getNormalisedCart()}catch(s){S.error("Error fetching Shopify cart before sending widget call",s)}let n=new URLSearchParams(location.search),r=n.get("cooee-preview");r?t.previewIDs=r.trim().split(",").filter(s=>Number.isInteger(+s)):this.runtimeData.previewIDs?.length&&(t.previewIDs=this.runtimeData.previewIDs);let i=n.get("cooee-variant");return i?t.previewVariant=i:this.runtimeData.previewVariant&&(t.previewVariant=this.runtimeData.previewVariant),t}},Yp=class{runtimeData=Oe.get();widgetAPIService=Ve.get(Wr);meddle(){let e=wt.globalRef;e.account=e.account??[],e.profile=e.profile??[],e.events=e.events??[],e.screen=e.screen??[],e.page=e.page??[],this.meddlePage(),this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.meddleScreen(),this.exposeMethods()}exposeMethods(){let e=wt.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.previewWidget=wt.previewWidget.bind(wt),e.previewPopup=wt.previewPopup.bind(wt)}overwritePush(e,t){xa(e,"push",t)}meddleAccount(){this.overwritePush(wt.globalRef.account,(...e)=>{this.processAccount(e[0])}),wt.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(wt.globalRef.events,(...e)=>{this.processEvent(e[0])}),wt.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(wt.globalRef.profile,(...e)=>{this.processProfile(e[0])}),wt.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(wt.globalRef.screen,(...e)=>{this.processPageName(e[0])}),wt.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&wt.authenticate(e),e.flags&&As.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?wt.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):wt.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&&wt.updateProfile(e)}processPageName(e){e&&wt.setPageName(e)}meddlePage(){this.overwritePush(wt.globalRef.page,(...e)=>{this.processPage(e[0])}),wt.globalRef.page.forEach(this.processPage.bind(this))}processPage(e){e.currentItem&&this.runtimeData.setCurrentItem(e.currentItem),e.currency&&(this.runtimeData.currencyCode=e.currency),e.shopCurrency&&(this.runtimeData.shopCurrencyCode=e.shopCurrency),e.moneyFormat&&(this.runtimeData.moneyFormat=e.moneyFormat),e.jsLoad&&(this.runtimeData.jsLoadTime=e.jsLoad),e.locale&&(this.runtimeData.locale=e.locale),e.pageName&&wt.setPageName(e.pageName)}},gc=class{static SESSION_STORAGE=window.sessionStorage;static SESSION_STORAGE_KEY_PREFIX=k.COOEE.concat("-");static getString(e,t){return this.getItem(e)||t}static setString(e,t){this.setItem(e,t)}static remove(e){this.removeItem(e)}static getItem(e){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}static setItem(e,t){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e),t)}static removeItem(e){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}},vc=class cu{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=Ve.get(Ue);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new cu),this.INSTANCE}resetScrollID(t){gc.remove(k.SESSION_STORAGE_SCROLL_ID),this.lastScreenOrScroll=t??new Date}listen(){if(window.scrollY){let t=this.getPercentScrolledY();this.shouldSendScroll(t)&&this.sendScroll(t)}fe.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Lo(window,"scroll").pipe(Tr(cu.DEBOUNCE_TIME),lr(()=>{let t=this.getPercentScrolledY();if(t>100){S.warn("Received scroll percent is more than 100",t);return}if(this.shouldSendScroll(t))return t})).subscribe(t=>{this.sendScroll(t)})}shouldSendScroll(t){return Math.abs(this.lastPercent-t)>=cu.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let n={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let r=gc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new Pe(k.EVENT_SCROLL,n,null,r);this.safeHttpService.sendEvent(i),gc.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,n=window.innerHeight;return Math.ceil((window.scrollY+n)/t*100)}},Kp=class qS{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=Ve.get(Ue);runtimeData=Oe.get();listen(){document.onvisibilitychange=()=>{document.visibilityState==="visible"?this.onVisible():document.visibilityState==="hidden"&&this.onHidden()}}async onVisible(){}async onHidden(){let t=await this.runtimeData.setInactive();if(t===0){S.info("Not sending background event as user was inactive on website");return}S.info(`Sending background event with ${t} seconds`);let n={};n[qS.ACTIVE_DURATION]=t,this.apiService.sendEvent(new Pe(k.EVENT_APP_BACKGROUND,n))}},Zp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof bi&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(n=>{if(n.url){let r=new FontFace(k.COOEE+e.name,n.getURL(),n.getFontDescriptor());t.push(r.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(n=>{document.fonts.add(n)})}},Xp=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),S.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},Jp=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ue.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:this.collectFormData();break;case void 0:case 105:break;default:S.error("Received an invalid ClickActionType: ",this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,"_blank")?.focus()}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;fe.isValidURL(e)||(e=`//${e}`),window.open(e,"_self")}}prompt(){let e=this.action.pmpt;e&&(e===2&&this.promptLocationPermission(),e===3&&this.promptPushNotificationPermission(),e===1&&this.promptCameraPermission())}closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){S.warn("Navigator.share is not compatible with this browser");return}navigator.share({text:this.action.share.text,title:"Share"}).then(e=>console.log(e)).catch(e=>console.error(e))}}containsCTA(){return this.action.at&&this.action.at!==1?!0:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(e){return e?Object.keys(e).length===0:!0}promptLocationPermission(){!navigator.geolocation||!navigator.permissions||navigator.geolocation.getCurrentPosition(e=>{this.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),this.sendPermissionData()})}promptPushNotificationPermission(){if(!("Notification"in window)){S.warn("This browser does not support desktop notification");return}if(Notification.permission!=="default"){this.apiService.updateDeviceProps({pnPerm:Notification.permission});return}Notification.requestPermission().then(()=>{this.sendPermissionData()})}promptCameraPermission(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally(()=>{this.sendPermissionData()})}checkPermission(e){return navigator.permissions.query({name:e}).then(t=>t.state.toString())}async checkAllPermission(){let e=await this.checkPermission("camera"),t=await this.checkPermission("geolocation"),n=Notification.permission;return{camera:e,location:t,notification:n}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let n=document.getElementById(t.id).value;t.type===51?e.email=n:t.type===52&&(e.mobile=n)}this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),fe.showSnackbar("Coupon applied on cart"),Xp.updateIdentity(e)}dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};document.dispatchEvent(new CustomEvent(k.CTA_EVENT,{detail:t}));let n={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}},Cr=class{renderer=tr.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,n){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=n,this.stylesConverter=new pc(this.renderer.getScalingFactor())}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=re(w(w(w(w({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:"border-box",outline:"none"});this.renderer.setStyles(this.inappHTMLEl,e)}getDisplayStyles(){return{display:"block"}}processWidthAndHeight(){this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.stylesConverter.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.stylesConverter.getSizePx(this.inappElement.h))}processPositionBlock(){let e={position:"absolute",left:this.stylesConverter.getSizePx(this.inappElement.x),top:this.stylesConverter.getSizePx(this.inappElement.y)};this.renderer.setStyles(this.inappHTMLEl,e)}getBorderStyles(){return this.stylesConverter.getBorderStyles(this.inappElement.br)}getSpaceStyles(){return this.stylesConverter.getSpaceStyles(this.inappElement.spc)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let t=(e/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",t)}}processShadow(){let e=this.inappElement.shd;e?this.renderer.setStyle(this.inappHTMLEl,"box-shadow",e.getStyle(this.scalingFactor)):this.renderer.setStyle(this.inappHTMLEl,"box-shadow","unset")}processTransformBlock(){let e=new Ts(this.inappElement.trf);e&&e.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform",`rotate(${e.rotate}deg)`)}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation(),new Jp(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},Si=class extends Cr{constructor(e,t,n){super(e,t,n)}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment()}processFontBlock(){let e={},t=this.inappElement.typography;return t&&(e.fontSize=this.stylesConverter.getSizePx(t.fs),e.fontFamily=k.COOEE+t.fam?.name,e.lineHeight=`${t.lh}`,e.letterSpacing=t.letterSpacing),this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.renderer.setStyles(this.inappHTMLEl,e),e}processPart(e,t){let n=[];t.u&&n.push("underline"),t.st&&n.push("line-through"),n.length||n.push("normal"),this.renderer.setStyle(e,"font-weight",t.b?"bold":"normal"),this.renderer.setStyle(e,"font-style",t.i?"italic":"normal"),this.renderer.setStyle(e,"text-decoration",n.join(" ")),this.renderer.setStyle(e,"color",t.c??"inherit"),this.renderer.setStyle(e,"font-family","inherit")}processAlignment(){let e=this.inappElement.typography.ta,t=e?Qa[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},eu=class extends Si{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.inappElement.parts?.forEach(e=>{let t=this.renderer.createElement("span");t.innerHTML=e.txt?.toString()?.replace(/\n/g,"<br />"),this.processPart(t,e),this.renderer.appendChild(this.inappHTMLEl,t)}),this.processCommonBlocks()}},tu=class extends Cr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},ks=class extends Cr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("img"),this.insertElement()}render(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()}},nu=class zS extends Cr{constructor(t,n,r){super(t,n,r),this.parent=t,this.inappHTMLEl=this.renderer.createElement("div")}static MAX_Z_INDEX="2147483647";render(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(k.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",zS.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{let n=this.inappElement.spc,r=this.stylesConverter.getScaledSize(t.w)+n.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+n.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",r+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",i+"px")}}getSpaceStyles(){return{padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return w(w({display:"flex"},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){if(this.renderer.isParentNotBody()){if(this.triggerContext.triggerData.ian?.isEmbedded()){this.renderer.setStyle(this.inappHTMLEl,"position","block");return}this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")}getBorderStyles(){return{}}processTransparency(){}processTransformBlock(){}processShadow(){}},Qp=class extends Cr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(k.IN_APP_CONTAINER_NAME),this}},yc=class extends Si{borderColor="";constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("input"),this.insertElement()}render(){let e=this.setInputType();this.renderer.setAttribute(this.inappHTMLEl,"placeholder",this.inappElement.placeholderText),this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},eh=class WS extends yc{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","email"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(WS.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},th=class YS extends yc{static MOBILE_REGEX=/^\d+$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","tel"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(YS.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},nh=class Ji extends Si{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,n,r){super(t,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=re(w(w(w({flex:"1 1 0"},this.stylesConverter.getBackgroundStyles(this.inappElement.bg)),this.stylesConverter.getBorderStyles(this.inappElement.br)),this.stylesConverter.getSpaceStyles(this.inappElement.spc)),{marginLeft:this.stylesConverter.getSizePx(this.inappElement.gap),marginRight:this.stylesConverter.getSizePx(this.inappElement.gap)});this.addStylesToTimer(t)}getBackgroundStyles(){return{}}processFontBlock(){let t=super.processFontBlock();return this.stylesConverter.getColourStyles(this.inappElement.color,"color",t),this.addStylesToTimer(t),t}getSpaceStyles(){return{}}getBorderStyles(){return{}}getDisplayStyles(){return{display:"flex",flexWrap:"nowrap",justifyContent:"center"}}addStylesToTimer(t){this.elements.forEach(n=>this.renderer.setStyles(n,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(Ji.DAYS)),t.hour&&this.elements.push(this.getChild(Ji.HOURS)),t.minute&&this.elements.push(this.getChild(Ji.MINUTES)),t.second&&this.elements.push(this.getChild(Ji.SECONDS)),this.elements.forEach(n=>this.inappHTMLEl.appendChild(n))}getChild(t){let n=this.renderer.createElement("div"),r=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,r.innerText="00",r.id=`lc-${t}`,this.renderer.setStyle(i,"font-size","0.5em"),this.renderer.setStyle(i,"text-align","center"),this.renderer.setStyle(i,"font-family","inherit"),this.renderer.setStyle(r,"text-align","center"),this.renderer.setStyle(r,"font-family","inherit"),this.inappElement.lblPos==="start"?(n.appendChild(i),n.appendChild(r)):(n.appendChild(r),n.appendChild(i)),this.renderer.setStyle(n,"display","flex"),this.renderer.setStyle(n,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(n,"justify-content","center"),this.renderer.setStyle(n,"align-items","center"),this.renderer.setStyle(n,"gap","5px"),this.spans.push(r),n}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,n=>{this.spans.forEach(r=>{r.id===`lc-${Ji.DAYS}`?r.innerText=String(n.days).padStart(2,"0"):r.id===`lc-${Ji.HOURS}`?r.innerText=String(n.hours).padStart(2,"0"):r.id===`lc-${Ji.MINUTES}`?r.innerText=String(n.minutes).padStart(2,"0"):r.id===`lc-${Ji.SECONDS}`&&(r.innerText=String(n.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},rh=class extends Si{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("select"),this.insertElement()}render(){this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions()}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener("click",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new wi(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let n=this.parentHTMLEl.querySelector("#coo-13");if(!n)return;let r=e.imgs[0]??t.imgs?.at(0);r?.url&&n.setAttribute("src",r.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let n=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(r=>{t.add(this.createOption(r.name??"Default",r,r.mID===n?.vID))})}createOption(e,t,n){let r=this.renderer.createElement("option");return r.text=e,r.value=JSON.stringify(t),n&&(r.selected=!0),t||(r.disabled=!0),r}},ih=class extends ks{constructor(e,t,n){super(e,t,n)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},_c=class Sc{static ACTIVE_TRIGGER_DATA;renderer=tr.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ue.getInstance(),this.resizeListener=()=>this.screenResized(),this.setParentContainer(t)}setParentContainer(t){this.parent=t??document.body,this.renderer.setParentContainer(this.parent)}render(t){this.renderEngagement(new or(t))}async renderEngagement(t){if(this.triggerContext=new dc(new Date,t),this.triggerContext.onClose(n=>{this.closeInApp(n)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let n=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(n)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!Kt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Kt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){Sc.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){Ct.getInstance().captureException(t,{triggerData:JSON.stringify(this.triggerContext.triggerData)});return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe()}}shouldSkipCampaign(){let t=this.triggerContext.triggerData;if(!t.previewType&&Sc.ACTIVE_TRIGGER_DATA){let r={triggerShown:new ka(Sc.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,r),!0}if(Oe.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let n=k.PAYMENT_MODAL_DETAILS.find(r=>!!document.querySelector(r.identifier));return n?(this.skipTrigger(t,{reason:`${n.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new nu(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw S.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let n=new Pe(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(n);let r={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}sendTriggerClosed(t){let n=t.eventName;delete t.eventName;let r=new Pe(n,t,this.triggerContext.triggerData);r.name===k.EVENT_TRIGGER_CLICKED&&(r.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(r)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,n,r){n instanceof rc?new eh(t,n,r).render():n instanceof ic?new th(t,n,r).render():n instanceof _o?new eu(t,n,r).render():n instanceof oc?new ih(t,n,r).render():n instanceof qi?new ks(t,n,r).render():n instanceof xs?new tu(t,n,r).render():n instanceof tc?new nh(t,n,r).render():n instanceof nc?new rh(t,n,r).render():S.error("Unsupported element type- "+n.type)}renderContainer(t){let n=this.ian?.cont;n&&(this.containerHTMLElement=new Qp(this.rootContainer,n,t).render().getHTMLElement(),new Zp().loadAllFonts(this.ian),this.ian.elems?.forEach(async r=>{await this.renderElement(this.containerHTMLElement,r,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let n=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),Sc.ACTIVE_TRIGGER_DATA=void 0;let r=this.containerHTMLElement.animate(n,{duration:500,easing:"ease-in-out"});r.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){tr.get().removeInApp(this.triggerContext)}skipTrigger(t,n){let r=new Pe(k.EVENT_CAMPAIGN_REJECTED,n,t);this.safeHTTP.sendEvent(r)}async preloadImages(t){let n=t.ian;if(!n)return;let r=[];n.elems.forEach(i=>{let s=i.bg?.img?.src;if(s&&r.push(this.getPromise(s)),i.t===1){let o=i.src;if(!o)return;r.push(this.getPromise(o))}}),n.bg?.img?.src&&r.push(this.getPromise(n.bg.img.src)),n.cont.bg?.img?.src&&r.push(this.getPromise(n.cont.bg.img.src)),await Promise.all(r)}getPromise(t){return new Promise(n=>{let r=new Image;r.onload=n,r.src=t,r.style.display="none"})}},oh=class{compareCartItemSubject=new ie;constructor(){this.compareCartItemSubject.pipe(Tr(100)).subscribe(this.compareCartItems.bind(this))}listen(){this.compareCartItemSubject.next(),this.overwriteXMLHttpRequest(),this.overwriteFetchMethod()}overwriteXMLHttpRequest(){let e=this,t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){e.performEvent(this._url).catch(n=>S.error("Unable to process cart change in XMLHttpRequest",n))}),t.apply(this,arguments)},S.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(n){return t.apply(window,arguments).then(r=>(e.performEvent(n.toString()).catch(i=>S.error("Unable to process cart change in fetch",i)),r))},S.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Oe.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let n=e?.items,r=t.items,i=[],s=[];if(S.debug(`Comparing cart change with old count ${n?.length} to new count ${r.length}`),r?.forEach(o=>{let a=n?.find(l=>l.vID===o.vID);if(a){if(a.quantity!==o.quantity){let l=a.quantity<o.quantity,c=Math.abs(a.quantity-o.quantity),h=re(w({},o),{quantity:c});l?i.push(h):s.push(h)}n&&fe.removeFromArray(n,a)}else i.push(o)}),n)for(let o of n)s.push(o);S.debug(`Cart delta: added: ${i.length}, removed: ${s.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),s.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||i.length)&&yi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let n=new Pe(e,t);Ve.get(Ue).sendEvent(n)}async compareCartItems(){let e=await ft.get(we.CURRENT_CART,{}),t=await Ye.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},sh=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(n,r){try{await e.modifyRequest(n,r)}catch(i){Ct.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(r?.body)})}return t(n,r)},S.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let n=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(n.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let r;if(typeof t.body=="string")try{r=JSON.parse(t.body)}catch{return}else r=t.body;S.debug("Intercepted fetch request of:",n),r?.query.includes("cartCreate")&&(t.body=await this.updatedBody(r),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],n=await fe.getCartAttributes();return e.variables.input.attributes=[...t,...n],JSON.stringify(e)}sendBuyNowEvent(){let e=Oe.get().getCurrentItem();if(!e)return;let t=new Pe(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ue.getInstance().sendEvent(t)}},Ec=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,n=new Pe(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ue.getInstance().sendEvent(n),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>S.error(e))}async listen(){this.elements=await fe.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},ah=class Mf extends Ec{static selectors=[".product__thumbnail-list-inner > button","product-gallery-navigation > button",".product-media--thumb-container",".product-images-inner > img",".m-product-media",".swiper-button-control",".media__thumb",".slick-arrow",".productView-img-container.product-single__media",".product-gallery__thumbnail_item_inner"];constructor(){super(Mf.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Mf),this.INSTANCE}},ch=class Ov extends Ec{static selectors=[".jdgm-widget.jdgm-preview-badge.jdgm-preview-badge--with-link.jdgm--done-setup","reviewsio-product-ratings",".ruk_rating_snippet.tracked:not(.hidden)","a > .loox-rating",".yotpo-reviews-star-ratings-widget",".yotpo.lp-hero__reviews",".pr-rating > a",".rivyoReviewWidget"];constructor(){super(Ov.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Ov),this.INSTANCE}},lh=class{selector=[".gokwik-checkout button","button.cart__checkout-button","button.cart__checkout","button#checkout","button#checkout2",'button[id*="checkout" i]','button[name*="checkout" i]','button[class*="checkout" i]'].join(",");listen(){fe.onDocumentLoaded(()=>{S.debug("Execution order:","document ready"),this.useLocationHash()})}useLocationHash(){let e=window.location.hash?.substring(1);if(e)if(e.includes(k.HASH_INITIATE_CHECKOUT)){document.dispatchEvent(new Event(k.THIRD_PARTY_CHECKOUT_EVENT));let t=document.querySelector(this.selector);if(!t){S.debug("No clickable cart checkout button found");return}S.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Kt.get().open()}},uh=class{trackSilently(){this.track().catch(e=>Ct.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let n={};this.processSmallCheckout(e,n),this.processBigCheckout(t,n);let r=this.getTokenFromCurrentURLPath();if(r&&(n.urlToken=r),!Object.keys(n).length){S.warn("No processable data found in",e,t);return}n.referrer=document.referrer,n.url=location.href;let i=await Ve.get(yn).checkSessionAndGetContext();n.sessionID=i[0],this.trackOrder(n)}processSmallCheckout(e,t){e&&(e.order_id&&(t.orderID=e.order_id.toString()),e.token&&(t.checkoutToken=e.token.toString()),e.customer_id&&(t.customerID=e.customer_id.toString()))}processBigCheckout(e,t){e&&(e.token&&!t.checkoutToken&&(t.checkoutToken=e.token.toString()),e.cartToken&&(t.cartToken=e.cartToken.toString()))}trackOrder(e){S.info("Found order to be send",e),Ue.getInstance().trackOrder(e)}getTokenFromCurrentURLPath(){let e=new RegExp("[A-Fa-f0-9]{28,32}");return location.pathname?.split("/").find(t=>t.length&&e.test(t))}},ru=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await Ye.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},n=new Pe(k.EVENT_CHECKOUT_STARTED,t);Ue.getInstance().sendEvent(n)})}},dh=class{async migrate(){}};mn.escape=px.MustacheUtils.escapeHtml;var wt=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new dh().migrate(),this.autoAuthenticate(),new Yp().meddle(),new Kp().listen(),new uh().trackSilently(),new To().listen(),new oh().listen(),new sh().listen(),new lh().listen(),Ve.get(vc).listen(),Ve.get(ch).listenSilently(),Ve.get(ah).listenSilently(),Ve.get(Wr).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),wr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||xa(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,xa(this.globalRef,"config",new Ot),xa(this.globalRef,"runtimeData",new Oe),S.debug("Global reference initialised")}static injectWidgetAssets(){Sn.injectScriptURL(Rn.widgetURL,"cooee-widget-sdk"),Sn.injectStylesheet(Rn.styleURL)}static autoAuthenticate(){let e=Tt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),n=e.shopifyShop;if((fe.isNull(t)||t.length!==24)&&fe.isNull(n)){S.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,Ve.get(yn).init(e)}static sendEvent(e,t,n){for(let i in t)if(i.length>3&&i.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");let r=new Pe(e,t,n?.triggerData);n?.occurred&&(r.occurred=n.occurred),Ve.get(Ue).sendEvent(r)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");Ve.get(Ue).updateProfile(e)}static setPageName(e){if(!e)return;let t=Oe.get(),n=t.pageName;if(e===n)return;if(t.pageName=e,e==="cart"&&Ve.get(Wr).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){Ve.get(vc).resetScrollID();return}let r={};n&&(r.ps=n);let i=new Pe(k.EVENT_SCREEN_VIEW,r);i.occurred=t.jsLoadTime,Ve.get(Ue).sendEvent(i),Ve.get(vc).resetScrollID(i.occurred)}static previewPopup(e,t){new _c(t).render(e)}static previewWidget(e){new Zn(new or(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){S.error(e)}window.addEventListener("message",e=>{if(S.debug("Received event",e),!e.origin.includes("letscooee.com")&&!e.origin.includes("localhost"))return;let t=e.data;typeof t=="object"&&(t.action==="POPUP_PREVIEW"?(this.previewPopup(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)):t.action==="WIDGET_PREVIEW"&&(this.previewWidget(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)))})}}static attachGoKwikListeners(){let e=Oe.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:n}=t.detail;n&&this.updateProfile({goKwikToken:n})}),window.gokwikSdk?ru.attachCheckoutListener():window.addEventListener("gokwikLoaded",ru.attachCheckoutListener)}static storePreviewParams(){let e=Oe.get(),t=new URLSearchParams(location.search),n=t.get("cooee-preview");n&&(e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)));let r=t.get("cooee-variant");r&&(e.previewVariant=r)}},fh=class KS{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new KS),this.INSTANCE}init(){kl.get(we.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){S.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let n=this.updateGlobalConfig(t);kl.set(we.APP_CONFIG,n).catch(r=>S.error(r)),lp.processConfiguration(),n.website&&(Sn.injectRawScript(n.website.commonJS),Sn.injectRawCSS(n.website.commonCSS)),Kt.get().onToggle().subscribe(async({open:r})=>{S.info("Cart drawer is now",r?"open":"closed"),r&&(Ve.get(Wr).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let n=wt.globalRef.config.update(t);return Kt.forceUpdate(),S.debug("App configurations",n),n}async trackViewCartEvent(){let t=await Ye.getCurrent().getNormalisedCart(),n={value:t.amount,currency:t.currency},r={items:t.items,amount:n,drawer:!0};Ue.getInstance().sendEvent(new Pe(k.EVENT_VIEW_CART,r))}},hx=Fe(L_()),ph=class O_{static META_REQUIRED_FIELDS=["ad_id"];static GOOGLE_REQUIRED_FIELDS=["gad_source","gclid"];source;adID;campaignID;adName;campaignName;constructor(t){this.adID=t.adID,this.campaignID=t.campaignID,this.source=t.source}static getAdParams(){let t;try{t=new hx.URLBuilder(location.href)}catch{return{}}let n={};if(this.META_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new O_(n);if(this.GOOGLE_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"GOOGLE"},new O_(n)}},Ms=class JS{static INSTANCE;httpAPIService=Mn.getInstance();coreService=fh.getInstance();sentryService=Ct.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new JS),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await ft.set(we.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await ft.set(we.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await ft.set(we.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),S.log("Validating session with server");let n=await this.getSessionValidateData(t);try{let r=await this.httpAPIService.validateSession(n);S.log("Validating session Response",r),await this.coreService.processAppConfigurations(r.appSettings),await this.storeAndPopulateAuthData(r)}catch(r){throw S.error(r),r}}async populateUserDataFromStorage(){if(this.sdkToken=await ft.get(we.SDK_TOKEN),!this.sdkToken){S.warn("No SDK token found in local storage");return}this.userID=await ft.get(we.ID),this.deviceID=await ft.get(we.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){S.debug("SDK Token:",this.sdkToken),S.log("Device ID:",this.deviceID),S.log("User ID:",this.userID),Ya.trackDeviceID(this.deviceID),wr.prepend(`Device ID: <strong>${this.deviceID}</strong>`),this.httpAPIService.setAPIToken(this.sdkToken),this.sentryService.setGlobalContext("Visitor Info",{device_id:this.deviceID,user_id:this.userID}),this.sentryService.setUser({id:this.deviceID})}async getSessionValidateData(t){let n=await new ap().get();n.host=location.origin;try{(await CT())?.isPrivate&&(n.private=!0)}catch(i){mx.default.error("Unable to detect private/incognito window",i)}let r=await ft.get(we.DEVICE_ID);return r||(r=new on().toHexString(),await ft.set(we.DEVICE_ID,r)),re(w({deviceID:r,deviceProps:n,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:vi.parseFromCurrent(),ad:ph.getAdParams(),occurred:this.getSessionStartTime(Oe.get().jsLoadTime),currentItem:Oe.get().getCurrentItem(),cart:await Ye.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await ft.get(we.FIRST_SEEN),n=t?new Date(t):new Date;t||await ft.set(we.FIRST_SEEN,n.toISOString()),this.httpAPIService.setFirstSeen(n),this.sentryService.setGlobalContext("Visitor Info",{first_seen:n.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},yn=class Cc{static replaySubject=new Mo(1);static INSTANCE;sentryService=Ve.get(Ct);lock=new qa;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Cc),this.INSTANCE}init(t){if(S.debug("Initialising SDK",t),wT(navigator.userAgent)){S.info("This seems to be a bot. Disabling SDK");return}Ms.getInstance().init(t),Cc.INSTANCE.checkForNewSession(!0).then(async()=>{Cc.replaySubject.next(!0),Cc.replaySubject.complete()}).catch(n=>S.error("Unable to perform device init",n))}getCurrentSessionID(){return pn.set(we.SESSION_LAST_USED_TIME,new Date().getTime()),pn.get(we.ID,"")}async checkSessionAndGetContext(){return await this.checkForNewSession(),this.getContext()}async getContext(){let t=await Promise.all([this.getCurrentSessionID(),this.getCurrentSessionNumber(),this.getLandingPage()]);return this.sentryService.setGlobalContext("Visitor Session",{id:t[0],number:t[1],landing_page:t[2]}),t}async checkForNewSession(t){await this.lock.acquire();let n=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,n=!0):await this.notSynced()&&(n=!0),t){let r=await this.getContext();await Ms.getInstance().validateSession({sessionID:r[0],sessionNumber:r[1],landingPage:r[2],newSession:n}),await pn.set(we.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){S.debug("Starting new session"),await pn.clear(),S.debug("Cleared SessionStorage before starting new session");let t=new Date,n=new on().toHexString();S.debug("New session ID to be used",n);let r=await ft.get(we.SESSION_NUMBER,0)+1;wr.prepend(`New Session ID: <strong>${n}</strong> & number: ${r}`),await Promise.all([ft.set(we.SESSION_NUMBER,r),pn.set(we.ID,n),pn.set(we.SESSION_LAST_USED_TIME,t.getTime()),pn.set(we.SESSION_LANDING_PAGE,vi.parseFromCurrent())])}getLandingPage(){return pn.get(we.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return ft.get(we.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await pn.get(we.ID))return!0;let t=await pn.get(we.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await pn.get(we.SESSION_SYNCED,!1)}},yx=Fe(Qn()),gx=Fe(Qn()),vx=Fe(va()),hh=class{triggerData;safeHttpService=Ue.getInstance();render(e){e.contentSource===gx.EngagementContentSource.KLAVIYO&&(this.triggerData=e,window.addEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",e.klaviyoFormID]))}handleKlaviyoEvents(e){if(e.type!=="klaviyoForms")return;let t=e.detail;if(t.formId!==this.triggerData.klaviyoFormID){S.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new Pe(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let n=this.getFormDetails(t);this.safeHttpService.sendEvent(new Pe(k.EVENT_FORM_SUBMITTED,{form:n},this.triggerData)),this.safeHttpService.updateProfile(n);break}case"close":window.removeEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),this.safeHttpService.sendEvent(new Pe(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},n=e.metaData;if(vx.JSUtils.hasKeys(n)){let r=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(n).forEach(o=>{r.includes(o)||(t[o]=n[o])}),t.email=n.$email??n.email,t.mobile=n.$phone_number??n.phone_number;let i=n.$first_name??n.first_name,s=n.$last_name??n.last_name;(i?.length||s?.length)&&(t.name=i+" "+s)}return t}},mh=class{static trackIntent(e){if(!this.isInstalled()){S.log("Facebook pixel not installed");return}if(!Ot.get().pixelPush){S.log("Facebook pixel push not enabled");return}let t=Cs[e.intent]?.toLowerCase(),n=e.segmentName;!t&&!n||(S.debug(`Sending ${t} intent and ${n} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},gh=class XS{static INSTANCE;httpService=Ve.get(Mn);sentryService=Ve.get(Ct);sessionManager=Ve.get(yn);runtime=Oe.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new XS),this.INSTANCE}sendSilently(t){this.send(t).catch(n=>S.error(`Failed to send ${t.name}`,n))}async send(t){if(S.debug(`Sending event ${t.name}`),wr.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){S.warn(`Rejecting event ${t.name}`);return}await Promise.all([this.addSessionContext(t),this.addShopifyContext(t)]),this.addShopifyAttributes(),t.name!==k.EVENT_APP_BACKGROUND&&this.runtime.setActive(),t.currentItem=this.runtime.getCurrentItem(),t.locale=this.runtime.locale,this.httpService.post("/v1/event/track",t).then(async n=>{S.log("\u2705 Event tracked:",t.name),wr.prepend(`\u2705 Event <strong>${n.eventName}</strong> tracked`),this.processEventResponse(t,n)}).catch(n=>{S.error(`Error sending event ${t.name} to server`,n)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(S.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let n=await this.sessionManager.checkSessionAndGetContext();t.sessionID=n[0],t.sessionNumber=n[1],t.landingPage=n[2],t.page=vi.parseFromCurrent()}async addShopifyContext(t){if(Tt.isShopify())try{t.cart=await Ye.getCurrent().getNormalisedCart()}catch(n){S.error("Error fetching Shopify cart before sending the event",n)}}processEventResponse(t,n){this.renderWidgetIfAny(t,n).catch(r=>{S.error("Failed to display a campaign",r,t,n),this.sentryService.captureException(r,{event:t,response:n})}),this.utiliseIntentIfCalculated(n)}async renderWidgetIfAny(t,n){if(!n.triggerData){S.log(`Nothing to engage after ${t.name}`);return}S.log(`\u{1F4E3} Engagement(id=${n.triggerData.shortID}) will be shown`,n.triggerData);let r=new or(n.triggerData);r.occurred=t.occurred;let i;try{i=await fc.refreshItems(r)}catch(s){S.error("Failed to refresh the products",s);return}if(r.items=i,r.contentSource===yx.EngagementContentSource.KLAVIYO){new hh().render(r);return}new _c().renderEngagement(r).catch(s=>{S.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:r})})}utiliseIntentIfCalculated(t){t.intent&&(Ya.trackIntent(t.intent),mh.trackIntent(t),wr.prepend(`Intent is <strong>${Cs[t.intent]}</strong>`))}addShopifyAttributes(){Tt.isShopify()&&Ye.getCurrent().addCooeeAttributes().catch(t=>{S.error("Fail to add attributes in cart",t)})}},Ue=class ZS{static INSTANCE;httpApiService=Mn.getInstance();eventAPIService=gh.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new ZS),this.INSTANCE}sendEvent(t){S.debug(`Waiting for auth to send event ${t.name}`),yn.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){yn.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){yn.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){yn.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},So=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Ue.getInstance();async execute(e){let t=Oe.get().getCurrentItem(),n=e.clickAction||this.element?.clc;if(!n)return;let r=e.item,i=this.triggerContext,s=new To,o=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!n?.applyDiscount,l={selectedVariants:i.triggerData.nonMutableItems.map(b=>({itemMID:b.mID,mID:b.selectedOrFirstVariant.value.mID})),eID:i.triggerData.engagementID,cID:i.triggerData.contentID},c="",h=[],d=[];if(r?d=[r.toEmbed()]:e.embeddedItem&&(d=[e.embeddedItem]),n.at===108){let b=i.selectedItems;if(d=e.embeddedItems??b.map(I=>I.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let I;e.embeddedItems?I=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):I=b.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let A=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&A&&I.push({itemMID:A.mID,mID:A.selectedOrFirstVariant.value.mID,isPrimary:!0}),l.selectedVariants=I,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(F=>{F.mID===t.vID&&(F.isPrimary=!0)})}else l=void 0;h=e.embeddedItems??b}else if(n.at===107){let b=await Ye.getCurrent().getNormalisedCart();d=b.items,l.selectedVariants=b.items.map(I=>({itemMID:I.mID,mID:I.vID}))}else if(n.at===102)h=r?[r]:[e.embeddedItem];else if(n.at===101)c=r?Tt.getRootPrefix()+"products/"+r.slug:e.embeddedItem?.link;else if(n.at===4){let b=fe.isValidURL(n.gu?.u);b&&(c=b.href)}else if(n.at===109){let b=await s.upgradeToSubscription(r,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),Kt.get().refreshUI(b)}if(this.sendTriggerClicked(d,{from:"button"},e.video),S.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),S.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){Ex.default.error("Unable to get a discount code",b);return}}if(f&&n.at===103)await s.performCopyCoupon(f);else if(n.at===110){let b=await s.performCartCreate(t,f,i.triggerData);b&&(location.href=b);return}try{f&&await Io.applyWithStorefront(f)}catch(b){S.error(b),g=!0}let m;if(h?.length&&(m=await s.performAddToCart(h,i.triggerData)),g&&f){Io.navigate(f,o,c);return}if(c){location.href=c;return}Io.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,n){let r=k.EVENT_TRIGGER_CLICKED,i=new Pe(r,t,this.triggerContext.triggerData);i.items=e,n?.id&&(i.videos=[n.id]),this.safeHTTP.sendEvent(i)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let n="";if(t.type===_x.DiscountType.STATIC){if(!t.code)throw Ct.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(n=await this.generateDiscount(e),!n)throw S.error("No discount code found",e),new Error("Discount code not found or generated");return n}}async generateDiscount(e){try{return(await this.safeHTTP.generateDiscount(e))?.code}catch(t){throw fe.showSnackbar("Failed to generate a discount code"),S.error("Error generating discount code",t,e),Ct.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Xi=class{static getBestSources(e){if(!e)return[];let t=[],n=e.filter(i=>i.format==="mp4").sort((i,s)=>s.width-i.width)[0];n&&t.push(n);let r=e.filter(i=>i.format==="m3u8").sort((i,s)=>s.width-i.width)[0];return r&&t.push(r),t}static async performCTA(e,t){let n={applyDiscount:!0};t.cta===xo.ClickActionType.ADD_TO_CART?n={at:xo.ClickActionType.ADD_TO_CART,applyDiscount:!0}:t.cta===xo.ClickActionType.GO_TO_PRODUCT?n={at:xo.ClickActionType.GO_TO_PRODUCT,applyDiscount:!0}:t.cta===xo.ClickActionType.OPEN_CART&&(e.triggerData.redirectBehaviour=xo.RedirectBehaviour.CART_DRAWER),await new So(e).execute({clickAction:n,embeddedItem:new fn(t.item)})}},eU=["videoPlayers"],wc=class P_{videoPlayers;videos=[];currentIndex=0;muted=!0;videoProgress=[];selectedItem=null;triggerContext;VideoUtils=Xi;engagementTrigger;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}pauseAll(){this.videoPlayers.forEach(t=>t.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(n=>n.nativeElement.muted=this.muted);let t=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await ft.set(we.MUTED,this.muted)}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await ft.get(we.MUTED,!0),t.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)this.moveToNextVideo();else{let t=this.videoPlayers.last;if(t){let n=this.getPreviousVideoDataForEvent(),r=[k.EVENT_LAST_VIDEO_ENDED,{previous:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),t.nativeElement.currentTime=0,t.nativeElement.play()}}}updateProgress(t,n){let r=t.target;this.videoProgress[n]=r.currentTime/r.duration*100}onSlideChange(t){let n=this.getPreviousVideoDataForEvent();t(),this.playActiveVideo(),this.selectedItem=null;let r=this.currentVideoProps(),i={previous:n,current:r},s=[k.EVENT_VIDEO_CHANGE,i,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(t,n){let r=[k.EVENT_MORE_ITEM_INFO_CLICKED,{item:t,video:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),this.selectedItem=t}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),n=this.videoPlayers.find(i=>i.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;t.playedTillMS=Math.ceil(n?.currentTime*1e3);let r=n?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/r).toFixed(4),t}static \u0275fac=function(t){return new(t||P_)};static \u0275cmp=at({type:P_,selectors:[["cooee-base-video"]],viewQuery:function(t,n){if(t&1&&Jo(eU,5),t&2){let r;Qo(r=es())&&(n.videoPlayers=r)}},decls:0,vars:0,template:function(t,n){},encapsulation:2})},tU=["swiperContainer"],nU=e=>({"swiper-hide-slide":e}),wx=(e,t)=>t.url;function rU(e,t){if(e&1&&Re(0,"source",15),e&2){let n=t.$implicit;bn("type",n.mimeType),kr("media","(max-width: ",n.width,"px)"),be("src",n.url,Gt)}}function iU(e,t){if(e&1&&Re(0,"source",16),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,Gt)}}function oU(e,t){if(e&1){let n=dn();Y(0,"video",14,1),Qe("timeupdate",function(r){ze(n);let i=K().$index,s=K();return qe(s.updateProgress(r,i))})("click",function(){ze(n);let r=K().$index,i=K();return qe(i.currentIndex===r&&i.toggleMute())})("ended",function(){ze(n);let r=K(2);return qe(r.onVideoEnded())}),At(2,rU,1,4,"source",15,wx),At(4,iU,1,2,"source",16,wx),X()}if(e&2){let n=K(),r=n.$implicit,i=n.$index,s=K();be("autoplay",s.currentIndex===i)("muted",s.muted),fo("data-video-id",r.id),q(2),Mt(r.sources),q(2),Mt(s.VideoUtils.getBestSources(r.sources))}}function sU(e,t){if(e&1){let n=dn();Y(0,"div",18)(1,"cooee-product-modal",19),Qe("performCTA",function(r){ze(n);let i=K(2).$implicit,s=K();return qe(s.performClickToAction(r,i))})("closeModel",function(){ze(n);let r=K(3);return qe(r.selectedItem=null)}),X()()}if(e&2){let n=K(3);q(),be("item",n.selectedItem)}}function aU(e,t){if(e&1){let n=dn();Y(0,"div",20)(1,"cooee-mute-toggle",21),Qe("buttonClicked",function(){ze(n);let r=K(3);return qe(r.toggleMute())}),X()(),Y(2,"cooee-product-card",22),Qe("performCTA",function(r){ze(n);let i=K(2).$implicit,s=K();return qe(s.performClickToAction(r,i))})("clicked",function(r){ze(n);let i=K(2).$implicit,s=K();return qe(s.productCardClicked(r,i))}),X()}if(e&2){let n=K(2).$implicit,r=K();q(),be("muted",r.muted),q(),be("items",n.items)}}function cU(e,t){if(e&1&&(Re(0,"cooee-video-progress-bar",17),kt(1,sU,2,1,"div",18)(2,aU,3,2)),e&2){let n=K().$index,r=K();be("width",r.videoProgress[n]||0),q(),jt(r.selectedItem?1:2)}}function lU(e,t){if(e&1&&(Fr(0),Y(1,"div",5),kt(2,oU,6,3,"video",13)(3,cU,3,2),X()),e&2){let n=t.$index,r=K(),i=r.currentIndex===n||r.currentIndex-1===n||r.currentIndex+1===n;q(),be("ngClass",pa(3,nU,!i)),q(),jt(i?2:-1),q(),jt(r.currentIndex===n?3:-1)}}var vh=class A_ extends wc{constructor(t){super(),this.cdr=t}videos=[];currentIndex=0;closeDialog=new We;performCTA=new We;swiperContainerRef;swiperInstance;ngAfterViewInit(){let t=this.swiperContainerRef.nativeElement.getRootNode();Sn.injectStylesheet(Rn.styleURL,t),Sn.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",t),this.loadSwiperScript().then(()=>{this.initSwiper(),this.afterSwiperInit(),this.playActiveVideo()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(t=this.videos[this.currentIndex],n=this.currentIndex){this.closeDialog.emit({lastVideo:t,lastVideoIndex:n})}performClickToAction(t,n){this.performCTA.emit({cta:t.cta,item:t.item,video:n})}getCurrentVideoElement(){return this.videoPlayers.get(Math.min(this.currentIndex,1))?.nativeElement}updateProgress(t,n){super.updateProgress(t,n),this.cdr.detectChanges()}async toggleMute(){await super.toggleMute(),this.cdr.detectChanges()}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}loadSwiperScript(){return new Promise(t=>{let n="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(i=>i.src.includes(n))){t();return}let r=document.createElement("script");r.src=n,r.onload=()=>t(),document.body.appendChild(r)})}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{effect:"coverflow",slidesPerView:3,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:150,modifier:2,slideShadows:!0},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-size","50px"),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-color","white")}afterSwiperInit(){this.swiperInstance.on("slideChange",t=>{this.onSlideChange(()=>{this.currentIndex=t.realIndex,this.cdr.detectChanges()})})}static \u0275fac=function(t){return new(t||A_)(bt(Vr))};static \u0275cmp=at({type:A_,selectors:[["cooee-video-swiper"]],viewQuery:function(t,n){if(t&1&&Jo(tU,5),t&2){let r;Qo(r=es())&&(n.swiperContainerRef=r.first)}},inputs:{videos:"videos",currentIndex:"currentIndex",triggerContext:"triggerContext"},outputs:{closeDialog:"closeDialog",performCTA:"performCTA"},features:[ri],decls:13,vars:0,consts:[["swiperContainer",""],["videoPlayers",""],[1,"lc:relative","lc:w-screen","lc:h-screen","lc:bg-black/70","lc:flex","lc:justify-center","lc:items-center"],[1,"swiper-container","lc:w-[70vw]","lc:h-[80vh]"],[1,"swiper-wrapper"],[1,"swiper-slide","lc:relative","lc:flex","lc:items-center",3,"ngClass"],[1,"swiper-button-prev","lc:text-white"],[1,"swiper-button-next","lc:text-white"],[1,"lc:absolute","lc:top-10","lc:right-20","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button","tabindex","{0}",1,"lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["xmlns","http://www.w3.org/2000/svg","height","40px","viewBox","0 0 24 24","width","40px","fill","#FFFFFF"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"autoplay","muted"],[1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"timeupdate","click","ended","autoplay","muted"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"performCTA","closeModel","item"],[1,"lc:absolute","lc:top-4","lc:right-4","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"performCTA","clicked","items"]],template:function(t,n){if(t&1){let r=dn();Y(0,"div",2)(1,"div",3,0)(3,"div",4),At(4,lU,4,5,"div",5,Pr),X(),Re(6,"div",6)(7,"div",7),X(),Y(8,"div",8)(9,"div",9),Qe("click",function(){return ze(r),qe(n.close())})("keydown",function(){return ze(r),qe(n.close())}),Gn(),Y(10,"svg",10),Re(11,"path",11)(12,"path",12),X()()()()}t&2&&(q(4),Mt(n.videos))},dependencies:[ja,$a,Wa,Ga,Hd],styles:[`.swiper-hide-slide{visibility:hidden!important}
|
|
79
|
-
`],encapsulation:3})},yh=class H_{constructor(t,n){this.dialogRef=t,this.data=n}static \u0275fac=function(t){return new(t||H_)(bt(Gi),bt(Al))};static \u0275cmp=at({type:H_,selectors:[["cooee-desktop-video-carousel"]],decls:1,vars:3,consts:[[3,"closeDialog","performCTA","videos","currentIndex","triggerContext"]],template:function(t,n){t&1&&(Y(0,"cooee-video-swiper",0),Qe("closeDialog",function(r){return n.dialogRef.close(r)})("performCTA",function(r){return n.data.onCTAPerformed(r)}),X()),t&2&&be("videos",n.data.videos)("currentIndex",n.data.currentIndex)("triggerContext",n.data.triggerContext)},dependencies:[vh],encapsulation:2})},Qx=Fe(U_()),uU=e=>({transform:e}),bx=(e,t)=>t.url;function dU(e,t){if(e&1&&Re(0,"source",5),e&2){let n=t.$implicit;bn("type",n.mimeType),kr("media","(max-width: ",n.width,"px)"),be("src",n.url,Gt)}}function fU(e,t){if(e&1&&Re(0,"source",6),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,Gt)}}function pU(e,t){if(e&1){let n=dn();Y(0,"div",15)(1,"cooee-product-modal",17),Qe("performCTA",function(r){ze(n);let i=K(2);return qe(i.data.onCTAPerformed(r))})("closeModel",function(){ze(n);let r=K(2);return qe(r.selectedItem=null)}),X()()}if(e&2){let n=K(2);q(),be("item",n.selectedItem)}}function hU(e,t){if(e&1){let n=dn();Y(0,"cooee-product-card",18),Qe("performCTA",function(r){ze(n);let i=K(2);return qe(i.data.onCTAPerformed(r))})("clicked",function(r){ze(n);let i=K().$implicit,s=K();return qe(s.productCardClicked(r,i))}),X()}if(e&2){let n=K().$implicit;be("items",n.items)}}function mU(e,t){if(e&1){let n=dn();Y(0,"div",3)(1,"video",4,0),Qe("timeupdate",function(r){let i=ze(n).$index,s=K();return qe(s.updateProgress(r,i))})("click",function(){let r=ze(n).$index,i=K();return qe(i.currentIndex===r&&i.toggleMute())})("ended",function(){ze(n);let r=K();return qe(r.onVideoEnded())}),At(3,dU,1,4,"source",5,bx),At(5,fU,1,2,"source",6,bx),X(),Y(7,"div",7)(8,"button",8),Qe("click",function(){let r=ze(n),i=r.$implicit,s=r.$index,o=K();return qe(o.close(i,s))}),Gn(),Y(9,"svg",9),Re(10,"path",10)(11,"path",11),X()()(),Fi(),Y(12,"div",12)(13,"cooee-mute-toggle",13),Qe("buttonClicked",function(){ze(n);let r=K();return qe(r.toggleMute())}),X()(),Re(14,"cooee-video-progress-bar",14),kt(15,pU,2,1,"div",15)(16,hU,1,1,"cooee-product-card",16),X()}if(e&2){let n=t.$implicit,r=t.$index,i=K();q(),be("muted",i.muted)("height","100%"),fo("data-video-id",n.id),q(2),Mt(n.sources),q(2),Mt(i.VideoUtils.getBestSources(n.sources)),q(8),be("muted",i.muted),q(),be("width",i.videoProgress[r]||0),q(),jt(i.selectedItem?15:16)}}var _h=class OE extends wc{constructor(t,n){super(),this.dialogRef=t,this.data=n,this.videos=n.videos,this.currentIndex=n.currentIndex,this.triggerContext=n.triggerContext}touchStartY=null;touchThreshold=50;onTouchStart(t){t.stopPropagation(),this.touchStartY=t.touches[0].clientY}onTouchEnd(t){if(t.stopPropagation(),this.touchStartY===null)return;let n=t.changedTouches[0].clientY,r=this.touchStartY-n;Math.abs(r)>this.touchThreshold&&this.onSlideChange(()=>{r>0?this.next():this.prev()}),this.touchStartY=null}ngAfterViewInit(){this.playActiveVideo()}next(){this.videos.length>0&&(this.currentIndex=(this.currentIndex+1)%this.videos.length)}prev(){this.videos.length>0&&(this.currentIndex=(this.currentIndex-1+this.videos.length)%this.videos.length)}getCurrentVideoElement(){return this.videoPlayers.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.onSlideChange(()=>{this.next()})}close(t,n){let r={lastVideo:t,lastVideoIndex:n};this.dialogRef.close(r)}static \u0275fac=function(t){return new(t||OE)(bt(Gi),bt(Al))};static \u0275cmp=at({type:OE,selectors:[["cooee-video-scroller"]],hostBindings:function(t,n){t&1&&Qe("touchstart",function(r){return n.onTouchStart(r)})("touchend",function(r){return n.onTouchEnd(r)})},features:[ri],decls:4,vars:3,consts:[["videoPlayers",""],[1,"lc:relative","lc:w-full","lc:h-screen","lc:overflow-hidden"],[1,"lc:flex","lc:md:flex-row","lc:flex-col","lc:w-full","lc:h-full","lc:transition-transform","lc:duration-1000","lc:ease-in-out",3,"ngStyle"],[1,"lc:w-full","lc:h-full","lc:flex-shrink-0","lc:relative"],["autoplay","",1,"lc:w-full","lc:h-full","lc:object-cover",3,"timeupdate","click","ended","muted","height"],[3,"src","type","media"],[3,"src","type"],[1,"lc:absolute","lc:top-4","lc:right-2","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button",1,"lc:bg-black/50","lc:rounded-full","lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:border-none",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:absolute","lc:top-4","lc:right-16","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"items"],[3,"performCTA","closeModel","item"],[3,"performCTA","clicked","items"]],template:function(t,n){t&1&&(Y(0,"div",1)(1,"div",2),At(2,mU,17,6,"div",3,Pr),X()()),t&2&&(q(),be("ngStyle",pa(1,uU,"translateY(-"+n.currentIndex*100+"vh)")),q(),Mt(n.videos))},dependencies:[aS,ja,$a,Wa,Ga],styles:["[_nghost-%COMP%]{display:block}"]})},au=Fe(Rx());function Wx(e){let t=e.cloneNode(!0),n=t.querySelectorAll("[id]"),r=e.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return r==="canvas"?Mx(e,t):(r==="input"||r==="select"||r==="textarea")&&Ax(e,t),Nx("canvas",e,t,Mx),Nx("input, textarea, select",e,t,Ax),t}function Nx(e,t,n,r){let i=t.querySelectorAll(e);if(i.length){let s=n.querySelectorAll(e);for(let o=0;o<i.length;o++)r(i[o],s[o])}}var vU=0;function Ax(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${vU++}`)}function Mx(e,t){let n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch{}}function NE(e){let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function DE(e,t,n){let{top:r,bottom:i,left:s,right:o}=e;return n>=r&&n<=i&&t>=s&&t<=o}function su(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function Ox(e,t,n,r){let{top:i,right:s,bottom:o,left:a,width:l,height:c}=e,h=l*t,d=c*t;return r>i-d&&r<o+d&&n>a-h&&n<s+h}var Sh=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:NE(t)})})}handleScroll(e){let t=zn(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,i,s;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,s=l.left}else i=t.scrollTop,s=t.scrollLeft;let o=r.top-i,a=r.left-s;return this.positions.forEach((l,c)=>{l.clientRect&&t!==c&&t.contains(c)&&su(l.clientRect,o,a)}),r.top=i,r.left=s,{top:o,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Gx(e,t){let n=e.rootNodes;if(n.length===1&&n[0].nodeType===t.ELEMENT_NODE)return n[0];let r=t.createElement("div");return n.forEach(i=>r.appendChild(i)),r}function AE(e,t,n){for(let r in t)if(t.hasOwnProperty(r)){let i=t[r];i?e.setProperty(r,i,n?.has(r)?"important":""):e.removeProperty(r)}return e}function bc(e,t){let n=t?"":"none";AE(e.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function Px(e,t,n){AE(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},n)}function Dh(e,t){return t&&t!="none"?e+" "+t:e}function kx(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=Ih(t.left,t.top)}function Ih(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Lx(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function yU(e){let t=getComputedStyle(e),n=CE(t,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),s=CE(t,"transition-duration"),o=CE(t,"transition-delay");return Lx(s[i])+Lx(o[i])}function CE(e,t){return e.getPropertyValue(t).split(",").map(n=>n.trim())}var _U=new Set(["position"]),IE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,n,r,i,s,o,a,l,c){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=i,this._previewClass=s,this._pickupPositionOnPage=o,this._initialTransform=a,this._zIndex=l,this._renderer=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Fx(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return yU(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,n=e?e.template:null,r;if(n&&e){let i=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),r=Gx(s,this._document),this._previewEmbeddedView=s,e.matchSize?kx(r,i):r.style.transform=Ih(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=Wx(this._rootElement),kx(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return AE(r.style,{"pointer-events":"none",margin:Fx(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},_U),bc(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(i=>r.classList.add(i)):r.classList.add(t)),r}};function Fx(e){return"showPopover"in e}var EU={passive:!0},Bx={passive:!1},wU={passive:!1,capture:!0},bU=800,Vx=new Set(["position"]),TE=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Bi(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new ie;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=mt.EMPTY;_pointerUpSubscription=mt.EMPTY;_scrollSubscription=mt.EMPTY;_resizeSubscription=mt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>bc(t,e)))}_disabled=!1;beforeStarted=new ie;started=new ie;released=new ie;ended=new ie;entered=new ie;exited=new ie;dropped=new ie;moved=this._moveEvents;data;constrainPosition;constructor(e,t,n,r,i,s,o){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=s,this._renderer=o,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new Sh(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>Yn(n)),this._handles.forEach(n=>bc(n,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=Yn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Cn(this._renderer,t,"mousedown",this._pointerDown,Bx),Cn(this._renderer,t,"touchstart",this._pointerDown,EU),Cn(this._renderer,t,"dragstart",this._nativeDragStart,Bx)]),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Yn(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),bc(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),bc(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let r=Math.abs(t.x-this._pickupPositionOnPage.x),i=Math.abs(t.y-this._pickupPositionOnPage.y);if(r+i>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),o=this._dropContainer;if(!s){this._endDragSequence(e);return}(!o||!o.isDragging()&&!o.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let n=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,t);else{let r=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=n.x-r.x+this._passiveTransform.x,i.y=n.y-r.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:e,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){iu(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Cn(this._renderer,t,"selectstart",CU,wU)}),n){let r=this._rootElement,i=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,r),this._initialTransform=r.style.transform||"",this._preview=new IE(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(i,t)),Px(r,!1,Vx),this._document.body.appendChild(i.replaceChild(s,r)),this.started.next({source:this,event:e}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let n=this.isDragging(),r=iu(t),i=!r&&t.button!==0,s=this._rootElement,o=zn(t),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+bU>Date.now(),l=r?Yf(t):qf(t);if(o&&o.draggable&&t.type==="mousedown"&&t.preventDefault(),n||i||a||l)return;if(this._handles.length){let d=s.style;this._rootElementTapHighlight=d.webkitTapHighlightColor||"",d.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(d=>this._updateOnScroll(d)),this._boundaryElement&&(this._boundaryRect=NE(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){Px(this._rootElement,!0,Vx),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),i=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:i,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:i,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,s,i,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:r}){let i=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,e,t,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=o=>{(!o||this._preview&&zn(o)===this._preview.element&&o.propertyName==="transform")&&(s(),n(),clearTimeout(i))},i=setTimeout(r,t*1.5),s=this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=Gx(this._placeholderRef,this._document)):n=Wx(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t,n){let r=t===this._rootElement?null:t,i=r?r.getBoundingClientRect():e,s=iu(n)?n.targetTouches[0]:n,o=this._getViewportScrollPosition(),a=s.pageX-i.left-o.left,l=s.pageY-i.top-o.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=iu(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=n.pageX-t.left,i=n.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let o=this._ownerSVGElement.createSVGPoint();return o.x=r,o.y=i,o.matrixTransform(s.inverse())}}return{x:r,y:i}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,o=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),c=o.top+s,h=o.bottom-(l-s),d=o.left+i,f=o.right-(a-i);n=Ux(n,d,f),r=Ux(r,c,h)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-i.x),o=Math.abs(n-i.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>i.x?1:-1,i.x=t),o>this._config.pointerDirectionChangeThreshold&&(r.y=n>i.y?1:-1,i.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,bc(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let n=1/this.scale,r=Ih(e*n,t*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Dh(r,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=Ih(e,t);this._preview.setTransform(Dh(r,n))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let i=r.left-n.left,s=n.right-r.right,o=r.top-n.top,a=n.bottom-r.bottom;r.width>n.width?(i>0&&(e+=i),s>0&&(e-=s)):e=0,r.height>n.height?(o>0&&(t+=o),a>0&&(t-=a)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:iu(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=zn(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&su(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Va(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Yn(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function Ux(e,t,n){return Math.max(t,Math.min(n,e))}function iu(e){return e.type[0]==="t"}function CU(e){e.preventDefault()}function zx(e,t,n){let r=Hx(t,e.length-1),i=Hx(n,e.length-1);if(r===i)return;let s=e[r],o=i<r?-1:1;for(let a=r;a!==i;a+=o)e[a]=e[a+o];e[i]=s}function Hx(e,t){return Math.max(0,Math.min(t,e))}var Th=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,n,r){let i=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,n,r);if(s===-1&&i.length>0)return null;let o=this.orientation==="horizontal",a=i.findIndex(b=>b.drag===e),l=i[s],c=i[a].clientRect,h=l.clientRect,d=a>s?1:-1,f=this._getItemOffsetPx(c,h,d),g=this._getSiblingOffsetPx(a,i,d),m=i.slice();return zx(i,a,s),i.forEach((b,I)=>{if(m[I]===b)return;let A=b.drag===e,F=A?f:g,V=A?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=F;let M=Math.round(b.offset*(1/b.drag.scale));o?(V.style.transform=Dh(`translate3d(${M}px, 0, 0)`,b.initialTransform),su(b.clientRect,0,F)):(V.style.transform=Dh(`translate3d(0, ${M}px, 0)`,b.initialTransform),su(b.clientRect,F,0))}),this._previousSwap.overlaps=DE(h,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?r.x:r.y,{previousIndex:a,currentIndex:s}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,s=this._activeDraggables,o=s.indexOf(e),a=e.getPlaceholderElement(),l=s[i];if(l===e&&(l=s[i+1]),!l&&(i==null||i===-1||i<s.length-1)&&this._shouldEnterAsFirstChild(t,n)&&(l=s[0]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){let c=l.getRootElement();c.parentElement.insertBefore(a,c),s.splice(i,0,e)}else this._element.appendChild(a),s.push(e);a.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let n=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:n})=>{su(n,e,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:NE(n)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=r?t.left-e.left:t.top-e.top;return n===-1&&(i+=r?t.width-e.width:t.height-e.height),i}_getSiblingOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=t[e].clientRect,s=t[e+n*-1],o=i[r?"width":"height"]*n;if(s){let a=r?"left":"top",l=r?"right":"bottom";n===-1?o-=s.clientRect[a]-i[l]:o+=i[a]-s.clientRect[l]}return o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let i=n[n.length-1].clientRect;return r?e>=i.right:t>=i.bottom}else{let i=n[0].clientRect;return r?e<=i.left:t<=i.top}}_getItemIndexFromPointerPosition(e,t,n,r){let i=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:o,clientRect:a})=>{if(o===e)return!1;if(r){let l=i?r.x:r.y;if(o===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?t>=Math.floor(a.left)&&t<Math.floor(a.right):n>=Math.floor(a.top)&&n<Math.floor(a.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},xE=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let n=0;n<t.length;n++){let r=t[n];this._relatedNodes.push([r,r.nextSibling])}this.withItems(e)}sort(e,t,n,r){let i=this._getItemIndexFromPointerPosition(e,t,n),s=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let o=this._activeItems[i];if(s.drag===o&&s.overlaps&&s.deltaX===r.x&&s.deltaY===r.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),c=o.getRootElement();i>a?c.after(l):c.before(l),zx(this._activeItems,a,i);let h=this._getRootNode().elementFromPoint(t,n);return s.deltaX=r.x,s.deltaY=r.y,s.drag=o,s.overlaps=c===h||c.contains(h),{previousIndex:a,currentIndex:i}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r;i===-1&&(i=this._getClosestItemIndexToPointer(e,t,n));let s=this._activeItems[i],o=this._activeItems.indexOf(e);o>-1&&this._activeItems.splice(o,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(i,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,i]=this._relatedNodes[n];r.parentNode===e&&r.nextSibling!==i&&(i===null?e.appendChild(r):i.parentNode===e&&e.insertBefore(r,i))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,n){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),i=r?this._activeItems.findIndex(s=>{let o=s.getRootElement();return r===o||o.contains(r)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=Va(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,i=-1;for(let s=0;s<this._activeItems.length;s++){let o=this._activeItems[s];if(o!==e){let{x:a,y:l}=o.getRootElement().getBoundingClientRect(),c=Math.hypot(t-a,n-l);c<r&&(r=c,i=s)}}return i}},jx=.05,qx=.05,Sr=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(Sr||{}),Hn=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(Hn||{}),RE=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new ie;entered=new ie;exited=new ie;dropped=new ie;sorted=new ie;receivingStarted=new ie;receivingStopped=new ie;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=mt.EMPTY;_verticalScrollDirection=Sr.NONE;_horizontalScrollDirection=Hn.NONE;_scrollNode;_stopScrollTimers=new ie;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,n,r,i){this._dragDropRegistry=t,this._ngZone=r,this._viewportRuler=i;let s=this.element=Yn(e);this._document=n,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new Sh(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,r,i,s,o,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:i,distance:s,dropPoint:o,event:a})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(n=>n.isDragging()).every(n=>e.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof Th&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new xE(this._document,this._dragDropRegistry);else{let t=new Th(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=Yn(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,r){if(this.sortingDisabled||!this._domRect||!Ox(this._domRect,jx,t,n))return;let i=this._sortStrategy.sort(e,t,n,r);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,r=Sr.NONE,i=Hn.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||n||Ox(s.clientRect,jx,e,t)&&([r,i]=SU(o,s.clientRect,this._direction,e,t),(r||i)&&(n=o))}),!r&&!i){let{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};r=Yx(a,t),i=Kx(a,e),n=window}n&&(r!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=i,this._scrollNode=n,(r||i)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),Xh(0,bu).pipe(Gr(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===Sr.UP?e.scrollBy(0,-t):this._verticalScrollDirection===Sr.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===Hn.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===Hn.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&DE(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(r=>r._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._domRect||!DE(this._domRect,t,n)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let n=this._activeSiblings;!n.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=Va(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function Yx(e,t){let{top:n,bottom:r,height:i}=e,s=i*qx;return t>=n-s&&t<=n+s?Sr.UP:t>=r-s&&t<=r+s?Sr.DOWN:Sr.NONE}function Kx(e,t){let{left:n,right:r,width:i}=e,s=i*qx;return t>=n-s&&t<=n+s?Hn.LEFT:t>=r-s&&t<=r+s?Hn.RIGHT:Hn.NONE}function SU(e,t,n,r,i){let s=Yx(t,i),o=Kx(t,r),a=Sr.NONE,l=Hn.NONE;if(s){let c=e.scrollTop;s===Sr.UP?c>0&&(a=Sr.UP):e.scrollHeight-c>e.clientHeight&&(a=Sr.DOWN)}if(o){let c=e.scrollLeft;n==="rtl"?o===Hn.RIGHT?c<0&&(l=Hn.RIGHT):e.scrollWidth+c>e.clientWidth&&(l=Hn.LEFT):o===Hn.LEFT?c>0&&(l=Hn.LEFT):e.scrollWidth-c>e.clientWidth&&(l=Hn.RIGHT)}return[a,l]}var ou={capture:!0},SE={passive:!1,capture:!0},DU=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=at({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,r){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
|
|
80
|
-
`],encapsulation:2,changeDetection:0})}return e})(),Zx=(()=>{class e{_ngZone=O(Be);_document=O(nt);_styleLoader=O(_s);_renderer=O(ln).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Bi([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new ie;pointerUp=new ie;scroll=new ie;constructor(){}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=Cn(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,SE)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(DU),this._activeDragInstances.update(i=>[...i,n]),this._activeDragInstances().length===1)){let i=r.type.startsWith("touch"),s=a=>this.pointerUp.next(a),o=[["scroll",a=>this.scroll.next(a),ou],["selectstart",this._preventDefaultWhileDragging,SE]];i?o.push(["touchend",s,ou],["touchcancel",s,ou]):o.push(["mouseup",s,ou]),i||o.push(["mousemove",a=>this.pointerMove.next(a),SE]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>Cn(this._renderer,this._document,a,l,c))})}}stopDragging(n){this._activeDragInstances.update(r=>{let i=r.indexOf(n);return i>-1?(r.splice(i,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new ot(i=>this._ngZone.runOutsideAngular(()=>{let s=Cn(this._renderer,n,"scroll",o=>{this._activeDragInstances().length&&i.next(o)},ou);return()=>{s()}}))),no(...r)}registerDirectiveNode(n,r){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,r)}removeDirectiveNode(n){this._domNodesToDirectives?.delete(n)}getDragDirectiveForNode(n){return this._domNodesToDirectives?.get(n)||null}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=n=>{this._activeDragInstances().length>0&&n.preventDefault()};_persistentTouchmoveListener=n=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&n.preventDefault(),this.pointerMove.next(n))};_clearGlobalListeners(){this._globalListeners?.forEach(n=>n()),this._globalListeners=void 0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),IU={dragStartThreshold:5,pointerDirectionChangeThreshold:5},TU=(()=>{class e{_document=O(nt);_ngZone=O(Be);_viewportRuler=O(Rl);_dragDropRegistry=O(Zx);_renderer=O(ln).createRenderer(null,null);constructor(){}createDrag(n,r=IU){return new TE(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new RE(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),$x=new he("CDK_DRAG_PARENT"),xU=new he("CdkDragHandle"),RU=new he("CDK_DRAG_CONFIG"),NU=new he("CdkDropList"),Xx=(()=>{class e{element=O(Nt);dropContainer=O(NU,{optional:!0,skipSelf:!0});_ngZone=O(Be);_viewContainerRef=O(ni);_dir=O(Es,{optional:!0});_changeDetectorRef=O(Vr);_selfHandle=O(xU,{optional:!0,self:!0});_parentDrag=O($x,{optional:!0,skipSelf:!0});_dragDropRegistry=O(Zx);_destroyed=new ie;_handles=new Ir([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new We;released=new We;ended=new We;entered=new We;exited=new We;dropped=new We;moved=new ot(n=>{let r=this._dragRef.moved.pipe(lr(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=O(yt);constructor(){let n=this.dropContainer,r=O(RU,{optional:!0}),i=O(TU);this._dragRef=i.createDrag(this.element,{dragStartThreshold:r&&r.dragStartThreshold!=null?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&r.pointerDirectionChangeThreshold!=null?r.pointerDirectionChangeThreshold:5,zIndex:r?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),r&&this._assignDefaults(r),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(Gr(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){Qr(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,i=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),i=r.indexOf(n);i>-1&&(r.splice(i,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):Yn(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,i=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.scale=this.scale,n.dragStartDelay=typeof i=="object"&&i?i:p_(i),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(Jh(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){let i=this._dragDropRegistry.getDragDirectiveForNode(r);if(i){n.withParent(i._dragRef);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:i,constrainPosition:s,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:h}=n;this.disabled=l??!1,this.dragStartDelay=i||0,r&&(this.lockAxis=r),s&&(this.constrainPosition=s),o&&(this.previewClass=o),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(em(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),qs(n=>no(...n.map(r=>r._stateChanges.pipe(Ti(r))))),Gr(this._destroyed)).subscribe(n=>{let r=this._dragRef,i=n.element.nativeElement;n.disabled?r.disableHandle(i):r.enableHandle(i)})}static \u0275fac=function(n){return new(n||e)};static \u0275dir=Or({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&ii("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",ha],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",hv]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Fd([{provide:$x,useExisting:e}]),ca]})}return e})(),AU=e=>({"lc:cursor-grab":e}),Jx=(e,t)=>t.url;function MU(e,t){if(e&1&&Re(0,"source",9),e&2){let n=t.$implicit;bn("type",n.mimeType),kr("media","(max-width: ",n.width,"px)"),be("src",n.url,Gt)}}function OU(e,t){if(e&1&&Re(0,"source",10),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,Gt)}}var xh=class kE{constructor(t){this.elementRef=t}video;closeClicked=new We;videoClicked=new We;isDragging=!1;VideoUtils=Xi;ngOnInit(){let t=this.elementRef.nativeElement.parentElement.parentElement;t.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(t){return new(t||kE)(bt(Nt))};static \u0275cmp=at({type:kE,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:13,vars:5,consts:[["cdkDrag","",1,"lc:shadow-2xl","lc:fixed","lc:right-10","lc:bottom-10","lc:rounded-lg","lc:max-w-[100px]","lc:flex","lc:justify-center","lc:items-center",3,"cdkDragMoved","ngClass","cdkDragBoundary"],["id","lc-close-button",1,"lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:absolute"],["xmlns","http://www.w3.org/2000/svg","height","80px","viewBox","0 0 24 24","width","80px","fill","#FFFFFF"],["d","M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"],["autoplay","","loop","",1,"lc:rounded-lg","lc:w-full",3,"click","muted"],[3,"src","type","media"],[3,"src","type"]],template:function(t,n){t&1&&(Y(0,"div",0),Qe("cdkDragMoved",function(){return n.isDragging=!0}),Y(1,"button",1),Qe("click",function(){return n.close()}),Gn(),Y(2,"svg",2),Re(3,"path",3)(4,"path",4),X()(),Fi(),Y(5,"button",5),Gn(),Y(6,"svg",6),Re(7,"path",7),X()(),Fi(),Y(8,"video",8),Qe("click",function(){return n.onVideoClick()}),At(9,MU,1,4,"source",9,Jx),At(11,OU,1,2,"source",10,Jx),X()()),t&2&&(be("ngClass",pa(3,AU,n.isDragging))("cdkDragBoundary","body"),q(8),be("muted",!0),q(),Mt(n.video.sources),q(2),Mt(n.VideoUtils.getBestSources(n.video.sources)))},dependencies:[Hd,Xx],encapsulation:2})},Rh=(e,t)=>t.url;function PU(e,t){if(e&1&&(Y(0,"div",0),zt(1),X()),e&2){K();let n=pr(1);q(),Lr(" ",n," ")}}function kU(e,t){if(e&1&&Re(0,"source",6),e&2){let n=t.$implicit;bn("type",n.mimeType),kr("media","(max-width: ",n.width,"px)"),be("src",n.url,Gt)}}function LU(e,t){if(e&1&&Re(0,"source",7),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,Gt)}}function FU(e,t){if(e&1&&(Y(0,"div",8)(1,"span",10),zt(2),X(),Y(3,"span",11),zt(4),hr(5,"cooeeCurrency"),X()()),e&2){K();let n=pr(0);q(2),Lr(" ",n.name," "),q(2),Lr(" ",Br(5,2,n.price)," ")}}function BU(e,t){if(e&1){let n=dn();Y(0,"div",12),Qe("click",function(){ze(n);let r=K().$implicit,i=pr(0),s=K(2);return qe(s.addToCartClicked(r,i))})("keydown",function(){ze(n);let r=K().$implicit,i=pr(0),s=K(2);return qe(s.addToCartClicked(r,i))}),zt(1," Add to cart "),X()}}function VU(e,t){if(e&1){let n=dn();Fr(0),Y(1,"div",3)(2,"div",4),Qe("click",function(){let r=ze(n),i=r.$implicit,s=r.$index,o=pr(0),a=K(2);return qe(a.onClick(i,o,s))})("keydown",function(){let r=ze(n),i=r.$implicit,s=r.$index,o=pr(0),a=K(2);return qe(a.onClick(i,o,s))}),Y(3,"video",5),At(4,kU,1,4,"source",6,Rh),At(6,LU,1,2,"source",7,Rh),X(),kt(8,FU,6,4,"div",8),X(),kt(9,BU,2,0,"div",9),X()}if(e&2){let n=t.$implicit,r=K(2),i=pr(4);ho(n.items==null?null:n.items[0]),q(3),be("muted",!0),q(),Mt(n.sources),q(2),Mt(r.VideoUtils.getBestSources(n.sources)),q(2),jt(i?8:-1),q(),jt(i?9:-1)}}function UU(e,t){if(e&1&&(Y(0,"div",1),At(1,VU,10,4,"div",3,Pr),X()),e&2){let n=K();q(),Mt(n.videos)}}function HU(e,t){if(e&1&&Re(0,"source",6),e&2){let n=t.$implicit;bn("type",n.mimeType),kr("media","(max-width: ",n.width,"px)"),be("src",n.url,Gt)}}function jU(e,t){if(e&1&&Re(0,"source",7),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,Gt)}}function $U(e,t){if(e&1){let n=dn();Fr(0),Y(1,"div",13),Gn(),Y(2,"svg",14),Re(3,"circle",15)(4,"circle",16),X(),Fi(),Y(5,"div",17)(6,"video",18),Qe("click",function(){let r=ze(n),i=r.$implicit,s=r.$index,o=pr(0),a=K(2);return qe(a.onClick(i,o,s))}),At(7,HU,1,4,"source",6,Rh),At(9,jU,1,2,"source",7,Rh),X()()()}if(e&2){let n=t.$implicit,r=K(2);ho(n.items==null?null:n.items[0]),q(6),be("muted",!0),q(),Mt(n.sources),q(2),Mt(r.VideoUtils.getBestSources(n.sources))}}function WU(e,t){if(e&1&&(Y(0,"div",2),At(1,$U,11,2,"div",13,Pr),X()),e&2){let n=K();q(),Mt(n.videos)}}function GU(e,t){if(e&1){let n=dn();Y(0,"cooee-draggable-video-popup",20),Qe("videoClicked",function(){ze(n),K();let r=pr(0),i=pr(1),s=pr(2),o=K();return qe(o.onPopupVideoClick(i,s,r))})("closeClicked",function(){ze(n);let r=K(2);return qe(r.onPopupVideoClosed())}),X()}if(e&2){let n=K(2);be("video",n.videos[0])}}function zU(e,t){if(e&1&&(Fr(0)(1)(2),kt(3,GU,1,1,"cooee-draggable-video-popup",19)),e&2){let n=K(),r=ho(0);q();let i=ho(n.videos[r]);q(),ho(i.items[0]),q(),jt(n.hidePopupVideo?-1:3)}}var Nh=class PE{constructor(t,n){this.dialog=t,this.cdr=n}sendEvent=new We;videos;VideoUtils=Xi;VideoConfigSource=yE;VideoConfigTemplate=_E;hidePopupVideo;_triggerContext=Bi(null);dialogRef=null;currentDialogData=null;get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this.videos=t.triggerData.content?.videoConfig?.videos}onResize(){!this.dialogRef||!this.currentDialogData||this.openDialog(this.currentDialogData.videos[0],this.currentDialogData.currentIndex,!0)}sendTriggerClicked(t,n){let r=new Pe(k.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);r.videos=[t.id],r.items=[n],this.sendEvent.emit(r)}onClick(t,n,r){this.sendTriggerClicked(t,n),this.openDialog(t,r)}performCTA(t){let n;if(t.cta===au.ClickActionType.ADD_TO_CART)n=k.EVENT_ADD_TO_CART_CLICKED;else if(t.cta===au.ClickActionType.GO_TO_PRODUCT)n=k.EVENT_VIEW_ITEM_CLICKED;else if(t.cta===au.ClickActionType.OPEN_CART)n=k.EVENT_OPEN_CART_CLICKED;else return;let r=new Pe(n,{},this.triggerContext?.triggerData);r.videos=[t.video.id],r.items=[t.item],this.sendEvent.emit(r),Xi.performCTA(this.triggerContext,t)}addToCartClicked(t,n){this.performCTA({cta:au.ClickActionType.ADD_TO_CART,item:n,video:t})}onPopupVideoClick(t,n,r){this.hidePopupVideo=!0,this.onClick(t,n,r),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let t=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3,n=new Pe(k.EVENT_TRIGGER_CLOSED,{duration:t},this.triggerContext?.triggerData);this.sendEvent.emit(n)}isMobile(){return new Qx.default().getDevice().type==="mobile"}openDialog(t,n,r=!1){let i=this.isMobile()?_h:yh,s={videos:this.videos,currentIndex:n,triggerContext:this.triggerContext,onCTAPerformed:o=>this.performCTA(o)};if(this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(i,{width:"100vw",height:"100vh",data:s}),this.currentDialogData=s,this.dialogRef&&!r){let o={videoID:t.id,videoIndex:n},a=new Pe(k.EVENT_VIDEO_DIALOG_OPENED,{current:o},this.triggerContext?.triggerData);a.videos=[t.id],this.sendEvent.emit(a)}this.dialogRef.closed.subscribe(o=>{if(!o)return;let a={videoID:o.lastVideo.id,videoIndex:o?.lastVideoIndex},l=new Pe(k.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[o.lastVideo.id],this.sendEvent.emit(l),this.dialogRef=null,this.currentDialogData=null})}static \u0275fac=function(t){return new(t||PE)(bt(vT),bt(Vr))};static \u0275cmp=at({type:PE,selectors:[["cooee-shoppable-videos"]],hostBindings:function(t,n){t&1&&Qe("resize",function(){return n.onResize()},!1,QC)},inputs:{triggerContext:"triggerContext"},outputs:{sendEvent:"sendEvent"},decls:9,vars:4,consts:[["id","lc-heading-text",1,"lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],["id","lc-video-swiper",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-10","lc:justify-center","lc:items-center"],["id","lc-video-stories",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-parent","lc:flex","lc:flex-col","lc:gap-1"],["id","lc-video","tabindex","{0}",1,"lc-video-card","lc:cursor-pointer","lc:rounded-lg","lc:min-w-[200px]",3,"click","keydown"],["width","100%","autoplay","","loop","",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"muted"],[3,"src","type","media"],[3,"src","type"],["id","lc-single-product",1,"lc:w-full","lc:flex","lc:flex-col","lc:gap-1","lc:text-sm","lc:mt-1","lc:mb-1"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-1"],["id","lc-item-price",1,"lc:font-medium"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1",3,"click","keydown"],["id","lc-video-story",1,"lc:relative","lc:w-20","lc:h-20","lc:cursor-pointer"],["viewBox","0 0 100 100",1,"lc:absolute","lc:top-0","lc:left-0","lc:w-full","lc:h-full"],["cx","50","cy","50","r","48","fill","none","stroke-width","4",1,"lc:stroke-gray-300"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6",1,"lc:stroke-blue-500","animate-progress"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["id","lc-video","autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover","lc:rounded-full",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(t,n){if(t&1&&(Fr(0)(1),kt(2,PU,2,1,"div",0),Fr(3)(4)(5),kt(6,UU,3,0,"div",1)(7,WU,3,0,"div",2)(8,zU,4,4)),t&2){let r=n.triggerContext==null||n.triggerContext.triggerData==null||n.triggerContext.triggerData.content==null?null:n.triggerContext.triggerData.content.videoConfig;q();let i=ho(r==null?null:r.heading);q(),jt(i?2:-1);let s=r==null?null:r.source;q(2),ho(s===n.VideoConfigSource.GALLERY);let o=r==null?null:r.template;q(2),jt(o===n.VideoConfigTemplate.SWIPER?6:o===n.VideoConfigTemplate.STORY?7:o===n.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[pi,xh],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.lc-video-card[_ngcontent-%COMP%] > video[_ngcontent-%COMP%]:hover{scale:1.1}.animate-progress[_ngcontent-%COMP%]{stroke-dasharray:100 241.6;stroke-dashoffset:0;transition:stroke-dashoffset .3s;transform-origin:50% 50%;animation:_ngcontent-%COMP%_snake-rotate 2.5s linear infinite}@keyframes _ngcontent-%COMP%_snake-rotate{to{transform:rotate(360deg)}}']})};S.configure("CooeeWidgetSDK");(async()=>{let e=await yS(wS),t=(n,r)=>{let i=J0(n,{injector:e.injector});customElements.define(r,i)};t(Ff,"cooee-progressbar"),t(Nh,"cooee-shoppable-videos")})();})();
|
|
78
|
+
`,To=class{listen(){document.addEventListener(k.CTA_EVENT,async e=>{await this.processEvent(e)},!1)}async performAddToCart(e,t){if(!e.length)return;let n=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),r=Tt.getCartURL("cart/add.js"),i={items:n},s=Kt.get();s.isMiniCart()?i.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(i.sections=s.element.getSectionsToRender?.().map(a=>a.section??a.id));let o=JSON.stringify(i);try{let a=await fetch(r,{body:o,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return S.log(`Added ${e.length} items to Cart`),fe.showSnackbar("Product added to your cart"),a.json()}catch(a){S.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!ux.JSUtils.hasKeys(t)){S.warn("No update fields provided");return}let n=Tt.getCartURL("cart/change.js"),r=w({id:e.key},t),i=JSON.stringify(r);try{let s=await fetch(n,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(S.log(`Updated ${e}`),Ye.getCurrent().update(s.json()))}catch(s){S.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),S.log(`Code-${e} copied`),fe.showSnackbar("Discount code copied")}catch(t){S.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=Tt.getProductSlug(e.link);t&&(location.pathname=Tt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){S.warn("Trying to upgrade to subscription with no item");return}let n=await Ye.getCurrent().getNormalisedCart(),r=e.selectedOrFirstVariant.value,i=n.items.findIndex(c=>c.vID===r.mID),s=r.selectedSellingPlan.value,o=Tt.getCartURL("cart/change.js"),a={line:i+1,selling_plan:s?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(o,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){S.log(`Upgraded ${e} selling plan`),fe.showSnackbar("Line item updated");let h=await c.json();return Ye.getCurrent().update(h),h}}catch(c){S.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,n){let r=Pt.get().storefrontToken;if(!r)throw new Error("Storefront token not set for the store");if(!e?.vID){S.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:n.getKVFormatPrivateAttributesForLineItem()}],o=await fe.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",r);let l=JSON.stringify({query:tU,variables:{input:{lines:s,discountCodes:i,attributes:o}}});return(await Mn.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let t=e?.detail;if(!t)return;let n=t.clickAction,r=t.items,i=t.triggerData;if(n.at){let s=n;if(S.log(`Performing ${JSON.stringify(s)} action`),s.at===101)r?.length&&this.performGoToItem(r[0]);else if(s.at===102)r?.length&&await this.performAddToCart(r,i);else if(s.at===103)await this.performCopyCoupon(i.discount.code);else if(s.at===105)Kt.get().open();else if(s.at===104){let o=t.collections;if(!o?.length)return;location.pathname=Tt.getRootPrefix()+"collections/"+o[0].handle}}n.applyDiscount&&i.discount?.code&&Io.navigate(i.discount.code,i.redirectBehaviour)}getVIDAndQuantity(e){let t,n;if(e instanceof fn)t=e.vID,n=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,n=1}return{vID:t,quantity:n}}},Gp=class extends Ci{ctaListener=new To;constructor(e){super(e),yi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Ti(null)).subscribe(this.checkMilestone.bind(this))}update(e){super.update(e),this.widgetElement.update()}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-progressbar");e.className="cooee-root",e.cart=Ye.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await Ye.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let n of t){if(e.amount<n.minValue)break;if(S.log("Current milestone",n),n.rewardType===dx.MilestoneRewardType.FREE_AUTO_GIFT){let r=n.items[0],i=e.items.find(s=>s.vID===r.vID||s.mID===r.mID);if(i)S.log(`Item(vID:${r.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let s=await this.ctaListener.performAddToCart([r],this.engagementTrigger);Kt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await Ye.getCurrent().getNormalisedCart()).items.filter(n=>n.vID!==e?.vID&&n.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let n of t)await this.ctaListener.performUpdate(n,{quantity:0})}},zp=class extends Zn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-shoppable-videos");e.className="cooee-root",e.triggerContext=this.triggerContext,e.addEventListener("sendEvent",t=>{let n=t.detail;this.safeHTTPService.sendEvent(n)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}},fx=Fe(va()),qp=class extends Zn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){let e=this.getParentElement(`inner-letscooee-${this.engagementTrigger.shortID}`);this.rootContainer.appendChild(e),document.addEventListener(k.ADD_BUNDLE_CTA_INBOUND_EVENT,this.inboundCTAListener.bind(this),!1)}async inboundCTAListener(e){let t=this.engagementTrigger,n=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,r=e.detail;if(!fx.JSUtils.hasKeys(r)){S.error(`No detail received for ${n}`);return}S.log("Detail received for BYOB",r);let i=r.campaignID??r.campaignId??r.campaign_id;if(i!==t.shortID&&i!==t.engagementID){S.warn(`Current ${n} is not BYOB. Received: ${i}`);return}let s=r.items;if(!s?.length)return;let o=s.map(a=>new fn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new So(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},mc=class{runtimeData=Oe.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Ci.renderedEngagements];Ci.renderedEngagements.length=0;for(let n of e)S.log(`\u{1F4E3} ${n} received as cart embed`),!this.findAndUpdateCurrent(n,t)&&(S.log(`${n} is new`),n.isProgressBar()?new Gp(n).renderSilently():n.isSubscriptionUpsell()?Wp.renderCartUpsell(n):new Ci(n).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Zn.renderedEngagements];Zn.renderedEngagements.length=0;for(let n of e)S.log(`\u{1F4E3} ${n} received as page embed`),!this.findAndUpdateCurrent(n,t)&&(S.log(`${n} is new`),n.isShoppableVideo()?new zp(n).renderSilently():n.isBYOB()?new qp(n).renderSilently():new Zn(n).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let n=t.findIndex(r=>r.isSameTrigger(e));return n<0||e.isSubscriptionUpsell()?!1:(t[n].update(e),t[n].renderSilently(),t.splice(n,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},Wr=class GS{static INSTANCE;httpService=Ve.get(Mn);sessionManager=Ve.get(yn);runtimeData=Oe.get();loadWidgetsSubject=new ie;constructor(){this.loadWidgetsSubject.pipe(Rr(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>S.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>S.error("Unable to initiate page widgets",t))}),yi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new GS),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){yn.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>S.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){yn.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>S.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){yn.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();S.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async n=>{let r=n.widgets.map(i=>new sr(i));new mc().processPageWidgetResponse(r)}).catch(n=>{S.error("Error sending widget getter",n)})}async loadCartWidgets(){let t=await this.getWidgetProps();S.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async n=>{let r=n.widgets.map(i=>new sr(i));new mc().processCartWidgetResponse(r)}).catch(n=>{S.error("Error sending widget getter",n)})}async getVariation(t){let n=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),n))}renderCachedCartWidgets(){new mc().processCartWidgetResponse(this.runtimeData.cartEngagements)}async addSessionContext(t){let n=await this.sessionManager.checkSessionAndGetContext();t.sessionID=n[0],t.sessionNumber=n[1],t.landingPage=n[2],t.page=vi.parseFromCurrent()}addAvailableEngagementShortIDs(){let t=document.querySelectorAll(".letscooee-engagement"),n=[];return t.forEach(r=>{let i=r.dataset.engagementId;i&&+i&&n.push(i)}),n}async getWidgetProps(){let t={};t.engagementIDs=this.addAvailableEngagementShortIDs(),t.locale=this.runtimeData.locale,await this.addSessionContext(t),t.currentItem=this.runtimeData.getCurrentItem();try{t.cart=await Ye.getCurrent().getNormalisedCart()}catch(s){S.error("Error fetching Shopify cart before sending widget call",s)}let n=new URLSearchParams(location.search),r=n.get("cooee-preview");r?t.previewIDs=r.trim().split(",").filter(s=>Number.isInteger(+s)):this.runtimeData.previewIDs?.length&&(t.previewIDs=this.runtimeData.previewIDs);let i=n.get("cooee-variant");return i?t.previewVariant=i:this.runtimeData.previewVariant&&(t.previewVariant=this.runtimeData.previewVariant),t}},Yp=class{runtimeData=Oe.get();widgetAPIService=Ve.get(Wr);meddle(){let e=wt.globalRef;e.account=e.account??[],e.profile=e.profile??[],e.events=e.events??[],e.screen=e.screen??[],e.page=e.page??[],this.meddlePage(),this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.meddleScreen(),this.exposeMethods()}exposeMethods(){let e=wt.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.previewWidget=wt.previewWidget.bind(wt),e.previewPopup=wt.previewPopup.bind(wt)}overwritePush(e,t){xa(e,"push",t)}meddleAccount(){this.overwritePush(wt.globalRef.account,(...e)=>{this.processAccount(e[0])}),wt.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(wt.globalRef.events,(...e)=>{this.processEvent(e[0])}),wt.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(wt.globalRef.profile,(...e)=>{this.processProfile(e[0])}),wt.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(wt.globalRef.screen,(...e)=>{this.processPageName(e[0])}),wt.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&wt.authenticate(e),e.flags&&As.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?wt.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):wt.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&&wt.updateProfile(e)}processPageName(e){e&&wt.setPageName(e)}meddlePage(){this.overwritePush(wt.globalRef.page,(...e)=>{this.processPage(e[0])}),wt.globalRef.page.forEach(this.processPage.bind(this))}processPage(e){e.currentItem&&this.runtimeData.setCurrentItem(e.currentItem),e.currency&&(this.runtimeData.currencyCode=e.currency),e.shopCurrency&&(this.runtimeData.shopCurrencyCode=e.shopCurrency),e.moneyFormat&&(this.runtimeData.moneyFormat=e.moneyFormat),e.jsLoad&&(this.runtimeData.jsLoadTime=e.jsLoad),e.locale&&(this.runtimeData.locale=e.locale),e.pageName&&wt.setPageName(e.pageName)}},gc=class{static SESSION_STORAGE=window.sessionStorage;static SESSION_STORAGE_KEY_PREFIX=k.COOEE.concat("-");static getString(e,t){return this.getItem(e)||t}static setString(e,t){this.setItem(e,t)}static remove(e){this.removeItem(e)}static getItem(e){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}static setItem(e,t){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e),t)}static removeItem(e){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}},vc=class cu{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=Ve.get(Ue);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new cu),this.INSTANCE}resetScrollID(t){gc.remove(k.SESSION_STORAGE_SCROLL_ID),this.lastScreenOrScroll=t??new Date}listen(){if(window.scrollY){let t=this.getPercentScrolledY();this.shouldSendScroll(t)&&this.sendScroll(t)}fe.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Lo(window,"scroll").pipe(Rr(cu.DEBOUNCE_TIME),ur(()=>{let t=this.getPercentScrolledY();if(t>100){S.warn("Received scroll percent is more than 100",t);return}if(this.shouldSendScroll(t))return t})).subscribe(t=>{this.sendScroll(t)})}shouldSendScroll(t){return Math.abs(this.lastPercent-t)>=cu.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let n={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let r=gc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new Pe(k.EVENT_SCROLL,n,null,r);this.safeHttpService.sendEvent(i),gc.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,n=window.innerHeight;return Math.ceil((window.scrollY+n)/t*100)}},Kp=class qS{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=Ve.get(Ue);runtimeData=Oe.get();listen(){document.onvisibilitychange=()=>{document.visibilityState==="visible"?this.onVisible():document.visibilityState==="hidden"&&this.onHidden()}}async onVisible(){}async onHidden(){let t=await this.runtimeData.setInactive();if(t===0){S.info("Not sending background event as user was inactive on website");return}S.info(`Sending background event with ${t} seconds`);let n={};n[qS.ACTIVE_DURATION]=t,this.apiService.sendEvent(new Pe(k.EVENT_APP_BACKGROUND,n))}},Zp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof bi&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(n=>{if(n.url){let r=new FontFace(k.COOEE+e.name,n.getURL(),n.getFontDescriptor());t.push(r.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(n=>{document.fonts.add(n)})}},Xp=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),S.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},Jp=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ue.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:this.collectFormData();break;case void 0:case 105:break;default:S.error("Received an invalid ClickActionType: ",this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,"_blank")?.focus()}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;fe.isValidURL(e)||(e=`//${e}`),window.open(e,"_self")}}prompt(){let e=this.action.pmpt;e&&(e===2&&this.promptLocationPermission(),e===3&&this.promptPushNotificationPermission(),e===1&&this.promptCameraPermission())}closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){S.warn("Navigator.share is not compatible with this browser");return}navigator.share({text:this.action.share.text,title:"Share"}).then(e=>console.log(e)).catch(e=>console.error(e))}}containsCTA(){return this.action.at&&this.action.at!==1?!0:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(e){return e?Object.keys(e).length===0:!0}promptLocationPermission(){!navigator.geolocation||!navigator.permissions||navigator.geolocation.getCurrentPosition(e=>{this.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),this.sendPermissionData()})}promptPushNotificationPermission(){if(!("Notification"in window)){S.warn("This browser does not support desktop notification");return}if(Notification.permission!=="default"){this.apiService.updateDeviceProps({pnPerm:Notification.permission});return}Notification.requestPermission().then(()=>{this.sendPermissionData()})}promptCameraPermission(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally(()=>{this.sendPermissionData()})}checkPermission(e){return navigator.permissions.query({name:e}).then(t=>t.state.toString())}async checkAllPermission(){let e=await this.checkPermission("camera"),t=await this.checkPermission("geolocation"),n=Notification.permission;return{camera:e,location:t,notification:n}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let n=document.getElementById(t.id).value;t.type===51?e.email=n:t.type===52&&(e.mobile=n)}this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),fe.showSnackbar("Coupon applied on cart"),Xp.updateIdentity(e)}dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};document.dispatchEvent(new CustomEvent(k.CTA_EVENT,{detail:t}));let n={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}},Dr=class{renderer=nr.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,n){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=n,this.stylesConverter=new pc(this.renderer.getScalingFactor())}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=re(w(w(w(w({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:"border-box",outline:"none"});this.renderer.setStyles(this.inappHTMLEl,e)}getDisplayStyles(){return{display:"block"}}processWidthAndHeight(){this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.stylesConverter.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.stylesConverter.getSizePx(this.inappElement.h))}processPositionBlock(){let e={position:"absolute",left:this.stylesConverter.getSizePx(this.inappElement.x),top:this.stylesConverter.getSizePx(this.inappElement.y)};this.renderer.setStyles(this.inappHTMLEl,e)}getBorderStyles(){return this.stylesConverter.getBorderStyles(this.inappElement.br)}getSpaceStyles(){return this.stylesConverter.getSpaceStyles(this.inappElement.spc)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let t=(e/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",t)}}processShadow(){let e=this.inappElement.shd;e?this.renderer.setStyle(this.inappHTMLEl,"box-shadow",e.getStyle(this.scalingFactor)):this.renderer.setStyle(this.inappHTMLEl,"box-shadow","unset")}processTransformBlock(){let e=new Ts(this.inappElement.trf);e&&e.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform",`rotate(${e.rotate}deg)`)}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation(),new Jp(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},Si=class extends Dr{constructor(e,t,n){super(e,t,n)}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment()}processFontBlock(){let e={},t=this.inappElement.typography;return t&&(e.fontSize=this.stylesConverter.getSizePx(t.fs),e.fontFamily=k.COOEE+t.fam?.name,e.lineHeight=`${t.lh}`,e.letterSpacing=t.letterSpacing),this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.renderer.setStyles(this.inappHTMLEl,e),e}processPart(e,t){let n=[];t.u&&n.push("underline"),t.st&&n.push("line-through"),n.length||n.push("normal"),this.renderer.setStyle(e,"font-weight",t.b?"bold":"normal"),this.renderer.setStyle(e,"font-style",t.i?"italic":"normal"),this.renderer.setStyle(e,"text-decoration",n.join(" ")),this.renderer.setStyle(e,"color",t.c??"inherit"),this.renderer.setStyle(e,"font-family","inherit")}processAlignment(){let e=this.inappElement.typography.ta,t=e?Qa[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},eu=class extends Si{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.inappElement.parts?.forEach(e=>{let t=this.renderer.createElement("span");t.innerHTML=e.txt?.toString()?.replace(/\n/g,"<br />"),this.processPart(t,e),this.renderer.appendChild(this.inappHTMLEl,t)}),this.processCommonBlocks()}},tu=class extends Dr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},ks=class extends Dr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("img"),this.insertElement()}render(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()}},nu=class zS extends Dr{constructor(t,n,r){super(t,n,r),this.parent=t,this.inappHTMLEl=this.renderer.createElement("div")}static MAX_Z_INDEX="2147483647";render(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(k.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",zS.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{let n=this.inappElement.spc,r=this.stylesConverter.getScaledSize(t.w)+n.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+n.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",r+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",i+"px")}}getSpaceStyles(){return{padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return w(w({display:"flex"},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){if(this.renderer.isParentNotBody()){if(this.triggerContext.triggerData.ian?.isEmbedded()){this.renderer.setStyle(this.inappHTMLEl,"position","block");return}this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")}getBorderStyles(){return{}}processTransparency(){}processTransformBlock(){}processShadow(){}},Qp=class extends Dr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(k.IN_APP_CONTAINER_NAME),this}},yc=class extends Si{borderColor="";constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("input"),this.insertElement()}render(){let e=this.setInputType();this.renderer.setAttribute(this.inappHTMLEl,"placeholder",this.inappElement.placeholderText),this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},eh=class WS extends yc{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","email"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(WS.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},th=class YS extends yc{static MOBILE_REGEX=/^\d+$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","tel"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(YS.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},nh=class Ji extends Si{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,n,r){super(t,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=re(w(w(w({flex:"1 1 0"},this.stylesConverter.getBackgroundStyles(this.inappElement.bg)),this.stylesConverter.getBorderStyles(this.inappElement.br)),this.stylesConverter.getSpaceStyles(this.inappElement.spc)),{marginLeft:this.stylesConverter.getSizePx(this.inappElement.gap),marginRight:this.stylesConverter.getSizePx(this.inappElement.gap)});this.addStylesToTimer(t)}getBackgroundStyles(){return{}}processFontBlock(){let t=super.processFontBlock();return this.stylesConverter.getColourStyles(this.inappElement.color,"color",t),this.addStylesToTimer(t),t}getSpaceStyles(){return{}}getBorderStyles(){return{}}getDisplayStyles(){return{display:"flex",flexWrap:"nowrap",justifyContent:"center"}}addStylesToTimer(t){this.elements.forEach(n=>this.renderer.setStyles(n,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(Ji.DAYS)),t.hour&&this.elements.push(this.getChild(Ji.HOURS)),t.minute&&this.elements.push(this.getChild(Ji.MINUTES)),t.second&&this.elements.push(this.getChild(Ji.SECONDS)),this.elements.forEach(n=>this.inappHTMLEl.appendChild(n))}getChild(t){let n=this.renderer.createElement("div"),r=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,r.innerText="00",r.id=`lc-${t}`,this.renderer.setStyle(i,"font-size","0.5em"),this.renderer.setStyle(i,"text-align","center"),this.renderer.setStyle(i,"font-family","inherit"),this.renderer.setStyle(r,"text-align","center"),this.renderer.setStyle(r,"font-family","inherit"),this.inappElement.lblPos==="start"?(n.appendChild(i),n.appendChild(r)):(n.appendChild(r),n.appendChild(i)),this.renderer.setStyle(n,"display","flex"),this.renderer.setStyle(n,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(n,"justify-content","center"),this.renderer.setStyle(n,"align-items","center"),this.renderer.setStyle(n,"gap","5px"),this.spans.push(r),n}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,n=>{this.spans.forEach(r=>{r.id===`lc-${Ji.DAYS}`?r.innerText=String(n.days).padStart(2,"0"):r.id===`lc-${Ji.HOURS}`?r.innerText=String(n.hours).padStart(2,"0"):r.id===`lc-${Ji.MINUTES}`?r.innerText=String(n.minutes).padStart(2,"0"):r.id===`lc-${Ji.SECONDS}`&&(r.innerText=String(n.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},rh=class extends Si{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("select"),this.insertElement()}render(){this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions()}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener("click",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new wi(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let n=this.parentHTMLEl.querySelector("#coo-13");if(!n)return;let r=e.imgs[0]??t.imgs?.at(0);r?.url&&n.setAttribute("src",r.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let n=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(r=>{t.add(this.createOption(r.name??"Default",r,r.mID===n?.vID))})}createOption(e,t,n){let r=this.renderer.createElement("option");return r.text=e,r.value=JSON.stringify(t),n&&(r.selected=!0),t||(r.disabled=!0),r}},ih=class extends ks{constructor(e,t,n){super(e,t,n)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},_c=class Sc{static ACTIVE_TRIGGER_DATA;renderer=nr.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ue.getInstance(),this.resizeListener=()=>this.screenResized(),this.setParentContainer(t)}setParentContainer(t){this.parent=t??document.body,this.renderer.setParentContainer(this.parent)}render(t){this.renderEngagement(new sr(t))}async renderEngagement(t){if(this.triggerContext=new dc(new Date,t),this.triggerContext.onClose(n=>{this.closeInApp(n)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let n=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(n)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!Kt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Kt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){Sc.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){Ct.getInstance().captureException(t,{triggerData:JSON.stringify(this.triggerContext.triggerData)});return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe()}}shouldSkipCampaign(){let t=this.triggerContext.triggerData;if(!t.previewType&&Sc.ACTIVE_TRIGGER_DATA){let r={triggerShown:new ka(Sc.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,r),!0}if(Oe.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let n=k.PAYMENT_MODAL_DETAILS.find(r=>!!document.querySelector(r.identifier));return n?(this.skipTrigger(t,{reason:`${n.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new nu(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw S.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let n=new Pe(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(n);let r={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}sendTriggerClosed(t){let n=t.eventName;delete t.eventName;let r=new Pe(n,t,this.triggerContext.triggerData);r.name===k.EVENT_TRIGGER_CLICKED&&(r.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(r)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,n,r){n instanceof rc?new eh(t,n,r).render():n instanceof ic?new th(t,n,r).render():n instanceof _o?new eu(t,n,r).render():n instanceof oc?new ih(t,n,r).render():n instanceof qi?new ks(t,n,r).render():n instanceof xs?new tu(t,n,r).render():n instanceof tc?new nh(t,n,r).render():n instanceof nc?new rh(t,n,r).render():S.error("Unsupported element type- "+n.type)}renderContainer(t){let n=this.ian?.cont;n&&(this.containerHTMLElement=new Qp(this.rootContainer,n,t).render().getHTMLElement(),new Zp().loadAllFonts(this.ian),this.ian.elems?.forEach(async r=>{await this.renderElement(this.containerHTMLElement,r,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let n=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),Sc.ACTIVE_TRIGGER_DATA=void 0;let r=this.containerHTMLElement.animate(n,{duration:500,easing:"ease-in-out"});r.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){nr.get().removeInApp(this.triggerContext)}skipTrigger(t,n){let r=new Pe(k.EVENT_CAMPAIGN_REJECTED,n,t);this.safeHTTP.sendEvent(r)}async preloadImages(t){let n=t.ian;if(!n)return;let r=[];n.elems.forEach(i=>{let s=i.bg?.img?.src;if(s&&r.push(this.getPromise(s)),i.t===1){let o=i.src;if(!o)return;r.push(this.getPromise(o))}}),n.bg?.img?.src&&r.push(this.getPromise(n.bg.img.src)),n.cont.bg?.img?.src&&r.push(this.getPromise(n.cont.bg.img.src)),await Promise.all(r)}getPromise(t){return new Promise(n=>{let r=new Image;r.onload=n,r.src=t,r.style.display="none"})}},oh=class{compareCartItemSubject=new ie;constructor(){this.compareCartItemSubject.pipe(Rr(100)).subscribe(this.compareCartItems.bind(this))}listen(){this.compareCartItemSubject.next(),this.overwriteXMLHttpRequest(),this.overwriteFetchMethod()}overwriteXMLHttpRequest(){let e=this,t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){e.performEvent(this._url).catch(n=>S.error("Unable to process cart change in XMLHttpRequest",n))}),t.apply(this,arguments)},S.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(n){return t.apply(window,arguments).then(r=>(e.performEvent(n.toString()).catch(i=>S.error("Unable to process cart change in fetch",i)),r))},S.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Oe.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let n=e?.items,r=t.items,i=[],s=[];if(S.debug(`Comparing cart change with old count ${n?.length} to new count ${r.length}`),r?.forEach(o=>{let a=n?.find(l=>l.vID===o.vID);if(a){if(a.quantity!==o.quantity){let l=a.quantity<o.quantity,c=Math.abs(a.quantity-o.quantity),h=re(w({},o),{quantity:c});l?i.push(h):s.push(h)}n&&fe.removeFromArray(n,a)}else i.push(o)}),n)for(let o of n)s.push(o);S.debug(`Cart delta: added: ${i.length}, removed: ${s.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),s.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||i.length)&&yi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let n=new Pe(e,t);Ve.get(Ue).sendEvent(n)}async compareCartItems(){let e=await ft.get(we.CURRENT_CART,{}),t=await Ye.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},sh=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(n,r){try{await e.modifyRequest(n,r)}catch(i){Ct.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(r?.body)})}return t(n,r)},S.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let n=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(n.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let r;if(typeof t.body=="string")try{r=JSON.parse(t.body)}catch{return}else r=t.body;S.debug("Intercepted fetch request of:",n),r?.query.includes("cartCreate")&&(t.body=await this.updatedBody(r),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],n=await fe.getCartAttributes();return e.variables.input.attributes=[...t,...n],JSON.stringify(e)}sendBuyNowEvent(){let e=Oe.get().getCurrentItem();if(!e)return;let t=new Pe(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ue.getInstance().sendEvent(t)}},Ec=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,n=new Pe(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ue.getInstance().sendEvent(n),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>S.error(e))}async listen(){this.elements=await fe.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},ah=class Mf extends Ec{static selectors=[".product__thumbnail-list-inner > button","product-gallery-navigation > button",".product-media--thumb-container",".product-images-inner > img",".m-product-media",".swiper-button-control",".media__thumb",".slick-arrow",".productView-img-container.product-single__media",".product-gallery__thumbnail_item_inner"];constructor(){super(Mf.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Mf),this.INSTANCE}},ch=class Ov extends Ec{static selectors=[".jdgm-widget.jdgm-preview-badge.jdgm-preview-badge--with-link.jdgm--done-setup","reviewsio-product-ratings",".ruk_rating_snippet.tracked:not(.hidden)","a > .loox-rating",".yotpo-reviews-star-ratings-widget",".yotpo.lp-hero__reviews",".pr-rating > a",".rivyoReviewWidget"];constructor(){super(Ov.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Ov),this.INSTANCE}},lh=class{selector=[".gokwik-checkout button","button.cart__checkout-button","button.cart__checkout","button#checkout","button#checkout2",'button[id*="checkout" i]','button[name*="checkout" i]','button[class*="checkout" i]'].join(",");listen(){fe.onDocumentLoaded(()=>{S.debug("Execution order:","document ready"),this.useLocationHash()})}useLocationHash(){let e=window.location.hash?.substring(1);if(e)if(e.includes(k.HASH_INITIATE_CHECKOUT)){document.dispatchEvent(new Event(k.THIRD_PARTY_CHECKOUT_EVENT));let t=document.querySelector(this.selector);if(!t){S.debug("No clickable cart checkout button found");return}S.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Kt.get().open()}},uh=class{trackSilently(){this.track().catch(e=>Ct.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let n={};this.processSmallCheckout(e,n),this.processBigCheckout(t,n);let r=this.getTokenFromCurrentURLPath();if(r&&(n.urlToken=r),!Object.keys(n).length){S.warn("No processable data found in",e,t);return}n.referrer=document.referrer,n.url=location.href;let i=await Ve.get(yn).checkSessionAndGetContext();n.sessionID=i[0],this.trackOrder(n)}processSmallCheckout(e,t){e&&(e.order_id&&(t.orderID=e.order_id.toString()),e.token&&(t.checkoutToken=e.token.toString()),e.customer_id&&(t.customerID=e.customer_id.toString()))}processBigCheckout(e,t){e&&(e.token&&!t.checkoutToken&&(t.checkoutToken=e.token.toString()),e.cartToken&&(t.cartToken=e.cartToken.toString()))}trackOrder(e){S.info("Found order to be send",e),Ue.getInstance().trackOrder(e)}getTokenFromCurrentURLPath(){let e=new RegExp("[A-Fa-f0-9]{28,32}");return location.pathname?.split("/").find(t=>t.length&&e.test(t))}},ru=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await Ye.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},n=new Pe(k.EVENT_CHECKOUT_STARTED,t);Ue.getInstance().sendEvent(n)})}},dh=class{async migrate(){}};mn.escape=px.MustacheUtils.escapeHtml;var wt=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new dh().migrate(),this.autoAuthenticate(),new Yp().meddle(),new Kp().listen(),new uh().trackSilently(),new To().listen(),new oh().listen(),new sh().listen(),new lh().listen(),Ve.get(vc).listen(),Ve.get(ch).listenSilently(),Ve.get(ah).listenSilently(),Ve.get(Wr).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),Cr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||xa(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,xa(this.globalRef,"config",new Pt),xa(this.globalRef,"runtimeData",new Oe),S.debug("Global reference initialised")}static injectWidgetAssets(){Sn.injectScriptURL(Rn.widgetURL,"cooee-widget-sdk"),Sn.injectStylesheet(Rn.styleURL)}static autoAuthenticate(){let e=Tt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),n=e.shopifyShop;if((fe.isNull(t)||t.length!==24)&&fe.isNull(n)){S.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,Ve.get(yn).init(e)}static sendEvent(e,t,n){for(let i in t)if(i.length>3&&i.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");let r=new Pe(e,t,n?.triggerData);n?.occurred&&(r.occurred=n.occurred),Ve.get(Ue).sendEvent(r)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");Ve.get(Ue).updateProfile(e)}static setPageName(e){if(!e)return;let t=Oe.get(),n=t.pageName;if(e===n)return;if(t.pageName=e,e==="cart"&&Ve.get(Wr).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){Ve.get(vc).resetScrollID();return}let r={};n&&(r.ps=n);let i=new Pe(k.EVENT_SCREEN_VIEW,r);i.occurred=t.jsLoadTime,Ve.get(Ue).sendEvent(i),Ve.get(vc).resetScrollID(i.occurred)}static previewPopup(e,t){new _c(t).render(e)}static previewWidget(e){new Zn(new sr(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){S.error(e)}window.addEventListener("message",e=>{if(S.debug("Received event",e),!e.origin.includes("letscooee.com")&&!e.origin.includes("localhost"))return;let t=e.data;typeof t=="object"&&(t.action==="POPUP_PREVIEW"?(this.previewPopup(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)):t.action==="WIDGET_PREVIEW"&&(this.previewWidget(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)))})}}static attachGoKwikListeners(){let e=Oe.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:n}=t.detail;n&&this.updateProfile({goKwikToken:n})}),window.gokwikSdk?ru.attachCheckoutListener():window.addEventListener("gokwikLoaded",ru.attachCheckoutListener)}static storePreviewParams(){let e=Oe.get(),t=new URLSearchParams(location.search),n=t.get("cooee-preview");n&&(e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)));let r=t.get("cooee-variant");r&&(e.previewVariant=r)}},fh=class KS{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new KS),this.INSTANCE}init(){kl.get(we.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){S.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let n=this.updateGlobalConfig(t);kl.set(we.APP_CONFIG,n).catch(r=>S.error(r)),lp.processConfiguration(),n.website&&(Sn.injectRawScript(n.website.commonJS),Sn.injectRawCSS(n.website.commonCSS)),Kt.get().onToggle().subscribe(async({open:r})=>{S.info("Cart drawer is now",r?"open":"closed"),r&&(Ve.get(Wr).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let n=wt.globalRef.config.update(t);return Kt.forceUpdate(),S.debug("App configurations",n),n}async trackViewCartEvent(){let t=await Ye.getCurrent().getNormalisedCart(),n={value:t.amount,currency:t.currency},r={items:t.items,amount:n,drawer:!0};Ue.getInstance().sendEvent(new Pe(k.EVENT_VIEW_CART,r))}},hx=Fe(L_()),ph=class O_{static META_REQUIRED_FIELDS=["ad_id"];static GOOGLE_REQUIRED_FIELDS=["gad_source","gclid"];source;adID;campaignID;adName;campaignName;constructor(t){this.adID=t.adID,this.campaignID=t.campaignID,this.source=t.source}static getAdParams(){let t;try{t=new hx.URLBuilder(location.href)}catch{return{}}let n={};if(this.META_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new O_(n);if(this.GOOGLE_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"GOOGLE"},new O_(n)}},Ms=class JS{static INSTANCE;httpAPIService=Mn.getInstance();coreService=fh.getInstance();sentryService=Ct.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new JS),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await ft.set(we.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await ft.set(we.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await ft.set(we.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),S.log("Validating session with server");let n=await this.getSessionValidateData(t);try{let r=await this.httpAPIService.validateSession(n);S.log("Validating session Response",r),await this.coreService.processAppConfigurations(r.appSettings),await this.storeAndPopulateAuthData(r)}catch(r){throw S.error(r),r}}async populateUserDataFromStorage(){if(this.sdkToken=await ft.get(we.SDK_TOKEN),!this.sdkToken){S.warn("No SDK token found in local storage");return}this.userID=await ft.get(we.ID),this.deviceID=await ft.get(we.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){S.debug("SDK Token:",this.sdkToken),S.log("Device ID:",this.deviceID),S.log("User ID:",this.userID),Ya.trackDeviceID(this.deviceID),Cr.prepend(`Device ID: <strong>${this.deviceID}</strong>`),this.httpAPIService.setAPIToken(this.sdkToken),this.sentryService.setGlobalContext("Visitor Info",{device_id:this.deviceID,user_id:this.userID}),this.sentryService.setUser({id:this.deviceID})}async getSessionValidateData(t){let n=await new ap().get();n.host=location.origin;try{(await CT())?.isPrivate&&(n.private=!0)}catch(i){mx.default.error("Unable to detect private/incognito window",i)}let r=await ft.get(we.DEVICE_ID);return r||(r=new on().toHexString(),await ft.set(we.DEVICE_ID,r)),re(w({deviceID:r,deviceProps:n,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:vi.parseFromCurrent(),ad:ph.getAdParams(),occurred:this.getSessionStartTime(Oe.get().jsLoadTime),currentItem:Oe.get().getCurrentItem(),cart:await Ye.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await ft.get(we.FIRST_SEEN),n=t?new Date(t):new Date;t||await ft.set(we.FIRST_SEEN,n.toISOString()),this.httpAPIService.setFirstSeen(n),this.sentryService.setGlobalContext("Visitor Info",{first_seen:n.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},yn=class Cc{static replaySubject=new Mo(1);static INSTANCE;sentryService=Ve.get(Ct);lock=new qa;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Cc),this.INSTANCE}init(t){if(S.debug("Initialising SDK",t),wT(navigator.userAgent)){S.info("This seems to be a bot. Disabling SDK");return}Ms.getInstance().init(t),Cc.INSTANCE.checkForNewSession(!0).then(async()=>{Cc.replaySubject.next(!0),Cc.replaySubject.complete()}).catch(n=>S.error("Unable to perform device init",n))}getCurrentSessionID(){return pn.set(we.SESSION_LAST_USED_TIME,new Date().getTime()),pn.get(we.ID,"")}async checkSessionAndGetContext(){return await this.checkForNewSession(),this.getContext()}async getContext(){let t=await Promise.all([this.getCurrentSessionID(),this.getCurrentSessionNumber(),this.getLandingPage()]);return this.sentryService.setGlobalContext("Visitor Session",{id:t[0],number:t[1],landing_page:t[2]}),t}async checkForNewSession(t){await this.lock.acquire();let n=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,n=!0):await this.notSynced()&&(n=!0),t){let r=await this.getContext();await Ms.getInstance().validateSession({sessionID:r[0],sessionNumber:r[1],landingPage:r[2],newSession:n}),await pn.set(we.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){S.debug("Starting new session"),await pn.clear(),S.debug("Cleared SessionStorage before starting new session");let t=new Date,n=new on().toHexString();S.debug("New session ID to be used",n);let r=await ft.get(we.SESSION_NUMBER,0)+1;Cr.prepend(`New Session ID: <strong>${n}</strong> & number: ${r}`),await Promise.all([ft.set(we.SESSION_NUMBER,r),pn.set(we.ID,n),pn.set(we.SESSION_LAST_USED_TIME,t.getTime()),pn.set(we.SESSION_LANDING_PAGE,vi.parseFromCurrent())])}getLandingPage(){return pn.get(we.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return ft.get(we.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await pn.get(we.ID))return!0;let t=await pn.get(we.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await pn.get(we.SESSION_SYNCED,!1)}},yx=Fe(er()),gx=Fe(er()),vx=Fe(va()),hh=class{triggerData;safeHttpService=Ue.getInstance();render(e){e.contentSource===gx.EngagementContentSource.KLAVIYO&&(this.triggerData=e,window.addEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",e.klaviyoFormID]))}handleKlaviyoEvents(e){if(e.type!=="klaviyoForms")return;let t=e.detail;if(t.formId!==this.triggerData.klaviyoFormID){S.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new Pe(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let n=this.getFormDetails(t);this.safeHttpService.sendEvent(new Pe(k.EVENT_FORM_SUBMITTED,{form:n},this.triggerData)),this.safeHttpService.updateProfile(n);break}case"close":window.removeEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),this.safeHttpService.sendEvent(new Pe(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},n=e.metaData;if(vx.JSUtils.hasKeys(n)){let r=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(n).forEach(o=>{r.includes(o)||(t[o]=n[o])}),t.email=n.$email??n.email,t.mobile=n.$phone_number??n.phone_number;let i=n.$first_name??n.first_name,s=n.$last_name??n.last_name;(i?.length||s?.length)&&(t.name=i+" "+s)}return t}},mh=class{static trackIntent(e){if(!this.isInstalled()){S.log("Facebook pixel not installed");return}if(!Pt.get().pixelPush){S.log("Facebook pixel push not enabled");return}let t=Cs[e.intent]?.toLowerCase(),n=e.segmentName;!t&&!n||(S.debug(`Sending ${t} intent and ${n} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},gh=class XS{static INSTANCE;httpService=Ve.get(Mn);sentryService=Ve.get(Ct);sessionManager=Ve.get(yn);runtime=Oe.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new XS),this.INSTANCE}sendSilently(t){this.send(t).catch(n=>S.error(`Failed to send ${t.name}`,n))}async send(t){if(S.debug(`Sending event ${t.name}`),Cr.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){S.warn(`Rejecting event ${t.name}`);return}await Promise.all([this.addSessionContext(t),this.addShopifyContext(t)]),this.addShopifyAttributes(),t.name!==k.EVENT_APP_BACKGROUND&&this.runtime.setActive(),t.currentItem=this.runtime.getCurrentItem(),t.locale=this.runtime.locale,this.httpService.post("/v1/event/track",t).then(async n=>{S.log("\u2705 Event tracked:",t.name),Cr.prepend(`\u2705 Event <strong>${n.eventName}</strong> tracked`),this.processEventResponse(t,n)}).catch(n=>{S.error(`Error sending event ${t.name} to server`,n)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(S.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let n=await this.sessionManager.checkSessionAndGetContext();t.sessionID=n[0],t.sessionNumber=n[1],t.landingPage=n[2],t.page=vi.parseFromCurrent()}async addShopifyContext(t){if(Tt.isShopify())try{t.cart=await Ye.getCurrent().getNormalisedCart()}catch(n){S.error("Error fetching Shopify cart before sending the event",n)}}processEventResponse(t,n){this.renderWidgetIfAny(t,n).catch(r=>{S.error("Failed to display a campaign",r,t,n),this.sentryService.captureException(r,{event:t,response:n})}),this.utiliseIntentIfCalculated(n)}async renderWidgetIfAny(t,n){if(!n.triggerData){S.log(`Nothing to engage after ${t.name}`);return}S.log(`\u{1F4E3} Engagement(id=${n.triggerData.shortID}) will be shown`,n.triggerData);let r=new sr(n.triggerData);r.occurred=t.occurred;let i;try{i=await fc.refreshItems(r)}catch(s){S.error("Failed to refresh the products",s);return}if(r.items=i,r.contentSource===yx.EngagementContentSource.KLAVIYO){new hh().render(r);return}new _c().renderEngagement(r).catch(s=>{S.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:r})})}utiliseIntentIfCalculated(t){t.intent&&(Ya.trackIntent(t.intent),mh.trackIntent(t),Cr.prepend(`Intent is <strong>${Cs[t.intent]}</strong>`))}addShopifyAttributes(){Tt.isShopify()&&Ye.getCurrent().addCooeeAttributes().catch(t=>{S.error("Fail to add attributes in cart",t)})}},Ue=class ZS{static INSTANCE;httpApiService=Mn.getInstance();eventAPIService=gh.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new ZS),this.INSTANCE}sendEvent(t){S.debug(`Waiting for auth to send event ${t.name}`),yn.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){yn.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){yn.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){yn.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},So=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Ue.getInstance();async execute(e){let t=Oe.get().getCurrentItem(),n=e.clickAction||this.element?.clc;if(!n)return;let r=e.item,i=this.triggerContext,s=new To,o=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!n?.applyDiscount,l={selectedVariants:i.triggerData.nonMutableItems.map(b=>({itemMID:b.mID,mID:b.selectedOrFirstVariant.value.mID})),eID:i.triggerData.engagementID,cID:i.triggerData.contentID},c="",h=[],d=[];if(r?d=[r.toEmbed()]:e.embeddedItem&&(d=[e.embeddedItem]),n.at===108){let b=i.selectedItems;if(d=e.embeddedItems??b.map(I=>I.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let I;e.embeddedItems?I=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):I=b.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let A=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&A&&I.push({itemMID:A.mID,mID:A.selectedOrFirstVariant.value.mID,isPrimary:!0}),l.selectedVariants=I,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(F=>{F.mID===t.vID&&(F.isPrimary=!0)})}else l=void 0;h=e.embeddedItems??b}else if(n.at===107){let b=await Ye.getCurrent().getNormalisedCart();d=b.items,l.selectedVariants=b.items.map(I=>({itemMID:I.mID,mID:I.vID}))}else if(n.at===102)h=r?[r]:[e.embeddedItem];else if(n.at===101)c=r?Tt.getRootPrefix()+"products/"+r.slug:e.embeddedItem?.link;else if(n.at===4){let b=fe.isValidURL(n.gu?.u);b&&(c=b.href)}else if(n.at===109){let b=await s.upgradeToSubscription(r,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),Kt.get().refreshUI(b)}if(this.sendTriggerClicked(d,{from:"button"},e.video),S.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),S.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){Ex.default.error("Unable to get a discount code",b);return}}if(f&&n.at===103)await s.performCopyCoupon(f);else if(n.at===110){let b=await s.performCartCreate(t,f,i.triggerData);b&&(location.href=b);return}try{f&&await Io.applyWithStorefront(f)}catch(b){S.error(b),g=!0}let m;if(h?.length&&(m=await s.performAddToCart(h,i.triggerData)),g&&f){Io.navigate(f,o,c);return}if(c){location.href=c;return}Io.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,n){let r=k.EVENT_TRIGGER_CLICKED,i=new Pe(r,t,this.triggerContext.triggerData);i.items=e,n?.id&&(i.videos=[n.id]),this.safeHTTP.sendEvent(i)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let n="";if(t.type===_x.DiscountType.STATIC){if(!t.code)throw Ct.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(n=await this.generateDiscount(e),!n)throw S.error("No discount code found",e),new Error("Discount code not found or generated");return n}}async generateDiscount(e){try{return(await this.safeHTTP.generateDiscount(e))?.code}catch(t){throw fe.showSnackbar("Failed to generate a discount code"),S.error("Error generating discount code",t,e),Ct.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Xi=class{static getBestSources(e){if(!e)return[];let t=[],n=e.filter(i=>i.format==="mp4").sort((i,s)=>s.width-i.width)[0];n&&t.push(n);let r=e.filter(i=>i.format==="m3u8").sort((i,s)=>s.width-i.width)[0];return r&&t.push(r),t}static async performCTA(e,t){let n={applyDiscount:!0};t.cta===xo.ClickActionType.ADD_TO_CART?n={at:xo.ClickActionType.ADD_TO_CART,applyDiscount:!0}:t.cta===xo.ClickActionType.GO_TO_PRODUCT?n={at:xo.ClickActionType.GO_TO_PRODUCT,applyDiscount:!0}:t.cta===xo.ClickActionType.OPEN_CART&&(e.triggerData.redirectBehaviour=xo.RedirectBehaviour.CART_DRAWER),await new So(e).execute({clickAction:n,embeddedItem:new fn(t.item)})}},nU=["videoPlayers"],wc=class P_{videoPlayers;videos=[];currentIndex=0;muted=!0;videoProgress=[];selectedItem=null;triggerContext;VideoUtils=Xi;engagementTrigger;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}pauseAll(){this.videoPlayers.forEach(t=>t.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(n=>n.nativeElement.muted=this.muted);let t=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await ft.set(we.MUTED,this.muted)}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await ft.get(we.MUTED,!0),t.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)this.moveToNextVideo();else{let t=this.videoPlayers.last;if(t){let n=this.getPreviousVideoDataForEvent(),r=[k.EVENT_LAST_VIDEO_ENDED,{previous:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),t.nativeElement.currentTime=0,t.nativeElement.play()}}}updateProgress(t,n){let r=t.target;this.videoProgress[n]=r.currentTime/r.duration*100}onSlideChange(t){let n=this.getPreviousVideoDataForEvent();t(),this.playActiveVideo(),this.selectedItem=null;let r=this.currentVideoProps(),i={previous:n,current:r},s=[k.EVENT_VIDEO_CHANGE,i,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(t,n){let r=[k.EVENT_MORE_ITEM_INFO_CLICKED,{item:t,video:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),this.selectedItem=t}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),n=this.videoPlayers.find(i=>i.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;t.playedTillMS=Math.ceil(n?.currentTime*1e3);let r=n?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/r).toFixed(4),t}static \u0275fac=function(t){return new(t||P_)};static \u0275cmp=at({type:P_,selectors:[["cooee-base-video"]],viewQuery:function(t,n){if(t&1&&Jo(nU,5),t&2){let r;Qo(r=es())&&(n.videoPlayers=r)}},decls:0,vars:0,template:function(t,n){},encapsulation:2})},rU=["swiperContainer"],iU=e=>({"swiper-hide-slide":e}),wx=(e,t)=>t.url;function oU(e,t){if(e&1&&Re(0,"source",15),e&2){let n=t.$implicit;bn("type",n.mimeType),Fr("media","(max-width: ",n.width,"px)"),be("src",n.url,zt)}}function sU(e,t){if(e&1&&Re(0,"source",16),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,zt)}}function aU(e,t){if(e&1){let n=dn();K(0,"video",14,1),Qe("timeupdate",function(r){ze(n);let i=q().$index,s=q();return qe(s.updateProgress(r,i))})("click",function(){ze(n);let r=q().$index,i=q();return qe(i.currentIndex===r&&i.toggleMute())})("ended",function(){ze(n);let r=q(2);return qe(r.onVideoEnded())}),Mt(2,oU,1,4,"source",15,wx),Mt(4,sU,1,2,"source",16,wx),X()}if(e&2){let n=q(),r=n.$implicit,i=n.$index,s=q();be("autoplay",s.currentIndex===i)("muted",s.muted),fo("data-video-id",r.id),Y(2),Ot(r.sources),Y(2),Ot(s.VideoUtils.getBestSources(r.sources))}}function cU(e,t){if(e&1){let n=dn();K(0,"div",18)(1,"cooee-product-modal",19),Qe("performCTA",function(r){ze(n);let i=q(2).$implicit,s=q();return qe(s.performClickToAction(r,i))})("closeModel",function(){ze(n);let r=q(3);return qe(r.selectedItem=null)}),X()()}if(e&2){let n=q(3);Y(),be("item",n.selectedItem)}}function lU(e,t){if(e&1){let n=dn();K(0,"div",20)(1,"cooee-mute-toggle",21),Qe("buttonClicked",function(){ze(n);let r=q(3);return qe(r.toggleMute())}),X()(),K(2,"cooee-product-card",22),Qe("performCTA",function(r){ze(n);let i=q(2).$implicit,s=q();return qe(s.performClickToAction(r,i))})("clicked",function(r){ze(n);let i=q(2).$implicit,s=q();return qe(s.productCardClicked(r,i))}),X()}if(e&2){let n=q(2).$implicit,r=q();Y(),be("muted",r.muted),Y(),be("items",n.items)}}function uU(e,t){if(e&1&&(Re(0,"cooee-video-progress-bar",17),At(1,cU,2,1,"div",18)(2,lU,3,2)),e&2){let n=q().$index,r=q();be("width",r.videoProgress[n]||0),Y(),Vt(r.selectedItem?1:2)}}function dU(e,t){if(e&1&&(Br(0),K(1,"div",5),At(2,aU,6,3,"video",13)(3,uU,3,2),X()),e&2){let n=t.$index,r=q(),i=r.currentIndex===n||r.currentIndex-1===n||r.currentIndex+1===n;Y(),be("ngClass",pa(3,iU,!i)),Y(),Vt(i?2:-1),Y(),Vt(r.currentIndex===n?3:-1)}}var vh=class A_ extends wc{constructor(t){super(),this.cdr=t}videos=[];currentIndex=0;closeDialog=new We;performCTA=new We;swiperContainerRef;swiperInstance;ngAfterViewInit(){let t=this.swiperContainerRef.nativeElement.getRootNode();Sn.injectStylesheet(Rn.styleURL,t),Sn.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",t),this.loadSwiperScript().then(()=>{this.initSwiper(),this.afterSwiperInit(),this.playActiveVideo()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(t=this.videos[this.currentIndex],n=this.currentIndex){this.closeDialog.emit({lastVideo:t,lastVideoIndex:n})}performClickToAction(t,n){this.performCTA.emit({cta:t.cta,item:t.item,video:n})}getCurrentVideoElement(){return this.videoPlayers.get(Math.min(this.currentIndex,1))?.nativeElement}updateProgress(t,n){super.updateProgress(t,n),this.cdr.detectChanges()}async toggleMute(){await super.toggleMute(),this.cdr.detectChanges()}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}loadSwiperScript(){return new Promise(t=>{let n="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(i=>i.src.includes(n))){t();return}let r=document.createElement("script");r.src=n,r.onload=()=>t(),document.body.appendChild(r)})}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{effect:"coverflow",slidesPerView:3,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:150,modifier:2,slideShadows:!0},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-size","50px"),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-color","white")}afterSwiperInit(){this.swiperInstance.on("slideChange",t=>{this.onSlideChange(()=>{this.currentIndex=t.realIndex,this.cdr.detectChanges()})})}static \u0275fac=function(t){return new(t||A_)(bt(Vr))};static \u0275cmp=at({type:A_,selectors:[["cooee-video-swiper"]],viewQuery:function(t,n){if(t&1&&Jo(rU,5),t&2){let r;Qo(r=es())&&(n.swiperContainerRef=r.first)}},inputs:{videos:"videos",currentIndex:"currentIndex",triggerContext:"triggerContext"},outputs:{closeDialog:"closeDialog",performCTA:"performCTA"},features:[ri],decls:13,vars:0,consts:[["swiperContainer",""],["videoPlayers",""],[1,"lc:relative","lc:w-screen","lc:h-screen","lc:bg-black/70","lc:flex","lc:justify-center","lc:items-center"],[1,"swiper-container","lc:w-[70vw]","lc:h-[80vh]"],[1,"swiper-wrapper"],[1,"swiper-slide","lc:relative","lc:flex","lc:items-center",3,"ngClass"],[1,"swiper-button-prev","lc:text-white"],[1,"swiper-button-next","lc:text-white"],[1,"lc:absolute","lc:top-10","lc:right-20","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button","tabindex","{0}",1,"lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["xmlns","http://www.w3.org/2000/svg","height","40px","viewBox","0 0 24 24","width","40px","fill","#FFFFFF"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"autoplay","muted"],[1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"timeupdate","click","ended","autoplay","muted"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"performCTA","closeModel","item"],[1,"lc:absolute","lc:top-4","lc:right-4","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"performCTA","clicked","items"]],template:function(t,n){if(t&1){let r=dn();K(0,"div",2)(1,"div",3,0)(3,"div",4),Mt(4,dU,4,5,"div",5,Lr),X(),Re(6,"div",6)(7,"div",7),X(),K(8,"div",8)(9,"div",9),Qe("click",function(){return ze(r),qe(n.close())})("keydown",function(){return ze(r),qe(n.close())}),Gn(),K(10,"svg",10),Re(11,"path",11)(12,"path",12),X()()()()}t&2&&(Y(4),Ot(n.videos))},dependencies:[ja,$a,Wa,Ga,Hd],styles:[`.swiper-hide-slide{visibility:hidden!important}
|
|
79
|
+
`],encapsulation:3})},yh=class H_{constructor(t,n){this.dialogRef=t,this.data=n}static \u0275fac=function(t){return new(t||H_)(bt(Gi),bt(Al))};static \u0275cmp=at({type:H_,selectors:[["cooee-desktop-video-carousel"]],decls:1,vars:3,consts:[[3,"closeDialog","performCTA","videos","currentIndex","triggerContext"]],template:function(t,n){t&1&&(K(0,"cooee-video-swiper",0),Qe("closeDialog",function(r){return n.dialogRef.close(r)})("performCTA",function(r){return n.data.onCTAPerformed(r)}),X()),t&2&&be("videos",n.data.videos)("currentIndex",n.data.currentIndex)("triggerContext",n.data.triggerContext)},dependencies:[vh],encapsulation:2})},Qx=Fe(U_()),fU=e=>({transform:e}),bx=(e,t)=>t.url;function pU(e,t){if(e&1&&Re(0,"source",5),e&2){let n=t.$implicit;bn("type",n.mimeType),Fr("media","(max-width: ",n.width,"px)"),be("src",n.url,zt)}}function hU(e,t){if(e&1&&Re(0,"source",6),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,zt)}}function mU(e,t){if(e&1){let n=dn();K(0,"div",15)(1,"cooee-product-modal",17),Qe("performCTA",function(r){ze(n);let i=q(2);return qe(i.data.onCTAPerformed(r))})("closeModel",function(){ze(n);let r=q(2);return qe(r.selectedItem=null)}),X()()}if(e&2){let n=q(2);Y(),be("item",n.selectedItem)}}function gU(e,t){if(e&1){let n=dn();K(0,"cooee-product-card",18),Qe("performCTA",function(r){ze(n);let i=q(2);return qe(i.data.onCTAPerformed(r))})("clicked",function(r){ze(n);let i=q().$implicit,s=q();return qe(s.productCardClicked(r,i))}),X()}if(e&2){let n=q().$implicit;be("items",n.items)}}function vU(e,t){if(e&1){let n=dn();K(0,"div",3)(1,"video",4,0),Qe("timeupdate",function(r){let i=ze(n).$index,s=q();return qe(s.updateProgress(r,i))})("click",function(){let r=ze(n).$index,i=q();return qe(i.currentIndex===r&&i.toggleMute())})("ended",function(){ze(n);let r=q();return qe(r.onVideoEnded())}),Mt(3,pU,1,4,"source",5,bx),Mt(5,hU,1,2,"source",6,bx),X(),K(7,"div",7)(8,"button",8),Qe("click",function(){let r=ze(n),i=r.$implicit,s=r.$index,o=q();return qe(o.close(i,s))}),Gn(),K(9,"svg",9),Re(10,"path",10)(11,"path",11),X()()(),Fi(),K(12,"div",12)(13,"cooee-mute-toggle",13),Qe("buttonClicked",function(){ze(n);let r=q();return qe(r.toggleMute())}),X()(),Re(14,"cooee-video-progress-bar",14),At(15,mU,2,1,"div",15)(16,gU,1,1,"cooee-product-card",16),X()}if(e&2){let n=t.$implicit,r=t.$index,i=q();Y(),be("muted",i.muted)("height","100%"),fo("data-video-id",n.id),Y(2),Ot(n.sources),Y(2),Ot(i.VideoUtils.getBestSources(n.sources)),Y(8),be("muted",i.muted),Y(),be("width",i.videoProgress[r]||0),Y(),Vt(i.selectedItem?15:16)}}var _h=class OE extends wc{constructor(t,n){super(),this.dialogRef=t,this.data=n,this.videos=n.videos,this.currentIndex=n.currentIndex,this.triggerContext=n.triggerContext}touchStartY=null;touchThreshold=50;onTouchStart(t){t.stopPropagation(),this.touchStartY=t.touches[0].clientY}onTouchEnd(t){if(t.stopPropagation(),this.touchStartY===null)return;let n=t.changedTouches[0].clientY,r=this.touchStartY-n;Math.abs(r)>this.touchThreshold&&this.onSlideChange(()=>{r>0?this.next():this.prev()}),this.touchStartY=null}ngAfterViewInit(){this.playActiveVideo()}next(){this.videos.length>0&&(this.currentIndex=(this.currentIndex+1)%this.videos.length)}prev(){this.videos.length>0&&(this.currentIndex=(this.currentIndex-1+this.videos.length)%this.videos.length)}getCurrentVideoElement(){return this.videoPlayers.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.onSlideChange(()=>{this.next()})}close(t,n){let r={lastVideo:t,lastVideoIndex:n};this.dialogRef.close(r)}static \u0275fac=function(t){return new(t||OE)(bt(Gi),bt(Al))};static \u0275cmp=at({type:OE,selectors:[["cooee-video-scroller"]],hostBindings:function(t,n){t&1&&Qe("touchstart",function(r){return n.onTouchStart(r)})("touchend",function(r){return n.onTouchEnd(r)})},features:[ri],decls:4,vars:3,consts:[["videoPlayers",""],[1,"lc:relative","lc:w-full","lc:h-screen","lc:overflow-hidden"],[1,"lc:flex","lc:md:flex-row","lc:flex-col","lc:w-full","lc:h-full","lc:transition-transform","lc:duration-1000","lc:ease-in-out",3,"ngStyle"],[1,"lc:w-full","lc:h-full","lc:flex-shrink-0","lc:relative"],["autoplay","",1,"lc:w-full","lc:h-full","lc:object-cover",3,"timeupdate","click","ended","muted","height"],[3,"src","type","media"],[3,"src","type"],[1,"lc:absolute","lc:top-4","lc:right-2","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button",1,"lc:bg-black/50","lc:rounded-full","lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:border-none",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:absolute","lc:top-4","lc:right-16","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"items"],[3,"performCTA","closeModel","item"],[3,"performCTA","clicked","items"]],template:function(t,n){t&1&&(K(0,"div",1)(1,"div",2),Mt(2,vU,17,6,"div",3,Lr),X()()),t&2&&(Y(),be("ngStyle",pa(1,fU,"translateY(-"+n.currentIndex*100+"vh)")),Y(),Ot(n.videos))},dependencies:[aS,ja,$a,Wa,Ga],styles:["[_nghost-%COMP%]{display:block}"]})},au=Fe(Rx());function Wx(e){let t=e.cloneNode(!0),n=t.querySelectorAll("[id]"),r=e.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return r==="canvas"?Mx(e,t):(r==="input"||r==="select"||r==="textarea")&&Ax(e,t),Nx("canvas",e,t,Mx),Nx("input, textarea, select",e,t,Ax),t}function Nx(e,t,n,r){let i=t.querySelectorAll(e);if(i.length){let s=n.querySelectorAll(e);for(let o=0;o<i.length;o++)r(i[o],s[o])}}var _U=0;function Ax(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${_U++}`)}function Mx(e,t){let n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch{}}function NE(e){let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function DE(e,t,n){let{top:r,bottom:i,left:s,right:o}=e;return n>=r&&n<=i&&t>=s&&t<=o}function su(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function Ox(e,t,n,r){let{top:i,right:s,bottom:o,left:a,width:l,height:c}=e,h=l*t,d=c*t;return r>i-d&&r<o+d&&n>a-h&&n<s+h}var Sh=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:NE(t)})})}handleScroll(e){let t=zn(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,i,s;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,s=l.left}else i=t.scrollTop,s=t.scrollLeft;let o=r.top-i,a=r.left-s;return this.positions.forEach((l,c)=>{l.clientRect&&t!==c&&t.contains(c)&&su(l.clientRect,o,a)}),r.top=i,r.left=s,{top:o,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Gx(e,t){let n=e.rootNodes;if(n.length===1&&n[0].nodeType===t.ELEMENT_NODE)return n[0];let r=t.createElement("div");return n.forEach(i=>r.appendChild(i)),r}function AE(e,t,n){for(let r in t)if(t.hasOwnProperty(r)){let i=t[r];i?e.setProperty(r,i,n?.has(r)?"important":""):e.removeProperty(r)}return e}function bc(e,t){let n=t?"":"none";AE(e.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function Px(e,t,n){AE(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},n)}function Dh(e,t){return t&&t!="none"?e+" "+t:e}function kx(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=Ih(t.left,t.top)}function Ih(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Lx(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function EU(e){let t=getComputedStyle(e),n=CE(t,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),s=CE(t,"transition-duration"),o=CE(t,"transition-delay");return Lx(s[i])+Lx(o[i])}function CE(e,t){return e.getPropertyValue(t).split(",").map(n=>n.trim())}var wU=new Set(["position"]),IE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,n,r,i,s,o,a,l,c){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=i,this._previewClass=s,this._pickupPositionOnPage=o,this._initialTransform=a,this._zIndex=l,this._renderer=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Fx(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return EU(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,n=e?e.template:null,r;if(n&&e){let i=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),r=Gx(s,this._document),this._previewEmbeddedView=s,e.matchSize?kx(r,i):r.style.transform=Ih(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=Wx(this._rootElement),kx(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return AE(r.style,{"pointer-events":"none",margin:Fx(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},wU),bc(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(i=>r.classList.add(i)):r.classList.add(t)),r}};function Fx(e){return"showPopover"in e}var bU={passive:!0},Bx={passive:!1},CU={passive:!1,capture:!0},SU=800,Vx=new Set(["position"]),TE=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Bi(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new ie;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=mt.EMPTY;_pointerUpSubscription=mt.EMPTY;_scrollSubscription=mt.EMPTY;_resizeSubscription=mt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>bc(t,e)))}_disabled=!1;beforeStarted=new ie;started=new ie;released=new ie;ended=new ie;entered=new ie;exited=new ie;dropped=new ie;moved=this._moveEvents;data;constrainPosition;constructor(e,t,n,r,i,s,o){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=s,this._renderer=o,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new Sh(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>Yn(n)),this._handles.forEach(n=>bc(n,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=Yn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Cn(this._renderer,t,"mousedown",this._pointerDown,Bx),Cn(this._renderer,t,"touchstart",this._pointerDown,bU),Cn(this._renderer,t,"dragstart",this._nativeDragStart,Bx)]),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Yn(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),bc(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),bc(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let r=Math.abs(t.x-this._pickupPositionOnPage.x),i=Math.abs(t.y-this._pickupPositionOnPage.y);if(r+i>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),o=this._dropContainer;if(!s){this._endDragSequence(e);return}(!o||!o.isDragging()&&!o.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let n=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,t);else{let r=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=n.x-r.x+this._passiveTransform.x,i.y=n.y-r.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:e,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){iu(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Cn(this._renderer,t,"selectstart",DU,CU)}),n){let r=this._rootElement,i=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,r),this._initialTransform=r.style.transform||"",this._preview=new IE(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(i,t)),Px(r,!1,Vx),this._document.body.appendChild(i.replaceChild(s,r)),this.started.next({source:this,event:e}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let n=this.isDragging(),r=iu(t),i=!r&&t.button!==0,s=this._rootElement,o=zn(t),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+SU>Date.now(),l=r?Yf(t):qf(t);if(o&&o.draggable&&t.type==="mousedown"&&t.preventDefault(),n||i||a||l)return;if(this._handles.length){let d=s.style;this._rootElementTapHighlight=d.webkitTapHighlightColor||"",d.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(d=>this._updateOnScroll(d)),this._boundaryElement&&(this._boundaryRect=NE(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){Px(this._rootElement,!0,Vx),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),i=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:i,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:i,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,s,i,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:r}){let i=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,e,t,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=o=>{(!o||this._preview&&zn(o)===this._preview.element&&o.propertyName==="transform")&&(s(),n(),clearTimeout(i))},i=setTimeout(r,t*1.5),s=this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=Gx(this._placeholderRef,this._document)):n=Wx(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t,n){let r=t===this._rootElement?null:t,i=r?r.getBoundingClientRect():e,s=iu(n)?n.targetTouches[0]:n,o=this._getViewportScrollPosition(),a=s.pageX-i.left-o.left,l=s.pageY-i.top-o.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=iu(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=n.pageX-t.left,i=n.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let o=this._ownerSVGElement.createSVGPoint();return o.x=r,o.y=i,o.matrixTransform(s.inverse())}}return{x:r,y:i}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,o=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),c=o.top+s,h=o.bottom-(l-s),d=o.left+i,f=o.right-(a-i);n=Ux(n,d,f),r=Ux(r,c,h)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-i.x),o=Math.abs(n-i.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>i.x?1:-1,i.x=t),o>this._config.pointerDirectionChangeThreshold&&(r.y=n>i.y?1:-1,i.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,bc(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let n=1/this.scale,r=Ih(e*n,t*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Dh(r,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=Ih(e,t);this._preview.setTransform(Dh(r,n))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let i=r.left-n.left,s=n.right-r.right,o=r.top-n.top,a=n.bottom-r.bottom;r.width>n.width?(i>0&&(e+=i),s>0&&(e-=s)):e=0,r.height>n.height?(o>0&&(t+=o),a>0&&(t-=a)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:iu(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=zn(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&su(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Va(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Yn(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function Ux(e,t,n){return Math.max(t,Math.min(n,e))}function iu(e){return e.type[0]==="t"}function DU(e){e.preventDefault()}function zx(e,t,n){let r=Hx(t,e.length-1),i=Hx(n,e.length-1);if(r===i)return;let s=e[r],o=i<r?-1:1;for(let a=r;a!==i;a+=o)e[a]=e[a+o];e[i]=s}function Hx(e,t){return Math.max(0,Math.min(t,e))}var Th=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,n,r){let i=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,n,r);if(s===-1&&i.length>0)return null;let o=this.orientation==="horizontal",a=i.findIndex(b=>b.drag===e),l=i[s],c=i[a].clientRect,h=l.clientRect,d=a>s?1:-1,f=this._getItemOffsetPx(c,h,d),g=this._getSiblingOffsetPx(a,i,d),m=i.slice();return zx(i,a,s),i.forEach((b,I)=>{if(m[I]===b)return;let A=b.drag===e,F=A?f:g,V=A?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=F;let M=Math.round(b.offset*(1/b.drag.scale));o?(V.style.transform=Dh(`translate3d(${M}px, 0, 0)`,b.initialTransform),su(b.clientRect,0,F)):(V.style.transform=Dh(`translate3d(0, ${M}px, 0)`,b.initialTransform),su(b.clientRect,F,0))}),this._previousSwap.overlaps=DE(h,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?r.x:r.y,{previousIndex:a,currentIndex:s}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,s=this._activeDraggables,o=s.indexOf(e),a=e.getPlaceholderElement(),l=s[i];if(l===e&&(l=s[i+1]),!l&&(i==null||i===-1||i<s.length-1)&&this._shouldEnterAsFirstChild(t,n)&&(l=s[0]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){let c=l.getRootElement();c.parentElement.insertBefore(a,c),s.splice(i,0,e)}else this._element.appendChild(a),s.push(e);a.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let n=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:n})=>{su(n,e,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:NE(n)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=r?t.left-e.left:t.top-e.top;return n===-1&&(i+=r?t.width-e.width:t.height-e.height),i}_getSiblingOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=t[e].clientRect,s=t[e+n*-1],o=i[r?"width":"height"]*n;if(s){let a=r?"left":"top",l=r?"right":"bottom";n===-1?o-=s.clientRect[a]-i[l]:o+=i[a]-s.clientRect[l]}return o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let i=n[n.length-1].clientRect;return r?e>=i.right:t>=i.bottom}else{let i=n[0].clientRect;return r?e<=i.left:t<=i.top}}_getItemIndexFromPointerPosition(e,t,n,r){let i=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:o,clientRect:a})=>{if(o===e)return!1;if(r){let l=i?r.x:r.y;if(o===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?t>=Math.floor(a.left)&&t<Math.floor(a.right):n>=Math.floor(a.top)&&n<Math.floor(a.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},xE=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let n=0;n<t.length;n++){let r=t[n];this._relatedNodes.push([r,r.nextSibling])}this.withItems(e)}sort(e,t,n,r){let i=this._getItemIndexFromPointerPosition(e,t,n),s=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let o=this._activeItems[i];if(s.drag===o&&s.overlaps&&s.deltaX===r.x&&s.deltaY===r.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),c=o.getRootElement();i>a?c.after(l):c.before(l),zx(this._activeItems,a,i);let h=this._getRootNode().elementFromPoint(t,n);return s.deltaX=r.x,s.deltaY=r.y,s.drag=o,s.overlaps=c===h||c.contains(h),{previousIndex:a,currentIndex:i}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r;i===-1&&(i=this._getClosestItemIndexToPointer(e,t,n));let s=this._activeItems[i],o=this._activeItems.indexOf(e);o>-1&&this._activeItems.splice(o,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(i,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,i]=this._relatedNodes[n];r.parentNode===e&&r.nextSibling!==i&&(i===null?e.appendChild(r):i.parentNode===e&&e.insertBefore(r,i))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,n){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),i=r?this._activeItems.findIndex(s=>{let o=s.getRootElement();return r===o||o.contains(r)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=Va(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,i=-1;for(let s=0;s<this._activeItems.length;s++){let o=this._activeItems[s];if(o!==e){let{x:a,y:l}=o.getRootElement().getBoundingClientRect(),c=Math.hypot(t-a,n-l);c<r&&(r=c,i=s)}}return i}},jx=.05,qx=.05,Ir=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(Ir||{}),Hn=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(Hn||{}),RE=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new ie;entered=new ie;exited=new ie;dropped=new ie;sorted=new ie;receivingStarted=new ie;receivingStopped=new ie;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=mt.EMPTY;_verticalScrollDirection=Ir.NONE;_horizontalScrollDirection=Hn.NONE;_scrollNode;_stopScrollTimers=new ie;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,n,r,i){this._dragDropRegistry=t,this._ngZone=r,this._viewportRuler=i;let s=this.element=Yn(e);this._document=n,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new Sh(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,r,i,s,o,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:i,distance:s,dropPoint:o,event:a})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(n=>n.isDragging()).every(n=>e.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof Th&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new xE(this._document,this._dragDropRegistry);else{let t=new Th(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=Yn(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,r){if(this.sortingDisabled||!this._domRect||!Ox(this._domRect,jx,t,n))return;let i=this._sortStrategy.sort(e,t,n,r);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,r=Ir.NONE,i=Hn.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||n||Ox(s.clientRect,jx,e,t)&&([r,i]=IU(o,s.clientRect,this._direction,e,t),(r||i)&&(n=o))}),!r&&!i){let{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};r=Yx(a,t),i=Kx(a,e),n=window}n&&(r!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=i,this._scrollNode=n,(r||i)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),Xh(0,bu).pipe(Gr(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===Ir.UP?e.scrollBy(0,-t):this._verticalScrollDirection===Ir.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===Hn.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===Hn.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&DE(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(r=>r._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._domRect||!DE(this._domRect,t,n)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let n=this._activeSiblings;!n.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=Va(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function Yx(e,t){let{top:n,bottom:r,height:i}=e,s=i*qx;return t>=n-s&&t<=n+s?Ir.UP:t>=r-s&&t<=r+s?Ir.DOWN:Ir.NONE}function Kx(e,t){let{left:n,right:r,width:i}=e,s=i*qx;return t>=n-s&&t<=n+s?Hn.LEFT:t>=r-s&&t<=r+s?Hn.RIGHT:Hn.NONE}function IU(e,t,n,r,i){let s=Yx(t,i),o=Kx(t,r),a=Ir.NONE,l=Hn.NONE;if(s){let c=e.scrollTop;s===Ir.UP?c>0&&(a=Ir.UP):e.scrollHeight-c>e.clientHeight&&(a=Ir.DOWN)}if(o){let c=e.scrollLeft;n==="rtl"?o===Hn.RIGHT?c<0&&(l=Hn.RIGHT):e.scrollWidth+c>e.clientWidth&&(l=Hn.LEFT):o===Hn.LEFT?c>0&&(l=Hn.LEFT):e.scrollWidth-c>e.clientWidth&&(l=Hn.RIGHT)}return[a,l]}var ou={capture:!0},SE={passive:!1,capture:!0},TU=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=at({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,r){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
|
|
80
|
+
`],encapsulation:2,changeDetection:0})}return e})(),Zx=(()=>{class e{_ngZone=O(Be);_document=O(nt);_styleLoader=O(_s);_renderer=O(ln).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Bi([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new ie;pointerUp=new ie;scroll=new ie;constructor(){}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=Cn(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,SE)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(TU),this._activeDragInstances.update(i=>[...i,n]),this._activeDragInstances().length===1)){let i=r.type.startsWith("touch"),s=a=>this.pointerUp.next(a),o=[["scroll",a=>this.scroll.next(a),ou],["selectstart",this._preventDefaultWhileDragging,SE]];i?o.push(["touchend",s,ou],["touchcancel",s,ou]):o.push(["mouseup",s,ou]),i||o.push(["mousemove",a=>this.pointerMove.next(a),SE]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>Cn(this._renderer,this._document,a,l,c))})}}stopDragging(n){this._activeDragInstances.update(r=>{let i=r.indexOf(n);return i>-1?(r.splice(i,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new ot(i=>this._ngZone.runOutsideAngular(()=>{let s=Cn(this._renderer,n,"scroll",o=>{this._activeDragInstances().length&&i.next(o)},ou);return()=>{s()}}))),no(...r)}registerDirectiveNode(n,r){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,r)}removeDirectiveNode(n){this._domNodesToDirectives?.delete(n)}getDragDirectiveForNode(n){return this._domNodesToDirectives?.get(n)||null}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=n=>{this._activeDragInstances().length>0&&n.preventDefault()};_persistentTouchmoveListener=n=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&n.preventDefault(),this.pointerMove.next(n))};_clearGlobalListeners(){this._globalListeners?.forEach(n=>n()),this._globalListeners=void 0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xU={dragStartThreshold:5,pointerDirectionChangeThreshold:5},RU=(()=>{class e{_document=O(nt);_ngZone=O(Be);_viewportRuler=O(Rl);_dragDropRegistry=O(Zx);_renderer=O(ln).createRenderer(null,null);constructor(){}createDrag(n,r=xU){return new TE(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new RE(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=oe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),$x=new he("CDK_DRAG_PARENT"),NU=new he("CdkDragHandle"),AU=new he("CDK_DRAG_CONFIG"),MU=new he("CdkDropList"),Xx=(()=>{class e{element=O(Nt);dropContainer=O(MU,{optional:!0,skipSelf:!0});_ngZone=O(Be);_viewContainerRef=O(ni);_dir=O(Es,{optional:!0});_changeDetectorRef=O(Vr);_selfHandle=O(NU,{optional:!0,self:!0});_parentDrag=O($x,{optional:!0,skipSelf:!0});_dragDropRegistry=O(Zx);_destroyed=new ie;_handles=new xr([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new We;released=new We;ended=new We;entered=new We;exited=new We;dropped=new We;moved=new ot(n=>{let r=this._dragRef.moved.pipe(ur(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=O(yt);constructor(){let n=this.dropContainer,r=O(AU,{optional:!0}),i=O(RU);this._dragRef=i.createDrag(this.element,{dragStartThreshold:r&&r.dragStartThreshold!=null?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&r.pointerDirectionChangeThreshold!=null?r.pointerDirectionChangeThreshold:5,zIndex:r?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),r&&this._assignDefaults(r),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(Gr(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){Qr(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,i=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),i=r.indexOf(n);i>-1&&(r.splice(i,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):Yn(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,i=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.scale=this.scale,n.dragStartDelay=typeof i=="object"&&i?i:p_(i),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(Jh(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){let i=this._dragDropRegistry.getDragDirectiveForNode(r);if(i){n.withParent(i._dragRef);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:i,constrainPosition:s,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:h}=n;this.disabled=l??!1,this.dragStartDelay=i||0,r&&(this.lockAxis=r),s&&(this.constrainPosition=s),o&&(this.previewClass=o),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(em(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),qs(n=>no(...n.map(r=>r._stateChanges.pipe(Ti(r))))),Gr(this._destroyed)).subscribe(n=>{let r=this._dragRef,i=n.element.nativeElement;n.disabled?r.disableHandle(i):r.enableHandle(i)})}static \u0275fac=function(n){return new(n||e)};static \u0275dir=kr({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&ii("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",ha],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",hv]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Fd([{provide:$x,useExisting:e}]),ca]})}return e})(),OU=e=>({"lc:cursor-grab":e}),Jx=(e,t)=>t.url;function PU(e,t){if(e&1&&Re(0,"source",9),e&2){let n=t.$implicit;bn("type",n.mimeType),Fr("media","(max-width: ",n.width,"px)"),be("src",n.url,zt)}}function kU(e,t){if(e&1&&Re(0,"source",10),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,zt)}}var xh=class kE{constructor(t){this.elementRef=t}video;closeClicked=new We;videoClicked=new We;isDragging=!1;VideoUtils=Xi;ngOnInit(){let t=this.elementRef.nativeElement.parentElement.parentElement;t.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(t){return new(t||kE)(bt(Nt))};static \u0275cmp=at({type:kE,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:13,vars:5,consts:[["cdkDrag","",1,"lc:shadow-2xl","lc:fixed","lc:right-10","lc:bottom-10","lc:rounded-lg","lc:max-w-[100px]","lc:flex","lc:justify-center","lc:items-center",3,"cdkDragMoved","ngClass","cdkDragBoundary"],["id","lc-close-button",1,"lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:absolute"],["xmlns","http://www.w3.org/2000/svg","height","80px","viewBox","0 0 24 24","width","80px","fill","#FFFFFF"],["d","M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"],["autoplay","","loop","",1,"lc:rounded-lg","lc:w-full",3,"click","muted"],[3,"src","type","media"],[3,"src","type"]],template:function(t,n){t&1&&(K(0,"div",0),Qe("cdkDragMoved",function(){return n.isDragging=!0}),K(1,"button",1),Qe("click",function(){return n.close()}),Gn(),K(2,"svg",2),Re(3,"path",3)(4,"path",4),X()(),Fi(),K(5,"button",5),Gn(),K(6,"svg",6),Re(7,"path",7),X()(),Fi(),K(8,"video",8),Qe("click",function(){return n.onVideoClick()}),Mt(9,PU,1,4,"source",9,Jx),Mt(11,kU,1,2,"source",10,Jx),X()()),t&2&&(be("ngClass",pa(3,OU,n.isDragging))("cdkDragBoundary","body"),Y(8),be("muted",!0),Y(),Ot(n.video.sources),Y(2),Ot(n.VideoUtils.getBestSources(n.video.sources)))},dependencies:[Hd,Xx],encapsulation:2})},Rh=(e,t)=>t.url;function LU(e,t){if(e&1&&(K(0,"div",0),$t(1),X()),e&2){q();let n=mr(1);Y(),hr(" ",n," ")}}function FU(e,t){if(e&1&&Re(0,"source",6),e&2){let n=t.$implicit;bn("type",n.mimeType),Fr("media","(max-width: ",n.width,"px)"),be("src",n.url,zt)}}function BU(e,t){if(e&1&&Re(0,"source",7),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,zt)}}function VU(e,t){if(e&1&&(K(0,"div",8)(1,"span",10),$t(2),X(),K(3,"span",11),$t(4),Jn(5,"cooeeCurrency"),X()()),e&2){q();let n=mr(0);Y(2),hr(" ",n.name," "),Y(2),hr(" ",gr(5,2,n.price)," ")}}function UU(e,t){if(e&1){let n=dn();K(0,"div",12),Qe("click",function(){ze(n);let r=q().$implicit,i=mr(0),s=q(2);return qe(s.addToCartClicked(r,i))})("keydown",function(){ze(n);let r=q().$implicit,i=mr(0),s=q(2);return qe(s.addToCartClicked(r,i))}),$t(1," Add to cart "),X()}}function HU(e,t){if(e&1){let n=dn();Br(0),K(1,"div",3)(2,"div",4),Qe("click",function(){let r=ze(n),i=r.$implicit,s=r.$index,o=mr(0),a=q(2);return qe(a.onClick(i,o,s))})("keydown",function(){let r=ze(n),i=r.$implicit,s=r.$index,o=mr(0),a=q(2);return qe(a.onClick(i,o,s))}),K(3,"video",5),Mt(4,FU,1,4,"source",6,Rh),Mt(6,BU,1,2,"source",7,Rh),X(),At(8,VU,6,4,"div",8),X(),At(9,UU,2,0,"div",9),X()}if(e&2){let n=t.$implicit,r=q(2),i=mr(4);ho(n.items==null?null:n.items[0]),Y(3),be("muted",!0),Y(),Ot(n.sources),Y(2),Ot(r.VideoUtils.getBestSources(n.sources)),Y(2),Vt(i?8:-1),Y(),Vt(i?9:-1)}}function jU(e,t){if(e&1&&(K(0,"div",1),Mt(1,HU,10,4,"div",3,Lr),X()),e&2){let n=q();Y(),Ot(n.videos)}}function $U(e,t){if(e&1&&Re(0,"source",6),e&2){let n=t.$implicit;bn("type",n.mimeType),Fr("media","(max-width: ",n.width,"px)"),be("src",n.url,zt)}}function WU(e,t){if(e&1&&Re(0,"source",7),e&2){let n=t.$implicit;bn("type",n.mimeType),be("src",n.url,zt)}}function GU(e,t){if(e&1){let n=dn();Br(0),K(1,"div",13),Gn(),K(2,"svg",14),Re(3,"circle",15)(4,"circle",16),X(),Fi(),K(5,"div",17)(6,"video",18),Qe("click",function(){let r=ze(n),i=r.$implicit,s=r.$index,o=mr(0),a=q(2);return qe(a.onClick(i,o,s))}),Mt(7,$U,1,4,"source",6,Rh),Mt(9,WU,1,2,"source",7,Rh),X()()()}if(e&2){let n=t.$implicit,r=q(2);ho(n.items==null?null:n.items[0]),Y(6),be("muted",!0),Y(),Ot(n.sources),Y(2),Ot(r.VideoUtils.getBestSources(n.sources))}}function zU(e,t){if(e&1&&(K(0,"div",2),Mt(1,GU,11,2,"div",13,Lr),X()),e&2){let n=q();Y(),Ot(n.videos)}}function qU(e,t){if(e&1){let n=dn();K(0,"cooee-draggable-video-popup",20),Qe("videoClicked",function(){ze(n),q();let r=mr(0),i=mr(1),s=mr(2),o=q();return qe(o.onPopupVideoClick(i,s,r))})("closeClicked",function(){ze(n);let r=q(2);return qe(r.onPopupVideoClosed())}),X()}if(e&2){let n=q(2);be("video",n.videos[0])}}function YU(e,t){if(e&1&&(Br(0)(1)(2),At(3,qU,1,1,"cooee-draggable-video-popup",19)),e&2){let n=q(),r=ho(0);Y();let i=ho(n.videos[r]);Y(),ho(i.items[0]),Y(),Vt(n.hidePopupVideo?-1:3)}}var Nh=class PE{constructor(t,n){this.dialog=t,this.cdr=n}sendEvent=new We;videos;VideoUtils=Xi;VideoConfigSource=yE;VideoConfigTemplate=_E;hidePopupVideo;_triggerContext=Bi(null);dialogRef=null;currentDialogData=null;get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this.videos=t.triggerData.content?.videoConfig?.videos}onResize(){!this.dialogRef||!this.currentDialogData||this.openDialog(this.currentDialogData.videos[0],this.currentDialogData.currentIndex,!0)}sendTriggerClicked(t,n){let r=new Pe(k.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);r.videos=[t.id],r.items=[n],this.sendEvent.emit(r)}onClick(t,n,r){this.sendTriggerClicked(t,n),this.openDialog(t,r)}performCTA(t){let n;if(t.cta===au.ClickActionType.ADD_TO_CART)n=k.EVENT_ADD_TO_CART_CLICKED;else if(t.cta===au.ClickActionType.GO_TO_PRODUCT)n=k.EVENT_VIEW_ITEM_CLICKED;else if(t.cta===au.ClickActionType.OPEN_CART)n=k.EVENT_OPEN_CART_CLICKED;else return;let r=new Pe(n,{},this.triggerContext?.triggerData);r.videos=[t.video.id],r.items=[t.item],this.sendEvent.emit(r),Xi.performCTA(this.triggerContext,t)}addToCartClicked(t,n){this.performCTA({cta:au.ClickActionType.ADD_TO_CART,item:n,video:t})}onPopupVideoClick(t,n,r){this.hidePopupVideo=!0,this.onClick(t,n,r),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let t=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3,n=new Pe(k.EVENT_TRIGGER_CLOSED,{duration:t},this.triggerContext?.triggerData);this.sendEvent.emit(n)}isMobile(){return new Qx.default().getDevice().type==="mobile"}openDialog(t,n,r=!1){let i=this.isMobile()?_h:yh,s={videos:this.videos,currentIndex:n,triggerContext:this.triggerContext,onCTAPerformed:o=>this.performCTA(o)};if(this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(i,{width:"100vw",height:"100vh",data:s}),this.currentDialogData=s,this.dialogRef&&!r){let o={videoID:t.id,videoIndex:n},a=new Pe(k.EVENT_VIDEO_DIALOG_OPENED,{current:o},this.triggerContext?.triggerData);a.videos=[t.id],this.sendEvent.emit(a)}this.dialogRef.closed.subscribe(o=>{if(!o)return;let a={videoID:o.lastVideo.id,videoIndex:o?.lastVideoIndex},l=new Pe(k.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[o.lastVideo.id],this.sendEvent.emit(l),this.dialogRef=null,this.currentDialogData=null})}static \u0275fac=function(t){return new(t||PE)(bt(vT),bt(Vr))};static \u0275cmp=at({type:PE,selectors:[["cooee-shoppable-videos"]],hostBindings:function(t,n){t&1&&Qe("resize",function(){return n.onResize()},!1,QC)},inputs:{triggerContext:"triggerContext"},outputs:{sendEvent:"sendEvent"},decls:9,vars:4,consts:[["id","lc-heading-text",1,"lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],["id","lc-video-swiper",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-10","lc:justify-center","lc:items-center"],["id","lc-video-stories",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-parent","lc:flex","lc:flex-col","lc:gap-1"],["id","lc-video","tabindex","{0}",1,"lc-video-card","lc:cursor-pointer","lc:rounded-lg","lc:min-w-[200px]",3,"click","keydown"],["width","100%","autoplay","","loop","",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"muted"],[3,"src","type","media"],[3,"src","type"],["id","lc-single-product",1,"lc:w-full","lc:flex","lc:flex-col","lc:gap-1","lc:text-sm","lc:mt-1","lc:mb-1"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-1"],["id","lc-item-price",1,"lc:font-medium"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1",3,"click","keydown"],["id","lc-video-story",1,"lc:relative","lc:w-20","lc:h-20","lc:cursor-pointer"],["viewBox","0 0 100 100",1,"lc:absolute","lc:top-0","lc:left-0","lc:w-full","lc:h-full"],["cx","50","cy","50","r","48","fill","none","stroke-width","4",1,"lc:stroke-gray-300"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6",1,"lc:stroke-blue-500","animate-progress"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["id","lc-video","autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover","lc:rounded-full",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(t,n){if(t&1&&(Br(0)(1),At(2,LU,2,1,"div",0),Br(3)(4)(5),At(6,jU,3,0,"div",1)(7,zU,3,0,"div",2)(8,YU,4,4)),t&2){let r=n.triggerContext==null||n.triggerContext.triggerData==null||n.triggerContext.triggerData.content==null?null:n.triggerContext.triggerData.content.videoConfig;Y();let i=ho(r==null?null:r.heading);Y(),Vt(i?2:-1);let s=r==null?null:r.source;Y(2),ho(s===n.VideoConfigSource.GALLERY);let o=r==null?null:r.template;Y(2),Vt(o===n.VideoConfigTemplate.SWIPER?6:o===n.VideoConfigTemplate.STORY?7:o===n.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[pi,xh],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.lc-video-card[_ngcontent-%COMP%] > video[_ngcontent-%COMP%]:hover{scale:1.1}.animate-progress[_ngcontent-%COMP%]{stroke-dasharray:100 241.6;stroke-dashoffset:0;transition:stroke-dashoffset .3s;transform-origin:50% 50%;animation:_ngcontent-%COMP%_snake-rotate 2.5s linear infinite}@keyframes _ngcontent-%COMP%_snake-rotate{to{transform:rotate(360deg)}}']})};S.configure("CooeeWidgetSDK");(async()=>{let e=await yS(wS),t=(n,r)=>{let i=J0(n,{injector:e.injector});customElements.define(r,i)};t(Ff,"cooee-progressbar"),t(Nh,"cooee-shoppable-videos")})();})();
|