@letscooee/web-sdk 9.8.3 → 9.9.1
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 +15 -15
- package/dist/widget.min.css +1 -1
- package/dist/widget.min.js +33 -65
- package/package.json +2 -2
package/dist/widget.min.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";(()=>{var sN=Object.create,au=Object.defineProperty,aN=Object.defineProperties,ZE=Object.getOwnPropertyDescriptor,cN=Object.getOwnPropertyDescriptors,lN=Object.getOwnPropertyNames,KE=Object.getOwnPropertySymbols,uN=Object.getPrototypeOf,XE=Object.prototype.hasOwnProperty,dN=Object.prototype.propertyIsEnumerable,Wh=(e,t,n)=>t in e?au(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||={})XE.call(t,n)&&Wh(e,n,t[n]);if(KE)for(var n of KE(t))dN.call(t,n)&&Wh(e,n,t[n]);return e},te=(e,t)=>aN(e,cN(t)),Rc=(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')}),$n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fN=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lN(t))!XE.call(e,i)&&i!==n&&au(e,i,{get:()=>t[i],enumerable:!(r=ZE(t,i))||r.enumerable});return e},Re=(e,t,n)=>(n=e!=null?sN(uN(e)):{},fN(t||!e||!e.__esModule?au(n,"default",{value:e,enumerable:!0}):n,e)),JE=(e,t,n,r)=>{for(var i=r>1?void 0:r?ZE(t,n):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&au(t,n,i),i},Gh=(e,t,n)=>Wh(e,typeof t!="symbol"?t+"":t,n),ds=$n((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 x=console.log,P;b.level===r.TIME?(P=(b.name?"["+b.name+"] ":"")+m[0],m[1]==="start"?console.time?console.time(P):f[P]=new Date().getTime():console.timeEnd?console.timeEnd(P):g(x,[P+": "+(new Date().getTime()-f[P])+"ms"])):(b.level===r.WARN&&console.warn?x=console.warn:b.level===r.ERROR&&console.error?x=console.error:b.level===r.INFO&&console.info?x=console.info:b.level===r.DEBUG&&console.debug?x=console.debug:b.level===r.TRACE&&console.trace&&(x=console.trace),d.formatter(m,b),g(x,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=$n(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(v){return v[v.ONCE_PER_USER=1]="ONCE_PER_USER",v[v.ONCE_PER_SESSION=2]="ONCE_PER_SESSION",v[v.EVERY_TIME=3]="EVERY_TIME",v}(t||(e.CriteriaFrequency=t={})),n=function(v){return v[v.ONE_TIME=1]="ONE_TIME",v[v.MULTIPLE=2]="MULTIPLE",v[v.RECURRING=3]="RECURRING",v}(n||(e.ScheduleFrequency=n={})),r=function(v){return v[v.NOW=1]="NOW",v[v.LATER=2]="LATER",v[v.NEVER=3]="NEVER",v}(r||(e.TimePreference=r={})),i=function(v){return v[v.PUBLISHED=1]="PUBLISHED",v[v.DRAFT=2]="DRAFT",v[v.PAUSED=3]="PAUSED",v[v.FAILED=4]="FAILED",v[v.STOPPED=5]="STOPPED",v[v.COMPLETED=6]="COMPLETED",v[v.ARCHIVED=7]="ARCHIVED",v[v.UNINSTALLED=8]="UNINSTALLED",v}(i||(e.EngagementStatus=i={})),s=function(v){return v.CAMPAIGN="CAMPAIGN",v.NATIVE_AB="NATIVE_AB",v.CRO_COPILOT="CRO_COPILOT",v}(s||(e.EngagementType=s={})),o=function(v){return v[v.NONE=0]="NONE",v[v.RULE_BASED=1]="RULE_BASED",v[v.INTENT_BASED=2]="INTENT_BASED",v}(o||(e.TriggerType=o={})),a=function(v){return v[v.SINGLE=1]="SINGLE",v[v.EXCLUSION=2]="EXCLUSION",v[v.ABTESTING=3]="ABTESTING",v}(a||(e.EngagementContentType=a={})),l=function(v){return v[v.ALL=0]="ALL",v[v.NEW_ONLY=1]="NEW_ONLY",v[v.RETURNING_ONLY=2]="RETURNING_ONLY",v}(l||(e.SessionType=l={})),c=function(v){return v[v.ALL=0]="ALL",v[v.LOGGED_IN_ONLY=3]="LOGGED_IN_ONLY",v[v.NON_LOGGED_IN_ONLY=4]="NON_LOGGED_IN_ONLY",v[v.PURCHASED=5]="PURCHASED",v[v.NON_PURCHASED=6]="NON_PURCHASED",v[v.ABANDON_CART=7]="ABANDON_CART",v[v.RETURNING_AND_NON_PURCHASED=8]="RETURNING_AND_NON_PURCHASED",v}(c||(e.VisitorType=c={})),h=function(v){return v.ALL="ALL",v.LOGGED_IN="LOGGED_IN",v.NON_LOGGED_IN="NON_LOGGED_IN",v}(h||(e.LoggedInVisitor=h={})),d=function(v){return v.ALL="ALL",v.PURCHASED="PURCHASED",v.NON_PURCHASED="NON_PURCHASED",v}(d||(e.PurchasedVisitor=d={})),f=function(v){return v[v.NONE=0]="NONE",v[v.ITEM_RECOMMENDATION=1]="ITEM_RECOMMENDATION",v[v.MULTIPLE_ITEMS=2]="MULTIPLE_ITEMS",v[v.SINGLE_ITEM=3]="SINGLE_ITEM",v[v.TOP_SELLING=4]="TOP_SELLING",v[v.STOCK_CLEARANCE=5]="STOCK_CLEARANCE",v[v.NEW_ARRIVALS=6]="NEW_ARRIVALS",v[v.RECENTLY_VIEWED=7]="RECENTLY_VIEWED",v[v.EVENT_ITEM=8]="EVENT_ITEM",v[v.CART_ITEM=9]="CART_ITEM",v[v.BUNDLE=10]="BUNDLE",v[v.CURRENT_ITEM=11]="CURRENT_ITEM",v[v.PURCHASED_PREVIOUSLY=12]="PURCHASED_PREVIOUSLY",v[v.COLLECTION_ITEMS=13]="COLLECTION_ITEMS",v[v.TRENDING_ITEMS=14]="TRENDING_ITEMS",v}(f||(e.EngagementItemSource=f={})),g=function(v){return v[v.LAST_ADDED=1]="LAST_ADDED",v[v.FIRST_ADDED=2]="FIRST_ADDED",v[v.HIGHEST_PRICE=3]="HIGHEST_PRICE",v[v.LOWEST_PRICE=4]="LOWEST_PRICE",v[v.FIRST_MATCHING_TAG=5]="FIRST_MATCHING_TAG",v[v.ALL=6]="ALL",v}(g||(e.CartItemSource=g={})),m=function(v){return v[v.ALL=0]="ALL",v[v.ONLY_ORGANIC=1]="ONLY_ORGANIC",v[v.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",v[v.INCLUDES=3]="INCLUDES",v[v.EXCLUDES=4]="EXCLUDES",v}(m||(e.UTMCriteria=m={})),b=function(v){return v[v.NONE=0]="NONE",v[v.LIKE=1]="LIKE",v[v.NOT_LIKE=2]="NOT_LIKE",v[v.EQUALS=3]="EQUALS",v[v.NOT_EQUALS=4]="NOT_EQUALS",v}(b||(e.URLCriteria=b={})),x=function(v){return v[v.NONE=0]="NONE",v[v.LESS_THAN=1]="LESS_THAN",v[v.GREATER_THAN=2]="GREATER_THAN",v[v.BETWEEN=3]="BETWEEN",v[v.EQUALS=4]="EQUALS",v}(x||(e.CartCriteria=x={})),P=function(v){return v[v.ALL=0]="ALL",v[v.INCLUDES=1]="INCLUDES",v[v.EXCLUDES=2]="EXCLUDES",v}(P||(e.CartCurrencyOperator=P={})),F=function(v){return v[v.NONE=0]="NONE",v[v.AMOUNT=1]="AMOUNT",v[v.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",v[v.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",v}(F||(e.CartFilterEnum=F={})),V=function(v){return v[v.NONE=0]="NONE",v[v.ITEM=1]="ITEM",v[v.COLLECTION=2]="COLLECTION",v}(V||(e.PromotionType=V={})),L=function(v){return v[v.NONE=0]="NONE",v[v.SINGLE=1]="SINGLE",v[v.MULTIPLE=2]="MULTIPLE",v}(L||(e.EngagementCollectionSource=L={})),q=function(v){return v.BEFORE="before",v.AFTER="after",v.INSIDE_FIRST="insideFirst",v.INSIDE_LAST="insideLast",v}(q||(e.EngagementPlacementPosition=q={})),Oe=function(v){return v.SHOPIFY_CHECKOUT="shopify_checkout",v.THIRD_PARTY_CHECKOUT="third_party_checkout",v.CART_PAGE="cart_page",v.CART_DRAWER="cart_drawer",v}(Oe||(e.RedirectBehaviour=Oe={})),ct=function(v){return v.ONCE_IN_SESSION="ONCE_IN_SESSION",v.ACROSS_SESSIONS="ACROSS_SESSIONS",v}(ct||(e.FrequencyType=ct={})),j=function(v){return v.DAYS="DAYS",v.HOURS="HOURS",v.MINUTES="MINUTES",v.SECONDS="SECONDS",v}(j||(e.FrequencyGapUnit=j={})),de=function(v){return v[v.NONE=0]="NONE",v[v.REJECT_POPUP=1]="REJECT_POPUP",v[v.ACCEPT_POPUP=2]="ACCEPT_POPUP",v[v.GO_TO_URL=4]="GO_TO_URL",v[v.SHARE=5]="SHARE",v[v.KEY_VALUE=100]="KEY_VALUE",v[v.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",v[v.ADD_TO_CART=102]="ADD_TO_CART",v[v.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",v[v.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",v[v.OPEN_CART=105]="OPEN_CART",v[v.SUBMIT_FORM=106]="SUBMIT_FORM",v[v.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",v[v.ADD_BUNDLE=108]="ADD_BUNDLE",v[v.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",v}(de||(e.ClickActionType=de={})),Q=function(v){return v.POPUP="POPUP",v.PAGE_EMBED="PAGE_EMBED",v.CART_EMBED="CART_EMBED",v.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",v}(Q||(e.OnsiteDeliveryType=Q={})),he=function(v){return v.PRODUCT_PROMOTION="PRODUCT_PROMOTION",v.BUNDLE_AND_UPSELL="BUNDLE_AND_UPSELL",v.CART_RECOVERY="CART_RECOVERY",v.ANNOUNCEMENT="ANNOUNCEMENT",v.LEAD_GENERATION="LEAD_GENERATION",v.DATA_COLLECTION="DATA_COLLECTION",v.SALE_PROMOTION="SALE_PROMOTION",v.SUBSCRIPTION_UPSELL="SUBSCRIPTION_UPSELL",v.SHOPPABLE_VIDEO="SHOPPABLE_VIDEO",v.BYOB="BYOB",v.PROGRESS_BAR="PROGRESS_BAR",v.BUY_NOW="BUY_NOW",v.EXPERIMENT="EXPERIMENT",v}(he||(e.EngagementObjective=he={})),Pe=function(v){return v.COOEE="COOEE",v.KLAVIYO="KLAVIYO",v}(Pe||(e.EngagementContentSource=Pe={})),ut=function(v){return v.ICONS="ICONS",v.TILES="TILES",v}(ut||(e.ProgressBarLayout=ut={})),lt=function(v){return v.FREE_SHIPPING="FREE_SHIPPING",v.DISCOUNT="DISCOUNT",v.FREE_AUTO_GIFT="FREE_AUTO_GIFT",v.FREE_GIFT_SELECT="FREE_GIFT_SELECT",v}(lt||(e.MilestoneRewardType=lt={}))}),Ta=$n(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)/)}),c0=$n((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 Rc=="function"&&Rc;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 x=a[f]={exports:{}};o[f][0].call(x.exports,function(P){var F=o[f][1][P];return c(F||P)},x,x.exports,s,o,a,l)}return a[f].exports}for(var h=typeof Rc=="function"&&Rc,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(P),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=P,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(){P(),V.onreadystatechange=null,V.parentNode.removeChild(V),V=null},l.document.documentElement.appendChild(V)}:h=function(){setTimeout(P,0)};var b,x=[];function P(){b=!0;for(var V,L,q=x.length;q;){for(L=x,x=[],V=-1;++V<q;)L[V]();q=x.length}b=!1}o.exports=F;function F(V){x.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,de){if(typeof j!="function"&&this.state===f||typeof de!="function"&&this.state===d)return this;var Q=new this.constructor(c);if(this.state!==g){var he=this.state===f?j:de;x(Q,he,this.outcome)}else this.queue.push(new b(Q,j,de));return Q};function b(j,de,Q){this.promise=j,typeof de=="function"&&(this.onFulfilled=de,this.callFulfilled=this.otherCallFulfilled),typeof Q=="function"&&(this.onRejected=Q,this.callRejected=this.otherCallRejected)}b.prototype.callFulfilled=function(j){h.resolve(this.promise,j)},b.prototype.otherCallFulfilled=function(j){x(this.promise,this.onFulfilled,j)},b.prototype.callRejected=function(j){h.reject(this.promise,j)},b.prototype.otherCallRejected=function(j){x(this.promise,this.onRejected,j)};function x(j,de,Q){l(function(){var he;try{he=de(Q)}catch(Pe){return h.reject(j,Pe)}he===j?h.reject(j,new TypeError("Cannot resolve promise with itself")):h.resolve(j,he)})}h.resolve=function(j,de){var Q=V(P,de);if(Q.status==="error")return h.reject(j,Q.value);var he=Q.value;if(he)F(j,he);else{j.state=f,j.outcome=de;for(var Pe=-1,ut=j.queue.length;++Pe<ut;)j.queue[Pe].callFulfilled(de)}return j},h.reject=function(j,de){j.state=d,j.outcome=de;for(var Q=-1,he=j.queue.length;++Q<he;)j.queue[Q].callRejected(de);return j};function P(j){var de=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof de=="function")return function(){de.apply(j,arguments)}}function F(j,de){var Q=!1;function he(v){Q||(Q=!0,h.reject(j,v))}function Pe(v){Q||(Q=!0,h.resolve(j,v))}function ut(){de(Pe,he)}var lt=V(ut);lt.status==="error"&&he(lt.value)}function V(j,de){var Q={};try{Q.value=j(de),Q.status="success"}catch(he){Q.status="error",Q.value=he}return Q}m.resolve=L;function L(j){return j instanceof this?j:h.resolve(new this(c),j)}m.reject=q;function q(j){var de=new this(c);return h.reject(de,j)}m.all=Oe;function Oe(j){var de=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=j.length,he=!1;if(!Q)return this.resolve([]);for(var Pe=new Array(Q),ut=0,lt=-1,v=new this(c);++lt<Q;)Ht(j[lt],lt);return v;function Ht(Xe,Yt){de.resolve(Xe).then(Se,function(D){he||(he=!0,h.reject(v,D))});function Se(D){Pe[Yt]=D,++ut===Q&&!he&&(he=!0,h.resolve(v,Pe))}}}m.race=ct;function ct(j){var de=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Q=j.length,he=!1;if(!Q)return this.resolve([]);for(var Pe=-1,ut=new this(c);++Pe<Q;)lt(j[Pe]);return ut;function lt(v){de.resolve(v).then(function(Ht){he||(he=!0,h.resolve(ut,Ht))},function(Ht){he||(he=!0,h.reject(ut,Ht))})}}},{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(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _};function c(_,E){if(!(_ 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 _=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(!_||E)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function g(_,E){_=_||[],E=E||{};try{return new Blob(_,E)}catch(N){if(N.name!=="TypeError")throw N;for(var S=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,R=new S,O=0;O<_.length;O+=1)R.append(_[O]);return R.getBlob(E.type)}}typeof Promise>"u"&&s(3);var m=Promise;function b(_,E){E&&_.then(function(S){E(null,S)},function(S){E(S)})}function x(_,E,S){typeof E=="function"&&_.then(E),typeof S=="function"&&_.catch(S)}function P(_){return typeof _!="string"&&(console.warn(_+" used as a key, but it is not a string."),_=String(_)),_}function F(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var V="local-forage-detect-blob-support",L=void 0,q={},Oe=Object.prototype.toString,ct="readonly",j="readwrite";function de(_){for(var E=_.length,S=new ArrayBuffer(E),R=new Uint8Array(S),O=0;O<E;O++)R[O]=_.charCodeAt(O);return S}function Q(_){return new m(function(E){var S=_.transaction(V,j),R=g([""]);S.objectStore(V).put(R,"key"),S.onabort=function(O){O.preventDefault(),O.stopPropagation(),E(!1)},S.oncomplete=function(){var O=navigator.userAgent.match(/Chrome\/(\d+)/),N=navigator.userAgent.match(/Edge\//);E(N||!O||parseInt(O[1],10)>=43)}}).catch(function(){return!1})}function he(_){return typeof L=="boolean"?m.resolve(L):Q(_).then(function(E){return L=E,L})}function Pe(_){var E=q[_.name],S={};S.promise=new m(function(R,O){S.resolve=R,S.reject=O}),E.deferredOperations.push(S),E.dbReady?E.dbReady=E.dbReady.then(function(){return S.promise}):E.dbReady=S.promise}function ut(_){var E=q[_.name],S=E.deferredOperations.pop();if(S)return S.resolve(),S.promise}function lt(_,E){var S=q[_.name],R=S.deferredOperations.pop();if(R)return R.reject(E),R.promise}function v(_,E){return new m(function(S,R){if(q[_.name]=q[_.name]||we(),_.db)if(E)Pe(_),_.db.close();else return S(_.db);var O=[_.name];E&&O.push(_.version);var N=d.open.apply(d,O);E&&(N.onupgradeneeded=function(U){var H=N.result;try{H.createObjectStore(_.storeName),U.oldVersion<=1&&H.createObjectStore(V)}catch(W){if(W.name==="ConstraintError")console.warn('The database "'+_.name+'" has been upgraded from version '+U.oldVersion+" to version "+U.newVersion+', but the storage "'+_.storeName+'" already exists.');else throw W}}),N.onerror=function(U){U.preventDefault(),R(N.error)},N.onsuccess=function(){var U=N.result;U.onversionchange=function(H){H.target.close()},S(U),ut(_)}})}function Ht(_){return v(_,!1)}function Xe(_){return v(_,!0)}function Yt(_,E){if(!_.db)return!0;var S=!_.db.objectStoreNames.contains(_.storeName),R=_.version<_.db.version,O=_.version>_.db.version;if(R&&(_.version!==E&&console.warn('The database "'+_.name+`" can't be downgraded from version `+_.db.version+" to version "+_.version+"."),_.version=_.db.version),O||S){if(S){var N=_.db.version+1;N>_.version&&(_.version=N)}return!0}return!1}function Se(_){return new m(function(E,S){var R=new FileReader;R.onerror=S,R.onloadend=function(O){var N=btoa(O.target.result||"");E({__local_forage_encoded_blob:!0,data:N,type:_.type})},R.readAsBinaryString(_)})}function D(_){var E=de(atob(_.data));return g([E],{type:_.type})}function T(_){return _&&_.__local_forage_encoded_blob}function Z(_){var E=this,S=E._initReady().then(function(){var R=q[E._dbInfo.name];if(R&&R.dbReady)return R.dbReady});return x(S,_,_),S}function ee(_){Pe(_);for(var E=q[_.name],S=E.forages,R=0;R<S.length;R++){var O=S[R];O._dbInfo.db&&(O._dbInfo.db.close(),O._dbInfo.db=null)}return _.db=null,Ht(_).then(function(N){return _.db=N,Yt(_)?Xe(_):N}).then(function(N){_.db=E.db=N;for(var U=0;U<S.length;U++)S[U]._dbInfo.db=N}).catch(function(N){throw lt(_,N),N})}function se(_,E,S,R){R===void 0&&(R=1);try{var O=_.db.transaction(_.storeName,E);S(null,O)}catch(N){if(R>0&&(!_.db||N.name==="InvalidStateError"||N.name==="NotFoundError"))return m.resolve().then(function(){if(!_.db||N.name==="NotFoundError"&&!_.db.objectStoreNames.contains(_.storeName)&&_.version<=_.db.version)return _.db&&(_.version=_.db.version+1),Xe(_)}).then(function(){return ee(_).then(function(){se(_,E,S,R-1)})}).catch(S);S(N)}}function we(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ve(_){var E=this,S={db:null};if(_)for(var R in _)S[R]=_[R];var O=q[S.name];O||(O=we(),q[S.name]=O),O.forages.push(E),E._initReady||(E._initReady=E.ready,E.ready=Z);var N=[];function U(){return m.resolve()}for(var H=0;H<O.forages.length;H++){var W=O.forages[H];W!==E&&N.push(W._initReady().catch(U))}var z=O.forages.slice(0);return m.all(N).then(function(){return S.db=O.db,Ht(S)}).then(function($){return S.db=$,Yt(S,E._defaultConfig.version)?Xe(S):$}).then(function($){S.db=O.db=$,E._dbInfo=S;for(var ae=0;ae<z.length;ae++){var qe=z[ae];qe!==E&&(qe._dbInfo.db=S.db,qe._dbInfo.version=S.version)}})}function ue(_,E){var S=this;_=P(_);var R=new m(function(O,N){S.ready().then(function(){se(S._dbInfo,ct,function(U,H){if(U)return N(U);try{var W=H.objectStore(S._dbInfo.storeName),z=W.get(_);z.onsuccess=function(){var $=z.result;$===void 0&&($=null),T($)&&($=D($)),O($)},z.onerror=function(){N(z.error)}}catch($){N($)}})}).catch(N)});return b(R,E),R}function Ce(_,E){var S=this,R=new m(function(O,N){S.ready().then(function(){se(S._dbInfo,ct,function(U,H){if(U)return N(U);try{var W=H.objectStore(S._dbInfo.storeName),z=W.openCursor(),$=1;z.onsuccess=function(){var ae=z.result;if(ae){var qe=ae.value;T(qe)&&(qe=D(qe));var St=_(qe,ae.key,$++);St!==void 0?O(St):ae.continue()}else O()},z.onerror=function(){N(z.error)}}catch(ae){N(ae)}})}).catch(N)});return b(R,E),R}function Ue(_,E,S){var R=this;_=P(_);var O=new m(function(N,U){var H;R.ready().then(function(){return H=R._dbInfo,Oe.call(E)==="[object Blob]"?he(H.db).then(function(W){return W?E:Se(E)}):E}).then(function(W){se(R._dbInfo,j,function(z,$){if(z)return U(z);try{var ae=$.objectStore(R._dbInfo.storeName);W===null&&(W=void 0);var qe=ae.put(W,_);$.oncomplete=function(){W===void 0&&(W=null),N(W)},$.onabort=$.onerror=function(){var St=qe.error?qe.error:qe.transaction.error;U(St)}}catch(St){U(St)}})}).catch(U)});return b(O,S),O}function Ot(_,E){var S=this;_=P(_);var R=new m(function(O,N){S.ready().then(function(){se(S._dbInfo,j,function(U,H){if(U)return N(U);try{var W=H.objectStore(S._dbInfo.storeName),z=W.delete(_);H.oncomplete=function(){O()},H.onerror=function(){N(z.error)},H.onabort=function(){var $=z.error?z.error:z.transaction.error;N($)}}catch($){N($)}})}).catch(N)});return b(R,E),R}function He(_){var E=this,S=new m(function(R,O){E.ready().then(function(){se(E._dbInfo,j,function(N,U){if(N)return O(N);try{var H=U.objectStore(E._dbInfo.storeName),W=H.clear();U.oncomplete=function(){R()},U.onabort=U.onerror=function(){var z=W.error?W.error:W.transaction.error;O(z)}}catch(z){O(z)}})}).catch(O)});return b(S,_),S}function Ye(_){var E=this,S=new m(function(R,O){E.ready().then(function(){se(E._dbInfo,ct,function(N,U){if(N)return O(N);try{var H=U.objectStore(E._dbInfo.storeName),W=H.count();W.onsuccess=function(){R(W.result)},W.onerror=function(){O(W.error)}}catch(z){O(z)}})}).catch(O)});return b(S,_),S}function Lt(_,E){var S=this,R=new m(function(O,N){if(_<0){O(null);return}S.ready().then(function(){se(S._dbInfo,ct,function(U,H){if(U)return N(U);try{var W=H.objectStore(S._dbInfo.storeName),z=!1,$=W.openKeyCursor();$.onsuccess=function(){var ae=$.result;if(!ae){O(null);return}_===0||z?O(ae.key):(z=!0,ae.advance(_))},$.onerror=function(){N($.error)}}catch(ae){N(ae)}})}).catch(N)});return b(R,E),R}function ke(_){var E=this,S=new m(function(R,O){E.ready().then(function(){se(E._dbInfo,ct,function(N,U){if(N)return O(N);try{var H=U.objectStore(E._dbInfo.storeName),W=H.openKeyCursor(),z=[];W.onsuccess=function(){var $=W.result;if(!$){R(z);return}z.push($.key),$.continue()},W.onerror=function(){O(W.error)}}catch($){O($)}})}).catch(O)});return b(S,_),S}function u(_,E){E=F.apply(this,arguments);var S=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||S.name,_.storeName=_.storeName||S.storeName);var R=this,O;if(!_.name)O=m.reject("Invalid arguments");else{var N=_.name===S.name&&R._dbInfo.db,U=N?m.resolve(R._dbInfo.db):Ht(_).then(function(H){var W=q[_.name],z=W.forages;W.db=H;for(var $=0;$<z.length;$++)z[$]._dbInfo.db=H;return H});_.storeName?O=U.then(function(H){if(H.objectStoreNames.contains(_.storeName)){var W=H.version+1;Pe(_);var z=q[_.name],$=z.forages;H.close();for(var ae=0;ae<$.length;ae++){var qe=$[ae];qe._dbInfo.db=null,qe._dbInfo.version=W}var St=new m(function(wt,rn){var Kt=d.open(_.name,W);Kt.onerror=function(dr){var Hh=Kt.result;Hh.close(),rn(dr)},Kt.onupgradeneeded=function(){var dr=Kt.result;dr.deleteObjectStore(_.storeName)},Kt.onsuccess=function(){var dr=Kt.result;dr.close(),wt(dr)}});return St.then(function(wt){z.db=wt;for(var rn=0;rn<$.length;rn++){var Kt=$[rn];Kt._dbInfo.db=wt,ut(Kt._dbInfo)}}).catch(function(wt){throw(lt(_,wt)||m.resolve()).catch(function(){}),wt})}}):O=U.then(function(H){Pe(_);var W=q[_.name],z=W.forages;H.close();for(var $=0;$<z.length;$++){var ae=z[$];ae._dbInfo.db=null}var qe=new m(function(St,wt){var rn=d.deleteDatabase(_.name);rn.onerror=function(){var Kt=rn.result;Kt&&Kt.close(),wt(rn.error)},rn.onblocked=function(){console.warn('dropInstance blocked for database "'+_.name+'" until all open connections are closed')},rn.onsuccess=function(){var Kt=rn.result;Kt&&Kt.close(),St(Kt)}});return qe.then(function(St){W.db=St;for(var wt=0;wt<z.length;wt++){var rn=z[wt];ut(rn._dbInfo)}}).catch(function(St){throw(lt(_,St)||m.resolve()).catch(function(){}),St})})}return b(O,E),O}var p={_driver:"asyncStorage",_initStorage:ve,_support:f(),iterate:Ce,getItem:ue,setItem:Ue,removeItem:Ot,clear:He,length:Ye,key:Lt,keys:ke,dropInstance:u};function y(){return typeof openDatabase=="function"}var I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A="~~local_forage_type~",B=/^~~local_forage_type~([^~]+)~/,K="__lfsc__:",et=K.length,ze="arbf",Ae="blob",dt="si08",Y="ui08",De="uic8",fe="si16",tt="si32",Cn="ur16",bn="ui32",at="fl32",ye="fl64",Pn=et+ze.length,to=Object.prototype.toString;function $a(_){var E=_.length*.75,S=_.length,R,O=0,N,U,H,W;_[_.length-1]==="="&&(E--,_[_.length-2]==="="&&E--);var z=new ArrayBuffer(E),$=new Uint8Array(z);for(R=0;R<S;R+=4)N=I.indexOf(_[R]),U=I.indexOf(_[R+1]),H=I.indexOf(_[R+2]),W=I.indexOf(_[R+3]),$[O++]=N<<2|U>>4,$[O++]=(U&15)<<4|H>>2,$[O++]=(H&3)<<6|W&63;return z}function Uh(_){var E=new Uint8Array(_),S="",R;for(R=0;R<E.length;R+=3)S+=I[E[R]>>2],S+=I[(E[R]&3)<<4|E[R+1]>>4],S+=I[(E[R+1]&15)<<2|E[R+2]>>6],S+=I[E[R+2]&63];return E.length%3===2?S=S.substring(0,S.length-1)+"=":E.length%3===1&&(S=S.substring(0,S.length-2)+"=="),S}function GD(_,E){var S="";if(_&&(S=to.call(_)),_&&(S==="[object ArrayBuffer]"||_.buffer&&to.call(_.buffer)==="[object ArrayBuffer]")){var R,O=K;_ instanceof ArrayBuffer?(R=_,O+=ze):(R=_.buffer,S==="[object Int8Array]"?O+=dt:S==="[object Uint8Array]"?O+=Y:S==="[object Uint8ClampedArray]"?O+=De:S==="[object Int16Array]"?O+=fe:S==="[object Uint16Array]"?O+=Cn:S==="[object Int32Array]"?O+=tt:S==="[object Uint32Array]"?O+=bn:S==="[object Float32Array]"?O+=at:S==="[object Float64Array]"?O+=ye:E(new Error("Failed to get type for BinaryArray"))),E(O+Uh(R))}else if(S==="[object Blob]"){var N=new FileReader;N.onload=function(){var U=A+_.type+"~"+Uh(this.result);E(K+Ae+U)},N.readAsArrayBuffer(_)}else try{E(JSON.stringify(_))}catch(U){console.error("Couldn't convert value into a JSON string: ",_),E(null,U)}}function zD(_){if(_.substring(0,et)!==K)return JSON.parse(_);var E=_.substring(Pn),S=_.substring(et,Pn),R;if(S===Ae&&B.test(E)){var O=E.match(B);R=O[1],E=E.substring(O[0].length)}var N=$a(E);switch(S){case ze:return N;case Ae:return g([N],{type:R});case dt:return new Int8Array(N);case Y:return new Uint8Array(N);case De:return new Uint8ClampedArray(N);case fe:return new Int16Array(N);case Cn:return new Uint16Array(N);case tt:return new Int32Array(N);case bn:return new Uint32Array(N);case at:return new Float32Array(N);case ye:return new Float64Array(N);default:throw new Error("Unkown type: "+S)}}var Vh={serialize:GD,deserialize:zD,stringToBuffer:$a,bufferToString:Uh};function r0(_,E,S,R){_.executeSql("CREATE TABLE IF NOT EXISTS "+E.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],S,R)}function WD(_){var E=this,S={db:null};if(_)for(var R in _)S[R]=typeof _[R]!="string"?_[R].toString():_[R];var O=new m(function(N,U){try{S.db=openDatabase(S.name,String(S.version),S.description,S.size)}catch(H){return U(H)}S.db.transaction(function(H){r0(H,S,function(){E._dbInfo=S,N()},function(W,z){U(z)})},U)});return S.serializer=Vh,O}function Ws(_,E,S,R,O,N){_.executeSql(S,R,O,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?N(W,H):r0(W,E,function(){W.executeSql(S,R,O,N)},N)},N):N(U,H)},N)}function qD(_,E){var S=this;_=P(_);var R=new m(function(O,N){S.ready().then(function(){var U=S._dbInfo;U.db.transaction(function(H){Ws(H,U,"SELECT * FROM "+U.storeName+" WHERE key = ? LIMIT 1",[_],function(W,z){var $=z.rows.length?z.rows.item(0).value:null;$&&($=U.serializer.deserialize($)),O($)},function(W,z){N(z)})})}).catch(N)});return b(R,E),R}function ZD(_,E){var S=this,R=new m(function(O,N){S.ready().then(function(){var U=S._dbInfo;U.db.transaction(function(H){Ws(H,U,"SELECT * FROM "+U.storeName,[],function(W,z){for(var $=z.rows,ae=$.length,qe=0;qe<ae;qe++){var St=$.item(qe),wt=St.value;if(wt&&(wt=U.serializer.deserialize(wt)),wt=_(wt,St.key,qe+1),wt!==void 0){O(wt);return}}O()},function(W,z){N(z)})})}).catch(N)});return b(R,E),R}function i0(_,E,S,R){var O=this;_=P(_);var N=new m(function(U,H){O.ready().then(function(){E===void 0&&(E=null);var W=E,z=O._dbInfo;z.serializer.serialize(E,function($,ae){ae?H(ae):z.db.transaction(function(qe){Ws(qe,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[_,$],function(){U(W)},function(St,wt){H(wt)})},function(qe){if(qe.code===qe.QUOTA_ERR){if(R>0){U(i0.apply(O,[_,W,S,R-1]));return}H(qe)}})})}).catch(H)});return b(N,S),N}function XD(_,E,S){return i0.apply(this,[_,E,S,1])}function JD(_,E){var S=this;_=P(_);var R=new m(function(O,N){S.ready().then(function(){var U=S._dbInfo;U.db.transaction(function(H){Ws(H,U,"DELETE FROM "+U.storeName+" WHERE key = ?",[_],function(){O()},function(W,z){N(z)})})}).catch(N)});return b(R,E),R}function KD(_){var E=this,S=new m(function(R,O){E.ready().then(function(){var N=E._dbInfo;N.db.transaction(function(U){Ws(U,N,"DELETE FROM "+N.storeName,[],function(){R()},function(H,W){O(W)})})}).catch(O)});return b(S,_),S}function YD(_){var E=this,S=new m(function(R,O){E.ready().then(function(){var N=E._dbInfo;N.db.transaction(function(U){Ws(U,N,"SELECT COUNT(key) as c FROM "+N.storeName,[],function(H,W){var z=W.rows.item(0).c;R(z)},function(H,W){O(W)})})}).catch(O)});return b(S,_),S}function QD(_,E){var S=this,R=new m(function(O,N){S.ready().then(function(){var U=S._dbInfo;U.db.transaction(function(H){Ws(H,U,"SELECT key FROM "+U.storeName+" WHERE id = ? LIMIT 1",[_+1],function(W,z){var $=z.rows.length?z.rows.item(0).key:null;O($)},function(W,z){N(z)})})}).catch(N)});return b(R,E),R}function Lk(_){var E=this,S=new m(function(R,O){E.ready().then(function(){var N=E._dbInfo;N.db.transaction(function(U){Ws(U,N,"SELECT key FROM "+N.storeName,[],function(H,W){for(var z=[],$=0;$<W.rows.length;$++)z.push(W.rows.item($).key);R(z)},function(H,W){O(W)})})}).catch(O)});return b(S,_),S}function Wk(_){return new m(function(E,S){_.transaction(function(R){R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(O,N){for(var U=[],H=0;H<N.rows.length;H++)U.push(N.rows.item(H).name);E({db:_,storeNames:U})},function(O,N){S(N)})},function(R){S(R)})})}function oR(_,E){E=F.apply(this,arguments);var S=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||S.name,_.storeName=_.storeName||S.storeName);var R=this,O;return _.name?O=new m(function(N){var U;_.name===S.name?U=R._dbInfo.db:U=openDatabase(_.name,"","",0),_.storeName?N({db:U,storeNames:[_.storeName]}):N(Wk(U))}).then(function(N){return new m(function(U,H){N.db.transaction(function(W){function z(St){return new m(function(wt,rn){W.executeSql("DROP TABLE IF EXISTS "+St,[],function(){wt()},function(Kt,dr){rn(dr)})})}for(var $=[],ae=0,qe=N.storeNames.length;ae<qe;ae++)$.push(z(N.storeNames[ae]));m.all($).then(function(){U()}).catch(function(St){H(St)})},function(W){H(W)})})}):O=m.reject("Invalid arguments"),b(O,E),O}var bR={_driver:"webSQLStorage",_initStorage:WD,_support:y(),iterate:ZD,getItem:qD,setItem:XD,removeItem:JD,clear:KD,length:YD,key:QD,keys:Lk,dropInstance:oR};function SR(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function s0(_,E){var S=_.name+"/";return _.storeName!==E.storeName&&(S+=_.storeName+"/"),S}function CR(){var _="_localforage_support_test";try{return localStorage.setItem(_,!0),localStorage.removeItem(_),!1}catch{return!0}}function xR(){return!CR()||localStorage.length>0}function IR(_){var E=this,S={};if(_)for(var R in _)S[R]=_[R];return S.keyPrefix=s0(_,E._defaultConfig),xR()?(E._dbInfo=S,S.serializer=Vh,m.resolve()):m.reject()}function TR(_){var E=this,S=E.ready().then(function(){for(var R=E._dbInfo.keyPrefix,O=localStorage.length-1;O>=0;O--){var N=localStorage.key(O);N.indexOf(R)===0&&localStorage.removeItem(N)}});return b(S,_),S}function DR(_,E){var S=this;_=P(_);var R=S.ready().then(function(){var O=S._dbInfo,N=localStorage.getItem(O.keyPrefix+_);return N&&(N=O.serializer.deserialize(N)),N});return b(R,E),R}function kR(_,E){var S=this,R=S.ready().then(function(){for(var O=S._dbInfo,N=O.keyPrefix,U=N.length,H=localStorage.length,W=1,z=0;z<H;z++){var $=localStorage.key(z);if($.indexOf(N)===0){var ae=localStorage.getItem($);if(ae&&(ae=O.serializer.deserialize(ae)),ae=_(ae,$.substring(U),W++),ae!==void 0)return ae}}});return b(R,E),R}function OR(_,E){var S=this,R=S.ready().then(function(){var O=S._dbInfo,N;try{N=localStorage.key(_)}catch{N=null}return N&&(N=N.substring(O.keyPrefix.length)),N});return b(R,E),R}function RR(_){var E=this,S=E.ready().then(function(){for(var R=E._dbInfo,O=localStorage.length,N=[],U=0;U<O;U++){var H=localStorage.key(U);H.indexOf(R.keyPrefix)===0&&N.push(H.substring(R.keyPrefix.length))}return N});return b(S,_),S}function NR(_){var E=this,S=E.keys().then(function(R){return R.length});return b(S,_),S}function PR(_,E){var S=this;_=P(_);var R=S.ready().then(function(){var O=S._dbInfo;localStorage.removeItem(O.keyPrefix+_)});return b(R,E),R}function AR(_,E,S){var R=this;_=P(_);var O=R.ready().then(function(){E===void 0&&(E=null);var N=E;return new m(function(U,H){var W=R._dbInfo;W.serializer.serialize(E,function(z,$){if($)H($);else try{localStorage.setItem(W.keyPrefix+_,z),U(N)}catch(ae){(ae.name==="QuotaExceededError"||ae.name==="NS_ERROR_DOM_QUOTA_REACHED")&&H(ae),H(ae)}})})});return b(O,S),O}function LR(_,E){if(E=F.apply(this,arguments),_=typeof _!="function"&&_||{},!_.name){var S=this.config();_.name=_.name||S.name,_.storeName=_.storeName||S.storeName}var R=this,O;return _.name?O=new m(function(N){_.storeName?N(s0(_,R._defaultConfig)):N(_.name+"/")}).then(function(N){for(var U=localStorage.length-1;U>=0;U--){var H=localStorage.key(U);H.indexOf(N)===0&&localStorage.removeItem(H)}}):O=m.reject("Invalid arguments"),b(O,E),O}var MR={_driver:"localStorageWrapper",_initStorage:IR,_support:SR(),iterate:kR,getItem:DR,setItem:AR,removeItem:PR,clear:TR,length:NR,key:OR,keys:RR,dropInstance:LR},UR=function(_,E){return _===E||typeof _=="number"&&typeof E=="number"&&isNaN(_)&&isNaN(E)},VR=function(_,E){for(var S=_.length,R=0;R<S;){if(UR(_[R],E))return!0;R++}return!1},o0=Array.isArray||function(_){return Object.prototype.toString.call(_)==="[object Array]"},Rl={},a0={},Eo={INDEXEDDB:p,WEBSQL:bR,LOCALSTORAGE:MR},BR=[Eo.INDEXEDDB._driver,Eo.WEBSQL._driver,Eo.LOCALSTORAGE._driver],Tc=["dropInstance"],Bh=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Tc),FR={description:"",driver:BR.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function jR(_,E){_[E]=function(){var S=arguments;return _.ready().then(function(){return _[E].apply(_,S)})}}function jh(){for(var _=1;_<arguments.length;_++){var E=arguments[_];if(E)for(var S in E)E.hasOwnProperty(S)&&(o0(E[S])?arguments[0][S]=E[S].slice():arguments[0][S]=E[S])}return arguments[0]}var HR=function(){function _(E){c(this,_);for(var S in Eo)if(Eo.hasOwnProperty(S)){var R=Eo[S],O=R._driver;this[S]=O,Rl[O]||this.defineDriver(R)}this._defaultConfig=jh({},FR),this._config=jh({},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 _.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 S in E){if(S==="storeName"&&(E[S]=E[S].replace(/\W/g,"_")),S==="version"&&typeof E[S]!="number")return new Error("Database version must be a number.");this._config[S]=E[S]}return"driver"in E&&E.driver?this.setDriver(this._config.driver):!0}else return typeof E=="string"?this._config[E]:this._config},_.prototype.defineDriver=function(E,S,R){var O=new m(function(N,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=Bh.concat("_initStorage"),$=0,ae=z.length;$<ae;$++){var qe=z[$],St=!VR(Tc,qe);if((St||E[qe])&&typeof E[qe]!="function"){U(W);return}}var wt=function(){for(var Kt=function(GR){return function(){var zR=new Error("Method "+GR+" is not implemented by the current driver"),Z0=m.reject(zR);return b(Z0,arguments[arguments.length-1]),Z0}},dr=0,Hh=Tc.length;dr<Hh;dr++){var $h=Tc[dr];E[$h]||(E[$h]=Kt($h))}};wt();var rn=function(Kt){Rl[H]&&console.info("Redefining LocalForage driver: "+H),Rl[H]=E,a0[H]=Kt,N()};"_support"in E?E._support&&typeof E._support=="function"?E._support().then(rn,U):rn(!!E._support):rn(!0)}catch(Kt){U(Kt)}});return x(O,S,R),O},_.prototype.driver=function(){return this._driver||null},_.prototype.getDriver=function(E,S,R){var O=Rl[E]?m.resolve(Rl[E]):m.reject(new Error("Driver not found."));return x(O,S,R),O},_.prototype.getSerializer=function(E){var S=m.resolve(Vh);return x(S,E),S},_.prototype.ready=function(E){var S=this,R=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return x(R,E,E),R},_.prototype.setDriver=function(E,S,R){var O=this;o0(E)||(E=[E]);var N=this._getSupportedDrivers(E);function U(){O._config.driver=O.driver()}function H($){return O._extend($),U(),O._ready=O._initStorage(O._config),O._ready}function W($){return function(){var ae=0;function qe(){for(;ae<$.length;){var St=$[ae];return ae++,O._dbInfo=null,O._ready=null,O.getDriver(St).then(H).catch(qe)}U();var wt=new Error("No available storage method found.");return O._driverSet=m.reject(wt),O._driverSet}return qe()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=z.then(function(){var $=N[0];return O._dbInfo=null,O._ready=null,O.getDriver($).then(function(ae){O._driver=ae._driver,U(),O._wrapLibraryMethodsWithReady(),O._initDriver=W(N)})}).catch(function(){U();var $=new Error("No available storage method found.");return O._driverSet=m.reject($),O._driverSet}),x(this._driverSet,S,R),this._driverSet},_.prototype.supports=function(E){return!!a0[E]},_.prototype._extend=function(E){jh(this,E)},_.prototype._getSupportedDrivers=function(E){for(var S=[],R=0,O=E.length;R<O;R++){var N=E[R];this.supports(N)&&S.push(N)}return S},_.prototype._wrapLibraryMethodsWithReady=function(){for(var E=0,S=Bh.length;E<S;E++)jR(this,Bh[E])},_.prototype.createInstance=function(E){return new _(E)},_}(),$R=new HR;o.exports=$R},{3:3}]},{},[4])(4)})}),Pf=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MustacheUtils=void 0;var t=class sE{static escapeHtml(r){return String(r).replace(/"/g,i=>sE.entityMap[i])}};e.MustacheUtils=t,t.entityMap={'"':"""}}),kI=$n(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={}))}),FI=$n(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={}))}),VI=$n(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={}))}),UI=$n(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(kI(),e),n(FI(),e),n(qn(),e),n(VI(),e)}),Qf=$n(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={}))}),b_=$n(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}),np=$n((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",x="version",P="architecture",F="console",V="mobile",L="tablet",q="smarttv",Oe="wearable",ct="embedded",j=500,de="Amazon",Q="Apple",he="ASUS",Pe="BlackBerry",ut="Browser",lt="Chrome",v="Edge",Ht="Firefox",Xe="Google",Yt="Huawei",Se="LG",D="Microsoft",T="Motorola",Z="Opera",ee="Samsung",se="Sharp",we="Sony",ve="Xiaomi",ue="Zebra",Ce="Facebook",Ue="Chromium OS",Ot="Mac OS",He=" Browser",Ye=function(Y,De){var fe={};for(var tt in Y)De[tt]&&De[tt].length%2===0?fe[tt]=De[tt].concat(Y[tt]):fe[tt]=Y[tt];return fe},Lt=function(Y){for(var De={},fe=0;fe<Y.length;fe++)De[Y[fe].toUpperCase()]=Y[fe];return De},ke=function(Y,De){return typeof Y===h?u(De).indexOf(u(Y))!==-1:!1},u=function(Y){return Y.toLowerCase()},p=function(Y){return typeof Y===h?Y.replace(/[^\d\.]/g,s).split(".")[0]:r},y=function(Y,De){if(typeof Y===h)return Y=Y.replace(/^\s\s*/,s),typeof De===l?Y:Y.substring(0,j)},I=function(Y,De){for(var fe=0,tt,Cn,bn,at,ye,Pn;fe<De.length&&!ye;){var to=De[fe],$a=De[fe+1];for(tt=Cn=0;tt<to.length&&!ye&&to[tt];)if(ye=to[tt++].exec(Y),ye)for(bn=0;bn<$a.length;bn++)Pn=ye[++Cn],at=$a[bn],typeof at===c&&at.length>0?at.length===2?typeof at[1]==a?this[at[0]]=at[1].call(this,Pn):this[at[0]]=at[1]:at.length===3?typeof at[1]===a&&!(at[1].exec&&at[1].test)?this[at[0]]=Pn?at[1].call(this,Pn,at[2]):r:this[at[0]]=Pn?Pn.replace(at[1],at[2]):r:at.length===4&&(this[at[0]]=Pn?at[3].call(this,Pn.replace(at[1],at[2])):r):this[at]=Pn||r;fe+=2}},A=function(Y,De){for(var fe in De)if(typeof De[fe]===c&&De[fe].length>0){for(var tt=0;tt<De[fe].length;tt++)if(ke(De[fe][tt],Y))return fe===o?r:fe}else if(ke(De[fe],Y))return fe===o?r:fe;return De.hasOwnProperty("*")?De["*"]:Y},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","?":"/"},K={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"},et={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[x,[g,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[x,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,x],[/opios[\/ ]+([\w\.]+)/i],[x,[g,Z+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[x,[g,Z+" GX"]],[/\bopr\/([\w\.]+)/i],[x,[g,Z]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[x,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[x,[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,x],[/quark(?:pc)?\/([-\w\.]+)/i],[x,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[x,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[x,[g,"UC"+ut]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[x,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[x,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[x,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[x,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[x,[g,"Smart Lenovo "+ut]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+ut],x],[/\bfocus\/([\w\.]+)/i],[x,[g,Ht+" Focus"]],[/\bopt\/([\w\.]+)/i],[x,[g,Z+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[x,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[x,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[x,[g,Z+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[x,[g,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[x,[g,Ht]],[/\bqihoobrowser\/?([\w\.]*)/i],[x,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],x],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+He],x],[/samsungbrowser\/([\w\.]+)/i],[x,[g,ee+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[x,[g,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,"Sogou Mobile"],x],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,x],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[g],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[x,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,Ce],x],[/(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,x],[/\bgsa\/([\w\.]+) .*safari\//i],[x,[g,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[x,[g,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[x,[g,lt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,lt+" WebView"],x],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[x,[g,"Android "+ut]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,x],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[x,[g,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[x,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[x,A,B]],[/(webkit|khtml)\/([\w\.]+)/i],[g,x],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],x],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,x],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[x,[g,Ht+" 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,[x,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[x,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[P,"amd64"]],[/(ia32(?=;))/i],[[P,u]],[/((?:i[346]|x)86)[;\)]/i],[[P,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[P,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[P,"armhf"]],[/windows (ce|mobile); ppc;/i],[[P,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[P,/ower/,s,u]],[/(sun4\w)[;\)]/i],[[P,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[P,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,ee],[m,L]],[/\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,ee],[m,V]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[b,Q],[m,V]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[b,Q],[m,L]],[/(macintosh);/i],[f,[b,Q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[b,se],[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,Yt],[m,L]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[b,Yt],[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,L]],[/; (\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,L]],[/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,T],[m,V]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[b,T],[m,L]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[b,Se],[m,L]],[/(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,L]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[b,"Nokia"],[m,V]],[/(pixel c)\b/i],[f,[b,Xe],[m,L]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[b,Xe],[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,we],[m,V]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[b,we],[m,L]],[/ (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,de],[m,L]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[b,de],[m,V]],[/(playbook);[-\w\),; ]+(rim)/i],[f,b,[m,L]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[b,Pe],[m,V]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[b,he],[m,L]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[b,he],[m,V]],[/(nexus 9)/i],[f,[b,"HTC"],[m,L]],[/(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,L]],[/(itel) ((\w+))/i],[[b,u],f,[m,A,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[b,"Acer"],[m,L]],[/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,L]],[/(surface duo)/i],[f,[b,D],[m,L]],[/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,L]],[/\b(venue[\d ]{2,7}) b/i],[f,[b,"Dell"],[m,L]],[/\b(q(?:mv|ta)\w+) b/i],[f,[b,"Verizon"],[m,L]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[b,"Barnes & Noble"],[m,L]],[/\b(tm\d{3}\w+) b/i],[f,[b,"NuVision"],[m,L]],[/\b(k88) b/i],[f,[b,"ZTE"],[m,L]],[/\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,L]],[/\b((zeki)?tb.*\b) b/i],[f,[b,"Zeki"],[m,L]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],f,[m,L]],[/\b(ns-?\w{0,9}) b/i],[f,[b,"Insignia"],[m,L]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[b,"NextBook"],[m,L]],[/\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,L]],[/\b(trio[-\w\. ]+) b/i],[f,[b,"MachSpeed"],[m,L]],[/\btu_(1491) b/i],[f,[b,"Rotor"],[m,L]],[/(shield[\w ]+) b/i],[f,[b,"Nvidia"],[m,L]],[/(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,L]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[b,ue],[m,V]],[/smart-tv.+(samsung)/i],[b,[m,q]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[b,ee],[m,q]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,Se],[m,q]],[/(apple) ?tv/i],[b,[f,Q+" TV"],[m,q]],[/crkey/i],[[f,lt+"cast"],[b,Xe],[m,q]],[/droid.+aft(\w+)( bui|\))/i],[f,[b,de],[m,q]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[b,se],[m,q]],[/(bravia[\w ]+)( bui|\))/i],[f,[b,we],[m,q]],[/(mitv-\w{5}) bui/i],[f,[b,ve],[m,q]],[/Hbbtv.*(technisat) (.*);/i],[b,f,[m,q]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,y],[f,y],[m,q]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,q]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,f,[m,F]],[/droid.+; (shield) bui/i],[f,[b,"Nvidia"],[m,F]],[/(playstation [345portablevi]+)/i],[f,[b,we],[m,F]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[b,D],[m,F]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[f,[b,ee],[m,Oe]],[/((pebble))app/i],[b,f,[m,Oe]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[b,Q],[m,Oe]],[/droid.+; (glass) \d/i],[f,[b,Xe],[m,Oe]],[/droid.+; (wt63?0{2,3})\)/i],[f,[b,ue],[m,Oe]],[/droid.+; (glass) \d/i],[f,[b,Xe],[m,Oe]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,f,[m,Oe]],[/; (quest( \d| pro)?)/i],[f,[b,Ce],[m,Oe]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[m,ct]],[/(aeobc)\b/i],[f,[b,de],[m,ct]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[m,V]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,L]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,L]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,V]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[x,[g,v+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,x],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[x,[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,x],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[x,g]],os:[[/microsoft (windows) (vista|xp)/i],[g,x],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[g,[x,A,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[x,A,K],[g,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[x,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[g,Ot],[x,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[x,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,x],[/\(bb(10);/i],[x,[g,Pe]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[x,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[x,[g,Ht+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[x,[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[x,[g,"watchOS"]],[/crkey\/([\d\.]+)/i],[x,[g,lt+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,Ue],x],[/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,x],[/(sunos) ?([\w\.\d]*)/i],[[g,"Solaris"],x],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,x]]},ze=function(Y,De){if(typeof Y===c&&(De=Y,Y=r),!(this instanceof ze))return new ze(Y,De).getResult();var fe=typeof n!==l&&n.navigator?n.navigator:r,tt=Y||(fe&&fe.userAgent?fe.userAgent:s),Cn=fe&&fe.userAgentData?fe.userAgentData:r,bn=De?Ye(et,De):et,at=fe&&fe.userAgent==tt;return this.getBrowser=function(){var ye={};return ye[g]=r,ye[x]=r,I.call(ye,tt,bn.browser),ye[d]=p(ye[x]),at&&fe&&fe.brave&&typeof fe.brave.isBrave==a&&(ye[g]="Brave"),ye},this.getCPU=function(){var ye={};return ye[P]=r,I.call(ye,tt,bn.cpu),ye},this.getDevice=function(){var ye={};return ye[b]=r,ye[f]=r,ye[m]=r,I.call(ye,tt,bn.device),at&&!ye[m]&&Cn&&Cn.mobile&&(ye[m]=V),at&&ye[f]=="Macintosh"&&fe&&typeof fe.standalone!==l&&fe.maxTouchPoints&&fe.maxTouchPoints>2&&(ye[f]="iPad",ye[m]=L),ye},this.getEngine=function(){var ye={};return ye[g]=r,ye[x]=r,I.call(ye,tt,bn.engine),ye},this.getOS=function(){var ye={};return ye[g]=r,ye[x]=r,I.call(ye,tt,bn.os),at&&!ye[g]&&Cn&&Cn.platform&&Cn.platform!="Unknown"&&(ye[g]=Cn.platform.replace(/chrome os/i,Ue).replace(/macos/i,Ot)),ye},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 tt},this.setUA=function(ye){return tt=typeof ye===h&&ye.length>j?y(ye,j):ye,this},this.setUA(tt),this};ze.VERSION=i,ze.BROWSER=Lt([g,x,d]),ze.CPU=Lt([P]),ze.DEVICE=Lt([f,b,m,F,V,q,L,Oe,ct]),ze.ENGINE=ze.OS=Lt([g,x]),typeof e!==l?(typeof t!==l&&t.exports&&(e=t.exports=ze),e.UAParser=ze):typeof define===a&&define.amd?define(function(){return ze}):typeof n!==l&&(n.UAParser=ze);var Ae=typeof n!==l&&(n.jQuery||n.Zepto);if(Ae&&!Ae.ua){var dt=new ze;Ae.ua=dt.getResult(),Ae.ua.get=function(){return dt.getUA()},Ae.ua.set=function(Y){dt.setUA(Y);var De=dt.getResult();for(var fe in De)Ae.ua[fe]=De[fe]}}})(typeof window=="object"?window:e)}),T_=$n(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayUtils=void 0;var t=class oE{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--,oE.swap(r,i,s)}}};e.ArrayUtils=t}),aE=$n((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(P){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(P,null,V)).then(function(L){L?x(P,null,V):g(V)}).catch(m)}catch(L){m(L)}else P<h?x(P,null,V):g(V)}).catch(function(V){if(typeof f=="function")try{Promise.resolve(f(P,V,null)).then(function(L){L?x(P,V,null):m(V)}).catch(function(L){m(L)})}catch(L){m(L)}else P<h?x(P,V,null):m(V)})};function x(P,F,V){var L=typeof d=="function"?d(P,F,V):d;setTimeout(function(){b(++P)},L)}b(0)})}};function r(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return n})});function pN(e,t){return Object.is(e,t)}var on=null,cu=!1,zh=1,bi=Symbol("SIGNAL");function je(e){let t=on;return on=e,t}function ew(){return on}var lu={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 tw(e){if(cu)throw new Error("");if(on===null)return;on.consumerOnSignalRead(e);let t=on.nextProducerIndex++;if(du(on),t<on.producerNode.length&&on.producerNode[t]!==e&&Nc(on)){let n=on.producerNode[t];uu(n,on.producerIndexOfThis[t])}on.producerNode[t]!==e&&(on.producerNode[t]=e,on.producerIndexOfThis[t]=Nc(on)?ow(e,on,t):0),on.producerLastReadVersion[t]=e.version}function hN(){zh++}function mN(e){if(!(Nc(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===zh)){if(!e.producerMustRecompute(e)&&!Yh(e)){QE(e);return}e.producerRecomputeValue(e),QE(e)}}function nw(e){if(e.liveConsumerNode===void 0)return;let t=cu;cu=!0;try{for(let n of e.liveConsumerNode)n.dirty||gN(n)}finally{cu=t}}function rw(){return on?.consumerAllowSignalWrites!==!1}function gN(e){e.dirty=!0,nw(e),e.consumerMarkedDirty?.(e)}function QE(e){e.dirty=!1,e.lastCleanEpoch=zh}function qh(e){return e&&(e.nextProducerIndex=0),je(e)}function iw(e,t){if(je(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(Nc(e))for(let n=e.nextProducerIndex;n<e.producerNode.length;n++)uu(e.producerNode[n],e.producerIndexOfThis[n]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Yh(e){du(e);for(let t=0;t<e.producerNode.length;t++){let n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(mN(n),r!==n.version))return!0}return!1}function Kh(e){if(du(e),Nc(e))for(let t=0;t<e.producerNode.length;t++)uu(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 ow(e,t,n){if(sw(e),e.liveConsumerNode.length===0&&aw(e))for(let r=0;r<e.producerNode.length;r++)e.producerIndexOfThis[r]=ow(e.producerNode[r],e,r);return e.liveConsumerIndexOfThis.push(n),e.liveConsumerNode.push(t)-1}function uu(e,t){if(sw(e),e.liveConsumerNode.length===1&&aw(e))for(let r=0;r<e.producerNode.length;r++)uu(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];du(i),i.producerIndexOfThis[r]=t}}function Nc(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function du(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function sw(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function aw(e){return e.producerNode!==void 0}function yN(){throw new Error}var cw=yN;function lw(e){cw(e)}function uw(e){cw=e}var vN=null;function dw(e){let t=Object.create(pw);t.value=e;let n=()=>(tw(t),t.value);return n[bi]=t,n}function Zh(e,t){rw()||lw(e),e.equal(e.value,t)||(e.value=t,_N(e))}function fw(e,t){rw()||lw(e),Zh(e,t(e.value))}var pw=te(w({},lu),{equal:pN,value:void 0,kind:"signal"});function _N(e){e.version++,hN(),nw(e),vN?.()}function Ie(e){return typeof e=="function"}function fu(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 pu=fu(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
|
|
1
|
+
"use strict";(()=>{var y0=Object.create,zs=Object.defineProperty,v0=Object.defineProperties,Ap=Object.getOwnPropertyDescriptor,_0=Object.getOwnPropertyDescriptors,b0=Object.getOwnPropertyNames,Zh=Object.getOwnPropertySymbols,w0=Object.getPrototypeOf,Pp=Object.prototype.hasOwnProperty,E0=Object.prototype.propertyIsEnumerable,Nl=(e,t,n)=>t in e?zs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t)=>{for(var n in t||={})Pp.call(t,n)&&Nl(e,n,t[n]);if(Zh)for(var n of Zh(t))E0.call(t,n)&&Nl(e,n,t[n]);return e},Qe=(e,t)=>v0(e,_0(t)),Po=(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')}),vn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),x0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of b0(t))!Pp.call(e,i)&&i!==n&&zs(e,i,{get:()=>t[i],enumerable:!(r=Ap(t,i))||r.enumerable});return e},an=(e,t,n)=>(n=e!=null?y0(w0(e)):{},x0(t||!e||!e.__esModule?zs(n,"default",{value:e,enumerable:!0}):n,e)),S0=(e,t,n,r)=>{for(var i=r>1?void 0:r?Ap(t,n):t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=(r?s(t,n,i):s(i))||i);return r&&i&&zs(t,n,i),i},Yh=(e,t,n)=>Nl(e,typeof t!="symbol"?t+"":t,n),I0=vn((e,t)=>{"use strict";(function(n){"use strict";var r={};r.VERSION="1.6.1";var i,o={},s=function(f,p){return function(){return p.apply(f,arguments)}},a=function(){var f=arguments,p=f[0],g,m;for(m=1;m<f.length;m++)for(g in f[m])!(g in p)&&f[m].hasOwnProperty(g)&&(p[g]=f[m][g]);return p},l=function(f,p){return{value:f,name:p}};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 u=function(f){this.context=f,this.setLevel(f.filterLevel),this.log=this.info};u.prototype={setLevel:function(f){f&&"value"in f&&(this.context.filterLevel=f)},getLevel:function(){return this.context.filterLevel},enabledFor:function(f){var p=this.context.filterLevel;return f.value>=p.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(f){typeof f=="string"&&f.length>0&&this.invoke(r.TIME,[f,"start"])},timeEnd:function(f){typeof f=="string"&&f.length>0&&this.invoke(r.TIME,[f,"end"])},invoke:function(f,p){i&&this.enabledFor(f)&&i(p,a({level:f},this.context))}};var d=new u({filterLevel:r.OFF});(function(){var f=r;f.enabledFor=s(d,d.enabledFor),f.trace=s(d,d.trace),f.debug=s(d,d.debug),f.time=s(d,d.time),f.timeEnd=s(d,d.timeEnd),f.info=s(d,d.info),f.warn=s(d,d.warn),f.error=s(d,d.error),f.log=f.info})(),r.setHandler=function(f){i=f},r.setLevel=function(f){d.setLevel(f);for(var p in o)o.hasOwnProperty(p)&&o[p].setLevel(f)},r.getLevel=function(){return d.getLevel()},r.get=function(f){return o[f]||(o[f]=new u(a({name:f},d.context)))},r.createDefaultHandler=function(f){f=f||{},f.formatter=f.formatter||function(m,b){b.name&&m.unshift("["+b.name+"]")};var p={},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):p[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):g(I,[A+": "+(new Date().getTime()-p[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),f.formatter(m,b),g(I,m))}},r.useDefaults=function(f){r.setLevel(f&&f.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(f))},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)}),ho=vn(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.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",_[_.STOPPED=5]="STOPPED",_[_.COMPLETED=6]="COMPLETED",_[_.UNINSTALLED=8]="UNINSTALLED",_}(i||(e.EngagementStatus=i={})),o=function(_){return _.CAMPAIGN="CAMPAIGN",_.NATIVE_AB="NATIVE_AB",_.CRO_COPILOT="CRO_COPILOT",_}(o||(e.EngagementType=o={})),s=function(_){return _[_.NONE=0]="NONE",_[_.RULE_BASED=1]="RULE_BASED",_[_.INTENT_BASED=2]="INTENT_BASED",_}(s||(e.TriggerType=s={})),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={})),u=function(_){return _.ALL="ALL",_.LOGGED_IN="LOGGED_IN",_.NON_LOGGED_IN="NON_LOGGED_IN",_}(u||(e.LoggedInVisitor=u={})),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={})),p=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",_}(p||(e.CartItemSource=p={})),g=function(_){return _[_.ALL=0]="ALL",_[_.ONLY_ORGANIC=1]="ONLY_ORGANIC",_[_.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",_[_.INCLUDES=3]="INCLUDES",_[_.EXCLUDES=4]="EXCLUDES",_}(g||(e.UTMCriteria=g={})),m=function(_){return _[_.NONE=0]="NONE",_[_.LIKE=1]="LIKE",_[_.NOT_LIKE=2]="NOT_LIKE",_[_.EQUALS=3]="EQUALS",_[_.NOT_EQUALS=4]="NOT_EQUALS",_}(m||(e.URLCriteria=m={})),b=function(_){return _[_.NONE=0]="NONE",_[_.LESS_THAN=1]="LESS_THAN",_[_.GREATER_THAN=2]="GREATER_THAN",_[_.BETWEEN=3]="BETWEEN",_[_.EQUALS=4]="EQUALS",_}(b||(e.CartCriteria=b={})),I=function(_){return _[_.ALL=0]="ALL",_[_.INCLUDES=1]="INCLUDES",_[_.EXCLUDES=2]="EXCLUDES",_}(I||(e.CartCurrencyOperator=I={})),A=function(_){return _[_.NONE=0]="NONE",_[_.AMOUNT=1]="AMOUNT",_[_.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",_[_.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",_}(A||(e.CartFilterEnum=A={})),$=function(_){return _[_.NONE=0]="NONE",_[_.ITEM=1]="ITEM",_[_.COLLECTION=2]="COLLECTION",_}($||(e.PromotionType=$={})),j=function(_){return _[_.NONE=0]="NONE",_[_.SINGLE=1]="SINGLE",_[_.MULTIPLE=2]="MULTIPLE",_}(j||(e.EngagementCollectionSource=j={})),k=function(_){return _.BEFORE="before",_.AFTER="after",_.INSIDE_FIRST="insideFirst",_.INSIDE_LAST="insideLast",_}(k||(e.EngagementPlacementPosition=k={})),G=function(_){return _.SHOPIFY_CHECKOUT="shopify_checkout",_.THIRD_PARTY_CHECKOUT="third_party_checkout",_.CART_PAGE="cart_page",_.CART_DRAWER="cart_drawer",_}(G||(e.RedirectBehaviour=G={})),Pe=function(_){return _.ONCE_IN_SESSION="ONCE_IN_SESSION",_.ACROSS_SESSIONS="ACROSS_SESSIONS",_}(Pe||(e.FrequencyType=Pe={})),We=function(_){return _.DAYS="DAYS",_.HOURS="HOURS",_.MINUTES="MINUTES",_.SECONDS="SECONDS",_}(We||(e.FrequencyGapUnit=We={})),B=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",_}(B||(e.ClickActionType=B={})),le=function(_){return _.POPUP="POPUP",_.PAGE_EMBED="PAGE_EMBED",_.CART_EMBED="CART_EMBED",_.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",_}(le||(e.OnsiteDeliveryType=le={})),ne=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",_.STICKY_ATC="STICKY_ATC",_.EXPERIMENT="EXPERIMENT",_}(ne||(e.EngagementObjective=ne={})),ye=function(_){return _.COOEE="COOEE",_.KLAVIYO="KLAVIYO",_}(ye||(e.EngagementContentSource=ye={})),Ve=function(_){return _.ICONS="ICONS",_.TILES="TILES",_}(Ve||(e.ProgressBarLayout=Ve={})),Ue=function(_){return _.FREE_SHIPPING="FREE_SHIPPING",_.DISCOUNT="DISCOUNT",_.FREE_AUTO_GIFT="FREE_AUTO_GIFT",_.FREE_GIFT_SELECT="FREE_GIFT_SELECT",_}(Ue||(e.MilestoneRewardType=Ue={}))}),C0=vn(e=>{"use strict";var t=e&&e.__awaiter||function(r,i,o,s){function a(l){return l instanceof o?l:new o(function(u){u(l)})}return new(o||(o=Promise))(function(l,u){function d(g){try{p(s.next(g))}catch(m){u(m)}}function f(g){try{p(s.throw(g))}catch(m){u(m)}}function p(g){g.done?l(g.value):a(g.value).then(d,f)}p((s=s.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((o,s)=>(r.hasOwnProperty(s)&&r[s]!=null&&o.push({[s]:r[s]}),o),[])}static removeNullUndefinedKeys(r){return Object.keys(r).reduce((i,o)=>(r[o]!==null&&r[o]!==void 0&&(i[o]=r[o]),i),{})}static stringify(r){return JSON.stringify(r,function(i,o){return o===void 0?null:o})}};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)/)}),T0=vn((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 o(s,a,l){function u(p,g){if(!a[p]){if(!s[p]){var m=typeof Po=="function"&&Po;if(!g&&m)return m(p,!0);if(d)return d(p,!0);var b=new Error("Cannot find module '"+p+"'");throw b.code="MODULE_NOT_FOUND",b}var I=a[p]={exports:{}};s[p][0].call(I.exports,function(A){var $=s[p][1][A];return u($||A)},I,I.exports,o,s,a,l)}return a[p].exports}for(var d=typeof Po=="function"&&Po,f=0;f<l.length;f++)u(l[f]);return u}({1:[function(o,s,a){(function(l){"use strict";var u=l.MutationObserver||l.WebKitMutationObserver,d;if(u){var f=0,p=new u(A),g=l.document.createTextNode("");p.observe(g,{characterData:!0}),d=function(){g.data=f=++f%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var m=new l.MessageChannel;m.port1.onmessage=A,d=function(){m.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?d=function(){var j=l.document.createElement("script");j.onreadystatechange=function(){A(),j.onreadystatechange=null,j.parentNode.removeChild(j),j=null},l.document.documentElement.appendChild(j)}:d=function(){setTimeout(A,0)};var b,I=[];function A(){b=!0;for(var j,k,G=I.length;G;){for(k=I,I=[],j=-1;++j<G;)k[j]();G=I.length}b=!1}s.exports=$;function $(j){I.push(j)===1&&!b&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(o,s,a){"use strict";var l=o(1);function u(){}var d={},f=["REJECTED"],p=["FULFILLED"],g=["PENDING"];s.exports=m;function m(B){if(typeof B!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,B!==u&&$(this,B)}m.prototype.catch=function(B){return this.then(null,B)},m.prototype.then=function(B,le){if(typeof B!="function"&&this.state===p||typeof le!="function"&&this.state===f)return this;var ne=new this.constructor(u);if(this.state!==g){var ye=this.state===p?B:le;I(ne,ye,this.outcome)}else this.queue.push(new b(ne,B,le));return ne};function b(B,le,ne){this.promise=B,typeof le=="function"&&(this.onFulfilled=le,this.callFulfilled=this.otherCallFulfilled),typeof ne=="function"&&(this.onRejected=ne,this.callRejected=this.otherCallRejected)}b.prototype.callFulfilled=function(B){d.resolve(this.promise,B)},b.prototype.otherCallFulfilled=function(B){I(this.promise,this.onFulfilled,B)},b.prototype.callRejected=function(B){d.reject(this.promise,B)},b.prototype.otherCallRejected=function(B){I(this.promise,this.onRejected,B)};function I(B,le,ne){l(function(){var ye;try{ye=le(ne)}catch(Ve){return d.reject(B,Ve)}ye===B?d.reject(B,new TypeError("Cannot resolve promise with itself")):d.resolve(B,ye)})}d.resolve=function(B,le){var ne=j(A,le);if(ne.status==="error")return d.reject(B,ne.value);var ye=ne.value;if(ye)$(B,ye);else{B.state=p,B.outcome=le;for(var Ve=-1,Ue=B.queue.length;++Ve<Ue;)B.queue[Ve].callFulfilled(le)}return B},d.reject=function(B,le){B.state=f,B.outcome=le;for(var ne=-1,ye=B.queue.length;++ne<ye;)B.queue[ne].callRejected(le);return B};function A(B){var le=B&&B.then;if(B&&(typeof B=="object"||typeof B=="function")&&typeof le=="function")return function(){le.apply(B,arguments)}}function $(B,le){var ne=!1;function ye(rt){ne||(ne=!0,d.reject(B,rt))}function Ve(rt){ne||(ne=!0,d.resolve(B,rt))}function Ue(){le(Ve,ye)}var _=j(Ue);_.status==="error"&&ye(_.value)}function j(B,le){var ne={};try{ne.value=B(le),ne.status="success"}catch(ye){ne.status="error",ne.value=ye}return ne}m.resolve=k;function k(B){return B instanceof this?B:d.resolve(new this(u),B)}m.reject=G;function G(B){var le=new this(u);return d.reject(le,B)}m.all=Pe;function Pe(B){var le=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ne=B.length,ye=!1;if(!ne)return this.resolve([]);for(var Ve=new Array(ne),Ue=0,_=-1,rt=new this(u);++_<ne;)et(B[_],_);return rt;function et(Te,lt){le.resolve(Te).then(fe,function(C){ye||(ye=!0,d.reject(rt,C))});function fe(C){Ve[lt]=C,++Ue===ne&&!ye&&(ye=!0,d.resolve(rt,Ve))}}}m.race=We;function We(B){var le=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ne=B.length,ye=!1;if(!ne)return this.resolve([]);for(var Ve=-1,Ue=new this(u);++Ve<ne;)_(B[Ve]);return Ue;function _(rt){le.resolve(rt).then(function(et){ye||(ye=!0,d.resolve(Ue,et))},function(et){ye||(ye=!0,d.reject(Ue,et))})}}},{1:1}],3:[function(o,s,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=o(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(o,s,a){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v};function u(v,w){if(!(v instanceof w))throw new TypeError("Cannot call a class as a function")}function d(){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 f=d();function p(){try{if(!f||!f.open)return!1;var v=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),w=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!v||w)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function g(v,w){v=v||[],w=w||{};try{return new Blob(v,w)}catch(R){if(R.name!=="TypeError")throw R;for(var E=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,O=new E,T=0;T<v.length;T+=1)O.append(v[T]);return O.getBlob(w.type)}}typeof Promise>"u"&&o(3);var m=Promise;function b(v,w){w&&v.then(function(E){w(null,E)},function(E){w(E)})}function I(v,w,E){typeof w=="function"&&v.then(w),typeof E=="function"&&v.catch(E)}function A(v){return typeof v!="string"&&(console.warn(v+" used as a key, but it is not a string."),v=String(v)),v}function $(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var j="local-forage-detect-blob-support",k=void 0,G={},Pe=Object.prototype.toString,We="readonly",B="readwrite";function le(v){for(var w=v.length,E=new ArrayBuffer(w),O=new Uint8Array(E),T=0;T<w;T++)O[T]=v.charCodeAt(T);return E}function ne(v){return new m(function(w){var E=v.transaction(j,B),O=g([""]);E.objectStore(j).put(O,"key"),E.onabort=function(T){T.preventDefault(),T.stopPropagation(),w(!1)},E.oncomplete=function(){var T=navigator.userAgent.match(/Chrome\/(\d+)/),R=navigator.userAgent.match(/Edge\//);w(R||!T||parseInt(T[1],10)>=43)}}).catch(function(){return!1})}function ye(v){return typeof k=="boolean"?m.resolve(k):ne(v).then(function(w){return k=w,k})}function Ve(v){var w=G[v.name],E={};E.promise=new m(function(O,T){E.resolve=O,E.reject=T}),w.deferredOperations.push(E),w.dbReady?w.dbReady=w.dbReady.then(function(){return E.promise}):w.dbReady=E.promise}function Ue(v){var w=G[v.name],E=w.deferredOperations.pop();if(E)return E.resolve(),E.promise}function _(v,w){var E=G[v.name],O=E.deferredOperations.pop();if(O)return O.reject(w),O.promise}function rt(v,w){return new m(function(E,O){if(G[v.name]=G[v.name]||se(),v.db)if(w)Ve(v),v.db.close();else return E(v.db);var T=[v.name];w&&T.push(v.version);var R=f.open.apply(f,T);w&&(R.onupgradeneeded=function(P){var V=R.result;try{V.createObjectStore(v.storeName),P.oldVersion<=1&&V.createObjectStore(j)}catch(H){if(H.name==="ConstraintError")console.warn('The database "'+v.name+'" has been upgraded from version '+P.oldVersion+" to version "+P.newVersion+', but the storage "'+v.storeName+'" already exists.');else throw H}}),R.onerror=function(P){P.preventDefault(),O(R.error)},R.onsuccess=function(){var P=R.result;P.onversionchange=function(V){V.target.close()},E(P),Ue(v)}})}function et(v){return rt(v,!1)}function Te(v){return rt(v,!0)}function lt(v,w){if(!v.db)return!0;var E=!v.db.objectStoreNames.contains(v.storeName),O=v.version<v.db.version,T=v.version>v.db.version;if(O&&(v.version!==w&&console.warn('The database "'+v.name+`" can't be downgraded from version `+v.db.version+" to version "+v.version+"."),v.version=v.db.version),T||E){if(E){var R=v.db.version+1;R>v.version&&(v.version=R)}return!0}return!1}function fe(v){return new m(function(w,E){var O=new FileReader;O.onerror=E,O.onloadend=function(T){var R=btoa(T.target.result||"");w({__local_forage_encoded_blob:!0,data:R,type:v.type})},O.readAsBinaryString(v)})}function C(v){var w=le(atob(v.data));return g([w],{type:v.type})}function S(v){return v&&v.__local_forage_encoded_blob}function q(v){var w=this,E=w._initReady().then(function(){var O=G[w._dbInfo.name];if(O&&O.dbReady)return O.dbReady});return I(E,v,v),E}function J(v){Ve(v);for(var w=G[v.name],E=w.forages,O=0;O<E.length;O++){var T=E[O];T._dbInfo.db&&(T._dbInfo.db.close(),T._dbInfo.db=null)}return v.db=null,et(v).then(function(R){return v.db=R,lt(v)?Te(v):R}).then(function(R){v.db=w.db=R;for(var P=0;P<E.length;P++)E[P]._dbInfo.db=R}).catch(function(R){throw _(v,R),R})}function Q(v,w,E,O){O===void 0&&(O=1);try{var T=v.db.transaction(v.storeName,w);E(null,T)}catch(R){if(O>0&&(!v.db||R.name==="InvalidStateError"||R.name==="NotFoundError"))return m.resolve().then(function(){if(!v.db||R.name==="NotFoundError"&&!v.db.objectStoreNames.contains(v.storeName)&&v.version<=v.db.version)return v.db&&(v.version=v.db.version+1),Te(v)}).then(function(){return J(v).then(function(){Q(v,w,E,O-1)})}).catch(E);E(R)}}function se(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function oe(v){var w=this,E={db:null};if(v)for(var O in v)E[O]=v[O];var T=G[E.name];T||(T=se(),G[E.name]=T),T.forages.push(w),w._initReady||(w._initReady=w.ready,w.ready=q);var R=[];function P(){return m.resolve()}for(var V=0;V<T.forages.length;V++){var H=T.forages[V];H!==w&&R.push(H._initReady().catch(P))}var U=T.forages.slice(0);return m.all(R).then(function(){return E.db=T.db,et(E)}).then(function(F){return E.db=F,lt(E,w._defaultConfig.version)?Te(E):F}).then(function(F){E.db=T.db=F,w._dbInfo=E;for(var ee=0;ee<U.length;ee++){var Ce=U[ee];Ce!==w&&(Ce._dbInfo.db=E.db,Ce._dbInfo.version=E.version)}})}function te(v,w){var E=this;v=A(v);var O=new m(function(T,R){E.ready().then(function(){Q(E._dbInfo,We,function(P,V){if(P)return R(P);try{var H=V.objectStore(E._dbInfo.storeName),U=H.get(v);U.onsuccess=function(){var F=U.result;F===void 0&&(F=null),S(F)&&(F=C(F)),T(F)},U.onerror=function(){R(U.error)}}catch(F){R(F)}})}).catch(R)});return b(O,w),O}function pe(v,w){var E=this,O=new m(function(T,R){E.ready().then(function(){Q(E._dbInfo,We,function(P,V){if(P)return R(P);try{var H=V.objectStore(E._dbInfo.storeName),U=H.openCursor(),F=1;U.onsuccess=function(){var ee=U.result;if(ee){var Ce=ee.value;S(Ce)&&(Ce=C(Ce));var Ge=v(Ce,ee.key,F++);Ge!==void 0?T(Ge):ee.continue()}else T()},U.onerror=function(){R(U.error)}}catch(ee){R(ee)}})}).catch(R)});return b(O,w),O}function xe(v,w,E){var O=this;v=A(v);var T=new m(function(R,P){var V;O.ready().then(function(){return V=O._dbInfo,Pe.call(w)==="[object Blob]"?ye(V.db).then(function(H){return H?w:fe(w)}):w}).then(function(H){Q(O._dbInfo,B,function(U,F){if(U)return P(U);try{var ee=F.objectStore(O._dbInfo.storeName);H===null&&(H=void 0);var Ce=ee.put(H,v);F.oncomplete=function(){H===void 0&&(H=null),R(H)},F.onabort=F.onerror=function(){var Ge=Ce.error?Ce.error:Ce.transaction.error;P(Ge)}}catch(Ge){P(Ge)}})}).catch(P)});return b(T,E),T}function Ke(v,w){var E=this;v=A(v);var O=new m(function(T,R){E.ready().then(function(){Q(E._dbInfo,B,function(P,V){if(P)return R(P);try{var H=V.objectStore(E._dbInfo.storeName),U=H.delete(v);V.oncomplete=function(){T()},V.onerror=function(){R(U.error)},V.onabort=function(){var F=U.error?U.error:U.transaction.error;R(F)}}catch(F){R(F)}})}).catch(R)});return b(O,w),O}function Se(v){var w=this,E=new m(function(O,T){w.ready().then(function(){Q(w._dbInfo,B,function(R,P){if(R)return T(R);try{var V=P.objectStore(w._dbInfo.storeName),H=V.clear();P.oncomplete=function(){O()},P.onabort=P.onerror=function(){var U=H.error?H.error:H.transaction.error;T(U)}}catch(U){T(U)}})}).catch(T)});return b(E,v),E}function De(v){var w=this,E=new m(function(O,T){w.ready().then(function(){Q(w._dbInfo,We,function(R,P){if(R)return T(R);try{var V=P.objectStore(w._dbInfo.storeName),H=V.count();H.onsuccess=function(){O(H.result)},H.onerror=function(){T(H.error)}}catch(U){T(U)}})}).catch(T)});return b(E,v),E}function Je(v,w){var E=this,O=new m(function(T,R){if(v<0){T(null);return}E.ready().then(function(){Q(E._dbInfo,We,function(P,V){if(P)return R(P);try{var H=V.objectStore(E._dbInfo.storeName),U=!1,F=H.openKeyCursor();F.onsuccess=function(){var ee=F.result;if(!ee){T(null);return}v===0||U?T(ee.key):(U=!0,ee.advance(v))},F.onerror=function(){R(F.error)}}catch(ee){R(ee)}})}).catch(R)});return b(O,w),O}function ve(v){var w=this,E=new m(function(O,T){w.ready().then(function(){Q(w._dbInfo,We,function(R,P){if(R)return T(R);try{var V=P.objectStore(w._dbInfo.storeName),H=V.openKeyCursor(),U=[];H.onsuccess=function(){var F=H.result;if(!F){O(U);return}U.push(F.key),F.continue()},H.onerror=function(){T(H.error)}}catch(F){T(F)}})}).catch(T)});return b(E,v),E}function c(v,w){w=$.apply(this,arguments);var E=this.config();v=typeof v!="function"&&v||{},v.name||(v.name=v.name||E.name,v.storeName=v.storeName||E.storeName);var O=this,T;if(!v.name)T=m.reject("Invalid arguments");else{var R=v.name===E.name&&O._dbInfo.db,P=R?m.resolve(O._dbInfo.db):et(v).then(function(V){var H=G[v.name],U=H.forages;H.db=V;for(var F=0;F<U.length;F++)U[F]._dbInfo.db=V;return V});v.storeName?T=P.then(function(V){if(V.objectStoreNames.contains(v.storeName)){var H=V.version+1;Ve(v);var U=G[v.name],F=U.forages;V.close();for(var ee=0;ee<F.length;ee++){var Ce=F[ee];Ce._dbInfo.db=null,Ce._dbInfo.version=H}var Ge=new m(function(ze,dt){var it=f.open(v.name,H);it.onerror=function(Qt){var Ha=it.result;Ha.close(),dt(Qt)},it.onupgradeneeded=function(){var Qt=it.result;Qt.deleteObjectStore(v.storeName)},it.onsuccess=function(){var Qt=it.result;Qt.close(),ze(Qt)}});return Ge.then(function(ze){U.db=ze;for(var dt=0;dt<F.length;dt++){var it=F[dt];it._dbInfo.db=ze,Ue(it._dbInfo)}}).catch(function(ze){throw(_(v,ze)||m.resolve()).catch(function(){}),ze})}}):T=P.then(function(V){Ve(v);var H=G[v.name],U=H.forages;V.close();for(var F=0;F<U.length;F++){var ee=U[F];ee._dbInfo.db=null}var Ce=new m(function(Ge,ze){var dt=f.deleteDatabase(v.name);dt.onerror=function(){var it=dt.result;it&&it.close(),ze(dt.error)},dt.onblocked=function(){console.warn('dropInstance blocked for database "'+v.name+'" until all open connections are closed')},dt.onsuccess=function(){var it=dt.result;it&&it.close(),Ge(it)}});return Ce.then(function(Ge){H.db=Ge;for(var ze=0;ze<U.length;ze++){var dt=U[ze];Ue(dt._dbInfo)}}).catch(function(Ge){throw(_(v,Ge)||m.resolve()).catch(function(){}),Ge})})}return b(T,w),T}var h={_driver:"asyncStorage",_initStorage:oe,_support:p(),iterate:pe,getItem:te,setItem:xe,removeItem:Ke,clear:Se,length:De,key:Je,keys:ve,dropInstance:c};function y(){return typeof openDatabase=="function"}var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D="~~local_forage_type~",M=/^~~local_forage_type~([^~]+)~/,W="__lfsc__:",Ne=W.length,Ie="arbf",be="blob",He="si08",Z="ui08",ge="uic8",re="si16",ke="si32",kt="ur16",St="ui32",Ae="fl32",ie="fl64",Jt=Ne+Ie.length,qr=Object.prototype.toString;function Ci(v){var w=v.length*.75,E=v.length,O,T=0,R,P,V,H;v[v.length-1]==="="&&(w--,v[v.length-2]==="="&&w--);var U=new ArrayBuffer(w),F=new Uint8Array(U);for(O=0;O<E;O+=4)R=x.indexOf(v[O]),P=x.indexOf(v[O+1]),V=x.indexOf(v[O+2]),H=x.indexOf(v[O+3]),F[T++]=R<<2|P>>4,F[T++]=(P&15)<<4|V>>2,F[T++]=(V&3)<<6|H&63;return U}function Va(v){var w=new Uint8Array(v),E="",O;for(O=0;O<w.length;O+=3)E+=x[w[O]>>2],E+=x[(w[O]&3)<<4|w[O+1]>>4],E+=x[(w[O+1]&15)<<2|w[O+2]>>6],E+=x[w[O+2]&63];return w.length%3===2?E=E.substring(0,E.length-1)+"=":w.length%3===1&&(E=E.substring(0,E.length-2)+"=="),E}function P_(v,w){var E="";if(v&&(E=qr.call(v)),v&&(E==="[object ArrayBuffer]"||v.buffer&&qr.call(v.buffer)==="[object ArrayBuffer]")){var O,T=W;v instanceof ArrayBuffer?(O=v,T+=Ie):(O=v.buffer,E==="[object Int8Array]"?T+=He:E==="[object Uint8Array]"?T+=Z:E==="[object Uint8ClampedArray]"?T+=ge:E==="[object Int16Array]"?T+=re:E==="[object Uint16Array]"?T+=kt:E==="[object Int32Array]"?T+=ke:E==="[object Uint32Array]"?T+=St:E==="[object Float32Array]"?T+=Ae:E==="[object Float64Array]"?T+=ie:w(new Error("Failed to get type for BinaryArray"))),w(T+Va(O))}else if(E==="[object Blob]"){var R=new FileReader;R.onload=function(){var P=D+v.type+"~"+Va(this.result);w(W+be+P)},R.readAsArrayBuffer(v)}else try{w(JSON.stringify(v))}catch(P){console.error("Couldn't convert value into a JSON string: ",v),w(null,P)}}function L_(v){if(v.substring(0,Ne)!==W)return JSON.parse(v);var w=v.substring(Jt),E=v.substring(Ne,Jt),O;if(E===be&&M.test(w)){var T=w.match(M);O=T[1],w=w.substring(T[0].length)}var R=Ci(w);switch(E){case Ie:return R;case be:return g([R],{type:O});case He:return new Int8Array(R);case Z:return new Uint8Array(R);case ge:return new Uint8ClampedArray(R);case re:return new Int16Array(R);case kt:return new Uint16Array(R);case ke:return new Int32Array(R);case St:return new Uint32Array(R);case Ae:return new Float32Array(R);case ie:return new Float64Array(R);default:throw new Error("Unkown type: "+E)}}var Ba={serialize:P_,deserialize:L_,stringToBuffer:Ci,bufferToString:Va};function Hh(v,w,E,O){v.executeSql("CREATE TABLE IF NOT EXISTS "+w.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],E,O)}function M_(v){var w=this,E={db:null};if(v)for(var O in v)E[O]=typeof v[O]!="string"?v[O].toString():v[O];var T=new m(function(R,P){try{E.db=openDatabase(E.name,String(E.version),E.description,E.size)}catch(V){return P(V)}E.db.transaction(function(V){Hh(V,E,function(){w._dbInfo=E,R()},function(H,U){P(U)})},P)});return E.serializer=Ba,T}function Zn(v,w,E,O,T,R){v.executeSql(E,O,T,function(P,V){V.code===V.SYNTAX_ERR?P.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[w.storeName],function(H,U){U.rows.length?R(H,V):Hh(H,w,function(){H.executeSql(E,O,T,R)},R)},R):R(P,V)},R)}function j_(v,w){var E=this;v=A(v);var O=new m(function(T,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zn(V,P,"SELECT * FROM "+P.storeName+" WHERE key = ? LIMIT 1",[v],function(H,U){var F=U.rows.length?U.rows.item(0).value:null;F&&(F=P.serializer.deserialize(F)),T(F)},function(H,U){R(U)})})}).catch(R)});return b(O,w),O}function V_(v,w){var E=this,O=new m(function(T,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zn(V,P,"SELECT * FROM "+P.storeName,[],function(H,U){for(var F=U.rows,ee=F.length,Ce=0;Ce<ee;Ce++){var Ge=F.item(Ce),ze=Ge.value;if(ze&&(ze=P.serializer.deserialize(ze)),ze=v(ze,Ge.key,Ce+1),ze!==void 0){T(ze);return}}T()},function(H,U){R(U)})})}).catch(R)});return b(O,w),O}function $h(v,w,E,O){var T=this;v=A(v);var R=new m(function(P,V){T.ready().then(function(){w===void 0&&(w=null);var H=w,U=T._dbInfo;U.serializer.serialize(w,function(F,ee){ee?V(ee):U.db.transaction(function(Ce){Zn(Ce,U,"INSERT OR REPLACE INTO "+U.storeName+" (key, value) VALUES (?, ?)",[v,F],function(){P(H)},function(Ge,ze){V(ze)})},function(Ce){if(Ce.code===Ce.QUOTA_ERR){if(O>0){P($h.apply(T,[v,H,E,O-1]));return}V(Ce)}})})}).catch(V)});return b(R,E),R}function B_(v,w,E){return $h.apply(this,[v,w,E,1])}function F_(v,w){var E=this;v=A(v);var O=new m(function(T,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zn(V,P,"DELETE FROM "+P.storeName+" WHERE key = ?",[v],function(){T()},function(H,U){R(U)})})}).catch(R)});return b(O,w),O}function U_(v){var w=this,E=new m(function(O,T){w.ready().then(function(){var R=w._dbInfo;R.db.transaction(function(P){Zn(P,R,"DELETE FROM "+R.storeName,[],function(){O()},function(V,H){T(H)})})}).catch(T)});return b(E,v),E}function H_(v){var w=this,E=new m(function(O,T){w.ready().then(function(){var R=w._dbInfo;R.db.transaction(function(P){Zn(P,R,"SELECT COUNT(key) as c FROM "+R.storeName,[],function(V,H){var U=H.rows.item(0).c;O(U)},function(V,H){T(H)})})}).catch(T)});return b(E,v),E}function $_(v,w){var E=this,O=new m(function(T,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zn(V,P,"SELECT key FROM "+P.storeName+" WHERE id = ? LIMIT 1",[v+1],function(H,U){var F=U.rows.length?U.rows.item(0).key:null;T(F)},function(H,U){R(U)})})}).catch(R)});return b(O,w),O}function z_(v){var w=this,E=new m(function(O,T){w.ready().then(function(){var R=w._dbInfo;R.db.transaction(function(P){Zn(P,R,"SELECT key FROM "+R.storeName,[],function(V,H){for(var U=[],F=0;F<H.rows.length;F++)U.push(H.rows.item(F).key);O(U)},function(V,H){T(H)})})}).catch(T)});return b(E,v),E}function q_(v){return new m(function(w,E){v.transaction(function(O){O.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(T,R){for(var P=[],V=0;V<R.rows.length;V++)P.push(R.rows.item(V).name);w({db:v,storeNames:P})},function(T,R){E(R)})},function(O){E(O)})})}function W_(v,w){w=$.apply(this,arguments);var E=this.config();v=typeof v!="function"&&v||{},v.name||(v.name=v.name||E.name,v.storeName=v.storeName||E.storeName);var O=this,T;return v.name?T=new m(function(R){var P;v.name===E.name?P=O._dbInfo.db:P=openDatabase(v.name,"","",0),v.storeName?R({db:P,storeNames:[v.storeName]}):R(q_(P))}).then(function(R){return new m(function(P,V){R.db.transaction(function(H){function U(Ge){return new m(function(ze,dt){H.executeSql("DROP TABLE IF EXISTS "+Ge,[],function(){ze()},function(it,Qt){dt(Qt)})})}for(var F=[],ee=0,Ce=R.storeNames.length;ee<Ce;ee++)F.push(U(R.storeNames[ee]));m.all(F).then(function(){P()}).catch(function(Ge){V(Ge)})},function(H){V(H)})})}):T=m.reject("Invalid arguments"),b(T,w),T}var G_={_driver:"webSQLStorage",_initStorage:M_,_support:y(),iterate:V_,getItem:j_,setItem:B_,removeItem:F_,clear:U_,length:H_,key:$_,keys:z_,dropInstance:W_};function Z_(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function zh(v,w){var E=v.name+"/";return v.storeName!==w.storeName&&(E+=v.storeName+"/"),E}function Y_(){var v="_localforage_support_test";try{return localStorage.setItem(v,!0),localStorage.removeItem(v),!1}catch{return!0}}function K_(){return!Y_()||localStorage.length>0}function J_(v){var w=this,E={};if(v)for(var O in v)E[O]=v[O];return E.keyPrefix=zh(v,w._defaultConfig),K_()?(w._dbInfo=E,E.serializer=Ba,m.resolve()):m.reject()}function Q_(v){var w=this,E=w.ready().then(function(){for(var O=w._dbInfo.keyPrefix,T=localStorage.length-1;T>=0;T--){var R=localStorage.key(T);R.indexOf(O)===0&&localStorage.removeItem(R)}});return b(E,v),E}function X_(v,w){var E=this;v=A(v);var O=E.ready().then(function(){var T=E._dbInfo,R=localStorage.getItem(T.keyPrefix+v);return R&&(R=T.serializer.deserialize(R)),R});return b(O,w),O}function e0(v,w){var E=this,O=E.ready().then(function(){for(var T=E._dbInfo,R=T.keyPrefix,P=R.length,V=localStorage.length,H=1,U=0;U<V;U++){var F=localStorage.key(U);if(F.indexOf(R)===0){var ee=localStorage.getItem(F);if(ee&&(ee=T.serializer.deserialize(ee)),ee=v(ee,F.substring(P),H++),ee!==void 0)return ee}}});return b(O,w),O}function t0(v,w){var E=this,O=E.ready().then(function(){var T=E._dbInfo,R;try{R=localStorage.key(v)}catch{R=null}return R&&(R=R.substring(T.keyPrefix.length)),R});return b(O,w),O}function n0(v){var w=this,E=w.ready().then(function(){for(var O=w._dbInfo,T=localStorage.length,R=[],P=0;P<T;P++){var V=localStorage.key(P);V.indexOf(O.keyPrefix)===0&&R.push(V.substring(O.keyPrefix.length))}return R});return b(E,v),E}function r0(v){var w=this,E=w.keys().then(function(O){return O.length});return b(E,v),E}function i0(v,w){var E=this;v=A(v);var O=E.ready().then(function(){var T=E._dbInfo;localStorage.removeItem(T.keyPrefix+v)});return b(O,w),O}function o0(v,w,E){var O=this;v=A(v);var T=O.ready().then(function(){w===void 0&&(w=null);var R=w;return new m(function(P,V){var H=O._dbInfo;H.serializer.serialize(w,function(U,F){if(F)V(F);else try{localStorage.setItem(H.keyPrefix+v,U),P(R)}catch(ee){(ee.name==="QuotaExceededError"||ee.name==="NS_ERROR_DOM_QUOTA_REACHED")&&V(ee),V(ee)}})})});return b(T,E),T}function s0(v,w){if(w=$.apply(this,arguments),v=typeof v!="function"&&v||{},!v.name){var E=this.config();v.name=v.name||E.name,v.storeName=v.storeName||E.storeName}var O=this,T;return v.name?T=new m(function(R){v.storeName?R(zh(v,O._defaultConfig)):R(v.name+"/")}).then(function(R){for(var P=localStorage.length-1;P>=0;P--){var V=localStorage.key(P);V.indexOf(R)===0&&localStorage.removeItem(V)}}):T=m.reject("Invalid arguments"),b(T,w),T}var a0={_driver:"localStorageWrapper",_initStorage:J_,_support:Z_(),iterate:e0,getItem:X_,setItem:o0,removeItem:i0,clear:Q_,length:r0,key:t0,keys:n0,dropInstance:s0},l0=function(v,w){return v===w||typeof v=="number"&&typeof w=="number"&&isNaN(v)&&isNaN(w)},c0=function(v,w){for(var E=v.length,O=0;O<E;){if(l0(v[O],w))return!0;O++}return!1},qh=Array.isArray||function(v){return Object.prototype.toString.call(v)==="[object Array]"},Ti={},Wh={},Wr={INDEXEDDB:h,WEBSQL:G_,LOCALSTORAGE:a0},u0=[Wr.INDEXEDDB._driver,Wr.WEBSQL._driver,Wr.LOCALSTORAGE._driver],Ao=["dropInstance"],Fa=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ao),h0={description:"",driver:u0.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function d0(v,w){v[w]=function(){var E=arguments;return v.ready().then(function(){return v[w].apply(v,E)})}}function Ua(){for(var v=1;v<arguments.length;v++){var w=arguments[v];if(w)for(var E in w)w.hasOwnProperty(E)&&(qh(w[E])?arguments[0][E]=w[E].slice():arguments[0][E]=w[E])}return arguments[0]}var f0=function(){function v(w){u(this,v);for(var E in Wr)if(Wr.hasOwnProperty(E)){var O=Wr[E],T=O._driver;this[E]=T,Ti[T]||this.defineDriver(O)}this._defaultConfig=Ua({},h0),this._config=Ua({},this._defaultConfig,w),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return v.prototype.config=function(w){if((typeof w>"u"?"undefined":l(w))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var E in w){if(E==="storeName"&&(w[E]=w[E].replace(/\W/g,"_")),E==="version"&&typeof w[E]!="number")return new Error("Database version must be a number.");this._config[E]=w[E]}return"driver"in w&&w.driver?this.setDriver(this._config.driver):!0}else return typeof w=="string"?this._config[w]:this._config},v.prototype.defineDriver=function(w,E,O){var T=new m(function(R,P){try{var V=w._driver,H=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!w._driver){P(H);return}for(var U=Fa.concat("_initStorage"),F=0,ee=U.length;F<ee;F++){var Ce=U[F],Ge=!c0(Ao,Ce);if((Ge||w[Ce])&&typeof w[Ce]!="function"){P(H);return}}var ze=function(){for(var it=function(g0){return function(){var m0=new Error("Method "+g0+" is not implemented by the current driver"),Gh=m.reject(m0);return b(Gh,arguments[arguments.length-1]),Gh}},Qt=0,Ha=Ao.length;Qt<Ha;Qt++){var $a=Ao[Qt];w[$a]||(w[$a]=it($a))}};ze();var dt=function(it){Ti[V]&&console.info("Redefining LocalForage driver: "+V),Ti[V]=w,Wh[V]=it,R()};"_support"in w?w._support&&typeof w._support=="function"?w._support().then(dt,P):dt(!!w._support):dt(!0)}catch(it){P(it)}});return I(T,E,O),T},v.prototype.driver=function(){return this._driver||null},v.prototype.getDriver=function(w,E,O){var T=Ti[w]?m.resolve(Ti[w]):m.reject(new Error("Driver not found."));return I(T,E,O),T},v.prototype.getSerializer=function(w){var E=m.resolve(Ba);return I(E,w),E},v.prototype.ready=function(w){var E=this,O=E._driverSet.then(function(){return E._ready===null&&(E._ready=E._initDriver()),E._ready});return I(O,w,w),O},v.prototype.setDriver=function(w,E,O){var T=this;qh(w)||(w=[w]);var R=this._getSupportedDrivers(w);function P(){T._config.driver=T.driver()}function V(F){return T._extend(F),P(),T._ready=T._initStorage(T._config),T._ready}function H(F){return function(){var ee=0;function Ce(){for(;ee<F.length;){var Ge=F[ee];return ee++,T._dbInfo=null,T._ready=null,T.getDriver(Ge).then(V).catch(Ce)}P();var ze=new Error("No available storage method found.");return T._driverSet=m.reject(ze),T._driverSet}return Ce()}}var U=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=U.then(function(){var F=R[0];return T._dbInfo=null,T._ready=null,T.getDriver(F).then(function(ee){T._driver=ee._driver,P(),T._wrapLibraryMethodsWithReady(),T._initDriver=H(R)})}).catch(function(){P();var F=new Error("No available storage method found.");return T._driverSet=m.reject(F),T._driverSet}),I(this._driverSet,E,O),this._driverSet},v.prototype.supports=function(w){return!!Wh[w]},v.prototype._extend=function(w){Ua(this,w)},v.prototype._getSupportedDrivers=function(w){for(var E=[],O=0,T=w.length;O<T;O++){var R=w[O];this.supports(R)&&E.push(R)}return E},v.prototype._wrapLibraryMethodsWithReady=function(){for(var w=0,E=Fa.length;w<E;w++)d0(this,Fa[w])},v.prototype.createInstance=function(w){return new v(w)},v}(),p0=new f0;s.exports=p0},{3:3}]},{},[4])(4)})}),O0=vn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MustacheUtils=void 0;var t=class Lp{static escapeHtml(r){return String(r).replace(/"/g,i=>Lp.entityMap[i])}};e.MustacheUtils=t,t.entityMap={'"':"""}}),R0=vn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageDestination=e.AssetType=void 0;var t=function(r){return r[r.IMAGE=1]="IMAGE",r[r.VIDEO=2]="VIDEO",r[r.GIF=3]="GIF",r[r.SCREENSHOT=4]="SCREENSHOT",r[r.THREE_D=5]="THREE_D",r[r.FONT=6]="FONT",r[r.TEXT=7]="TEXT",r[r.JSON=8]="JSON",r[r.SVG=9]="SVG",r[r.HTML=10]="HTML",r[r.LOGO=11]="LOGO",r[r.OTHERS=1e3]="OTHERS",r}(t||(e.AssetType=t={})),n=function(r){return r.AWS_S3="AWS_S3",r.SHOPIFY_FILES="SHOPIFY_FILES",r}(n||(e.StorageDestination=n={}))}),D0=vn(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={}))}),N0=vn(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={}))}),k0=vn(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=e&&e.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(R0(),e),n(D0(),e),n(ho(),e),n(N0(),e)}),Mp=vn((e,t)=>{"use strict";(function(n,r){"use strict";var i="1.0.40",o="",s="?",a="function",l="undefined",u="object",d="string",f="major",p="model",g="name",m="type",b="vendor",I="version",A="architecture",$="console",j="mobile",k="tablet",G="smarttv",Pe="wearable",We="embedded",B=500,le="Amazon",ne="Apple",ye="ASUS",Ve="BlackBerry",Ue="Browser",_="Chrome",rt="Edge",et="Firefox",Te="Google",lt="Huawei",fe="LG",C="Microsoft",S="Motorola",q="Opera",J="Samsung",Q="Sharp",se="Sony",oe="Xiaomi",te="Zebra",pe="Facebook",xe="Chromium OS",Ke="Mac OS",Se=" Browser",De=function(Z,ge){var re={};for(var ke in Z)ge[ke]&&ge[ke].length%2===0?re[ke]=ge[ke].concat(Z[ke]):re[ke]=Z[ke];return re},Je=function(Z){for(var ge={},re=0;re<Z.length;re++)ge[Z[re].toUpperCase()]=Z[re];return ge},ve=function(Z,ge){return typeof Z===d?c(ge).indexOf(c(Z))!==-1:!1},c=function(Z){return Z.toLowerCase()},h=function(Z){return typeof Z===d?Z.replace(/[^\d\.]/g,o).split(".")[0]:r},y=function(Z,ge){if(typeof Z===d)return Z=Z.replace(/^\s\s*/,o),typeof ge===l?Z:Z.substring(0,B)},x=function(Z,ge){for(var re=0,ke,kt,St,Ae,ie,Jt;re<ge.length&&!ie;){var qr=ge[re],Ci=ge[re+1];for(ke=kt=0;ke<qr.length&&!ie&&qr[ke];)if(ie=qr[ke++].exec(Z),ie)for(St=0;St<Ci.length;St++)Jt=ie[++kt],Ae=Ci[St],typeof Ae===u&&Ae.length>0?Ae.length===2?typeof Ae[1]==a?this[Ae[0]]=Ae[1].call(this,Jt):this[Ae[0]]=Ae[1]:Ae.length===3?typeof Ae[1]===a&&!(Ae[1].exec&&Ae[1].test)?this[Ae[0]]=Jt?Ae[1].call(this,Jt,Ae[2]):r:this[Ae[0]]=Jt?Jt.replace(Ae[1],Ae[2]):r:Ae.length===4&&(this[Ae[0]]=Jt?Ae[3].call(this,Jt.replace(Ae[1],Ae[2])):r):this[Ae]=Jt||r;re+=2}},D=function(Z,ge){for(var re in ge)if(typeof ge[re]===u&&ge[re].length>0){for(var ke=0;ke<ge[re].length;ke++)if(ve(ge[re][ke],Z))return re===s?r:re}else if(ve(ge[re],Z))return re===s?r:re;return ge.hasOwnProperty("*")?ge["*"]:Z},M={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},W={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"},Ne={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,q+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[I,[g,q+" GX"]],[/\bopr\/([\w\.]+)/i],[I,[g,q]],[/\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"+Ue]],[/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 "+Ue]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+Ue],I],[/\bfocus\/([\w\.]+)/i],[I,[g,et+" Focus"]],[/\bopt\/([\w\.]+)/i],[I,[g,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[I,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[I,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[I,[g,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[I,[g,"MIUI"+Se]],[/fxios\/([\w\.-]+)/i],[I,[g,et]],[/\bqihoobrowser\/?([\w\.]*)/i],[I,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],I],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+Se],I],[/samsungbrowser\/([\w\.]+)/i],[I,[g,J+" 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,pe],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,_+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,_+" WebView"],I],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[I,[g,"Android "+Ue]],[/(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,D,M]],[/(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,et+" 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,c]],[/((?: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/,o,c]],[/(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,c]]],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],[p,[b,J],[m,k]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[p,[b,J],[m,j]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[b,ne],[m,j]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[b,ne],[m,k]],[/(macintosh);/i],[p,[b,ne]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[b,Q],[m,j]],[/(?:honor)([-\w ]+)[;\)]/i],[p,[b,"Honor"],[m,j]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[b,lt],[m,k]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[b,lt],[m,j]],[/\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],[[p,/_/g," "],[b,oe],[m,j]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[b,oe],[m,k]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[b,"OPPO"],[m,j]],[/\b(opd2\d{3}a?) bui/i],[p,[b,"OPPO"],[m,k]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[b,"Vivo"],[m,j]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[p,[b,"Realme"],[m,j]],[/\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],[p,[b,S],[m,j]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[b,S],[m,k]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[b,fe],[m,k]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[b,fe],[m,j]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[b,"Lenovo"],[m,k]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[b,"Nokia"],[m,j]],[/(pixel c)\b/i],[p,[b,Te],[m,k]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[b,Te],[m,j]],[/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],[p,[b,se],[m,j]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[b,se],[m,k]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[b,"OnePlus"],[m,j]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[b,le],[m,k]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[b,le],[m,j]],[/(playbook);[-\w\),; ]+(rim)/i],[p,b,[m,k]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[b,Ve],[m,j]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[b,ye],[m,k]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[b,ye],[m,j]],[/(nexus 9)/i],[p,[b,"HTC"],[m,k]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[p,/_/g," "],[m,j]],[/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],[p,[b,"TCL"],[m,k]],[/(itel) ((\w+))/i],[[b,c],p,[m,D,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[b,"Acer"],[m,k]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[b,"Meizu"],[m,j]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[p,[b,"Ulefone"],[m,j]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[p,[b,"Energizer"],[m,j]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[p,[b,"Cat"],[m,j]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[p,[b,"Smartfren"],[m,j]],[/droid.+; (a(?:015|06[35]|142p?))/i],[p,[b,"Nothing"],[m,j]],[/(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,p,[m,j]],[/(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,p,[m,k]],[/(surface duo)/i],[p,[b,C],[m,k]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[b,"Fairphone"],[m,j]],[/(u304aa)/i],[p,[b,"AT&T"],[m,j]],[/\bsie-(\w*)/i],[p,[b,"Siemens"],[m,j]],[/\b(rct\w+) b/i],[p,[b,"RCA"],[m,k]],[/\b(venue[\d ]{2,7}) b/i],[p,[b,"Dell"],[m,k]],[/\b(q(?:mv|ta)\w+) b/i],[p,[b,"Verizon"],[m,k]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[b,"Barnes & Noble"],[m,k]],[/\b(tm\d{3}\w+) b/i],[p,[b,"NuVision"],[m,k]],[/\b(k88) b/i],[p,[b,"ZTE"],[m,k]],[/\b(nx\d{3}j) b/i],[p,[b,"ZTE"],[m,j]],[/\b(gen\d{3}) b.+49h/i],[p,[b,"Swiss"],[m,j]],[/\b(zur\d{3}) b/i],[p,[b,"Swiss"],[m,k]],[/\b((zeki)?tb.*\b) b/i],[p,[b,"Zeki"],[m,k]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],p,[m,k]],[/\b(ns-?\w{0,9}) b/i],[p,[b,"Insignia"],[m,k]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[b,"NextBook"],[m,k]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[b,"Voice"],p,[m,j]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],p,[m,j]],[/\b(ph-1) /i],[p,[b,"Essential"],[m,j]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[b,"Envizen"],[m,k]],[/\b(trio[-\w\. ]+) b/i],[p,[b,"MachSpeed"],[m,k]],[/\btu_(1491) b/i],[p,[b,"Rotor"],[m,k]],[/(shield[\w ]+) b/i],[p,[b,"Nvidia"],[m,k]],[/(sprint) (\w+)/i],[b,p,[m,j]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[b,C],[m,j]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[b,te],[m,k]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[b,te],[m,j]],[/smart-tv.+(samsung)/i],[b,[m,G]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[b,J],[m,G]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,fe],[m,G]],[/(apple) ?tv/i],[b,[p,ne+" TV"],[m,G]],[/crkey/i],[[p,_+"cast"],[b,Te],[m,G]],[/droid.+aft(\w+)( bui|\))/i],[p,[b,le],[m,G]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[b,Q],[m,G]],[/(bravia[\w ]+)( bui|\))/i],[p,[b,se],[m,G]],[/(mitv-\w{5}) bui/i],[p,[b,oe],[m,G]],[/Hbbtv.*(technisat) (.*);/i],[b,p,[m,G]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,y],[p,y],[m,G]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,G]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,p,[m,$]],[/droid.+; (shield) bui/i],[p,[b,"Nvidia"],[m,$]],[/(playstation [345portablevi]+)/i],[p,[b,se],[m,$]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[b,C],[m,$]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[p,[b,J],[m,Pe]],[/((pebble))app/i],[b,p,[m,Pe]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[b,ne],[m,Pe]],[/droid.+; (glass) \d/i],[p,[b,Te],[m,Pe]],[/droid.+; (wt63?0{2,3})\)/i],[p,[b,te],[m,Pe]],[/droid.+; (glass) \d/i],[p,[b,Te],[m,Pe]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,p,[m,Pe]],[/; (quest( \d| pro)?)/i],[p,[b,pe],[m,Pe]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[m,We]],[/(aeobc)\b/i],[p,[b,le],[m,We]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[p,[m,j]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[m,k]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,k]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,j]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[I,[g,rt+"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,D,W]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[I,D,W],[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,Ke],[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,Ve]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[I,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[I,[g,et+" 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,_+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,xe],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]]},Ie=function(Z,ge){if(typeof Z===u&&(ge=Z,Z=r),!(this instanceof Ie))return new Ie(Z,ge).getResult();var re=typeof n!==l&&n.navigator?n.navigator:r,ke=Z||(re&&re.userAgent?re.userAgent:o),kt=re&&re.userAgentData?re.userAgentData:r,St=ge?De(Ne,ge):Ne,Ae=re&&re.userAgent==ke;return this.getBrowser=function(){var ie={};return ie[g]=r,ie[I]=r,x.call(ie,ke,St.browser),ie[f]=h(ie[I]),Ae&&re&&re.brave&&typeof re.brave.isBrave==a&&(ie[g]="Brave"),ie},this.getCPU=function(){var ie={};return ie[A]=r,x.call(ie,ke,St.cpu),ie},this.getDevice=function(){var ie={};return ie[b]=r,ie[p]=r,ie[m]=r,x.call(ie,ke,St.device),Ae&&!ie[m]&&kt&&kt.mobile&&(ie[m]=j),Ae&&ie[p]=="Macintosh"&&re&&typeof re.standalone!==l&&re.maxTouchPoints&&re.maxTouchPoints>2&&(ie[p]="iPad",ie[m]=k),ie},this.getEngine=function(){var ie={};return ie[g]=r,ie[I]=r,x.call(ie,ke,St.engine),ie},this.getOS=function(){var ie={};return ie[g]=r,ie[I]=r,x.call(ie,ke,St.os),Ae&&!ie[g]&&kt&&kt.platform&&kt.platform!="Unknown"&&(ie[g]=kt.platform.replace(/chrome os/i,xe).replace(/macos/i,Ke)),ie},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 ke},this.setUA=function(ie){return ke=typeof ie===d&&ie.length>B?y(ie,B):ie,this},this.setUA(ke),this};Ie.VERSION=i,Ie.BROWSER=Je([g,I,f]),Ie.CPU=Je([A]),Ie.DEVICE=Je([p,b,m,$,j,G,k,Pe,We]),Ie.ENGINE=Ie.OS=Je([g,I]),typeof e!==l?(typeof t!==l&&t.exports&&(e=t.exports=Ie),e.UAParser=Ie):typeof define===a&&define.amd?define(function(){return Ie}):typeof n!==l&&(n.UAParser=Ie);var be=typeof n!==l&&(n.jQuery||n.Zepto);if(be&&!be.ua){var He=new Ie;be.ua=He.getResult(),be.ua.get=function(){return He.getUA()},be.ua.set=function(Z){He.setUA(Z);var ge=He.getResult();for(var re in ge)be.ua[re]=ge[re]}}})(typeof window=="object"?window:e)}),A0=vn((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(o,s){if(s=s||{},typeof o!="function")throw new i("fetch must be a function");if(typeof s!="object")throw new i("defaults must be an object");if(s.retries!==void 0&&!r(s.retries))throw new i("retries must be a positive integer");if(s.retryDelay!==void 0&&!r(s.retryDelay)&&typeof s.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(s.retryOn!==void 0&&!Array.isArray(s.retryOn)&&typeof s.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return s=Object.assign(a,s),function(l,u){var d=s.retries,f=s.retryDelay,p=s.retryOn;if(u&&u.retries!==void 0)if(r(u.retries))d=u.retries;else throw new i("retries must be a positive integer");if(u&&u.retryDelay!==void 0)if(r(u.retryDelay)||typeof u.retryDelay=="function")f=u.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(u&&u.retryOn)if(Array.isArray(u.retryOn)||typeof u.retryOn=="function")p=u.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(g,m){var b=function(A){var $=typeof Request<"u"&&l instanceof Request?l.clone():l;o($,u).then(function(j){if(Array.isArray(p)&&p.indexOf(j.status)===-1)g(j);else if(typeof p=="function")try{return Promise.resolve(p(A,null,j)).then(function(k){k?I(A,null,j):g(j)}).catch(m)}catch(k){m(k)}else A<d?I(A,null,j):g(j)}).catch(function(j){if(typeof p=="function")try{Promise.resolve(p(A,j,null)).then(function(k){k?I(A,j,null):m(j)}).catch(function(k){m(k)})}catch(k){m(k)}else A<d?I(A,j,null):m(j)})};function I(A,$,j){var k=typeof f=="function"?f(A,$,j):f;setTimeout(function(){b(++A)},k)}b(0)})}};function r(o){return Number.isInteger(o)&&o>=0}function i(o){this.name="ArgumentError",this.message=o}return n})});function P0(e,t){return Object.is(e,t)}var mt=null,Jo=!1,ou=1,tr=Symbol("SIGNAL");function Oe(e){let t=mt;return mt=e,t}function L0(){return mt}var su={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 M0(e){if(Jo)throw new Error("");if(mt===null)return;mt.consumerOnSignalRead(e);let t=mt.nextProducerIndex++;if(Ws(mt),t<mt.producerNode.length&&mt.producerNode[t]!==e&&qi(mt)){let n=mt.producerNode[t];qs(n,mt.producerIndexOfThis[t])}mt.producerNode[t]!==e&&(mt.producerNode[t]=e,mt.producerIndexOfThis[t]=qi(mt)?Up(e,mt,t):0),mt.producerLastReadVersion[t]=e.version}function j0(){ou++}function V0(e){if(!(qi(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===ou)){if(!e.producerMustRecompute(e)&&!Bp(e)){Kh(e);return}e.producerRecomputeValue(e),Kh(e)}}function jp(e){if(e.liveConsumerNode===void 0)return;let t=Jo;Jo=!0;try{for(let n of e.liveConsumerNode)n.dirty||B0(n)}finally{Jo=t}}function Vp(){return mt?.consumerAllowSignalWrites!==!1}function B0(e){e.dirty=!0,jp(e),e.consumerMarkedDirty?.(e)}function Kh(e){e.dirty=!1,e.lastCleanEpoch=ou}function Jh(e){return e&&(e.nextProducerIndex=0),Oe(e)}function F0(e,t){if(Oe(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(qi(e))for(let n=e.nextProducerIndex;n<e.producerNode.length;n++)qs(e.producerNode[n],e.producerIndexOfThis[n]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Bp(e){Ws(e);for(let t=0;t<e.producerNode.length;t++){let n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(V0(n),r!==n.version))return!0}return!1}function Fp(e){if(Ws(e),qi(e))for(let t=0;t<e.producerNode.length;t++)qs(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 Up(e,t,n){if(Hp(e),e.liveConsumerNode.length===0&&$p(e))for(let r=0;r<e.producerNode.length;r++)e.producerIndexOfThis[r]=Up(e.producerNode[r],e,r);return e.liveConsumerIndexOfThis.push(n),e.liveConsumerNode.push(t)-1}function qs(e,t){if(Hp(e),e.liveConsumerNode.length===1&&$p(e))for(let r=0;r<e.producerNode.length;r++)qs(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];Ws(i),i.producerIndexOfThis[r]=t}}function qi(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function Ws(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function Hp(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function $p(e){return e.producerNode!==void 0}function U0(){throw new Error}var zp=U0;function qp(e){zp(e)}function H0(e){zp=e}var $0=null;function z0(e){let t=Object.create(W0);t.value=e;let n=()=>(M0(t),t.value);return n[tr]=t,n}function Wp(e,t){Vp()||qp(e),e.equal(e.value,t)||(e.value=t,G0(e))}function q0(e,t){Vp()||qp(e),Wp(e,t(e.value))}var W0=Qe(L({},su),{equal:P0,value:void 0,kind:"signal"});function G0(e){e.version++,j0(),jp(e),$0?.()}function Ze(e){return typeof e=="function"}function Gp(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 za=Gp(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 ko(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ot=class zd{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 pu?s.errors:[s]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let s of i)try{hw(s)}catch(o){t=t??[],o instanceof pu?t=[...t,...o.errors]:t.push(o)}}if(t)throw new pu(t)}}add(t){var n;if(t&&t!==this)if(this.closed)hw(t);else{if(t instanceof zd){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)&&ko(n,t)}remove(t){let{_finalizers:n}=this;n&&ko(n,t),t instanceof zd&&t._removeParent(this)}};ot.EMPTY=(()=>{let e=new ot;return e.closed=!0,e})();var Xh=ot.EMPTY;function hu(e){return e instanceof ot||e&&"closed"in e&&Ie(e.remove)&&Ie(e.add)&&Ie(e.unsubscribe)}function hw(e){Ie(e)?e():e.unsubscribe()}var Rr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Gs={setTimeout(e,t,...n){let{delegate:r}=Gs;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Gs;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function mu(e){Gs.setTimeout(()=>{let{onUnhandledError:t}=Rr;if(t)t(e);else throw e})}function Ac(){}var mw=Jh("C",void 0,void 0);function gw(e){return Jh("E",void 0,e)}function yw(e){return Jh("N",e,void 0)}function Jh(e,t,n){return{kind:e,value:t,error:n}}var Lo=null;function zs(e){if(Rr.useDeprecatedSynchronousErrorHandling){let t=!Lo;if(t&&(Lo={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=Lo;if(Lo=null,n)throw r}}else e()}function vw(e){Rr.useDeprecatedSynchronousErrorHandling&&Lo&&(Lo.errorThrown=!0,Lo.error=e)}var Fo=class extends ot{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,hu(e)&&e.add(this)):this.destination=bN}static create(e,t,n){return new qs(e,t,n)}next(e){this.isStopped?em(yw(e),this):this._next(e)}error(e){this.isStopped?em(gw(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?em(mw,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()}}},EN=Function.prototype.bind;function Qh(e,t){return EN.call(e,t)}var tm=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){gu(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){gu(n)}else gu(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){gu(t)}}},qs=class extends Fo{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&&Rr.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Qh(e.next,i),error:e.error&&Qh(e.error,i),complete:e.complete&&Qh(e.complete,i)}):r=e}this.destination=new tm(r)}};function gu(e){Rr.useDeprecatedSynchronousErrorHandling?vw(e):mu(e)}function wN(e){throw e}function em(e,t){let{onStoppedNotification:n}=Rr;n&&Gs.setTimeout(()=>n(e,t))}var bN={closed:!0,next:Ac,error:wN,complete:Ac},Ys=typeof Symbol=="function"&&Symbol.observable||"@@observable";function no(e){return e}function _w(e){return e.length===0?no:e.length===1?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}var nt=(()=>{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=SN(n)?n:new qs(n,r,i);return zs(()=>{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=Ew(r),new r((i,s)=>{let o=new qs({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)}[Ys](){return this}pipe(...n){return _w(n)(this)}toPromise(n){return n=Ew(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 Ew(e){var t;return(t=e??Rr.Promise)!==null&&t!==void 0?t:Promise}function CN(e){return e&&Ie(e.next)&&Ie(e.error)&&Ie(e.complete)}function SN(e){return e&&e instanceof Fo||CN(e)&&hu(e)}function DN(e){return Ie(e?.lift)}function bt(e){return t=>{if(DN(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 It(e,t,n,r,i){return new nm(e,t,n,r,i)}var nm=class extends Fo{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))}}},Ks={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=Ks;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let i=t(s=>{n=void 0,e(s)});return new ot(()=>n?.(i))},requestAnimationFrame(...e){let{delegate:t}=Ks;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=Ks;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},ww=fu(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),J=(()=>{class e extends nt{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 ww}next(n){zs(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){zs(()=>{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(){zs(()=>{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?Xh:(this.currentObservers=null,s.push(n),new ot(()=>{this.currentObservers=null,ko(s,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:s}=this;r?n.error(i):s&&n.complete()}asObservable(){let n=new nt;return n.source=this,n}}return e.create=(t,n)=>new yu(t,n),e})(),yu=class extends J{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:Xh}},Nr=class extends J{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)}},Oc={now(){return(Oc.delegate||Date).now()},delegate:void 0},Bo=class extends J{constructor(e=1/0,t=1/0,n=Oc){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)}}},vu=class extends ot{constructor(e,t){super()}schedule(e,t=0){return this}},Mc={setInterval(e,t,...n){let{delegate:r}=Mc;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=Mc;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},Zs=class extends vu{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 Mc.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&&Mc.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,ko(n,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},Xs=class $E{constructor(t,n=$E.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};Xs.now=Oc.now;var Js=class extends Xs{constructor(e,t=Xs.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}}},Vo=new Js(Zs),bw=Vo,_u=class extends Zs{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=Ks.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&&(Ks.cancelAnimationFrame(t),e._scheduled=void 0)}},Eu=class extends Js{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}}},wu=new Eu(_u),Uo=new nt(e=>e.complete());function bu(e){return e&&Ie(e.schedule)}function Cw(e){return e[e.length-1]}function ro(e){return bu(Cw(e))?e.pop():void 0}function Sw(e,t){return typeof Cw(e)=="number"?e.pop():t}function Iw(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 Dw(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 Ho(e){return this instanceof Ho?(this.v=e,this):new Ho(e)}function Tw(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(x,P){s.push([g,b,x,P])>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 Ho?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 xw(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 Dw=="function"?Dw(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 Qs=e=>e&&typeof e.length=="number"&&typeof e!="function";function Cu(e){return Ie(e?.then)}function Su(e){return Ie(e[Ys])}function Du(e){return Symbol.asyncIterator&&Ie(e?.[Symbol.asyncIterator])}function Iu(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 IN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Tu=IN();function xu(e){return Ie(e?.[Tu])}function Ru(e){return Tw(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:n,done:r}=yield Ho(t.read());if(r)return yield Ho(void 0);yield yield Ho(n)}}finally{t.releaseLock()}})}function Nu(e){return Ie(e?.getReader)}function Bt(e){if(e instanceof nt)return e;if(e!=null){if(Su(e))return TN(e);if(Qs(e))return xN(e);if(Cu(e))return RN(e);if(Du(e))return Rw(e);if(xu(e))return NN(e);if(Nu(e))return AN(e)}throw Iu(e)}function TN(e){return new nt(t=>{let n=e[Ys]();if(Ie(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function xN(e){return new nt(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function RN(e){return new nt(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,mu)})}function NN(e){return new nt(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function Rw(e){return new nt(t=>{ON(e,t).catch(n=>t.error(n))})}function AN(e){return Rw(Ru(e))}function ON(e,t){var n,r,i,s;return Iw(this,void 0,void 0,function*(){try{for(n=xw(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 fr(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 Au(e,t=0){return bt((n,r)=>{n.subscribe(It(r,i=>fr(r,e,()=>r.next(i),t),()=>fr(r,e,()=>r.complete(),t),i=>fr(r,e,()=>r.error(i),t)))})}function Ou(e,t=0){return bt((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Nw(e,t){return Bt(e).pipe(Ou(t),Au(t))}function Aw(e,t){return Bt(e).pipe(Ou(t),Au(t))}function Ow(e,t){return new nt(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Mw(e,t){return new nt(n=>{let r;return fr(n,t,()=>{r=e[Tu](),fr(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 Mu(e,t){if(!e)throw new Error("Iterable cannot be null");return new nt(n=>{fr(n,t,()=>{let r=e[Symbol.asyncIterator]();fr(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function Pw(e,t){return Mu(Ru(e),t)}function kw(e,t){if(e!=null){if(Su(e))return Nw(e,t);if(Qs(e))return Ow(e,t);if(Cu(e))return Aw(e,t);if(Du(e))return Mu(e,t);if(xu(e))return Mw(e,t);if(Nu(e))return Pw(e,t)}throw Iu(e)}function Ci(e,t){return t?kw(e,t):Bt(e)}function jo(...e){let t=ro(e);return Ci(e,t)}function Lw(e){return e instanceof Date&&!isNaN(e)}function pr(e,t){return bt((n,r)=>{let i=0;n.subscribe(It(r,s=>{r.next(e.call(t,s,i++))}))})}var{isArray:MN}=Array;function PN(e,t){return MN(t)?e(...t):e(t)}function Fw(e){return pr(t=>PN(e,t))}function Bw(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 x=!1;Bt(n(b,h++)).subscribe(It(t,P=>{i?.(P),s?g(P):t.next(P)},()=>{x=!0},void 0,()=>{if(x)try{for(c--;l.length&&c<r;){let P=l.shift();o?fr(t,o,()=>m(P)):m(P)}f()}catch(P){t.error(P)}}))};return e.subscribe(It(t,g,()=>{d=!0,f()})),()=>{a?.()}}function Si(e,t,n=1/0){return Ie(t)?Si((r,i)=>pr((s,o)=>t(r,s,i,o))(Bt(e(r,i))),n):(typeof t=="number"&&(n=t),bt((r,i)=>Bw(r,i,e,n)))}function Pu(e=1/0){return Si(no,e)}function Vw(){return Pu(1)}function rm(...e){return Vw()(Ci(e,ro(e)))}function im(e){return new nt(t=>{Bt(e()).subscribe(t)})}var kN=["addListener","removeListener"],LN=["addEventListener","removeEventListener"],FN=["on","off"];function Di(e,t,n,r){if(Ie(n)&&(r=n,n=void 0),r)return Di(e,t,n).pipe(Fw(r));let[i,s]=UN(e)?LN.map(o=>a=>e[o](t,a,n)):BN(e)?kN.map(Uw(e,t)):VN(e)?FN.map(Uw(e,t)):[];if(!i&&Qs(e))return Si(o=>Di(o,t,n))(Bt(e));if(!i)throw new TypeError("Invalid event target");return new nt(o=>{let a=(...l)=>o.next(1<l.length?l:l[0]);return i(a),()=>s(a)})}function Uw(e,t){return n=>r=>e[n](t,r)}function BN(e){return Ie(e.addListener)&&Ie(e.removeListener)}function VN(e){return Ie(e.on)&&Ie(e.off)}function UN(e){return Ie(e.addEventListener)&&Ie(e.removeEventListener)}function ku(e=0,t,n=bw){let r=-1;return t!=null&&(bu(t)?n=t:r=t),new nt(i=>{let s=Lw(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 om(e=0,t=Vo){return e<0&&(e=0),ku(e,e,t)}function io(...e){let t=ro(e),n=Sw(e,1/0),r=e;return r.length?r.length===1?Bt(r[0]):Pu(n)(Ci(r,t)):Uo}function $o(e,t){return bt((n,r)=>{let i=0;n.subscribe(It(r,s=>e.call(t,s,i++)&&r.next(s)))})}function Hw(e){return bt((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(It(n,c=>{r=!0,i=c,s||Bt(e(c)).subscribe(s=It(n,a,l))},()=>{o=!0,(!r||!s||s.closed)&&n.complete()}))})}function Lu(e,t=Vo){return Hw(()=>ku(e,t))}function Ar(e,t=Vo){return bt((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(It(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 sm(e){return e<=0?()=>Uo:bt((t,n)=>{let r=0;t.subscribe(It(n,i=>{++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Fu(e,t=no){return e=e??HN,bt((n,r)=>{let i,s=!0;n.subscribe(It(r,o=>{let a=t(o);(s||!e(i,a))&&(s=!1,i=a,r.next(o))}))})}function HN(e,t){return e===t}function am(e){return $o((t,n)=>e<=n)}function Ii(...e){let t=ro(e);return bt((n,r)=>{(t?rm(e,n,t):rm(e,n)).subscribe(r)})}function ea(e,t){return bt((n,r)=>{let i=null,s=0,o=!1,a=()=>o&&!i&&r.complete();n.subscribe(It(r,l=>{i?.unsubscribe();let c=0,h=s++;Bt(e(l,h)).subscribe(i=It(r,d=>r.next(t?t(l,d,h,c++):d),()=>{i=null,a()}))},()=>{o=!0,a()}))})}function hr(e){return bt((t,n)=>{Bt(e).subscribe(It(n,()=>n.complete(),Ac)),!n.closed&&t.subscribe(n)})}function cm(e,t,n){let r=Ie(e)||t||n?{next:e,error:t,complete:n}:e;return r?bt((i,s)=>{var o;(o=r.subscribe)===null||o===void 0||o.call(r);let a=!0;i.subscribe(It(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)}))}):no}var Nb="https://g.co/ng/security#xss",$e=class extends Error{code;constructor(e,t){super(xg(e,t)),this.code=e}};function xg(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}function Rg(e){return{toString:e}.toString()}var Go=globalThis;function Tt(e){for(let t in e)if(e[t]===Tt)return t;throw Error("Could not find renamed property on target object.")}function jN(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function mr(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(mr).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
|
|
5
|
-
`+e.message,i,n,r),e[
|
|
6
|
-
`&&e.charAt(1)==
|
|
7
|
-
`)}`}function zo(e,t){return e.hasOwnProperty(Yu)?e[Yu]:null}function sA(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 aA(e){return e.flat(Number.POSITIVE_INFINITY)}function Pg(e,t){e.forEach(n=>Array.isArray(n)?Pg(n,t):t(n))}function Fb(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Zu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function cA(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 lA(e,t,n){let r=Xc(e,t);return r>=0?e[r|1]=n:(r=~r,cA(e,r,t,n)),r}function lm(e,t){let n=Xc(e,t);if(n>=0)return e[n|1]}function Xc(e,t){return uA(e,t,1)}function uA(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 qo={},xi=[],Vc=new pe(""),Bb=new pe("",-1),Vb=new pe(""),Xu=class{get(e,t=Bc){if(t===Bc){let n=new Error(`NullInjectorError: No provider for ${mr(e)}!`);throw n.name="NullInjectorError",n}return t}};function Yo(e){return e[zN]||null}function Ub(e){return e[qN]||null}function Hb(e){return e[Og]||null}function dA(e){let t=Yo(e)||Ub(e)||Hb(e);return t!==null&&t.standalone}function jb(e){return{\u0275providers:e}}function fA(...e){return{\u0275providers:$b(!0,e),\u0275fromNgModule:!0}}function $b(e,...t){let n=[],r=new Set,i,s=o=>{n.push(o)};return Pg(t,o=>{let a=o;Im(a,s,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Wb(i,s),n}function Wb(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];kg(i,s=>{t(s,r)})}}function Im(e,t,n,r){if(e=kn(e),!e)return!1;let i=null,s=Ww(e),o=!s&&Yo(e);if(!s&&!o){let l=e.ngModule;if(s=Ww(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)Im(c,t,n,r)}}else if(s){if(s.imports!=null&&!a){r.add(i);let c;try{Pg(s.imports,h=>{Im(h,t,n,r)&&(c||=[],c.push(h))})}finally{}c!==void 0&&Wb(c,t)}if(!a){let c=zo(i)||(()=>new i);t({provide:i,useFactory:c,deps:xi},i),t({provide:Vb,useValue:i,multi:!0},i),t({provide:Vc,useValue:()=>Ze(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;kg(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function kg(e,t){for(let n of e)Pb(n)&&(n=n.\u0275providers),Array.isArray(n)?kg(n,t):t(n)}var pA=Tt({provide:String,useValue:Tt});function Gb(e){return e!==null&&typeof e=="object"&&pA in e}function hA(e){return!!(e&&e.useExisting)}function mA(e){return!!(e&&e.useFactory)}function ca(e){return typeof e=="function"}function gA(e){return!!e.useClass}var vd=new pe(""),ju={},yA={},um;function _d(){return um===void 0&&(um=new Xu),um}var Gn=class{},Uc=class extends Gn{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,xm(e,s=>this.processProvider(s)),this.records.set(Bb,ta(void 0,this)),r.has("environment")&&this.records.set(Gn,ta(void 0,this));let i=this.records.get(vd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Vb,xi,Ke.Self))}destroy(){kc(this),this._destroyed=!0;let e=je(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(),je(e)}}onDestroy(e){return kc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){kc(this);let t=oo(this),n=Wn(void 0),r;try{return e()}finally{oo(t),Wn(n)}}get(e,t=Bc,n=Ke.Default){if(kc(this),e.hasOwnProperty(zw))return e[zw](this);n=yd(n);let r,i=oo(this),s=Wn(void 0);try{if(!(n&Ke.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=bA(e)&&Ag(e);l&&this.injectableDefInScope(l)?a=ta(Tm(e),ju):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=n&Ke.Self?_d():this.parent;return t=n&Ke.Optional&&t===Bc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ku]=o[Ku]||[]).unshift(mr(e)),i)throw o;return iA(o,e,"R3InjectorError",this.source)}else throw o}finally{Wn(s),oo(i)}}resolveInjectorInitializers(){let e=je(null),t=oo(this),n=Wn(void 0),r;try{let i=this.get(Vc,xi,Ke.Self);for(let s of i)s()}finally{oo(t),Wn(n),je(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(mr(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=kn(e);let t=ca(e)?e:kn(e&&e.provide),n=_A(e);if(!ca(e)&&e.multi===!0){let r=this.records.get(t);r||(r=ta(void 0,ju,!0),r.factory=()=>Dm(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=je(null);try{return t.value===ju&&(t.value=yA,t.value=t.factory()),typeof t.value=="object"&&t.value&&wA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{je(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=kn(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 Tm(e){let t=Ag(e),n=t!==null?t.factory:zo(e);if(n!==null)return n;if(e instanceof pe)throw new $e(204,!1);if(e instanceof Function)return vA(e);throw new $e(204,!1)}function vA(e){if(e.length>0)throw new $e(204,!1);let t=WN(e);return t!==null?()=>t.factory(e):()=>new e}function _A(e){if(Gb(e))return ta(void 0,e.useValue);{let t=zb(e);return ta(t,ju)}}function zb(e,t,n){let r;if(ca(e)){let i=kn(e);return zo(i)||Tm(i)}else if(Gb(e))r=()=>kn(e.useValue);else if(mA(e))r=()=>e.useFactory(...Dm(e.deps||[]));else if(hA(e))r=()=>Ze(kn(e.useExisting));else{let i=kn(e&&(e.useClass||e.provide));if(EA(e))r=()=>new i(...Dm(e.deps));else return zo(i)||Tm(i)}return r}function kc(e){if(e.destroyed)throw new $e(205,!1)}function ta(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function EA(e){return!!e.deps}function wA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function bA(e){return typeof e=="function"||typeof e=="object"&&e instanceof pe}function xm(e,t){for(let n of e)Array.isArray(n)?xm(n,t):n&&Pb(n)?xm(n.\u0275providers,t):t(n)}function qb(e,t){e instanceof Uc&&kc(e);let n,r=oo(e),i=Wn(void 0);try{return t()}finally{oo(r),Wn(i)}}function Yb(){return kb()!==void 0||tA()!=null}function Kb(e){if(!Yb())throw new $e(-203,!1)}function CA(e){return typeof e=="function"}var Fi=0,_e=1,be=2,Rn=3,Mr=4,Lr=5,Hc=6,Ju=7,jt=8,jc=9,Ri=10,sn=11,$c=12,Yw=13,pa=14,Pr=15,Ko=16,na=17,Ni=18,Jc=19,Zb=20,so=21,dm=22,Qu=23,Qn=24,sa=25,Vt=26,Xb=1,Zo=7,ed=8,la=9,xn=10;function Ti(e){return Array.isArray(e)&&typeof e[Xb]=="object"}function Bi(e){return Array.isArray(e)&&e[Xb]===!0}function Lg(e){return(e.flags&4)!==0}function ha(e){return e.componentOffset>-1}function Ed(e){return(e.flags&1)===1}function Kr(e){return!!e.template}function td(e){return(e[be]&512)!==0}function Qc(e){return(e[be]&256)===256}var Rm=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Jb(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var ns=(()=>{let e=()=>Qb;return e.ngInherit=!0,e})();function Qb(e){return e.type.prototype.ngOnChanges&&(e.setInput=DA),SA}function SA(){let e=tC(this),t=e?.current;if(t){let n=e.previous;if(n===qo)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function DA(e,t,n,r,i){let s=this.declaredInputs[r],o=tC(e)||IA(e,{previous:qo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new Rm(c&&c.currentValue,n,l===qo),Jb(e,t,i,n)}var eC="__ngSimpleChanges__";function tC(e){return e[eC]||null}function IA(e,t){return e[eC]=t}var Kw=null,pt=function(e,t=null,n){Kw?.(e,t,n)},nC="svg",TA="math";function er(e){for(;Array.isArray(e);)e=e[Fi];return e}function rC(e,t){return er(t[e])}function Xr(e,t){return er(t[e.index])}function Fg(e,t){return e.data[t]}function wd(e,t){return e[t]}function gr(e,t){let n=t[e];return Ti(n)?n:n[Fi]}function xA(e){return(e[be]&4)===4}function Bg(e){return(e[be]&128)===128}function RA(e){return Bi(e[Rn])}function ao(e,t){return t==null?null:e[t]}function iC(e){e[na]=0}function Vg(e){e[be]&1024||(e[be]|=1024,Bg(e)&&el(e))}function NA(e,t){for(;e>0;)t=t[pa],e--;return t}function bd(e){return!!(e[be]&9216||e[Qn]?.dirty)}function Nm(e){e[Ri].changeDetectionScheduler?.notify(8),e[be]&64&&(e[be]|=1024),bd(e)&&el(e)}function el(e){e[Ri].changeDetectionScheduler?.notify(0);let t=Xo(e);for(;t!==null&&!(t[be]&8192||(t[be]|=8192,!Bg(t)));)t=Xo(t)}function oC(e,t){if(Qc(e))throw new $e(911,!1);e[so]===null&&(e[so]=[]),e[so].push(t)}function AA(e,t){if(e[so]===null)return;let n=e[so].indexOf(t);n!==-1&&e[so].splice(n,1)}function Xo(e){let t=e[Rn];return Bi(t)?t[Rn]:t}function sC(e){return e[Ju]??=[]}function aC(e){return e.cleanup??=[]}function OA(e,t,n,r){let i=sC(t);i.push(n),e.firstCreatePass&&aC(e).push(r,i.length-1)}var xe={lFrame:mC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Am=!1;function MA(){return xe.lFrame.elementDepthCount}function PA(){xe.lFrame.elementDepthCount++}function kA(){xe.lFrame.elementDepthCount--}function Ug(){return xe.bindingsEnabled}function LA(){return xe.skipHydrationRootTNode!==null}function FA(e){return xe.skipHydrationRootTNode===e}function BA(){xe.skipHydrationRootTNode=null}function Fe(){return xe.lFrame.lView}function Zt(){return xe.lFrame.tView}function Xt(e){return xe.lFrame.contextLView=e,e[jt]}function Jt(e){return xe.lFrame.contextLView=null,e}function tr(){let e=cC();for(;e!==null&&e.type===64;)e=e.parent;return e}function cC(){return xe.lFrame.currentTNode}function VA(){let e=xe.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function lo(e,t){let n=xe.lFrame;n.currentTNode=e,n.isParent=t}function Hg(){return xe.lFrame.isParent}function lC(){xe.lFrame.isParent=!1}function uC(){return xe.lFrame.contextLView}function dC(){return Am}function Zw(e){let t=Am;return Am=e,t}function jg(){let e=xe.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function UA(e){return xe.lFrame.bindingIndex=e}function tl(){return xe.lFrame.bindingIndex++}function HA(e){let t=xe.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function jA(){return xe.lFrame.inI18n}function $A(e,t){let n=xe.lFrame;n.bindingIndex=n.bindingRootIndex=e,Om(t)}function WA(){return xe.lFrame.currentDirectiveIndex}function Om(e){xe.lFrame.currentDirectiveIndex=e}function GA(e){let t=xe.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function fC(){return xe.lFrame.currentQueryIndex}function $g(e){xe.lFrame.currentQueryIndex=e}function zA(e){let t=e[_e];return t.type===2?t.declTNode:t.type===1?e[Lr]:null}function pC(e,t,n){if(n&Ke.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(n&Ke.Host))&&(i=zA(s),!(i===null||(s=s[pa],i.type&10))););if(i===null)return!1;t=i,e=s}let r=xe.lFrame=hC();return r.currentTNode=t,r.lView=e,!0}function Wg(e){let t=hC(),n=e[_e];xe.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function hC(){let e=xe.lFrame,t=e===null?null:e.child;return t===null?mC(e):t}function mC(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 gC(){let e=xe.lFrame;return xe.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var yC=gC;function Gg(){let e=gC();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 qA(e){return(xe.lFrame.contextLView=NA(e,xe.lFrame.contextLView))[jt]}function uo(){return xe.lFrame.selectedIndex}function Jo(e){xe.lFrame.selectedIndex=e}function zg(){let e=xe.lFrame;return Fg(e.tView,e.selectedIndex)}function vr(){xe.lFrame.currentNamespace=nC}function rs(){YA()}function YA(){xe.lFrame.currentNamespace=null}function KA(){return xe.lFrame.currentNamespace}var vC=!0;function Cd(){return vC}function Sd(e){vC=e}function ZA(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(r){let o=Qb(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 qg(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 $u(e,t,n){_C(e,t,3,n)}function Wu(e,t,n,r){(e[be]&3)===n&&_C(e,t,n,r)}function fm(e,t){let n=e[be];(n&3)===t&&(n&=16383,n+=1,e[be]=n)}function _C(e,t,n,r){let i=r!==void 0?e[na]&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[na]+=65536),(a<s||s==-1)&&(XA(e,n,t,l),e[na]=(e[na]&4294901760)+l+2),l++}function Xw(e,t){pt(4,e,t);let n=je(null);try{t.call(e)}finally{je(n),pt(5,e,t)}}function XA(e,t,n,r){let i=n[r]<0,s=n[r+1],o=i?-n[r]:n[r],a=e[o];i?e[be]>>14<e[na]>>16&&(e[be]&3)===t&&(e[be]+=16384,Xw(a,s)):Xw(a,s)}var aa=-1,Qo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function JA(e){return e instanceof Qo}function QA(e){return(e.flags&8)!==0}function eO(e){return(e.flags&16)!==0}function tO(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];rO(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),r++}}return r}function nO(e){return e===3||e===4||e===6}function rO(e){return e.charCodeAt(0)===64}function ua(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?Jw(e,n,i,null,t[++r]):Jw(e,n,i,null,null))}}return e}function Jw(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 pm={},Mm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=yd(n);let r=this.injector.get(e,pm,n);return r!==pm||t===pm?r:this.parentInjector.get(e,t,n)}};function EC(e){return e!==aa}function nd(e){return e&32767}function iO(e){return e>>16}function rd(e,t){let n=iO(e),r=t;for(;n>0;)r=r[pa],n--;return r}var Pm=!0;function id(e){let t=Pm;return Pm=e,t}var oO=256,wC=oO-1,bC=5,sO=0,qr={};function aO(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Fc)&&(r=n[Fc]),r==null&&(r=n[Fc]=sO++);let i=r&wC,s=1<<i;t.data[e+(i>>bC)]|=s}function od(e,t){let n=CC(e,t);if(n!==-1)return n;let r=t[_e];r.firstCreatePass&&(e.injectorIndex=t.length,hm(r.data,e),hm(t,null),hm(r.blueprint,null));let i=Yg(e,t),s=e.injectorIndex;if(EC(i)){let o=nd(i),a=rd(i,t),l=a[_e].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function hm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function CC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Yg(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=xC(i),r===null)return aa;if(n++,i=i[pa],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return aa}function km(e,t,n){aO(e,t,n)}function SC(e,t,n){if(n&Ke.Optional||e!==void 0)return e;Mg(t,"NodeInjector")}function DC(e,t,n,r){if(n&Ke.Optional&&r===void 0&&(r=null),(n&(Ke.Self|Ke.Host))===0){let i=e[jc],s=Wn(void 0);try{return i?i.get(t,r,n&Ke.Optional):Lb(t,r,n&Ke.Optional)}finally{Wn(s)}}return SC(r,t,n)}function IC(e,t,n,r=Ke.Default,i){if(e!==null){if(t[be]&2048&&!(r&Ke.Self)){let o=dO(e,t,n,r,qr);if(o!==qr)return o}let s=TC(e,t,n,r,qr);if(s!==qr)return s}return DC(t,n,r,i)}function TC(e,t,n,r,i){let s=lO(n);if(typeof s=="function"){if(!pC(t,e,r))return r&Ke.Host?SC(i,n,r):DC(t,n,r,i);try{let o;if(o=s(r),o==null&&!(r&Ke.Optional))Mg(n);else return o}finally{yC()}}else if(typeof s=="number"){let o=null,a=CC(e,t),l=aa,c=r&Ke.Host?t[Pr][Lr]:null;for((a===-1||r&Ke.SkipSelf)&&(l=a===-1?Yg(e,t):t[a+8],l===aa||!eb(r,!1)?a=-1:(o=t[_e],a=nd(l),t=rd(l,t)));a!==-1;){let h=t[_e];if(Qw(s,a,h.data)){let d=cO(a,t,n,o,r,c);if(d!==qr)return d}l=t[a+8],l!==aa&&eb(r,t[_e].data[a+8]===c)&&Qw(s,a,t)?(o=h,a=nd(l),t=rd(l,t)):a=-1}}return i}function cO(e,t,n,r,i,s){let o=t[_e],a=o.data[e+8],l=r==null?ha(a)&&Pm:r!=o&&(a.type&3)!==0,c=i&Ke.Host&&s===a,h=Gu(a,o,n,l,c);return h!==null?Wc(t,o,h,a):qr}function Gu(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&&Kr(g)&&g.type===n)return l}return null}function Wc(e,t,n,r){let i=e[n],s=t.data;if(JA(i)){let o=i;o.resolving&&KN(YN(s[n]));let a=id(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Wn(o.injectImpl):null,h=pC(e,r,Ke.Default);try{i=e[n]=o.factory(void 0,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&ZA(n,s[n],t)}finally{c!==null&&Wn(c),id(a),o.resolving=!1,yC()}}return i}function lO(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Fc)?e[Fc]:void 0;return typeof t=="number"?t>=0?t&wC:uO:t}function Qw(e,t,n){let r=1<<e;return!!(n[t+(e>>bC)]&r)}function eb(e,t){return!(e&Ke.Self)&&!(e&Ke.Host&&t)}var Wo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return IC(this._tNode,this._lView,e,yd(n),t)}};function uO(){return new Wo(tr(),Fe())}function Dd(e){return Rg(()=>{let t=e.prototype.constructor,n=t[Yu]||Lm(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let s=i[Yu]||Lm(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Lm(e){return Ab(e)?()=>{let t=Lm(kn(e));return t&&t()}:zo(e)}function dO(e,t,n,r,i){let s=e,o=t;for(;s!==null&&o!==null&&o[be]&2048&&!td(o);){let a=TC(s,o,n,r|Ke.Self,qr);if(a!==qr)return a;let l=s.parent;if(!l){let c=o[Zb];if(c){let h=c.get(n,qr,r);if(h!==qr)return h}l=xC(o),o=o[pa]}s=l}return i}function xC(e){let t=e[_e],n=t.type;return n===2?t.declTNode:n===1?e[Lr]:null}function tb(e,t=null,n=null,r){let i=fO(e,t,n,r);return i.resolveInjectorInitializers(),i}function fO(e,t=null,n=null,r,i=new Set){let s=[n||xi,fA(e)];return r=r||(typeof e=="object"?void 0:mr(e)),new Uc(s,t||_d(),r||null,i)}var ht=class GE{static THROW_IF_NOT_FOUND=Bc;static NULL=new Xu;static create(t,n){if(Array.isArray(t))return tb({name:""},n,t,"");{let r=t.name??"";return tb({name:r},t.parent,t.providers,r)}}static \u0275prov=ne({token:GE,providedIn:"any",factory:()=>Ze(Bb)});static __NG_ELEMENT_ID__=-1},pO=new pe("");pO.__NG_ELEMENT_ID__=e=>{let t=tr();if(t===null)throw new $e(204,!1);if(t.type&2)return t.value;if(e&Ke.Optional)return null;throw new $e(204,!1)};var RC=!1,Kg=(()=>{class e{static __NG_ELEMENT_ID__=hO;static __NG_ENV_ID__=n=>n}return e})(),Fm=class extends Kg{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return oC(this._lView,e),()=>AA(this._lView,e)}};function hO(){return new Fm(Fe())}var Ai=class{},Id=new pe("",{providedIn:"root",factory:()=>!1}),NC=new pe(""),Zg=new pe(""),Td=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Nr(!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=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),Bm=class extends J{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Yb()&&(this.destroyRef=M(Kg,{optional:!0})??void 0,this.pendingTasks=M(Td,{optional:!0})??void 0)}emit(e){let t=je(null);try{super.next(e)}finally{je(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 ot&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Je=Bm;function sd(...e){}function AC(e){let t,n;function r(){e=sd;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 nb(e){return queueMicrotask(()=>e()),()=>{e=sd}}var Xg="isAngularZone",ad=Xg+"_ID",mO=0,Le=class Yd{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Je(!1);onMicrotaskEmpty=new Je(!1);onStable=new Je(!1);onError=new Je(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=RC}=t;if(typeof Zone>"u")throw new $e(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,vO(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Xg)===!0}static assertInAngularZone(){if(!Yd.isInAngularZone())throw new $e(909,!1)}static assertNotInAngularZone(){if(Yd.isInAngularZone())throw new $e(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,gO,sd,sd);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)}},gO={};function Jg(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 yO(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){AC(()=>{e.callbackScheduled=!1,Vm(e),e.isCheckStableRunning=!0,Jg(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Vm(e)}function vO(e){let t=()=>{yO(e)},n=mO++;e._inner=e._inner.fork({name:"angular",properties:{[Xg]:!0,[ad]:n,[ad+n]:!0},onInvokeTask:(r,i,s,o,a,l)=>{if(_O(l))return r.invokeTask(s,o,a,l);try{return rb(e),r.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),ib(e)}},onInvoke:(r,i,s,o,a,l,c)=>{try{return rb(e),r.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!EO(l)&&t(),ib(e)}},onHasTask:(r,i,s,o)=>{r.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Vm(e),Jg(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 Vm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function rb(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function ib(e){e._nesting--,Jg(e)}var cd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Je;onMicrotaskEmpty=new Je;onStable=new Je;onError=new Je;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 _O(e){return OC(e,"__ignore_ng_zone__")}function EO(e){return OC(e,"__scheduler_tick__")}function OC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Oi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},wO=new pe("",{providedIn:"root",factory:()=>{let e=M(Le),t=M(Oi);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function bO(){return ma(tr(),Fe())}function ma(e,t){return new Ct(Xr(e,t))}var Ct=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=bO}return e})();function CO(e){return e instanceof Ct?e.nativeElement:e}function Vi(e,t){let n=dw(e),r=n[bi];return t?.equal&&(r.equal=t.equal),n.set=i=>Zh(r,i),n.update=i=>fw(r,i),n.asReadonly=SO.bind(n),n}function SO(){let e=this[bi];if(e.readonlyFn===void 0){let t=()=>this();t[bi]=e,e.readonlyFn=t}return e.readonlyFn}function DO(){return this._results[Symbol.iterator]()}var Um=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 J}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=aA(e);(this._changesDetected=!sA(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]=DO};function MC(e){return(e.flags&128)===128}var PC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(PC||{}),Qg=new Map,IO=0;function TO(){return IO++}function xO(e){Qg.set(e[Jc],e)}function kC(e){return Qg.get(e)||null}function Hm(e){Qg.delete(e[Jc])}var jm=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return kC(this.lViewId)}constructor(e,t,n){this.lViewId=e,this.nodeIndex=t,this.native=n}};function LC(e){let t=mm(e);if(t){if(Ti(t)){let n=t,r,i,s;if(FC(e)){if(r=AO(n,e),r==-1)throw new Error("The provided component was not found in the application");i=e}else if(RO(e)){if(r=OO(n,e),r==-1)throw new Error("The provided directive was not found in the application");s=MO(r,n)}else if(r=sb(n,e),r==-1)return null;let o=er(n[r]),a=mm(o),l=a&&!Array.isArray(a)?a:ob(n,r,o);if(i&&l.component===void 0&&(l.component=i,Yr(l.component,l)),s&&l.directives===void 0){l.directives=s;for(let c=0;c<s.length;c++)Yr(s[c],l)}Yr(l.native,l),t=l}}else{let n=e,r=n;for(;r=r.parentNode;){let i=mm(r);if(i){let s=Array.isArray(i)?i:i.lView;if(!s)return null;let o=sb(s,n);if(o>=0){let a=er(s[o]),l=ob(s,o,a);Yr(a,l),t=l;break}}}}return t||null}function ob(e,t,n){return new jm(e[Jc],t,n)}var $m="__ngContext__";function Yr(e,t){Ti(t)?(e[$m]=t[Jc],xO(t)):e[$m]=t}function mm(e){let t=e[$m];return typeof t=="number"?kC(t):t||null}function FC(e){return e&&e.constructor&&e.constructor.\u0275cmp}function RO(e){return e&&e.constructor&&e.constructor.\u0275dir}function sb(e,t){let n=e[_e];for(let r=Vt;r<n.bindingStartIndex;r++)if(er(e[r])===t)return r;return-1}function NO(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}function AO(e,t){let n=e[_e].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(gr(i,e)[jt]===t)return i}else if(gr(Vt,e)[jt]===t)return Vt;return-1}function OO(e,t){let n=e[_e].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let s=r;s<i;s++)if(e[s]===t)return n.index;n=NO(n)}return-1}function MO(e,t){let n=t[_e].data[e];if(n.directiveStart===0)return xi;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let s=t[i];FC(s)||r.push(s)}return r}function BC(e){return UC(e[$c])}function VC(e){return UC(e[Mr])}function UC(e){for(;e!==null&&!Bi(e);)e=e[Mr];return e}var Wm;function HC(e){Wm=e}function jC(){if(Wm!==void 0)return Wm;if(typeof document<"u")return document;throw new $e(210,!1)}var nl=new pe("",{providedIn:"root",factory:()=>PO}),PO="ng",ey=new pe(""),is=new pe("",{providedIn:"platform",factory:()=>"unknown"}),$C=new pe(""),ty=new pe("",{providedIn:"root",factory:()=>jC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),kO="h",LO="b",WC=!1,FO=new pe("",{providedIn:"root",factory:()=>WC}),ny=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(ny||{}),ga=new pe(""),ab=new Set;function fo(e){ab.has(e)||(ab.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var GC=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=BO}return e})();function BO(){return new GC(Fe(),tr())}var ra=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ra||{}),zC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),VO=[ra.EarlyRead,ra.Write,ra.MixedReadWrite,ra.Read],UO=(()=>{class e{ngZone=M(Le);scheduler=M(Ai);errorHandler=M(Oi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){M(ga,{optional:!0})}execute(){let n=this.sequences.size>0;n&&pt(16),this.executing=!0;for(let r of VO)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&&pt(17)}register(n){let{view:r}=n;r!==void 0?((r[sa]??=[]).push(n),el(r),r[be]|=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(ny.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),Gm=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?.[sa];e&&(this.view[sa]=e.filter(t=>t!==this))}};function ry(e,t){!t?.injector&&Kb(ry);let n=t?.injector??M(ht);return fo("NgAfterRender"),qC(e,n,t,!1)}function Jr(e,t){!t?.injector&&Kb(Jr);let n=t?.injector??M(ht);return fo("NgAfterNextRender"),qC(e,n,t,!0)}function HO(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 qC(e,t,n,r){let i=t.get(zC);i.impl??=t.get(UO);let s=t.get(ga,null,{optional:!0}),o=n?.phase??ra.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(Kg):null,l=t.get(GC,null,{optional:!0}),c=new Gm(i.impl,HO(e,o),l?.view,r,a,s?.snapshot(null));return i.impl.register(c),c}var jO=()=>null;function YC(e,t,n=!1){return jO(e,t,n)}function KC(e,t){let n=e.contentQueries;if(n!==null){let r=je(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];$g(s),a.contentQueries(2,t[o],o)}}}finally{je(r)}}}function zm(e,t,n){$g(0);let r=je(null);try{t(e,n)}finally{je(r)}}function iy(e,t,n){if(Lg(t)){let r=je(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{je(r)}}}var Zr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Zr||{}),Bu;function $O(){if(Bu===void 0&&(Bu=null,Go.trustedTypes))try{Bu=Go.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Bu}function xd(e){return $O()?.createHTML(e)||e}var Vu;function WO(){if(Vu===void 0&&(Vu=null,Go.trustedTypes))try{Vu=Go.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Vu}function cb(e){return WO()?.createHTML(e)||e}var Mi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Nb})`}},qm=class extends Mi{getTypeName(){return"HTML"}},Ym=class extends Mi{getTypeName(){return"Style"}},Km=class extends Mi{getTypeName(){return"Script"}},Zm=class extends Mi{getTypeName(){return"URL"}},Xm=class extends Mi{getTypeName(){return"ResourceURL"}};function Qr(e){return e instanceof Mi?e.changingThisBreaksApplicationSecurity:e}function po(e,t){let n=GO(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Nb})`)}return n===t}function GO(e){return e instanceof Mi&&e.getTypeName()||null}function ZC(e){return new qm(e)}function XC(e){return new Ym(e)}function JC(e){return new Km(e)}function QC(e){return new Zm(e)}function eS(e){return new Xm(e)}function zO(e){let t=new Qm(e);return qO()?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(xd(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Qm=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=xd(e),t}};function qO(){try{return!!new window.DOMParser().parseFromString(xd(""),"text/html")}catch{return!1}}var YO=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Rd(e){return e=String(e),e.match(YO)?e:"unsafe:"+e}function Ui(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 tS=Ui("area,br,col,hr,img,wbr"),nS=Ui("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rS=Ui("rp,rt"),KO=rl(rS,nS),ZO=rl(nS,Ui("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")),XO=rl(rS,Ui("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")),lb=rl(tS,ZO,XO,KO),iS=Ui("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),JO=Ui("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"),QO=Ui("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"),eM=rl(iS,JO,QO),tM=Ui("script,style,template"),eg=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=iM(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=rM(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=ub(e).toLowerCase();if(!lb.hasOwnProperty(t))return this.sanitizedSomething=!0,!tM.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(!eM.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;iS[o]&&(a=Rd(a)),this.buf.push(" ",s,'="',db(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=ub(e).toLowerCase();lb.hasOwnProperty(t)&&!tS.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(db(e))}};function nM(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function rM(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw oS(t);return t}function iM(e){let t=e.firstChild;if(t&&nM(e,t))throw oS(t);return t}function ub(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function oS(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var oM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,sM=/([^\#-~ |!])/g;function db(e){return e.replace(/&/g,"&").replace(oM,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(sM,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var Uu;function oy(e,t){let n=null;try{Uu=Uu||zO(e);let r=t?String(t):"";n=Uu.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=Uu.getInertBodyElement(r)}while(r!==s);let o=new eg().sanitizeChildren(fb(n)||n);return xd(o)}finally{if(n){let r=fb(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function fb(e){return"content"in e&&aM(e)?e.content:null}function aM(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ei=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}(ei||{});function Fr(e){let t=sS();return t?cb(t.sanitize(ei.HTML,e)||""):po(e,"HTML")?cb(Qr(e)):oy(jC(),Zc(e))}function an(e){let t=sS();return t?t.sanitize(ei.URL,e)||"":po(e,"URL")?Qr(e):Rd(Zc(e))}function sS(){let e=Fe();return e&&e[Ri].sanitizer}var cM=/^>|^->|<!--|-->|--!>|<!-$/g,lM=/(<|>)/g,uM="\u200B$1\u200B";function dM(e){return e.replace(cM,t=>t.replace(lM,uM))}function aS(e){return e.ownerDocument.defaultView}function fM(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 cS="ng-template";function pM(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&fM(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(sy(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 sy(e){return e.type===4&&e.value!==cS}function hM(e,t,n){let r=e.type===4&&!n?cS:e.value;return t===r}function mM(e,t,n){let r=4,i=e.attrs,s=i!==null?vM(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Or(r)&&!Or(l))return!1;if(o&&Or(l))continue;o=!1,r=l|r&1;continue}if(!o)if(r&4){if(r=2|r&1,l!==""&&!hM(e,l,n)||l===""&&t.length===1){if(Or(r))return!1;o=!0}}else if(r&8){if(i===null||!pM(e,i,l,n)){if(Or(r))return!1;o=!0}}else{let c=t[++a],h=gM(l,i,sy(e),n);if(h===-1){if(Or(r))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),r&2&&c!==d){if(Or(r))return!1;o=!0}}}}return Or(r)||o}function Or(e){return(e&1)===0}function gM(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 _M(t,e)}function yM(e,t,n=!1){for(let r=0;r<t.length;r++)if(mM(e,t[r],n))return!0;return!1}function vM(e){for(let t=0;t<e.length;t++){let n=e[t];if(nO(n))return t}return e.length}function _M(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 pb(e,t){return e?":not("+t.trim()+")":t}function EM(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!==""&&!Or(o)&&(t+=pb(s,i),i=""),r=o,s=s||!Or(r);n++}return i!==""&&(t+=pb(s,i)),t}function wM(e){return e.map(EM).join(",")}function bM(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(!Or(i))break;i=s}r++}return n.length&&t.push(1,...n),t}var Hi={};function CM(e,t){return e.createText(t)}function SM(e,t,n){e.setValue(t,n)}function DM(e,t){return e.createComment(dM(t))}function lS(e,t,n){return e.createElement(t,n)}function ld(e,t,n,r,i){e.insertBefore(t,n,r,i)}function uS(e,t,n){e.appendChild(t,n)}function hb(e,t,n,r,i){r!==null?ld(e,t,n,r,i):uS(e,t,n)}function IM(e,t,n){e.removeChild(null,t,n)}function TM(e,t,n){e.setAttribute(t,"style",n)}function xM(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function dS(e,t,n){let{mergedAttrs:r,classes:i,styles:s}=n;r!==null&&tO(e,t,r),i!==null&&xM(e,t,i),s!==null&&TM(e,t,s)}function ay(e,t,n,r,i,s,o,a,l,c,h){let d=Vt+r,f=d+i,g=RM(d,f),m=typeof c=="function"?c():c;return g[_e]={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 RM(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Hi);return n}function NM(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=ay(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function cy(e,t,n,r,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[Fi]=i,d[be]=r|4|128|8|64|1024,(c!==null||e&&e[be]&2048)&&(d[be]|=2048),iC(d),d[Rn]=d[pa]=e,d[jt]=n,d[Ri]=o||e&&e[Ri],d[sn]=a||e&&e[sn],d[jc]=l||e&&e[jc]||null,d[Lr]=s,d[Jc]=TO(),d[Hc]=h,d[Zb]=c,d[Pr]=t.type==2?e[Pr]:d,d}function AM(e,t,n){let r=Xr(t,e),i=NM(n),s=e[Ri].rendererFactory,o=ly(e,cy(e,i,null,fS(n),r,t,null,s.createRenderer(r,n),null,null,null));return e[t.index]=o}function fS(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function pS(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 ly(e,t){return e[$c]?e[Yw][Mr]=t:e[$c]=t,e[Yw]=t,t}function X(e=1){hS(Zt(),Fe(),uo()+e,!1)}function hS(e,t,n,r){if(!r)if((t[be]&3)===3){let i=e.preOrderCheckHooks;i!==null&&$u(t,i,n)}else{let i=e.preOrderHooks;i!==null&&Wu(t,i,0,n)}Jo(n)}var Nd=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Nd||{});function tg(e,t,n,r){let i=je(null);try{let[s,o,a]=e.inputs[n],l=null;(o&Nd.SignalBased)!==0&&(l=t[s][bi]),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):Jb(t,l,s,r)}finally{je(i)}}function mS(e,t,n,r,i){let s=uo(),o=r&2;try{Jo(-1),o&&t.length>Vt&&hS(e,t,Vt,!1),pt(o?2:0,i),n(r,i)}finally{Jo(s),pt(o?3:1,i)}}function Ad(e,t,n){FM(e,t,n),(n.flags&64)===64&&BM(e,t,n)}function uy(e,t,n=Xr){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 OM(e,t,n,r){let i=r.get(FO,WC)||n===Zr.ShadowDom,s=e.selectRootElement(t,i);return MM(s),s}function MM(e){PM(e)}var PM=()=>null;function kM(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function gS(e,t,n,r,i,s,o,a){if(!a&&fy(t,e,n,r,i)){ha(t)&&LM(n,t.index);return}if(t.type&3){let l=Xr(t,n);r=kM(r),i=o!=null?o(i,t.value||"",r):i,s.setProperty(l,r,i)}else t.type&12}function LM(e,t){let n=gr(t,e);n[be]&16||(n[be]|=64)}function FM(e,t,n){let r=n.directiveStart,i=n.directiveEnd;ha(n)&&AM(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||od(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(Yr(l,t),s!==null&&jM(t,o-r,l,a,n,s),Kr(a)){let c=gr(n.index,t);c[jt]=Wc(t,e,o,n)}}}function BM(e,t,n){let r=n.directiveStart,i=n.directiveEnd,s=n.index,o=WA();try{Jo(s);for(let a=r;a<i;a++){let l=e.data[a],c=t[a];Om(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&VM(l,c)}}finally{Jo(-1),Om(o)}}function VM(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function dy(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let s=n[i];yM(t,s.selectors,!1)&&(r??=[],Kr(s)?r.unshift(s):r.push(s))}return r}function UM(e,t,n,r,i,s){let o=Xr(e,t);HM(t[sn],o,s,e.value,n,r,i)}function HM(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 jM(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];tg(r,n,l,c)}}function yS(e,t){let n=e[jc],r=n?n.get(Oi,null):null;r&&r.handleError(t)}function fy(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];tg(d,n[c],h,i),a=!0}if(s)for(let l of s){let c=n[l],h=t.data[l];tg(h,c,r,i),a=!0}return a}function $M(e,t){let n=gr(t,e),r=n[_e];WM(r,n);let i=n[Fi];i!==null&&n[Hc]===null&&(n[Hc]=YC(i,n[jc])),pt(18),py(r,n,n[jt]),pt(19,n[jt])}function WM(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function py(e,t,n){Wg(t);try{let r=e.viewQuery;r!==null&&zm(1,r,n);let i=e.template;i!==null&&mS(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ni]?.finishViewCreation(e),e.staticContentQueries&&KC(e,t),e.staticViewQueries&&zm(2,e.viewQuery,n);let s=e.components;s!==null&&GM(t,s)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[be]&=-5,Gg()}}function GM(e,t){for(let n=0;n<t.length;n++)$M(e,t[n])}function Od(e,t,n,r){let i=je(null);try{let s=t.tView,o=e[be]&4096?4096:16,a=cy(e,s,n,o,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[Ko]=l;let c=e[Ni];return c!==null&&(a[Ni]=c.createEmbeddedView(s)),py(s,a,n),a}finally{je(i)}}function Gc(e,t){return!t||t.firstChild===null||MC(e)}var zM;function hy(e,t){return zM(e,t)}var Pi=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Pi||{});function vS(e){return(e.flags&32)===32}function ia(e,t,n,r,i){if(r!=null){let s,o=!1;Bi(r)?s=r:Ti(r)&&(o=!0,r=r[Fi]);let a=er(r);e===0&&n!==null?i==null?uS(t,n,a):ld(t,n,a,i||null,!0):e===1&&n!==null?ld(t,n,a,i||null,!0):e===2?IM(t,a,o):e===3&&t.destroyNode(a),s!=null&&iP(t,e,s,n,i)}}function qM(e,t){_S(e,t),t[Fi]=null,t[Lr]=null}function YM(e,t,n,r,i,s){r[Fi]=i,r[Lr]=t,kd(e,r,n,1,i,s)}function _S(e,t){t[Ri].changeDetectionScheduler?.notify(9),kd(e,t,t[sn],2,null,null)}function KM(e){let t=e[$c];if(!t)return gm(e[_e],e);for(;t;){let n=null;if(Ti(t))n=t[$c];else{let r=t[xn];r&&(n=r)}if(!n){for(;t&&!t[Mr]&&t!==e;)Ti(t)&&gm(t[_e],t),t=t[Rn];t===null&&(t=e),Ti(t)&&gm(t[_e],t),n=t&&t[Mr]}t=n}}function my(e,t){let n=e[la],r=n.indexOf(t);n.splice(r,1)}function Md(e,t){if(Qc(t))return;let n=t[sn];n.destroyNode&&kd(e,t,n,3,null,null),KM(t)}function gm(e,t){if(Qc(t))return;let n=je(null);try{t[be]&=-129,t[be]|=256,t[Qn]&&Kh(t[Qn]),XM(e,t),ZM(e,t),t[_e].type===1&&t[sn].destroy();let r=t[Ko];if(r!==null&&Bi(t[Rn])){r!==t[Rn]&&my(r,t);let i=t[Ni];i!==null&&i.detachView(e)}Hm(t)}finally{je(n)}}function ZM(e,t){let n=e.cleanup,r=t[Ju];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[Ju]=null);let i=t[so];if(i!==null){t[so]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[Qu];if(s!==null){t[Qu]=null;for(let o of s)o.destroy()}}function XM(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 Qo)){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];pt(4,a,l);try{l.call(a)}finally{pt(5,a,l)}}else{pt(4,i,s);try{s.call(i)}finally{pt(5,i,s)}}}}}function JM(e,t,n){return QM(e,t.parent,n)}function QM(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[Fi];if(ha(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Zr.None||i===Zr.Emulated)return null}return Xr(r,n)}function eP(e,t,n){return nP(e,t,n)}function tP(e,t,n){return e.type&40?Xr(e,n):null}var nP=tP,mb;function Pd(e,t,n,r){let i=JM(e,r,t),s=t[sn],o=r.parent||t[Lr],a=eP(o,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)hb(s,i,n[l],a,!1);else hb(s,i,n,a,!1);mb!==void 0&&mb(s,r,t,n,i)}function Lc(e,t){if(t!==null){let n=t.type;if(n&3)return Xr(t,e);if(n&4)return ng(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Lc(e,r);{let i=e[t.index];return Bi(i)?ng(-1,i):er(i)}}else{if(n&128)return Lc(e,t.next);if(n&32)return hy(t,e)()||er(e[t.index]);{let r=ES(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Xo(e[Pr]);return Lc(i,r)}else return Lc(e,t.next)}}}return null}function ES(e,t){if(t!==null){let n=e[Pr][Lr],r=t.projection;return n.projection[r]}return null}function ng(e,t){let n=xn+e+1;if(n<t.length){let r=t[n],i=r[_e].firstChild;if(i!==null)return Lc(r,i)}return t[Zo]}function gy(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&&Yr(er(a),r),n.flags|=2),!vS(n))if(l&8)gy(e,t,n.child,r,i,s,!1),ia(t,e,i,a,s);else if(l&32){let c=hy(n,r),h;for(;h=c();)ia(t,e,i,h,s);ia(t,e,i,a,s)}else l&16?rP(e,t,r,n,i,s):ia(t,e,i,a,s);n=o?n.projectionNext:n.next}}function kd(e,t,n,r,i,s){gy(n,r,e.firstChild,t,i,s,!1)}function rP(e,t,n,r,i,s){let o=n[Pr],a=o[Lr].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];ia(t,e,i,c,s)}else{let l=a,c=o[Rn];MC(r)&&(l.flags|=128),gy(e,t,l,c,i,s,!0)}}function iP(e,t,n,r,i){let s=n[Zo],o=er(n);s!==o&&ia(t,e,r,s,i);for(let a=xn;a<n.length;a++){let l=n[a];kd(l[_e],l,e,t,r,s)}}function oP(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let s=r.indexOf("-")===-1?void 0:Pi.DashCase;i==null?e.removeStyle(n,r,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Pi.Important),e.setStyle(n,r,i,s))}}function ud(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(er(s)),Bi(s)&&sP(s,r);let o=n.type;if(o&8)ud(e,t,n.child,r);else if(o&32){let a=hy(n,t),l;for(;l=a();)r.push(l)}else if(o&16){let a=ES(t,n);if(Array.isArray(a))r.push(...a);else{let l=Xo(t[Pr]);ud(l[_e],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function sP(e,t){for(let n=xn;n<e.length;n++){let r=e[n],i=r[_e].firstChild;i!==null&&ud(r[_e],r,i,t)}e[Zo]!==e[Fi]&&t.push(e[Zo])}function wS(e){if(e[sa]!==null){for(let t of e[sa])t.impl.addSequence(t);e[sa].length=0}}var bS=[];function aP(e){return e[Qn]??cP(e)}function cP(e){let t=bS.pop()??Object.create(uP);return t.lView=e,t}function lP(e){e.lView[Qn]!==e&&(e.lView=null,bS.push(e))}var uP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{el(e.lView)},consumerOnSignalRead(){this.lView[Qn]=this}});function dP(e){let t=e[Qn]??Object.create(fP);return t.lView=e,t}var fP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Xo(e.lView);for(;t&&!CS(t[_e]);)t=Xo(t);t&&Vg(t)},consumerOnSignalRead(){this.lView[Qn]=this}});function CS(e){return e.type!==2}function SS(e){if(e[Qu]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Qu])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[be]&8192)}}var pP=100;function DS(e,t=!0,n=0){let r=e[Ri].rendererFactory,i=!1;i||r.begin?.();try{hP(e,n)}catch(s){throw t&&yS(e,s),s}finally{i||r.end?.()}}function hP(e,t){let n=dC();try{Zw(!0),rg(e,t);let r=0;for(;bd(e);){if(r===pP)throw new $e(103,!1);r++,rg(e,1)}}finally{Zw(n)}}function mP(e,t,n,r){if(Qc(t))return;let i=t[be],s=!1,o=!1;Wg(t);let a=!0,l=null,c=null;s||(CS(e)?(c=aP(t),l=qh(c)):ew()===null?(a=!1,c=dP(t),l=qh(c)):t[Qn]&&(Kh(t[Qn]),t[Qn]=null));try{iC(t),UA(e.bindingStartIndex),n!==null&&mS(e,t,n,2,r);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&$u(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Wu(t,g,0,null),fm(t,0)}if(o||gP(t),SS(t),IS(t,0),e.contentQueries!==null&&KC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&$u(t,g)}else{let g=e.contentHooks;g!==null&&Wu(t,g,1),fm(t,1)}vP(e,t);let d=e.components;d!==null&&xS(t,d,0);let f=e.viewQuery;if(f!==null&&zm(2,f,r),!s)if(h){let g=e.viewCheckHooks;g!==null&&$u(t,g)}else{let g=e.viewHooks;g!==null&&Wu(t,g,2),fm(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[dm]){for(let g of t[dm])g();t[dm]=null}s||(wS(t),t[be]&=-73)}catch(h){throw s||el(t),h}finally{c!==null&&(iw(c,l),a&&lP(c)),Gg()}}function IS(e,t){for(let n=BC(e);n!==null;n=VC(n))for(let r=xn;r<n.length;r++){let i=n[r];TS(i,t)}}function gP(e){for(let t=BC(e);t!==null;t=VC(t)){if(!(t[be]&2))continue;let n=t[la];for(let r=0;r<n.length;r++){let i=n[r];Vg(i)}}}function yP(e,t,n){pt(18);let r=gr(t,e);TS(r,n),pt(19,r[jt])}function TS(e,t){Bg(e)&&rg(e,t)}function rg(e,t){let n=e[_e],r=e[be],i=e[Qn],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(i?.dirty&&Yh(i)),s||=!1,i&&(i.dirty=!1),e[be]&=-9217,s)mP(n,e,n.template,e[jt]);else if(r&8192){SS(e),IS(e,1);let o=n.components;o!==null&&xS(e,o,1),wS(e)}}function xS(e,t,n){for(let r=0;r<t.length;r++)yP(e,t[r],n)}function vP(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)Jo(~i);else{let s=i,o=n[++r],a=n[++r];$A(o,s);let l=t[s];pt(24,l),a(2,l),pt(25,l)}}}finally{Jo(-1)}}function yy(e,t){let n=dC()?64:1088;for(e[Ri].changeDetectionScheduler?.notify(t);e;){e[be]|=n;let r=Xo(e);if(td(e)&&!r)return e;e=r}return null}function RS(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function NS(e,t){let n=xn+t;if(n<e.length)return e[n]}function Ld(e,t,n,r=!0){let i=t[_e];if(_P(i,t,e,n),r){let o=ng(n,e),a=t[sn],l=a.parentNode(e[Zo]);l!==null&&YM(i,e[Lr],a,t,l,o)}let s=t[Hc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function AS(e,t){let n=zc(e,t);return n!==void 0&&Md(n[_e],n),n}function zc(e,t){if(e.length<=xn)return;let n=xn+t,r=e[n];if(r){let i=r[Ko];i!==null&&i!==e&&my(i,r),t>0&&(e[n-1][Mr]=r[Mr]);let s=Zu(e,xn+t);qM(r[_e],r);let o=s[Ni];o!==null&&o.detachView(s[_e]),r[Rn]=null,r[Mr]=null,r[be]&=-129}return r}function _P(e,t,n,r){let i=xn+r,s=n.length;r>0&&(n[i-1][Mr]=t),r<s-xn?(t[Mr]=n[i],Fb(n,xn+r,t)):(n.push(t),t[Mr]=null),t[Rn]=n;let o=t[Ko];o!==null&&n!==o&&OS(o,t);let a=t[Ni];a!==null&&a.insertView(e),Nm(t),t[be]|=128}function OS(e,t){let n=e[la],r=t[Rn];if(Ti(r))e[be]|=2;else{let i=r[Rn][Pr];t[Pr]!==i&&(e[be]|=2)}n===null?e[la]=[t]:n.push(t)}var es=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[_e];return ud(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[jt]}get dirty(){return!!(this._lView[be]&9280)||!!this._lView[Qn]?.dirty}set context(e){this._lView[jt]=e}get destroyed(){return Qc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Rn];if(Bi(e)){let t=e[ed],n=t?t.indexOf(this):-1;n>-1&&(zc(e,n),Zu(t,n))}this._attachedToViewContainer=!1}Md(this._lView[_e],this._lView)}onDestroy(e){oC(this._lView,e)}markForCheck(){yy(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Vg(this._cdRefInjectingView||this._lView)}detach(){this._lView[be]&=-129}reattach(){Nm(this._lView),this._lView[be]|=128}detectChanges(){this._lView[be]|=1024,DS(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new $e(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=td(this._lView),t=this._lView[Ko];t!==null&&!e&&my(t,this._lView),_S(this._lView[_e],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new $e(902,!1);this._appRef=e;let t=td(this._lView),n=this._lView[Ko];n!==null&&!t&&OS(n,this._lView),Nm(this._lView)}},kr=(()=>{class e{static __NG_ELEMENT_ID__=bP}return e})(),EP=kr,wP=class extends EP{_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=Od(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new es(r)}};function bP(){return Fd(tr(),Fe())}function Fd(e,t){return e.type&4?new wP(t,e,ma(e,t)):null}function il(e,t,n,r,i){let s=e.data[t];if(s===null)s=CP(e,t,n,r,i),jA()&&(s.flags|=32);else if(s.type&64){s.type=n,s.value=r,s.attrs=i;let o=VA();s.injectorIndex=o===null?-1:o.injectorIndex}return lo(s,!0),s}function CP(e,t,n,r,i){let s=cC(),o=Hg(),a=o?s:s&&s.parent,l=e.data[t]=DP(e,a,n,t,r,i);return SP(e,l,s,o),l}function SP(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 DP(e,t,n,r,i,s){let o=t?t.injectorIndex:-1,a=0;return LA()&&(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 dW=new RegExp(`^(\\d+)*(${LO}|${kO})*(.*)`),IP=()=>null;function qc(e,t){return IP(e,t)}var ig=class{},dd=class{},og=class{resolveComponentFactory(e){throw Error(`No component factory found for ${mr(e)}.`)}},co=class{static NULL=new og},hn=class{},ya=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>TP()}return e})();function TP(){let e=Fe(),t=tr(),n=gr(t.index,e);return(Ti(n)?n:e)[sn]}var xP=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>null})}return e})();function sg(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=jw(i,a);else if(s==2){let l=a,c=t[++o];r=jw(r,l+": "+c+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Mt(e,t=Ke.Default){let n=Fe();if(n===null)return Ze(e,t);let r=tr();return IC(r,n,kn(e),t)}function vy(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=NP(o);h===null?a=o:[a,l,c]=h,MP(e,t,n,a,s,l,c)}s!==null&&r!==null&&RP(n,r,s)}function RP(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 $e(-301,!1);r.push(t[i],s)}}function NP(e){let t=null,n=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&Kr(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,AP(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 AP(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 MP(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&&Kr(g)&&(l=!0,OP(e,n,f)),km(od(n,t),e,g.type)}VP(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=pS(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=r[f];if(n.mergedAttrs=ua(n.mergedAttrs,g.hostAttrs),kP(e,n,t,d,g),BP(d,g,i),o!==null&&o.has(g)){let[b,x]=o.get(g);n.directiveToIndex.set(g.type,[d,b+n.directiveStart,x+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++}PP(e,n,s)}function PP(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))gb(0,t,i,r),gb(1,t,i,r),vb(t,r,!1);else{let s=n.get(i);yb(0,t,s,r),yb(1,t,s,r),vb(t,r,!0)}}}function gb(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),MS(t,s)}}function yb(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),MS(t,o)}}function MS(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function vb(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:s}=e;if(r===null||!n&&i===null||n&&s===null||sy(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 kP(e,t,n,r,i){e.data[r]=i;let s=i.factory||(i.factory=zo(i.type,!0)),o=new Qo(s,Kr(i),Mt);e.blueprint[r]=o,n[r]=o,LP(e,t,r,pS(e,n,i.hostVars,Hi),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;FP(o)!=a&&o.push(a),o.push(n,r,s)}}function FP(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function BP(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Kr(t)&&(n[""]=e)}}function VP(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function PS(e,t,n,r,i,s,o,a){let l=t.consts,c=ao(l,o),h=il(t,e,2,r,c);return s&&vy(t,n,h,ao(l,a),i),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),h.attrs!==null&&sg(h,h.attrs,!1),h.mergedAttrs!==null&&sg(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function kS(e,t){qg(e,t),Lg(t)&&e.queries.elementEnd(t)}var ag=class extends co{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Yo(e);return new Yc(t,this.ngModule)}};function UP(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],s={propName:n,templateName:t,isSignal:(r&Nd.SignalBased)!==0};return i&&(s.transform=i),s})}function HP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function jP(e,t,n){let r=t instanceof Gn?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Mm(n,r):n}function $P(e){let t=e.get(hn,null);if(t===null)throw new $e(407,!1);let n=e.get(xP,null),r=e.get(Ai,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function WP(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return lS(t,n,n==="svg"?nC:n==="math"?TA:null)}var Yc=class extends dd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return UP(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=wM(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){pt(22);let i=je(null);try{let s=this.componentDef,o=n?["ng-version","19.2.0"]:bM(this.componentDef.selectors[0]),a=ay(0,null,null,1,0,null,null,null,null,[o],null),l=jP(s,r||this.ngModule,e),c=$P(l),h=c.rendererFactory.createRenderer(null,s),d=n?OM(h,n,s.encapsulation,l):WP(s,h),f=cy(null,a,null,512|fS(s),null,null,c,h,l,null,YC(d,l,!0));f[Vt]=d,Wg(f);let g=null;try{let m=PS(Vt,a,f,"#host",()=>[this.componentDef],!0,0);d&&(dS(h,d,m),Yr(d,f)),Ad(a,f,m),iy(a,m,f),kS(a,m),t!==void 0&&GP(m,this.ngContentSelectors,t),g=gr(m.index,f),f[jt]=g[jt],py(a,f,null)}catch(m){throw g!==null&&Hm(g),Hm(f),m}finally{pt(23),Gg()}return new cg(this.componentType,f)}finally{je(i)}}},cg=class extends ig{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Fg(t[_e],Vt),this.location=ma(this._tNode,t),this.instance=gr(this._tNode.index,t)[jt],this.hostView=this.changeDetectorRef=new es(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=fy(n,r[_e],r,e,t);this.previousInputValues.set(e,t);let s=gr(n.index,r);yy(s,1)}get injector(){return new Wo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function GP(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 Br=(()=>{class e{static __NG_ELEMENT_ID__=zP}return e})();function zP(){let e=tr();return FS(e,Fe())}var qP=Br,LS=class extends qP{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return ma(this._hostTNode,this._hostLView)}get injector(){return new Wo(this._hostTNode,this._hostLView)}get parentInjector(){let e=Yg(this._hostTNode,this._hostLView);if(EC(e)){let t=rd(e,this._hostLView),n=nd(e),r=t[_e].data[n+8];return new Wo(r,t)}else return new Wo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=_b(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-xn}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&&!CA(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(Yo(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Gn,null);g&&(i=g)}let c=Yo(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(RA(r)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=r[Rn],l=new LS(a,a[Lr],a[Rn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Ld(s,r,i,n),e.attachToViewContainerRef(),Fb(ym(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=_b(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);n&&(Zu(ym(this._lContainer),t),Md(n[_e],n))}detach(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);return n&&Zu(ym(this._lContainer),t)!=null?new es(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function _b(e){return e[ed]}function ym(e){return e[ed]||(e[ed]=[])}function FS(e,t){let n,r=t[e.index];return Bi(r)?n=r:(n=RS(r,t,null,e),t[e.index]=n,ly(t,n)),KP(n,t,e,r),new LS(n,e,t)}function YP(e,t){let n=e[sn],r=n.createComment(""),i=Xr(t,e),s=n.parentNode(i);return ld(n,s,r,n.nextSibling(i),!1),r}var KP=JP,ZP=()=>!1;function XP(e,t,n){return ZP(e,t,n)}function JP(e,t,n,r){if(e[Zo])return;let i;n.type&8?i=er(r):i=YP(t,n),e[Zo]=i}var lg=class zE{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new zE(this.queryList)}setDirty(){this.queryList.setDirty()}},ug=class WE{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 WE(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++)_y(t,n).matches!==null&&this.queries[n].setDirty()}},dg=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=s1(e):this.predicate=e}},fg=class qE{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 qE(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)}},pg=class YE{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 YE(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,QP(n,s)),this.matchTNodeWithReadOption(t,n,Gu(n,t,s,!1,!1))}else r===kr?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Gu(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Ct||i===Br||i===kr&&n.type&4)this.addMatch(n.index,-2);else{let s=Gu(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 QP(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 e1(e,t){return e.type&11?ma(e,t):e.type&4?Fd(e,t):null}function t1(e,t,n,r){return n===-1?e1(t,e):n===-2?n1(e,t,r):Wc(e,e[_e],n,t)}function n1(e,t,n){if(n===Ct)return ma(t,e);if(n===kr)return Fd(t,e);if(n===Br)return FS(t,e)}function BS(e,t,n,r){let i=t[Ni].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(t1(t,h,o[l+1],n.metadata.read))}}i.matches=a}return i.matches}function hg(e,t,n,r){let i=e.queries.getByIndex(n),s=i.matches;if(s!==null){let o=BS(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=xn;d<h.length;d++){let f=h[d];f[Ko]===f[Rn]&&hg(f[_e],f,c,r)}if(h[la]!==null){let d=h[la];for(let f=0;f<d.length;f++){let g=d[f];hg(g[_e],g,c,r)}}}}}return r}function r1(e,t){return e[Ni].queries[t].queryList}function i1(e,t,n){let r=new Um((n&4)===4);return OA(e,t,r,r.destroy),(t[Ni]??=new ug).queries.push(new lg(r))-1}function o1(e,t,n){let r=Zt();return r.firstCreatePass&&(a1(r,new dg(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),i1(r,Fe(),t)}function s1(e){return e.split(",").map(t=>t.trim())}function a1(e,t,n){e.queries===null&&(e.queries=new fg),e.queries.track(new pg(t,n))}function _y(e,t){return e.queries.getByIndex(t)}function c1(e,t){let n=e[_e],r=_y(n,t);return r.crossesNgTemplate?hg(n,e,t,[]):BS(n,e,r,t)}var ki=class{},fd=class extends ki{injector;componentFactoryResolver=new ag(this);instance=null;constructor(e){super();let t=new Uc([...e.providers,{provide:ki,useValue:this},{provide:co,useValue:this.componentFactoryResolver}],e.parent||_d(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function l1(e,t,n=null){return new fd({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var u1=(()=>{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=$b(!1,n.type),i=r.length>0?l1([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=ne({token:e,providedIn:"environment",factory:()=>new e(Ze(Gn))})}return e})();function yt(e){return Rg(()=>{let t=VS(e),n=te(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===PC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(u1).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Zr.Emulated,styles:e.styles||xi,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&fo("NgStandalone"),US(n);let r=e.dependencies;return n.directiveDefs=Eb(r,!1),n.pipeDefs=Eb(r,!0),n.id=m1(n),n})}function d1(e){return Yo(e)||Ub(e)}function f1(e){return e!==null}function p1(e,t){if(e==null)return qo;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=Nd.None,l=null),n[s]=[r,a,l],t[s]=o}return n}function h1(e){if(e==null)return qo;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Vr(e){return Rg(()=>{let t=VS(e);return US(t),t})}function os(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 VS(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||qo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||xi,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:p1(e.inputs,t),outputs:h1(e.outputs),debugInfo:null}}function US(e){e.features?.forEach(t=>t(e))}function Eb(e,t){if(!e)return null;let n=t?Hb:d1;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(f1)}function m1(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 g1(e){return Object.getPrototypeOf(e.prototype).constructor}function ho(e){let t=g1(e.type),n=!0,r=[e];for(;t;){let i;if(Kr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new $e(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let o=e;o.inputs=vm(e.inputs),o.declaredInputs=vm(e.declaredInputs),o.outputs=vm(e.outputs);let a=i.hostBindings;a&&w1(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&_1(e,l),c&&E1(e,c),y1(e,i),jN(e.outputs,i.outputs),Kr(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===ho&&(n=!1)}}t=Object.getPrototypeOf(t)}v1(r)}function y1(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 v1(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=ua(i.hostAttrs,n=ua(n,i.hostAttrs))}}function vm(e){return e===qo?{}:e===xi?[]:e}function _1(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function E1(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,s)=>{t(r,i,s),n(r,i,s)}:e.contentQueries=t}function w1(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function HS(e,t,n){return e[t]=n}function Li(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function b1(e,t,n,r){let i=Li(e,t,n);return Li(e,t+1,r)||i}function C1(e,t,n,r,i,s,o,a,l){let c=t.consts,h=il(t,e,4,o||null,a||null);Ug()&&vy(t,n,h,ao(c,l),dy),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),qg(t,h);let d=h.tView=ay(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 mg(e,t,n,r,i,s,o,a,l,c){let h=n+Vt,d=t.firstCreatePass?C1(h,t,e,r,i,s,o,a,l):t.data[h];lo(d,!1);let f=S1(t,e,d,n);Cd()&&Pd(t,e,f,d),Yr(f,e);let g=RS(f,e,f,d);return e[h]=g,ly(e,g),XP(g,d,e),Ed(d)&&Ad(t,e,d),l!=null&&uy(e,d,c),d}function xt(e,t,n,r,i,s,o,a){let l=Fe(),c=Zt(),h=ao(c.consts,s);return mg(l,c,e,t,n,r,i,h,o,a),xt}var S1=D1;function D1(e,t,n,r){return Sd(!0),t[sn].createComment("")}var jS=new pe(""),I1=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new gg})}return e})(),gg=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 Ey(e){return!!e&&typeof e.then=="function"}function $S(e){return!!e&&typeof e.subscribe=="function"}var T1=new pe(""),WS=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=M(T1,{optional:!0})??[];injector=M(ht);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=qb(this.injector,i);if(Ey(s))n.push(s);else if($S(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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),x1=new pe("");function R1(){uw(()=>{throw new $e(600,!1)})}function N1(e){return e.isBoundToModule}var A1=10,yr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=M(wO);afterRenderManager=M(zC);zonelessEnabled=M(Id);rootEffectScheduler=M(I1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new J;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=M(Td).hasPendingTasks.pipe(pr(n=>!n));constructor(){M(ga,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=M(Gn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){pt(10);let i=n instanceof dd;if(!this._injector.get(WS).done){let d=!i&&dA(n),f=!1;throw new $e(405,f)}let s;i?s=n:s=this._injector.get(co).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let o=N1(s)?void 0:this._injector.get(ki),a=r||s.selector,l=s.create(ht.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(jS,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),zu(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),pt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){pt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(ny.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new $e(101,!1);let n=je(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,je(n),this.afterTick.next(),pt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(hn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<A1;)pt(14),this.synchronizeOnce(),pt(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})=>bd(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;zu(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(x1,[]).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),()=>zu(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new $e(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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zu(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function O1(e,t,n,r){!n&&!bd(e)||DS(e,t,n&&!r?0:1)}function va(e,t,n,r){let i=Fe(),s=tl();if(Li(i,s,t)){let o=Zt(),a=zg();UM(a,i,e,t,n,r)}return va}function GS(e,t,n,r){return Li(e,tl(),n)?t+Zc(n)+r:Hi}function Hu(e,t){return e<<17|t<<2}function ts(e){return e>>17&32767}function M1(e){return(e&2)==2}function P1(e,t){return e&131071|t<<17}function yg(e){return e|2}function da(e){return(e&131068)>>2}function _m(e,t){return e&-131069|t<<2}function k1(e){return(e&1)===1}function vg(e){return e|1}function L1(e,t,n,r,i,s){let o=s?t.classBindings:t.styleBindings,a=ts(o),l=da(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=ts(e[a+1]);e[r+1]=Hu(d,a),d!==0&&(e[d+1]=_m(e[d+1],r)),e[a+1]=P1(e[a+1],r)}else e[r+1]=Hu(a,0),a!==0&&(e[a+1]=_m(e[a+1],r)),a=r;else e[r+1]=Hu(l,0),a===0?a=r:e[l+1]=_m(e[l+1],r),l=r;c&&(e[r+1]=yg(e[r+1])),wb(e,h,r,!0),wb(e,h,r,!1),F1(t,h,e,r,s),o=Hu(a,l),s?t.classBindings=o:t.styleBindings=o}function F1(e,t,n,r,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Xc(s,t)>=0&&(n[r+1]=vg(n[r+1]))}function wb(e,t,n,r){let i=e[n+1],s=t===null,o=r?ts(i):da(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];B1(l,t)&&(a=!0,e[o+1]=r?vg(c):yg(c)),o=r?ts(c):da(c)}a&&(e[n+1]=r?yg(i):vg(i))}function B1(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=Fe(),i=tl();if(Li(r,i,t)){let s=Zt(),o=zg();gS(s,o,r,e,t,r[sn],n,!1)}return Be}function bb(e,t,n,r,i){fy(t,e,n,i?"class":"style",r)}function mo(e,t,n){return zS(e,t,n,!1),mo}function go(e,t){return zS(e,t,null,!0),go}function zS(e,t,n,r){let i=Fe(),s=Zt(),o=HA(2);if(s.firstUpdatePass&&U1(s,e,o,r),t!==Hi&&Li(i,o,t)){let a=s.data[uo()];G1(s,a,i,i[sn],e,i[o+1]=z1(t,n),r,o)}}function V1(e,t){return t>=e.expandoStartIndex}function U1(e,t,n,r){let i=e.data;if(i[n+1]===null){let s=i[uo()],o=V1(e,n);q1(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=GA(e),s=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=Em(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=Em(i,e,t,n,r),s===null){let a=j1(e,t,r);a!==void 0&&Array.isArray(a)&&(a=Em(null,e,t,a[1],r),a=Kc(a,t.attrs,r),$1(e,t,r,a))}else s=W1(e,t,r)}return s!==void 0&&(r?t.residualClasses=s:t.residualStyles=s),n}function j1(e,t,n){let r=n?t.classBindings:t.styleBindings;if(da(r)!==0)return e[ts(r)]}function $1(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[ts(i)]=r}function W1(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 Em(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]),lA(e,o,n?!0:t[++s]))}return e===void 0?null:e}function G1(e,t,n,r,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=k1(c)?Cb(l,t,n,i,da(c),o):void 0;if(!pd(h)){pd(s)||M1(c)&&(s=Cb(l,null,n,i,a,o));let d=rC(uo(),n);oP(r,o,d,i,s)}}function Cb(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===Hi&&(f=d?xi:void 0);let g=d?lm(f,r):h===r?f:void 0;if(c&&!pd(g)&&(g=lm(l,r)),pd(g)&&(a=g,o))return a;let m=e[i+1];i=o?ts(m):da(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=lm(l,r))}return a}function pd(e){return e!==void 0}function z1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=mr(Qr(e)))),e}function q1(e,t){return(e.flags&(t?8:16))!==0}var _g=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 wm(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Y1(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=wm(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=wm(o,f,l,g,n);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=n(s,c),x=n(o,f),P=n(s,h);if(Object.is(P,x)){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 hd,i??=Db(e,s,o,n),Eg(e,r,s,P))e.updateValue(s,h),s++,o++;else if(i.has(P))r.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)Sb(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=wm(s,h,s,d,n);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{r??=new hd,i??=Db(e,s,o,n);let g=n(s,d);if(Eg(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;)Sb(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 Eg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Sb(e,t,n,r,i){if(Eg(e,t,r,n(r,i)))e.updateValue(r,i);else{let s=e.create(r,i);e.attach(r,s)}}function Db(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 hd=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 $t(e,t){fo("NgControlFlow");let n=Fe(),r=tl(),i=n[r]!==Hi?n[r]:-1,s=i!==-1?md(n,Vt+i):void 0,o=0;if(Li(n,r,e)){let a=je(null);try{if(s!==void 0&&AS(s,o),e!==-1){let l=Vt+e,c=md(n,l),h=Sg(n[_e],l),d=qc(c,h.tView.ssrId),f=Od(n,h,t,{dehydratedView:d});Ld(c,f,o,Gc(h,d))}}finally{je(a)}}else if(s!==void 0){let a=NS(s,o);a!==void 0&&(a[jt]=t)}}var wg=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-xn}};function ss(e,t){return t}var bg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Qt(e,t,n,r,i,s,o,a,l,c,h,d,f){fo("NgControlFlow");let g=Fe(),m=Zt(),b=l!==void 0,x=Fe(),P=a?o.bind(x[Pr][jt]):o,F=new bg(b,P);x[Vt+e]=F,mg(g,m,e+1,t,n,r,i,ao(m.consts,s)),b&&mg(g,m,e+2,l,c,h,d,ao(m.consts,f))}var Cg=class extends _g{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-xn}at(e){return this.getLView(e)[jt].$implicit}attach(e,t){let n=t[Hc];this.needsIndexUpdate||=e!==this.length,Ld(this.lContainer,t,e,Gc(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,K1(this.lContainer,e)}create(e,t){let n=qc(this.lContainer,this.templateTNode.tView.ssrId),r=Od(this.hostLView,this.templateTNode,new wg(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){Md(e[_e],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[jt].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[jt].$index=e}getLView(e){return Z1(this.lContainer,e)}};function en(e){let t=je(null),n=uo();try{let r=Fe(),i=r[_e],s=r[n],o=n+1,a=md(r,o);if(s.liveCollection===void 0){let c=Sg(i,o);s.liveCollection=new Cg(a,r,c)}else s.liveCollection.reset();let l=s.liveCollection;if(Y1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=tl(),h=l.length===0;if(Li(r,c,h)){let d=n+2,f=md(r,d);if(h){let g=Sg(i,d),m=qc(f,g.tView.ssrId),b=Od(r,g,void 0,{dehydratedView:m});Ld(f,b,0,Gc(g,m))}else AS(f,0)}}}finally{je(t)}}function md(e,t){return e[t]}function K1(e,t){return zc(e,t)}function Z1(e,t){return NS(e,t)}function Sg(e,t){return Fg(e,t)}function re(e,t,n,r){let i=Fe(),s=Zt(),o=Vt+e,a=i[sn],l=s.firstCreatePass?PS(o,s,i,t,dy,Ug(),n,r):s.data[o],c=X1(s,i,l,a,t,e);i[o]=c;let h=Ed(l);return lo(l,!0),dS(a,c,l),!vS(l)&&Cd()&&Pd(s,i,c,l),(MA()===0||h)&&Yr(c,i),PA(),h&&(Ad(s,i,l),iy(s,l,i)),r!==null&&uy(i,l),re}function ie(){let e=tr();Hg()?lC():(e=e.parent,lo(e,!1));let t=e;FA(t)&&BA(),kA();let n=Zt();return n.firstCreatePass&&kS(n,t),t.classesWithoutHost!=null&&QA(t)&&bb(n,t,Fe(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&eO(t)&&bb(n,t,Fe(),t.stylesWithoutHost,!1),ie}function Ne(e,t,n,r){return re(e,t,n,r),ie(),Ne}var X1=(e,t,n,r,i,s)=>(Sd(!0),lS(r,i,KA()));function J1(e,t,n,r,i){let s=t.consts,o=ao(s,r),a=il(t,e,8,"ng-container",o);o!==null&&sg(a,o,!0);let l=ao(s,i);return Ug()&&vy(t,n,a,l,dy),a.mergedAttrs=ua(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function qS(e,t,n){let r=Fe(),i=Zt(),s=e+Vt,o=i.firstCreatePass?J1(s,i,r,t,n):i.data[s];lo(o,!0);let a=Q1(i,r,o,e);return r[s]=a,Cd()&&Pd(i,r,a,o),Yr(a,r),Ed(o)&&(Ad(i,r,o),iy(i,o,r)),n!=null&&uy(r,o),qS}function YS(){let e=tr(),t=Zt();return Hg()?lC():(e=e.parent,lo(e,!1)),t.firstCreatePass&&(qg(t,e),Lg(e)&&t.queries.elementEnd(e)),YS}function Bd(e,t,n){return qS(e,t,n),YS(),Bd}var Q1=(e,t,n,r)=>(Sd(!0),DM(t[sn],""));function nr(){return Fe()}var gd="en-US",ek=gd;function tk(e){typeof e=="string"&&(ek=e.toLowerCase().replace(/_/g,"-"))}var nk=(e,t,n)=>{};function Rt(e,t,n,r){let i=Fe(),s=Zt(),o=tr();return ik(s,i,i[sn],o,e,t,r),Rt}function rk(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[Ju],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function ik(e,t,n,r,i,s,o){let a=Ed(r),l=e.firstCreatePass?aC(e):null,c=t[jt],h=sC(t),d=!0;if(r.type&3||o){let f=Xr(r,t),g=o?o(f):f,m=h.length,b=o?P=>o(er(P[r.index])):r.index,x=null;if(!o&&a&&(x=rk(e,t,i,r.index)),x!==null){let P=x.__ngLastListenerFn__||x;P.__ngNextListenerFn__=s,x.__ngLastListenerFn__=s,d=!1}else{s=xb(r,t,c,s),nk(f,i,s);let P=n.listen(g,i,s);h.push(s,P),l&&l.push(i,b,m,m+1)}}else s=xb(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],x=g[m+1];Ib(r,e,t,b,x,i,s,h,l)}if(f&&f.length)for(let m of f)Ib(r,e,t,m,i,i,s,h,l)}}function Ib(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 Tb(e,t,n,r){let i=je(null);try{return pt(6,t,n),n(r)!==!1}catch(s){return yS(e,s),!1}finally{pt(7,t,n),je(i)}}function xb(e,t,n,r){return function i(s){if(s===Function)return r;let o=ha(e)?gr(e.index,t):t;yy(o,5);let a=Tb(t,n,r,s),l=i.__ngNextListenerFn__;for(;l;)a=Tb(t,n,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function me(e=1){return qA(e)}function zn(e,t,n){return ji(e,"",t,"",n),zn}function ji(e,t,n,r,i){let s=Fe(),o=GS(s,t,n,r);if(o!==Hi){let a=Zt(),l=zg();gS(a,l,s,e,o,s[sn],i,!1)}return ji}function Ea(e,t,n){o1(e,t,n)}function wa(e){let t=Fe(),n=Zt(),r=fC();$g(r+1);let i=_y(n,r);if(e.dirty&&xA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=c1(t,r);e.reset(s,CO),e.notifyOnChanges()}return!0}return!1}function ba(){return r1(Fe(),fC())}function wy(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function by(e){let t=uC();return wd(t,Vt+e)}function tn(e,t=""){let n=Fe(),r=Zt(),i=e+Vt,s=r.firstCreatePass?il(r,i,1,t,null):r.data[i],o=ok(r,n,s,t,e);n[i]=o,Cd()&&Pd(r,n,o,s),lo(s,!1)}var ok=(e,t,n,r,i)=>(Sd(!0),CM(t[sn],r));function Ca(e){return as("",e,""),Ca}function as(e,t,n){let r=Fe(),i=GS(r,e,t,n);return i!==Hi&&sk(r,uo(),i),as}function sk(e,t,n){let r=rC(t,e);SM(e[sn],r,n)}var KS={};function $i(e){let t=Zt(),n=Fe(),r=e+Vt,i=il(t,r,128,null,null);return lo(i,!1),wy(t,n,r,KS),$i}function yo(e){fo("NgLet");let t=Zt(),n=Fe(),r=uo();return wy(t,n,r,e),e}function Ur(e){let t=uC(),n=wd(t,Vt+e);if(n===KS)throw new $e(314,!1);return n}function ak(e,t,n){let r=Zt();if(r.firstCreatePass){let i=Kr(e);Dg(n,r.data,r.blueprint,i,!0),Dg(t,r.data,r.blueprint,i,!1)}}function Dg(e,t,n,r,i){if(e=kn(e),Array.isArray(e))for(let s=0;s<e.length;s++)Dg(e[s],t,n,r,i);else{let s=Zt(),o=Fe(),a=tr(),l=ca(e)?e:kn(e.provide),c=zb(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(ca(e)||!e.multi){let g=new Qo(c,i,Mt),m=Cm(l,t,i?h:h+f,d);m===-1?(km(od(a,o),s,l),bm(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=Cm(l,t,h+f,d),m=Cm(l,t,h,h+f),b=g>=0&&n[g],x=m>=0&&n[m];if(i&&!x||!i&&!b){km(od(a,o),s,l);let P=uk(i?lk:ck,n.length,i,r,c);!i&&x&&(n[m].providerFactory=P),bm(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(P),o.push(P)}else{let P=ZS(n[i?m:g],c,!i&&r);bm(s,e,g>-1?g:m,P)}!i&&r&&x&&n[m].componentProviders++}}}function bm(e,t,n,r){let i=ca(t),s=gA(t);if(i||s){let o=(s?kn(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 ZS(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function Cm(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function ck(e,t,n,r){return Ig(this.multi,[])}function lk(e,t,n,r){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=Wc(n,n[_e],this.providerFactory.index,r);s=a.slice(0,o),Ig(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],Ig(i,s);return s}function Ig(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function uk(e,t,n,r,i){let s=new Qo(e,n,Mt);return s.multi=[],s.index=t,s.componentProviders=0,ZS(s,i,r&&!n),s}function Vd(e,t=[]){return n=>{n.providersResolver=(r,i)=>ak(r,i?i(e):e,t)}}function XS(e,t,n,r){return QS(Fe(),jg(),e,t,n,r)}function JS(e,t){let n=e[t];return n===Hi?void 0:n}function QS(e,t,n,r,i,s){let o=t+n;return Li(e,o,i)?HS(e,o+1,s?r.call(s,i):r(i)):JS(e,o+1)}function dk(e,t,n,r,i,s,o){let a=t+n;return b1(e,a,i,s)?HS(e,a+2,o?r.call(o,i,s):r(i,s)):JS(e,a+2)}function Sn(e,t){let n=Zt(),r,i=e+Vt;n.firstCreatePass?(r=fk(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=zo(r.type,!0)),o,a=Wn(Mt);try{let l=id(!1),c=s();return id(l),wy(n,Fe(),i,c),c}finally{Wn(a)}}function fk(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Nn(e,t,n){let r=e+Vt,i=Fe(),s=wd(i,r);return tD(i,r)?QS(i,jg(),t,s.transform,n,s):s.transform(n)}function eD(e,t,n,r){let i=e+Vt,s=Fe(),o=wd(s,i);return tD(s,i)?dk(s,jg(),t,o.transform,n,r,o):o.transform(n,r)}function tD(e,t){return e[_e].data[t].pure}function nD(e,t){return Fd(e,t)}var fa=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(".")}},Cy=new fa("19.2.0"),pk=(()=>{class e{zone=M(Le);changeDetectionScheduler=M(Ai);applicationRef=M(yr);_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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hk({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Le(te(w({},mk()),{scheduleInRootZone:n})),[{provide:Le,useFactory:e},{provide:Vc,multi:!0,useFactory:()=>{let r=M(pk,{optional:!0});return()=>r.initialize()}},{provide:Vc,multi:!0,useFactory:()=>{let r=M(gk);return()=>{r.initialize()}}},t===!0?{provide:NC,useValue:!0}:[],{provide:Zg,useValue:n??RC}]}function mk(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var gk=(()=>{class e{subscription=new ot;initialized=!1;zone=M(Le);pendingTasks=M(Td);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(()=>{Le.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Le.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),rD=(()=>{class e{appRef=M(yr);taskService=M(Td);ngZone=M(Le);zonelessEnabled=M(Id);tracing=M(ga,{optional:!0});disableScheduling=M(NC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ot;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ad):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(M(Zg,{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 cd||!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?nb:AC;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(ad+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,nb(()=>{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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function iD(){return fo("NgZoneless"),jb([{provide:Ai,useExisting:rD},{provide:Le,useClass:cd},{provide:Id,useValue:!0},{provide:Zg,useValue:!1},[]])}function yk(){return typeof $localize<"u"&&$localize.locale||gd}var Sy=new pe("",{providedIn:"root",factory:()=>M(Sy,Ke.Optional|Ke.SkipSelf)||yk()}),Tg=new pe(""),vk=new pe("");function Pc(e){return!e.moduleRef}function _k(e){let t=Pc(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Le);return n.run(()=>{Pc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Oi,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:s=>{r.handleError(s)}})}),Pc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(Tg);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(Tg);o.add(s),e.moduleRef.onDestroy(()=>{zu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return wk(r,n,()=>{let s=t.get(WS);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(Sy,gd);if(tk(o||gd),!t.get(vk,!0))return Pc(e)?t.get(yr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Pc(e)){let a=t.get(yr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return Ek(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function Ek(e,t){let n=e.injector.get(yr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new $e(-403,!1);t.push(e)}function wk(e,t,n){try{let r=n();return Ey(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var qu=null;function bk(e=[],t){return ht.create({name:t,providers:[{provide:vd,useValue:"platform"},{provide:Tg,useValue:new Set([()=>qu=null])},...e]})}function Ck(e=[]){if(qu)return qu;let t=bk(e);return qu=t,R1(),Sk(t),t}function Sk(e){let t=e.get(ey,null);qb(e,()=>{t?.forEach(n=>n())})}var rr=(()=>{class e{static __NG_ELEMENT_ID__=Dk}return e})();function Dk(e){return Ik(tr(),Fe(),(e&16)===16)}function Ik(e,t,n){if(ha(e)&&!n){let r=gr(e.index,t);return new es(r,r)}else if(e.type&175){let r=t[Pr];return new es(r,t)}return null}function oD(e){pt(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=Ck(r),s=[hk({}),{provide:Ai,useExisting:rD},...n||[]],o=new fd({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return _k({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{pt(9)}}function Sa(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function Dy(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function Iy(e){let t=je(null);try{return e()}finally{je(t)}}var Rb=class{[bi];constructor(e){this[bi]=e}destroy(){this[bi].destroy()}};function Ud(e,t){let n=Yo(e),r=t.elementInjector||_d();return new Yc(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var Tk={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function xk(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Rk(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Ty;function Nk(e,t){if(!Ty){let n=Element.prototype;Ty=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Ty.call(e,t):!1}function Ak(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[xk(r)]=[n,i]}),t}function Ok(e,t){return t.get(co).resolveComponentFactory(e).inputs}function Mk(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=Pk(a,t,i);l!==-1&&r[l].push(a)}return r}function Pk(e,t,n){let r=n;return Rk(e)&&t.some((i,s)=>i!=="*"&&Nk(e,i)?(r=s,!0):!1),r}var kk=10,xy=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(co).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new Ry(this.componentFactory,e,this.inputMap)}},Ry=class{componentFactory;injector;inputMap;eventEmitters=new Bo(1);events=this.eventEmitters.pipe(ea(e=>io(...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(Le),this.appRef=this.injector.get(yr),this.cdScheduler=t.get(Ai),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=Tk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},kk))})}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=ht.create({providers:[],parent:this.injector}),n=Mk(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 nt(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()}},Ny=class extends HTMLElement{ngElementEventsSubscription=null};function sD(e,t){let n=Ok(e,t.injector),r=t.strategyFactory||new xy(e,t.injector),i=Ak(n);class s extends Ny{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 uD=null;function Da(){return uD}function dD(e){uD??=e}var Hd=class{},Qe=new pe(""),fD=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>M(Fk),providedIn:"platform"})}return e})(),Fk=(()=>{class e extends fD{_location;_history;_doc=M(Qe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Da().getBaseHref(this._doc)}onPopState(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Da().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=ne({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function pD(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function aD(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function cs(e){return e&&e[0]!=="?"?`?${e}`:e}var Oy=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>M(Vk),providedIn:"root"})}return e})(),Bk=new pe(""),Vk=(()=>{class e extends Oy{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??M(Qe).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 pD(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+cs(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,s){let o=this.prepareExternalUrl(i+cs(s));this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){let o=this.prepareExternalUrl(i+cs(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)(Ze(fD),Ze(Bk,8))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),My=(()=>{class e{_subject=new J;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=jk(aD(cD(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+cs(r))}normalize(n){return e.stripTrailingSlash(Hk(this._basePath,cD(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+cs(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+cs(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=cs;static joinWithSlash=pD;static stripTrailingSlash=aD;static \u0275fac=function(n){return new(n||e)(Ze(Oy))};static \u0275prov=ne({token:e,factory:()=>Uk(),providedIn:"root"})}return e})();function Uk(){return new My(Ze(Oy))}function Hk(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function cD(e){return e.replace(/\/index.html$/,"")}function jk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function hD(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 Ay=/\s+/,lD=[],mD=(()=>{class e{_ngEl;_renderer;initialClasses=lD;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Ay):lD}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Ay):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(Ay).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)(Mt(Ct),Mt(ya))};static \u0275dir=Vr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),gD=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(n,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(n){return new(n||e)(Mt(Br))};static \u0275dir=Vr({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ns]})}return e})(),Py="browser",$k="server";function yD(e){return e===Py}function ky(e){return e===$k}var jd=class{},Fy=class extends Hd{supportsDOMEvents=!0},By=class lI extends Fy{static makeCurrent(){dD(new lI)}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=Gk();return n==null?null:zk(n)}resetBaseElement(){ol=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return hD(document.cookie,t)}},ol=null;function Gk(){return ol=ol||document.querySelector("base"),ol?ol.getAttribute("href"):null}function zk(e){return new URL(e,document.baseURI).pathname}var qk=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Vy=new pe(""),CD=(()=>{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 $e(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(Ze(Vy),Ze(Le))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Wd=class{_doc;constructor(e){this._doc=e}manager},$d="ng-app-id";function vD(e){for(let t of e)t.remove()}function _D(e,t){let n=t.createElement("style");return n.textContent=e,n}function Yk(e,t,n,r){let i=e.head?.querySelectorAll(`style[${$d}="${t}"],link[${$d}="${t}"]`);if(i)for(let s of i)s.removeAttribute($d),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 Uy(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var SD=(()=>{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=ky(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,_D);r?.forEach(i=>this.addUsage(i,this.external,Uy))}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&&(vD(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])vD(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,_D(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,Uy(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute($d,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(Ze(Qe),Ze(nl),Ze(ty,8),Ze(is))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Ly={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"},jy=/%COMP%/g,DD="%COMP%",Kk=`_nghost-${DD}`,Zk=`_ngcontent-${DD}`,Xk=!0,Jk=new pe("",{providedIn:"root",factory:()=>Xk});function Qk(e){return Zk.replace(jy,e)}function eL(e){return Kk.replace(jy,e)}function ID(e,t){return t.map(n=>n.replace(jy,e))}var ED=(()=>{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=ky(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=te(w({},r),{encapsulation:Zr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Gd?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 Gd(l,c,r,this.appId,h,o,a,d,f);break;case Zr.ShadowDom:return new Hy(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)(Ze(CD),Ze(SD),Ze(nl),Ze(Jk),Ze(Qe),Ze(is),Ze(Le),Ze(ty),Ze(ga,8))};static \u0275prov=ne({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(Ly[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(wD(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(wD(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 $e(-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=Ly[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ly[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&(Pi.DashCase|Pi.Important)?e.style.setProperty(t,n,r&Pi.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Pi.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=Da().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 wD(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Hy=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=ID(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=Uy(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?ID(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)}},Gd=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=Qk(c),this.hostAttr=eL(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}},tL=(()=>{class e extends Wd{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)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),bD=["alt","control","meta","shift"],nL={"\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"},rL={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},iL=(()=>{class e extends Wd{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(()=>Da().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."),bD.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=nL[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"),bD.forEach(o=>{if(o!==i){let a=rL[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)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})();function TD(e){return oD(oL(e))}function oL(e){return{appProviders:[...uL,...e?.providers??[]],platformProviders:lL}}function sL(){By.makeCurrent()}function aL(){return new Oi}function cL(){return HC(document),document}var lL=[{provide:is,useValue:Py},{provide:ey,useValue:sL,multi:!0},{provide:Qe,useFactory:cL,deps:[]}],uL=[{provide:vd,useValue:"root"},{provide:Oi,useFactory:aL,deps:[]},{provide:Vy,useClass:tL,multi:!0,deps:[Qe]},{provide:Vy,useClass:iL,multi:!0,deps:[Qe]},ED,SD,CD,{provide:hn,useExisting:ED},{provide:jd,useClass:qk,deps:[]},[]],$y=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=Ze(dL),r},providedIn:"root"})}return e})(),dL=(()=>{class e extends $y{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case ei.NONE:return r;case ei.HTML:return po(r,"HTML")?Qr(r):oy(this._doc,String(r)).toString();case ei.STYLE:return po(r,"Style")?Qr(r):r;case ei.SCRIPT:if(po(r,"Script"))return Qr(r);throw new $e(5200,!1);case ei.URL:return po(r,"URL")?Qr(r):Rd(String(r));case ei.RESOURCE_URL:if(po(r,"ResourceURL"))return Qr(r);throw new $e(5201,!1);default:throw new $e(5202,!1)}}bypassSecurityTrustHtml(n){return ZC(n)}bypassSecurityTrustStyle(n){return XC(n)}bypassSecurityTrustScript(n){return JC(n)}bypassSecurityTrustUrl(n){return QC(n)}bypassSecurityTrustResourceUrl(n){return eS(n)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xD="9.8.3",k=class ep{static SDK_VERSION=xD;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_EXPERIMENT_START="CE Experiment Start";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 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=ep.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");ep.SDK_VERSION_CODE=parseInt(t,10)}},mn={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`},ir=Re(ds()),C=class{static log(...e){ir.default.info(...e)}static debug(...e){ir.default.debug(...e)}static error(...e){ir.default.error(...e)}static warn(...e){ir.default.warn(...e)}static info(...e){ir.default.info(...e)}static trace(...e){ir.default.trace(...e)}static configure(e=k.LOG_PREFIX){ir.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?ir.default.setLevel(ir.default[localStorage.cooeeLogLevel]):ir.default.setLevel(mn.debug?ir.default.TRACE:ir.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
|
|
3
|
+
`)}`:"",this.name="UnsubscriptionError",this.errors=t});function us(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var vt=class kl{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 o of n)o.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(Ze(r))try{r()}catch(o){t=o instanceof za?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{Qh(o)}catch(s){t=t??[],s instanceof za?t=[...t,...s.errors]:t.push(s)}}if(t)throw new za(t)}}add(t){var n;if(t&&t!==this)if(this.closed)Qh(t);else{if(t instanceof kl){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)&&us(n,t)}remove(t){let{_finalizers:n}=this;n&&us(n,t),t instanceof kl&&t._removeParent(this)}};vt.EMPTY=(()=>{let e=new vt;return e.closed=!0,e})();var Zp=vt.EMPTY;function Yp(e){return e instanceof vt||e&&"closed"in e&&Ze(e.remove)&&Ze(e.add)&&Ze(e.unsubscribe)}function Qh(e){Ze(e)?e():e.unsubscribe()}var Br={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},hs={setTimeout(e,t,...n){let{delegate:r}=hs;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=hs;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Kp(e){hs.setTimeout(()=>{let{onUnhandledError:t}=Br;if(t)t(e);else throw e})}function Al(){}var Z0=au("C",void 0,void 0);function Y0(e){return au("E",void 0,e)}function K0(e){return au("N",e,void 0)}function au(e,t,n){return{kind:e,value:t,error:n}}var _r=null;function Qo(e){if(Br.useDeprecatedSynchronousErrorHandling){let t=!_r;if(t&&(_r={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=_r;if(_r=null,n)throw r}}else e()}function J0(e){Br.useDeprecatedSynchronousErrorHandling&&_r&&(_r.errorThrown=!0,_r.error=e)}var lu=class extends vt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Yp(e)&&e.add(this)):this.destination=tb}static create(e,t,n){return new Pl(e,t,n)}next(e){this.isStopped?Wa(K0(e),this):this._next(e)}error(e){this.isStopped?Wa(Y0(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Wa(Z0,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()}}},Q0=Function.prototype.bind;function qa(e,t){return Q0.call(e,t)}var X0=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){Lo(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){Lo(n)}else Lo(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){Lo(t)}}},Pl=class extends lu{constructor(e,t,n){super();let r;if(Ze(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let i;this&&Br.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&qa(e.next,i),error:e.error&&qa(e.error,i),complete:e.complete&&qa(e.complete,i)}):r=e}this.destination=new X0(r)}};function Lo(e){Br.useDeprecatedSynchronousErrorHandling?J0(e):Kp(e)}function eb(e){throw e}function Wa(e,t){let{onStoppedNotification:n}=Br;n&&hs.setTimeout(()=>n(e,t))}var tb={closed:!0,next:Al,error:eb,complete:Al},cu=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Gs(e){return e}function nb(e){return e.length===0?Gs:e.length===1?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}var _t=(()=>{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 o=ib(n)?n:new Pl(n,r,i);return Qo(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=Xh(r),new r((i,o)=>{let s=new Pl({next:a=>{try{n(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[cu](){return this}pipe(...n){return nb(n)(this)}toPromise(n){return n=Xh(n),new n((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return e.create=t=>new e(t),e})();function Xh(e){var t;return(t=e??Br.Promise)!==null&&t!==void 0?t:Promise}function rb(e){return e&&Ze(e.next)&&Ze(e.error)&&Ze(e.complete)}function ib(e){return e&&e instanceof lu||rb(e)&&Yp(e)}function ob(e){return Ze(e?.lift)}function ln(e){return t=>{if(ob(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 qt(e,t,n,r,i){return new sb(e,t,n,r,i)}var sb=class extends lu{constructor(e,t,n,r,i,o){super(e),this.onFinalize=i,this.shouldUnsubscribe=o,this._next=t?function(s){try{t(s)}catch(a){e.error(a)}}:super._next,this._error=r?function(s){try{r(s)}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(s){e.error(s)}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))}}},Vi={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=Vi;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let i=t(o=>{n=void 0,e(o)});return new vt(()=>n?.(i))},requestAnimationFrame(...e){let{delegate:t}=Vi;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=Vi;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},ab=Gp(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),de=(()=>{class e extends _t{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new ed(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new ab}next(n){Qo(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){Qo(()=>{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(){Qo(()=>{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:o}=this;return r||i?Zp:(this.currentObservers=null,o.push(n),new vt(()=>{this.currentObservers=null,us(o,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:o}=this;r?n.error(i):o&&n.complete()}asObservable(){let n=new _t;return n.source=this,n}}return e.create=(t,n)=>new ed(t,n),e})(),ed=class extends de{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:Zp}},uu=class extends de{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)}},hu={now(){return(hu.delegate||Date).now()},delegate:void 0},lb=class extends de{constructor(e=1/0,t=1/0,n=hu){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:o}=this;t||(n.push(e),!r&&n.push(i.now()+o)),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 o=0;o<i.length&&!e.closed;o+=n?1:2)e.next(i[o]);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 o=t.now(),s=0;for(let a=1;a<n.length&&n[a]<=o;a+=2)s=a;s&&n.splice(0,s+1)}}},cb=class extends vt{constructor(e,t){super()}schedule(e,t=0){return this}},ds={setInterval(e,t,...n){let{delegate:r}=ds;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=ds;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},Jp=class extends cb{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 ds.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&&ds.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,us(n,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},Ll=class Qp{constructor(t,n=Qp.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};Ll.now=hu.now;var Xp=class extends Ll{constructor(e,t=Ll.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}}},du=new Xp(Jp),ub=du,hb=class extends Jp{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=Vi.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&&(Vi.cancelAnimationFrame(t),e._scheduled=void 0)}},db=class extends Xp{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}}},fb=new db(hb),fu=new _t(e=>e.complete());function eg(e){return e&&Ze(e.schedule)}function tg(e){return e[e.length-1]}function Zs(e){return eg(tg(e))?e.pop():void 0}function pb(e,t){return typeof tg(e)=="number"?e.pop():t}function gb(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{u(r.next(d))}catch(f){s(f)}}function l(d){try{u(r.throw(d))}catch(f){s(f)}}function u(d){d.done?o(d.value):i(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}function td(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 ni(e){return this instanceof ni?(this.v=e,this):new ni(e)}function mb(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(g){return function(m){return Promise.resolve(m).then(g,f)}}function a(g,m){r[g]&&(i[g]=function(b){return new Promise(function(I,A){o.push([g,b,I,A])>1||l(g,b)})},m&&(i[g]=m(i[g])))}function l(g,m){try{u(r[g](m))}catch(b){p(o[0][3],b)}}function u(g){g.value instanceof ni?Promise.resolve(g.value.v).then(d,f):p(o[0][2],g)}function d(g){l("next",g)}function f(g){l("throw",g)}function p(g,m){g(m),o.shift(),o.length&&l(o[0][0],o[0][1])}}function yb(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 td=="function"?td(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){s=e[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(u){o({value:u,done:a})},s)}}var pu=e=>e&&typeof e.length=="number"&&typeof e!="function";function ng(e){return Ze(e?.then)}function rg(e){return Ze(e[cu])}function ig(e){return Symbol.asyncIterator&&Ze(e?.[Symbol.asyncIterator])}function og(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 vb(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var sg=vb();function ag(e){return Ze(e?.[sg])}function lg(e){return mb(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:n,done:r}=yield ni(t.read());if(r)return yield ni(void 0);yield yield ni(n)}}finally{t.releaseLock()}})}function cg(e){return Ze(e?.getReader)}function _n(e){if(e instanceof _t)return e;if(e!=null){if(rg(e))return _b(e);if(pu(e))return bb(e);if(ng(e))return wb(e);if(ig(e))return ug(e);if(ag(e))return Eb(e);if(cg(e))return xb(e)}throw og(e)}function _b(e){return new _t(t=>{let n=e[cu]();if(Ze(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function bb(e){return new _t(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function wb(e){return new _t(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,Kp)})}function Eb(e){return new _t(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function ug(e){return new _t(t=>{Sb(e,t).catch(n=>t.error(n))})}function xb(e){return ug(lg(e))}function Sb(e,t){var n,r,i,o;return gb(this,void 0,void 0,function*(){try{for(n=yb(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}t.complete()})}function nr(e,t,n,r=0,i=!1){let o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function hg(e,t=0){return ln((n,r)=>{n.subscribe(qt(r,i=>nr(r,e,()=>r.next(i),t),()=>nr(r,e,()=>r.complete(),t),i=>nr(r,e,()=>r.error(i),t)))})}function dg(e,t=0){return ln((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Ib(e,t){return _n(e).pipe(dg(t),hg(t))}function Cb(e,t){return _n(e).pipe(dg(t),hg(t))}function Tb(e,t){return new _t(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Ob(e,t){return new _t(n=>{let r;return nr(n,t,()=>{r=e[sg](),nr(n,t,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>Ze(r?.return)&&r.return()})}function fg(e,t){if(!e)throw new Error("Iterable cannot be null");return new _t(n=>{nr(n,t,()=>{let r=e[Symbol.asyncIterator]();nr(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function Rb(e,t){return fg(lg(e),t)}function Db(e,t){if(e!=null){if(rg(e))return Ib(e,t);if(pu(e))return Tb(e,t);if(ng(e))return Cb(e,t);if(ig(e))return fg(e,t);if(ag(e))return Ob(e,t);if(cg(e))return Rb(e,t)}throw og(e)}function Ys(e,t){return t?Db(e,t):_n(e)}function gu(...e){let t=Zs(e);return Ys(e,t)}function Nb(e){return e instanceof Date&&!isNaN(e)}function Ks(e,t){return ln((n,r)=>{let i=0;n.subscribe(qt(r,o=>{r.next(e.call(t,o,i++))}))})}var{isArray:kb}=Array;function Ab(e,t){return kb(t)?e(...t):e(t)}function Pb(e){return Ks(t=>Ab(e,t))}function Lb(e,t,n,r,i,o,s,a){let l=[],u=0,d=0,f=!1,p=()=>{f&&!l.length&&!u&&t.complete()},g=b=>u<r?m(b):l.push(b),m=b=>{o&&t.next(b),u++;let I=!1;_n(n(b,d++)).subscribe(qt(t,A=>{i?.(A),o?g(A):t.next(A)},()=>{I=!0},void 0,()=>{if(I)try{for(u--;l.length&&u<r;){let A=l.shift();s?nr(t,s,()=>m(A)):m(A)}p()}catch(A){t.error(A)}}))};return e.subscribe(qt(t,g,()=>{f=!0,p()})),()=>{a?.()}}function Wi(e,t,n=1/0){return Ze(t)?Wi((r,i)=>Ks((o,s)=>t(r,o,i,s))(_n(e(r,i))),n):(typeof t=="number"&&(n=t),ln((r,i)=>Lb(r,i,e,n)))}function pg(e=1/0){return Wi(Gs,e)}function Mb(){return pg(1)}function nd(...e){return Mb()(Ys(e,Zs(e)))}function jb(e){return new _t(t=>{_n(e()).subscribe(t)})}var Vb=["addListener","removeListener"],Bb=["addEventListener","removeEventListener"],Fb=["on","off"];function Ml(e,t,n,r){if(Ze(n)&&(r=n,n=void 0),r)return Ml(e,t,n).pipe(Pb(r));let[i,o]=$b(e)?Bb.map(s=>a=>e[s](t,a,n)):Ub(e)?Vb.map(rd(e,t)):Hb(e)?Fb.map(rd(e,t)):[];if(!i&&pu(e))return Wi(s=>Ml(s,t,n))(_n(e));if(!i)throw new TypeError("Invalid event target");return new _t(s=>{let a=(...l)=>s.next(1<l.length?l:l[0]);return i(a),()=>o(a)})}function rd(e,t){return n=>r=>e[n](t,r)}function Ub(e){return Ze(e.addListener)&&Ze(e.removeListener)}function Hb(e){return Ze(e.on)&&Ze(e.off)}function $b(e){return Ze(e.addEventListener)&&Ze(e.removeEventListener)}function gg(e=0,t,n=ub){let r=-1;return t!=null&&(eg(t)?n=t:r=t),new _t(i=>{let o=Nb(e)?+e-n.now():e;o<0&&(o=0);let s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function zb(e=0,t=du){return e<0&&(e=0),gg(e,e,t)}function Js(...e){let t=Zs(e),n=pb(e,1/0),r=e;return r.length?r.length===1?_n(r[0]):pg(n)(Ys(r,t)):fu}function mu(e,t){return ln((n,r)=>{let i=0;n.subscribe(qt(r,o=>e.call(t,o,i++)&&r.next(o)))})}function qb(e){return ln((t,n)=>{let r=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,r){r=!1;let u=i;i=null,n.next(u)}s&&n.complete()},l=()=>{o=null,s&&n.complete()};t.subscribe(qt(n,u=>{r=!0,i=u,o||_n(e(u)).subscribe(o=qt(n,a,l))},()=>{s=!0,(!r||!o||o.closed)&&n.complete()}))})}function mg(e,t=du){return qb(()=>gg(e,t))}function Wb(e){return e<=0?()=>fu:ln((t,n)=>{let r=0;t.subscribe(qt(n,i=>{++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Gb(e,t=Gs){return e=e??Zb,ln((n,r)=>{let i,o=!0;n.subscribe(qt(r,s=>{let a=t(s);(o||!e(i,a))&&(o=!1,i=a,r.next(s))}))})}function Zb(e,t){return e===t}function Yb(e){return mu((t,n)=>e<=n)}function yg(...e){let t=Zs(e);return ln((n,r)=>{(t?nd(e,n,t):nd(e,n)).subscribe(r)})}function vg(e,t){return ln((n,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();n.subscribe(qt(r,l=>{i?.unsubscribe();let u=0,d=o++;_n(e(l,d)).subscribe(i=qt(r,f=>r.next(t?t(l,f,d,u++):f),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function ai(e){return ln((t,n)=>{_n(e).subscribe(qt(n,()=>n.complete(),Al)),!n.closed&&t.subscribe(n)})}function Kb(e,t,n){let r=Ze(e)||t||n?{next:e,error:t,complete:n}:e;return r?ln((i,o)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;i.subscribe(qt(o,l=>{var u;(u=r.next)===null||u===void 0||u.call(r,l),o.next(l)},()=>{var l;a=!1,(l=r.complete)===null||l===void 0||l.call(r),o.complete()},l=>{var u;a=!1,(u=r.error)===null||u===void 0||u.call(r,l),o.error(l)},()=>{var l,u;a&&((l=r.unsubscribe)===null||l===void 0||l.call(r)),(u=r.finalize)===null||u===void 0||u.call(r)}))}):Gs}var _g="https://g.co/ng/security#xss",Le=class extends Error{code;constructor(e,t){super(Jb(e,t)),this.code=e}};function Jb(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}function yu(e){return{toString:e}.toString()}var Gi=globalThis;function Xe(e){for(let t in e)if(e[t]===Xe)return t;throw Error("Could not find renamed property on target object.")}function Qb(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function dn(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(dn).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 id(e,t){return e?t?`${e} ${t}`:e:t||""}var Xb=Xe({__forward_ref__:Xe});function bg(e){return e.__forward_ref__=bg,e.toString=function(){return dn(this())},e}function Pt(e){return wg(e)?e():e}function wg(e){return typeof e=="function"&&e.hasOwnProperty(Xb)&&e.__forward_ref__===bg}function ue(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function vu(e){return od(e,Eg)||od(e,xg)}function od(e,t){return e.hasOwnProperty(t)?e[t]:null}function ew(e){return e&&(e[Eg]||e[xg])||null}function sd(e){return e&&(e.hasOwnProperty(ad)||e.hasOwnProperty(tw))?e[ad]:null}var Eg=Xe({\u0275prov:Xe}),ad=Xe({\u0275inj:Xe}),xg=Xe({ngInjectableDef:Xe}),tw=Xe({ngInjectorDef:Xe}),Ee=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=ue({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Sg(e){return e&&!!e.\u0275providers}var nw=Xe({\u0275cmp:Xe}),rw=Xe({\u0275dir:Xe}),Ig=Xe({\u0275pipe:Xe}),fs=Xe({\u0275fac:Xe}),Bi=Xe({__NG_ELEMENT_ID__:Xe}),ld=Xe({__NG_ENV_ID__:Xe});function fo(e){return typeof e=="string"?e:e==null?"":String(e)}function iw(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():fo(e)}function ow(e,t){throw new Le(-200,e)}function _u(e,t){throw new Le(-201,!1)}var Re=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}(Re||{}),jl;function Cg(){return jl}function Ft(e){let t=jl;return jl=e,t}function Tg(e,t,n){let r=vu(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&Re.Optional)return null;if(t!==void 0)return t;_u(e,"Injector")}var sw={},Zi=sw,aw="__NG_DI_FLAG__",ps="ngTempTokenPath",lw="ngTokenPath",cw=/\n/gm,uw="\u0275",cd="__source",ri;function hw(){return ri}function Yn(e){let t=ri;return ri=e,t}function dw(e,t=Re.Default){if(ri===void 0)throw new Le(-203,!1);return ri===null?Tg(e,void 0,t):ri.get(e,t&Re.Optional?null:void 0,t)}function Be(e,t=Re.Default){return(Cg()||dw)(Pt(e),t)}function N(e,t=Re.Default){return Be(e,Qs(t))}function Qs(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Vl(e){let t=[];for(let n=0;n<e.length;n++){let r=Pt(e[n]);if(Array.isArray(r)){if(r.length===0)throw new Le(900,!1);let i,o=Re.Default;for(let s=0;s<r.length;s++){let a=r[s],l=fw(a);typeof l=="number"?l===-1?i=a.token:o|=l:i=a}t.push(Be(i,o))}else t.push(Be(r))}return t}function fw(e){return e[aw]}function pw(e,t,n,r){let i=e[ps];throw t[cd]&&i.unshift(t[cd]),e.message=gw(`
|
|
5
|
+
`+e.message,i,n,r),e[lw]=i,e[ps]=null,e}function gw(e,t,n,r=null){e=e&&e.charAt(0)===`
|
|
6
|
+
`&&e.charAt(1)==uw?e.slice(2):e;let i=dn(t);if(Array.isArray(t))i=t.map(dn).join(" -> ");else if(typeof t=="object"){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):dn(a)))}i=`{${o.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${e.replace(cw,`
|
|
7
|
+
`)}`}function Cr(e,t){return e.hasOwnProperty(fs)?e[fs]:null}function mw(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=t[r];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}function yw(e){return e.flat(Number.POSITIVE_INFINITY)}function bu(e,t){e.forEach(n=>Array.isArray(n)?bu(n,t):t(n))}function Og(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function gs(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function vw(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 o=i-2;e[i]=e[o],i--}e[t]=n,e[t+1]=r}}function _w(e,t,n){let r=po(e,t);return r>=0?e[r|1]=n:(r=~r,vw(e,r,t,n)),r}function Ga(e,t){let n=po(e,t);if(n>=0)return e[n|1]}function po(e,t){return bw(e,t,1)}function bw(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let o=r+(i-r>>1),s=e[o<<n];if(t===s)return o<<n;s>t?i=o:r=o+1}return~(i<<n)}var Tr={},jn=[],ms=new Ee(""),Rg=new Ee("",-1),Dg=new Ee(""),Ng=class{get(e,t=Zi){if(t===Zi){let n=new Error(`NullInjectorError: No provider for ${dn(e)}!`);throw n.name="NullInjectorError",n}return t}};function Or(e){return e[nw]||null}function kg(e){return e[rw]||null}function Ag(e){return e[Ig]||null}function ww(e){let t=Or(e)||kg(e)||Ag(e);return t!==null&&t.standalone}function Ew(e){return{\u0275providers:e}}function xw(...e){return{\u0275providers:Pg(!0,e),\u0275fromNgModule:!0}}function Pg(e,...t){let n=[],r=new Set,i,o=s=>{n.push(s)};return bu(t,s=>{let a=s;Bl(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Lg(i,o),n}function Lg(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];wu(i,o=>{t(o,r)})}}function Bl(e,t,n,r){if(e=Pt(e),!e)return!1;let i=null,o=sd(e),s=!o&&Or(e);if(!o&&!s){let l=e.ngModule;if(o=sd(l),o)i=l;else return!1}else{if(s&&!s.standalone)return!1;i=e}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let u of l)Bl(u,t,n,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let u;try{bu(o.imports,d=>{Bl(d,t,n,r)&&(u||=[],u.push(d))})}finally{}u!==void 0&&Lg(u,t)}if(!a){let u=Cr(i)||(()=>new i);t({provide:i,useFactory:u,deps:jn},i),t({provide:Dg,useValue:i,multi:!0},i),t({provide:ms,useValue:()=>Be(i),multi:!0},i)}let l=o.providers;if(l!=null&&!a){let u=e;wu(l,d=>{t(d,u)})}}else return!1;return i!==e&&e.providers!==void 0}function wu(e,t){for(let n of e)Sg(n)&&(n=n.\u0275providers),Array.isArray(n)?wu(n,t):t(n)}var Sw=Xe({provide:String,useValue:Xe});function Mg(e){return e!==null&&typeof e=="object"&&Sw in e}function Iw(e){return!!(e&&e.useExisting)}function Cw(e){return!!(e&&e.useFactory)}function li(e){return typeof e=="function"}function Tw(e){return!!e.useClass}var Eu=new Ee(""),Xo={},Ow={},Za;function Xs(){return Za===void 0&&(Za=new Ng),Za}var Vn=class{},xu=class extends Vn{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,Ul(e,o=>this.processProvider(o)),this.records.set(Rg,Kr(void 0,this)),r.has("environment")&&this.records.set(Vn,Kr(void 0,this));let i=this.records.get(Eu);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Dg,jn,Re.Self))}destroy(){Pi(this),this._destroyed=!0;let e=Oe(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(),Oe(e)}}onDestroy(e){return Pi(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Pi(this);let t=Yn(this),n=Ft(void 0),r;try{return e()}finally{Yn(t),Ft(n)}}get(e,t=Zi,n=Re.Default){if(Pi(this),e.hasOwnProperty(ld))return e[ld](this);n=Qs(n);let r,i=Yn(this),o=Ft(void 0);try{if(!(n&Re.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=Aw(e)&&vu(e);l&&this.injectableDefInScope(l)?a=Kr(Fl(e),Xo):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let s=n&Re.Self?Xs():this.parent;return t=n&Re.Optional&&t===Zi?null:t,s.get(e,t)}catch(s){if(s.name==="NullInjectorError"){if((s[ps]=s[ps]||[]).unshift(dn(e)),i)throw s;return pw(s,e,"R3InjectorError",this.source)}else throw s}finally{Ft(o),Yn(i)}}resolveInjectorInitializers(){let e=Oe(null),t=Yn(this),n=Ft(void 0),r;try{let i=this.get(ms,jn,Re.Self);for(let o of i)o()}finally{Yn(t),Ft(n),Oe(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(dn(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Pt(e);let t=li(e)?e:Pt(e&&e.provide),n=Dw(e);if(!li(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Kr(void 0,Xo,!0),r.factory=()=>Vl(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=Oe(null);try{return t.value===Xo&&(t.value=Ow,t.value=t.factory()),typeof t.value=="object"&&t.value&&kw(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{Oe(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Pt(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 Fl(e){let t=vu(e),n=t!==null?t.factory:Cr(e);if(n!==null)return n;if(e instanceof Ee)throw new Le(204,!1);if(e instanceof Function)return Rw(e);throw new Le(204,!1)}function Rw(e){if(e.length>0)throw new Le(204,!1);let t=ew(e);return t!==null?()=>t.factory(e):()=>new e}function Dw(e){if(Mg(e))return Kr(void 0,e.useValue);{let t=jg(e);return Kr(t,Xo)}}function jg(e,t,n){let r;if(li(e)){let i=Pt(e);return Cr(i)||Fl(i)}else if(Mg(e))r=()=>Pt(e.useValue);else if(Cw(e))r=()=>e.useFactory(...Vl(e.deps||[]));else if(Iw(e))r=()=>Be(Pt(e.useExisting));else{let i=Pt(e&&(e.useClass||e.provide));if(Nw(e))r=()=>new i(...Vl(e.deps));else return Cr(i)||Fl(i)}return r}function Pi(e){if(e.destroyed)throw new Le(205,!1)}function Kr(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Nw(e){return!!e.deps}function kw(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function Aw(e){return typeof e=="function"||typeof e=="object"&&e instanceof Ee}function Ul(e,t){for(let n of e)Array.isArray(n)?Ul(n,t):n&&Sg(n)?Ul(n.\u0275providers,t):t(n)}function Vg(e,t){e instanceof xu&&Pi(e);let n,r=Yn(e),i=Ft(void 0);try{return t()}finally{Yn(r),Ft(i)}}function Bg(){return Cg()!==void 0||hw()!=null}function Fg(e){if(!Bg())throw new Le(-203,!1)}function Pw(e){return typeof e=="function"}var $n=0,ce=1,he=2,Nt=3,fn=4,bn=5,Yi=6,ys=7,ct=8,Ki=9,Bn=10,bt=11,Ji=12,ud=13,mi=14,yn=15,Rr=16,Jr=17,Fn=18,go=19,Ug=20,rr=21,Ya=22,vs=23,zt=24,ii=25,at=26,Hg=1,Dr=7,_s=8,ci=9,Dt=10;function Ln(e){return Array.isArray(e)&&typeof e[Hg]=="object"}function zn(e){return Array.isArray(e)&&e[Hg]===!0}function Su(e){return(e.flags&4)!==0}function yi(e){return e.componentOffset>-1}function ea(e){return(e.flags&1)===1}function Tn(e){return!!e.template}function bs(e){return(e[he]&512)!==0}function mo(e){return(e[he]&256)===256}var Lw=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function $g(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var zg=(()=>{let e=()=>qg;return e.ngInherit=!0,e})();function qg(e){return e.type.prototype.ngOnChanges&&(e.setInput=jw),Mw}function Mw(){let e=Gg(this),t=e?.current;if(t){let n=e.previous;if(n===Tr)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function jw(e,t,n,r,i){let o=this.declaredInputs[r],s=Gg(e)||Vw(e,{previous:Tr,current:null}),a=s.current||(s.current={}),l=s.previous,u=l[o];a[o]=new Lw(u&&u.currentValue,n,l===Tr),$g(e,t,i,n)}var Wg="__ngSimpleChanges__";function Gg(e){return e[Wg]||null}function Vw(e,t){return e[Wg]=t}var Bw=null,qe=function(e,t=null,n){Bw?.(e,t,n)},Zg="svg",Fw="math";function Wt(e){for(;Array.isArray(e);)e=e[$n];return e}function Yg(e,t){return Wt(t[e])}function Rn(e,t){return Wt(t[e.index])}function Iu(e,t){return e.data[t]}function ta(e,t){return e[t]}function rn(e,t){let n=t[e];return Ln(n)?n:n[$n]}function Uw(e){return(e[he]&4)===4}function Cu(e){return(e[he]&128)===128}function Hw(e){return zn(e[Nt])}function sr(e,t){return t==null?null:e[t]}function Kg(e){e[Jr]=0}function Tu(e){e[he]&1024||(e[he]|=1024,Cu(e)&&yo(e))}function $w(e,t){for(;e>0;)t=t[mi],e--;return t}function na(e){return!!(e[he]&9216||e[zt]?.dirty)}function Hl(e){e[Bn].changeDetectionScheduler?.notify(8),e[he]&64&&(e[he]|=1024),na(e)&&yo(e)}function yo(e){e[Bn].changeDetectionScheduler?.notify(0);let t=Nr(e);for(;t!==null&&!(t[he]&8192||(t[he]|=8192,!Cu(t)));)t=Nr(t)}function Jg(e,t){if(mo(e))throw new Le(911,!1);e[rr]===null&&(e[rr]=[]),e[rr].push(t)}function zw(e,t){if(e[rr]===null)return;let n=e[rr].indexOf(t);n!==-1&&e[rr].splice(n,1)}function Nr(e){let t=e[Nt];return zn(t)?t[Nt]:t}function Qg(e){return e[ys]??=[]}function Xg(e){return e.cleanup??=[]}function qw(e,t,n,r){let i=Qg(t);i.push(n),e.firstCreatePass&&Xg(e).push(r,i.length-1)}var me={lFrame:am(null),bindingsEnabled:!0,skipHydrationRootTNode:null},$l=!1;function Ww(){return me.lFrame.elementDepthCount}function Gw(){me.lFrame.elementDepthCount++}function Zw(){me.lFrame.elementDepthCount--}function Ou(){return me.bindingsEnabled}function Yw(){return me.skipHydrationRootTNode!==null}function Kw(e){return me.skipHydrationRootTNode===e}function Jw(){me.skipHydrationRootTNode=null}function we(){return me.lFrame.lView}function gt(){return me.lFrame.tView}function Et(e){return me.lFrame.contextLView=e,e[ct]}function xt(e){return me.lFrame.contextLView=null,e}function Zt(){let e=em();for(;e!==null&&e.type===64;)e=e.parent;return e}function em(){return me.lFrame.currentTNode}function Qw(){let e=me.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function ur(e,t){let n=me.lFrame;n.currentTNode=e,n.isParent=t}function Ru(){return me.lFrame.isParent}function tm(){me.lFrame.isParent=!1}function nm(){return me.lFrame.contextLView}function rm(){return $l}function hd(e){let t=$l;return $l=e,t}function Du(){let e=me.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Xw(e){return me.lFrame.bindingIndex=e}function vo(){return me.lFrame.bindingIndex++}function e1(e){let t=me.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function t1(){return me.lFrame.inI18n}function n1(e,t){let n=me.lFrame;n.bindingIndex=n.bindingRootIndex=e,zl(t)}function r1(){return me.lFrame.currentDirectiveIndex}function zl(e){me.lFrame.currentDirectiveIndex=e}function i1(e){let t=me.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function im(){return me.lFrame.currentQueryIndex}function Nu(e){me.lFrame.currentQueryIndex=e}function o1(e){let t=e[ce];return t.type===2?t.declTNode:t.type===1?e[bn]:null}function om(e,t,n){if(n&Re.SkipSelf){let i=t,o=e;for(;(i=i.parent,i===null&&!(n&Re.Host))&&(i=o1(o),!(i===null||(o=o[mi],i.type&10))););if(i===null)return!1;t=i,e=o}let r=me.lFrame=sm();return r.currentTNode=t,r.lView=e,!0}function ku(e){let t=sm(),n=e[ce];me.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function sm(){let e=me.lFrame,t=e===null?null:e.child;return t===null?am(e):t}function am(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 lm(){let e=me.lFrame;return me.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var cm=lm;function Au(){let e=lm();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 s1(e){return(me.lFrame.contextLView=$w(e,me.lFrame.contextLView))[ct]}function hr(){return me.lFrame.selectedIndex}function kr(e){me.lFrame.selectedIndex=e}function Pu(){let e=me.lFrame;return Iu(e.tView,e.selectedIndex)}function ar(){me.lFrame.currentNamespace=Zg}function ws(){a1()}function a1(){me.lFrame.currentNamespace=null}function l1(){return me.lFrame.currentNamespace}var um=!0;function ra(){return um}function ia(e){um=e}function c1(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=t.type.prototype;if(r){let s=qg(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}i&&(n.preOrderHooks??=[]).push(0-e,i),o&&((n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o))}function Lu(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:s,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:u}=i;o&&(e.contentHooks??=[]).push(-n,o),s&&((e.contentHooks??=[]).push(n,s),(e.contentCheckHooks??=[]).push(n,s)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),u!=null&&(e.destroyHooks??=[]).push(n,u)}}function es(e,t,n){hm(e,t,3,n)}function ts(e,t,n,r){(e[he]&3)===n&&hm(e,t,n,r)}function Ka(e,t){let n=e[he];(n&3)===t&&(n&=16383,n+=1,e[he]=n)}function hm(e,t,n,r){let i=r!==void 0?e[Jr]&65535:0,o=r??-1,s=t.length-1,a=0;for(let l=i;l<s;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[Jr]+=65536),(a<o||o==-1)&&(u1(e,n,t,l),e[Jr]=(e[Jr]&4294901760)+l+2),l++}function dd(e,t){qe(4,e,t);let n=Oe(null);try{t.call(e)}finally{Oe(n),qe(5,e,t)}}function u1(e,t,n,r){let i=n[r]<0,o=n[r+1],s=i?-n[r]:n[r],a=e[s];i?e[he]>>14<e[Jr]>>16&&(e[he]&3)===t&&(e[he]+=16384,dd(a,o)):dd(a,o)}var oi=-1,_o=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function h1(e){return e instanceof _o}function d1(e){return(e.flags&8)!==0}function f1(e){return(e.flags&16)!==0}function p1(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let o=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,o)}else{let o=i,s=n[++r];m1(o)?e.setProperty(t,o,s):e.setAttribute(t,o,s),r++}}return r}function g1(e){return e===3||e===4||e===6}function m1(e){return e.charCodeAt(0)===64}function ui(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?fd(e,n,i,null,t[++r]):fd(e,n,i,null,null))}}return e}function fd(e,t,n,r,i){let o=0,s=e.length;if(t===-1)s=-1;else for(;o<e.length;){let a=e[o++];if(typeof a=="number"){if(a===t){s=-1;break}else if(a>t){s=o-1;break}}}for(;o<e.length;){let a=e[o];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[o+1]=i);return}else if(r===e[o+1]){e[o+2]=i;return}}o++,r!==null&&o++,i!==null&&o++}s!==-1&&(e.splice(s,0,t),o=s+1),e.splice(o++,0,n),r!==null&&e.splice(o++,0,r),i!==null&&e.splice(o++,0,i)}var Ja={},y1=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=Qs(n);let r=this.injector.get(e,Ja,n);return r!==Ja||t===Ja?r:this.parentInjector.get(e,t,n)}};function dm(e){return e!==oi}function Es(e){return e&32767}function v1(e){return e>>16}function xs(e,t){let n=v1(e),r=t;for(;n>0;)r=r[mi],n--;return r}var ql=!0;function Ss(e){let t=ql;return ql=e,t}var _1=256,fm=_1-1,pm=5,b1=0,In={};function w1(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Bi)&&(r=n[Bi]),r==null&&(r=n[Bi]=b1++);let i=r&fm,o=1<<i;t.data[e+(i>>pm)]|=o}function Is(e,t){let n=gm(e,t);if(n!==-1)return n;let r=t[ce];r.firstCreatePass&&(e.injectorIndex=t.length,Qa(r.data,e),Qa(t,null),Qa(r.blueprint,null));let i=Mu(e,t),o=e.injectorIndex;if(dm(i)){let s=Es(i),a=xs(i,t),l=a[ce].data;for(let u=0;u<8;u++)t[o+u]=a[s+u]|l[s+u]}return t[o+8]=i,o}function Qa(e,t){e.push(0,0,0,0,0,0,0,0,t)}function gm(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Mu(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=wm(i),r===null)return oi;if(n++,i=i[mi],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return oi}function Wl(e,t,n){w1(e,t,n)}function mm(e,t,n){if(n&Re.Optional||e!==void 0)return e;_u(t,"NodeInjector")}function ym(e,t,n,r){if(n&Re.Optional&&r===void 0&&(r=null),(n&(Re.Self|Re.Host))===0){let i=e[Ki],o=Ft(void 0);try{return i?i.get(t,r,n&Re.Optional):Tg(t,r,n&Re.Optional)}finally{Ft(o)}}return mm(r,t,n)}function vm(e,t,n,r=Re.Default,i){if(e!==null){if(t[he]&2048&&!(r&Re.Self)){let s=I1(e,t,n,r,In);if(s!==In)return s}let o=_m(e,t,n,r,In);if(o!==In)return o}return ym(t,n,r,i)}function _m(e,t,n,r,i){let o=x1(n);if(typeof o=="function"){if(!om(t,e,r))return r&Re.Host?mm(i,n,r):ym(t,n,r,i);try{let s;if(s=o(r),s==null&&!(r&Re.Optional))_u(n);else return s}finally{cm()}}else if(typeof o=="number"){let s=null,a=gm(e,t),l=oi,u=r&Re.Host?t[yn][bn]:null;for((a===-1||r&Re.SkipSelf)&&(l=a===-1?Mu(e,t):t[a+8],l===oi||!gd(r,!1)?a=-1:(s=t[ce],a=Es(l),t=xs(l,t)));a!==-1;){let d=t[ce];if(pd(o,a,d.data)){let f=E1(a,t,n,s,r,u);if(f!==In)return f}l=t[a+8],l!==oi&&gd(r,t[ce].data[a+8]===u)&&pd(o,a,t)?(s=d,a=Es(l),t=xs(l,t)):a=-1}}return i}function E1(e,t,n,r,i,o){let s=t[ce],a=s.data[e+8],l=r==null?yi(a)&&ql:r!=s&&(a.type&3)!==0,u=i&Re.Host&&o===a,d=ns(a,s,n,l,u);return d!==null?Qi(t,s,d,a):In}function ns(e,t,n,r,i){let o=e.providerIndexes,s=t.data,a=o&1048575,l=e.directiveStart,u=e.directiveEnd,d=o>>20,f=r?a:a+d,p=i?a+d:u;for(let g=f;g<p;g++){let m=s[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=s[l];if(g&&Tn(g)&&g.type===n)return l}return null}function Qi(e,t,n,r){let i=e[n],o=t.data;if(h1(i)){let s=i;s.resolving&&ow(iw(o[n]));let a=Ss(s.canSeeViewProviders);s.resolving=!0;let l,u=s.injectImpl?Ft(s.injectImpl):null,d=om(e,r,Re.Default);try{i=e[n]=s.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&c1(n,o[n],t)}finally{u!==null&&Ft(u),Ss(a),s.resolving=!1,cm()}}return i}function x1(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Bi)?e[Bi]:void 0;return typeof t=="number"?t>=0?t&fm:S1:t}function pd(e,t,n){let r=1<<e;return!!(n[t+(e>>pm)]&r)}function gd(e,t){return!(e&Re.Self)&&!(e&Re.Host&&t)}var Fi=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return vm(this._tNode,this._lView,e,Qs(n),t)}};function S1(){return new Fi(Zt(),we())}function bm(e){return yu(()=>{let t=e.prototype.constructor,n=t[fs]||Gl(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let o=i[fs]||Gl(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function Gl(e){return wg(e)?()=>{let t=Gl(Pt(e));return t&&t()}:Cr(e)}function I1(e,t,n,r,i){let o=e,s=t;for(;o!==null&&s!==null&&s[he]&2048&&!bs(s);){let a=_m(o,s,n,r|Re.Self,In);if(a!==In)return a;let l=o.parent;if(!l){let u=s[Ug];if(u){let d=u.get(n,In,r);if(d!==In)return d}l=wm(s),s=s[mi]}o=l}return i}function wm(e){let t=e[ce],n=t.type;return n===2?t.declTNode:n===1?e[bn]:null}function md(e,t=null,n=null,r){let i=C1(e,t,n,r);return i.resolveInjectorInitializers(),i}function C1(e,t=null,n=null,r,i=new Set){let o=[n||jn,xw(e)];return r=r||(typeof e=="object"?void 0:dn(e)),new xu(o,t||Xs(),r||null,i)}var Lt=class Em{static THROW_IF_NOT_FOUND=Zi;static NULL=new Ng;static create(t,n){if(Array.isArray(t))return md({name:""},n,t,"");{let r=t.name??"";return md({name:r},t.parent,t.providers,r)}}static \u0275prov=ue({token:Em,providedIn:"any",factory:()=>Be(Rg)});static __NG_ELEMENT_ID__=-1},T1=new Ee("");T1.__NG_ELEMENT_ID__=e=>{let t=Zt();if(t===null)throw new Le(204,!1);if(t.type&2)return t.value;if(e&Re.Optional)return null;throw new Le(204,!1)};var xm=!1,ju=(()=>{class e{static __NG_ELEMENT_ID__=R1;static __NG_ENV_ID__=n=>n}return e})(),O1=class extends ju{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return Jg(this._lView,e),()=>zw(this._lView,e)}};function R1(){return new O1(we())}var vi=class{},Vu=new Ee("",{providedIn:"root",factory:()=>!1}),Sm=new Ee(""),Bu=new Ee(""),oa=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new uu(!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=ue({token:e,providedIn:"root",factory:()=>new e})}return e})(),D1=class extends de{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Bg()&&(this.destroyRef=N(ju,{optional:!0})??void 0,this.pendingTasks=N(oa,{optional:!0})??void 0)}emit(e){let t=Oe(null);try{super.next(e)}finally{Oe(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),o=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),o=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),o&&(o=this.wrapInTimeout(o)));let s=super.subscribe({next:r,error:i,complete:o});return e instanceof vt&&e.add(s),s}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},tt=D1;function Cs(...e){}function Im(e){let t,n;function r(){e=Cs;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 yd(e){return queueMicrotask(()=>e()),()=>{e=Cs}}var Fu="isAngularZone",Ts=Fu+"_ID",N1=0,Ye=class Zl{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new tt(!1);onMicrotaskEmpty=new tt(!1);onStable=new tt(!1);onError=new tt(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=xm}=t;if(typeof Zone>"u")throw new Le(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,P1(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Fu)===!0}static assertInAngularZone(){if(!Zl.isInAngularZone())throw new Le(909,!1)}static assertNotInAngularZone(){if(Zl.isInAngularZone())throw new Le(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,t,k1,Cs,Cs);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},k1={};function Uu(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 A1(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Im(()=>{e.callbackScheduled=!1,Yl(e),e.isCheckStableRunning=!0,Uu(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Yl(e)}function P1(e){let t=()=>{A1(e)},n=N1++;e._inner=e._inner.fork({name:"angular",properties:{[Fu]:!0,[Ts]:n,[Ts+n]:!0},onInvokeTask:(r,i,o,s,a,l)=>{if(L1(l))return r.invokeTask(o,s,a,l);try{return vd(e),r.invokeTask(o,s,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),_d(e)}},onInvoke:(r,i,o,s,a,l,u)=>{try{return vd(e),r.invoke(o,s,a,l,u)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!M1(l)&&t(),_d(e)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,Yl(e),Uu(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function Yl(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function vd(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function _d(e){e._nesting--,Uu(e)}var Cm=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new tt;onMicrotaskEmpty=new tt;onStable=new tt;onError=new tt;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 L1(e){return Tm(e,"__ignore_ng_zone__")}function M1(e){return Tm(e,"__scheduler_tick__")}function Tm(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var _i=class{_console=console;handleError(e){this._console.error("ERROR",e)}},j1=new Ee("",{providedIn:"root",factory:()=>{let e=N(Ye),t=N(_i);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function V1(){return bi(Zt(),we())}function bi(e,t){return new $t(Rn(e,t))}var $t=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=V1}return e})();function B1(e){return e instanceof $t?e.nativeElement:e}function ir(e,t){let n=z0(e),r=n[tr];return t?.equal&&(r.equal=t.equal),n.set=i=>Wp(r,i),n.update=i=>q0(r,i),n.asReadonly=F1.bind(n),n}function F1(){let e=this[tr];if(e.readonlyFn===void 0){let t=()=>this();t[tr]=e,e.readonlyFn=t}return e.readonlyFn}function U1(){return this._results[Symbol.iterator]()}var H1=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 de}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=yw(e);(this._changesDetected=!mw(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]=U1};function Om(e){return(e.flags&128)===128}var Rm=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(Rm||{}),Hu=new Map,$1=0;function z1(){return $1++}function q1(e){Hu.set(e[go],e)}function Dm(e){return Hu.get(e)||null}function Kl(e){Hu.delete(e[go])}var W1=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return Dm(this.lViewId)}constructor(e,t,n){this.lViewId=e,this.nodeIndex=t,this.native=n}};function G1(e){let t=Xa(e);if(t){if(Ln(t)){let n=t,r,i,o;if(Nm(e)){if(r=K1(n,e),r==-1)throw new Error("The provided component was not found in the application");i=e}else if(Z1(e)){if(r=J1(n,e),r==-1)throw new Error("The provided directive was not found in the application");o=Q1(r,n)}else if(r=wd(n,e),r==-1)return null;let s=Wt(n[r]),a=Xa(s),l=a&&!Array.isArray(a)?a:bd(n,r,s);if(i&&l.component===void 0&&(l.component=i,Cn(l.component,l)),o&&l.directives===void 0){l.directives=o;for(let u=0;u<o.length;u++)Cn(o[u],l)}Cn(l.native,l),t=l}}else{let n=e,r=n;for(;r=r.parentNode;){let i=Xa(r);if(i){let o=Array.isArray(i)?i:i.lView;if(!o)return null;let s=wd(o,n);if(s>=0){let a=Wt(o[s]),l=bd(o,s,a);Cn(a,l),t=l;break}}}}return t||null}function bd(e,t,n){return new W1(e[go],t,n)}var Jl="__ngContext__";function Cn(e,t){Ln(t)?(e[Jl]=t[go],q1(t)):e[Jl]=t}function Xa(e){let t=e[Jl];return typeof t=="number"?Dm(t):t||null}function Nm(e){return e&&e.constructor&&e.constructor.\u0275cmp}function Z1(e){return e&&e.constructor&&e.constructor.\u0275dir}function wd(e,t){let n=e[ce];for(let r=at;r<n.bindingStartIndex;r++)if(Wt(e[r])===t)return r;return-1}function Y1(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}function K1(e,t){let n=e[ce].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(rn(i,e)[ct]===t)return i}else if(rn(at,e)[ct]===t)return at;return-1}function J1(e,t){let n=e[ce].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let o=r;o<i;o++)if(e[o]===t)return n.index;n=Y1(n)}return-1}function Q1(e,t){let n=t[ce].data[e];if(n.directiveStart===0)return jn;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let o=t[i];Nm(o)||r.push(o)}return r}function km(e){return Pm(e[Ji])}function Am(e){return Pm(e[fn])}function Pm(e){for(;e!==null&&!zn(e);)e=e[fn];return e}var Ql;function X1(e){Ql=e}function Lm(){if(Ql!==void 0)return Ql;if(typeof document<"u")return document;throw new Le(210,!1)}var $u=new Ee("",{providedIn:"root",factory:()=>eE}),eE="ng",Mm=new Ee(""),sa=new Ee("",{providedIn:"platform",factory:()=>"unknown"}),tE=new Ee(""),jm=new Ee("",{providedIn:"root",factory:()=>Lm().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),nE="h",rE="b",Vm=!1,iE=new Ee("",{providedIn:"root",factory:()=>Vm}),zu=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(zu||{}),bo=new Ee(""),Ed=new Set;function Fr(e){Ed.has(e)||(Ed.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var Bm=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=oE}return e})();function oE(){return new Bm(we(),Zt())}var Qr=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Qr||{}),Fm=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ue({token:e,providedIn:"root",factory:()=>new e})}return e})(),sE=[Qr.EarlyRead,Qr.Write,Qr.MixedReadWrite,Qr.Read],aE=(()=>{class e{ngZone=N(Ye);scheduler=N(vi);errorHandler=N(_i,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){N(bo,{optional:!0})}execute(){let n=this.sequences.size>0;n&&qe(16),this.executing=!0;for(let r of sE)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}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&&qe(17)}register(n){let{view:r}=n;r!==void 0?((r[ii]??=[]).push(n),yo(r),r[he]|=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(zu.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ue({token:e,providedIn:"root",factory:()=>new e})}return e})(),lE=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,o=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=o,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?.[ii];e&&(this.view[ii]=e.filter(t=>t!==this))}};function Um(e,t){!t?.injector&&Fg(Um);let n=t?.injector??N(Lt);return Fr("NgAfterRender"),Hm(e,n,t,!1)}function wo(e,t){!t?.injector&&Fg(wo);let n=t?.injector??N(Lt);return Fr("NgAfterNextRender"),Hm(e,n,t,!0)}function cE(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 Hm(e,t,n,r){let i=t.get(Fm);i.impl??=t.get(aE);let o=t.get(bo,null,{optional:!0}),s=n?.phase??Qr.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(ju):null,l=t.get(Bm,null,{optional:!0}),u=new lE(i.impl,cE(e,s),l?.view,r,a,o?.snapshot(null));return i.impl.register(u),u}var uE=()=>null;function $m(e,t,n=!1){return uE(e,t,n)}function zm(e,t){let n=e.contentQueries;if(n!==null){let r=Oe(null);try{for(let i=0;i<n.length;i+=2){let o=n[i],s=n[i+1];if(s!==-1){let a=e.data[s];Nu(o),a.contentQueries(2,t[s],s)}}}finally{Oe(r)}}}function Xl(e,t,n){Nu(0);let r=Oe(null);try{t(e,n)}finally{Oe(r)}}function qu(e,t,n){if(Su(t)){let r=Oe(null);try{let i=t.directiveStart,o=t.directiveEnd;for(let s=i;s<o;s++){let a=e.data[s];if(a.contentQueries){let l=n[s];a.contentQueries(1,l,s)}}}finally{Oe(r)}}}var Pn=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Pn||{}),Mo;function hE(){if(Mo===void 0&&(Mo=null,Gi.trustedTypes))try{Mo=Gi.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Mo}function aa(e){return hE()?.createHTML(e)||e}var jo;function dE(){if(jo===void 0&&(jo=null,Gi.trustedTypes))try{jo=Gi.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return jo}function xd(e){return dE()?.createHTML(e)||e}var Ur=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${_g})`}},fE=class extends Ur{getTypeName(){return"HTML"}},pE=class extends Ur{getTypeName(){return"Style"}},gE=class extends Ur{getTypeName(){return"Script"}},mE=class extends Ur{getTypeName(){return"URL"}},yE=class extends Ur{getTypeName(){return"ResourceURL"}};function Xn(e){return e instanceof Ur?e.changingThisBreaksApplicationSecurity:e}function vr(e,t){let n=vE(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${_g})`)}return n===t}function vE(e){return e instanceof Ur&&e.getTypeName()||null}function _E(e){return new fE(e)}function bE(e){return new pE(e)}function wE(e){return new gE(e)}function EE(e){return new mE(e)}function xE(e){return new yE(e)}function SE(e){let t=new CE(e);return TE()?new IE(t):t}var IE=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(aa(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},CE=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=aa(e),t}};function TE(){try{return!!new window.DOMParser().parseFromString(aa(""),"text/html")}catch{return!1}}var OE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Wu(e){return e=String(e),e.match(OE)?e:"unsafe:"+e}function qn(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function Eo(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var qm=qn("area,br,col,hr,img,wbr"),Wm=qn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Gm=qn("rp,rt"),RE=Eo(Gm,Wm),DE=Eo(Wm,qn("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")),NE=Eo(Gm,qn("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")),Sd=Eo(qm,DE,NE,RE),Zm=qn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),kE=qn("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"),AE=qn("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"),PE=Eo(Zm,kE,AE),LE=qn("script,style,template"),ME=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=BE(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=VE(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=Id(e).toLowerCase();if(!Sd.hasOwnProperty(t))return this.sanitizedSomething=!0,!LE.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),o=i.name,s=o.toLowerCase();if(!PE.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let a=i.value;Zm[s]&&(a=Wu(a)),this.buf.push(" ",o,'="',Cd(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=Id(e).toLowerCase();Sd.hasOwnProperty(t)&&!qm.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(Cd(e))}};function jE(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function VE(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw Ym(t);return t}function BE(e){let t=e.firstChild;if(t&&jE(e,t))throw Ym(t);return t}function Id(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function Ym(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var FE=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,UE=/([^\#-~ |!])/g;function Cd(e){return e.replace(/&/g,"&").replace(FE,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(UE,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var Vo;function Km(e,t){let n=null;try{Vo=Vo||SE(e);let r=t?String(t):"";n=Vo.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=Vo.getInertBodyElement(r)}while(r!==o);let s=new ME().sanitizeChildren(Td(n)||n);return aa(s)}finally{if(n){let r=Td(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function Td(e){return"content"in e&&HE(e)?e.content:null}function HE(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var An=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}(An||{});function Hr(e){let t=Jm();return t?xd(t.sanitize(An.HTML,e)||""):vr(e,"HTML")?xd(Xn(e)):Km(Lm(),fo(e))}function Yt(e){let t=Jm();return t?t.sanitize(An.URL,e)||"":vr(e,"URL")?Xn(e):Wu(fo(e))}function Jm(){let e=we();return e&&e[Bn].sanitizer}var $E=/^>|^->|<!--|-->|--!>|<!-$/g,zE=/(<|>)/g,qE="\u200B$1\u200B";function WE(e){return e.replace($E,t=>t.replace(zE,qE))}function GE(e){return e.ownerDocument.defaultView}function ZE(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 o=t.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}n=i+1}}var Qm="ng-template";function YE(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&ZE(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(Gu(e))return!1;if(i=t.indexOf(1,i),i>-1){let o;for(;++i<t.length&&typeof(o=t[i])=="string";)if(o.toLowerCase()===n)return!0}return!1}function Gu(e){return e.type===4&&e.value!==Qm}function KE(e,t,n){let r=e.type===4&&!n?Qm:e.value;return t===r}function JE(e,t,n){let r=4,i=e.attrs,o=i!==null?ex(i):0,s=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!s&&!cn(r)&&!cn(l))return!1;if(s&&cn(l))continue;s=!1,r=l|r&1;continue}if(!s)if(r&4){if(r=2|r&1,l!==""&&!KE(e,l,n)||l===""&&t.length===1){if(cn(r))return!1;s=!0}}else if(r&8){if(i===null||!YE(e,i,l,n)){if(cn(r))return!1;s=!0}}else{let u=t[++a],d=QE(l,i,Gu(e),n);if(d===-1){if(cn(r))return!1;s=!0;continue}if(u!==""){let f;if(d>o?f="":f=i[d+1].toLowerCase(),r&2&&u!==f){if(cn(r))return!1;s=!0}}}}return cn(r)||s}function cn(e){return(e&1)===0}function QE(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let o=!1;for(;i<t.length;){let s=t[i];if(s===e)return i;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(s===4)break;if(s===0){i+=4;continue}}i+=o?1:2}return-1}else return tx(t,e)}function XE(e,t,n=!1){for(let r=0;r<t.length;r++)if(JE(e,t[r],n))return!0;return!1}function ex(e){for(let t=0;t<e.length;t++){let n=e[t];if(g1(n))return t}return e.length}function tx(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 Od(e,t){return e?":not("+t.trim()+")":t}function nx(e){let t=e[0],n=1,r=2,i="",o=!1;for(;n<e.length;){let s=e[n];if(typeof s=="string")if(r&2){let a=e[++n];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!cn(s)&&(t+=Od(o,i),i=""),r=s,o=o||!cn(r);n++}return i!==""&&(t+=Od(o,i)),t}function rx(e){return e.map(nx).join(",")}function ix(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let o=e[r];if(typeof o=="string")i===2?o!==""&&t.push(o,e[++r]):i===8&&n.push(o);else{if(!cn(i))break;i=o}r++}return n.length&&t.push(1,...n),t}var Wn={};function ox(e,t){return e.createText(t)}function sx(e,t,n){e.setValue(t,n)}function ax(e,t){return e.createComment(WE(t))}function Xm(e,t,n){return e.createElement(t,n)}function Os(e,t,n,r,i){e.insertBefore(t,n,r,i)}function ey(e,t,n){e.appendChild(t,n)}function Rd(e,t,n,r,i){r!==null?Os(e,t,n,r,i):ey(e,t,n)}function lx(e,t,n){e.removeChild(null,t,n)}function cx(e,t,n){e.setAttribute(t,"style",n)}function ux(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function ty(e,t,n){let{mergedAttrs:r,classes:i,styles:o}=n;r!==null&&p1(e,t,r),i!==null&&ux(e,t,i),o!==null&&cx(e,t,o)}function Zu(e,t,n,r,i,o,s,a,l,u,d){let f=at+r,p=f+i,g=hx(f,p),m=typeof u=="function"?u():u;return g[ce]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,f),bindingStartIndex:f,expandoStartIndex:p,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 o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:d}}function hx(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Wn);return n}function dx(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Zu(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function Yu(e,t,n,r,i,o,s,a,l,u,d){let f=t.blueprint.slice();return f[$n]=i,f[he]=r|4|128|8|64|1024,(u!==null||e&&e[he]&2048)&&(f[he]|=2048),Kg(f),f[Nt]=f[mi]=e,f[ct]=n,f[Bn]=s||e&&e[Bn],f[bt]=a||e&&e[bt],f[Ki]=l||e&&e[Ki]||null,f[bn]=o,f[go]=z1(),f[Yi]=d,f[Ug]=u,f[yn]=t.type==2?e[yn]:f,f}function fx(e,t,n){let r=Rn(t,e),i=dx(n),o=e[Bn].rendererFactory,s=Ku(e,Yu(e,i,null,ny(n),r,t,null,o.createRenderer(r,n),null,null,null));return e[t.index]=s}function ny(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function ry(e,t,n,r){if(n===0)return-1;let i=t.length;for(let o=0;o<n;o++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function Ku(e,t){return e[Ji]?e[ud][fn]=t:e[Ji]=t,e[ud]=t,t}function z(e=1){iy(gt(),we(),hr()+e,!1)}function iy(e,t,n,r){if(!r)if((t[he]&3)===3){let i=e.preOrderCheckHooks;i!==null&&es(t,i,n)}else{let i=e.preOrderHooks;i!==null&&ts(t,i,0,n)}kr(n)}var la=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(la||{});function ec(e,t,n,r){let i=Oe(null);try{let[o,s,a]=e.inputs[n],l=null;(s&la.SignalBased)!==0&&(l=t[o][tr]),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,o):$g(t,l,o,r)}finally{Oe(i)}}function oy(e,t,n,r,i){let o=hr(),s=r&2;try{kr(-1),s&&t.length>at&&iy(e,t,at,!1),qe(s?2:0,i),n(r,i)}finally{kr(o),qe(s?3:1,i)}}function ca(e,t,n){_x(e,t,n),(n.flags&64)===64&&bx(e,t,n)}function Ju(e,t,n=Rn){let r=t.localNames;if(r!==null){let i=t.index+1;for(let o=0;o<r.length;o+=2){let s=r[o+1],a=s===-1?n(t,e):e[s];e[i++]=a}}}function px(e,t,n,r){let i=r.get(iE,Vm)||n===Pn.ShadowDom,o=e.selectRootElement(t,i);return gx(o),o}function gx(e){mx(e)}var mx=()=>null;function yx(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function sy(e,t,n,r,i,o,s,a){if(!a&&Xu(t,e,n,r,i)){yi(t)&&vx(n,t.index);return}if(t.type&3){let l=Rn(t,n);r=yx(r),i=s!=null?s(i,t.value||"",r):i,o.setProperty(l,r,i)}else t.type&12}function vx(e,t){let n=rn(t,e);n[he]&16||(n[he]|=64)}function _x(e,t,n){let r=n.directiveStart,i=n.directiveEnd;yi(n)&&fx(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||Is(n,t);let o=n.initialInputs;for(let s=r;s<i;s++){let a=e.data[s],l=Qi(t,e,s,n);if(Cn(l,t),o!==null&&Sx(t,s-r,l,a,n,o),Tn(a)){let u=rn(n.index,t);u[ct]=Qi(t,e,s,n)}}}function bx(e,t,n){let r=n.directiveStart,i=n.directiveEnd,o=n.index,s=r1();try{kr(o);for(let a=r;a<i;a++){let l=e.data[a],u=t[a];zl(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&wx(l,u)}}finally{kr(-1),zl(s)}}function wx(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function Qu(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let o=n[i];XE(t,o.selectors,!1)&&(r??=[],Tn(o)?r.unshift(o):r.push(o))}return r}function Ex(e,t,n,r,i,o){let s=Rn(e,t);xx(t[bt],s,o,e.value,n,r,i)}function xx(e,t,n,r,i,o,s){if(o==null)e.removeAttribute(t,i,n);else{let a=s==null?fo(o):s(o,r||"",i);e.setAttribute(t,i,a,n)}}function Sx(e,t,n,r,i,o){let s=o[t];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],u=s[a+1];ec(r,n,l,u)}}function ay(e,t){let n=e[Ki],r=n?n.get(_i,null):null;r&&r.handleError(t)}function Xu(e,t,n,r,i){let o=e.inputs?.[r],s=e.hostDirectiveInputs?.[r],a=!1;if(s)for(let l=0;l<s.length;l+=2){let u=s[l],d=s[l+1],f=t.data[u];ec(f,n[u],d,i),a=!0}if(o)for(let l of o){let u=n[l],d=t.data[l];ec(d,u,r,i),a=!0}return a}function Ix(e,t){let n=rn(t,e),r=n[ce];Cx(r,n);let i=n[$n];i!==null&&n[Yi]===null&&(n[Yi]=$m(i,n[Ki])),qe(18),eh(r,n,n[ct]),qe(19,n[ct])}function Cx(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function eh(e,t,n){ku(t);try{let r=e.viewQuery;r!==null&&Xl(1,r,n);let i=e.template;i!==null&&oy(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Fn]?.finishViewCreation(e),e.staticContentQueries&&zm(e,t),e.staticViewQueries&&Xl(2,e.viewQuery,n);let o=e.components;o!==null&&Tx(t,o)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[he]&=-5,Au()}}function Tx(e,t){for(let n=0;n<t.length;n++)Ix(e,t[n])}function ua(e,t,n,r){let i=Oe(null);try{let o=t.tView,s=e[he]&4096?4096:16,a=Yu(e,o,n,s,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[Rr]=l;let u=e[Fn];return u!==null&&(a[Fn]=u.createEmbeddedView(o)),eh(o,a,n),a}finally{Oe(i)}}function Xi(e,t){return!t||t.firstChild===null||Om(e)}var Ox;function th(e,t){return Ox(e,t)}var br=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(br||{});function ly(e){return(e.flags&32)===32}function Xr(e,t,n,r,i){if(r!=null){let o,s=!1;zn(r)?o=r:Ln(r)&&(s=!0,r=r[$n]);let a=Wt(r);e===0&&n!==null?i==null?ey(t,n,a):Os(t,n,a,i||null,!0):e===1&&n!==null?Os(t,n,a,i||null,!0):e===2?lx(t,a,s):e===3&&t.destroyNode(a),o!=null&&Fx(t,e,o,n,i)}}function Rx(e,t){cy(e,t),t[$n]=null,t[bn]=null}function Dx(e,t,n,r,i,o){r[$n]=i,r[bn]=t,fa(e,r,n,1,i,o)}function cy(e,t){t[Bn].changeDetectionScheduler?.notify(9),fa(e,t,t[bt],2,null,null)}function Nx(e){let t=e[Ji];if(!t)return el(e[ce],e);for(;t;){let n=null;if(Ln(t))n=t[Ji];else{let r=t[Dt];r&&(n=r)}if(!n){for(;t&&!t[fn]&&t!==e;)Ln(t)&&el(t[ce],t),t=t[Nt];t===null&&(t=e),Ln(t)&&el(t[ce],t),n=t&&t[fn]}t=n}}function nh(e,t){let n=e[ci],r=n.indexOf(t);n.splice(r,1)}function ha(e,t){if(mo(t))return;let n=t[bt];n.destroyNode&&fa(e,t,n,3,null,null),Nx(t)}function el(e,t){if(mo(t))return;let n=Oe(null);try{t[he]&=-129,t[he]|=256,t[zt]&&Fp(t[zt]),Ax(e,t),kx(e,t),t[ce].type===1&&t[bt].destroy();let r=t[Rr];if(r!==null&&zn(t[Nt])){r!==t[Nt]&&nh(r,t);let i=t[Fn];i!==null&&i.detachView(e)}Kl(t)}finally{Oe(n)}}function kx(e,t){let n=e.cleanup,r=t[ys];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]=="string"){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[ys]=null);let i=t[rr];if(i!==null){t[rr]=null;for(let s=0;s<i.length;s++){let a=i[s];a()}}let o=t[vs];if(o!==null){t[vs]=null;for(let s of o)s.destroy()}}function Ax(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 _o)){let o=n[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=i[o[s]],l=o[s+1];qe(4,a,l);try{l.call(a)}finally{qe(5,a,l)}}else{qe(4,i,o);try{o.call(i)}finally{qe(5,i,o)}}}}}function Px(e,t,n){return Lx(e,t.parent,n)}function Lx(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[$n];if(yi(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Pn.None||i===Pn.Emulated)return null}return Rn(r,n)}function Mx(e,t,n){return Vx(e,t,n)}function jx(e,t,n){return e.type&40?Rn(e,n):null}var Vx=jx,Dd;function da(e,t,n,r){let i=Px(e,r,t),o=t[bt],s=r.parent||t[bn],a=Mx(s,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)Rd(o,i,n[l],a,!1);else Rd(o,i,n,a,!1);Dd!==void 0&&Dd(o,r,t,n,i)}function Li(e,t){if(t!==null){let n=t.type;if(n&3)return Rn(t,e);if(n&4)return tc(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Li(e,r);{let i=e[t.index];return zn(i)?tc(-1,i):Wt(i)}}else{if(n&128)return Li(e,t.next);if(n&32)return th(t,e)()||Wt(e[t.index]);{let r=uy(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Nr(e[yn]);return Li(i,r)}else return Li(e,t.next)}}}return null}function uy(e,t){if(t!==null){let n=e[yn][bn],r=t.projection;return n.projection[r]}return null}function tc(e,t){let n=Dt+e+1;if(n<t.length){let r=t[n],i=r[ce].firstChild;if(i!==null)return Li(r,i)}return t[Dr]}function rh(e,t,n,r,i,o,s){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(s&&t===0&&(a&&Cn(Wt(a),r),n.flags|=2),!ly(n))if(l&8)rh(e,t,n.child,r,i,o,!1),Xr(t,e,i,a,o);else if(l&32){let u=th(n,r),d;for(;d=u();)Xr(t,e,i,d,o);Xr(t,e,i,a,o)}else l&16?Bx(e,t,r,n,i,o):Xr(t,e,i,a,o);n=s?n.projectionNext:n.next}}function fa(e,t,n,r,i,o){rh(n,r,e.firstChild,t,i,o,!1)}function Bx(e,t,n,r,i,o){let s=n[yn],a=s[bn].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let u=a[l];Xr(t,e,i,u,o)}else{let l=a,u=s[Nt];Om(r)&&(l.flags|=128),rh(e,t,l,u,i,o,!0)}}function Fx(e,t,n,r,i){let o=n[Dr],s=Wt(n);o!==s&&Xr(t,e,r,o,i);for(let a=Dt;a<n.length;a++){let l=n[a];fa(l[ce],l,e,t,r,o)}}function Ux(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let o=r.indexOf("-")===-1?void 0:br.DashCase;i==null?e.removeStyle(n,r,o):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=br.Important),e.setStyle(n,r,i,o))}}function Rs(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let o=t[n.index];o!==null&&r.push(Wt(o)),zn(o)&&Hx(o,r);let s=n.type;if(s&8)Rs(e,t,n.child,r);else if(s&32){let a=th(n,t),l;for(;l=a();)r.push(l)}else if(s&16){let a=uy(t,n);if(Array.isArray(a))r.push(...a);else{let l=Nr(t[yn]);Rs(l[ce],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function Hx(e,t){for(let n=Dt;n<e.length;n++){let r=e[n],i=r[ce].firstChild;i!==null&&Rs(r[ce],r,i,t)}e[Dr]!==e[$n]&&t.push(e[Dr])}function hy(e){if(e[ii]!==null){for(let t of e[ii])t.impl.addSequence(t);e[ii].length=0}}var dy=[];function $x(e){return e[zt]??zx(e)}function zx(e){let t=dy.pop()??Object.create(Wx);return t.lView=e,t}function qx(e){e.lView[zt]!==e&&(e.lView=null,dy.push(e))}var Wx=Qe(L({},su),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{yo(e.lView)},consumerOnSignalRead(){this.lView[zt]=this}});function Gx(e){let t=e[zt]??Object.create(Zx);return t.lView=e,t}var Zx=Qe(L({},su),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Nr(e.lView);for(;t&&!fy(t[ce]);)t=Nr(t);t&&Tu(t)},consumerOnSignalRead(){this.lView[zt]=this}});function fy(e){return e.type!==2}function py(e){if(e[vs]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[vs])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[he]&8192)}}var Yx=100;function gy(e,t=!0,n=0){let r=e[Bn].rendererFactory,i=!1;i||r.begin?.();try{Kx(e,n)}catch(o){throw t&&ay(e,o),o}finally{i||r.end?.()}}function Kx(e,t){let n=rm();try{hd(!0),nc(e,t);let r=0;for(;na(e);){if(r===Yx)throw new Le(103,!1);r++,nc(e,1)}}finally{hd(n)}}function Jx(e,t,n,r){if(mo(t))return;let i=t[he],o=!1,s=!1;ku(t);let a=!0,l=null,u=null;o||(fy(e)?(u=$x(t),l=Jh(u)):L0()===null?(a=!1,u=Gx(t),l=Jh(u)):t[zt]&&(Fp(t[zt]),t[zt]=null));try{Kg(t),Xw(e.bindingStartIndex),n!==null&&oy(e,t,n,2,r);let d=(i&3)===3;if(!o)if(d){let g=e.preOrderCheckHooks;g!==null&&es(t,g,null)}else{let g=e.preOrderHooks;g!==null&&ts(t,g,0,null),Ka(t,0)}if(s||Qx(t),py(t),my(t,0),e.contentQueries!==null&&zm(e,t),!o)if(d){let g=e.contentCheckHooks;g!==null&&es(t,g)}else{let g=e.contentHooks;g!==null&&ts(t,g,1),Ka(t,1)}eS(e,t);let f=e.components;f!==null&&vy(t,f,0);let p=e.viewQuery;if(p!==null&&Xl(2,p,r),!o)if(d){let g=e.viewCheckHooks;g!==null&&es(t,g)}else{let g=e.viewHooks;g!==null&&ts(t,g,2),Ka(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[Ya]){for(let g of t[Ya])g();t[Ya]=null}o||(hy(t),t[he]&=-73)}catch(d){throw o||yo(t),d}finally{u!==null&&(F0(u,l),a&&qx(u)),Au()}}function my(e,t){for(let n=km(e);n!==null;n=Am(n))for(let r=Dt;r<n.length;r++){let i=n[r];yy(i,t)}}function Qx(e){for(let t=km(e);t!==null;t=Am(t)){if(!(t[he]&2))continue;let n=t[ci];for(let r=0;r<n.length;r++){let i=n[r];Tu(i)}}}function Xx(e,t,n){qe(18);let r=rn(t,e);yy(r,n),qe(19,r[ct])}function yy(e,t){Cu(e)&&nc(e,t)}function nc(e,t){let n=e[ce],r=e[he],i=e[zt],o=!!(t===0&&r&16);if(o||=!!(r&64&&t===0),o||=!!(r&1024),o||=!!(i?.dirty&&Bp(i)),o||=!1,i&&(i.dirty=!1),e[he]&=-9217,o)Jx(n,e,n.template,e[ct]);else if(r&8192){py(e),my(e,1);let s=n.components;s!==null&&vy(e,s,1),hy(e)}}function vy(e,t,n){for(let r=0;r<t.length;r++)Xx(e,t[r],n)}function eS(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)kr(~i);else{let o=i,s=n[++r],a=n[++r];n1(s,o);let l=t[o];qe(24,l),a(2,l),qe(25,l)}}}finally{kr(-1)}}function ih(e,t){let n=rm()?64:1088;for(e[Bn].changeDetectionScheduler?.notify(t);e;){e[he]|=n;let r=Nr(e);if(bs(e)&&!r)return e;e=r}return null}function _y(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function by(e,t){let n=Dt+t;if(n<e.length)return e[n]}function pa(e,t,n,r=!0){let i=t[ce];if(tS(i,t,e,n),r){let s=tc(n,e),a=t[bt],l=a.parentNode(e[Dr]);l!==null&&Dx(i,e[bn],a,t,l,s)}let o=t[Yi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function wy(e,t){let n=eo(e,t);return n!==void 0&&ha(n[ce],n),n}function eo(e,t){if(e.length<=Dt)return;let n=Dt+t,r=e[n];if(r){let i=r[Rr];i!==null&&i!==e&&nh(i,r),t>0&&(e[n-1][fn]=r[fn]);let o=gs(e,Dt+t);Rx(r[ce],r);let s=o[Fn];s!==null&&s.detachView(o[ce]),r[Nt]=null,r[fn]=null,r[he]&=-129}return r}function tS(e,t,n,r){let i=Dt+r,o=n.length;r>0&&(n[i-1][fn]=t),r<o-Dt?(t[fn]=n[i],Og(n,Dt+r,t)):(n.push(t),t[fn]=null),t[Nt]=n;let s=t[Rr];s!==null&&n!==s&&Ey(s,t);let a=t[Fn];a!==null&&a.insertView(e),Hl(t),t[he]|=128}function Ey(e,t){let n=e[ci],r=t[Nt];if(Ln(r))e[he]|=2;else{let i=r[Nt][yn];t[yn]!==i&&(e[he]|=2)}n===null?e[ci]=[t]:n.push(t)}var to=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[ce];return Rs(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[ct]}get dirty(){return!!(this._lView[he]&9280)||!!this._lView[zt]?.dirty}set context(e){this._lView[ct]=e}get destroyed(){return mo(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Nt];if(zn(e)){let t=e[_s],n=t?t.indexOf(this):-1;n>-1&&(eo(e,n),gs(t,n))}this._attachedToViewContainer=!1}ha(this._lView[ce],this._lView)}onDestroy(e){Jg(this._lView,e)}markForCheck(){ih(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Tu(this._cdRefInjectingView||this._lView)}detach(){this._lView[he]&=-129}reattach(){Hl(this._lView),this._lView[he]|=128}detectChanges(){this._lView[he]|=1024,gy(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Le(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=bs(this._lView),t=this._lView[Rr];t!==null&&!e&&nh(t,this._lView),cy(this._lView[ce],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Le(902,!1);this._appRef=e;let t=bs(this._lView),n=this._lView[Rr];n!==null&&!t&&Ey(n,this._lView),Hl(this._lView)}},no=(()=>{class e{static __NG_ELEMENT_ID__=iS}return e})(),nS=no,rS=class extends nS{_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=ua(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new to(r)}};function iS(){return ga(Zt(),we())}function ga(e,t){return e.type&4?new rS(t,e,bi(e,t)):null}function xo(e,t,n,r,i){let o=e.data[t];if(o===null)o=oS(e,t,n,r,i),t1()&&(o.flags|=32);else if(o.type&64){o.type=n,o.value=r,o.attrs=i;let s=Qw();o.injectorIndex=s===null?-1:s.injectorIndex}return ur(o,!0),o}function oS(e,t,n,r,i){let o=em(),s=Ru(),a=s?o:o&&o.parent,l=e.data[t]=aS(e,a,n,t,r,i);return sS(e,l,o,s),l}function sS(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 aS(e,t,n,r,i,o){let s=t?t.injectorIndex:-1,a=0;return Yw()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,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 UP=new RegExp(`^(\\d+)*(${rE}|${nE})*(.*)`),lS=()=>null;function ro(e,t){return lS(e,t)}var cS=class{},xy=class{},uS=class{resolveComponentFactory(e){throw Error(`No component factory found for ${dn(e)}.`)}},So=class{static NULL=new uS},wn=class{},Sy=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>hS()}return e})();function hS(){let e=we(),t=Zt(),n=rn(t.index,e);return(Ln(n)?n:e)[bt]}var dS=(()=>{class e{static \u0275prov=ue({token:e,providedIn:"root",factory:()=>null})}return e})();function rc(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,o=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a=="number")o=a;else if(o==1)i=id(i,a);else if(o==2){let l=a,u=t[++s];r=id(r,l+": "+u+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Tt(e,t=Re.Default){let n=we();if(n===null)return Be(e,t);let r=Zt();return vm(r,n,Pt(e),t)}function oh(e,t,n,r,i){let o=r===null?null:{"":-1},s=i(e,n);if(s!==null){let a,l=null,u=null,d=pS(s);d===null?a=s:[a,l,u]=d,yS(e,t,n,a,o,l,u)}o!==null&&r!==null&&fS(n,r,o)}function fS(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let o=n[t[i+1]];if(o==null)throw new Le(-301,!1);r.push(t[i],o)}}function pS(e){let t=null,n=!1;for(let s=0;s<e.length;s++){let a=e[s];if(s===0&&Tn(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,o=null;for(let s of e)s.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,o??=new Map,gS(s,r,o,i)),s===t&&(r??=[],r.push(s));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,o]):null}function gS(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function mS(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function yS(e,t,n,r,i,o,s){let a=r.length,l=!1;for(let p=0;p<a;p++){let g=r[p];!l&&Tn(g)&&(l=!0,mS(e,n,p)),Wl(Is(n,t),e,g.type)}xS(n,e.data.length,a);for(let p=0;p<a;p++){let g=r[p];g.providersResolver&&g.providersResolver(g)}let u=!1,d=!1,f=ry(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let p=0;p<a;p++){let g=r[p];if(n.mergedAttrs=ui(n.mergedAttrs,g.hostAttrs),_S(e,n,t,f,g),ES(f,g,i),s!==null&&s.has(g)){let[b,I]=s.get(g);n.directiveToIndex.set(g.type,[f,b+n.directiveStart,I+n.directiveStart])}else(o===null||!o.has(g))&&n.directiveToIndex.set(g.type,f);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!u&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),u=!0),!d&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),d=!0),f++}vS(e,n,o)}function vS(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))Nd(0,t,i,r),Nd(1,t,i,r),Ad(t,r,!1);else{let o=n.get(i);kd(0,t,o,r),kd(1,t,o,r),Ad(t,r,!0)}}}function Nd(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s;e===0?s=t.inputs??={}:s=t.outputs??={},s[o]??=[],s[o].push(r),Iy(t,o)}}function kd(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,o),Iy(t,s)}}function Iy(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function Ad(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:o}=e;if(r===null||!n&&i===null||n&&o===null||Gu(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let s=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 u=i[l];for(let d of u)if(d===t){s??=[],s.push(l,r[a+1]);break}}else if(n&&o.hasOwnProperty(l)){let u=o[l];for(let d=0;d<u.length;d+=2)if(u[d]===t){s??=[],s.push(u[d+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(s)}function _S(e,t,n,r,i){e.data[r]=i;let o=i.factory||(i.factory=Cr(i.type,!0)),s=new _o(o,Tn(i),Tt);e.blueprint[r]=s,n[r]=s,bS(e,t,r,ry(e,n,i.hostVars,Wn),i)}function bS(e,t,n,r,i){let o=i.hostBindings;if(o){let s=e.hostBindingOpCodes;s===null&&(s=e.hostBindingOpCodes=[]);let a=~t.index;wS(s)!=a&&s.push(a),s.push(n,r,o)}}function wS(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function ES(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Tn(t)&&(n[""]=e)}}function xS(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function Cy(e,t,n,r,i,o,s,a){let l=t.consts,u=sr(l,s),d=xo(t,e,2,r,u);return o&&oh(t,n,d,sr(l,a),i),d.mergedAttrs=ui(d.mergedAttrs,d.attrs),d.attrs!==null&&rc(d,d.attrs,!1),d.mergedAttrs!==null&&rc(d,d.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,d),d}function Ty(e,t){Lu(e,t),Su(t)&&e.queries.elementEnd(t)}var SS=class extends So{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Or(e);return new sh(t,this.ngModule)}};function IS(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],o={propName:n,templateName:t,isSignal:(r&la.SignalBased)!==0};return i&&(o.transform=i),o})}function CS(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function TS(e,t,n){let r=t instanceof Vn?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new y1(n,r):n}function OS(e){let t=e.get(wn,null);if(t===null)throw new Le(407,!1);let n=e.get(dS,null),r=e.get(vi,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function RS(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return Xm(t,n,n==="svg"?Zg:n==="math"?Fw:null)}var sh=class extends xy{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return IS(this.componentDef.inputs)}get outputs(){return CS(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=rx(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){qe(22);let i=Oe(null);try{let o=this.componentDef,s=n?["ng-version","19.2.0"]:ix(this.componentDef.selectors[0]),a=Zu(0,null,null,1,0,null,null,null,null,[s],null),l=TS(o,r||this.ngModule,e),u=OS(l),d=u.rendererFactory.createRenderer(null,o),f=n?px(d,n,o.encapsulation,l):RS(o,d),p=Yu(null,a,null,512|ny(o),null,null,u,d,l,null,$m(f,l,!0));p[at]=f,ku(p);let g=null;try{let m=Cy(at,a,p,"#host",()=>[this.componentDef],!0,0);f&&(ty(d,f,m),Cn(f,p)),ca(a,p,m),qu(a,m,p),Ty(a,m),t!==void 0&&NS(m,this.ngContentSelectors,t),g=rn(m.index,p),p[ct]=g[ct],eh(a,p,null)}catch(m){throw g!==null&&Kl(g),Kl(p),m}finally{qe(23),Au()}return new DS(this.componentType,p)}finally{Oe(i)}}},DS=class extends cS{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Iu(t[ce],at),this.location=bi(this._tNode,t),this.instance=rn(this._tNode.index,t)[ct],this.hostView=this.changeDetectorRef=new to(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=Xu(n,r[ce],r,e,t);this.previousInputValues.set(e,t);let o=rn(n.index,r);ih(o,1)}get injector(){return new Fi(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function NS(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let o=n[i];r.push(o!=null&&o.length?Array.from(o):null)}}var wi=(()=>{class e{static __NG_ELEMENT_ID__=kS}return e})();function kS(){let e=Zt();return Ry(e,we())}var AS=wi,Oy=class extends AS{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return bi(this._hostTNode,this._hostLView)}get injector(){return new Fi(this._hostTNode,this._hostLView)}get parentInjector(){let e=Mu(this._hostTNode,this._hostLView);if(dm(e)){let t=xs(e,this._hostLView),n=Es(e),r=t[ce].data[n+8];return new Fi(r,t)}else return new Fi(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Pd(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Dt}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let o=ro(this._lContainer,e.ssrId),s=e.createEmbeddedViewImpl(t||{},i,o);return this.insertImpl(s,r,Xi(this._hostTNode,o)),s}createComponent(e,t,n,r,i){let o=e&&!Pw(e),s;if(o)s=t;else{let g=t||{};s=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=o?e:new sh(Or(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(o?l:this.parentInjector).get(Vn,null);g&&(i=g)}let u=Or(a.componentType??{}),d=ro(this._lContainer,u?.id??null),f=d?.firstChild??null,p=a.create(l,r,f,i);return this.insertImpl(p.hostView,s,Xi(this._hostTNode,d)),p}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(Hw(r)){let s=this.indexOf(e);if(s!==-1)this.detach(s);else{let a=r[Nt],l=new Oy(a,a[bn],a[Nt]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),o=this._lContainer;return pa(o,r,i,n),e.attachToViewContainerRef(),Og(tl(o),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=Pd(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=eo(this._lContainer,t);n&&(gs(tl(this._lContainer),t),ha(n[ce],n))}detach(e){let t=this._adjustIndex(e,-1),n=eo(this._lContainer,t);return n&&gs(tl(this._lContainer),t)!=null?new to(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function Pd(e){return e[_s]}function tl(e){return e[_s]||(e[_s]=[])}function Ry(e,t){let n,r=t[e.index];return zn(r)?n=r:(n=_y(r,t,null,e),t[e.index]=n,Ku(t,n)),LS(n,t,e,r),new Oy(n,e,t)}function PS(e,t){let n=e[bt],r=n.createComment(""),i=Rn(t,e),o=n.parentNode(i);return Os(n,o,r,n.nextSibling(i),!1),r}var LS=VS,MS=()=>!1;function jS(e,t,n){return MS(e,t,n)}function VS(e,t,n,r){if(e[Dr])return;let i;n.type&8?i=Wt(r):i=PS(t,n),e[Dr]=i}var BS=class Dy{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new Dy(this.queryList)}setDirty(){this.queryList.setDirty()}},FS=class Ny{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 o=0;o<r;o++){let s=n.getByIndex(o),a=this.queries[s.indexInDeclarationView];i.push(a.clone())}return new Ny(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++)ah(t,n).matches!==null&&this.queries[n].setDirty()}},US=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=JS(e):this.predicate=e}},HS=class ky{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,o=this.getByIndex(r).embeddedTView(t,i);o&&(o.indexInDeclarationView=r,n!==null?n.push(o):n=[o])}return n!==null?new ky(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)}},$S=class Ay{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 Ay(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 o=r[i];this.matchTNodeWithReadOption(t,n,zS(n,o)),this.matchTNodeWithReadOption(t,n,ns(n,t,o,!1,!1))}else r===no?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,ns(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===$t||i===wi||i===no&&n.type&4)this.addMatch(n.index,-2);else{let o=ns(n,t,i,!1,!1);o!==null&&this.addMatch(n.index,o)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function zS(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 qS(e,t){return e.type&11?bi(e,t):e.type&4?ga(e,t):null}function WS(e,t,n,r){return n===-1?qS(t,e):n===-2?GS(e,t,r):Qi(e,e[ce],n,t)}function GS(e,t,n){if(n===$t)return bi(t,e);if(n===no)return ga(t,e);if(n===wi)return Ry(t,e)}function Py(e,t,n,r){let i=t[Fn].queries[r];if(i.matches===null){let o=e.data,s=n.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let u=s[l];if(u<0)a.push(null);else{let d=o[u];a.push(WS(t,d,s[l+1],n.metadata.read))}}i.matches=a}return i.matches}function ic(e,t,n,r){let i=e.queries.getByIndex(n),o=i.matches;if(o!==null){let s=Py(e,t,i,n);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)r.push(s[a/2]);else{let u=o[a+1],d=t[-l];for(let f=Dt;f<d.length;f++){let p=d[f];p[Rr]===p[Nt]&&ic(p[ce],p,u,r)}if(d[ci]!==null){let f=d[ci];for(let p=0;p<f.length;p++){let g=f[p];ic(g[ce],g,u,r)}}}}}return r}function ZS(e,t){return e[Fn].queries[t].queryList}function YS(e,t,n){let r=new H1((n&4)===4);return qw(e,t,r,r.destroy),(t[Fn]??=new FS).queries.push(new BS(r))-1}function KS(e,t,n){let r=gt();return r.firstCreatePass&&(QS(r,new US(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),YS(r,we(),t)}function JS(e){return e.split(",").map(t=>t.trim())}function QS(e,t,n){e.queries===null&&(e.queries=new HS),e.queries.track(new $S(t,n))}function ah(e,t){return e.queries.getByIndex(t)}function XS(e,t){let n=e[ce],r=ah(n,t);return r.crossesNgTemplate?ic(n,e,t,[]):Py(n,e,r,t)}var io=class{},Ly=class extends io{injector;componentFactoryResolver=new SS(this);instance=null;constructor(e){super();let t=new xu([...e.providers,{provide:io,useValue:this},{provide:So,useValue:this.componentFactoryResolver}],e.parent||Xs(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function eI(e,t,n=null){return new Ly({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var tI=(()=>{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=Pg(!1,n.type),i=r.length>0?eI([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=ue({token:e,providedIn:"environment",factory:()=>new e(Be(Vn))})}return e})();function Vt(e){return yu(()=>{let t=My(e),n=Qe(L({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===Rm.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(tI).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Pn.Emulated,styles:e.styles||jn,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&Fr("NgStandalone"),jy(n);let r=e.dependencies;return n.directiveDefs=Ld(r,!1),n.pipeDefs=Ld(r,!0),n.id=sI(n),n})}function nI(e){return Or(e)||kg(e)}function rI(e){return e!==null}function iI(e,t){if(e==null)return Tr;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],o,s,a,l;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,l=i[3]||null):(o=i,s=i,a=la.None,l=null),n[o]=[r,a,l],t[o]=s}return n}function oI(e){if(e==null)return Tr;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function ma(e){return yu(()=>{let t=My(e);return jy(t),t})}function lh(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 My(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||Tr,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||jn,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:iI(e.inputs,t),outputs:oI(e.outputs),debugInfo:null}}function jy(e){e.features?.forEach(t=>t(e))}function Ld(e,t){if(!e)return null;let n=t?Ag:nI;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(rI)}function sI(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 aI(e){return Object.getPrototypeOf(e.prototype).constructor}function Ei(e){let t=aI(e.type),n=!0,r=[e];for(;t;){let i;if(Tn(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Le(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let s=e;s.inputs=nl(e.inputs),s.declaredInputs=nl(e.declaredInputs),s.outputs=nl(e.outputs);let a=i.hostBindings;a&&dI(e,a);let l=i.viewQuery,u=i.contentQueries;if(l&&uI(e,l),u&&hI(e,u),lI(e,i),Qb(e.outputs,i.outputs),Tn(i)&&i.data.animation){let d=e.data;d.animation=(d.animation||[]).concat(i.data.animation)}}let o=i.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(e),a===Ei&&(n=!1)}}t=Object.getPrototypeOf(t)}cI(r)}function lI(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 cI(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=ui(i.hostAttrs,n=ui(n,i.hostAttrs))}}function nl(e){return e===Tr?{}:e===jn?[]:e}function uI(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function hI(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,o)=>{t(r,i,o),n(r,i,o)}:e.contentQueries=t}function dI(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function Vy(e,t,n){return e[t]=n}function Un(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function fI(e,t,n,r){let i=Un(e,t,n);return Un(e,t+1,r)||i}function pI(e,t,n,r,i,o,s,a,l){let u=t.consts,d=xo(t,e,4,s||null,a||null);Ou()&&oh(t,n,d,sr(u,l),Qu),d.mergedAttrs=ui(d.mergedAttrs,d.attrs),Lu(t,d);let f=d.tView=Zu(2,d,r,i,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u,null);return t.queries!==null&&(t.queries.template(t,d),f.queries=t.queries.embeddedTView(d)),d}function oc(e,t,n,r,i,o,s,a,l,u){let d=n+at,f=t.firstCreatePass?pI(d,t,e,r,i,o,s,a,l):t.data[d];ur(f,!1);let p=gI(t,e,f,n);ra()&&da(t,e,p,f),Cn(p,e);let g=_y(p,e,p,f);return e[d]=g,Ku(e,g),jS(g,f,e),ea(f)&&ca(t,e,f),l!=null&&Ju(e,f,u),f}function pt(e,t,n,r,i,o,s,a){let l=we(),u=gt(),d=sr(u.consts,o);return oc(l,u,e,t,n,r,i,d,s,a),pt}var gI=mI;function mI(e,t,n,r){return ia(!0),t[bt].createComment("")}var yI=new Ee(""),vI=(()=>{class e{static \u0275prov=ue({token:e,providedIn:"root",factory:()=>new _I})}return e})(),_I=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 By(e){return!!e&&typeof e.then=="function"}function bI(e){return!!e&&typeof e.subscribe=="function"}var wI=new Ee(""),Fy=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=N(wI,{optional:!0})??[];injector=N(Lt);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let o=Vg(this.injector,i);if(By(o))n.push(o);else if(bI(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});n.push(s)}}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=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),EI=new Ee("");function xI(){H0(()=>{throw new Le(600,!1)})}function SI(e){return e.isBoundToModule}var II=10,lr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=N(j1);afterRenderManager=N(Fm);zonelessEnabled=N(Vu);rootEffectScheduler=N(vI);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new de;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=N(oa).hasPendingTasks.pipe(Ks(n=>!n));constructor(){N(bo,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=N(Vn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){qe(10);let i=n instanceof xy;if(!this._injector.get(Fy).done){let f=!i&&ww(n),p=!1;throw new Le(405,p)}let o;i?o=n:o=this._injector.get(So).resolveComponentFactory(n),this.componentTypes.push(o.componentType);let s=SI(o)?void 0:this._injector.get(io),a=r||o.selector,l=o.create(Lt.NULL,[],a,s),u=l.location.nativeElement,d=l.injector.get(yI,null);return d?.registerApplication(u),l.onDestroy(()=>{this.detachView(l.hostView),rs(this.components,l),d?.unregisterApplication(u)}),this._loadComponent(l),qe(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){qe(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(zu.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Le(101,!1);let n=Oe(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Oe(n),this.afterTick.next(),qe(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(wn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<II;)qe(14),this.synchronizeOnce(),qe(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)CI(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})=>na(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;rs(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(EI,[]).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),()=>rs(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Le(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=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function rs(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function CI(e,t,n,r){!n&&!na(e)||gy(e,t,n&&!r?0:1)}function ya(e,t,n,r){let i=we(),o=vo();if(Un(i,o,t)){let s=gt(),a=Pu();Ex(a,i,e,t,n,r)}return ya}function Uy(e,t,n,r){return Un(e,vo(),n)?t+fo(n)+r:Wn}function Bo(e,t){return e<<17|t<<2}function Ar(e){return e>>17&32767}function TI(e){return(e&2)==2}function OI(e,t){return e&131071|t<<17}function sc(e){return e|2}function hi(e){return(e&131068)>>2}function rl(e,t){return e&-131069|t<<2}function RI(e){return(e&1)===1}function ac(e){return e|1}function DI(e,t,n,r,i,o){let s=o?t.classBindings:t.styleBindings,a=Ar(s),l=hi(s);e[r]=n;let u=!1,d;if(Array.isArray(n)){let f=n;d=f[1],(d===null||po(f,d)>0)&&(u=!0)}else d=n;if(i)if(l!==0){let f=Ar(e[a+1]);e[r+1]=Bo(f,a),f!==0&&(e[f+1]=rl(e[f+1],r)),e[a+1]=OI(e[a+1],r)}else e[r+1]=Bo(a,0),a!==0&&(e[a+1]=rl(e[a+1],r)),a=r;else e[r+1]=Bo(l,0),a===0?a=r:e[l+1]=rl(e[l+1],r),l=r;u&&(e[r+1]=sc(e[r+1])),Md(e,d,r,!0),Md(e,d,r,!1),NI(t,d,e,r,o),s=Bo(a,l),o?t.classBindings=s:t.styleBindings=s}function NI(e,t,n,r,i){let o=i?e.residualClasses:e.residualStyles;o!=null&&typeof t=="string"&&po(o,t)>=0&&(n[r+1]=ac(n[r+1]))}function Md(e,t,n,r){let i=e[n+1],o=t===null,s=r?Ar(i):hi(i),a=!1;for(;s!==0&&(a===!1||o);){let l=e[s],u=e[s+1];kI(l,t)&&(a=!0,e[s+1]=r?ac(u):sc(u)),s=r?Ar(u):hi(u)}a&&(e[n+1]=r?sc(i):ac(i))}function kI(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?po(e,t)>=0:!1}function Me(e,t,n){let r=we(),i=vo();if(Un(r,i,t)){let o=gt(),s=Pu();sy(o,s,r,e,t,r[bt],n,!1)}return Me}function jd(e,t,n,r,i){Xu(t,e,n,i?"class":"style",r)}function va(e,t,n){return Hy(e,t,n,!1),va}function _a(e,t){return Hy(e,t,null,!0),_a}function Hy(e,t,n,r){let i=we(),o=gt(),s=e1(2);if(o.firstUpdatePass&&PI(o,e,s,r),t!==Wn&&Un(i,s,t)){let a=o.data[hr()];BI(o,a,i,i[bt],e,i[s+1]=FI(t,n),r,s)}}function AI(e,t){return t>=e.expandoStartIndex}function PI(e,t,n,r){let i=e.data;if(i[n+1]===null){let o=i[hr()],s=AI(e,n);UI(o,r)&&t===null&&!s&&(t=!1),t=LI(i,o,t,r),DI(i,o,t,n,s,r)}}function LI(e,t,n,r){let i=i1(e),o=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=il(null,e,t,n,r),n=oo(n,t.attrs,r),o=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==i)if(n=il(i,e,t,n,r),o===null){let a=MI(e,t,r);a!==void 0&&Array.isArray(a)&&(a=il(null,e,t,a[1],r),a=oo(a,t.attrs,r),jI(e,t,r,a))}else o=VI(e,t,r)}return o!==void 0&&(r?t.residualClasses=o:t.residualStyles=o),n}function MI(e,t,n){let r=n?t.classBindings:t.styleBindings;if(hi(r)!==0)return e[Ar(r)]}function jI(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Ar(i)]=r}function VI(e,t,n){let r,i=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<i;o++){let s=e[o].hostAttrs;r=oo(r,s,n)}return oo(r,t.attrs,n)}function il(e,t,n,r,i){let o=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(o=t[a],r=oo(r,o.hostAttrs,i),o!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function oo(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let o=0;o<t.length;o++){let s=t[o];typeof s=="number"?i=s:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),_w(e,s,n?!0:t[++o]))}return e===void 0?null:e}function BI(e,t,n,r,i,o,s,a){if(!(t.type&3))return;let l=e.data,u=l[a+1],d=RI(u)?Vd(l,t,n,i,hi(u),s):void 0;if(!Ds(d)){Ds(o)||TI(u)&&(o=Vd(l,null,n,i,a,s));let f=Yg(hr(),n);Ux(r,s,f,i,o)}}function Vd(e,t,n,r,i,o){let s=t===null,a;for(;i>0;){let l=e[i],u=Array.isArray(l),d=u?l[1]:l,f=d===null,p=n[i+1];p===Wn&&(p=f?jn:void 0);let g=f?Ga(p,r):d===r?p:void 0;if(u&&!Ds(g)&&(g=Ga(l,r)),Ds(g)&&(a=g,s))return a;let m=e[i+1];i=s?Ar(m):hi(m)}if(t!==null){let l=o?t.residualClasses:t.residualStyles;l!=null&&(a=Ga(l,r))}return a}function Ds(e){return e!==void 0}function FI(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=dn(Xn(e)))),e}function UI(e,t){return(e.flags&(t?8:16))!==0}var HI=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 o=this.detach(n);this.attach(n,i),this.attach(r,o)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function ol(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function $I(e,t,n){let r,i,o=0,s=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;o<=s&&o<=l;){let u=e.at(o),d=t[o],f=ol(o,u,o,d,n);if(f!==0){f<0&&e.updateValue(o,d),o++;continue}let p=e.at(s),g=t[l],m=ol(s,p,l,g,n);if(m!==0){m<0&&e.updateValue(s,g),s--,l--;continue}let b=n(o,u),I=n(s,p),A=n(o,d);if(Object.is(A,I)){let $=n(l,g);Object.is($,b)?(e.swap(o,s),e.updateValue(s,g),l--,s--):e.move(s,o),e.updateValue(o,d),o++;continue}if(r??=new Ud,i??=Fd(e,o,s,n),lc(e,r,o,A))e.updateValue(o,d),o++,s++;else if(i.has(A))r.set(b,e.detach(o)),s--;else{let $=e.create(o,t[o]);e.attach(o,$),o++,s++}}for(;o<=l;)Bd(e,r,n,o,t[o]),o++}else if(t!=null){let l=t[Symbol.iterator](),u=l.next();for(;!u.done&&o<=s;){let d=e.at(o),f=u.value,p=ol(o,d,o,f,n);if(p!==0)p<0&&e.updateValue(o,f),o++,u=l.next();else{r??=new Ud,i??=Fd(e,o,s,n);let g=n(o,f);if(lc(e,r,o,g))e.updateValue(o,f),o++,s++,u=l.next();else if(!i.has(g))e.attach(o,e.create(o,f)),o++,s++,u=l.next();else{let m=n(o,d);r.set(m,e.detach(o)),s--}}}for(;!u.done;)Bd(e,r,n,e.length,u.value),u=l.next()}for(;o<=s;)e.destroy(e.detach(s--));r?.forEach(l=>{e.destroy(l)})}function lc(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Bd(e,t,n,r,i){if(lc(e,t,r,n(r,i)))e.updateValue(r,i);else{let o=e.create(r,i);e.attach(r,o)}}function Fd(e,t,n,r){let i=new Set;for(let o=t;o<=n;o++)i.add(r(o,e.at(o)));return i}var Ud=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 yt(e,t){Fr("NgControlFlow");let n=we(),r=vo(),i=n[r]!==Wn?n[r]:-1,o=i!==-1?Ns(n,at+i):void 0,s=0;if(Un(n,r,e)){let a=Oe(null);try{if(o!==void 0&&wy(o,s),e!==-1){let l=at+e,u=Ns(n,l),d=cc(n[ce],l),f=ro(u,d.tView.ssrId),p=ua(n,d,t,{dehydratedView:f});pa(u,p,s,Xi(d,f))}}finally{Oe(a)}}else if(o!==void 0){let a=by(o,s);a!==void 0&&(a[ct]=t)}}var zI=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Dt}};function ba(e,t){return t}var qI=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Mt(e,t,n,r,i,o,s,a,l,u,d,f,p){Fr("NgControlFlow");let g=we(),m=gt(),b=l!==void 0,I=we(),A=a?s.bind(I[yn][ct]):s,$=new qI(b,A);I[at+e]=$,oc(g,m,e+1,t,n,r,i,sr(m.consts,o)),b&&oc(g,m,e+2,l,u,d,f,sr(m.consts,p))}var WI=class extends HI{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-Dt}at(e){return this.getLView(e)[ct].$implicit}attach(e,t){let n=t[Yi];this.needsIndexUpdate||=e!==this.length,pa(this.lContainer,t,e,Xi(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,GI(this.lContainer,e)}create(e,t){let n=ro(this.lContainer,this.templateTNode.tView.ssrId),r=ua(this.hostLView,this.templateTNode,new zI(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){ha(e[ce],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[ct].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[ct].$index=e}getLView(e){return ZI(this.lContainer,e)}};function jt(e){let t=Oe(null),n=hr();try{let r=we(),i=r[ce],o=r[n],s=n+1,a=Ns(r,s);if(o.liveCollection===void 0){let u=cc(i,s);o.liveCollection=new WI(a,r,u)}else o.liveCollection.reset();let l=o.liveCollection;if($I(l,e,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let u=vo(),d=l.length===0;if(Un(r,u,d)){let f=n+2,p=Ns(r,f);if(d){let g=cc(i,f),m=ro(p,g.tView.ssrId),b=ua(r,g,void 0,{dehydratedView:m});pa(p,b,0,Xi(g,m))}else wy(p,0)}}}finally{Oe(t)}}function Ns(e,t){return e[t]}function GI(e,t){return eo(e,t)}function ZI(e,t){return by(e,t)}function cc(e,t){return Iu(e,t)}function Y(e,t,n,r){let i=we(),o=gt(),s=at+e,a=i[bt],l=o.firstCreatePass?Cy(s,o,i,t,Qu,Ou(),n,r):o.data[s],u=YI(o,i,l,a,t,e);i[s]=u;let d=ea(l);return ur(l,!0),ty(a,u,l),!ly(l)&&ra()&&da(o,i,u,l),(Ww()===0||d)&&Cn(u,i),Gw(),d&&(ca(o,i,l),qu(o,l,i)),r!==null&&Ju(i,l),Y}function K(){let e=Zt();Ru()?tm():(e=e.parent,ur(e,!1));let t=e;Kw(t)&&Jw(),Zw();let n=gt();return n.firstCreatePass&&Ty(n,t),t.classesWithoutHost!=null&&d1(t)&&jd(n,t,we(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&f1(t)&&jd(n,t,we(),t.stylesWithoutHost,!1),K}function je(e,t,n,r){return Y(e,t,n,r),K(),je}var YI=(e,t,n,r,i,o)=>(ia(!0),Xm(r,i,l1()));function KI(e,t,n,r,i){let o=t.consts,s=sr(o,r),a=xo(t,e,8,"ng-container",s);s!==null&&rc(a,s,!0);let l=sr(o,i);return Ou()&&oh(t,n,a,l,Qu),a.mergedAttrs=ui(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function $y(e,t,n){let r=we(),i=gt(),o=e+at,s=i.firstCreatePass?KI(o,i,r,t,n):i.data[o];ur(s,!0);let a=JI(i,r,s,e);return r[o]=a,ra()&&da(i,r,a,s),Cn(a,r),ea(s)&&(ca(i,r,s),qu(i,s,r)),n!=null&&Ju(r,s),$y}function zy(){let e=Zt(),t=gt();return Ru()?tm():(e=e.parent,ur(e,!1)),t.firstCreatePass&&(Lu(t,e),Su(e)&&t.queries.elementEnd(e)),zy}function ch(e,t,n){return $y(e,t,n),zy(),ch}var JI=(e,t,n,r)=>(ia(!0),ax(t[bt],""));function Dn(){return we()}var ks="en-US",QI=ks;function XI(e){typeof e=="string"&&(QI=e.toLowerCase().replace(/_/g,"-"))}var eC=(e,t,n)=>{};function ut(e,t,n,r){let i=we(),o=gt(),s=Zt();return nC(o,i,i[bt],s,e,t,r),ut}function tC(e,t,n,r){let i=e.cleanup;if(i!=null)for(let o=0;o<i.length-1;o+=2){let s=i[o];if(s===n&&i[o+1]===r){let a=t[ys],l=i[o+2];return a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function nC(e,t,n,r,i,o,s){let a=ea(r),l=e.firstCreatePass?Xg(e):null,u=t[ct],d=Qg(t),f=!0;if(r.type&3||s){let p=Rn(r,t),g=s?s(p):p,m=d.length,b=s?A=>s(Wt(A[r.index])):r.index,I=null;if(!s&&a&&(I=tC(e,t,i,r.index)),I!==null){let A=I.__ngLastListenerFn__||I;A.__ngNextListenerFn__=o,I.__ngLastListenerFn__=o,f=!1}else{o=zd(r,t,u,o),eC(p,i,o);let A=n.listen(g,i,o);d.push(o,A),l&&l.push(i,b,m,m+1)}}else o=zd(r,t,u,o);if(f){let p=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];Hd(r,e,t,b,I,i,o,d,l)}if(p&&p.length)for(let m of p)Hd(r,e,t,m,i,i,o,d,l)}}function Hd(e,t,n,r,i,o,s,a,l){let u=n[r],d=t.data[r].outputs[i],f=u[d].subscribe(s),p=a.length;a.push(s,f),l&&l.push(o,e.index,p,-(p+1))}function $d(e,t,n,r){let i=Oe(null);try{return qe(6,t,n),n(r)!==!1}catch(o){return ay(e,o),!1}finally{qe(7,t,n),Oe(i)}}function zd(e,t,n,r){return function i(o){if(o===Function)return r;let s=yi(e)?rn(e.index,t):t;ih(s,5);let a=$d(t,n,r,o),l=i.__ngNextListenerFn__;for(;l;)a=$d(t,n,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function ae(e=1){return s1(e)}function Nn(e,t,n){return xi(e,"",t,"",n),Nn}function xi(e,t,n,r,i){let o=we(),s=Uy(o,t,n,r);if(s!==Wn){let a=gt(),l=Pu();sy(a,l,o,e,s,o[bt],i,!1)}return xi}function uc(e,t,n){KS(e,t,n)}function hc(e){let t=we(),n=gt(),r=im();Nu(r+1);let i=ah(n,r);if(e.dirty&&Uw(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let o=XS(t,r);e.reset(o,B1),e.notifyOnChanges()}return!0}return!1}function dc(){return ZS(we(),im())}function uh(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function wr(e){let t=nm();return ta(t,at+e)}function ht(e,t=""){let n=we(),r=gt(),i=e+at,o=r.firstCreatePass?xo(r,i,1,t,null):r.data[i],s=rC(r,n,o,t,e);n[i]=s,ra()&&da(r,n,s,o),ur(o,!1)}var rC=(e,t,n,r,i)=>(ia(!0),ox(t[bt],r));function wa(e){return On("",e,""),wa}function On(e,t,n){let r=we(),i=Uy(r,e,t,n);return i!==Wn&&iC(r,hr(),i),On}function iC(e,t,n){let r=Yg(t,e);sx(e[bt],r,n)}var qy={};function Io(e){let t=gt(),n=we(),r=e+at,i=xo(t,r,128,null,null);return ur(i,!1),uh(t,n,r,qy),Io}function Ui(e){Fr("NgLet");let t=gt(),n=we(),r=hr();return uh(t,n,r,e),e}function er(e){let t=nm(),n=ta(t,at+e);if(n===qy)throw new Le(314,!1);return n}function oC(e,t,n){let r=gt();if(r.firstCreatePass){let i=Tn(e);fc(n,r.data,r.blueprint,i,!0),fc(t,r.data,r.blueprint,i,!1)}}function fc(e,t,n,r,i){if(e=Pt(e),Array.isArray(e))for(let o=0;o<e.length;o++)fc(e[o],t,n,r,i);else{let o=gt(),s=we(),a=Zt(),l=li(e)?e:Pt(e.provide),u=jg(e),d=a.providerIndexes&1048575,f=a.directiveStart,p=a.providerIndexes>>20;if(li(e)||!e.multi){let g=new _o(u,i,Tt),m=al(l,t,i?d:d+p,f);m===-1?(Wl(Is(a,s),o,l),sl(o,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(g),s.push(g)):(n[m]=g,s[m]=g)}else{let g=al(l,t,d+p,f),m=al(l,t,d,d+p),b=g>=0&&n[g],I=m>=0&&n[m];if(i&&!I||!i&&!b){Wl(Is(a,s),o,l);let A=lC(i?aC:sC,n.length,i,r,u);!i&&I&&(n[m].providerFactory=A),sl(o,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),s.push(A)}else{let A=Wy(n[i?m:g],u,!i&&r);sl(o,e,g>-1?g:m,A)}!i&&r&&I&&n[m].componentProviders++}}}function sl(e,t,n,r){let i=li(t),o=Tw(t);if(i||o){let s=(o?Pt(t.useClass):t).prototype.ngOnDestroy;if(s){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,s]):a[l+1].push(r,s)}else a.push(n,s)}}}function Wy(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function al(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function sC(e,t,n,r){return pc(this.multi,[])}function aC(e,t,n,r){let i=this.multi,o;if(this.providerFactory){let s=this.providerFactory.componentProviders,a=Qi(n,n[ce],this.providerFactory.index,r);o=a.slice(0,s),pc(i,o);for(let l=s;l<a.length;l++)o.push(a[l])}else o=[],pc(i,o);return o}function pc(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function lC(e,t,n,r,i){let o=new _o(e,n,Tt);return o.multi=[],o.index=t,o.componentProviders=0,Wy(o,i,r&&!n),o}function cC(e,t=[]){return n=>{n.providersResolver=(r,i)=>oC(r,i?i(e):e,t)}}function uC(e,t,n,r){return Zy(we(),Du(),e,t,n,r)}function Gy(e,t){let n=e[t];return n===Wn?void 0:n}function Zy(e,t,n,r,i,o){let s=t+n;return Un(e,s,i)?Vy(e,s+1,o?r.call(o,i):r(i)):Gy(e,s+1)}function hC(e,t,n,r,i,o,s){let a=t+n;return fI(e,a,i,o)?Vy(e,a+2,s?r.call(s,i,o):r(i,o)):Gy(e,a+2)}function Gt(e,t){let n=gt(),r,i=e+at;n.firstCreatePass?(r=dC(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let o=r.factory||(r.factory=Cr(r.type,!0)),s,a=Ft(Tt);try{let l=Ss(!1),u=o();return Ss(l),uh(n,we(),i,u),u}finally{Ft(a)}}function dC(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function on(e,t,n){let r=e+at,i=we(),o=ta(i,r);return Yy(i,r)?Zy(i,Du(),t,o.transform,n,o):o.transform(n)}function fC(e,t,n,r){let i=e+at,o=we(),s=ta(o,i);return Yy(o,i)?hC(o,Du(),t,s.transform,n,r,s):s.transform(n,r)}function Yy(e,t){return e[ce].data[t].pure}function pC(e,t){return ga(e,t)}var gC=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(".")}},qd=new gC("19.2.0"),mC=(()=>{class e{zone=N(Ye);changeDetectionScheduler=N(vi);applicationRef=N(lr);_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=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function yC({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Ye(Qe(L({},vC()),{scheduleInRootZone:n})),[{provide:Ye,useFactory:e},{provide:ms,multi:!0,useFactory:()=>{let r=N(mC,{optional:!0});return()=>r.initialize()}},{provide:ms,multi:!0,useFactory:()=>{let r=N(_C);return()=>{r.initialize()}}},t===!0?{provide:Sm,useValue:!0}:[],{provide:Bu,useValue:n??xm}]}function vC(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var _C=(()=>{class e{subscription=new vt;initialized=!1;zone=N(Ye);pendingTasks=N(oa);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(()=>{Ye.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ye.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ky=(()=>{class e{appRef=N(lr);taskService=N(oa);ngZone=N(Ye);zonelessEnabled=N(Vu);tracing=N(bo,{optional:!0});disableScheduling=N(Sm,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new vt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ts):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(N(Bu,{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 Cm||!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?yd:Im;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(Ts+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,yd(()=>{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=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function bC(){return Fr("NgZoneless"),Ew([{provide:vi,useExisting:Ky},{provide:Ye,useClass:Cm},{provide:Vu,useValue:!0},{provide:Bu,useValue:!1},[]])}function wC(){return typeof $localize<"u"&&$localize.locale||ks}var Jy=new Ee("",{providedIn:"root",factory:()=>N(Jy,Re.Optional|Re.SkipSelf)||wC()}),gc=new Ee(""),EC=new Ee("");function Oi(e){return!e.moduleRef}function xC(e){let t=Oi(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Ye);return n.run(()=>{Oi(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(_i,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:o=>{r.handleError(o)}})}),Oi(e)){let o=()=>t.destroy(),s=e.platformInjector.get(gc);s.add(o),t.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>e.moduleRef.destroy(),s=e.platformInjector.get(gc);s.add(o),e.moduleRef.onDestroy(()=>{rs(e.allPlatformModules,e.moduleRef),i.unsubscribe(),s.delete(o)})}return IC(r,n,()=>{let o=t.get(Fy);return o.runInitializers(),o.donePromise.then(()=>{let s=t.get(Jy,ks);if(XI(s||ks),!t.get(EC,!0))return Oi(e)?t.get(lr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Oi(e)){let a=t.get(lr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return SC(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function SC(e,t){let n=e.injector.get(lr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new Le(-403,!1);t.push(e)}function IC(e,t,n){try{let r=n();return By(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var is=null;function CC(e=[],t){return Lt.create({name:t,providers:[{provide:Eu,useValue:"platform"},{provide:gc,useValue:new Set([()=>is=null])},...e]})}function TC(e=[]){if(is)return is;let t=CC(e);return is=t,xI(),OC(t),t}function OC(e){let t=e.get(Mm,null);Vg(e,()=>{t?.forEach(n=>n())})}var Co=(()=>{class e{static __NG_ELEMENT_ID__=RC}return e})();function RC(e){return DC(Zt(),we(),(e&16)===16)}function DC(e,t,n){if(yi(e)&&!n){let r=rn(e.index,t);return new to(r,r)}else if(e.type&175){let r=t[yn];return new to(r,t)}return null}function NC(e){qe(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=TC(r),o=[yC({}),{provide:vi,useExisting:Ky},...n||[]],s=new Ly({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1});return xC({r3Injector:s.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{qe(9)}}function kC(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function AC(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function PC(e){let t=Oe(null);try{return e()}finally{Oe(t)}}var HP=class{[tr];constructor(e){this[tr]=e}destroy(){this[tr].destroy()}};function Qy(e,t){let n=Or(e),r=t.elementInjector||Xs();return new sh(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var LC={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function MC(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function jC(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var ll;function VC(e,t){if(!ll){let n=Element.prototype;ll=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?ll.call(e,t):!1}function BC(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[MC(r)]=[n,i]}),t}function FC(e,t){return t.get(So).resolveComponentFactory(e).inputs}function UC(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let a=n[o],l=HC(a,t,i);l!==-1&&r[l].push(a)}return r}function HC(e,t,n){let r=n;return jC(e)&&t.some((i,o)=>i!=="*"&&VC(e,i)?(r=o,!0):!1),r}var $C=10,zC=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(So).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new qC(this.componentFactory,e,this.inputMap)}},qC=class{componentFactory;injector;inputMap;eventEmitters=new lb(1);events=this.eventEmitters.pipe(vg(e=>Js(...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(Ye),this.appRef=this.injector.get(lr),this.cdScheduler=t.get(vi),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=LC.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},$C))})}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=Lt.create({providers:[],parent:this.injector}),n=UC(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 _t(o=>{let s=i.subscribe(a=>o.next({name:r,value:a}));return()=>s.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},WC=class extends HTMLElement{ngElementEventsSubscription=null};function GC(e,t){let n=FC(e,t.injector),r=t.strategyFactory||new zC(e,t.injector),i=BC(n);class o extends WC{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:u})=>{if(!this.hasOwnProperty(l))return;let d=this[l];delete this[l],a.setInputValue(l,d,u)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,u,d){let[f,p]=i[a];this.ngElementStrategy.setInputValue(f,u,p)}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:s,transform:a})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(l){this.ngElementStrategy.setInputValue(s,l,a)},configurable:!0,enumerable:!0})}),o}var Xy=null;function Hi(){return Xy}function ZC(e){Xy??=e}var YC=class{},nt=new Ee(""),ev=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:()=>N(KC),providedIn:"platform"})}return e})(),KC=(()=>{class e extends ev{_location;_history;_doc=N(nt);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Hi().getBaseHref(this._doc)}onPopState(n){let r=Hi().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Hi().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=ue({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function tv(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function Wd(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function Er(e){return e&&e[0]!=="?"?`?${e}`:e}var hh=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:()=>N(QC),providedIn:"root"})}return e})(),JC=new Ee(""),QC=(()=>{class e extends hh{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??N(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 tv(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+Er(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,o){let s=this.prepareExternalUrl(i+Er(o));this._platformLocation.pushState(n,r,s)}replaceState(n,r,i,o){let s=this.prepareExternalUrl(i+Er(o));this._platformLocation.replaceState(n,r,s)}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)(Be(ev),Be(JC,8))};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),nv=(()=>{class e{_subject=new de;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=tT(Wd(Gd(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+Er(r))}normalize(n){return e.stripTrailingSlash(eT(this._basePath,Gd(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+Er(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Er(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=Er;static joinWithSlash=tv;static stripTrailingSlash=Wd;static \u0275fac=function(n){return new(n||e)(Be(hh))};static \u0275prov=ue({token:e,factory:()=>XC(),providedIn:"root"})}return e})();function XC(){return new nv(Be(hh))}function eT(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function Gd(e){return e.replace(/\/index.html$/,"")}function tT(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function nT(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,o]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(o)}return null}var cl=/\s+/,Zd=[],rT=(()=>{class e{_ngEl;_renderer;initialClasses=Zd;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(cl):Zd}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(cl):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(cl).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)(Tt($t),Tt(Sy))};static \u0275dir=ma({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),iT=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(n,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(n){return new(n||e)(Tt(wi))};static \u0275dir=ma({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[zg]})}return e})(),rv="browser",oT="server";function sT(e){return e===rv}function iv(e){return e===oT}var aT=class{},lT=class extends YC{supportsDOMEvents=!0},cT=class ov extends lT{static makeCurrent(){ZC(new ov)}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=uT();return n==null?null:hT(n)}resetBaseElement(){Mi=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return nT(document.cookie,t)}},Mi=null;function uT(){return Mi=Mi||document.querySelector("base"),Mi?Mi.getAttribute("href"):null}function hT(e){return new URL(e,document.baseURI).pathname}var dT=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac})}return e})(),mc=new Ee(""),sv=(()=>{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,o){return this._findPluginFor(r).addEventListener(n,r,i,o)}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 Le(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(Be(mc),Be(Ye))};static \u0275prov=ue({token:e,factory:e.\u0275fac})}return e})(),av=class{_doc;constructor(e){this._doc=e}manager},os="ng-app-id";function Yd(e){for(let t of e)t.remove()}function Kd(e,t){let n=t.createElement("style");return n.textContent=e,n}function fT(e,t,n,r){let i=e.head?.querySelectorAll(`style[${os}="${t}"],link[${os}="${t}"]`);if(i)for(let o of i)o.removeAttribute(os),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&n.set(o.textContent,{usage:0,elements:[o]})}function yc(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var lv=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,o={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=iv(o),fT(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,Kd);r?.forEach(i=>this.addUsage(i,this.external,yc))}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 o=r.get(n);o?o.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(Yd(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Yd(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,Kd(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,yc(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(os,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(Be(nt),Be($u),Be(jm,8),Be(sa))};static \u0275prov=ue({token:e,factory:e.\u0275fac})}return e})(),ul={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"},dh=/%COMP%/g,cv="%COMP%",pT=`_nghost-${cv}`,gT=`_ngcontent-${cv}`,mT=!0,yT=new Ee("",{providedIn:"root",factory:()=>mT});function vT(e){return gT.replace(dh,e)}function _T(e){return pT.replace(dh,e)}function uv(e,t){return t.map(n=>n.replace(dh,e))}var Jd=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,o,s,a,l,u=null,d=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=u,this.tracingService=d,this.platformIsServer=iv(a),this.defaultRenderer=new fh(n,s,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Pn.ShadowDom&&(r=Qe(L({},r),{encapsulation:Pn.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Xd?i.applyToHost(n):i instanceof vc&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,f=this.platformIsServer,p=this.tracingService;switch(r.encapsulation){case Pn.Emulated:o=new Xd(l,u,r,this.appId,d,s,a,f,p);break;case Pn.ShadowDom:return new bT(l,u,n,r,s,a,this.nonce,f,p);default:o=new vc(l,u,r,d,s,a,f,p);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(Be(sv),Be(lv),Be($u),Be(yT),Be(nt),Be(sa),Be(Ye),Be(jm),Be(bo,8))};static \u0275prov=ue({token:e,factory:e.\u0275fac})}return e})(),fh=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(ul[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Qd(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(Qd(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 Le(-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=ul[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=ul[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&(br.DashCase|br.Important)?e.style.setProperty(t,n,r&br.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&br.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=Hi().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 Qd(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var bT=class extends fh{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,o,s,a,l){super(e,i,o,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=r.styles;u=uv(r.id,u);for(let f of u){let p=document.createElement("style");s&&p.setAttribute("nonce",s),p.textContent=f,this.shadowRoot.appendChild(p)}let d=r.getExternalStyles?.();if(d)for(let f of d){let p=yc(f,i);s&&p.setAttribute("nonce",s),this.shadowRoot.appendChild(p)}}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)}},vc=class extends fh{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,o,s,a,l){super(e,i,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let u=n.styles;this.styles=l?uv(l,u):u,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Xd=class extends vc{contentAttr;hostAttr;constructor(e,t,n,r,i,o,s,a,l){let u=r+"-"+n.id;super(e,t,n,i,o,s,a,l,u),this.contentAttr=vT(u),this.hostAttr=_T(u)}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}},wT=(()=>{class e extends av{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,o){return n.addEventListener(r,i,o),()=>this.removeEventListener(n,r,i,o)}removeEventListener(n,r,i,o){return n.removeEventListener(r,i,o)}static \u0275fac=function(n){return new(n||e)(Be(nt))};static \u0275prov=ue({token:e,factory:e.\u0275fac})}return e})(),ef=["alt","control","meta","shift"],ET={"\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"},xT={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},ST=(()=>{class e extends av{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,o){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Hi().onAndCancel(n,s.domEventName,a,o))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),ef.forEach(u=>{let d=r.indexOf(u);d>-1&&(r.splice(d,1),s+=u+".")}),s+=o,r.length!=0||o.length===0)return null;let l={};return l.domEventName=i,l.fullKey=s,l}static matchEventFullKeyCode(n,r){let i=ET[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(i=n.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),ef.forEach(s=>{if(s!==i){let a=xT[s];a(n)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(n,r,i){return o=>{e.matchEventFullKeyCode(o,n)&&i.runGuarded(()=>r(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(Be(nt))};static \u0275prov=ue({token:e,factory:e.\u0275fac})}return e})();function IT(e){return NC(CT(e))}function CT(e){return{appProviders:[...NT,...e?.providers??[]],platformProviders:DT}}function TT(){cT.makeCurrent()}function OT(){return new _i}function RT(){return X1(document),document}var DT=[{provide:sa,useValue:rv},{provide:Mm,useValue:TT,multi:!0},{provide:nt,useFactory:RT,deps:[]}],NT=[{provide:Eu,useValue:"root"},{provide:_i,useFactory:OT,deps:[]},{provide:mc,useClass:wT,multi:!0,deps:[nt]},{provide:mc,useClass:ST,multi:!0,deps:[nt]},Jd,lv,sv,{provide:wn,useExisting:Jd},{provide:aT,useClass:dT,deps:[]},[]],hv=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=Be(kT),r},providedIn:"root"})}return e})(),kT=(()=>{class e extends hv{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case An.NONE:return r;case An.HTML:return vr(r,"HTML")?Xn(r):Km(this._doc,String(r)).toString();case An.STYLE:return vr(r,"Style")?Xn(r):r;case An.SCRIPT:if(vr(r,"Script"))return Xn(r);throw new Le(5200,!1);case An.URL:return vr(r,"URL")?Xn(r):Wu(String(r));case An.RESOURCE_URL:if(vr(r,"ResourceURL"))return Xn(r);throw new Le(5201,!1);default:throw new Le(5202,!1)}}bypassSecurityTrustHtml(n){return _E(n)}bypassSecurityTrustStyle(n){return bE(n)}bypassSecurityTrustScript(n){return wE(n)}bypassSecurityTrustUrl(n){return EE(n)}bypassSecurityTrustResourceUrl(n){return xE(n)}static \u0275fac=function(n){return new(n||e)(Be(nt))};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),AT="9.9.1",wt=class _c{static SDK_VERSION=AT;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_EXPERIMENT_START="CE Experiment Start";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 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=_c.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");_c.SDK_VERSION_CODE=parseInt(t,10)}},so={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${wt.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${wt.SDK_VERSION}/dist/widget.min.js`},Xt=an(I0()),Ct=class{static log(...e){Xt.default.info(...e)}static debug(...e){Xt.default.debug(...e)}static error(...e){Xt.default.error(...e)}static warn(...e){Xt.default.warn(...e)}static info(...e){Xt.default.info(...e)}static trace(...e){Xt.default.trace(...e)}static configure(e=wt.LOG_PREFIX){Xt.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${wt.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Xt.default.setLevel(Xt.default[localStorage.cooeeLogLevel]):Xt.default.setLevel(so.debug?Xt.default.TRACE:Xt.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,64 +19,32 @@ ${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()}},ND={providers:[iD()]},Ff=Re(qn()),vt=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}},qd=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}},gn=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}},Me=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;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 gn(e)}},RI=Re(Ta()),Gy=Re(c0());function xa(e){return Gy.default.createInstance({name:"lc",storeName:e,driver:Gy.default.LOCALSTORAGE})}var vo=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}},rt=class extends vo{static storeName="usr";static{this.storage=xa(this.storeName)}},ge=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"},yn=class extends vo{static storeName="ses";static{this.storage=xa(this.storeName)}},l0=Object.prototype.toString;function fs(e){switch(l0.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ti(e,Error)}}function Ra(e,t){return l0.call(e)===`[object ${t}]`}function Kd(e){return Ra(e,"ErrorEvent")}function Zd(e){return Ra(e,"DOMError")}function zy(e){return Ra(e,"DOMException")}function Ln(e){return Ra(e,"String")}function Na(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ps(e){return e===null||Na(e)||typeof e!="object"&&typeof e!="function"}function Hr(e){return Ra(e,"Object")}function hs(e){return typeof Event<"u"&&ti(e,Event)}function qy(e){return typeof Element<"u"&&ti(e,Element)}function Yy(e){return Ra(e,"RegExp")}function Wi(e){return!!(e&&e.then&&typeof e.then=="function")}function Ky(e){return Hr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ti(e,t){try{return e instanceof t}catch{return!1}}function cl(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ni(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Xd(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 u0(e,t,n=!1){return Ln(e)?Yy(t)?t.test(e):Ln(t)?n?e===t:e.includes(t):!1:!1}function Aa(e,t=[],n=!1){return t.some(r=>u0(e,r,n))}function Xy(e,t,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!ti(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=mL(Zy(e,t,i,o.originalException,r,s.exception.values,a,0),n))}function Zy(e,t,n,r,i,s,o,a){if(s.length>=n+1)return s;let l=[...s];if(ti(r[i],Error)){d0(o,a);let c=e(t,r[i]),h=l.length;f0(c,i,h,a),l=Zy(e,t,n,r[i],i,[c,...l],c,h)}return Array.isArray(r.errors)&&r.errors.forEach((c,h)=>{if(ti(c,Error)){d0(o,a);let d=e(t,c),f=l.length;f0(d,`errors[${h}]`,f,a),l=Zy(e,t,n,c,i,[d,...l],d,f)}}),l}function d0(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=te(w(w({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function f0(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=te(w({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function mL(e,t){return e.map(n=>(n.value&&(n.value=ni(n.value,t)),n))}var _r="8.18.0",Ee=globalThis;function Oa(e,t,n){let r=n||Ee,i=r.__SENTRY__=r.__SENTRY__||{},s=i[_r]=i[_r]||{};return s[e]||(s[e]=t())}var Jy=Ee,gL=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||gL;for(;n&&s++<r&&(c=yL(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 yL(e,t){let n=e,r=[];if(!n||!n.tagName)return"";if(Jy.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&&Ln(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 Qy(){try{return Jy.document.location.href}catch{return""}}function ev(e){if(!Jy.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 ri=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,vL="Sentry Logger ",ul=["debug","info","warn","error","log","assert","trace"],Ma={};function Pa(e){if(!("console"in Ee))return e();let t=Ee.console,n={},r=Object.keys(Ma);r.forEach(i=>{let s=Ma[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function _L(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ri?ul.forEach(n=>{t[n]=(...r)=>{e&&Pa(()=>{Ee.console[n](`${vL}[${n}]:`,...r)})}}):ul.forEach(n=>{t[n]=()=>{}}),t}var oe=_L(),EL=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function wL(e){return e==="http"||e==="https"}function ii(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 p0(e){let t=EL.exec(e);if(!t){Pa(()=>{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 h0({host:s,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function h0(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function bL(e){if(!ri)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(oe.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?wL(r)?t&&isNaN(parseInt(t,10))?(oe.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(oe.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(oe.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Jd(e){let t=typeof e=="string"?p0(e):h0(e);if(!(!t||!bL(t)))return t}var An=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 Pt(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i=="function"&&Qd(i,r),e[t]=i}function Fn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ri&&oe.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Qd(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Fn(e,"__sentry_original__",t)}catch{}}function ms(e){return e.__sentry_original__}function nv(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function ef(e){if(fs(e))return w({message:e.message,name:e.name,stack:e.stack},g0(e));if(hs(e)){let t=w({type:e.type,target:m0(e.target),currentTarget:m0(e.currentTarget)},g0(e));return typeof CustomEvent<"u"&&ti(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function m0(e){try{return qy(e)?ll(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function g0(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 rv(e,t=40){let n=Object.keys(ef(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return ni(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:ni(s,t)}return""}function cn(e){return tv(e,new Map)}function tv(e,t){if(CL(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]=tv(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(tv(i,t))}),r}return e}function CL(e){if(!Hr(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var oi="?",y0=/\(error: (.*)\)/,v0=/captureMessage|captureException/;function ov(...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<
|
|
22
|
+
Cooee SDK: v${wt.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()}},PT={providers:[bC()]},hl=an(ho()),dv=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}},LT=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("."),o=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),s=i[1]?r+i[1]:"";return o+s}},MT=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}},jT=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;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 MT(e)}},VT=an(C0()),tf=an(T0());function fv(e){return tf.default.createInstance({name:"lc",storeName:e,driver:tf.default.LOCALSTORAGE})}var pv=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}},bc=class extends pv{static storeName="usr";static{this.storage=fv(this.storeName)}},As=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"},BT=class extends pv{static storeName="ses";static{this.storage=fv(this.storeName)}},gv=Object.prototype.toString;function ph(e){switch(gv.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Pr(e,Error)}}function Si(e,t){return gv.call(e)===`[object ${t}]`}function mv(e){return Si(e,"ErrorEvent")}function nf(e){return Si(e,"DOMError")}function FT(e){return Si(e,"DOMException")}function Mn(e){return Si(e,"String")}function gh(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function mh(e){return e===null||gh(e)||typeof e!="object"&&typeof e!="function"}function di(e){return Si(e,"Object")}function Ea(e){return typeof Event<"u"&&Pr(e,Event)}function UT(e){return typeof Element<"u"&&Pr(e,Element)}function HT(e){return Si(e,"RegExp")}function xa(e){return!!(e&&e.then&&typeof e.then=="function")}function $T(e){return di(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Pr(e,t){try{return e instanceof t}catch{return!1}}function yv(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 rf(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];try{yv(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function zT(e,t,n=!1){return Mn(e)?HT(t)?t.test(e):Mn(t)?n?e===t:e.includes(t):!1:!1}function Sa(e,t=[],n=!1){return t.some(r=>zT(e,r,n))}function qT(e,t,n=250,r,i,o,s){if(!o.exception||!o.exception.values||!s||!Pr(s.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=WT(wc(e,t,i,s.originalException,r,o.exception.values,a,0),n))}function wc(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let l=[...o];if(Pr(r[i],Error)){of(s,a);let u=e(t,r[i]),d=l.length;sf(u,i,d,a),l=wc(e,t,n,r[i],i,[u,...l],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(Pr(u,Error)){of(s,a);let f=e(t,u),p=l.length;sf(f,`errors[${d}]`,p,a),l=wc(e,t,n,u,i,[f,...l],f,p)}}),l}function of(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=Qe(L(L({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function sf(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=Qe(L({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function WT(e,t){return e.map(n=>(n.value&&(n.value=si(n.value,t)),n))}var xr="8.18.0",$e=globalThis;function yh(e,t,n){let r=n||$e,i=r.__SENTRY__=r.__SENTRY__||{},o=i[xr]=i[xr]||{};return o[e]||(o[e]=t())}var vh=$e,GT=80;function vv(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,i=[],o=0,s=0,a=" > ",l=a.length,u,d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||GT;for(;n&&o++<r&&(u=ZT(n,d),!(u==="html"||o>1&&s+i.length*l+u.length>=f));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function ZT(e,t){let n=e,r=[];if(!n||!n.tagName)return"";if(vh.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(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Mn(s)){let a=s.split(/\s+/);for(let l of a)r.push(`.${l}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function YT(){try{return vh.document.location.href}catch{return""}}function KT(e){if(!vh.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 To=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,JT="Sentry Logger ",Ec=["debug","info","warn","error","log","assert","trace"],Ps={};function _h(e){if(!("console"in $e))return e();let t=$e.console,n={},r=Object.keys(Ps);r.forEach(i=>{let o=Ps[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function QT(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return To?Ec.forEach(n=>{t[n]=(...r)=>{e&&_h(()=>{$e.console[n](`${JT}[${n}]:`,...r)})}}):Ec.forEach(n=>{t[n]=()=>{}}),t}var _e=QT(),XT=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function eO(e){return e==="http"||e==="https"}function Ia(e,t=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function tO(e){let t=XT.exec(e);if(!t){_h(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",o="",s="",a=""]=t.slice(1),l="",u=a,d=u.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),u=d.pop()),u){let f=u.match(/^\d+/);f&&(u=f[0])}return _v({host:o,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}function _v(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function nO(e){if(!To)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(_e.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?eO(r)?t&&isNaN(parseInt(t,10))?(_e.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(_e.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_e.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function rO(e){let t=typeof e=="string"?tO(e):_v(e);if(!(!t||!nO(t)))return t}var xn=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 Ot(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i=="function"&&bv(i,r),e[t]=i}function Lr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{To&&_e.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function bv(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Lr(e,"__sentry_original__",t)}catch{}}function bh(e){return e.__sentry_original__}function iO(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function wv(e){if(ph(e))return L({message:e.message,name:e.name,stack:e.stack},lf(e));if(Ea(e)){let t=L({type:e.type,target:af(e.target),currentTarget:af(e.currentTarget)},lf(e));return typeof CustomEvent<"u"&&Pr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function af(e){try{return UT(e)?vv(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function lf(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 oO(e,t=40){let n=Object.keys(wv(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 o=n.slice(0,i).join(", ");if(!(o.length>t))return i===n.length?o:si(o,t)}return""}function un(e){return xc(e,new Map)}function xc(e,t){if(sO(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]=xc(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(xc(i,t))}),r}return e}function sO(e){if(!di(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var Mr="?",cf=/\(error: (.*)\)/,uf=/captureMessage|captureException/;function aO(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
|
|
23
|
+
`);for(let a=r;a<s.length;a++){let l=s[a];if(l.length>1024)continue;let u=cf.test(l)?l.replace(cf,"$1"):l;if(!u.match(/\S*Error: /)){for(let d of t){let f=d(u);if(f){o.push(f);break}}if(o.length>=50+i)break}}return lO(o.slice(i))}}function lO(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Fo(t).function||"")&&t.pop(),t.reverse(),uf.test(Fo(t).function||"")&&(t.pop(),uf.test(Fo(t).function||"")&&t.pop()),t.slice(0,50).map(n=>Qe(L({},n),{filename:n.filename||Fo(t).filename,function:n.function||Mr}))}function Fo(e){return e[e.length-1]||{}}var dl="<anonymous>";function cr(e){try{return!e||typeof e!="function"?dl:e.name||dl}catch{return dl}}function hf(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 ss={},df={};function $r(e,t){ss[e]=ss[e]||[],ss[e].push(t)}function zr(e,t){df[e]||(t(),df[e]=!0)}function pn(e,t){let n=e&&ss[e];if(n)for(let r of n)try{r(t)}catch(i){To&&_e.error(`Error while triggering instrumentation handler.
|
|
24
24
|
Type: ${e}
|
|
25
|
-
Name: ${
|
|
26
|
-
Error:`,i)}}function
|
|
27
|
-
${JSON.stringify(
|
|
28
|
-
`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify($r(a))}i(l)}}return typeof r=="string"?r:kL(r)}function kL(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 wv(e){let t=typeof e.data=="string"?vv(e.data):e.data;return[cn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var LL={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 df(e){return LL[e]}function ff(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function bv(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:ii(r)}),i&&{trace:cn(w({},i))})}function Cv(e,t,n){let r=[{type:"client_report"},{timestamp:n||si(),discarded_events:e}];return ai(t?{dsn:t}:{},[r])}function A0(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 O0(e,t){return e[t]||e.all||0}function Sv(e,t,n=Date.now()){return O0(e,t)>n}function Dv(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+A0(o,r):t===429&&(i.all=r+60*1e3);return i}function pf(){return{traceId:vn(),spanId:vn().substring(16)}}var hf=Ee;function Iv(){let e=hf.chrome,t=e&&e.app&&e.app.runtime,n="history"in hf&&!!hf.history.pushState&&!!hf.history.replaceState;return!t&&n}var ft=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function gs(){return hl(Ee),Ee}function hl(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||_r,t[_r]=t[_r]||{}}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||or(),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:vn()),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 Tv="_sentrySpan";function xv(e,t){t?Fn(e,Tv,t):delete e[Tv]}function Rv(e){return e[Tv]}var VL=100,Nv=class cI{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=pf()}clone(){let t=new cI;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,xv(t,Rv(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=te(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=te(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 On?[n.getScopeData(),n.getRequestSession()]:Hr(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,xv(this,void 0),this._attachments=[],this._propagationContext=pf(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:VL;if(r<=0)return this;let i=w({timestamp:si()},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:Rv(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:vn();if(!this._client)return oe.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(t,te(w({originalException:t,syntheticException:i},n),{event_id:r}),this),r}captureMessage(t,n,r){let i=r&&r.event_id?r.event_id:vn();if(!this._client)return oe.warn("No client configured on scope - will not capture message!"),i;let s=new Error(t);return this._client.captureMessage(t,n,te(w({originalException:t,syntheticException:s},r),{event_id:i}),this),i}captureEvent(t,n){let r=n&&n.event_id?n.event_id:vn();return this._client?(this._client.captureEvent(t,te(w({},n),{event_id:r}),this),r):(oe.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)}},On=Nv;function M0(){return Oa("defaultCurrentScope",()=>new On)}function P0(){return Oa("defaultIsolationScope",()=>new On)}var Av=class{constructor(e,t){let n;e?n=e:n=new On;let r;t?r=t:r=new On,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 Wi(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 La(){let e=gs(),t=hl(e);return t.stack=t.stack||new Av(M0(),P0())}function UL(e){return La().withScope(e)}function HL(e,t){let n=La();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function k0(e){return La().withScope(()=>e(La().getIsolationScope()))}function L0(){return{withIsolationScope:k0,withScope:UL,withSetScope:HL,withSetIsolationScope:(e,t)=>k0(t),getCurrentScope:()=>La().getScope(),getIsolationScope:()=>La().getIsolationScope()}}function mf(e){let t=hl(e);return t.acs?t.acs:L0()}function ys(){let e=gs();return mf(e).getCurrentScope()}function vs(){let e=gs();return mf(e).getIsolationScope()}function gf(){return Oa("globalScope",()=>new On)}function yf(...e){let t=gs(),n=mf(t);if(e.length===2){let[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Ft(){return ys().getClient()}var jL="_sentryMetrics";function F0(e){let t=e[jL];if(!t)return;let n={};for(let[,[r,i]]of t)(n[r]||(n[r]=[])).push(cn(i));return n}var Ov="sentry.source",Mv="sentry.sample_rate",Pv="sentry.op",kv="sentry.origin",$L=1;function U0(e){let{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=_s(e);return cn({parent_span_id:r,span_id:t,trace_id:n})}function B0(e){return typeof e=="number"?V0(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?V0(e.getTime()):or()}function V0(e){return e>9999999999?e/1e3:e}function _s(e){if(GL(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(WL(e)){let{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:a,status:l}=e;return cn({span_id:t,trace_id:n,data:r,description:s,parent_span_id:a,start_timestamp:B0(i),timestamp:B0(o)||void 0,status:zL(l),op:r[Pv],origin:r[kv],_metrics_summary:F0(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function WL(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function GL(e){return typeof e.getSpanJSON=="function"}function H0(e){let{traceFlags:t}=e.spanContext();return t===$L}function zL(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var qL="_sentryRootSpan";function gl(e){return e[qL]||e}var vf="production",YL="_frozenDsc";function Lv(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=cn({environment:n.environment||vf,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function j0(e){let t=Ft();if(!t)return{};let n=Lv(_s(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&&yv(o);if(a)return a;let l=_s(r),c=l.data||{},h=c[Mv];h!=null&&(n.sample_rate=`${h}`);let d=c[Ov],f=l.description;return d!=="url"&&f&&(n.transaction=f),n.sampled=String(H0(r)),t.emit("createDsc",n,r),n}function $0(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){ft&&oe.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 KL(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 W0(e,t,n,r){let i=ff(n),s=w(w({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:ii(t)}),o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ai(s,[o])}function G0(e,t,n,r){let i=ff(n),s=e.type&&e.type!=="replay_event"?e.type:"event";KL(e,n&&n.sdk);let o=bv(e,i,r,t);return delete e.sdkProcessingMetadata,ai(o,[[{type:s},e]])}function _f(e,t,n,r=0){return new Wr((i,s)=>{let o=e[r];if(t===null||typeof o!="function")i(t);else{let a=o(w({},t),n);ft&&o.id&&a===null&&oe.log(`Event processor "${o.id}" dropped event`),Wi(a)?a.then(l=>_f(e,l,n,r+1).then(i)).then(null,s):_f(e,a,n,r+1).then(i).then(null,s)}})}function z0(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;ZL(e,t),r&&QL(e,r),eF(e,n),XL(e,i),JL(e,s)}function Fv(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;yl(e,"extra",n),yl(e,"tags",r),yl(e,"user",i),yl(e,"contexts",s),yl(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 yl(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 ZL(e,t){let{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=t,l=cn(n);l&&Object.keys(l).length&&(e.extra=w(w({},l),e.extra));let c=cn(r);c&&Object.keys(c).length&&(e.tags=w(w({},c),e.tags));let h=cn(i);h&&Object.keys(h).length&&(e.user=w(w({},h),e.user));let d=cn(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 XL(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function JL(e,t){e.sdkProcessingMetadata=w(w({},e.sdkProcessingMetadata),t)}function QL(e,t){e.contexts=w({trace:U0(t)},e.contexts),e.sdkProcessingMetadata=w({dynamicSamplingContext:j0(t)},e.sdkProcessingMetadata);let n=gl(t),r=_s(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function eF(e,t){e.fingerprint=e.fingerprint?cf(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Y0(e,t,n,r,i,s){let{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l=te(w({},t),{event_id:t.event_id||n.event_id||vn(),timestamp:t.timestamp||si()}),c=n.integrations||e.integrations.map(b=>b.name);tF(l,e),iF(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&nF(l,e.stackParser);let h=sF(r,n.captureContext);n.mechanism&&Gi(l,n.mechanism);let d=i?i.getEventProcessors():[],f=gf().getScopeData();if(s){let b=s.getScopeData();Fv(f,b)}if(h){let b=h.getScopeData();Fv(f,b)}let g=[...n.attachments||[],...f.attachments];g.length&&(n.attachments=g),z0(l,f);let m=[...d,...f.eventProcessors];return _f(m,l,n).then(b=>(b&&rF(b),typeof o=="number"&&o>0?oF(b,o,a):b))}function tF(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=ni(e.message,s));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=ni(o.value,s));let a=e.request;a&&a.url&&(a.url=ni(a.url,s))}var q0=new WeakMap;function nF(e,t){let n=Ee._sentryDebugIds;if(!n)return;let r,i=q0.get(t);i?r=i:(r=new Map,q0.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 rF(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 iF(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function oF(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:$r(i.data,t,n)}))}),e.user&&{user:$r(e.user,t,n)}),e.contexts&&{contexts:$r(e.contexts,t,n)}),e.extra&&{extra:$r(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=$r(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>w(w({},i),i.data&&{data:$r(i.data,t,n)}))),r}function sF(e,t){if(!t)return e;let n=e?e.clone():new On;return n.update(t),n}function K0(e){if(e)return aF(e)?{captureContext:e}:lF(e)?{captureContext:e}:e}function aF(e){return e instanceof On||typeof e=="function"}var cF=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function lF(e){return Object.keys(e).some(t=>cF.includes(t))}function Ef(e,t){return ys().captureException(e,K0(t))}function vl(e,t){return ys().captureEvent(e,t)}var uF="7";function dF(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function fF(e){return`${dF(e)}${e.projectId}/envelope/`}function pF(e,t){return nv(w({sentry_key:e.publicKey,sentry_version:uF},t&&{sentry_client:`${t.name}/${t.version}`}))}function X0(e,t,n){return t||`${fF(e)}?${pF(e,n)}`}var J0=[];function Q0(e,t){let n={};return t.forEach(r=>{r&&Vv(e,r,n)}),n}function Bv(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Vv(e,t,n){if(n[t.name]){ft&&oe.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,J0.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),J0.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)}ft&&oe.log(`Integration installed: ${t.name}`)}var eI="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=Jd(e.dsn):ft&&oe.warn("No DSN provided, client will not send events."),this._dsn){let t=X0(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(te(w({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){let r=vn();if(af(e))return ft&&oe.log(eI),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:vn()},n),s=Na(e)?e:String(e),o=ps(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=vn();if(t&&t.originalException&&af(t.originalException))return ft&&oe.log(eI),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"?ft&&oe.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))):wr(!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];Vv(this,e,this._integrations),t||Bv(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=G0(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])n=_v(n,wv(i));let r=this.sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=W0(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;ft&&oe.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=>(ft&&oe.error("Error while sending event:",t),t)):(ft&&oe.error("Transport disabled"),wr({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Q0(this,e),Bv(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,te(w({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e))}_isClientDoneProcessing(e){return new Wr(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=vs()){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),Y0(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:cn({trace_id:l,span_id:c,parent_span_id:h})},o.contexts);let f=d||Lv(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(ft){let i=r;i.logLevel==="log"?oe.log(i.message):oe.warn(i)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,s=Uv(e),o=tI(e),a=e.type||"error",l=`before send for type \`${a}\``,c=typeof i>"u"?void 0:$0(i);if(o&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),_o(new An(`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 An("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return f;let g=mF(this,r,f,t);return hF(g,l)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",h,e),Uv(e)){let b=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+b}throw new An(`${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=te(w({},m),{source:b})}return this.sendEvent(f,t),f}).then(null,f=>{throw f instanceof An?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new An(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
29
|
-
Reason: ${
|
|
30
|
-
Event: ${
|
|
31
|
-
Event: ${
|
|
32
|
-
Event: ${
|
|
33
|
-
Event: ${
|
|
34
|
-
Event: ${
|
|
35
|
-
Url: ${
|
|
36
|
-
Event: ${
|
|
37
|
-
Url: ${Cf(e)}`),!0)}function DF(e,t){return e.type||!t||!t.length?!1:RF(e).some(n=>Aa(n,t))}function IF(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?Aa(n,t):!1}function TF(e,t){if(!t||!t.length)return!1;let n=Cf(e);return n?Aa(n,t):!1}function xF(e,t){if(!t||!t.length)return!0;let n=Cf(e);return n?Aa(n,t):!0}function RF(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 NF(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function AF(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 Cf(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?AF(t):null}catch{return ft&&oe.error(`Cannot extract url for event ${jr(e)}`),null}}function OF(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 MF="Dedupe",PF=()=>{let e;return{name:MF,processEvent(t){if(t.type)return t;try{if(kF(t,e))return ft&&oe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Df=PF;function kF(e,t){return t?!!(LF(e,t)||FF(e,t)):!1}function LF(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!aI(e,t)||!sI(e,t))}function FF(e,t){let n=oI(t),r=oI(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!aI(e,t)||!sI(e,t))}function sI(e,t){let n=nf(e),r=nf(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 aI(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 oI(e){return e.exception&&e.exception.values&&e.exception.values[0]}var Wt=Ee,jv=0;function $v(){return jv>0}function ZF(){jv++,setTimeout(()=>{jv--})}function Es(e,t={},n){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(ms(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=>Es(o,t));return e.apply(this,s)}catch(s){throw ZF(),yf(o=>{o.addEventProcessor(a=>(t.mechanism&&(ka(a,void 0,void 0),Gi(a,t.mechanism)),a.extra=te(w({},a.extra),{arguments:i}),a)),Ef(s)}),s}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}Qd(r,e),Fn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var qi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function If(e,t){let n=zv(e,t),r={type:t&&t.name,value:tB(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function XF(e,t,n,r){let i=Ft(),s=i&&i.getOptions().normalizeDepth,o=iB(t),a={__serialized__:lf(t,s)};if(o)return{exception:{values:[If(e,o)]},extra:a};let l={exception:{values:[{type:hs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:nB(t,{isUnhandledRejection:r})}]},extra:a};if(n){let c=zv(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function Wv(e,t){return{exception:{values:[If(e,t)]}}}function zv(e,t){let n=t.stacktrace||t.stack||"",r=QF(t),i=eB(t);try{return e(n,r,i)}catch{}return[]}var JF=/Minified React error #\d+;/i;function QF(e){return e&&JF.test(e.message)?1:0}function eB(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function tB(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function dI(e,t,n,r){let i=n&&n.syntheticException||void 0,s=Tf(e,t,i,r);return Gi(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),wr(s)}function fI(e,t,n="info",r,i){let s=r&&r.syntheticException||void 0,o=Gv(e,t,s,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),wr(o)}function Tf(e,t,n,r,i){let s;if(Kd(t)&&t.error)return Wv(e,t.error);if(Zd(t)||zy(t)){let o=t;if("stack"in t)s=Wv(e,t);else{let a=o.name||(Zd(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Gv(e,l,n,r),ka(s,l)}return"code"in o&&(s.tags=te(w({},s.tags),{"DOMException.code":`${o.code}`})),s}return fs(t)?Wv(e,t):Hr(t)||hs(t)?(s=XF(e,t,n,i),Gi(s,{synthetic:!0}),s):(s=Gv(e,t,n,r),ka(s,`${t}`,void 0),Gi(s,{synthetic:!0}),s)}function Gv(e,t,n,r){let i={};if(r&&n){let s=zv(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(Na(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 nB(e,{isUnhandledRejection:t}){let n=rv(e),r=t?"promise rejection":"exception";return Kd(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:hs(e)?`Event \`${rB(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function rB(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function iB(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function pI(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:ii(r)}),s=oB(e);return ai(i,[s])}function oB(e){return[{type:"user_report"},e]}var El=class extends _l{constructor(e){let t=w({parentSpanIsAlwaysRootSpan:!0},e),n=Wt.SENTRY_SDK_SOURCE||pv();Hv(t,"browser",["browser"],n),super(t),t.sendClientReports&&Wt.document&&Wt.document.addEventListener("visibilitychange",()=>{Wt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return dI(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return fI(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){qi&&oe.warn("SDK not enabled, will not capture user feedback.");return}let t=pI(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){qi&&oe.log("No outcomes to send");return}if(!this._dsn){qi&&oe.log("No dsn provided, will not send outcomes");return}qi&&oe.log("Sending outcomes:",e);let t=Cv(e,this._options.tunnel&&ii(this._dsn));this.sendEnvelope(t)}},hI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,nn=Ee,sB=1e3,mI,qv,Yv;function Kv(e){let t="dom";Bn(t,e),Vn(t,aB)}function aB(){if(!nn.document)return;let e=ln.bind(null,"dom"),t=gI(e,!0);nn.document.addEventListener("click",t,!1),nn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=nn[n]&&nn[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Pt(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=gI(e);h.handler=d,i.call(this,s,d,a)}h.refCount++}catch{}return i.call(this,s,o,a)}}),Pt(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 cB(e){if(e.type!==qv)return!1;try{if(!e.target||e.target._sentryId!==Yv)return!1}catch{}return!0}function lB(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function gI(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=uB(n);if(lB(n.type,r))return;Fn(n,"_sentryCaptured",!0),r&&!r._sentryId&&Fn(r,"_sentryId",vn());let i=n.type==="keypress"?"input":n.type;cB(n)||(e({event:n,name:i,global:t}),qv=n.type,Yv=r?r._sentryId:void 0),clearTimeout(mI),mI=nn.setTimeout(()=>{Yv=void 0,qv=void 0},sB)}}function uB(e){try{return e.target}catch{return null}}var xf;function Zv(e){let t="history";Bn(t,e),Vn(t,dB)}function dB(){if(!Iv())return;let e=nn.onpopstate;nn.onpopstate=function(...n){let r=nn.location.href,i=xf;if(xf=r,ln("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=xf,o=String(i);xf=o,ln("history",{from:s,to:o})}return n.apply(this,r)}}Pt(nn.history,"pushState",t),Pt(nn.history,"replaceState",t)}var Rf={};function Xv(e){let t=Rf[e];if(t)return t;let n=nn[e];if(dl(n))return Rf[e]=n.bind(nn);let r=nn.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){hI&&oe.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Rf[e]=n.bind(nn))}function Nf(e){Rf[e]=void 0}var ws="__sentry_xhr_v3__";function Jv(e){let t="xhr";Bn(t,e),Vn(t,fB)}function fB(){if(!nn.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Pt(e,"open",function(t){return function(...n){let r=or()*1e3,i=Ln(n[0])?n[0].toUpperCase():void 0,s=pB(n[1]);if(!i||!s)return t.apply(this,n);this[ws]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[ws];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:or()*1e3,startTimestamp:r,xhr:this};ln("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Pt(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),Pt(this,"setRequestHeader",function(a){return function(...l){let[c,h]=l,d=this[ws];return d&&Ln(c)&&Ln(h)&&(d.request_headers[c.toLowerCase()]=h),a.apply(this,l)}}),t.apply(this,n)}}),Pt(e,"send",function(t){return function(...n){let r=this[ws];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:or()*1e3,xhr:this};return ln("xhr",i),t.apply(this,n)}})}function pB(e){if(Ln(e))return e;try{return e.toString()}catch{}}function Qv(e,t=Xv("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 Nf("fetch"),_o("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 Nf("fetch"),n-=o,r--,_o(l)}}return wf(e,i)}var hB=30,mB=50;function e_(e,t,n,r){let i={filename:e,function:t==="<anonymous>"?oi:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var gB=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,yB=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vB=/\((\S*)(?::(\d+))(?::(\d+))\)/,_B=e=>{let t=gB.exec(e);if(t){let[,r,i,s]=t;return e_(r,oi,+i,+s)}let n=yB.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=vB.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[r,i]=EI(n[1]||oi,n[2]);return e_(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},yI=[hB,_B],EB=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,wB=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,bB=e=>{let t=EB.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=wB.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]||oi;return[r,n]=EI(r,n),e_(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},vI=[mB,bB],_I=[yI,vI],t_=ov(..._I),EI=(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]:oi,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Af=1024,SB="Breadcrumbs",DB=(e={})=>{let t=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:SB,setup(n){t.console&&sv(xB(n)),t.dom&&Kv(TB(n,t.dom)),t.xhr&&Jv(RB(n)),t.fetch&&uv(NB(n)),t.history&&Zv(AB(n)),t.sentry&&n.on("beforeSendEvent",IB(n))}}},wI=DB;function IB(e){return function(t){Ft()===e&&ci({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:jr(t)},{event:t})}}function TB(e,t){return function(n){if(Ft()!==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>Af&&(qi&&oe.warn(`\`dom.maxStringLength\` cannot exceed ${Af}, but a value of ${o} was configured. Sentry will use ${Af} instead.`),o=Af),typeof s=="string"&&(s=[s]);try{let l=n.event,c=OB(l)?l.target:l;r=ll(c,{keyAttrs:s,maxStringLength:o}),i=ev(c)}catch{r="<unknown>"}if(r.length===0)return;let a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),ci(a,{event:n.event,name:n.name,global:n.global})}}function xB(e){return function(t){if(Ft()!==e)return;let n={category:"console",data:{arguments:t.args,logger:"console"},level:gv(t.level),message:Xd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${Xd(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1);else return;ci(n,{input:t.args,level:t.level})}}function RB(e){return function(t){if(Ft()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[ws];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};ci({category:"xhr",data:c,type:"http"},h)}}function NB(e){return function(t){if(Ft()!==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};ci({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=t.response,s=te(w({},t.fetchData),{status_code:i&&i.status}),o={input:t.args,response:i,startTimestamp:n,endTimestamp:r};ci({category:"fetch",data:s,type:"http"},o)}}}function AB(e){return function(t){if(Ft()!==e)return;let n=t.from,r=t.to,i=pl(Wt.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),ci({category:"navigation",data:{from:n,to:r}})}}function OB(e){return!!e&&!!e.target}var MB=["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"],PB="BrowserApiErrors",kB=(e={})=>{let t=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:PB,setupOnce(){t.setTimeout&&Pt(Wt,"setTimeout",bI),t.setInterval&&Pt(Wt,"setInterval",bI),t.requestAnimationFrame&&Pt(Wt,"requestAnimationFrame",LB),t.XMLHttpRequest&&"XMLHttpRequest"in Wt&&Pt(XMLHttpRequest.prototype,"send",FB);let n=t.eventTarget;n&&(Array.isArray(n)?n:MB).forEach(BB)}}},CI=kB;function bI(e){return function(...t){let n=t[0];return t[0]=Es(n,{mechanism:{data:{function:Er(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function LB(e){return function(t){return e.apply(this,[Es(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Er(e)},handled:!1,type:"instrument"}})])}}function FB(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Pt(n,r,function(i){let s={mechanism:{data:{function:r,handler:Er(i)},handled:!1,type:"instrument"}},o=ms(i);return o&&(s.mechanism.data.handler=Er(o)),Es(i,s)})}),e.apply(this,t)}}function BB(e){let t=Wt,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Pt(n,"addEventListener",function(r){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=Es(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Er(s),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,Es(s,{mechanism:{data:{function:"addEventListener",handler:Er(s),target:e},handled:!1,type:"instrument"}}),o])}}),Pt(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 VB="GlobalHandlers",UB=(e={})=>{let t=w({onerror:!0,onunhandledrejection:!0},e);return{name:VB,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(HB(n),SI("onerror")),t.onunhandledrejection&&(jB(n),SI("onunhandledrejection"))}}},DI=UB;function HB(e){dv(t=>{let{stackParser:n,attachStacktrace:r}=II();if(Ft()!==e||$v())return;let{msg:i,url:s,line:o,column:a,error:l}=t,c=GB(Tf(n,l||i,void 0,r,!1),s,o,a);c.level="error",vl(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function jB(e){fv(t=>{let{stackParser:n,attachStacktrace:r}=II();if(Ft()!==e||$v())return;let i=$B(t),s=ps(i)?WB(i):Tf(n,i,void 0,r,!0);s.level="error",vl(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function $B(e){if(ps(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 WB(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function GB(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=Ln(t)&&t.length>0?t:Qy();return l.length===0&&l.push({colno:c,filename:d,function:oi,in_app:!0,lineno:h}),e}function SI(e){qi&&oe.log(`Global Handler attached: ${e}`)}function II(){let e=Ft();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var TI=()=>({name:"HttpContext",preprocessEvent(e){if(!Wt.navigator&&!Wt.location&&!Wt.document)return;let t=e.request&&e.request.url||Wt.location&&Wt.location.href,{referrer:n}=Wt.document||{},{userAgent:r}=Wt.navigator||{},i=w(w(w({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=te(w(w({},e.request),t&&{url:t}),{headers:i});e.request=s}}),zB="cause",qB=5,YB="LinkedErrors",KB=(e={})=>{let t=e.limit||qB,n=e.key||zB;return{name:YB,preprocessEvent(r,i,s){let o=s.getOptions();Xy(If,o.stackParser,o.maxValueLength,n,t,r,i)}}},xI=KB;function n_(e){return[Sf(),bf(),CI(),wI(),DI(),xI(),Df(),TI()]}var r_=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},_t=class uI{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new uI),this.INSTANCE}captureException(t,n,r){C.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){C.error(t,n);let s=this.getNewScope(r,i),o=new r_(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 On;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",ce.getTimezone()),r}init(){let t=n_({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new El({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Qv,stackParser:t_,integrations:t,environment:mn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:mn.debug}),this.client.init()}},ce=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=Me.get(),r=vt.get(),i=n.shopCurrencyCode||r.currency,s=n.currencyCode;s||C.warn("Currency code is not set in RuntimeData");let o=r.money?.format??n.moneyFormat,a;if(o&&i===s)a=qd.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 _t.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 RI.JSUtils.sleep(s),i=n.querySelectorAll(e),i.length)return C.debug(`Attempt ${r+1}: ${i.length} elements found with ${e}`),i;C.debug(`Attempt ${r+1}: Elements not found with ${e}. Retrying after ${s}ms.`),r++}return C.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 retrySelectors(e,t=10,n=document){let r=await this.retrySelectorForElements(e,t,n);return Array.from(r)}static async getCartAttributes(){let e=await rt.get(ge.DEVICE_ID),t=await yn.get(ge.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 Fa(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:n})}var li=class tp{transform(t){return t==null?null:ce.formatCurrency(t)}static \u0275fac=function(t){return new(t||tp)};static \u0275pipe=os({name:"cooeeCurrency",type:tp,pure:!0})},OI=Re(Pf()),ZB=Object.prototype.toString,Va=Array.isArray||function(e){return ZB.call(e)==="[object Array]"};function o_(e){return typeof e=="function"}function XB(e){return Va(e)?"array":typeof e}function i_(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function NI(e,t){return e!=null&&typeof e=="object"&&t in e}function JB(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var QB=RegExp.prototype.test;function e2(e,t){return QB.call(e,t)}var t2=/\S/;function n2(e){return!e2(t2,e)}var r2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function i2(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return r2[t]})}var o2=/\s*/,s2=/\s+/,AI=/\s*=/,a2=/\s*\}/,c2=/#|\^|\/|>|\{|&|=|!/;function l2(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(s2,2)),!Va(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(i_(j[0])+"\\s*"),f=new RegExp("\\s*"+i_(j[1])),g=new RegExp("\\s*"+i_("}"+j[1]))}m(t||br.tags);for(var b=new bl(e),x,P,F,V,L,q;!b.eos();){if(x=b.pos,F=b.scanUntil(d),F)for(var Oe=0,ct=F.length;Oe<ct;++Oe)V=F.charAt(Oe),n2(V)?(s.push(i.length),l+=V):(a=!0,n=!0,l+=" "),i.push(["text",V,x,x+1]),x+=1,V===`
|
|
38
|
-
`&&(
|
|
39
|
-
`),
|
|
40
|
-
`)};
|
|
41
|
-
`);try{D=new Worker(URL.createObjectURL(new Blob([se])))}catch(we){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",we),null}ee(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,T){return T?T(D):D}function b(D){return D!=null}function x(D,T,Z){return m(D&&b(D[T])?D[T]:g[T],Z)}function P(D){return D<0?0:Math.floor(D)}function F(D,T){return Math.floor(Math.random()*(T-D))+D}function V(D){return parseInt(D,16)}function L(D){return D.map(q)}function q(D){var T=String(D).replace(/[^0-9a-f]/gi,"");return T.length<6&&(T=T[0]+T[0]+T[1]+T[1]+T[2]+T[2]),{r:V(T.substring(0,2)),g:V(T.substring(2,4)),b:V(T.substring(4,6))}}function Oe(D){var T=x(D,"origin",Object);return T.x=x(T,"x",Number),T.y=x(T,"y",Number),T}function ct(D){D.width=document.documentElement.clientWidth,D.height=document.documentElement.clientHeight}function j(D){var T=D.getBoundingClientRect();D.width=T.width,D.height=T.height}function de(D){var T=document.createElement("canvas");return T.style.position="fixed",T.style.top="0px",T.style.left="0px",T.style.pointerEvents="none",T.style.zIndex=D,T}function Q(D,T,Z,ee,se,we,ve,ue,Ce){D.save(),D.translate(T,Z),D.rotate(we),D.scale(ee,se),D.arc(0,0,1,ve,ue,Ce),D.restore()}function he(D){var T=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:-T+(.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 Pe(D,T){T.x+=Math.cos(T.angle2D)*T.velocity+T.drift,T.y+=Math.sin(T.angle2D)*T.velocity+T.gravity,T.velocity*=T.decay,T.flat?(T.wobble=0,T.wobbleX=T.x+10*T.scalar,T.wobbleY=T.y+10*T.scalar,T.tiltSin=0,T.tiltCos=0,T.random=1):(T.wobble+=T.wobbleSpeed,T.wobbleX=T.x+10*T.scalar*Math.cos(T.wobble),T.wobbleY=T.y+10*T.scalar*Math.sin(T.wobble),T.tiltAngle+=.1,T.tiltSin=Math.sin(T.tiltAngle),T.tiltCos=Math.cos(T.tiltAngle),T.random=Math.random()+2);var Z=T.tick++/T.totalTicks,ee=T.x+T.random*T.tiltCos,se=T.y+T.random*T.tiltSin,we=T.wobbleX+T.random*T.tiltCos,ve=T.wobbleY+T.random*T.tiltSin;if(D.fillStyle="rgba("+T.color.r+", "+T.color.g+", "+T.color.b+", "+(1-Z)+")",D.beginPath(),o&&T.shape.type==="path"&&typeof T.shape.path=="string"&&Array.isArray(T.shape.matrix))D.fill(Xe(T.shape.path,T.shape.matrix,T.x,T.y,Math.abs(we-ee)*.1,Math.abs(ve-se)*.1,Math.PI/10*T.wobble));else if(T.shape.type==="bitmap"){var ue=Math.PI/10*T.wobble,Ce=Math.abs(we-ee)*.1,Ue=Math.abs(ve-se)*.1,Ot=T.shape.bitmap.width*T.scalar,He=T.shape.bitmap.height*T.scalar,Ye=new DOMMatrix([Math.cos(ue)*Ce,Math.sin(ue)*Ce,-Math.sin(ue)*Ue,Math.cos(ue)*Ue,T.x,T.y]);Ye.multiplySelf(new DOMMatrix(T.shape.matrix));var Lt=D.createPattern(h.transform(T.shape.bitmap),"no-repeat");Lt.setTransform(Ye),D.globalAlpha=1-Z,D.fillStyle=Lt,D.fillRect(T.x-Ot/2,T.y-He/2,Ot,He),D.globalAlpha=1}else if(T.shape==="circle")D.ellipse?D.ellipse(T.x,T.y,Math.abs(we-ee)*T.ovalScalar,Math.abs(ve-se)*T.ovalScalar,Math.PI/10*T.wobble,0,2*Math.PI):Q(D,T.x,T.y,Math.abs(we-ee)*T.ovalScalar,Math.abs(ve-se)*T.ovalScalar,Math.PI/10*T.wobble,0,2*Math.PI);else if(T.shape==="star")for(var ke=Math.PI/2*3,u=4*T.scalar,p=8*T.scalar,y=T.x,I=T.y,A=5,B=Math.PI/A;A--;)y=T.x+Math.cos(ke)*p,I=T.y+Math.sin(ke)*p,D.lineTo(y,I),ke+=B,y=T.x+Math.cos(ke)*u,I=T.y+Math.sin(ke)*u,D.lineTo(y,I),ke+=B;else D.moveTo(Math.floor(T.x),Math.floor(T.y)),D.lineTo(Math.floor(T.wobbleX),Math.floor(se)),D.lineTo(Math.floor(we),Math.floor(ve)),D.lineTo(Math.floor(ee),Math.floor(T.wobbleY));return D.closePath(),D.fill(),T.tick<T.totalTicks}function ut(D,T,Z,ee,se){var we=T.slice(),ve=D.getContext("2d"),ue,Ce,Ue=c(function(Ot){function He(){ue=Ce=null,ve.clearRect(0,0,ee.width,ee.height),h.clear(),se(),Ot()}function Ye(){r&&!(ee.width===i.width&&ee.height===i.height)&&(ee.width=D.width=i.width,ee.height=D.height=i.height),!ee.width&&!ee.height&&(Z(D),ee.width=D.width,ee.height=D.height),ve.clearRect(0,0,ee.width,ee.height),we=we.filter(function(Lt){return Pe(ve,Lt)}),we.length?ue=d.frame(Ye):He()}ue=d.frame(Ye),Ce=He});return{addFettis:function(Ot){return we=we.concat(Ot),Ue},canvas:D,promise:Ue,reset:function(){ue&&d.cancel(ue),Ce&&Ce()}}}function lt(D,T){var Z=!D,ee=!!x(T||{},"resize"),se=!1,we=x(T,"disableForReducedMotion",Boolean),ve=s&&!!x(T||{},"useWorker"),ue=ve?f():null,Ce=Z?ct:j,Ue=D&&ue?!!D.__confetti_initialized:!1,Ot=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,He;function Ye(ke,u,p){for(var y=x(ke,"particleCount",P),I=x(ke,"angle",Number),A=x(ke,"spread",Number),B=x(ke,"startVelocity",Number),K=x(ke,"decay",Number),et=x(ke,"gravity",Number),ze=x(ke,"drift",Number),Ae=x(ke,"colors",L),dt=x(ke,"ticks",Number),Y=x(ke,"shapes"),De=x(ke,"scalar"),fe=!!x(ke,"flat"),tt=Oe(ke),Cn=y,bn=[],at=D.width*tt.x,ye=D.height*tt.y;Cn--;)bn.push(he({x:at,y:ye,angle:I,spread:A,startVelocity:B,color:Ae[Cn%Ae.length],shape:Y[F(0,Y.length)],ticks:dt,decay:K,gravity:et,drift:ze,scalar:De,flat:fe}));return He?He.addFettis(bn):(He=ut(D,bn,Ce,u,p),He.promise)}function Lt(ke){var u=we||x(ke,"disableForReducedMotion",Boolean),p=x(ke,"zIndex",Number);if(u&&Ot)return c(function(B){B()});Z&&He?D=He.canvas:Z&&!D&&(D=de(p),document.body.appendChild(D)),ee&&!Ue&&Ce(D);var y={width:D.width,height:D.height};ue&&!Ue&&ue.init(D),Ue=!0,ue&&(D.__confetti_initialized=!0);function I(){if(ue){var B={getBoundingClientRect:function(){if(!Z)return D.getBoundingClientRect()}};Ce(B),ue.postMessage({resize:{width:B.width,height:B.height}});return}y.width=y.height=null}function A(){He=null,ee&&(se=!1,t.removeEventListener("resize",I)),Z&&D&&(document.body.contains(D)&&document.body.removeChild(D),D=null,Ue=!1)}return ee&&!se&&(se=!0,t.addEventListener("resize",I,!1)),ue?ue.fire(ke,y,A):Ye(ke,y,A)}return Lt.reset=function(){ue&&ue.reset(),He&&He.reset()},Lt}var v;function Ht(){return v||(v=lt(null,{useWorker:!0,resize:!0})),v}function Xe(D,T,Z,ee,se,we,ve){var ue=new Path2D(D),Ce=new Path2D;Ce.addPath(ue,new DOMMatrix(T));var Ue=new Path2D;return Ue.addPath(Ce,new DOMMatrix([Math.cos(ve)*se,Math.sin(ve)*se,-Math.sin(ve)*we,Math.cos(ve)*we,Z,ee])),Ue}function Yt(D){if(!o)throw new Error("path confetti are not supported in this browser");var T,Z;typeof D=="string"?T=D:(T=D.path,Z=D.matrix);var ee=new Path2D(T),se=document.createElement("canvas"),we=se.getContext("2d");if(!Z){for(var ve=1e3,ue=ve,Ce=ve,Ue=0,Ot=0,He,Ye,Lt=0;Lt<ve;Lt+=2)for(var ke=0;ke<ve;ke+=2)we.isPointInPath(ee,Lt,ke,"nonzero")&&(ue=Math.min(ue,Lt),Ce=Math.min(Ce,ke),Ue=Math.max(Ue,Lt),Ot=Math.max(Ot,ke));He=Ue-ue,Ye=Ot-Ce;var u=10,p=Math.min(u/He,u/Ye);Z=[p,0,0,p,-Math.round(He/2+ue)*p,-Math.round(Ye/2+Ce)*p]}return{type:"path",path:T,matrix:Z}}function Se(D){var T,Z=1,ee="#000000",se='"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"?T=D:(T=D.text,Z="scalar"in D?D.scalar:Z,se="fontFamily"in D?D.fontFamily:se,ee="color"in D?D.color:ee);var we=10*Z,ve=""+we+"px "+se,ue=new OffscreenCanvas(we,we),Ce=ue.getContext("2d");Ce.font=ve;var Ue=Ce.measureText(T),Ot=Math.ceil(Ue.actualBoundingBoxRight+Ue.actualBoundingBoxLeft),He=Math.ceil(Ue.actualBoundingBoxAscent+Ue.actualBoundingBoxDescent),Ye=2,Lt=Ue.actualBoundingBoxLeft+Ye,ke=Ue.actualBoundingBoxAscent+Ye;Ot+=Ye+Ye,He+=Ye+Ye,ue=new OffscreenCanvas(Ot,He),Ce=ue.getContext("2d"),Ce.font=ve,Ce.fillStyle=ee,Ce.fillText(T,Lt,ke);var u=1/Z;return{type:"bitmap",bitmap:ue.transferToImageBitmap(),matrix:[u,0,0,u,-Ot*u/2,-He*u/2]}}n.exports=function(){return Ht().apply(this,arguments)},n.exports.reset=function(){Ht().reset()},n.exports.create=lt,n.exports.shapeFromPath=Yt,n.exports.shapeFromText=Se})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),s_,!1);var MI=s_.exports,TK=s_.exports.create,Lf=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 MI(e)}static async realisticFire(e,t){let n={origin:{y:.7}};await this.fire(Object.assign({},n,t,{particleCount:Math.floor(200*e)}))}},ui=class Vp{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||Vp)(Mt($y,16))};static \u0275pipe=os({name:"safeHtml",type:Vp,pure:!0})},f2=(e,t)=>t.minValue;function p2(e,t){if(e&1&&(re(0,"li",6)(1,"div",7),Ne(2,"div",8),Sn(3,"cooeeCurrency"),Sn(4,"safeHtml"),Ne(5,"img",9),re(6,"div",10),tn(7),ie()()()),e&2){let n=t.$implicit,r=me(2);mo("left",n.calculatedAlignment+"%"),X(2),Be("innerHTML",Nn(4,7,Nn(3,5,n.minValue)),Fr),X(3),Be("src",r.getIconURL(n),an),X(2),Ca(n.label)}}function h2(e,t){if(e&1&&($i(0)(1),Ne(2,"div",0),Sn(3,"cooeeDynamicVariables"),Sn(4,"safeHtml"),re(5,"div",1)(6,"ul",2)(7,"div",3),Ne(8,"div",4),ie(),Qt(9,p2,8,9,"li",5,f2),ie()()),e&2){let n=me(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;X(2),Be("innerHTML",Nn(4,6,eD(3,3,i,n.localDynamicVariables())),Fr),X(6),mo("width",r.cartValuePercentage+"%"),X(),en(r.milestones)}}var Bf=class Of{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=Vi({});calculatedState=Vi({});_engagementTrigger=Vi(null);progressBarConfig;set engagementTrigger(t){this._engagementTrigger.set(t),this.progressBarConfig=t.progressBarConfig}ngOnInit(){C.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){C.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===Ff.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===Ff.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===Ff.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>C.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){C.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);C.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:ce.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"),this.progressBarConfig?.noConfetti||Lf.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||Of)(Mt(Ct))};static \u0275cmp=yt({type:Of,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&&xt(0,h2,11,8),t&2&&$t(n.calculatedState().milestonesReady?0:-1)},dependencies:[kf,ui,li],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}"]})},$s=Re(UI()),wR=Re(qn()),$f=class{id;alt;sources;items;durationMS;thumbnail;constructor(e={}){this.id=e.id,this.alt=e.alt,this.sources=e.sources,this.durationMS=e.durationMS,this.thumbnail=e.thumbnail,this.items=e.items?e.items.map(t=>new gn(t)):[]}},a_=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))(a_||{}),c_=(e=>(e.SWIPER="SWIPER",e.SIMPLE="SIMPLE",e.STORY="STORY",e.FLOATING_POPUP="FLOATING_POPUP",e))(c_||{}),Wf=class{videos;source;template;heading;constructor(e={}){this.videos=e.videos?.map(t=>new $f(t))??[],this.source=e.source,this.template=e.template,this.heading=e.heading}};function g2(e,t){return t={exports:{}},e(t,t.exports),t.exports}var y2=w2,v2=C2,_2=I2,pi=[],Sr=[],E2=typeof Uint8Array<"u"?Uint8Array:Array,l_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(bs=0,HI=l_.length;bs<HI;++bs)pi[bs]=l_[bs],Sr[l_.charCodeAt(bs)]=bs;var bs,HI;Sr[45]=62;Sr[95]=63;function rT(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 w2(e){var t=rT(e),n=t[0],r=t[1];return(n+r)*3/4-r}function b2(e,t,n){return(t+n)*3/4-n}function C2(e){var t,n=rT(e),r=n[0],i=n[1],s=new E2(b2(e,r,i)),o=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)t=Sr[e.charCodeAt(l)]<<18|Sr[e.charCodeAt(l+1)]<<12|Sr[e.charCodeAt(l+2)]<<6|Sr[e.charCodeAt(l+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=Sr[e.charCodeAt(l)]<<2|Sr[e.charCodeAt(l+1)]>>4,s[o++]=t&255),i===1&&(t=Sr[e.charCodeAt(l)]<<10|Sr[e.charCodeAt(l+1)]<<4|Sr[e.charCodeAt(l+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function S2(e){return pi[e>>18&63]+pi[e>>12&63]+pi[e>>6&63]+pi[e&63]}function D2(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(S2(r));return i.join("")}function I2(e){for(var t,n=e.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(D2(e,o,o+s>a?a:o+s));return r===1?(t=e[n-1],i.push(pi[t>>2]+pi[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(pi[t>>10]+pi[t>>4&63]+pi[t<<2&63]+"=")),i.join("")}var u_={byteLength:y2,toByteArray:v2,fromByteArray:_2},T2=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)},x2=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},Ua={read:T2,write:x2},qf=g2(function(e,t){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=P,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,y){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,y)}o.poolSize=8192;function a(u,p,y){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(Ye(u,ArrayBuffer)||u&&Ye(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ye(u,SharedArrayBuffer)||u&&Ye(u.buffer,SharedArrayBuffer)))return m(u,p,y);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var I=u.valueOf&&u.valueOf();if(I!=null&&I!==u)return o.from(I,p,y);var A=b(u);if(A)return A;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return o.from(u[Symbol.toPrimitive]("string"),p,y);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,y){return a(u,p,y)},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,y){return l(u),u<=0?s(u):p!==void 0?typeof y=="string"?s(u).fill(p,y):s(u).fill(p):s(u)}o.alloc=function(u,p,y){return c(u,p,y)};function h(u){return l(u),s(u<0?0:x(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 y=F(u,p)|0,I=s(y),A=I.write(u,p);return A!==y&&(I=I.slice(0,A)),I}function f(u){for(var p=u.length<0?0:x(u.length)|0,y=s(p),I=0;I<p;I+=1)y[I]=u[I]&255;return y}function g(u){if(Ye(u,Uint8Array)){var p=new Uint8Array(u);return m(p.buffer,p.byteOffset,p.byteLength)}return f(u)}function m(u,p,y){if(p<0||u.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<p+(y||0))throw new RangeError('"length" is outside of buffer bounds');var I;return p===void 0&&y===void 0?I=new Uint8Array(u):y===void 0?I=new Uint8Array(u,p):I=new Uint8Array(u,p,y),Object.setPrototypeOf(I,o.prototype),I}function b(u){if(o.isBuffer(u)){var p=x(u.length)|0,y=s(p);return y.length===0||u.copy(y,0,0,p),y}if(u.length!==void 0)return typeof u.length!="number"||Lt(u.length)?s(0):f(u);if(u.type==="Buffer"&&Array.isArray(u.data))return f(u.data)}function x(u){if(u>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return u|0}function P(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(Ye(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),Ye(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 y=u.length,I=p.length,A=0,B=Math.min(y,I);A<B;++A)if(u[A]!==p[A]){y=u[A],I=p[A];break}return y<I?-1:I<y?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 y;if(p===void 0)for(p=0,y=0;y<u.length;++y)p+=u[y].length;var I=o.allocUnsafe(p),A=0;for(y=0;y<u.length;++y){var B=u[y];if(Ye(B,Uint8Array))A+B.length>I.length?o.from(B).copy(I,A):Uint8Array.prototype.set.call(I,B,A);else if(o.isBuffer(B))B.copy(I,A);else throw new TypeError('"list" argument must be an Array of Buffers');A+=B.length}return I};function F(u,p){if(o.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||Ye(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 y=u.length,I=arguments.length>2&&arguments[2]===!0;if(!I&&y===0)return 0;for(var A=!1;;)switch(p){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return ue(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return Ot(u).length;default:if(A)return I?-1:ue(u).length;p=(""+p).toLowerCase(),A=!0}}o.byteLength=F;function V(u,p,y){var I=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,p>>>=0,y<=p))return"";for(u||(u="utf8");;)switch(u){case"hex":return Yt(this,p,y);case"utf8":case"utf-8":return ut(this,p,y);case"ascii":return Ht(this,p,y);case"latin1":case"binary":return Xe(this,p,y);case"base64":return Pe(this,p,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,p,y);default:if(I)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),I=!0}}o.prototype._isBuffer=!0;function L(u,p,y){var I=u[p];u[p]=u[y],u[y]=I}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)L(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)L(this,p,p+3),L(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)L(this,p,p+7),L(this,p+1,p+6),L(this,p+2,p+5),L(this,p+3,p+4);return this},o.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?ut(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,y,I,A){if(Ye(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),y===void 0&&(y=u?u.length:0),I===void 0&&(I=0),A===void 0&&(A=this.length),p<0||y>u.length||I<0||A>this.length)throw new RangeError("out of range index");if(I>=A&&p>=y)return 0;if(I>=A)return-1;if(p>=y)return 1;if(p>>>=0,y>>>=0,I>>>=0,A>>>=0,this===u)return 0;for(var B=A-I,K=y-p,et=Math.min(B,K),ze=this.slice(I,A),Ae=u.slice(p,y),dt=0;dt<et;++dt)if(ze[dt]!==Ae[dt]){B=ze[dt],K=Ae[dt];break}return B<K?-1:K<B?1:0};function q(u,p,y,I,A){if(u.length===0)return-1;if(typeof y=="string"?(I=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,Lt(y)&&(y=A?0:u.length-1),y<0&&(y=u.length+y),y>=u.length){if(A)return-1;y=u.length-1}else if(y<0)if(A)y=0;else return-1;if(typeof p=="string"&&(p=o.from(p,I)),o.isBuffer(p))return p.length===0?-1:Oe(u,p,y,I,A);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?A?Uint8Array.prototype.indexOf.call(u,p,y):Uint8Array.prototype.lastIndexOf.call(u,p,y):Oe(u,[p],y,I,A);throw new TypeError("val must be string, number or Buffer")}function Oe(u,p,y,I,A){var B=1,K=u.length,et=p.length;if(I!==void 0&&(I=String(I).toLowerCase(),I==="ucs2"||I==="ucs-2"||I==="utf16le"||I==="utf-16le")){if(u.length<2||p.length<2)return-1;B=2,K/=2,et/=2,y/=2}function ze(fe,tt){return B===1?fe[tt]:fe.readUInt16BE(tt*B)}var Ae;if(A){var dt=-1;for(Ae=y;Ae<K;Ae++)if(ze(u,Ae)===ze(p,dt===-1?0:Ae-dt)){if(dt===-1&&(dt=Ae),Ae-dt+1===et)return dt*B}else dt!==-1&&(Ae-=Ae-dt),dt=-1}else for(y+et>K&&(y=K-et),Ae=y;Ae>=0;Ae--){for(var Y=!0,De=0;De<et;De++)if(ze(u,Ae+De)!==ze(p,De)){Y=!1;break}if(Y)return Ae}return-1}o.prototype.includes=function(u,p,y){return this.indexOf(u,p,y)!==-1},o.prototype.indexOf=function(u,p,y){return q(this,u,p,y,!0)},o.prototype.lastIndexOf=function(u,p,y){return q(this,u,p,y,!1)};function ct(u,p,y,I){y=Number(y)||0;var A=u.length-y;I?(I=Number(I),I>A&&(I=A)):I=A;var B=p.length;I>B/2&&(I=B/2);for(var K=0;K<I;++K){var et=parseInt(p.substr(K*2,2),16);if(Lt(et))return K;u[y+K]=et}return K}function j(u,p,y,I){return He(ue(p,u.length-y),u,y,I)}function de(u,p,y,I){return He(Ce(p),u,y,I)}function Q(u,p,y,I){return He(Ot(p),u,y,I)}function he(u,p,y,I){return He(Ue(p,u.length-y),u,y,I)}o.prototype.write=function(u,p,y,I){if(p===void 0)I="utf8",y=this.length,p=0;else if(y===void 0&&typeof p=="string")I=p,y=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(y)?(y=y>>>0,I===void 0&&(I="utf8")):(I=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var A=this.length-p;if((y===void 0||y>A)&&(y=A),u.length>0&&(y<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");I||(I="utf8");for(var B=!1;;)switch(I){case"hex":return ct(this,u,p,y);case"utf8":case"utf-8":return j(this,u,p,y);case"ascii":case"latin1":case"binary":return de(this,u,p,y);case"base64":return Q(this,u,p,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he(this,u,p,y);default:if(B)throw new TypeError("Unknown encoding: "+I);I=(""+I).toLowerCase(),B=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Pe(u,p,y){return p===0&&y===u.length?u_.fromByteArray(u):u_.fromByteArray(u.slice(p,y))}function ut(u,p,y){y=Math.min(u.length,y);for(var I=[],A=p;A<y;){var B=u[A],K=null,et=B>239?4:B>223?3:B>191?2:1;if(A+et<=y){var ze,Ae,dt,Y;switch(et){case 1:B<128&&(K=B);break;case 2:ze=u[A+1],(ze&192)===128&&(Y=(B&31)<<6|ze&63,Y>127&&(K=Y));break;case 3:ze=u[A+1],Ae=u[A+2],(ze&192)===128&&(Ae&192)===128&&(Y=(B&15)<<12|(ze&63)<<6|Ae&63,Y>2047&&(Y<55296||Y>57343)&&(K=Y));break;case 4:ze=u[A+1],Ae=u[A+2],dt=u[A+3],(ze&192)===128&&(Ae&192)===128&&(dt&192)===128&&(Y=(B&15)<<18|(ze&63)<<12|(Ae&63)<<6|dt&63,Y>65535&&Y<1114112&&(K=Y))}}K===null?(K=65533,et=1):K>65535&&(K-=65536,I.push(K>>>10&1023|55296),K=56320|K&1023),I.push(K),A+=et}return v(I)}var lt=4096;function v(u){var p=u.length;if(p<=lt)return String.fromCharCode.apply(String,u);for(var y="",I=0;I<p;)y+=String.fromCharCode.apply(String,u.slice(I,I+=lt));return y}function Ht(u,p,y){var I="";y=Math.min(u.length,y);for(var A=p;A<y;++A)I+=String.fromCharCode(u[A]&127);return I}function Xe(u,p,y){var I="";y=Math.min(u.length,y);for(var A=p;A<y;++A)I+=String.fromCharCode(u[A]);return I}function Yt(u,p,y){var I=u.length;(!p||p<0)&&(p=0),(!y||y<0||y>I)&&(y=I);for(var A="",B=p;B<y;++B)A+=ke[u[B]];return A}function Se(u,p,y){for(var I=u.slice(p,y),A="",B=0;B<I.length-1;B+=2)A+=String.fromCharCode(I[B]+I[B+1]*256);return A}o.prototype.slice=function(u,p){var y=this.length;u=~~u,p=p===void 0?y:~~p,u<0?(u+=y,u<0&&(u=0)):u>y&&(u=y),p<0?(p+=y,p<0&&(p=0)):p>y&&(p=y),p<u&&(p=u);var I=this.subarray(u,p);return Object.setPrototypeOf(I,o.prototype),I};function D(u,p,y){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+p>y)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var I=this[u],A=1,B=0;++B<p&&(A*=256);)I+=this[u+B]*A;return I},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var I=this[u+--p],A=1;p>0&&(A*=256);)I+=this[u+--p]*A;return I},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,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var I=this[u],A=1,B=0;++B<p&&(A*=256);)I+=this[u+B]*A;return A*=128,I>=A&&(I-=Math.pow(2,8*p)),I},o.prototype.readIntBE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var I=p,A=1,B=this[u+--I];I>0&&(A*=256);)B+=this[u+--I]*A;return A*=128,B>=A&&(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 y=this[u]|this[u+1]<<8;return y&32768?y|4294901760:y},o.prototype.readInt16BE=function(u,p){u=u>>>0,p||D(u,2,this.length);var y=this[u+1]|this[u]<<8;return y&32768?y|4294901760:y},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),Ua.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Ua.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ua.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ua.read(this,u,!1,52,8)};function T(u,p,y,I,A,B){if(!o.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>A||p<B)throw new RangeError('"value" argument is out of bounds');if(y+I>u.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,p,y,I){if(u=+u,p=p>>>0,y=y>>>0,!I){var A=Math.pow(2,8*y)-1;T(this,u,p,y,A,0)}var B=1,K=0;for(this[p]=u&255;++K<y&&(B*=256);)this[p+K]=u/B&255;return p+y},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,p,y,I){if(u=+u,p=p>>>0,y=y>>>0,!I){var A=Math.pow(2,8*y)-1;T(this,u,p,y,A,0)}var B=y-1,K=1;for(this[p+B]=u&255;--B>=0&&(K*=256);)this[p+B]=u/K&255;return p+y},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,1,255,0),this[p]=u&255,p+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,p,y){return u=+u,p=p>>>0,y||T(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,y){return u=+u,p=p>>>0,y||T(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,y){return u=+u,p=p>>>0,y||T(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,y){return u=+u,p=p>>>0,y||T(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,y,I){if(u=+u,p=p>>>0,!I){var A=Math.pow(2,8*y-1);T(this,u,p,y,A-1,-A)}var B=0,K=1,et=0;for(this[p]=u&255;++B<y&&(K*=256);)u<0&&et===0&&this[p+B-1]!==0&&(et=1),this[p+B]=(u/K>>0)-et&255;return p+y},o.prototype.writeIntBE=function(u,p,y,I){if(u=+u,p=p>>>0,!I){var A=Math.pow(2,8*y-1);T(this,u,p,y,A-1,-A)}var B=y-1,K=1,et=0;for(this[p+B]=u&255;--B>=0&&(K*=256);)u<0&&et===0&&this[p+B+1]!==0&&(et=1),this[p+B]=(u/K>>0)-et&255;return p+y},o.prototype.writeInt8=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,1,127,-128),u<0&&(u=255+u+1),this[p]=u&255,p+1},o.prototype.writeInt16LE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,2,32767,-32768),this[p]=u&255,this[p+1]=u>>>8,p+2},o.prototype.writeInt16BE=function(u,p,y){return u=+u,p=p>>>0,y||T(this,u,p,2,32767,-32768),this[p]=u>>>8,this[p+1]=u&255,p+2},o.prototype.writeInt32LE=function(u,p,y){return u=+u,p=p>>>0,y||T(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,y){return u=+u,p=p>>>0,y||T(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,y,I,A,B){if(y+I>u.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function ee(u,p,y,I,A){return p=+p,y=y>>>0,A||Z(u,p,y,4),Ua.write(u,p,y,I,23,4),y+4}o.prototype.writeFloatLE=function(u,p,y){return ee(this,u,p,!0,y)},o.prototype.writeFloatBE=function(u,p,y){return ee(this,u,p,!1,y)};function se(u,p,y,I,A){return p=+p,y=y>>>0,A||Z(u,p,y,8),Ua.write(u,p,y,I,52,8),y+8}o.prototype.writeDoubleLE=function(u,p,y){return se(this,u,p,!0,y)},o.prototype.writeDoubleBE=function(u,p,y){return se(this,u,p,!1,y)},o.prototype.copy=function(u,p,y,I){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(y||(y=0),!I&&I!==0&&(I=this.length),p>=u.length&&(p=u.length),p||(p=0),I>0&&I<y&&(I=y),I===y||u.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("sourceEnd out of bounds");I>this.length&&(I=this.length),u.length-p<I-y&&(I=u.length-p+y);var A=I-y;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(p,y,I):Uint8Array.prototype.set.call(u,this.subarray(y,I),p),A},o.prototype.fill=function(u,p,y,I){if(typeof u=="string"){if(typeof p=="string"?(I=p,p=0,y=this.length):typeof y=="string"&&(I=y,y=this.length),I!==void 0&&typeof I!="string")throw new TypeError("encoding must be a string");if(typeof I=="string"&&!o.isEncoding(I))throw new TypeError("Unknown encoding: "+I);if(u.length===1){var A=u.charCodeAt(0);(I==="utf8"&&A<128||I==="latin1")&&(u=A)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(p<0||this.length<p||this.length<y)throw new RangeError("Out of range index");if(y<=p)return this;p=p>>>0,y=y===void 0?this.length:y>>>0,u||(u=0);var B;if(typeof u=="number")for(B=p;B<y;++B)this[B]=u;else{var K=o.isBuffer(u)?u:o.from(u,I),et=K.length;if(et===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(B=0;B<y-p;++B)this[B+p]=K[B%et]}return this};var we=/[^+/0-9A-Za-z-_]/g;function ve(u){if(u=u.split("=")[0],u=u.trim().replace(we,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function ue(u,p){p=p||1/0;for(var y,I=u.length,A=null,B=[],K=0;K<I;++K){if(y=u.charCodeAt(K),y>55295&&y<57344){if(!A){if(y>56319){(p-=3)>-1&&B.push(239,191,189);continue}else if(K+1===I){(p-=3)>-1&&B.push(239,191,189);continue}A=y;continue}if(y<56320){(p-=3)>-1&&B.push(239,191,189),A=y;continue}y=(A-55296<<10|y-56320)+65536}else A&&(p-=3)>-1&&B.push(239,191,189);if(A=null,y<128){if((p-=1)<0)break;B.push(y)}else if(y<2048){if((p-=2)<0)break;B.push(y>>6|192,y&63|128)}else if(y<65536){if((p-=3)<0)break;B.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((p-=4)<0)break;B.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return B}function Ce(u){for(var p=[],y=0;y<u.length;++y)p.push(u.charCodeAt(y)&255);return p}function Ue(u,p){for(var y,I,A,B=[],K=0;K<u.length&&!((p-=2)<0);++K)y=u.charCodeAt(K),I=y>>8,A=y%256,B.push(A),B.push(I);return B}function Ot(u){return u_.toByteArray(ve(u))}function He(u,p,y,I){for(var A=0;A<I&&!(A+y>=p.length||A>=u.length);++A)p[A+y]=u[A];return A}function Ye(u,p){return u instanceof p||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===p.name}function Lt(u){return u!==u}var ke=function(){for(var u="0123456789abcdef",p=new Array(256),y=0;y<16;++y)for(var I=y*16,A=0;A<16;++A)p[I+A]=u[y]+u[A];return p}()}),st=qf.Buffer;qf.SlowBuffer;qf.INSPECT_MAX_BYTES;qf.kMaxLength;var m_=function(e,t){return m_=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])},m_(e,t)};function Yf(e,t){m_(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ss=function(e){Yf(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),Ut=function(e){Yf(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 Gf(e){return e&&e.Math==Math&&e}function iT(){return Gf(typeof globalThis=="object"&&globalThis)||Gf(typeof window=="object"&&window)||Gf(typeof self=="object"&&self)||Gf(typeof global=="object"&&global)||Function("return this")()}function R2(){var e=iT();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var N2=function(e){var t=R2()?"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=st.alloc(e),r=0;r<e;++r)n[r]=Math.floor(Math.random()*256);return n},A2=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(st.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(st.alloc(t))}:N2}},oT=A2();function O2(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function y_(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function M2(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function P2(e){return Il(e)&&Object.prototype.toString.call(e)==="[object Date]"}function Il(e){return typeof e=="object"&&e!==null}function Kf(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 zf(e){if(ArrayBuffer.isView(e))return st.from(e.buffer,e.byteOffset,e.byteLength);if(O2(e))return st.from(e);throw new Ut("Must use either Buffer or TypedArray")}var k2=/^(?:[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,sT=function(e){return typeof e=="string"&&k2.test(e)},g_=function(e){if(!sT(e))throw new Ut('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 st.from(t,"hex")},jI=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")},QK=Math.pow(2,63)-1,eZ=-Math.pow(2,63),L2=Math.pow(2,53),F2=-Math.pow(2,53),aT=4,Ds=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 Ut("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=st.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=st.from(t,"binary"):Array.isArray(t)?this.buffer=st.from(t):this.buffer=zf(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new Ut("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new Ut("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 Ut("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=st.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=st.alloc(this.buffer.length+t.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(t)?(this.buffer.set(zf(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 $I(this.buffer.slice(0,this.position));throw new Ss('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=st.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=st.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=g_(t.$uuid)),!r)throw new Ut("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===aT?new $I(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(Ds.prototype,"_bsontype",{value:"Binary"});var d_=16,$I=function(e){Yf(t,e);function t(n){var r=this,i,s;if(n==null)i=t.generate();else if(n instanceof t)i=st.from(n.buffer),s=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===d_)i=zf(n);else if(typeof n=="string")i=g_(n);else throw new Ut("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,aT)||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=jI(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=jI(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 Ds(this.id,Ds.SUBTYPE_UUID)},t.generate=function(){var n=oT(d_);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,st.from(n)},t.isValid=function(n){return n?n instanceof t?!0:typeof n=="string"?sT(n):y_(n)?n.length!==d_?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},t.createFromHexString=function(n){var r=g_(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}(Ds),Zf=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(Zf.prototype,"_bsontype",{value:"Code"});function B2(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 Cr=void 0;try{Cr=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 WI=65536,V2=1<<24,ja=WI*WI,cT=ja*ja,GI=cT/2,zI={},qI={},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=qI[t],i)?i:(r=e.fromBits(t,(t|0)<0?-1:0,!0),s&&(qI[t]=r),r)):(t|=0,(s=-128<=t&&t<128)&&(i=zI[t],i)?i:(r=e.fromBits(t,t<0?-1:0,!1),s&&(zI[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>=cT)return e.MAX_UNSIGNED_VALUE}else{if(t<=-GI)return e.MIN_VALUE;if(t+1>=GI)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%ja|0,t/ja|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(Cr){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?Cr.div_u:Cr.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,Cr.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)),Cr){var n=(this.unsigned?Cr.rem_u:Cr.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,Cr.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)),Cr){var n=Cr.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,Cr.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)*ja+(this.low>>>0):this.high*ja+(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(V2),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 U2=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,H2=/^(\+|-)?(Infinity|inf)$/i,j2=/^(\+|-)?NaN$/i,Cl=6111,f_=-6176,YI=6176,$2=34,p_=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),KI=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ZI=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),W2=/^([-+])?(\d+)?$/,G2=31,XI=16383,z2=30,q2=31;function JI(e){return!isNaN(parseInt(e,10))}function Y2(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 K2(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 Z2(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 Ha(e,t){throw new Ut('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var v_=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(y_(t)){if(t.byteLength!==16)throw new Ut("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new Ut("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,x=0,P=new le(0,0),F=new le(0,0),V=0,L=0;if(t.length>=7e3)throw new Ut(""+t+" not a valid Decimal128 string");var q=t.match(U2),Oe=t.match(H2),ct=t.match(j2);if(!q&&!Oe&&!ct||t.length===0)throw new Ut(""+t+" not a valid Decimal128 string");if(q){var j=q[2],de=q[4],Q=q[5],he=q[6];de&&he===void 0&&Ha(t,"missing exponent power"),de&&j===void 0&&Ha(t,"missing exponent base"),de===void 0&&(Q||he)&&Ha(t,"missing e before exponent")}if((t[L]==="+"||t[L]==="-")&&(n=t[L++]==="-"),!JI(t[L])&&t[L]!=="."){if(t[L]==="i"||t[L]==="I")return new e(st.from(n?KI:ZI));if(t[L]==="N")return new e(st.from(p_))}for(;JI(t[L])||t[L]===".";){if(t[L]==="."){r&&Ha(t,"contains multiple periods"),r=!0,L=L+1;continue}d<34&&(t[L]!=="0"||i)&&(i||(c=o),i=!0,h[f++]=parseInt(t[L],10),d=d+1),i&&(a=a+1),r&&(l=l+1),o=o+1,L=L+1}if(r&&!o)throw new Ut(""+t+" not a valid Decimal128 string");if(t[L]==="e"||t[L]==="E"){var Pe=t.substr(++L).match(W2);if(!Pe||!Pe[2])return new e(st.from(p_));b=parseInt(Pe[0],10),L=L+Pe[0].length}if(t[L])return new e(st.from(p_));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=f_:b=b-l;b>Cl;){if(m=m+1,m-g>$2){var ut=h.join("");if(ut.match(/^0+$/)){b=Cl;break}Ha(t,"overflow")}b=b-1}for(;b<f_||d<a;){if(m===0&&s<d){b=f_,s=0;break}if(d<a?a=a-1:m=m-1,b<Cl)b=b+1;else{var ut=h.join("");if(ut.match(/^0+$/)){b=Cl;break}Ha(t,"overflow")}}if(m-g+1<s){var lt=o;r&&(c=c+1,lt=lt+1),n&&(c=c+1,lt=lt+1);var v=parseInt(t[c+m+1],10),Ht=0;if(v>=5&&(Ht=1,v===5)){for(Ht=h[m]%2===1?1:0,x=c+m+2;x<lt;x++)if(parseInt(t[x],10)){Ht=1;break}}if(Ht){for(var Xe=m;Xe>=0;Xe--)if(++h[Xe]>9&&(h[Xe]=0,Xe===0))if(b<Cl)b=b+1,h[Xe]=1;else return new e(st.from(n?KI:ZI))}}if(P=le.fromNumber(0),F=le.fromNumber(0),s===0)P=le.fromNumber(0),F=le.fromNumber(0);else if(m-g<17){var Xe=g;for(F=le.fromNumber(h[Xe++]),P=new le(0,0);Xe<=m;Xe++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Xe]))}else{var Xe=g;for(P=le.fromNumber(h[Xe++]);Xe<=m-17;Xe++)P=P.multiply(le.fromNumber(10)),P=P.add(le.fromNumber(h[Xe]));for(F=le.fromNumber(h[Xe++]);Xe<=m;Xe++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[Xe]))}var Yt=K2(P,le.fromString("100000000000000000"));Yt.low=Yt.low.add(F),Z2(Yt.low,F)&&(Yt.high=Yt.high.add(le.fromNumber(1))),V=b+YI;var Se={low:le.fromNumber(0),high:le.fromNumber(0)};Yt.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(Yt.high.and(le.fromNumber(0x7fffffffffff)))):(Se.high=Se.high.or(le.fromNumber(V&16383).shiftLeft(49)),Se.high=Se.high.or(Yt.high.and(le.fromNumber(562949953421311)))),Se.low=Yt.low,n&&(Se.high=Se.high.or(le.fromString("9223372036854775808")));var D=st.alloc(16);return L=0,D[L++]=Se.low.low&255,D[L++]=Se.low.low>>8&255,D[L++]=Se.low.low>>16&255,D[L++]=Se.low.low>>24&255,D[L++]=Se.low.high&255,D[L++]=Se.low.high>>8&255,D[L++]=Se.low.high>>16&255,D[L++]=Se.low.high>>24&255,D[L++]=Se.high.low&255,D[L++]=Se.high.low>>8&255,D[L++]=Se.high.low>>16&255,D[L++]=Se.high.low>>24&255,D[L++]=Se.high.high&255,D[L++]=Se.high.high>>8&255,D[L++]=Se.high.high>>16&255,D[L++]=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,x=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24;s=0;var P={low:new le(g,m),high:new le(b,x)};P.high.lessThan(le.ZERO)&&d.push("-");var F=x>>26&G2;if(F>>3===3){if(F===z2)return d.join("")+"Infinity";if(F===q2)return"NaN";t=x>>15&XI,a=8+(x>>14&1)}else a=x>>14&7,t=x>>17&XI;var V=t-YI;if(l.parts[0]=(x&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 L=0,q=Y2(l);if(l=q.quotient,L=q.rem.low,!!L)for(c=8;c>=0;c--)r[h*9+c]=L%10,L=Math.floor(L/10)}if(o)n=1,r[s]=0;else for(n=36;!r[s];)n=n-1,s=s+1;var Oe=n-1+V;if(Oe>=34||Oe<=-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"),Oe>0?d.push("+".concat(Oe)):d.push("".concat(Oe))}else if(V>=0)for(var i=0;i<n;i++)d.push("".concat(r[s++]));else{var ct=n+V;if(ct>0)for(var i=0;i<ct;i++)d.push("".concat(r[s++]));else d.push("0");for(d.push(".");ct++<0;)d.push("0");for(var i=0;i<n-Math.max(ct-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(v_.prototype,"_bsontype",{value:"Decimal128"});var Xf=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(Xf.prototype,"_bsontype",{value:"Double"});var Jf=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(Jf.prototype,"_bsontype",{value:"Int32"});var __=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(__.prototype,"_bsontype",{value:"MaxKey"});var E_=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(E_.prototype,"_bsontype",{value:"MinKey"});var X2=new RegExp("^[0-9a-fA-F]{24}$"),Cs=null,fi=Symbol("id"),un=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 Ut("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=st.from(t.toHexString(),"hex"):n=t.id}else n=t;if(n==null||typeof n=="number")this[fi]=e.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[fi]=n instanceof st?n:zf(n);else if(typeof n=="string")if(n.length===12){var r=st.from(n);if(r.byteLength===12)this[fi]=r;else throw new Ut("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&X2.test(n))this[fi]=st.from(n,"hex");else throw new Ut("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Ut("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[fi]},set:function(t){this[fi]=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=st.alloc(12);return r.writeUInt32BE(t,0),Cs===null&&(Cs=oT(5)),r[4]=Cs[0],r[5]=Cs[1],r[6]=Cs[2],r[7]=Cs[3],r[8]=Cs[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[fi][11]===t[fi][11]&&this[fi].equals(t[fi]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&y_(this.id))return t===st.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 st.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=st.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 Ut("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(st.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(un.prototype,"generate",{value:Kf(function(e){return un.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(un.prototype,"getInc",{value:Kf(function(){return un.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(un.prototype,"get_inc",{value:Kf(function(){return un.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(un,"get_inc",{value:Kf(function(){return un.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(un.prototype,"_bsontype",{value:"ObjectID"});function J2(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=J2(n??""),this.pattern.indexOf("\0")!==-1)throw new Ss("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new Ss("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 Ss("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 Ut("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(Dl.prototype,"_bsontype",{value:"BSONRegExp"});var w_=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(w_.prototype,"_bsontype",{value:"Symbol"});var Q2=le,lT=function(e){Yf(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}(Q2);function eV(e){return Il(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var uT=2147483647,dT=-2147483648,fT=9223372036854776e3,pT=-9223372036854776e3,tV={$oid:un,$binary:Ds,$uuid:Ds,$symbol:w_,$numberInt:Jf,$numberDecimal:v_,$numberDouble:Xf,$numberLong:le,$minKey:E_,$maxKey:__,$regex:Dl,$regularExpression:Dl,$timestamp:lT};function hT(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=dT&&e<=uT)return new Jf(e);if(e>=pT&&e<=fT)return le.fromNumber(e)}return new Xf(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=tV[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=hT(e.$scope)),Zf.fromExtendedJSON(e)}if(B2(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 nV(e,t){return e.map(function(n,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return wo(n,t)}finally{t.seenObjects.pop()}})}function QI(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function wo(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var n=t.seenObjects.findIndex(function(P){return P.obj===e});if(n!==-1){var r=t.seenObjects.map(function(P){return P.propertyName}),i=r.slice(0,n).map(function(P){return"".concat(P," -> ")}).join(""),s=r[n],o=" -> "+r.slice(n+1,r.length-1).map(function(P){return"".concat(P," -> ")}).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 Ut(`Converting circular structure to EJSON:
|
|
42
|
-
`+" ".concat(i).concat(
|
|
43
|
-
`)+" ".concat(l,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return nV(e,t);if(e===void 0)return null;if(e instanceof Date||P2(e)){var h=e.getTime(),d=h>-1&&h<2534023188e5;return t.legacy?t.relaxed&&d?{$date:e.getTime()}:{$date:QI(e)}:t.relaxed&&d?{$date:QI(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var f=e>=dT&&e<=uT,g=e>=pT&&e<=fT;if(f)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||M2(e)){var m=e.flags;if(m===void 0){var b=e.toString().match(/[gimuy]*$/);b&&(m=b[0])}var x=new Dl(e.source,m);return x.toExtendedJSON(t)}return e!=null&&typeof e=="object"?iV(e,t):e}var rV={Binary:function(e){return new Ds(e.value(),e.sub_type)},Code:function(e){return new Zf(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 v_(e.bytes)},Double:function(e){return new Xf(e.value)},Int32:function(e){return new Jf(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 __},MinKey:function(){return new E_},ObjectID:function(e){return new un(e)},ObjectId:function(e){return new un(e)},BSONRegExp:function(e){return new Dl(e.pattern,e.options)},Symbol:function(e){return new w_(e.value)},Timestamp:function(e){return lT.fromBits(e.low,e.high)}};function iV(e,t){if(e==null||typeof e!="object")throw new Ss("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=wo(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(eV(e)){var o=e;if(typeof o.toExtendedJSON!="function"){var a=rV[e._bsontype];if(!a)throw new Ut("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return n==="Code"&&o.scope?o=new Zf(o.code,wo(o.scope,t)):n==="DBRef"&&o.oid&&(o=new Sl(wo(o.collection,t),wo(o.oid,t),wo(o.db,t),wo(o.fields,t))),o.toExtendedJSON(t)}else throw new Ss("_bsontype must be a string, but was: "+typeof n)}var eT;(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 Ss("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return hT(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=wo(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})(eT||(eT={}));var tT,nT=iT();nT.Map?tT=nT.Map:tT=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 tZ=le.fromNumber(L2),nZ=le.fromNumber(F2),h_=new Uint8Array(8),rZ=new DataView(h_.buffer,h_.byteOffset,h_.byteLength),oV=1024*1024*17,iZ=st.alloc(oV),bo=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}},We=class{constructor(e,t={},n,r){this.name=e,this.properties=t,this.id=r?new un(r):new un,this.occurred=new Date,n&&(this.trigger=new bo(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},Nt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,t){if(!e)return;let n=document.createElement("script");n.id=t??"",n.src=e,mn.mode==="local"&&(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 injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,t=document.head){if(!e)return;let n=document.createElement("link");n.rel="stylesheet",n.href=e,e===this.SWIPER_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)}static loadSwiperScript(){let e="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";return new Promise(t=>{if(window.Swiper){t();return}if(Array.from(document.scripts).some(r=>r.src.includes(e))){let r=setInterval(()=>{window.Swiper&&(clearInterval(r),t())},50)}let n=document.createElement("script");n.src=e,n.onload=()=>{t()},n.onerror=()=>{n.remove()},document.body.appendChild(n)})}},mx=Re(Qf()),gx=Re(ds()),Dt=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=Re(b_()),Tl=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 yT.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)}},hi=class PI{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 PI(w({origin:location.origin,path:t,qs:location.search,referrer:Tl.getReferrer(),name:Me.get().pageName},Tl.getUTMParams()))}},Wa=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}},aV=" 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",cV=/bot|crawl|http|lighthouse|scan|search|spider/i,xl;function lV(){if(xl instanceof RegExp)return xl;try{xl=new RegExp(aV,"i")}catch{xl=cV}return xl}function vT(e){return!!e&&lV().test(e)}var Te=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}},C_={d:(e,t)=>{for(var n in t)C_.o(t,n)&&!C_.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},S_={};C_.d(S_,{A:()=>fV,k:()=>D_});var uV=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())})},dV=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 D_(){return uV(this,void 0,Promise,function(){return dV(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=D_);var fV=D_,_T=S_.A,SZ=S_.k,dx=Re(ds()),ET=Re(np()),sr=class ls{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new ET.default;constructor(){}static get(){return ls._instance||(ls._instance=new ls),ls._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===ls.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===ls.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=ls.get().getWidth(),a=ls.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}},rp=class{parser;result={};constructor(){this.parser=sr.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(){if(!document.body)return;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{}}},Ge=class LI{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new Wa;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new LI),this.CURRENT}async getNormalisedCart(t){await this.fetchCartFromShopify(t);let n=this.convertToCooeeCart();return t&&await rt.set(ge.CURRENT_CART,n),n}async addCooeeAttributes(){await this.lock.acquire();let t=await yn.get(ge.ID),n=await rt.get(ge.DEVICE_ID);if(this.attributes?.letscooee_did===n&&this.attributes?.letscooee_sid===t){C.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()};C.debug("Updating Shopify cart with attributes:",r);let i=Dt.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:r})})).json();C.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,Me.get().currencyCode=this.currency,C.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 C.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let n=[];for(let r of t){if(!r.id||!r.title){C.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){C.debug("Not fetching cart");return}C.debug("Fetching cart");let n=Dt.getCartURL("cart.js"),r=await(await fetch(n)).json();this.update(r)}},Is=(e=>(e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e))(Is||{}),Ga=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let t=Is[e]?.toLowerCase();t&&(C.debug(`Sending ${t} intent to MS Clarity`),window.clarity("set","Cooee Intent",t))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}},Dr=class{static isOn=!1;static element;static watch(){let e=C.getDebugParam();(e==="1"||e==="on")&&Ve.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"),ce.onDocumentLoaded(()=>{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}},Nl=class extends vo{static storeName="app";static{this.storage=xa(this.storeName)}},ip=Re(ds()),mi=class BI{static INSTANCE=new BI;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(t,n){this.topics[t]||(this.topics[t]=new J),this.topics[t].next(n)}subscriber(t){return this.topics[t]||(this.topics[t]=new J),this.topics[t].asObservable()}},Gt=class di{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=vt.get().website??{};currentState=!1;drawerSubject=new Nr({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=[di.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 di._instance||(di._instance=new di),di._instance}static forceUpdate(){di._instance=new di}isOpen(){let t=this.inShadow?this.isPresent():this.isVisible();return ip.default.log(`Cart drawer is currently ${t?"open":"close"}`),t}open(){if(this.isOpen()){C.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let t=document.querySelector(this.iconSelector);if(!t){C.debug("No clickable cart icon found with selector",this.iconSelector);return}t.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===di.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(window.MinimogTheme?.Cart?.renderNewCart)window.MinimogTheme.Cart.renderNewCart();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():window.sideCart?.updateCart?window.sideCart.updateCart():window.SLIDECART_UPDATE?(window.SLIDECART_UPDATE(),window.SLIDECART_OPEN?.()):(C.info("No method found to update the cart drawer. Blindly firing some events to try"),document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})));document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),n&&mi.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(!Dt.isShopify())return;let t=this.selector||this.cartSelector;if(this.cartDrawerElement=await ce.retrySelector(t),!this.cartDrawerElement){ip.default.warn("Max attempts exhausted to find cart drawer");return}ip.default.log("Found",this.cartDrawerElement,`from selector: ${t}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!Dt.isShopify()||!this.shadowParentElementSelector)return;let t=(await ce.retrySelector(this.shadowParentElementSelector))?.shadowRoot;t?.mode==="open"&&(this.cartDrawerShadowElement=t,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;if(this.cartDrawerElement.tagName.toLowerCase()===di.DEFAULT_SELECTOR&&this.cartDrawerElement.open)return!0;if(this.cartDrawerElement.id==="cart-drawer__container")return this.cartDrawerElement.classList.contains("cart-drawer-open");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=getComputedStyle(this.cartDrawerElement),l=a.display!=="none"&&a.visibility!=="hidden"&&parseFloat(a.opacity)>0,c=!this.cartDrawerElement.hidden,h=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,d=a.transform.match(/matrix\(([^)]+)\)/),f=0,g=0;if(d){let L=d[1].split(", ").map(parseFloat);f=L[4],g=L[5]}let m=f+t.left>r||f+t.right<0||g+t.top>n||g+t.bottom<0,b=Math.max(0,Math.min(t.right,r)-Math.max(t.left,0)),x=Math.max(0,Math.min(t.bottom,n)-Math.max(t.top,0)),P=b*x,F=t.width*t.height,V=F>0&&P/F>=.1;return(o||!m)&&l&&c&&h&&V}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(ce.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let t=this.cartDrawerElement||this.cartDrawerShadowElement,n=new J;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{n.next()}),this.mutationObserver.observe(t,{attributes:!0,subtree:!0,childList:this.inShadow}),n.pipe(Ar(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 Ge.getCurrent().getNormalisedCart(!0)).itemCount,n=document.querySelector(".cart-link__bubble");n&&(n.innerText=t+"")}},op=class{static processConfiguration(){let e=vt.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Ve.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await rt.get(ge.GA_CLIENT_ID),t=await this.getClientIDViaGTag();if(e!==t)return await rt.set(ge.GA_CLIENT_ID,t),t}static async getClientIDViaGTag(){let e=vt.get().gaMeasurementID;if(!(!e||!window.gtag))return new Promise(t=>{window.gtag("get",e,"client_id",n=>{t(n)})})}},lx=Re(Pf()),In=Re(qn()),xo=Re(Qf()),Lp=Re(T_()),up,it,DT,A_,Ts,wT,IT,x_,TT,O_,R_,N_,pV,Al={},xT=[],hV=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,M_=Array.isArray;function Co(e,t){for(var n in t)e[n]=t[n];return e}function P_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function k_(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?up.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 cp(e,o,r,i,null)}function cp(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??++DT,__i:-1,__u:0};return i==null&&it.vnode!=null&&it.vnode(s),s}function yi(e){return e.children}function gi(e,t){this.props=e,this.context=t}function za(e,t){if(t==null)return e.__?za(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"?za(e):null}function RT(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 RT(e)}}function bT(e){(!e.__d&&(e.__d=!0)&&Ts.push(e)&&!lp.__r++||wT!==it.debounceRendering)&&((wT=it.debounceRendering)||IT)(lp)}function lp(){var e,t,n,r,i,s,o,a;for(Ts.sort(x_);e=Ts.shift();)e.__d&&(t=Ts.length,r=void 0,s=(i=(n=e).__v).__e,o=[],a=[],n.__P&&((r=Co({},i)).__v=i.__v+1,it.vnode&&it.vnode(r),L_(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[s]:null,o,s??za(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,OT(o,r,a),r.__e!=s&&RT(r)),Ts.length>t&&Ts.sort(x_));lp.__r=0}function NT(e,t,n,r,i,s,o,a,l,c,h){var d,f,g,m,b,x,P=r&&r.__k||xT,F=t.length;for(l=mV(n,t,P,l,F),d=0;d<F;d++)(g=n.__k[d])!=null&&(f=g.__i===-1?Al:P[g.__i]||Al,g.__i=d,x=L_(e,g,f,i,s,o,a,l,c,h),m=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&F_(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=AT(g,l,e):typeof g.type=="function"&&x!==void 0?l=x:m&&(l=m.nextSibling),g.__u&=-7);return n.__e=b,l}function mV(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?cp(null,o,null,null,null):M_(o)?cp(yi,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?cp(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=gV(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=za(a)),MT(a,a));return r}function AT(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=AT(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=za(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function gV(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 CT(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||hV.test(t)?n:n+"px"}function ap(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||CT(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||CT(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(TT,"$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=O_,e.addEventListener(t,s?N_:R_,s)):e.removeEventListener(t,s?N_:R_,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 ST(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=O_++;else if(t.t<n.u)return;return n(it.event?it.event(t):t)}}}function L_(e,t,n,r,i,s,o,a,l,c){var h,d,f,g,m,b,x,P,F,V,L,q,Oe,ct,j,de,Q,he=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(h=it.__b)&&h(t);e:if(typeof he=="function")try{if(P=t.props,F="prototype"in he&&he.prototype.render,V=(h=he.contextType)&&r[h.__c],L=h?V?V.props.value:h.__:r,n.__c?x=(d=t.__c=n.__c).__=d.__E:(F?t.__c=d=new he(P,L):(t.__c=d=new gi(P,L),d.constructor=he,d.render=vV),V&&V.sub(d),d.props=P,d.state||(d.state={}),d.context=L,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),F&&d.__s==null&&(d.__s=d.state),F&&he.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Co({},d.__s)),Co(d.__s,he.getDerivedStateFromProps(P,d.__s))),g=d.props,m=d.state,d.__v=t,f)F&&he.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),F&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(F&&he.getDerivedStateFromProps==null&&P!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(P,L),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(P,d.__s,L)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(d.props=P,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Pe){Pe&&(Pe.__=t)}),q=0;q<d._sb.length;q++)d.__h.push(d._sb[q]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(P,d.__s,L),F&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,m,b)})}if(d.context=L,d.props=P,d.__P=e,d.__e=!1,Oe=it.__r,ct=0,F){for(d.state=d.__s,d.__d=!1,Oe&&Oe(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,Oe&&Oe(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++ct<25);d.state=d.__s,d.getChildContext!=null&&(r=Co(Co({},r),d.getChildContext())),F&&!f&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(g,m)),a=NT(e,M_(de=h!=null&&h.type===yi&&h.key==null?h.props.children:h)?de:[de],t,n,r,i,s,o,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),x&&(d.__E=d.__=null)}catch(Pe){if(t.__v=null,l||s!=null)if(Pe.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(Q=s.length;Q--;)P_(s[Q]);else t.__e=n.__e,t.__k=n.__k;it.__e(Pe,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=yV(n.__e,t,n,r,i,s,o,l,c);return(h=it.diffed)&&h(t),128&t.__u?void 0:a}function OT(e,t,n){for(var r=0;r<n.length;r++)F_(n[r],n[++r],n[++r]);it.__c&&it.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){it.__e(s,i.__v)}})}function yV(e,t,n,r,i,s,o,a,l){var c,h,d,f,g,m,b,x=n.props,P=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(P);e=document.createElementNS(i,F,P.is&&P),a&&(it.__m&&it.__m(t,s),a=!1),s=null}if(F===null)x===P||a&&e.data===P||(e.data=P);else{if(s=s&&up.call(e.childNodes),x=n.props||Al,!a&&s!=null)for(x={},c=0;c<e.attributes.length;c++)x[(g=e.attributes[c]).name]=g.value;for(c in x)if(g=x[c],c!="children"){if(c=="dangerouslySetInnerHTML")d=g;else if(!(c in P)){if(c=="value"&&"defaultValue"in P||c=="checked"&&"defaultChecked"in P)continue;ap(e,c,null,g,i)}}for(c in P)g=P[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?m=g:c=="checked"?b=g:a&&typeof g!="function"||x[c]===g||ap(e,c,g,x[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=""),NT(e,M_(f)?f:[f],t,n,r,F=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:n.__k&&za(n,0),a,l),s!=null)for(c=s.length;c--;)P_(s[c]);a||(c="value",F=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||F=="progress"&&!m||F=="option"&&m!==x[c])&&ap(e,c,m,x[c],i),c="checked",b!==void 0&&b!==e[c]&&ap(e,c,b,x[c],i))}return e}function F_(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){it.__e(i,n)}}function MT(e,t,n){var r,i;if(it.unmount&&it.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||F_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){it.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&MT(r[i],t,n||typeof e.type!="function");n||P_(e.__e),e.__c=e.__=e.__e=void 0}function vV(e,t,n){return this.constructor(e,n)}function PT(e,t,n){var r,i,s,o;t==document&&(t=document.documentElement),it.__&&it.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],o=[],L_(t,e=(!r&&n||t).__k=k_(yi,null,[e]),i||Al,Al,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?up.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r,o),OT(s,e,o)}up=xT.slice,it={__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}},DT=0,A_=function(e){return e!=null&&e.constructor==null},gi.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Co({},this.state),typeof e=="function"&&(e=e(Co({},n),this.props)),e&&Co(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),bT(this))},gi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),bT(this))},gi.prototype.render=yi,Ts=[],IT=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,x_=function(e,t){return e.__v.__b-t.__v.__b},lp.__r=0,TT=/(PointerCapture)$|Capture$/i,O_=0,R_=ST(!1),N_=ST(!0),pV=0;var V_,ar,B_,kT,LT=0,WT=[],dn=it,FT=dn.__b,BT=dn.__r,VT=dn.diffed,UT=dn.__c,HT=dn.unmount,jT=dn.__;function _V(e,t){dn.__h&&dn.__h(ar,e,LT||t),LT=0;var n=ar.__H||(ar.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function H_(e,t){var n=_V(V_++,7);return bV(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function EV(){for(var e;e=WT.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(dp),e.__H.__h.forEach(U_),e.__H.__h=[]}catch(t){e.__H.__h=[],dn.__e(t,e.__v)}}dn.__b=function(e){ar=null,FT&&FT(e)},dn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),jT&&jT(e,t)},dn.__r=function(e){BT&&BT(e),V_=0;var t=(ar=e.__c).__H;t&&(B_===ar?(t.__h=[],ar.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(dp),t.__h.forEach(U_),t.__h=[],V_=0)),B_=ar},dn.diffed=function(e){VT&&VT(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(WT.push(t)!==1&&kT===dn.requestAnimationFrame||((kT=dn.requestAnimationFrame)||wV)(EV)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),B_=ar=null},dn.__c=function(e,t){t.some(function(n){try{n.__h.forEach(dp),n.__h=n.__h.filter(function(r){return!r.__||U_(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],dn.__e(r,n.__v)}}),UT&&UT(e,t)},dn.unmount=function(e){HT&&HT(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{dp(r)}catch(i){t=i}}),n.__H=void 0,t&&dn.__e(t,n.__v))};var $T=typeof requestAnimationFrame=="function";function wV(e){var t,n=function(){clearTimeout(r),$T&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$T&&(t=requestAnimationFrame(n))}function dp(e){var t=ar,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ar=t}function U_(e){var t=ar;e.__c=e.__(),ar=t}function bV(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}var CV=Symbol.for("preact-signals");function $_(){if(qa>1)qa--;else{for(var e,t=!1;Ol!==void 0;){var n=Ol;for(Ol=void 0,j_++;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(j_=0,qa--,t)throw e}}var Et=void 0,Ol=void 0,qa=0,j_=0,fp=0;function GT(e){if(Et!==void 0){var t=e.n;if(t===void 0||t.t!==Et)return t={i:0,S:e,p:Et.s,n:void 0,t:Et,e:void 0,x:void 0,r:t},Et.s!==void 0&&(Et.s.n=t),Et.s=t,e.n=t,32&Et.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=Et.s,t.n=void 0,Et.s.n=t,Et.s=t),t}}function fn(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}fn.prototype.brand=CV;fn.prototype.h=function(){return!0};fn.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)};fn.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)}};fn.prototype.subscribe=function(e){var t=this;return Dn(function(){var n=t.value,r=Et;Et=void 0;try{e(n)}finally{Et=r}})};fn.prototype.valueOf=function(){return this.value};fn.prototype.toString=function(){return this.value+""};fn.prototype.toJSON=function(){return this.value};fn.prototype.peek=function(){var e=Et;Et=void 0;try{return this.value}finally{Et=e}};Object.defineProperty(fn.prototype,"value",{get:function(){var e=GT(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(j_>100)throw new Error("Cycle detected");this.v=e,this.i++,fp++,qa++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{$_()}}}});function Ir(e){return new fn(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 qT(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 YT(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 Ya(e){fn.call(this,void 0),this.x=e,this.s=void 0,this.g=fp-1,this.f=4}(Ya.prototype=new fn).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===fp))return!0;if(this.g=fp,this.f|=1,this.i>0&&!zT(this))return this.f&=-2,!0;var e=Et;try{qT(this),Et=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 Et=e,YT(this),this.f&=-2,!0};Ya.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)}fn.prototype.S.call(this,e)};Ya.prototype.U=function(e){if(this.t!==void 0&&(fn.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)}};Ya.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(Ya.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=GT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function W_(e){return new Ya(e)}function KT(e){var t=e.u;if(e.u=void 0,typeof t=="function"){qa++;var n=Et;Et=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,G_(e),r}finally{Et=n,$_()}}}function G_(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,KT(e)}function SV(e){if(Et!==this)throw new Error("Out-of-order effect");YT(this),Et=e,this.f&=-2,8&this.f&&G_(this),$_()}function Ml(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ml.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()}};Ml.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,KT(this),qT(this),qa++;var e=Et;return Et=this,SV.bind(this,e)};Ml.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ol,Ol=this)};Ml.prototype.d=function(){this.f|=8,1&this.f||G_(this)};function Dn(e){var t=new Ml(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var q_,z_;function Ka(e,t){it[e]=t.bind(null,it[e]||function(){})}function pp(e){z_&&z_(),z_=e&&e.S()}function ZT(e){var t=this,n=e.data,r=IV(n);r.value=n;var i=H_(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(),A_(l)||((o=t.base)==null?void 0:o.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},W_(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}ZT.displayName="_st";Object.defineProperties(fn.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ZT},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Ka("__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 fn&&(n||(t.__np=n={}),n[i]=s,r[i]=s.peek())}}e(t)});Ka("__r",function(e,t){pp();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}())),q_=r,pp(n),e(t)});Ka("__e",function(e,t,n,r){pp(),q_=void 0,e(t,n,r)});Ka("diffed",function(e,t){pp(),q_=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=DV(n,l,h,i),s[l]=c):c.o(h,i)}}}e(t)});function DV(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,s=Ir(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))})}}Ka("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)});Ka("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});gi.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 IV(e){return H_(function(){return Ir(e)},[])}var hp=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}},mp=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}},Y_=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}},vi=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 hp(t))??[],this.link=e.link,this.price=new mp(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=Ir(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=Ir(void 0)),this.sellingPlans=e.sellingPlans?.map(t=>{let n=new Y_(t);return n.isSelected&&(this.selectedSellingPlan.value=n),n})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}},Yn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=Ir(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=Ir(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 vi(t))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new gn({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})}},gp=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}},K_=class{enabled;constructor(e){this.enabled=e.enabled}},Z_=class extends K_{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},yp=class{productQuantity;constructor(e){e??={},this.productQuantity=new Z_(e.productQuantity)}},xs=class{s;g;i;constructor(e){e.s&&(this.s=new At(e.s)),e.g&&(this.g=new Pl(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},kl="a-f\\d",TV=`#?[${kl}]{3}[${kl}]?`,xV=`#?[${kl}]{6}([${kl}]{2})?`,RV=new RegExp(`[^#${kl}]`,"gi"),NV=new RegExp(`^${TV}$|^${xV}$`,"i");function X_(e,t={}){if(typeof e!="string"||RV.test(e)||!NV.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 At=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 X_(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}},Yi=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new At(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return vp[this.s??1]}},vp=(e=>(e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e))(vp||{}),Pl=class gT{static DEFAULT_FALLBACK=new At({h:"#000000",a:50});r;c;fb;constructor(t){this.r=t.r,t.c&&(this.c=new At(t.c)),t.fb&&(this.fb=new At(t.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??gT.DEFAULT_FALLBACK}},Ll=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 At(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}},Ki=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`}},Rs=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}},cr=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new xs(e.bg)),e.br&&(this.br=new Yi(e.br)),e.shd&&(this.shd=new Ll(e.shd)),e.spc&&(this.spc=new Ki(e.spc)),this.trf=new Rs(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 kt[this.t]}get click(){return this.clc}},kt=(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))(kt||{}),Ns=class extends cr{constructor(e){super(e)}},Zi=class extends cr{src;constructor(e){super(e),this.src=e.src}},Za=(e=>(e[e.START=0]="START",e[e.CENTER=1]="CENTER",e[e.END=2]="END",e[e.JUSTIFY=3]="JUSTIFY",e))(Za||{}),_p=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 J_(t))}},J_=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')`}},pn=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return Za[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 At(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new At(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new _p(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}},_i=class extends cr{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 pn(t)}get color(){return this.typography.tc}get typography(){return this.typo}},So=class extends _i{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}},Ep=class extends cr{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},Xa=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}},Ja=class extends _i{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new Xa(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},wp=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new At(e.c??{})}get text(){return this.txt}get color(){return this.c}},Do=class extends _i{ph;constructor(e){super(e),this.ph=new wp(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},Qa=class extends Do{constructor(e){e??={},super(e)}},ec=class extends Do{},tc=class extends Do{},nc=class extends Zi{},bp=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[]}}},Fl=class extends cr{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 bp(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new Ki({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}`}},Cp=class extends Fl{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new Ep(e.cont),this.mob=new Fl(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(t=>{t.t===1?this.elems.push(new Zi(t)):t.t===2?this.elems.push(new So(t)):t.t===3?this.elems.push(new So(t)):t.t===100?this.elems.push(new Ns(t)):t.t===51?this.elems.push(new ec(t)):t.t===52?this.elems.push(new tc(t)):t.t===61?this.elems.push(new Ja(t)):t.t===15||t.t===16?this.elems.push(new Qa(t)):t.t===13&&this.elems.push(new nc(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}},rc=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}},Sp=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}},Dp=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}},Ip=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new Ki(e.spc),e.size&&(this.size=new Dp(e.size)),e.bg&&(this.bg=new xs(e.bg)),e.br&&(this.br=new Yi(e.br)),e.typo&&(this.typo=new pn(e.typo)),e.lout&&(this.lout=new Sp(e.lout)),e.flex&&(this.flex=new rc(e.flex))}},ic=class{sm;lg;constructor(e){e??={},this.sm=new Ip(e.sm),this.lg=new Ip(e.lg)}},En=class{t;style;hide;when;clc;constructor(e,t){t??={},this.t=e,this.style=new ic(t.style),this.hide=t.hide,t.when?.op&&(this.when=t.when),t.clc&&(this.clc=t.clc)}get stringType(){return kt[this.t]}},wn=class extends En{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}},As=class extends wn{constructor(e,t){super(e,t??3)}},oc=class extends En{value;constructor(e){super(6,e),e??={},this.value=e.value}},sc=class extends wn{constructor(e=15,t){super(t,e)}},Tp=class extends En{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new At(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}},XT=Re(ds()),Q_=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new At(e.color)}},eE=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new At(e.color)}},Bl=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new eE(e.navigation),this.pagination=new Q_(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},xp=class extends En{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=lr.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Bl(e.conf),this.allowedTypes=e.allowedTypes}},Rp=class extends wn{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new Xa(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Io=class extends En{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(t=>{let n=lr.getParsedElement(t);n&&this.elems.push(n)})}},Os=class extends En{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}},lr=class mT{static getParsedElements(t){let n=[];return t?.forEach(r=>{let i=mT.getParsedElement(r);i&&n.push(i)}),n}static getParsedElement(t){switch(t.t){case 2:return new wn(t);case 3:return new As(t);case 6:return new oc(t);case 11:return new Np(t);case 12:return new To(t);case 61:return new Rp(t);case 4:return new Io(t);case 1:return new Os(t);case 13:return new Os(t,13);case 14:return new wn(t,14);case 15:case 16:return new sc(t.t,t);case 18:return new As(t,18);case 62:return new xp(t);case 19:return new Tp(t);default:XT.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"}}},To=class extends En{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=lr.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new oc(e.cBox)),this.elems.push(new Os(e.img,13));let t=new wn(e.title,14);t.hide=!e.show?.title,t.text="{{ product.name }}",this.elems.push(t);let n=new wn(e.price);n.text="{{ product.price }}",n.hide=!e.show?.price;let r=new wn(e.compareAt);r.text="{{ product.compare_price }}",r.hide=!e.show?.price,e.compareAt||(r.style=new ic(n.style),r.style.lg.typo=new pn(te(w({},r.style.lg.typo),{td:"line-through"})),r.style.sm.typo=new pn(te(w({},r.style.sm.typo),{td:"line-through"})));let i=new Io({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:lr.parseAlignmentToJustifyContent(n.style.lg.typo?.ta)}}}});i.elems.push(r),i.elems.push(n),this.elems.push(i);let s=new sc(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let o=new As(e.btn,18);o.hide=!e.show?.btn,this.elems.push(o)}}e.symbol&&(this.symbol=new wn(e.symbol))}},Np=class extends En{conf;prod;constructor(e){super(11,e),e??={},this.conf=new tE(e.conf),this.prod=new To(e.prod)}},Ap=class extends Bl{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},tE=class{lg;sm;constructor(e){e??={},this.lg=new Ap(e.lg),this.sm=new Ap(e.sm)}},Op=class extends Io{constructor(e){super(e)}},ac=class{cont;elems=[];constructor(e){e=e??{},this.cont=new Op(e.cont),e.elems?.forEach(t=>{this.addRawElement(t)})}addRawElement(e){let t=lr.getParsedElement(e);return t&&this.elems.push(t),t}},JT=Re(qn()),nE=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 gn(t))}},Mp=class{layout;milestones;onlyLatestGift;noConfetti;constructor(e){this.layout=e.layout??JT.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(t=>new nE(t))??[],this.onlyLatestGift=e.onlyLatestGift,this.noConfetti=e.noConfetti}},Pp=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}},kp=class{experiments;constructor(e){this.experiments=e.experiments?.map(t=>new rE(t))}},rE=class{cssSelector;type;display;bg;typo;br;text;constructor(e={}){this.cssSelector=e.cssSelector??"",this.type=e.type??"OTHER",this.display=e.display,e.bg&&(this.bg=new At(e.bg)),e.typo&&(this.typo=new pn(e.typo)),e.br&&(this.br=new Yi(e.br)),this.text=e.text}get style(){let e={};return this.display==="HIDE"?e.display="none":this.display==="BLOCK"?e.display="block":this.display==="INLINE"&&(e.display="inline"),this.br?.r&&(e.borderRadius=this.br.r+"px"),this.br?.w&&(e.borderWidth=this.br.w+"px"),this.br?.s&&(e.borderStyle=vp[this.br.s]?.toLowerCase()),this.br?.c?.h&&(e.borderColor=this.br.color?.rgba),this.bg?.h&&(e.backgroundColor=this.bg.rgba),this.type==="TEXT"&&this.typo&&(this.typo.fs&&(e.fontSize=this.typo.fs+"px"),this.typo.lh&&(e.lineHeight=this.typo.lh),this.typo.fw&&(e.fontWeight=this.typo.fw),this.typo.ta&&(e.textAlign=this.typo.alignment),this.typo.tc.h&&(e.color=this.typo.tc.rgba),this.typo.ls&&(e.letterSpacing=this.typo.letterSpacing),this.typo.td&&(e.textDecoration=this.typo.td??"none")),e}},iE=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===In.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===In.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===In.EngagementContentType.SINGLE}},Hn=class kD extends iE{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;experimentConfig;discountData=Ir({});constructor(t){super(t),this.id=t.id,this.nudgeID=t.nudgeID,this.currency=Me.get().currencyCode??"USD",this.contentID=t.contentID,this.variation=t.variation,t.widget&&(this.widget=new ac(t.widget)),this.previewType=t.previewType,this.occurred=t.occurred??new Date,this.props=t.props,this.embeddedItems=t.embeddedItems?.map(n=>new gn(n)),this.items=t.items?.map(n=>new Yn(n))??[],this.nonMutableItems=t.items?.map(n=>new Yn(n))??[],this.collections=t.collections?.map(n=>new gp(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 yp(t.manipulation),this.contentSource=t.contentSource,this.klaviyoFormID=t.klaviyoFormID,this.hasMultiplePlacement=t.hasMultiplePlacement,this.skipSubscribedItems=t.skipSubscribedItems,t.experimentConfig&&(this.experimentConfig=new kp(t.experimentConfig)),t.progressBarConfig&&(this.progressBarConfig=new Mp(t.progressBarConfig)),t.bundleConfig&&(this.bundleConfig=new Pp(t.bundleConfig)),t.bundleFrom&&(this.bundleFrom=new Yn(t.bundleFrom)),t.content?.videoConfig&&(this.content={videoConfig:new Wf(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===In.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===In.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===In.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===In.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===In.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===In.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===In.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isCollectionPromoted(){return this.isProductPromotion()&&this.collections.length>0&&this.promotionType===In.PromotionType.COLLECTION}isBYOB(){return this.objective===In.EngagementObjective.BYOB}isShoppableVideo(){return this.objective===In.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:ce.formatCurrency(l.price.d),comparePrice:ce.formatCurrency(l.price.cmp),quantity:r.quantity},s={quantity:l.quantity}}let o={productCount:Ge.getCurrent().item_count},a=_n.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 Cp(JSON.parse(a))}calculateDiscountData(t,n){let r=Lp.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.price.d),i=Lp.ArrayUtils.sum(t,o=>{let a=o.selectedOrFirstVariant.value.price;return a.cmp??a.d}),s={actualPrice:r,totalComparePrice:i,discountAmount:0,discountPercentage:0,discountedPrice:r};if(!t?.length||!n||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(s);return}if(xo.DiscountType.BXGY===this.discount.type&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],this.updateEffectivePrice(t,s.discountPercentage,!0),s.discountAmount=s.actualPrice-Lp.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.effectivePrice.value);else if([xo.DiscountType.UNIQUE_FLAT_ITEMS,xo.DiscountType.STATIC].includes(this.discount.type)&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],s.discountAmount=s.actualPrice*s.discountPercentage/100,this.updateEffectivePrice(t,s.discountPercentage);else if(this.discount.type===xo.DiscountType.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)s.discountAmount=s.actualPrice-this.discount.values[0],s.discountPercentage=s.discountAmount/s.actualPrice*100,this.updateEffectivePrice(t,s.discountPercentage);else if(this.discount.type===xo.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){t.sort((a,l)=>l.selectedOrFirstVariant.value.price.d-a.selectedOrFirstVariant.value.price.d);let o=t[t.length-1];o.selectedOrFirstVariant.value.effectivePrice.value=0,s.discountAmount=o.selectedOrFirstVariant.value.price.d,s.discountPercentage=s.discountAmount/s.actualPrice*100}s.discountedPrice=s.actualPrice-s.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(s)}getPrivateAttributesForLineItem(){return vt.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return vt.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[xo.DiscountType.UNIQUE_FIXED_ITEMS,xo.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=>kD.SWIPER_ELEMENTS.has(r.t));if(!t)return!1;if(t.t===62)return!0;let n=sr.get().isMobile()?"sm":"lg";return t.conf[n].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let t=Ge.getCurrent();return{productCount:t.item_count,amount:ce.formatCurrency(t.total_price/100),originalAmount:ce.formatCurrency(t.original_total_price/100)}}updateEffectivePrice(t,n,r=!1){let i=Me.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:ce.formatNumber(t.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice","totalComparePrice"].map(r=>{n[r]=ce.formatCurrency(t[r])}),n}},Yl=Re(qn()),rx=Re(T_()),ix=Re(Ta()),cc=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 C.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))}},ox=Re(ds()),QT=Re(aE()),Ms=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return Dt.isShopify()}},OV=(0,QT.default)(fetch),MV={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 OD{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new OD),this.INSTANCE}async validateSession(t){return this.post("/v1/event/validate-session",t)}updateUserData(t){this.put("/v1/user/update",t).then(async n=>{C.log("Updated user profile"),await Ps.getInstance().storeAndPopulateAuthData(n)}).catch(n=>{C.error("Error saving user profile",n)})}trackOrder(t){this.post("/v1/event/track-order",t).then(()=>{C.log("Sent Order")}).catch(n=>{C.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(()=>{C.log("Updated device property")}).catch(async n=>{C.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(!Ms.isECommerceApp()&&!Ms.getFlags().allowEvents)return C.log(`Rejecting ${t} ${n} as this is not e-commerce app`),Promise.reject();n.startsWith("http")||(n=mn.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 _t.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({},MV),n),i=await OV(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),mn.debug&&t.set("cooee-sdk-debug",String(1)),t}},lc=class{static sentryService=_t.getInstance();static httpApiService=Mn.getInstance();static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let i=(await Ge.getCurrent().getNormalisedCart()).items.map(s=>s.mID);e.items=e.items.filter(s=>!i.includes(s.mID))}if(vt.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 We(k.EVENT_CAMPAIGN_FAILED,{reason:i,currency:e.currency},e);throw Ve.getInstance().sendEvent(s),new Error(i)}if(e.isCartRecovery()){let i=Ge.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 Yn(o);c.name=l.title;let h=new vi(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 C.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 C.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}},uc=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}},mt=class extends gi{stylesConverter=new uc(1);renderer=sr.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new Ro(this.props.triggerContext,this.props.element)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(te(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 C.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,t){e.stopPropagation(),await this.clickExecutor.execute(t)}},PV=0,pne=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:--PV,__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 it.vnode&&it.vnode(c),c}var ur=class extends mt{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=_n.render(JSON.stringify(this.props.element),t),r=new wn(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 pn;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"}}},ks=class extends ur{render(){return G("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:e=>this.onClick(e,{item:this.props.item}),children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return te(w({},super.getComponentStyles()),{cursor:"pointer"})}},cE=class extends gi{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}},Vl=class extends ur{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(cE,{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))})}},Ul=class extends mt{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 pn;return e.textAlign=t.alignment,e.justifyContent=t.alignment,e}getComponentStyles(){return te(w({},this.getTypoStyles()),{display:"flex"})}},ex=Re(qn()),Xi=class extends mt{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(e){this.props.element.clc?.at===ex.ClickActionType.ADD_TO_CART&&this.props.triggerContext.triggerData.items[0]&&this.onClick(e,{item:this.props.triggerContext.triggerData.items[0]}),this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let t={zIndex:e.zIndex,cursor:this.props.element.clc?.at?"pointer":"auto"};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}},Ji=class extends mt{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(No,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new rc,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}},Hl=class extends Ji{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(dc,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}},jl=class extends mt{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 pn;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}},tx=Re(Pf()),$l=class extends mt{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),_n.escape=tx.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=_n.render(e,{svg:n}),t=_n.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"}}},Wl=class extends mt{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 pn;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)}},dc=class extends mt{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(Hl,{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(Ul,{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(Xi,{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(Wl,{element:t,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?G(jl,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?G($l,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?G(ks,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):G(No,{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(ur,{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"}))}},nx=Re(Qf()),Ls=class extends mt{productElement;constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),t=_n.render(e,this.getProductData());if(this.productElement=new To(JSON.parse(t)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return G("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:G(dc,{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=ce.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=ce.formatCurrency(e.effectivePrice.value));let m=this.props.triggerContext.triggerData.discount.type===nx.DiscountType.BXGY;if(!g&&m&&(f.effective_price=ce.formatCurrency(e.effectivePrice.value),f.price=""),h){f.compare_price=ce.formatCurrency(t.cmp);let x=t.cmp-t.d;f.discount_percent=(x/t.cmp*100).toFixed(0),f.discount_price=ce.formatCurrency(x)}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 Fp(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)=>`
|
|
44
|
-
<span class="${i}"
|
|
45
|
-
style="background-color: ${t.pagination.color?.rgba};"></span>
|
|
46
|
-
`,renderProgressbar:r=>`
|
|
47
|
-
|
|
48
|
-
style="background-color: ${t.pagination.color?.rgba};">
|
|
49
|
-
</span>
|
|
50
|
-
`},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 Bp(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 Gl=class extends mt{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&&Nt.loadSwiperScript().then(()=>{this.swiperInstance=Fp(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:te(w({},this.getCompiledStyles()),{display:"block"}),class:"lc-product-swiper-list",children:Bp(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(yi,{children:[G(Ls,{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(ur,{element:this.props.element.prod.symbol,triggerContext:this.props.triggerContext})})]},e.mID)}},zl=class extends mt{swiperRef=null;swiperInstance=null;constructor(e,t){super(e,t)}componentDidMount(){Nt.loadSwiperScript().then(()=>{this.swiperInstance=Fp(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:i=>this.onClick(i,{clickAction:this.getClickAction(r)}),children:this.renderElement(r)}));return Bp(e.conf,t,n)}getComponentStyles(){return{}}renderElement(e){let t=this.valueAddedSlide(this.props.element.slide,e);switch(t?.t){case 1:return G(Xi,{element:t,triggerContext:this.props.triggerContext});case 4:return G(Ji,{elements:t.elems,element:t,triggerContext:this.props.triggerContext});default:C.warn("Unknown slide type for carousal")}}valueAddedSlide(e,t){let n=JSON.stringify(e),r=_n.render(n,{form:t});return lr.getParsedElement(JSON.parse(r))}getClickAction(e){let t=w({},this.props.element.clc),n=JSON.stringify(t),r=_n.render(n,{form:e});return JSON.parse(r)}},No=class extends mt{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(Ji,{element:t,triggerContext:this.props.triggerContext,elements:t.elems})}if(e.t===61)return G(Vl,{element:e,triggerContext:this.props.triggerContext});if(e.t===3)return this.state.showButton?G(ks,{element:e,triggerContext:this.props.triggerContext}):void 0;if(e.t===2)return G(ur,{element:e,triggerContext:this.props.triggerContext});if(e.t===1)return G(Xi,{element:e,triggerContext:this.props.triggerContext});if(e.t===11)return G(Gl,{element:e,triggerContext:this.props.triggerContext});if(e.t===12)return G(Ls,{element:e,item:this.props.triggerContext.triggerData.items[0],triggerContext:this.props.triggerContext});if(e.t===62)return G(zl,{element:e,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}},ql=class extends mt{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(yi,{children:[G("div",{style:this.getCompiledStyles(),class:"lc-container",onClick:e=>{this.onClick(e,{clickAction:this.clickAction})},children:G(No,{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,t){if(this.isClickable)return super.onClick(e,t)}},Kn=class Ia{constructor(t){this.engagementTrigger=t,this.triggerContext=new cc(new Date,this.engagementTrigger)}static renderedEngagements=[];static engagementIDsWithTrackedDisplay=new Set;static DEBOUNCE_TIME=1e3;rootContainer;widgetElement;widget;triggerContext;observers=[];runtimeData=Me.get();widgetAPIService=Te.get(Gr);safeHTTPService=Te.get(Ve);scrollSubscription;variation;isExclusionWithBVariation;renderSilently(){this.render().catch(t=>_t.getInstance().captureException(t,w({},this.engagementTrigger.sentryContext())))}destroy(){C.log(`${this.engagementTrigger} will be destroyed`),this.scrollSubscription?.unsubscribe(),this.observers.forEach(t=>{t?.disconnect&&t.disconnect()}),this.rootContainer?.remove(),Ia.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){C.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){ox.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){C.log(`${this.engagementTrigger} already has required data to render widget`);return}let t=await this.observeWidgetContainerInViewport();this.handleVariationResponse(t)}handleVariationResponse(t){t&&(C.log(`${this.engagementTrigger} visitor has been assigned to variation ${t.variation}`),t.items?.length&&(this.engagementTrigger.items=t.items.map(n=>new Yn(n)),this.engagementTrigger.nonMutableItems=t.items.map(n=>new Yn(n))),t.bundleFrom&&(this.engagementTrigger.bundleFrom=new Yn(t.bundleFrom)),t.discount&&(this.engagementTrigger.discount=t.discount),t.placement&&(this.triggerContext.triggerData.placement=t.placement),t.props&&ix.JSUtils.hasKeys(t.props)&&(this.engagementTrigger.props=w(w({},this.engagementTrigger.props),t.props)),this.triggerContext.triggerData.widget=this.widget=new ac(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.triggerContext.triggerData.content=t.content,this.isExclusionWithBVariation=this.engagementTrigger.isExclusionTesting()&&this.variation==="b",this.isExclusionWithBVariation&&(this.rootContainer.style.height="0.5px"))}addToRendered(){Ia.renderedEngagements.push(this)}async getVariation(){C.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){C.error(`${this.engagementTrigger} unable to get the variation`,n);return}}async observeWidgetContainerInViewport(){if(!this.rootContainer){C.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){C.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=Di(window,"scroll").pipe(Ar(Ia.DEBOUNCE_TIME)).subscribe(()=>{this.checkAndSendEvent()})}async checkAndSendEvent(){let t=this.engagementTrigger.shortID;if(Ia.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 We(r,n,this.engagementTrigger);i.name===k.EVENT_CAMPAIGN_HOLDOUT&&(i.trigger.holdout=!0),this.safeHTTPService.sendEvent(i),Ia.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 C.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),c=vt.get().website.commonCSS;i=(await ce.retrySelector(l[0].trim()))?.shadowRoot,r=l[1].trim(),i&&(Nt.injectRawCSS(c,i),Nt.injectStylesheet(mn.styleURL,i))}C.debug(`${this.engagementTrigger} attempt to render ${n.position}-${r}`);let s=await ce.retrySelector(r,10,i??document);if(!s)return C.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 Yl.EngagementPlacementPosition.BEFORE:{s.parentElement?.insertBefore(a,s);break}case Yl.EngagementPlacementPosition.INSIDE_FIRST:{s.insertBefore(a,s.firstChild);break}case Yl.EngagementPlacementPosition.INSIDE_LAST:{s.appendChild(a);break}case Yl.EngagementPlacementPosition.AFTER:default:s.parentElement?.insertBefore(a,s.nextSibling)}return a}async startRendering(){let t;try{t=await lc.refreshItems(this.engagementTrigger)}catch(n){C.error(`${this.engagementTrigger} error refreshing the items`,n);return}if(!this.engagementTrigger.isCollectionPromoted()&&!t?.length&&this.engagementTrigger.isProductPromoted()){C.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=vt.get().website.commonCSS;Nt.injectRawCSS(r,n),Nt.injectStylesheet(mn.styleURL,n),Nt.injectSwiperCSS(n),t=n}PT(k_(ql,{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)rx.ArrayUtils.remove(n,s)}getItemDiff(t,n){return t.filter(r=>!n.some(i=>i.selectedOrFirstVariant.value.mID===r.selectedOrFirstVariant.value.mID))}},Ei=class RD extends Kn{static renderedEngagements=[];constructor(t){super(t)}addToRendered(){RD.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(!Gt.get().isOpen()&&this.runtimeData.pageName!=="cart"){C.log("Do not send display event as neither the cart drawer nor the cart page is open.");return}return super.checkAndSendEvent()}},Up=class PD{constructor(t,n){this.engagementTrigger=t,this.element=n,this.cartItems=Ge.getCurrent().items}cartItems;static renderCartUpsell(t){let n=t.placement;if(!n?.selector){C.warn(`No placement available for ${t.objective}`,t.shortID);return}let r=Array.from(document.querySelectorAll(n.selector));if(!r?.length){C.warn(`No placement found for ${t.objective}`,t.shortID);return}for(let i of r)new PD(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 vi(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 Yn(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 Hn(this.engagementTrigger);l.placement.selector=`.${a}`,l.items=[o];let c=new Ei(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&&(C.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))})}},ax=Re(qn()),Qi=Re(qn()),kV=`
|
|
51
|
-
mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
|
|
52
|
-
cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {
|
|
53
|
-
cart {
|
|
54
|
-
id
|
|
55
|
-
}
|
|
56
|
-
userErrors {
|
|
57
|
-
field
|
|
58
|
-
message
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`,Ao=class{static navigate(e,t,n){let r=`${location.origin}/discount/${e}`;switch(C.log(`Applying discount code ${e}`,t,n),t){case Qi.RedirectBehaviour.CART_PAGE:location.href=`${r}?redirect=/cart`;break;case Qi.RedirectBehaviour.CART_DRAWER:location.href=`${r}?redirect=${location.pathname}#${k.HASH_OPEN_CART_DRAWER}=1`;break;case Qi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href=`${r}?redirect=/checkout`;break;case Qi.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=Gt.get();switch(e){case Qi.RedirectBehaviour.CART_PAGE:location.href="/cart";break;case Qi.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href="/checkout";break;case Qi.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;case Qi.RedirectBehaviour.CART_DRAWER:{n.open();break}}t&&n.refreshUI(t)}static async applyWithStorefront(e){let t=vt.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:kV,variables:{cartId:`gid://shopify/Cart/${Ge.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}},sx=Re(Ta()),LV=`
|
|
63
|
-
mutation cartCreate($input: CartInput) {
|
|
64
|
-
cartCreate(input: $input) {
|
|
65
|
-
cart {
|
|
66
|
-
id
|
|
67
|
-
checkoutUrl
|
|
68
|
-
}
|
|
69
|
-
userErrors {
|
|
70
|
-
field
|
|
71
|
-
message
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
`,Oo=class{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=Dt.getCartURL("cart/add.js"),i={items:n},s=Gt.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 C.log(`Added ${e.length} items to Cart`),ce.showSnackbar("Product added to your cart"),a.json()}catch(a){C.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!sx.JSUtils.hasKeys(t)){C.warn("No update fields provided");return}let n=Dt.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)&&(C.log(`Updated ${e}`),Ge.getCurrent().update(s.json()))}catch(s){C.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),C.log(`Code-${e} copied`),ce.showSnackbar("Discount code copied")}catch(t){C.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=Dt.getProductSlug(e.link);t&&(location.pathname=Dt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){C.warn("Trying to upgrade to subscription with no item");return}let n=await Ge.getCurrent().getNormalisedCart(),r=e.selectedOrFirstVariant.value,i=n.items.findIndex(c=>c.vID===r.mID),s=r.selectedSellingPlan.value,o=Dt.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){C.log(`Upgraded ${e} selling plan`),ce.showSnackbar("Line item updated");let h=await c.json();return Ge.getCurrent().update(h),h}}catch(c){C.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,n){let r=vt.get().storefrontToken;if(!r)throw new Error("Storefront token not set for the store");if(!e?.vID){C.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 ce.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",r);let l=JSON.stringify({query:LV,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.clickAction,n=e.items,r=e.triggerData;if(t.at){let i=t;if(C.log(`Performing ${JSON.stringify(i)} action`),i.at===101)n?.length&&this.performGoToItem(n[0]);else if(i.at===102)n?.length&&await this.performAddToCart(n,r);else if(i.at===103)await this.performCopyCoupon(r.discount.code);else if(i.at===105)Gt.get().open();else if(i.at===104){let s=e.collections;if(!s?.length)return;location.pathname=Dt.getRootPrefix()+"collections/"+s[0].handle}}t.applyDiscount&&r.discount?.code&&Ao.navigate(r.discount.code,r.redirectBehaviour)}getVIDAndQuantity(e){let t,n;if(e instanceof gn)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}}},Hp=class extends Ei{ctaListener=new Oo;constructor(e){super(e),mi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Ii(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=Ge.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await Ge.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let n of t){if(e.amount<n.minValue)break;if(C.log("Current milestone",n),n.rewardType===ax.MilestoneRewardType.FREE_AUTO_GIFT){let r=n.items[0],i=e.items.find(s=>s.vID===r.vID||s.mID===r.mID);if(i)C.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);Gt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await Ge.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})}},jp=class extends Kn{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()}},cx=Re(Ta()),$p=class extends Kn{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(!cx.JSUtils.hasKeys(r)){C.error(`No detail received for ${n}`);return}C.log("Detail received for BYOB",r);let i=r.campaignID??r.campaignId??r.campaign_id;if(i!==t.shortID&&i!==t.engagementID){C.warn(`Current ${n} is not BYOB. Received: ${i}`);return}let s=r.items;if(!s?.length)return;let o=s.map(a=>new gn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new Ro(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},fc=class{runtimeData=Me.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Ei.renderedEngagements];Ei.renderedEngagements.length=0;for(let n of e)C.log(`\u{1F4E3} ${n} received as cart embed`),!this.findAndUpdateCurrent(n,t)&&(C.log(`${n} is new`),n.isProgressBar()?new Hp(n).renderSilently():n.isSubscriptionUpsell()?Up.renderCartUpsell(n):new Ei(n).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Kn.renderedEngagements];Kn.renderedEngagements.length=0;for(let n of e)C.log(`\u{1F4E3} ${n} received as page embed`),!this.findAndUpdateCurrent(n,t)&&(C.log(`${n} is new`),n.isShoppableVideo()?new jp(n).renderSilently():n.isBYOB()?new $p(n).renderSilently():new Kn(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()}},pc=class{runtimeData=Me.get();httpService=Te.get(Mn);sessionManager=Te.get(zt);constructor(){}async getWidgetProps(){let e={};e.engagementIDs=this.addAvailableEngagementShortIDs(),e.locale=this.runtimeData.locale,await this.addSessionContext(e),e.currentItem=this.runtimeData.getCurrentItem();try{e.cart=await Ge.getCurrent().getNormalisedCart()}catch(i){C.error("Error fetching Shopify cart before sending widget call",i)}let t=new URLSearchParams(location.search),n=t.get("cooee-preview");n?e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)):this.runtimeData.previewIDs?.length&&(e.previewIDs=this.runtimeData.previewIDs);let r=t.get("cooee-variant");return r?e.previewVariant=r:this.runtimeData.previewVariant&&(e.previewVariant=this.runtimeData.previewVariant),e}async addSessionContext(e){let t=await this.sessionManager.checkSessionAndGetContext();e.sessionID=t[0],e.sessionNumber=t[1],e.landingPage=t[2],e.page=hi.parseFromCurrent()}addAvailableEngagementShortIDs(){let e=document.querySelectorAll(".letscooee-engagement"),t=[];return e.forEach(n=>{let r=n.dataset.engagementId;r&&+r&&t.push(r)}),t}},Gr=class AD extends pc{static INSTANCE;loadWidgetsSubject=new J;constructor(){super(),this.loadWidgetsSubject.pipe(Ar(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>C.error("Unable to initiate page widgets",t))}),mi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new AD),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){zt.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>C.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){zt.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){zt.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();C.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async n=>{let r=n.widgets.map(i=>new Hn(i));new fc().processPageWidgetResponse(r)}).catch(n=>{C.error("Error sending widget getter",n)})}async loadCartWidgets(){let t=await this.getWidgetProps();C.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async n=>{let r=n.widgets.map(i=>new Hn(i));new fc().processCartWidgetResponse(r)}).catch(n=>{C.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 fc().processCartWidgetResponse(this.runtimeData.cartEngagements)}},Wp=class{eventAPIService;constructor(){this.eventAPIService=Te.get(Mo)}processResponse(e){for(let t of e)t.experimentConfig&&(this.runExperiment(t),this.trackExperimentRan(t));document.querySelector("#lc-hide-body")?.remove()}async runExperiment(e){let t=e.experimentConfig?.experiments;if(!t?.length){C.log("Nothing to experiment",e.toString());return}for(let n of t)this.executeSingleExperiment(e,n).catch(r=>C.error("Fail to execute experiment",r))}async executeSingleExperiment(e,t){if(!t.cssSelector){C.debug("No CSS Selector available",e.toString());return}let n=await ce.retrySelectors(t.cssSelector);for(let r of n)Object.assign(r.style,t.style),t.type==="TEXT"&&t.text&&(r.innerHTML=t.text)}trackExperimentRan(e){this.eventAPIService.trackExperiment({name:k.EVENT_EXPERIMENT_START,experiment:new bo(e)}).catch(t=>{C.error("Fail to track experiment",t)})}},Mo=class LD extends pc{static INSTANCE;constructor(){super()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new LD),this.INSTANCE}loadExperimentSilently(){rt.get(ge.SDK_TOKEN).then(t=>{t?this.loadExperiments().catch(n=>C.error("Unable to initiate experiment",n)):zt.replaySubject.subscribe(async()=>{this.loadExperiments().catch(n=>C.error("Unable to initiate experiment",n))})})}async loadExperiments(){if(!this.runtimeData.activeExperiment)return;let t=await this.getWidgetProps();C.log("Load experiments",t),this.httpService.post("/v1/engagement/experiments",t).then(async n=>{let r=n.experiments.map(i=>new Hn(i));new Wp().processResponse(r)}).catch(n=>{C.error("Error sending experiment getter",n)})}async trackExperiment(t){await this.addSessionContext(t),await this.httpService.post("/v1/event/experiment",t)}},Gp=class{runtimeData=Me.get();widgetAPIService=Te.get(Gr);experimentAPIService=Te.get(Mo);meddle(){let e=gt.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=gt.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.loadExperiments=()=>{this.experimentAPIService.loadExperimentSilently()},e.previewWidget=gt.previewWidget.bind(gt),e.previewPopup=gt.previewPopup.bind(gt)}overwritePush(e,t){Fa(e,"push",t)}meddleAccount(){this.overwritePush(gt.globalRef.account,(...e)=>{this.processAccount(e[0])}),gt.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(gt.globalRef.events,(...e)=>{this.processEvent(e[0])}),gt.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(gt.globalRef.profile,(...e)=>{this.processProfile(e[0])}),gt.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(gt.globalRef.screen,(...e)=>{this.processPageName(e[0])}),gt.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&>.authenticate(e),e.flags&&Ms.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?gt.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):gt.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&>.updateProfile(e)}processPageName(e){e&>.setPageName(e)}meddlePage(){this.overwritePush(gt.globalRef.page,(...e)=>{this.processPage(e[0])}),gt.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&>.setPageName(e.pageName),e.activeExperiment&&(this.runtimeData.activeExperiment=e.activeExperiment)}},hc=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))}},mc=class su{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=Te.get(Ve);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new su),this.INSTANCE}resetScrollID(t){hc.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)}ce.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Di(window,"scroll").pipe(Ar(su.DEBOUNCE_TIME),pr(()=>{let t=this.getPercentScrolledY();if(t>100){C.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)>=su.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=hc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new We(k.EVENT_SCROLL,n,null,r);this.safeHttpService.sendEvent(i),hc.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)}},zp=class MD{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=Te.get(Ve);runtimeData=Me.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){C.info("Not sending background event as user was inactive on website");return}C.info(`Sending background event with ${t} seconds`);let n={};n[MD.ACTIVE_DURATION]=t,this.apiService.sendEvent(new We(k.EVENT_APP_BACKGROUND,n))}},qp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof _i&&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)})}},Yp=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),C.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},Kp=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ve.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&await this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:await this.collectFormData();break;case void 0:case 105:break;default:C.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;ce.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())}async closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),await this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){C.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)){C.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})})}async 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)}await this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),ce.showSnackbar("Coupon applied on cart"),Yp.updateIdentity(e)}async dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};await new Oo().processEvent(t);let n={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}},Tr=class{renderer=sr.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,n){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=n,this.stylesConverter=new uc(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=te(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 Rs(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 Kp(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},wi=class extends Tr{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?Za[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},Kl=class extends wi{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()}},Zl=class extends Tr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},Fs=class extends Tr{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()}},Xl=class UD extends Tr{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",UD.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(){}},Zp=class extends Tr{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}},gc=class extends wi{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)}},Xp=class VD extends gc{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(VD.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()})}},Jp=class BD extends gc{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(BD.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()})}},Qp=class us extends wi{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=te(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(us.DAYS)),t.hour&&this.elements.push(this.getChild(us.HOURS)),t.minute&&this.elements.push(this.getChild(us.MINUTES)),t.second&&this.elements.push(this.getChild(us.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-${us.DAYS}`?r.innerText=String(n.days).padStart(2,"0"):r.id===`lc-${us.HOURS}`?r.innerText=String(n.hours).padStart(2,"0"):r.id===`lc-${us.MINUTES}`?r.innerText=String(n.minutes).padStart(2,"0"):r.id===`lc-${us.SECONDS}`&&(r.innerText=String(n.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},eh=class extends wi{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 vi(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}},th=class extends Fs{constructor(e,t,n){super(e,t,n)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},yc=class xc{static ACTIVE_TRIGGER_DATA;renderer=sr.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ve.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 Hn(t))}async renderEngagement(t){if(this.triggerContext=new cc(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(!Gt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Gt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){xc.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){_t.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&&xc.ACTIVE_TRIGGER_DATA){let r={triggerShown:new bo(xc.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,r),!0}if(Me.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 Xl(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw C.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let n=new We(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 We(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 ec?new Xp(t,n,r).render():n instanceof tc?new Jp(t,n,r).render():n instanceof So?new Kl(t,n,r).render():n instanceof nc?new th(t,n,r).render():n instanceof Zi?new Fs(t,n,r).render():n instanceof Ns?new Zl(t,n,r).render():n instanceof Ja?new Qp(t,n,r).render():n instanceof Qa?new eh(t,n,r).render():C.error("Unsupported element type- "+n.type)}renderContainer(t){let n=this.ian?.cont;n&&(this.containerHTMLElement=new Zp(this.rootContainer,n,t).render().getHTMLElement(),new qp().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),xc.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(){sr.get().removeInApp(this.triggerContext)}skipTrigger(t,n){let r=new We(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"})}},nh=class{compareCartItemSubject=new J;constructor(){this.compareCartItemSubject.pipe(Ar(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=>C.error("Unable to process cart change in XMLHttpRequest",n))}),t.apply(this,arguments)},C.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=>C.error("Unable to process cart change in fetch",i)),r))},C.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Me.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(C.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=te(w({},o),{quantity:c});l?i.push(h):s.push(h)}n&&ce.removeFromArray(n,a)}else i.push(o)}),n)for(let o of n)s.push(o);C.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)&&mi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let n=new We(e,t);Te.get(Ve).sendEvent(n)}async compareCartItems(){let e=await rt.get(ge.CURRENT_CART,{}),t=await Ge.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},rh=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){_t.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(r?.body)})}return t(n,r)},C.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;C.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 ce.getCartAttributes();return e.variables.input.attributes=[...t,...n],JSON.stringify(e)}sendBuyNowEvent(){let e=Me.get().getCurrentItem();if(!e)return;let t=new We(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ve.getInstance().sendEvent(t)}},vc=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 We(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ve.getInstance().sendEvent(n),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>C.error(e))}async listen(){this.elements=await ce.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},ih=class Mf extends vc{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}},oh=class Uf extends vc{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(Uf.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Uf),this.INSTANCE}},sh=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(){ce.onDocumentLoaded(()=>{C.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){C.debug("No clickable cart checkout button found");return}C.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Gt.get().open()}},ah=class{trackSilently(){this.track().catch(e=>_t.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){C.warn("No processable data found in",e,t);return}n.referrer=document.referrer,n.url=location.href;let i=await Te.get(zt).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){C.info("Found order to be send",e),Ve.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))}},Jl=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await Ge.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},n=new We(k.EVENT_CHECKOUT_STARTED,t);Ve.getInstance().sendEvent(n)})}},ch=class{async migrate(){}};_n.escape=lx.MustacheUtils.escapeHtml;var gt=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new ch().migrate(),this.autoAuthenticate(),new Gp().meddle(),Te.get(Mo).loadExperimentSilently(),new zp().listen(),new ah().trackSilently(),new nh().listen(),new rh().listen(),new sh().listen(),Te.get(mc).listen(),Te.get(oh).listenSilently(),Te.get(ih).listenSilently(),Te.get(Gr).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),Dr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||Fa(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,Fa(this.globalRef,"config",new vt),Fa(this.globalRef,"runtimeData",new Me),C.debug("Global reference initialised")}static injectWidgetAssets(){Nt.injectScriptURL(mn.widgetURL,"cooee-widget-sdk"),Nt.injectStylesheet(mn.styleURL)}static autoAuthenticate(){let e=Dt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),n=e.shopifyShop;if((ce.isNull(t)||t.length!==24)&&ce.isNull(n)){C.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,Te.get(zt).init(e)}static sendEvent(e,t,n){let r=new We(e,t,n?.triggerData);n?.occurred&&(r.occurred=n.occurred),Te.get(Ve).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 '");Te.get(Ve).updateProfile(e)}static setPageName(e){if(!e)return;let t=Me.get(),n=t.pageName;if(e===n)return;if(t.pageName=e,e==="cart"&&Te.get(Gr).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){Te.get(mc).resetScrollID();return}let r={};n&&(r.ps=n);let i=new We(k.EVENT_SCREEN_VIEW,r);i.occurred=t.jsLoadTime,Te.get(Ve).sendEvent(i),Te.get(mc).resetScrollID(i.occurred)}static previewPopup(e,t){new yc(t).render(e)}static previewWidget(e){new Kn(new Hn(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){C.error(e)}window.addEventListener("message",e=>{if(C.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=Me.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?Jl.attachCheckoutListener():window.addEventListener("gokwikLoaded",Jl.attachCheckoutListener)}static storePreviewParams(){let e=Me.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)}},lh=class FD{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new FD),this.INSTANCE}init(){Nl.get(ge.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){C.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let n=this.updateGlobalConfig(t);Nl.set(ge.APP_CONFIG,n).catch(r=>C.error(r)),op.processConfiguration(),n.website&&(Nt.injectRawScript(n.website.commonJS),Nt.injectRawCSS(n.website.commonCSS)),Gt.get().onToggle().subscribe(async({open:r})=>{C.info("Cart drawer is now",r?"open":"closed"),r&&(Te.get(Gr).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let n=gt.globalRef.config.update(t);return Gt.forceUpdate(),C.debug("App configurations",n),n}async trackViewCartEvent(){let t=await Ge.getCurrent().getNormalisedCart(),n={value:t.amount,currency:t.currency},r={items:t.items,amount:n,drawer:!0};Ve.getInstance().sendEvent(new We(k.EVENT_VIEW_CART,r))}},ux=Re(b_()),uh=class Vf{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 ux.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 Vf(n);if(this.GOOGLE_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"GOOGLE"},new Vf(n)}},Ps=class jD{static INSTANCE;httpAPIService=Mn.getInstance();coreService=lh.getInstance();sentryService=_t.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new jD),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await rt.set(ge.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await rt.set(ge.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await rt.set(ge.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),C.log("Validating session with server");let n=await this.getSessionValidateData(t);try{let r=await this.httpAPIService.validateSession(n);C.log("Validating session Response",r),await this.coreService.processAppConfigurations(r.appSettings),await this.storeAndPopulateAuthData(r)}catch(r){throw C.error(r),r}}async populateUserDataFromStorage(){if(this.sdkToken=await rt.get(ge.SDK_TOKEN),!this.sdkToken){C.warn("No SDK token found in local storage");return}this.userID=await rt.get(ge.ID),this.deviceID=await rt.get(ge.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){C.debug("SDK Token:",this.sdkToken),C.log("Device ID:",this.deviceID),C.log("User ID:",this.userID),Ga.trackDeviceID(this.deviceID),Dr.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 rp().get();n.host=location.origin;try{(await _T())?.isPrivate&&(n.private=!0)}catch(i){dx.default.error("Unable to detect private/incognito window",i)}let r=await rt.get(ge.DEVICE_ID);return r||(r=new un().toHexString(),await rt.set(ge.DEVICE_ID,r)),te(w({deviceID:r,deviceProps:n,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:hi.parseFromCurrent(),ad:uh.getAdParams(),occurred:this.getSessionStartTime(Me.get().jsLoadTime),currentItem:Me.get().getCurrentItem(),cart:await Ge.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await rt.get(ge.FIRST_SEEN),n=t?new Date(t):new Date;t||await rt.set(ge.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}},zt=class Ic{static replaySubject=new Bo(1);static INSTANCE;sentryService=Te.get(_t);lock=new Wa;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Ic),this.INSTANCE}init(t){if(C.debug("Initialising SDK",t),vT(navigator.userAgent)){C.info("This seems to be a bot. Disabling SDK");return}Ps.getInstance().init(t),Ic.INSTANCE.checkForNewSession(!0).then(async()=>{Ic.replaySubject.next(!0),Ic.replaySubject.complete()}).catch(n=>{C.error("Unable to initiate session",n)})}getCurrentSessionID(){return yn.set(ge.SESSION_LAST_USED_TIME,new Date().getTime()),yn.get(ge.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 Ps.getInstance().validateSession({sessionID:r[0],sessionNumber:r[1],landingPage:r[2],newSession:n}),await yn.set(ge.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){C.debug("Starting new session"),await yn.clear(),C.debug("Cleared SessionStorage before starting new session");let t=new Date,n=new un().toHexString();C.debug("New session ID to be used",n);let r=await rt.get(ge.SESSION_NUMBER,0)+1;Dr.prepend(`New Session ID: <strong>${n}</strong> & number: ${r}`),await Promise.all([rt.set(ge.SESSION_NUMBER,r),yn.set(ge.ID,n),yn.set(ge.SESSION_LAST_USED_TIME,t.getTime()),yn.set(ge.SESSION_LANDING_PAGE,hi.parseFromCurrent())])}getLandingPage(){return yn.get(ge.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return rt.get(ge.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await yn.get(ge.ID))return!0;let t=await yn.get(ge.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await yn.get(ge.SESSION_SYNCED,!1)}},hx=Re(qn()),fx=Re(qn()),px=Re(Ta()),dh=class{triggerData;safeHttpService=Ve.getInstance();render(e){e.contentSource===fx.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){C.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new We(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let n=this.getFormDetails(t);this.safeHttpService.sendEvent(new We(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 We(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},n=e.metaData;if(px.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}},fh=class{static trackIntent(e){if(!this.isInstalled()){C.log("Facebook pixel not installed");return}if(!vt.get().pixelPush){C.log("Facebook pixel push not enabled");return}let t=Is[e.intent]?.toLowerCase(),n=e.segmentName;!t&&!n||(C.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"}},ph=class HD{static INSTANCE;httpService=Te.get(Mn);sentryService=Te.get(_t);sessionManager=Te.get(zt);runtime=Me.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new HD),this.INSTANCE}sendSilently(t){this.send(t).catch(n=>C.error(`Failed to send ${t.name}`,n))}async send(t){if(C.debug(`Sending event ${t.name}`),Dr.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){C.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=>{C.log("\u2705 Event tracked:",t.name),Dr.prepend(`\u2705 Event <strong>${n.eventName}</strong> tracked`),this.processEventResponse(t,n)}).catch(n=>{C.error(`Error sending event ${t.name} to server`,n)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(C.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=hi.parseFromCurrent()}async addShopifyContext(t){if(Dt.isShopify())try{t.cart=await Ge.getCurrent().getNormalisedCart()}catch(n){C.error("Error fetching Shopify cart before sending the event",n)}}processEventResponse(t,n){this.renderWidgetIfAny(t,n).catch(r=>{C.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){C.log(`Nothing to engage after ${t.name}`);return}C.log(`\u{1F4E3} Engagement(id=${n.triggerData.shortID}) will be shown`,n.triggerData);let r=new Hn(n.triggerData);r.occurred=t.occurred;let i;try{i=await lc.refreshItems(r)}catch(s){C.error("Failed to refresh the products",s);return}if(r.items=i,r.contentSource===hx.EngagementContentSource.KLAVIYO){new dh().render(r);return}new yc().renderEngagement(r).catch(s=>{C.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:r})})}utiliseIntentIfCalculated(t){t.intent&&(Ga.trackIntent(t.intent),fh.trackIntent(t),Dr.prepend(`Intent is <strong>${Is[t.intent]}</strong>`))}addShopifyAttributes(){Dt.isShopify()&&Ge.getCurrent().addCooeeAttributes().catch(t=>{C.error("Fail to add attributes in cart",t)})}},Ve=class $D{static INSTANCE;httpApiService=Mn.getInstance();eventAPIService=ph.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new $D),this.INSTANCE}sendEvent(t){C.debug(`Waiting for auth to send event ${t.name}`),zt.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){zt.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){zt.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){zt.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},Ro=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Ve.getInstance();async execute(e){let t=Me.get().getCurrentItem(),n=e.clickAction||this.element?.clc;if(!n)return;let r=e.item,i=this.triggerContext,s=new Oo,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(x=>x.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let x;e.embeddedItems?x=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):x=b.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let P=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&P&&(x.push({itemMID:P.mID,mID:P.selectedOrFirstVariant.value.mID,isPrimary:!0}),d.unshift(P.toEmbed())),l.selectedVariants=x,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 Ge.getCurrent().getNormalisedCart();d=b.items,l.selectedVariants=b.items.map(x=>({itemMID:x.mID,mID:x.vID}))}else if(n.at===102)h=r?[r]:[e.embeddedItem];else if(n.at===101)c=r?Dt.getRootPrefix()+"products/"+r.slug:e.embeddedItem?.link;else if(n.at===4){let b=ce.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(),Gt.get().refreshUI(b)}else if(n.at===104){let b=this.triggerContext.triggerData.collections?.[0];b&&(c="collections/"+b.handle)}if(this.sendTriggerClicked(d,{from:"button"},e.video),C.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),C.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){gx.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 Ao.applyWithStorefront(f)}catch(b){C.error(b),g=!0}let m;if(h?.length&&(m=await s.performAddToCart(h,i.triggerData)),g&&f){Ao.navigate(f,o,c);return}if(c){location.href=c;return}Ao.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,n){let r=k.EVENT_TRIGGER_CLICKED,i=new We(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===mx.DiscountType.STATIC){if(!t.code)throw _t.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 C.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 ce.showSnackbar("Failed to generate a discount code"),C.error("Error generating discount code",t,e),_t.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Po=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}},lE;function FV(){if(lE==null){let e=typeof document<"u"?document.head:null;lE=!!(e&&(e.createShadowRoot||e.attachShadow))}return lE}function _c(e){if(FV()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function hh(){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 mh(e){return e.buttons===0||e.detail===0}function gh(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)}function uE(e,t=0){return BV(e)?Number(e):arguments.length===2?t:0}function BV(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Xn(e){return e instanceof Ct?e.nativeElement:e}function Tn(e,t,n,r,i){let s=parseInt(Cy.major),o=parseInt(Cy.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 yh=new WeakMap,Bs=(()=>{class e{_appRef;_injector=M(ht);_environmentInjector=M(Gn);load(n){let r=this._appRef=this._appRef||this._injector.get(yr),i=yh.get(r);i||(i={loaders:new Set,refs:[]},yh.set(r,i),r.onDestroy(()=>{yh.get(r)?.refs.forEach(s=>s.destroy()),yh.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(Ud(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),dE;try{dE=typeof Intl<"u"&&Intl.v8BreakIterator}catch{dE=!1}var Jn=(()=>{class e{_platformId=M(is);isBrowser=this._platformId?yD(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||dE)&&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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),VV=new pe("cdk-dir-doc",{providedIn:"root",factory:UV});function UV(){return M(Qe)}var HV=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function jV(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?HV.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Vs=(()=>{class e{value="ltr";change=new Je;constructor(){let n=M(VV,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=jV(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Us;function yx(){if(Us==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Us=!1,Us;if("scrollBehavior"in document.documentElement.style)Us=!0;else{let e=Element.prototype.scrollTo;e?Us=!/\{\s*\[native code\]\s*\}/.test(e.toString()):Us=!1}}return Us}var $V=20,fE=(()=>{class e{_ngZone=M(Le);_platform=M(Jn);_renderer=M(hn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new J;_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=$V){return this._platform.isBrowser?new nt(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(Lu(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):jo()}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($o(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=Xn(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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),WV=20,Ql=(()=>{class e{_platform=M(Jn);_listeners;_viewportSize;_change=new J;_document=M(Qe,{optional:!0});constructor(){let n=M(Le),r=M(hn).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=WV){return n>0?this._change.pipe(Lu(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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pE={},vh=(()=>{class e{_appId=M(nl);getId(n){return this._appId!=="ng"&&(n+=this._appId),pE.hasOwnProperty(n)||(pE[n]=0),`${n}${pE[n]++}`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hE(e){return Array.isArray(e)?e:[e]}function Ox(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"?Ex(e,t):(r==="input"||r==="select"||r==="textarea")&&_x(e,t),vx("canvas",e,t,Ex),vx("input, textarea, select",e,t,_x),t}function vx(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 GV=0;function _x(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${GV++}`)}function Ex(e,t){let n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch{}}function bE(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 yE(e,t,n){let{top:r,bottom:i,left:s,right:o}=e;return n>=r&&n<=i&&t>=s&&t<=o}function nu(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function wx(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 _h=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:bE(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)&&nu(l.clientRect,o,a)}),r.top=i,r.left=s,{top:o,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Mx(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 CE(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 Ec(e,t){let n=t?"":"none";CE(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 bx(e,t,n){CE(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},n)}function Eh(e,t){return t&&t!="none"?e+" "+t:e}function Cx(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=wh(t.left,t.top)}function wh(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Sx(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function zV(e){let t=getComputedStyle(e),n=mE(t,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),s=mE(t,"transition-duration"),o=mE(t,"transition-delay");return Sx(s[i])+Sx(o[i])}function mE(e,t){return e.getPropertyValue(t).split(",").map(n=>n.trim())}var qV=new Set(["position"]),vE=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),Dx(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 zV(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=Mx(s,this._document),this._previewEmbeddedView=s,e.matchSize?Cx(r,i):r.style.transform=wh(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=Ox(this._rootElement),Cx(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return CE(r.style,{"pointer-events":"none",margin:Dx(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},qV),Ec(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 Dx(e){return"showPopover"in e}var YV={passive:!0},Ix={passive:!1},KV={passive:!1,capture:!0},ZV=800,Tx=new Set(["position"]),_E=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=Vi(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new J;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=ot.EMPTY;_pointerUpSubscription=ot.EMPTY;_scrollSubscription=ot.EMPTY;_resizeSubscription=ot.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=>Ec(t,e)))}_disabled=!1;beforeStarted=new J;started=new J;released=new J;ended=new J;entered=new J;exited=new J;dropped=new J;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 _h(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=>Xn(n)),this._handles.forEach(n=>Ec(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=Xn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Tn(this._renderer,t,"mousedown",this._pointerDown,Ix),Tn(this._renderer,t,"touchstart",this._pointerDown,YV),Tn(this._renderer,t,"dragstart",this._nativeDragStart,Ix)]),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?Xn(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),Ec(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Ec(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){eu(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Tn(this._renderer,t,"selectstart",XV,KV)}),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 vE(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)),bx(r,!1,Tx),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=eu(t),i=!r&&t.button!==0,s=this._rootElement,o=Zn(t),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+ZV>Date.now(),l=r?gh(t):mh(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=bE(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){bx(this._rootElement,!0,Tx),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=Mx(this._placeholderRef,this._document)):n=Ox(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=eu(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=eu(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=xx(n,d,f),r=xx(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,Ec(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let n=1/this.scale,r=wh(e*n,t*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Eh(r,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=wh(e,t);this._preview.setTransform(Eh(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:eu(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)&&nu(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=_c(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 Xn(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 xx(e,t,n){return Math.max(t,Math.min(n,e))}function eu(e){return e.type[0]==="t"}function XV(e){e.preventDefault()}function Px(e,t,n){let r=Rx(t,e.length-1),i=Rx(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 Rx(e,t){return Math.max(0,Math.min(t,e))}var bh=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 Px(i,a,s),i.forEach((b,x)=>{if(m[x]===b)return;let P=b.drag===e,F=P?f:g,V=P?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=F;let L=Math.round(b.offset*(1/b.drag.scale));o?(V.style.transform=Eh(`translate3d(${L}px, 0, 0)`,b.initialTransform),nu(b.clientRect,0,F)):(V.style.transform=Eh(`translate3d(0, ${L}px, 0)`,b.initialTransform),nu(b.clientRect,F,0))}),this._previousSwap.overlaps=yE(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})=>{nu(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:bE(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}},EE=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),Px(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=_c(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}},Nx=.05,kx=.05,xr=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(xr||{}),jn=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(jn||{}),wE=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new J;entered=new J;exited=new J;dropped=new J;sorted=new J;receivingStarted=new J;receivingStopped=new J;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=ot.EMPTY;_verticalScrollDirection=xr.NONE;_horizontalScrollDirection=jn.NONE;_scrollNode;_stopScrollTimers=new J;_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=Xn(e);this._document=n,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new _h(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 bh&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new EE(this._document,this._dragDropRegistry);else{let t=new bh(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=Xn(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||!wx(this._domRect,Nx,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=xr.NONE,i=jn.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||n||wx(s.clientRect,Nx,e,t)&&([r,i]=JV(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=Lx(a,t),i=Fx(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(),om(0,wu).pipe(hr(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===xr.UP?e.scrollBy(0,-t):this._verticalScrollDirection===xr.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===jn.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===jn.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&yE(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||!yE(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=_c(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 Lx(e,t){let{top:n,bottom:r,height:i}=e,s=i*kx;return t>=n-s&&t<=n+s?xr.UP:t>=r-s&&t<=r+s?xr.DOWN:xr.NONE}function Fx(e,t){let{left:n,right:r,width:i}=e,s=i*kx;return t>=n-s&&t<=n+s?jn.LEFT:t>=r-s&&t<=r+s?jn.RIGHT:jn.NONE}function JV(e,t,n,r,i){let s=Lx(t,i),o=Fx(t,r),a=xr.NONE,l=jn.NONE;if(s){let c=e.scrollTop;s===xr.UP?c>0&&(a=xr.UP):e.scrollHeight-c>e.clientHeight&&(a=xr.DOWN)}if(o){let c=e.scrollLeft;n==="rtl"?o===jn.RIGHT?c<0&&(l=jn.RIGHT):e.scrollWidth+c>e.clientWidth&&(l=jn.LEFT):o===jn.LEFT?c>0&&(l=jn.LEFT):e.scrollWidth-c>e.clientWidth&&(l=jn.RIGHT)}return[a,l]}var tu={capture:!0},gE={passive:!1,capture:!0},QV=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yt({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}
|
|
76
|
-
`],encapsulation:2,changeDetection:0})}return e})(),Bx=(()=>{class e{_ngZone=M(Le);_document=M(Qe);_styleLoader=M(Bs);_renderer=M(hn).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Vi([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new J;pointerUp=new J;scroll=new J;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=Tn(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,gE)})}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(QV),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),tu],["selectstart",this._preventDefaultWhileDragging,gE]];i?o.push(["touchend",s,tu],["touchcancel",s,tu]):o.push(["mouseup",s,tu]),i||o.push(["mousemove",a=>this.pointerMove.next(a),gE]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>Tn(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 nt(i=>this._ngZone.runOutsideAngular(()=>{let s=Tn(this._renderer,n,"scroll",o=>{this._activeDragInstances().length&&i.next(o)},tu);return()=>{s()}}))),io(...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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),eU={dragStartThreshold:5,pointerDirectionChangeThreshold:5},tU=(()=>{class e{_document=M(Qe);_ngZone=M(Le);_viewportRuler=M(Ql);_dragDropRegistry=M(Bx);_renderer=M(hn).createRenderer(null,null);constructor(){}createDrag(n,r=eU){return new _E(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new wE(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ax=new pe("CDK_DRAG_PARENT"),nU=new pe("CdkDragHandle"),rU=new pe("CDK_DRAG_CONFIG"),iU=new pe("CdkDropList"),Vx=(()=>{class e{element=M(Ct);dropContainer=M(iU,{optional:!0,skipSelf:!0});_ngZone=M(Le);_viewContainerRef=M(Br);_dir=M(Vs,{optional:!0});_changeDetectorRef=M(rr);_selfHandle=M(nU,{optional:!0,self:!0});_parentDrag=M(Ax,{optional:!0,skipSelf:!0});_dragDropRegistry=M(Bx);_destroyed=new J;_handles=new Nr([]);_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 Je;released=new Je;ended=new Je;entered=new Je;exited=new Je;dropped=new Je;moved=new nt(n=>{let r=this._dragRef.moved.pipe(pr(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=M(ht);constructor(){let n=this.dropContainer,r=M(rU,{optional:!0}),i=M(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(hr(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(){Jr(()=>{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):Xn(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:uE(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(sm(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(cm(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),ea(n=>io(...n.map(r=>r._stateChanges.pipe(Ii(r))))),hr(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=Vr({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&go("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",Sa],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Dy]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Vd([{provide:Ax,useExisting:e}]),ns]})}return e})(),oU=e=>({"lc:cursor-grab":e}),Ux=(e,t)=>t.url;function sU(e,t){if(e&1&&Ne(0,"source",11),e&2){let n=t.$implicit;zn("type",n.mimeType),ji("media","(max-width: ",n.width,"px)"),Be("src",n.url,an)}}function aU(e,t){if(e&1&&Ne(0,"source",12),e&2){let n=t.$implicit;zn("type",n.mimeType),Be("src",n.url,an)}}var Ch=class jf{constructor(t){this.elementRef=t}video;closeClicked=new Je;videoClicked=new Je;isDragging=!1;VideoUtils=Po;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||jf)(Mt(Ct))};static \u0275cmp=yt({type:jf,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:16,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","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-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type","media"],[3,"src","type"]],template:function(t,n){t&1&&(re(0,"div",0),Rt("click",function(){return n.onVideoClick()})("keyup",function(){return n.onVideoClick()})("cdkDragMoved",function(){return n.isDragging=!0}),re(1,"button",1),Rt("click",function(r){return r.stopPropagation(),n.close()}),vr(),re(2,"svg",2),Ne(3,"path",3)(4,"path",4),ie()(),rs(),re(5,"div",5)(6,"div",6),vr(),re(7,"svg",7),Ne(8,"path",8),ie()(),rs(),re(9,"div",9),tn(10,"Tap to unmute"),ie()(),re(11,"video",10),Qt(12,sU,1,4,"source",11,Ux),Qt(14,aU,1,2,"source",12,Ux),ie()()),t&2&&(Be("ngClass",XS(3,oU,n.isDragging))("cdkDragBoundary","body"),X(11),Be("muted",!0),X(),en(n.video.sources),X(2),en(n.VideoUtils.getBestSources(n.video.sources)))},dependencies:[mD,Vx],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})},ru=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}},wc=class extends ru{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,n,r,i){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.projectableNodes=i}},bc=class extends ru{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()}},SE=class extends ru{element;constructor(e){super(),this.element=e instanceof Ct?e.nativeElement:e}},Cc=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof wc)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof bc)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof SE)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)}},Sh=class extends Cc{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(ki,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||ht.NULL,i=r.get(Gn,n.injector);t=Ud(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]}},DE=(()=>{class e extends Cc{_moduleRef=M(ki,{optional:!0});_document=M(Qe);_viewContainerRef=M(Br);_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 Je;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=Vr({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ho]})}return e})(),iu;function cU(){if(iu==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>iu=!0}))}finally{iu=iu||!1}return iu}function Hx(e){return cU()?e:!!e.capture}var lU=new pe("cdk-input-modality-detector-options"),uU={ignoreKeys:[18,17,224,91,16]},jx=650,IE={passive:!0,capture:!0},dU=(()=>{class e{_platform=M(Jn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Nr(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<jx||(this._modality.next(mh(n)?"keyboard":"mouse"),this._mostRecentTarget=Zn(n))};_onTouchstart=n=>{if(gh(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Zn(n)};constructor(){let n=M(Le),r=M(Qe),i=M(lU,{optional:!0});if(this._options=w(w({},uU),i),this.modalityDetected=this._modality.pipe(am(1)),this.modalityChanged=this.modalityDetected.pipe(Fu()),this._platform.isBrowser){let s=M(hn).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Tn(s,r,"keydown",this._onKeydown,IE),Tn(s,r,"mousedown",this._onMousedown,IE),Tn(s,r,"touchstart",this._onTouchstart,IE)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ih=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(Ih||{}),fU=new pe("cdk-focus-monitor-default-options"),Dh=Hx({passive:!0,capture:!0}),$x=(()=>{class e{_ngZone=M(Le);_platform=M(Jn);_inputModalityDetector=M(dU);_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=M(Qe,{optional:!0});_stopInputModalityDetector=new J;constructor(){let n=M(fU,{optional:!0});this._detectionMode=n?.detectionMode||Ih.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=Xn(n);if(!this._platform.isBrowser||i.nodeType!==1)return jo();let s=_c(i)||this._getDocument(),o=this._elementInfo.get(i);if(o)return r&&(o.checkChildren=!0),o.subject;let a={checkChildren:r,subject:new J,rootNode:s};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=Xn(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=Xn(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===Ih.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===Ih.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?jx: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,Dh),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Dh)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(hr(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,Dh),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Dh),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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Wx=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yt({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}
|
|
77
|
-
`],encapsulation:2,changeDetection:0})}return e})(),xE=(()=>{class e{_platform=M(Jn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return hU(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=pU(bU(n));if(r&&(Gx(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),s=Gx(n);return n.hasAttribute("contenteditable")?s!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!EU(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 wU(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function pU(e){try{return e.frameElement}catch{return null}}function hU(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function mU(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function gU(e){return vU(e)&&e.type=="hidden"}function yU(e){return _U(e)&&e.hasAttribute("href")}function vU(e){return e.nodeName.toLowerCase()=="input"}function _U(e){return e.nodeName.toLowerCase()=="a"}function zx(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function Gx(e){if(!zx(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function EU(e){let t=e.nodeName.toLowerCase(),n=t==="input"&&e.type;return n==="text"||n==="password"||t==="select"||t==="textarea"}function wU(e){return gU(e)?!1:mU(e)||yU(e)||e.hasAttribute("contenteditable")||zx(e)}function bU(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var TE=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?Jr(e,{injector:this._injector}):setTimeout(e)}},qx=(()=>{class e{_checker=M(xE);_ngZone=M(Le);_document=M(Qe);_injector=M(ht);constructor(){M(Bs).load(Wx)}create(n,r=!1){return new TE(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function RE(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function qt(e){return e==null?"":typeof e=="string"?e:`${e}px`}function Yx(e,...t){return t.length?t.some(n=>e[n]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var Kx=yx(),NE=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=qt(-this._previousScrollPosition.left),e.style.top=qt(-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"),Kx&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Kx&&(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}},AE=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($o(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())}},Th=class{enable(){}disable(){}attach(){}};function OE(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 Zx(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 ME=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();OE(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}},SU=(()=>{class e{_scrollDispatcher=M(fE);_viewportRuler=M(Ql);_ngZone=M(Le);_document=M(Qe);constructor(){}noop=()=>new Th;close=n=>new AE(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new NE(this._viewportRuler,this._document);reposition=n=>new ME(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ou=class{positionStrategy;scrollStrategy=new Th;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])}}},PE=class{connectionPair;scrollableViewProperties;constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}},nR=(()=>{class e{_attachedOverlays=[];_document=M(Qe);_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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),DU=(()=>{class e extends nR{_ngZone=M(Le);_renderer=M(hn).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=Dd(e)))(r||e)}})();static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),IU=(()=>{class e extends nR{_platform=M(Jn);_ngZone=M(Le);_renderer=M(hn).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(()=>[Tn(this._renderer,r,"pointerdown",this._pointerDownListener,i),Tn(this._renderer,r,"click",this._clickListener,i),Tn(this._renderer,r,"auxclick",this._clickListener,i),Tn(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(Xx(a.overlayElement,r)||Xx(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=Dd(e)))(r||e)}})();static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Xx(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 rR=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yt({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}
|
|
78
|
-
`],encapsulation:2,changeDetection:0})}return e})(),xh=(()=>{class e{_platform=M(Jn);_containerElement;_document=M(Qe);_styleLoader=M(Bs);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||RE()){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),RE()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(rR)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),kE=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()}},Sc=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new J;_attachments=new J;_detachments=new J;_positionStrategy;_scrollStrategy;_locationChanges=ot.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new J;_outsidePointerEvents=new J;_renders=new J;_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=Iy(()=>ry(()=>{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=Jr(()=>{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=te(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=qt(this._config.width),e.height=qt(this._config.height),e.minWidth=qt(this._config.minWidth),e.minHeight=qt(this._config.minHeight),e.maxWidth=qt(this._config.maxWidth),e.maxHeight=qt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new kE(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=hE(t||[]).filter(i=>!!i);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(hr(io(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?.()}},Jx="cdk-overlay-connected-position-bounding-box",TU=/([A-Za-z%]+)$/,LE=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 J;_resizeSubscription=ot.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(Jx),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&&Hs(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Jx),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=eR(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=Qx(this._overlayRef.getConfig().minHeight),o=Qx(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=eR(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||!xU(this._lastScrollVisibility,n)){let r=new PE(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=qt(n.height),r.top=qt(n.top),r.bottom=qt(n.bottom),r.width=qt(n.width),r.left=qt(n.left),r.right=qt(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=qt(i)),s&&(r.maxWidth=qt(s))}this._lastBoundingBoxSize=n,Hs(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Hs(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Hs(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();Hs(n,this._getExactOverlayY(t,e,c)),Hs(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=qt(s.maxHeight):i&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=qt(s.maxWidth):i&&(n.maxWidth="")),Hs(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=qt(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=qt(i.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Zx(e,n),isOriginOutsideView:OE(e,n),isOverlayClipped:Zx(t,n),isOverlayOutsideView:OE(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&&hE(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 Ct)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 Hs(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Qx(e){if(typeof e!="number"&&e!=null){let[t,n]=e.split(TU);return!n||n==="px"?parseFloat(t):null}return e||null}function eR(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 xU(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var tR="cdk-global-overlay-wrapper",FE=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(tR),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(tR),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},RU=(()=>{class e{_viewportRuler=M(Ql);_document=M(Qe);_platform=M(Jn);_overlayContainer=M(xh);constructor(){}global(){return new FE}flexibleConnectedTo(n){return new LE(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),BE=(()=>{class e{scrollStrategies=M(SU);_overlayContainer=M(xh);_positionBuilder=M(RU);_keyboardDispatcher=M(DU);_injector=M(ht);_ngZone=M(Le);_document=M(Qe);_directionality=M(Vs);_location=M(My);_outsideClickDispatcher=M(IU);_animationsModuleType=M($C,{optional:!0});_idGenerator=M(vh);_renderer=M(hn).createRenderer(null,null);_appRef;_styleLoader=M(Bs);constructor(){}create(n){this._styleLoader.load(rR);let r=this._createHostElement(),i=this._createPaneElement(r),s=this._createPortalOutlet(i),o=new ou(n);return o.direction=o.direction||this._directionality.value,new Sc(s,r,i,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Gn),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(yr)),new Sh(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function NU(e,t){}var Dc=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},AU=(()=>{class e extends Cc{_elementRef=M(Ct);_focusTrapFactory=M(qx);_config;_interactivityChecker=M(xE);_ngZone=M(Le);_overlayRef=M(Sc);_focusMonitor=M($x);_renderer=M(ya);_platform=M(Jn);_document=M(Qe,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=M(rr);_injector=M(ht);_isDestroyed=!1;constructor(){super(),this._config=M(Dc,{optional:!0})||new Dc,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||Jr(()=>{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=hh(),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=hh();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=hh()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yt({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&Ea(DE,7),n&2){let i;wa(i=ba())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&va("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:[ho],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&xt(0,NU,0,0,"ng-template",0)},dependencies:[DE],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
79
|
-
`],encapsulation:2})}return e})(),js=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new J;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&&!Yx(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}},OU=new pe("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=M(BE);return()=>e.scrollStrategies.block()}}),UE=new pe("DialogData"),MU=new pe("DefaultDialogConfig"),iR=(()=>{class e{_overlay=M(BE);_injector=M(ht);_defaultOptions=M(MU,{optional:!0});_parentDialog=M(e,{optional:!0,skipSelf:!0});_overlayContainer=M(xh);_idGenerator=M(vh);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new J;_afterOpenedAtThisLevel=new J;_ariaHiddenElements=new Map;_scrollStrategy=M(OU);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=im(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ii(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Dc;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 js(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(){VE(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){VE(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),VE(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new ou({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:Dc,useValue:i},{provide:js,useValue:r},{provide:Sc,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,o.push(...i.container.providers(i))):a=AU;let l=new wc(a,i.viewContainerRef,ht.create({parent:s||this._injector,providers:o}));return n.attach(l).instance}_attachDialogContent(n,r,i,s){if(n instanceof kr){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 bc(n,null,a,o))}else{let o=this._createInjector(s,r,i,this._injector),a=i.attachComponentPortal(new wc(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:UE,useValue:n.data},{provide:js,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(Vs,null,{optional:!0}))&&a.push({provide:Vs,useValue:{value:n.direction,change:jo()}}),ht.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=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function VE(e,t){let n=e.length;for(;n--;)t(e[n])}var PU=Og;function kU(e){return!!e[PU]}var LU=Symbol("__destroy"),lR=Symbol("__decoratorApplied");function uR(e){return typeof e=="string"?Symbol(`__destroy__${e}`):LU}function FU(e){e.prototype[lR]=!0}function dR(e,t){e[t]||(e[t]=new J)}function fR(e,t){e[t]&&(e[t].next(),e[t].complete(),e[t]=null)}function pR(e){e instanceof ot&&e.unsubscribe()}function BU(e){Array.isArray(e)&&e.forEach(pR)}function hR(e,t){return function(){if(e&&e.call(this),fR(this,uR()),t.arrayName&&BU(this[t.arrayName]),t.checkProperties)for(let n in this)t.blackList?.includes(n)||pR(this[n])}}function VU(e,t){e.prototype.ngOnDestroy=hR(e.prototype.ngOnDestroy,t)}function UU(e,t){let n=e.\u0275pipe;n.onDestroy=hR(n.onDestroy,t)}function mR(e={}){return t=>{kU(t)?UU(t,e):VU(t,e),FU(t)}}var sR=7,aR=Symbol("CheckerHasBeenSet");function HU(e,t){e[aR]||jU()||(cR(()=>Ci(Promise.resolve()).pipe(Si(()=>{let n;try{n=LC(e)}catch{n=null}let r=n?.lView;if(r==null)return Uo;let i=r[sR]||(r[sR]=[]),s=new J;return i.push(function(){cR(()=>{s.next(),s.complete()})}),s}),Si(()=>Promise.resolve())).subscribe(()=>{(t.observed??t.observers.length>0)&&console.warn($U(e))})),e[aR]=!0)}function jU(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function cR(e){let t=Go.Zone;return t&&typeof t.root?.run=="function"?t.root.run(e):e()}function $U(e){return`
|
|
25
|
+
Name: ${cr(r)}
|
|
26
|
+
Error:`,i)}}function cO(e){let t="console";$r(t,e),zr(t,uO)}function uO(){"console"in $e&&Ec.forEach(function(e){e in $e.console&&Ot($e.console,e,function(t){return Ps[e]=t,function(...n){pn("console",{args:n,level:e});let r=Ps[e];r&&r.apply($e.console,n)}})})}var Sc=$e;function hO(){if(!("fetch"in Sc))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Ic(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function dO(){if(typeof EdgeRuntime=="string")return!0;if(!hO())return!1;if(Ic(Sc.fetch))return!0;let e=!1,t=Sc.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=Ic(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){To&&_e.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}var Ev=1e3;function Oo(){return Date.now()/Ev}function fO(){let{performance:e}=$e;if(!e||!e.now)return Oo;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Ev}var or=fO(),Uo,$P=(()=>{let{performance:e}=$e;if(!e||!e.now){Uo="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,s=e.timing&&e.timing.navigationStart,a=typeof s=="number"?Math.abs(s+n-r):t,l=a<t;return o||l?i<=a?(Uo="timeOrigin",e.timeOrigin):(Uo="navigationStart",s):(Uo="dateNow",r)})();function pO(e){let t="fetch";$r(t,e),zr(t,gO)}function gO(){dO()&&Ot($e,"fetch",function(e){return function(...t){let{method:n,url:r}=mO(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:or()*1e3};pn("fetch",L({},i));let o=new Error().stack;return e.apply($e,t).then(s=>{let a=Qe(L({},i),{endTimestamp:or()*1e3,response:s});return pn("fetch",a),s},s=>{let a=Qe(L({},i),{endTimestamp:or()*1e3,error:s});throw pn("fetch",a),ph(s)&&s.stack===void 0&&(s.stack=o,Lr(s,"framesToPop",1)),s})}})}function Cc(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ff(e){return typeof e=="string"?e:e?Cc(e,"url")?e.url:e.toString?e.toString():"":""}function mO(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:ff(n),method:Cc(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:ff(t),method:Cc(t,"method")?String(t.method).toUpperCase():"GET"}}var Ho=null;function yO(e){let t="error";$r(t,e),zr(t,vO)}function vO(){Ho=$e.onerror,$e.onerror=function(e,t,n,r,i){return pn("error",{column:r,error:i,line:n,msg:e,url:t}),Ho&&!Ho.__SENTRY_LOADER__?Ho.apply(this,arguments):!1},$e.onerror.__SENTRY_INSTRUMENTED__=!0}var $o=null;function _O(e){let t="unhandledrejection";$r(t,e),zr(t,bO)}function bO(){$o=$e.onunhandledrejection,$e.onunhandledrejection=function(e){return pn("unhandledrejection",e),$o&&!$o.__SENTRY_LOADER__?$o.apply(this,arguments):!0},$e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function wO(){return"npm"}function EO(){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 o=0;o<t.length;o++)if(t[o]===i)return!0;return t.push(i),!1}function r(i){if(e)t.delete(i);else for(let o=0;o<t.length;o++)if(t[o]===i){t.splice(o,1);break}}return[n,r]}function gn(){let e=$e,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 xv(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Kn(e){let{message:t,event_id:n}=e;if(t)return t;let r=xv(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Tc(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function ao(e,t){let n=xv(e);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=L(L(L({},r),i),t),t&&"data"in t){let o=L(L({},i&&i.data),t.data);n.mechanism.data=o}}function pf(e){if(e&&e.__sentry_captured__)return!0;try{Lr(e,"__sentry_captured__",!0)}catch{}return!1}function xO(e){return Array.isArray(e)?e:[e]}function Jn(e,t=100,n=1/0){try{return Oc("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Sv(e,t=3,n=100*1024){let r=Jn(e,t);return TO(r)>n?Sv(e,t-1,n):r}function Oc(e,t,n=1/0,r=1/0,i=EO()){let[o,s]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;let a=SO(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(o(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let g=u.toJSON();return Oc("",g,l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=wv(t);for(let g in p){if(!Object.prototype.hasOwnProperty.call(p,g))continue;if(f>=r){d[g]="[MaxProperties ~]";break}let m=p[g];d[g]=Oc(g,m,l-1,r,i),f++}return s(t),d}function SO(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(yv(t))return"[VueViewModel]";if($T(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${cr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=IO(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function IO(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function CO(e){return~-encodeURI(e).split(/%..|./).length}function TO(e){return CO(JSON.stringify(e))}var kn;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let n=2;e[e.REJECTED=n]="REJECTED"})(kn||(kn={}));function jr(e){return new Ro(t=>{t(e)})}function Ls(e){return new Ro((t,n)=>{n(e)})}var Ro=class mr{constructor(t){mr.prototype.__init.call(this),mr.prototype.__init2.call(this),mr.prototype.__init3.call(this),mr.prototype.__init4.call(this),this._state=kn.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new mr((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new mr((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult(kn.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(kn.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===kn.PENDING){if(xa(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===kn.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===kn.RESOLVED&&n[1](this._value),this._state===kn.REJECTED&&n[2](this._value),n[0]=!0)})}}};function OO(e){let t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return Ls(new xn("Not adding Promise because buffer limit was reached."));let a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new Ro((a,l)=>{let u=t.length;if(!u)return a(!0);let d=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(f=>{jr(f).then(()=>{--u||(clearTimeout(d),a(!0))},l)})})}return{$:t,add:i,drain:o}}function fl(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 RO=["fatal","error","warning","log","info","debug"];function DO(e){return e==="warn"?"warning":RO.includes(e)?e:"log"}var NO="sentry-",kO=/^sentry-/;function AO(e){let t=PO(e);if(!t)return;let n=Object.entries(t).reduce((r,[i,o])=>{if(i.match(kO)){let s=i.slice(NO.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function PO(e){if(!(!e||!Mn(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=gf(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):gf(e)}function gf(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Do(e,t=[]){return[e,t]}function LO(e,t){let[n,r]=e;return[n,[...r,t]]}function mf(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 Rc(e){return $e.__SENTRY__&&$e.__SENTRY__.encodePolyfill?$e.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function MO(e){let[t,n]=e,r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Rc(r),o]:r.push(typeof o=="string"?Rc(o):o)}for(let o of n){let[s,a]=o;if(i(`
|
|
27
|
+
${JSON.stringify(s)}
|
|
28
|
+
`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Jn(a))}i(l)}}return typeof r=="string"?r:jO(r)}function jO(e){let t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}function VO(e){let t=typeof e.data=="string"?Rc(e.data):e.data;return[un({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var BO={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 yf(e){return BO[e]}function Iv(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function FO(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return L(L(L({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:Ia(r)}),i&&{trace:un(L({},i))})}function UO(e,t,n){let r=[{type:"client_report"},{timestamp:n||Oo(),discarded_events:e}];return Do(t?{dsn:t}:{},[r])}function HO(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 $O(e,t){return e[t]||e.all||0}function zO(e,t,n=Date.now()){return $O(e,t)>n}function qO(e,{statusCode:t,headers:n},r=Date.now()){let i=L({},e),o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(let a of o.trim().split(",")){let[l,u,,,d]=a.split(":",5),f=parseInt(l,10),p=(isNaN(f)?60:f)*1e3;if(!u)i.all=r+p;else for(let g of u.split(";"))g==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(i[g]=r+p):i[g]=r+p}else s?i.all=r+HO(s,r):t===429&&(i.all=r+60*1e3);return i}function vf(){return{traceId:gn(),spanId:gn().substring(16)}}var zo=$e;function WO(){let e=zo.chrome,t=e&&e.app&&e.app.runtime,n="history"in zo&&!!zo.history.pushState&&!!zo.history.replaceState;return!t&&n}var ot=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ca(){return wh($e),$e}function wh(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||xr,t[xr]=t[xr]||{}}function Dc(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||or(),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:gn()),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 Nc="_sentrySpan";function _f(e,t){t?Lr(e,Nc,t):delete e[Nc]}function bf(e){return e[Nc]}var GO=100,ZO=class Cv{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=vf()}clone(){let t=new Cv;return t._breadcrumbs=[...this._breadcrumbs],t._tags=L({},this._tags),t._extra=L({},this._extra),t._contexts=L({},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=L({},this._sdkProcessingMetadata),t._propagationContext=L({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,_f(t,bf(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&&Dc(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=L(L({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=Qe(L({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=L(L({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=Qe(L({},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 Hn?[n.getScopeData(),n.getRequestSession()]:di(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:a,contexts:l,level:u,fingerprint:d=[],propagationContext:f}=r||{};return this._tags=L(L({},this._tags),o),this._extra=L(L({},this._extra),s),this._contexts=L(L({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),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,_f(this,void 0),this._attachments=[],this._propagationContext=vf(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:GO;if(r<=0)return this;let i=L({timestamp:Oo()},t),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,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:bf(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=L(L({},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:gn();if(!this._client)return _e.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(t,Qe(L({originalException:t,syntheticException:i},n),{event_id:r}),this),r}captureMessage(t,n,r){let i=r&&r.event_id?r.event_id:gn();if(!this._client)return _e.warn("No client configured on scope - will not capture message!"),i;let o=new Error(t);return this._client.captureMessage(t,n,Qe(L({originalException:t,syntheticException:o},r),{event_id:i}),this),i}captureEvent(t,n){let r=n&&n.event_id?n.event_id:gn();return this._client?(this._client.captureEvent(t,Qe(L({},n),{event_id:r}),this),r):(_e.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)}},Hn=ZO;function YO(){return yh("defaultCurrentScope",()=>new Hn)}function KO(){return yh("defaultIsolationScope",()=>new Hn)}var JO=class{constructor(e,t){let n;e?n=e:n=new Hn;let r;t?r=t:r=new Hn,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 xa(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 fi(){let e=Ca(),t=wh(e);return t.stack=t.stack||new JO(YO(),KO())}function QO(e){return fi().withScope(e)}function XO(e,t){let n=fi();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function wf(e){return fi().withScope(()=>e(fi().getIsolationScope()))}function eR(){return{withIsolationScope:wf,withScope:QO,withSetScope:XO,withSetIsolationScope:(e,t)=>wf(t),getCurrentScope:()=>fi().getScope(),getIsolationScope:()=>fi().getIsolationScope()}}function Eh(e){let t=wh(e);return t.acs?t.acs:eR()}function xh(){let e=Ca();return Eh(e).getCurrentScope()}function Tv(){let e=Ca();return Eh(e).getIsolationScope()}function tR(){return yh("globalScope",()=>new Hn)}function nR(...e){let t=Ca(),n=Eh(t);if(e.length===2){let[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Kt(){return xh().getClient()}var rR="_sentryMetrics";function iR(e){let t=e[rR];if(!t)return;let n={};for(let[,[r,i]]of t)(n[r]||(n[r]=[])).push(un(i));return n}var oR="sentry.source",sR="sentry.sample_rate",aR="sentry.op",lR="sentry.origin",cR=1;function uR(e){let{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=Ms(e);return un({parent_span_id:r,span_id:t,trace_id:n})}function Ef(e){return typeof e=="number"?xf(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?xf(e.getTime()):or()}function xf(e){return e>9999999999?e/1e3:e}function Ms(e){if(dR(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(hR(e)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:a,status:l}=e;return un({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:Ef(i),timestamp:Ef(s)||void 0,status:pR(l),op:r[aR],origin:r[lR],_metrics_summary:iR(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function hR(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function dR(e){return typeof e.getSpanJSON=="function"}function fR(e){let{traceFlags:t}=e.spanContext();return t===cR}function pR(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var gR="_sentryRootSpan";function Ov(e){return e[gR]||e}var Rv="production",mR="_frozenDsc";function Dv(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=un({environment:n.environment||Rv,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function yR(e){let t=Kt();if(!t)return{};let n=Dv(Ms(e).trace_id||"",t),r=Ov(e),i=r[mR];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),a=s&&AO(s);if(a)return a;let l=Ms(r),u=l.data||{},d=u[sR];d!=null&&(n.sample_rate=`${d}`);let f=u[oR],p=l.description;return f!=="url"&&p&&(n.transaction=p),n.sampled=String(fR(r)),t.emit("createDsc",n,r),n}function vR(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){ot&&_e.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 _R(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 bR(e,t,n,r){let i=Iv(n),o=L(L({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:Ia(t)}),s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Do(o,[s])}function wR(e,t,n,r){let i=Iv(n),o=e.type&&e.type!=="replay_event"?e.type:"event";_R(e,n&&n.sdk);let s=FO(e,i,r,t);return delete e.sdkProcessingMetadata,Do(s,[[{type:o},e]])}function kc(e,t,n,r=0){return new Ro((i,o)=>{let s=e[r];if(t===null||typeof s!="function")i(t);else{let a=s(L({},t),n);ot&&s.id&&a===null&&_e.log(`Event processor "${s.id}" dropped event`),xa(a)?a.then(l=>kc(e,l,n,r+1).then(i)).then(null,o):kc(e,a,n,r+1).then(i).then(null,o)}})}function ER(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;xR(e,t),r&&CR(e,r),TR(e,n),SR(e,i),IR(e,o)}function Sf(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:g,span:m}=t;Ri(e,"extra",n),Ri(e,"tags",r),Ri(e,"user",i),Ri(e,"contexts",o),Ri(e,"sdkProcessingMetadata",a),s&&(e.level=s),g&&(e.transactionName=g),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext=L(L({},e.propagationContext),p)}function Ri(e,t,n){if(n&&Object.keys(n).length){e[t]=L({},e[t]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function xR(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t,l=un(n);l&&Object.keys(l).length&&(e.extra=L(L({},l),e.extra));let u=un(r);u&&Object.keys(u).length&&(e.tags=L(L({},u),e.tags));let d=un(i);d&&Object.keys(d).length&&(e.user=L(L({},d),e.user));let f=un(o);f&&Object.keys(f).length&&(e.contexts=L(L({},f),e.contexts)),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function SR(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function IR(e,t){e.sdkProcessingMetadata=L(L({},e.sdkProcessingMetadata),t)}function CR(e,t){e.contexts=L({trace:uR(t)},e.contexts),e.sdkProcessingMetadata=L({dynamicSamplingContext:yR(t)},e.sdkProcessingMetadata);let n=Ov(t),r=Ms(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function TR(e,t){e.fingerprint=e.fingerprint?xO(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function OR(e,t,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l=Qe(L({},t),{event_id:t.event_id||n.event_id||gn(),timestamp:t.timestamp||Oo()}),u=n.integrations||e.integrations.map(b=>b.name);RR(l,e),kR(l,u),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&DR(l,e.stackParser);let d=PR(r,n.captureContext);n.mechanism&&ao(l,n.mechanism);let f=i?i.getEventProcessors():[],p=tR().getScopeData();if(o){let b=o.getScopeData();Sf(p,b)}if(d){let b=d.getScopeData();Sf(p,b)}let g=[...n.attachments||[],...p.attachments];g.length&&(n.attachments=g),ER(l,p);let m=[...f,...p.eventProcessors];return kc(m,l,n).then(b=>(b&&NR(b),typeof s=="number"&&s>0?AR(b,s,a):b))}function RR(e,t){let{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:Rv),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,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=si(s.value,o));let a=e.request;a&&a.url&&(a.url=si(a.url,o))}var If=new WeakMap;function DR(e,t){let n=$e._sentryDebugIds;if(!n)return;let r,i=If.get(t);i?r=i:(r=new Map,If.set(t,r));let o=Object.entries(n).reduce((s,[a,l])=>{let u,d=r.get(a);d?u=d:(u=t(a),r.set(a,u));for(let f=u.length-1;f>=0;f--){let p=u[f];if(p.filename){s[p.filename]=l;break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function NR(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 kR(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function AR(e,t,n){if(!e)return null;let r=L(L(L(L(L({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>L(L({},i),i.data&&{data:Jn(i.data,t,n)}))}),e.user&&{user:Jn(e.user,t,n)}),e.contexts&&{contexts:Jn(e.contexts,t,n)}),e.extra&&{extra:Jn(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=Jn(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>L(L({},i),i.data&&{data:Jn(i.data,t,n)}))),r}function PR(e,t){if(!t)return e;let n=e?e.clone():new Hn;return n.update(t),n}function LR(e){if(e)return MR(e)?{captureContext:e}:VR(e)?{captureContext:e}:e}function MR(e){return e instanceof Hn||typeof e=="function"}var jR=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function VR(e){return Object.keys(e).some(t=>jR.includes(t))}function BR(e,t){return xh().captureException(e,LR(t))}function Nv(e,t){return xh().captureEvent(e,t)}var FR="7";function UR(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function HR(e){return`${UR(e)}${e.projectId}/envelope/`}function $R(e,t){return iO(L({sentry_key:e.publicKey,sentry_version:FR},t&&{sentry_client:`${t.name}/${t.version}`}))}function zR(e,t,n){return t||`${HR(e)}?${$R(e,n)}`}var Cf=[];function qR(e,t){let n={};return t.forEach(r=>{r&&kv(e,r,n)}),n}function Tf(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function kv(e,t,n){if(n[t.name]){ot&&_e.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Cf.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Cf.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,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}ot&&_e.log(`Integration installed: ${t.name}`)}var Of="Not capturing exception because it's already been captured.",WR=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=rO(e.dsn):ot&&_e.warn("No DSN provided, client will not send events."),this._dsn){let t=zR(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(Qe(L({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){let r=gn();if(pf(e))return ot&&_e.log(Of),r;let i=L({event_id:r},t);return this._process(this.eventFromException(e,i).then(o=>this._captureEvent(o,i,n))),i.event_id}captureMessage(e,t,n,r){let i=L({event_id:gn()},n),o=gh(e)?e:String(e),s=mh(e)?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(s.then(a=>this._captureEvent(a,i,r))),i.event_id}captureEvent(e,t,n){let r=gn();if(t&&t.originalException&&pf(t.originalException))return ot&&_e.log(Of),r;let i=L({event_id:r},t),o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,o||n)),i.event_id}captureSession(e){typeof e.release!="string"?ot&&_e.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Dc(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))):jr(!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];kv(this,e,this._integrations),t||Tf(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=wR(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])n=LO(n,VO(i));let r=this.sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=bR(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;ot&&_e.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=>(ot&&_e.error("Error while sending event:",t),t)):(ot&&_e.error("Transport disabled"),jr({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=qR(this,e),Tf(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let s of i){let a=s.mechanism;if(a&&a.handled===!1){n=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&n)&&(Dc(e,Qe(L({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e))}_isClientDoneProcessing(e){return new Ro(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=Tv()){let i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),OR(i,e,t,n,this,r).then(s=>{if(s===null)return s;let a=L(L({},r.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(s.contexts&&s.contexts.trace)&&a){let{traceId:l,spanId:u,parentSpanId:d,dsc:f}=a;s.contexts=L({trace:un({trace_id:l,span_id:u,parent_span_id:d})},s.contexts);let p=f||Dv(l,this);s.sdkProcessingMetadata=L({dynamicSamplingContext:p},s.sdkProcessingMetadata)}return s})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(r=>r.event_id,r=>{if(ot){let i=r;i.logLevel==="log"?_e.log(i.message):_e.warn(i)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,o=Ac(e),s=Av(e),a=e.type||"error",l=`before send for type \`${a}\``,u=typeof i>"u"?void 0:vR(i);if(s&&typeof u=="number"&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",e),Ls(new xn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let d=a==="replay_event"?"replay":a,f=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,f).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",d,e),new xn("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return p;let g=ZR(this,r,p,t);return GR(g,l)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",d,e),Ac(e)){let b=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+b}throw new xn(`${l} returned \`null\`, will not send event.`,"log")}let g=n&&n.getSession();!o&&g&&this._updateSessionFromEvent(g,p);let m=p.transaction_info;if(o&&m&&p.transaction!==e.transaction){let b="custom";p.transaction_info=Qe(L({},m),{source:b})}return this.sendEvent(p,t),p}).then(null,p=>{throw p instanceof xn?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new xn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
29
|
+
Reason: ${p}`))})}_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 GR(e,t){let n=`${t} must return \`null\` or a valid event.`;if(xa(e))return e.then(r=>{if(!di(r)&&r!==null)throw new xn(n);return r},r=>{throw new xn(`${t} rejected with ${r}`)});if(!di(e)&&e!==null)throw new xn(n);return e}function ZR(e,t,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=t;if(Av(n)&&i)return i(n,r);if(Ac(n)){if(n.spans&&s){let a=[];for(let l of n.spans){let u=s(l);u?a.push(u):e.recordDroppedEvent("before_send","span")}n.spans=a}if(o)return o(n,r)}return n}function Av(e){return e.type===void 0}function Ac(e){return e.type==="transaction"}var YR=64;function KR(e,t,n=OO(e.bufferSize||YR)){let r={},i=s=>n.drain(s);function o(s){let a=[];if(mf(s,(f,p)=>{let g=yf(p);if(zO(r,g)){let m=Rf(f,p);e.recordDroppedEvent("ratelimit_backoff",g,m)}else a.push(f)}),a.length===0)return jr({});let l=Do(s[0],a),u=f=>{mf(l,(p,g)=>{let m=Rf(p,g);e.recordDroppedEvent(f,yf(g),m)})},d=()=>t({body:MO(l)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&ot&&_e.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=qO(r,f),f),f=>{throw u("network_error"),f});return n.add(d).then(f=>f,f=>{if(f instanceof xn)return ot&&_e.error("Skipped sending event because buffer is full."),u("queue_overflow"),jr({});throw f})}return{send:o,flush:i}}function Rf(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function JR(e,t,n=[t],r="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:xr})),version:xr}),e._metadata=i}var QR=100;function Vr(e,t){let n=Kt(),r=Tv();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=QR}=n.getOptions();if(o<=0)return;let s=Oo(),a=L({timestamp:s},e),l=i?_h(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,o))}var Df,XR="FunctionToString",Nf=new WeakMap,e2=()=>({name:XR,setupOnce(){Df=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=bh(this),n=Nf.has(Kt())&&t!==void 0?t:this;return Df.apply(n,e)}}catch{}},setup(e){Nf.set(e,!0)}}),t2=e2,n2=[/^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"],r2="InboundFilters",i2=(e={})=>({name:r2,processEvent(t,n,r){let i=r.getOptions(),o=s2(e,i);return a2(t,o)?null:t}}),o2=i2;function s2(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:n2],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function a2(e,t){return t.ignoreInternal&&f2(e)?(ot&&_e.warn(`Event dropped due to being internal Sentry Error.
|
|
30
|
+
Event: ${Kn(e)}`),!0):l2(e,t.ignoreErrors)?(ot&&_e.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
31
|
+
Event: ${Kn(e)}`),!0):g2(e)?(ot&&_e.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
32
|
+
Event: ${Kn(e)}`),!0):c2(e,t.ignoreTransactions)?(ot&&_e.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
33
|
+
Event: ${Kn(e)}`),!0):u2(e,t.denyUrls)?(ot&&_e.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
34
|
+
Event: ${Kn(e)}.
|
|
35
|
+
Url: ${js(e)}`),!0):h2(e,t.allowUrls)?!1:(ot&&_e.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
36
|
+
Event: ${Kn(e)}.
|
|
37
|
+
Url: ${js(e)}`),!0)}function l2(e,t){return e.type||!t||!t.length?!1:d2(e).some(n=>Sa(n,t))}function c2(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?Sa(n,t):!1}function u2(e,t){if(!t||!t.length)return!1;let n=js(e);return n?Sa(n,t):!1}function h2(e,t){if(!t||!t.length)return!0;let n=js(e);return n?Sa(n,t):!0}function d2(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 f2(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function p2(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 js(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?p2(t):null}catch{return ot&&_e.error(`Cannot extract url for event ${Kn(e)}`),null}}function g2(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 m2="Dedupe",y2=()=>{let e;return{name:m2,processEvent(t){if(t.type)return t;try{if(_2(t,e))return ot&&_e.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},v2=y2;function _2(e,t){return t?!!(b2(e,t)||w2(e,t)):!1}function b2(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Lv(e,t)||!Pv(e,t))}function w2(e,t){let n=kf(t),r=kf(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Lv(e,t)||!Pv(e,t))}function Pv(e,t){let n=hf(e),r=hf(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 o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function Lv(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 kf(e){return e.exception&&e.exception.values&&e.exception.values[0]}var It=$e,Pc=0;function Mv(){return Pc>0}function E2(){Pc++,setTimeout(()=>{Pc--})}function pi(e,t={},n){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(bh(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 o=i.map(s=>pi(s,t));return e.apply(this,o)}catch(o){throw E2(),nR(s=>{s.addEventProcessor(a=>(t.mechanism&&(Tc(a,void 0,void 0),ao(a,t.mechanism)),a.extra=Qe(L({},a.extra),{arguments:i}),a)),BR(o)}),o}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}bv(r,e),Lr(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var ei=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Sh(e,t){let n=Ih(e,t),r={type:t&&t.name,value:T2(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function x2(e,t,n,r){let i=Kt(),o=i&&i.getOptions().normalizeDepth,s=k2(t),a={__serialized__:Sv(t,o)};if(s)return{exception:{values:[Sh(e,s)]},extra:a};let l={exception:{values:[{type:Ea(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:D2(t,{isUnhandledRejection:r})}]},extra:a};if(n){let u=Ih(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function pl(e,t){return{exception:{values:[Sh(e,t)]}}}function Ih(e,t){let n=t.stacktrace||t.stack||"",r=I2(t),i=C2(t);try{return e(n,r,i)}catch{}return[]}var S2=/Minified React error #\d+;/i;function I2(e){return e&&S2.test(e.message)?1:0}function C2(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function T2(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function O2(e,t,n,r){let i=n&&n.syntheticException||void 0,o=Ch(e,t,i,r);return ao(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),jr(o)}function R2(e,t,n="info",r,i){let o=r&&r.syntheticException||void 0,s=Lc(e,t,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),jr(s)}function Ch(e,t,n,r,i){let o;if(mv(t)&&t.error)return pl(e,t.error);if(nf(t)||FT(t)){let s=t;if("stack"in t)o=pl(e,t);else{let a=s.name||(nf(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;o=Lc(e,l,n,r),Tc(o,l)}return"code"in s&&(o.tags=Qe(L({},o.tags),{"DOMException.code":`${s.code}`})),o}return ph(t)?pl(e,t):di(t)||Ea(t)?(o=x2(e,t,n,i),ao(o,{synthetic:!0}),o):(o=Lc(e,t,n,r),Tc(o,`${t}`,void 0),ao(o,{synthetic:!0}),o)}function Lc(e,t,n,r){let i={};if(r&&n){let o=Ih(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]})}if(gh(t)){let{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function D2(e,{isUnhandledRejection:t}){let n=oO(e),r=t?"promise rejection":"exception";return mv(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ea(e)?`Event \`${N2(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function N2(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function k2(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function A2(e,{metadata:t,tunnel:n,dsn:r}){let i=L(L({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:Ia(r)}),o=P2(e);return Do(i,[o])}function P2(e){return[{type:"user_report"},e]}var L2=class extends WR{constructor(e){let t=L({parentSpanIsAlwaysRootSpan:!0},e),n=It.SENTRY_SDK_SOURCE||wO();JR(t,"browser",["browser"],n),super(t),t.sendClientReports&&It.document&&It.document.addEventListener("visibilitychange",()=>{It.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return O2(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return R2(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){ei&&_e.warn("SDK not enabled, will not capture user feedback.");return}let t=A2(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){ei&&_e.log("No outcomes to send");return}if(!this._dsn){ei&&_e.log("No dsn provided, will not send outcomes");return}ei&&_e.log("Sending outcomes:",e);let t=UO(e,this._options.tunnel&&Ia(this._dsn));this.sendEnvelope(t)}},M2=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Rt=$e,j2=1e3,Af,Mc,jc;function V2(e){let t="dom";$r(t,e),zr(t,B2)}function B2(){if(!Rt.document)return;let e=pn.bind(null,"dom"),t=Pf(e,!0);Rt.document.addEventListener("click",t,!1),Rt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=Rt[n]&&Rt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Ot(r,"addEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){let f=Pf(e);d.handler=f,i.call(this,o,f,a)}d.refCount++}catch{}return i.call(this,o,s,a)}}),Ot(r,"removeEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(i.call(this,o,d.handler,a),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,a)}}))})}function F2(e){if(e.type!==Mc)return!1;try{if(!e.target||e.target._sentryId!==jc)return!1}catch{}return!0}function U2(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Pf(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=H2(n);if(U2(n.type,r))return;Lr(n,"_sentryCaptured",!0),r&&!r._sentryId&&Lr(r,"_sentryId",gn());let i=n.type==="keypress"?"input":n.type;F2(n)||(e({event:n,name:i,global:t}),Mc=n.type,jc=r?r._sentryId:void 0),clearTimeout(Af),Af=Rt.setTimeout(()=>{jc=void 0,Mc=void 0},j2)}}function H2(e){try{return e.target}catch{return null}}var qo;function $2(e){let t="history";$r(t,e),zr(t,z2)}function z2(){if(!WO())return;let e=Rt.onpopstate;Rt.onpopstate=function(...n){let r=Rt.location.href,i=qo;if(qo=r,pn("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 o=qo,s=String(i);qo=s,pn("history",{from:o,to:s})}return n.apply(this,r)}}Ot(Rt.history,"pushState",t),Ot(Rt.history,"replaceState",t)}var as={};function q2(e){let t=as[e];if(t)return t;let n=Rt[e];if(Ic(n))return as[e]=n.bind(Rt);let r=Rt.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o&&o[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){M2&&_e.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(as[e]=n.bind(Rt))}function Lf(e){as[e]=void 0}var ji="__sentry_xhr_v3__";function W2(e){let t="xhr";$r(t,e),zr(t,G2)}function G2(){if(!Rt.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Ot(e,"open",function(t){return function(...n){let r=or()*1e3,i=Mn(n[0])?n[0].toUpperCase():void 0,o=Z2(n[1]);if(!i||!o)return t.apply(this,n);this[ji]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[ji];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:or()*1e3,startTimestamp:r,xhr:this};pn("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ot(this,"onreadystatechange",function(a){return function(...l){return s(),a.apply(this,l)}}):this.addEventListener("readystatechange",s),Ot(this,"setRequestHeader",function(a){return function(...l){let[u,d]=l,f=this[ji];return f&&Mn(u)&&Mn(d)&&(f.request_headers[u.toLowerCase()]=d),a.apply(this,l)}}),t.apply(this,n)}}),Ot(e,"send",function(t){return function(...n){let r=this[ji];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:or()*1e3,xhr:this};return pn("xhr",i),t.apply(this,n)}})}function Z2(e){if(Mn(e))return e;try{return e.toString()}catch{}}function Y2(e,t=q2("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let a=L({body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);if(!t)return Lf("fetch"),Ls("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=s,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 Lf("fetch"),n-=s,r--,Ls(l)}}return KR(e,i)}var K2=30,J2=50;function Vc(e,t,n,r){let i={filename:e,function:t==="<anonymous>"?Mr:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Q2=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,X2=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,eD=/\((\S*)(?::(\d+))(?::(\d+))\)/,tD=e=>{let t=Q2.exec(e);if(t){let[,r,i,o]=t;return Vc(r,Mr,+i,+o)}let n=X2.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let o=eD.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}let[r,i]=jv(n[1]||Mr,n[2]);return Vc(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},nD=[K2,tD],rD=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,iD=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,oD=e=>{let t=rD.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=iD.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]||Mr;return[r,n]=jv(r,n),Vc(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},sD=[J2,oD],aD=[nD,sD],lD=aO(...aD),jv=(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]:Mr,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Wo=1024,cD="Breadcrumbs",uD=(e={})=>{let t=L({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:cD,setup(n){t.console&&cO(pD(n)),t.dom&&V2(fD(n,t.dom)),t.xhr&&W2(gD(n)),t.fetch&&pO(mD(n)),t.history&&$2(yD(n)),t.sentry&&n.on("beforeSendEvent",dD(n))}}},hD=uD;function dD(e){return function(t){Kt()===e&&Vr({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Kn(t)},{event:t})}}function fD(e,t){return function(n){if(Kt()!==e)return;let r,i,o=typeof t=="object"?t.serializeAttribute:void 0,s=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;s&&s>Wo&&(ei&&_e.warn(`\`dom.maxStringLength\` cannot exceed ${Wo}, but a value of ${s} was configured. Sentry will use ${Wo} instead.`),s=Wo),typeof o=="string"&&(o=[o]);try{let l=n.event,u=vD(l)?l.target:l;r=vv(u,{keyAttrs:o,maxStringLength:s}),i=KT(u)}catch{r="<unknown>"}if(r.length===0)return;let a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),Vr(a,{event:n.event,name:n.name,global:n.global})}}function pD(e){return function(t){if(Kt()!==e)return;let n={category:"console",data:{arguments:t.args,logger:"console"},level:DO(t.level),message:rf(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${rf(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1);else return;Vr(n,{input:t.args,level:t.level})}}function gD(e){return function(t){if(Kt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[ji];if(!n||!r||!i)return;let{method:o,url:s,status_code:a,body:l}=i,u={method:o,url:s,status_code:a},d={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r};Vr({category:"xhr",data:u,type:"http"},d)}}function mD(e){return function(t){if(Kt()!==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,o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};Vr({category:"fetch",data:i,level:"error",type:"http"},o)}else{let i=t.response,o=Qe(L({},t.fetchData),{status_code:i&&i.status}),s={input:t.args,response:i,startTimestamp:n,endTimestamp:r};Vr({category:"fetch",data:o,type:"http"},s)}}}function yD(e){return function(t){if(Kt()!==e)return;let n=t.from,r=t.to,i=fl(It.location.href),o=n?fl(n):void 0,s=fl(r);(!o||!o.path)&&(o=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Vr({category:"navigation",data:{from:n,to:r}})}}function vD(e){return!!e&&!!e.target}var _D=["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"],bD="BrowserApiErrors",wD=(e={})=>{let t=L({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:bD,setupOnce(){t.setTimeout&&Ot(It,"setTimeout",Mf),t.setInterval&&Ot(It,"setInterval",Mf),t.requestAnimationFrame&&Ot(It,"requestAnimationFrame",xD),t.XMLHttpRequest&&"XMLHttpRequest"in It&&Ot(XMLHttpRequest.prototype,"send",SD);let n=t.eventTarget;n&&(Array.isArray(n)?n:_D).forEach(ID)}}},ED=wD;function Mf(e){return function(...t){let n=t[0];return t[0]=pi(n,{mechanism:{data:{function:cr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function xD(e){return function(t){return e.apply(this,[pi(t,{mechanism:{data:{function:"requestAnimationFrame",handler:cr(e)},handled:!1,type:"instrument"}})])}}function SD(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Ot(n,r,function(i){let o={mechanism:{data:{function:r,handler:cr(i)},handled:!1,type:"instrument"}},s=bh(i);return s&&(o.mechanism.data.handler=cr(s)),pi(i,o)})}),e.apply(this,t)}}function ID(e){let t=It,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Ot(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=pi(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:cr(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,pi(o,{mechanism:{data:{function:"addEventListener",handler:cr(o),target:e},handled:!1,type:"instrument"}}),s])}}),Ot(n,"removeEventListener",function(r){return function(i,o,s){let a=o;try{let l=a&&a.__sentry_wrapped__;l&&r.call(this,i,l,s)}catch{}return r.call(this,i,a,s)}}))}var CD="GlobalHandlers",TD=(e={})=>{let t=L({onerror:!0,onunhandledrejection:!0},e);return{name:CD,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(RD(n),jf("onerror")),t.onunhandledrejection&&(DD(n),jf("onunhandledrejection"))}}},OD=TD;function RD(e){yO(t=>{let{stackParser:n,attachStacktrace:r}=Vv();if(Kt()!==e||Mv())return;let{msg:i,url:o,line:s,column:a,error:l}=t,u=AD(Ch(n,l||i,void 0,r,!1),o,s,a);u.level="error",Nv(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function DD(e){_O(t=>{let{stackParser:n,attachStacktrace:r}=Vv();if(Kt()!==e||Mv())return;let i=ND(t),o=mh(i)?kD(i):Ch(n,i,void 0,r,!0);o.level="error",Nv(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function ND(e){if(mh(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 kD(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function AD(e,t,n,r){let i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,f=Mn(t)&&t.length>0?t:YT();return l.length===0&&l.push({colno:u,filename:f,function:Mr,in_app:!0,lineno:d}),e}function jf(e){ei&&_e.log(`Global Handler attached: ${e}`)}function Vv(){let e=Kt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var PD=()=>({name:"HttpContext",preprocessEvent(e){if(!It.navigator&&!It.location&&!It.document)return;let t=e.request&&e.request.url||It.location&&It.location.href,{referrer:n}=It.document||{},{userAgent:r}=It.navigator||{},i=L(L(L({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=Qe(L(L({},e.request),t&&{url:t}),{headers:i});e.request=o}}),LD="cause",MD=5,jD="LinkedErrors",VD=(e={})=>{let t=e.limit||MD,n=e.key||LD;return{name:jD,preprocessEvent(r,i,o){let s=o.getOptions();qT(Sh,s.stackParser,s.maxValueLength,n,t,r,i)}}},BD=VD;function FD(e){return[o2(),t2(),ED(),hD(),OD(),BD(),v2(),PD()]}var UD=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},Bv=class Fv{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Fv),this.INSTANCE}captureException(t,n,r){Ct.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){Ct.error(t,n);let o=this.getNewScope(r,i),s=new UD(t,n);o.captureException(s)}setGlobalContext(t,n){this.contexts[t]=L({context:n},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,n){let r=new Hn;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",Ta.getTimezone()),r}init(){let t=FD({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new L2({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Y2,stackParser:lD,integrations:t,environment:so.mode,release:`web-sdk@${wt.SDK_VERSION}`,debug:so.debug}),this.client.init()}},Ta=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=jT.get(),r=dv.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||Ct.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,a;if(s&&i===o)a=LT.format(e*100,s);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(u){return Bv.getInstance().captureException(u,{currentCurrency:o,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(a=a.concat(` ${o}`))}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 o=Math.min(100*2**r,5e3);if(await VT.JSUtils.sleep(o),i=n.querySelectorAll(e),i.length)return Ct.debug(`Attempt ${r+1}: ${i.length} elements found with ${e}`),i;Ct.debug(`Attempt ${r+1}: Elements not found with ${e}. Retrying after ${o}ms.`),r++}return Ct.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 retrySelectors(e,t=10,n=document){let r=await this.retrySelectorForElements(e,t,n);return Array.from(r)}static async getCartAttributes(){let e=await bc.get(As.DEVICE_ID),t=await BT.get(As.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(o=>{o.removedNodes.forEach(s=>{(s===e||s.contains(e))&&(t(),r.disconnect())})})});r.observe(n,{childList:!0})}},Oa=class Bc{transform(t){return t==null?null:Ta.formatCurrency(t)}static \u0275fac=function(t){return new(t||Bc)};static \u0275pipe=lh({name:"cooeeCurrency",type:Bc,pure:!0})},HD=an(O0()),$D=Object.prototype.toString,Ii=Array.isArray||function(e){return $D.call(e)==="[object Array]"};function Th(e){return typeof e=="function"}function zD(e){return Ii(e)?"array":typeof e}function gl(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Vf(e,t){return e!=null&&typeof e=="object"&&t in e}function qD(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var WD=RegExp.prototype.test;function GD(e,t){return WD.call(e,t)}var ZD=/\S/;function YD(e){return!GD(ZD,e)}var KD={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function JD(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return KD[t]})}var QD=/\s*/,XD=/\s+/,Bf=/\s*=/,eN=/\s*\}/,tN=/#|\^|\/|>|\{|&|=|!/;function nN(e,t){if(!e)return[];var n=!1,r=[],i=[],o=[],s=!1,a=!1,l="",u=0;function d(){if(s&&!a)for(;o.length;)delete i[o.pop()];else o=[];s=!1,a=!1}var f,p,g;function m(B){if(typeof B=="string"&&(B=B.split(XD,2)),!Ii(B)||B.length!==2)throw new Error("Invalid tags: "+B);f=new RegExp(gl(B[0])+"\\s*"),p=new RegExp("\\s*"+gl(B[1])),g=new RegExp("\\s*"+gl("}"+B[1]))}m(t||sn.tags);for(var b=new No(e),I,A,$,j,k,G;!b.eos();){if(I=b.pos,$=b.scanUntil(f),$)for(var Pe=0,We=$.length;Pe<We;++Pe)j=$.charAt(Pe),YD(j)?(o.push(i.length),l+=j):(a=!0,n=!0,l+=" "),i.push(["text",j,I,I+1]),I+=1,j===`
|
|
38
|
+
`&&(d(),l="",u=0,n=!1);if(!b.scan(f))break;if(s=!0,A=b.scan(tN)||"name",b.scan(QD),A==="="?($=b.scanUntil(Bf),b.scan(Bf),b.scanUntil(p)):A==="{"?($=b.scanUntil(g),b.scan(eN),b.scanUntil(p),A="&"):$=b.scanUntil(p),!b.scan(p))throw new Error("Unclosed tag at "+b.pos);if(A==">"?k=[A,$,I,b.pos,l,u,n]:k=[A,$,I,b.pos],u++,i.push(k),A==="#"||A==="^")r.push(k);else if(A==="/"){if(G=r.pop(),!G)throw new Error('Unopened section "'+$+'" at '+I);if(G[1]!==$)throw new Error('Unclosed section "'+G[1]+'" at '+I)}else A==="name"||A==="{"||A==="&"?a=!0:A==="="&&m($)}if(d(),G=r.pop(),G)throw new Error('Unclosed section "'+G[1]+'" at '+b.pos);return iN(rN(i))}function rN(e){for(var t=[],n,r,i=0,o=e.length;i<o;++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 iN(e){for(var t=[],n=t,r=[],i,o,s=0,a=e.length;s<a;++s)switch(i=e[s],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":o=r.pop(),o[5]=i[2],n=r.length>0?r[r.length-1][4]:t;break;default:n.push(i)}return t}function No(e){this.string=e,this.tail=e,this.pos=0}No.prototype.eos=function(){return this.tail===""};No.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};No.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 gi(e,t){this.view=e,this.cache={".":this.view},this.parent=t}gi.prototype.push=function(e){return new gi(e,this)};gi.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var r=this,i,o,s,a=!1;r;){if(e.indexOf(".")>0)for(i=r.view,o=e.split("."),s=0;i!=null&&s<o.length;)s===o.length-1&&(a=Vf(i,o[s])||qD(i,o[s])),i=i[o[s++]];else i=r.view[e],a=Vf(r.view,e);if(a){n=i;break}r=r.parent}t[e]=n}return Th(n)&&(n=n.call(this.view)),n};function Bt(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Bt.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Bt.prototype.parse=function(e,t){var n=this.templateCache,r=e+":"+(t||sn.tags).join(":"),i=typeof n<"u",o=i?n.get(r):void 0;return o==null&&(o=nN(e,t),i&&n.set(r,o)),o};Bt.prototype.render=function(e,t,n,r){var i=this.getConfigTags(r),o=this.parse(e,i),s=t instanceof gi?t:new gi(t,void 0);return this.renderTokens(o,s,n,e,r)};Bt.prototype.renderTokens=function(e,t,n,r,i){for(var o="",s,a,l,u=0,d=e.length;u<d;++u)l=void 0,s=e[u],a=s[0],a==="#"?l=this.renderSection(s,t,n,r,i):a==="^"?l=this.renderInverted(s,t,n,r,i):a===">"?l=this.renderPartial(s,t,n,i):a==="&"?l=this.unescapedValue(s,t):a==="name"?l=this.escapedValue(s,t,i):a==="text"&&(l=this.rawValue(s)),l!==void 0&&(o+=l);return o};Bt.prototype.renderSection=function(e,t,n,r,i){var o=this,s="",a=t.lookup(e[1]);function l(f){return o.render(f,t,n,i)}if(a){if(Ii(a))for(var u=0,d=a.length;u<d;++u)s+=this.renderTokens(e[4],t.push(a[u]),n,r,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")s+=this.renderTokens(e[4],t.push(a),n,r,i);else if(Th(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&&(s+=a)}else s+=this.renderTokens(e[4],t,n,r,i);return s}};Bt.prototype.renderInverted=function(e,t,n,r,i){var o=t.lookup(e[1]);if(!o||Ii(o)&&o.length===0)return this.renderTokens(e[4],t,n,r,i)};Bt.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),i=e.split(`
|
|
39
|
+
`),o=0;o<i.length;o++)i[o].length&&(o>0||!n)&&(i[o]=r+i[o]);return i.join(`
|
|
40
|
+
`)};Bt.prototype.renderPartial=function(e,t,n,r){if(n){var i=this.getConfigTags(r),o=Th(n)?n(e[1]):n[e[1]];if(o!=null){var s=e[6],a=e[5],l=e[4],u=o;a==0&&l&&(u=this.indentPartial(o,l,s));var d=this.parse(u,i);return this.renderTokens(d,t,n,u,r)}}};Bt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Bt.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||sn.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&r===sn.escape?String(i):r(i)};Bt.prototype.rawValue=function(e){return e[1]};Bt.prototype.getConfigTags=function(e){return Ii(e)?e:e&&typeof e=="object"?e.tags:void 0};Bt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ii(e))return e.escape};var sn={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){lo.templateCache=e},get templateCache(){return lo.templateCache}},lo=new Bt;sn.clearCache=function(){return lo.clearCache()};sn.parse=function(e,t){return lo.parse(e,t)};sn.render=function(e,t,n,r){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+zD(e)+'" was given as the first argument for mustache#render(template, view, partials)');return lo.render(e,t,n,r)};sn.escape=JD;sn.Scanner=No;sn.Context=gi;sn.Writer=Bt;var Uv=sn;Uv.escape=HD.MustacheUtils.escapeHtml;var oN=class Fc{transform(t,n){return t?Uv.render(t,L({},n)):null}static \u0275fac=function(t){return new(t||Fc)};static \u0275pipe=lh({name:"cooeeDynamicVariables",type:Fc,pure:!0})},Oh={};(function e(t,n,r,i){var o=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var C=new OffscreenCanvas(1,1),S=C.getContext("2d");S.fillRect(0,0,1,1);var q=C.transferToImageBitmap();try{S.createPattern(q,"no-repeat")}catch{return!1}return!0}();function l(){}function u(C){var S=n.exports.Promise,q=S!==void 0?S:t.Promise;return typeof q=="function"?new q(C):(C(l,l),null)}var d=function(C,S){return{transform:function(q){if(C)return q;if(S.has(q))return S.get(q);var J=new OffscreenCanvas(q.width,q.height),Q=J.getContext("2d");return Q.drawImage(q,0,0),S.set(q,J),J},clear:function(){S.clear()}}}(a,new Map),f=function(){var C=Math.floor(16.666666666666668),S,q,J={},Q=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(S=function(se){var oe=Math.random();return J[oe]=requestAnimationFrame(function te(pe){Q===pe||Q+C-1<pe?(Q=pe,delete J[oe],se()):J[oe]=requestAnimationFrame(te)}),oe},q=function(se){J[se]&&cancelAnimationFrame(J[se])}):(S=function(se){return setTimeout(se,C)},q=function(se){return clearTimeout(se)}),{frame:S,cancel:q}}(),p=function(){var C,S,q={};function J(Q){function se(oe,te){Q.postMessage({options:oe||{},callback:te})}Q.init=function(oe){var te=oe.transferControlToOffscreen();Q.postMessage({canvas:te},[te])},Q.fire=function(oe,te,pe){if(S)return se(oe,null),S;var xe=Math.random().toString(36).slice(2);return S=u(function(Ke){function Se(De){De.data.callback===xe&&(delete q[xe],Q.removeEventListener("message",Se),S=null,d.clear(),pe(),Ke())}Q.addEventListener("message",Se),se(oe,xe),q[xe]=Se.bind(null,{data:{callback:xe}})}),S},Q.reset=function(){Q.postMessage({reset:!0});for(var oe in q)q[oe](),delete q[oe]}}return function(){if(C)return C;if(!r&&o){var Q=["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{C=new Worker(URL.createObjectURL(new Blob([Q])))}catch(se){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",se),null}J(C)}return C}}(),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(C,S){return S?S(C):C}function b(C){return C!=null}function I(C,S,q){return m(C&&b(C[S])?C[S]:g[S],q)}function A(C){return C<0?0:Math.floor(C)}function $(C,S){return Math.floor(Math.random()*(S-C))+C}function j(C){return parseInt(C,16)}function k(C){return C.map(G)}function G(C){var S=String(C).replace(/[^0-9a-f]/gi,"");return S.length<6&&(S=S[0]+S[0]+S[1]+S[1]+S[2]+S[2]),{r:j(S.substring(0,2)),g:j(S.substring(2,4)),b:j(S.substring(4,6))}}function Pe(C){var S=I(C,"origin",Object);return S.x=I(S,"x",Number),S.y=I(S,"y",Number),S}function We(C){C.width=document.documentElement.clientWidth,C.height=document.documentElement.clientHeight}function B(C){var S=C.getBoundingClientRect();C.width=S.width,C.height=S.height}function le(C){var S=document.createElement("canvas");return S.style.position="fixed",S.style.top="0px",S.style.left="0px",S.style.pointerEvents="none",S.style.zIndex=C,S}function ne(C,S,q,J,Q,se,oe,te,pe){C.save(),C.translate(S,q),C.rotate(se),C.scale(J,Q),C.arc(0,0,1,oe,te,pe),C.restore()}function ye(C){var S=C.angle*(Math.PI/180),q=C.spread*(Math.PI/180);return{x:C.x,y:C.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:C.startVelocity*.5+Math.random()*C.startVelocity,angle2D:-S+(.5*q-Math.random()*q),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:C.color,shape:C.shape,tick:0,totalTicks:C.ticks,decay:C.decay,drift:C.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:C.gravity*3,ovalScalar:.6,scalar:C.scalar,flat:C.flat}}function Ve(C,S){S.x+=Math.cos(S.angle2D)*S.velocity+S.drift,S.y+=Math.sin(S.angle2D)*S.velocity+S.gravity,S.velocity*=S.decay,S.flat?(S.wobble=0,S.wobbleX=S.x+10*S.scalar,S.wobbleY=S.y+10*S.scalar,S.tiltSin=0,S.tiltCos=0,S.random=1):(S.wobble+=S.wobbleSpeed,S.wobbleX=S.x+10*S.scalar*Math.cos(S.wobble),S.wobbleY=S.y+10*S.scalar*Math.sin(S.wobble),S.tiltAngle+=.1,S.tiltSin=Math.sin(S.tiltAngle),S.tiltCos=Math.cos(S.tiltAngle),S.random=Math.random()+2);var q=S.tick++/S.totalTicks,J=S.x+S.random*S.tiltCos,Q=S.y+S.random*S.tiltSin,se=S.wobbleX+S.random*S.tiltCos,oe=S.wobbleY+S.random*S.tiltSin;if(C.fillStyle="rgba("+S.color.r+", "+S.color.g+", "+S.color.b+", "+(1-q)+")",C.beginPath(),s&&S.shape.type==="path"&&typeof S.shape.path=="string"&&Array.isArray(S.shape.matrix))C.fill(Te(S.shape.path,S.shape.matrix,S.x,S.y,Math.abs(se-J)*.1,Math.abs(oe-Q)*.1,Math.PI/10*S.wobble));else if(S.shape.type==="bitmap"){var te=Math.PI/10*S.wobble,pe=Math.abs(se-J)*.1,xe=Math.abs(oe-Q)*.1,Ke=S.shape.bitmap.width*S.scalar,Se=S.shape.bitmap.height*S.scalar,De=new DOMMatrix([Math.cos(te)*pe,Math.sin(te)*pe,-Math.sin(te)*xe,Math.cos(te)*xe,S.x,S.y]);De.multiplySelf(new DOMMatrix(S.shape.matrix));var Je=C.createPattern(d.transform(S.shape.bitmap),"no-repeat");Je.setTransform(De),C.globalAlpha=1-q,C.fillStyle=Je,C.fillRect(S.x-Ke/2,S.y-Se/2,Ke,Se),C.globalAlpha=1}else if(S.shape==="circle")C.ellipse?C.ellipse(S.x,S.y,Math.abs(se-J)*S.ovalScalar,Math.abs(oe-Q)*S.ovalScalar,Math.PI/10*S.wobble,0,2*Math.PI):ne(C,S.x,S.y,Math.abs(se-J)*S.ovalScalar,Math.abs(oe-Q)*S.ovalScalar,Math.PI/10*S.wobble,0,2*Math.PI);else if(S.shape==="star")for(var ve=Math.PI/2*3,c=4*S.scalar,h=8*S.scalar,y=S.x,x=S.y,D=5,M=Math.PI/D;D--;)y=S.x+Math.cos(ve)*h,x=S.y+Math.sin(ve)*h,C.lineTo(y,x),ve+=M,y=S.x+Math.cos(ve)*c,x=S.y+Math.sin(ve)*c,C.lineTo(y,x),ve+=M;else C.moveTo(Math.floor(S.x),Math.floor(S.y)),C.lineTo(Math.floor(S.wobbleX),Math.floor(Q)),C.lineTo(Math.floor(se),Math.floor(oe)),C.lineTo(Math.floor(J),Math.floor(S.wobbleY));return C.closePath(),C.fill(),S.tick<S.totalTicks}function Ue(C,S,q,J,Q){var se=S.slice(),oe=C.getContext("2d"),te,pe,xe=u(function(Ke){function Se(){te=pe=null,oe.clearRect(0,0,J.width,J.height),d.clear(),Q(),Ke()}function De(){r&&!(J.width===i.width&&J.height===i.height)&&(J.width=C.width=i.width,J.height=C.height=i.height),!J.width&&!J.height&&(q(C),J.width=C.width,J.height=C.height),oe.clearRect(0,0,J.width,J.height),se=se.filter(function(Je){return Ve(oe,Je)}),se.length?te=f.frame(De):Se()}te=f.frame(De),pe=Se});return{addFettis:function(Ke){return se=se.concat(Ke),xe},canvas:C,promise:xe,reset:function(){te&&f.cancel(te),pe&&pe()}}}function _(C,S){var q=!C,J=!!I(S||{},"resize"),Q=!1,se=I(S,"disableForReducedMotion",Boolean),oe=o&&!!I(S||{},"useWorker"),te=oe?p():null,pe=q?We:B,xe=C&&te?!!C.__confetti_initialized:!1,Ke=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,Se;function De(ve,c,h){for(var y=I(ve,"particleCount",A),x=I(ve,"angle",Number),D=I(ve,"spread",Number),M=I(ve,"startVelocity",Number),W=I(ve,"decay",Number),Ne=I(ve,"gravity",Number),Ie=I(ve,"drift",Number),be=I(ve,"colors",k),He=I(ve,"ticks",Number),Z=I(ve,"shapes"),ge=I(ve,"scalar"),re=!!I(ve,"flat"),ke=Pe(ve),kt=y,St=[],Ae=C.width*ke.x,ie=C.height*ke.y;kt--;)St.push(ye({x:Ae,y:ie,angle:x,spread:D,startVelocity:M,color:be[kt%be.length],shape:Z[$(0,Z.length)],ticks:He,decay:W,gravity:Ne,drift:Ie,scalar:ge,flat:re}));return Se?Se.addFettis(St):(Se=Ue(C,St,pe,c,h),Se.promise)}function Je(ve){var c=se||I(ve,"disableForReducedMotion",Boolean),h=I(ve,"zIndex",Number);if(c&&Ke)return u(function(M){M()});q&&Se?C=Se.canvas:q&&!C&&(C=le(h),document.body.appendChild(C)),J&&!xe&&pe(C);var y={width:C.width,height:C.height};te&&!xe&&te.init(C),xe=!0,te&&(C.__confetti_initialized=!0);function x(){if(te){var M={getBoundingClientRect:function(){if(!q)return C.getBoundingClientRect()}};pe(M),te.postMessage({resize:{width:M.width,height:M.height}});return}y.width=y.height=null}function D(){Se=null,J&&(Q=!1,t.removeEventListener("resize",x)),q&&C&&(document.body.contains(C)&&document.body.removeChild(C),C=null,xe=!1)}return J&&!Q&&(Q=!0,t.addEventListener("resize",x,!1)),te?te.fire(ve,y,D):De(ve,y,D)}return Je.reset=function(){te&&te.reset(),Se&&Se.reset()},Je}var rt;function et(){return rt||(rt=_(null,{useWorker:!0,resize:!0})),rt}function Te(C,S,q,J,Q,se,oe){var te=new Path2D(C),pe=new Path2D;pe.addPath(te,new DOMMatrix(S));var xe=new Path2D;return xe.addPath(pe,new DOMMatrix([Math.cos(oe)*Q,Math.sin(oe)*Q,-Math.sin(oe)*se,Math.cos(oe)*se,q,J])),xe}function lt(C){if(!s)throw new Error("path confetti are not supported in this browser");var S,q;typeof C=="string"?S=C:(S=C.path,q=C.matrix);var J=new Path2D(S),Q=document.createElement("canvas"),se=Q.getContext("2d");if(!q){for(var oe=1e3,te=oe,pe=oe,xe=0,Ke=0,Se,De,Je=0;Je<oe;Je+=2)for(var ve=0;ve<oe;ve+=2)se.isPointInPath(J,Je,ve,"nonzero")&&(te=Math.min(te,Je),pe=Math.min(pe,ve),xe=Math.max(xe,Je),Ke=Math.max(Ke,ve));Se=xe-te,De=Ke-pe;var c=10,h=Math.min(c/Se,c/De);q=[h,0,0,h,-Math.round(Se/2+te)*h,-Math.round(De/2+pe)*h]}return{type:"path",path:S,matrix:q}}function fe(C){var S,q=1,J="#000000",Q='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof C=="string"?S=C:(S=C.text,q="scalar"in C?C.scalar:q,Q="fontFamily"in C?C.fontFamily:Q,J="color"in C?C.color:J);var se=10*q,oe=""+se+"px "+Q,te=new OffscreenCanvas(se,se),pe=te.getContext("2d");pe.font=oe;var xe=pe.measureText(S),Ke=Math.ceil(xe.actualBoundingBoxRight+xe.actualBoundingBoxLeft),Se=Math.ceil(xe.actualBoundingBoxAscent+xe.actualBoundingBoxDescent),De=2,Je=xe.actualBoundingBoxLeft+De,ve=xe.actualBoundingBoxAscent+De;Ke+=De+De,Se+=De+De,te=new OffscreenCanvas(Ke,Se),pe=te.getContext("2d"),pe.font=oe,pe.fillStyle=J,pe.fillText(S,Je,ve);var c=1/q;return{type:"bitmap",bitmap:te.transferToImageBitmap(),matrix:[c,0,0,c,-Ke*c/2,-Se*c/2]}}n.exports=function(){return et().apply(this,arguments)},n.exports.reset=function(){et().reset()},n.exports.create=_,n.exports.shapeFromPath=lt,n.exports.shapeFromText=fe})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),Oh,!1);var sN=Oh.exports,zP=Oh.exports.create,aN=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 sN(e)}static async realisticFire(e,t){let n={origin:{y:.7}};await this.fire(Object.assign({},n,t,{particleCount:Math.floor(200*e)}))}},Ra=class Uc{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||Uc)(Tt(hv,16))};static \u0275pipe=lh({name:"safeHtml",type:Uc,pure:!0})},lN=(e,t)=>t.minValue;function cN(e,t){if(e&1&&(Y(0,"li",6)(1,"div",7),je(2,"div",8),Gt(3,"cooeeCurrency"),Gt(4,"safeHtml"),je(5,"img",9),Y(6,"div",10),ht(7),K()()()),e&2){let n=t.$implicit,r=ae(2);va("left",n.calculatedAlignment+"%"),z(2),Me("innerHTML",on(4,7,on(3,5,n.minValue)),Hr),z(3),Me("src",r.getIconURL(n),Yt),z(2),wa(n.label)}}function uN(e,t){if(e&1&&(Io(0)(1),je(2,"div",0),Gt(3,"cooeeDynamicVariables"),Gt(4,"safeHtml"),Y(5,"div",1)(6,"ul",2)(7,"div",3),je(8,"div",4),K(),Mt(9,cN,8,9,"li",5,lN),K()()),e&2){let n=ae(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;z(2),Me("innerHTML",on(4,6,fC(3,3,i,n.localDynamicVariables())),Hr),z(6),va("width",r.cartValuePercentage+"%"),z(),jt(r.milestones)}}var hN=class Hc{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=ir({});calculatedState=ir({});_engagementTrigger=ir(null);progressBarConfig;set engagementTrigger(t){this._engagementTrigger.set(t),this.progressBarConfig=t.progressBarConfig}ngOnInit(){Ct.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){Ct.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===hl.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===hl.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===hl.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>Ct.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){Ct.warn("Milestones not available in progress bar config",t);return}let n=await this.cart.getNormalisedCart(),r=t.progressBarConfig,i=r.milestones.at(-1),o=i.minValue+Math.floor(i.minValue*5/100),s=n.originalAmount,a=Math.min(s,o),l=100/r.milestones.length,u=l;for(let g of r.milestones)g.calculatedAlignment=u,u+=l;let d=this.calculateTrackedProgress(a,r.milestones);Ct.debug("Cart value:",s,`, percentage: ${d}%`),this.celebrate(t,s);let f={milestonesReady:!0,cartValuePercentage:d,milestones:r.milestones},p=r.milestones.find(g=>g.minValue>s);if(p){this.localDynamicVariables.set({amount_left:Ta.formatCurrency(p.minValue-s)}),f.nextMilestone=p,this.calculatedState.set(f);return}f.lastMilestone=i,this.calculatedState.set(f)}celebrate(t,n){let r=[...t.progressBarConfig.milestones].reverse().find(o=>o.minValue<n);if(!r)return;let i=`lc/en/${t.shortID}/${r.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),this.progressBarConfig?.noConfetti||aN.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,o=n[r+1].minValue,s=n[r].calculatedAlignment,a=n[r+1].calculatedAlignment;if(t>=i&&t<=o)return(t-i)/(o-i)*(a-s)+s}return 0}static \u0275fac=function(t){return new(t||Hc)(Tt($t))};static \u0275cmp=Vt({type:Hc,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&&pt(0,uN,11,8),t&2&&yt(n.calculatedState().milestonesReady?0:-1)},dependencies:[oN,Ra,Oa],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}"]})},Hv=class $c{cooeeEvent=new tt;cooeeCTA=new tt;elementRef=N($t);_engagementTrigger=ir(null);_triggerContext=ir(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this._engagementTrigger.set(t.triggerData),this.engagementTriggerReceived(t.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Ct.debug("Init",this.constructor.name)}ngOnDestroy(){Ct.debug("Destroying",this.constructor.name)}sendEventToRenderer(t){this.cooeeEvent.emit(t)}executeCTAViaRenderer(t){this.cooeeCTA.emit(t)}static \u0275fac=function(t){return new(t||$c)};static \u0275cmp=Vt({type:$c,selectors:[["ng-component"]],inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(t,n){},encapsulation:2})};function dN(e,t){if(e&1&&(Y(0,"div",6),ht(1),K(),Y(2,"div",7),ht(3),K()),e&2){let n=ae(2);z(),On(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),z(2),On(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function fN(e,t){if(e&1&&(Y(0,"div",4),ht(1),K()),e&2){let n=ae(2);z(),On(" ",n.stickyATCConfig.leftText," ")}}function pN(e,t){if(e&1&&(Y(0,"div",1)(1,"div",5),ht(2),K(),pt(3,dN,4,2)(4,fN,2,1,"div",4),K()),e&2){let n=ae();z(2),On(" ",n.getCurrency(n.selectedVariant().price.d)," "),z(),yt(n.selectedVariant().price.cmp?3:-1),z(),yt(n.stickyATCConfig!=null&&n.stickyATCConfig.leftText?4:-1)}}function gN(e,t){if(e&1&&(Y(0,"div",4),ht(1),K()),e&2){let n=ae();z(),On(" ",n.stickyATCConfig.rightText," ")}}var mN=class zc extends Hv{currentItem;stickyATCConfig;selectedVariant=ir(void 0);constructor(){super()}engagementTriggerReceived(t){this.stickyATCConfig=t.stickyATCConfig,this.currentItem=t.items[0],this.selectedVariant.set(this.currentItem.vars[0])}update(){}getCurrency(t){return Ta.formatCurrency(t)}getDiscountPercentage(t){return((t.cmp-t.d)/t.cmp*100).toFixed(0)}async addToCart(){this.executeCTAViaRenderer({clickAction:{at:102},item:this.currentItem})}static \u0275fac=function(t){return new(t||zc)};static \u0275cmp=Vt({type:zc,selectors:[["cooee-sticky-atc"]],features:[Ei],decls:6,vars:2,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-additional-text"],[1,"lc-sale-price"],[1,"lc-compare-price"],[1,"lc-discount-label"]],template:function(t,n){t&1&&(Y(0,"div",0),pt(1,pN,5,3,"div",1),Y(2,"div",2)(3,"button",3),ut("click",function(){return n.addToCart()}),ht(4,"Add To Cart"),K(),pt(5,gN,2,1,"div",4),K()()),t&2&&(z(),yt(n.selectedVariant()&&n.stickyATCConfig!=null&&n.stickyATCConfig.showProductInfo?1:-1),z(4),yt(n.stickyATCConfig!=null&&n.stickyATCConfig.rightText?5:-1))},styles:["[_nghost-%COMP%]{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices[_ngcontent-%COMP%]{gap:8px}}.lc-sale-price[_ngcontent-%COMP%]{font-size:24px;font-weight:600}.lc-compare-price[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:green}.lc-button-wrapper[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;align-items:center}@media (min-width: 768px){.lc-button-wrapper[_ngcontent-%COMP%]{flex-direction:row;gap:8px}}.lc-button[_ngcontent-%COMP%]{background-color:#000;color:#fff;opacity:1;cursor:pointer;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text[_ngcontent-%COMP%]{font-size:12px;color:#666}"]})},Go=an(k0()),yN=an(ho()),$v=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))($v||{}),zv=(e=>(e.SIMPLE="SIMPLE",e.SWIPER="SWIPER",e.STORY="STORY",e.FLOATING_POPUP="FLOATING_POPUP",e))(zv||{}),qv=(e=>(e.ON="ON",e.OFF="OFF",e.ON_HOVER="ON_HOVER",e))(qv||{}),Wv=(e=>(e.FIRST_ITEM="FIRST_ITEM",e.BADGE="BADGE",e.NONE="NONE",e))(Wv||{});function vN(e,t){return t={exports:{}},e(t,t.exports),t.exports}var _N=xN,bN=IN,wN=ON,Sn=[],tn=[],EN=typeof Uint8Array<"u"?Uint8Array:Array,ml="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(dr=0,Ff=ml.length;dr<Ff;++dr)Sn[dr]=ml[dr],tn[ml.charCodeAt(dr)]=dr;var dr,Ff;tn[45]=62;tn[95]=63;function Gv(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 xN(e){var t=Gv(e),n=t[0],r=t[1];return(n+r)*3/4-r}function SN(e,t,n){return(t+n)*3/4-n}function IN(e){var t,n=Gv(e),r=n[0],i=n[1],o=new EN(SN(e,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)t=tn[e.charCodeAt(l)]<<18|tn[e.charCodeAt(l+1)]<<12|tn[e.charCodeAt(l+2)]<<6|tn[e.charCodeAt(l+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return i===2&&(t=tn[e.charCodeAt(l)]<<2|tn[e.charCodeAt(l+1)]>>4,o[s++]=t&255),i===1&&(t=tn[e.charCodeAt(l)]<<10|tn[e.charCodeAt(l+1)]<<4|tn[e.charCodeAt(l+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function CN(e){return Sn[e>>18&63]+Sn[e>>12&63]+Sn[e>>6&63]+Sn[e&63]}function TN(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(CN(r));return i.join("")}function ON(e){for(var t,n=e.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(TN(e,s,s+o>a?a:s+o));return r===1?(t=e[n-1],i.push(Sn[t>>2]+Sn[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(Sn[t>>10]+Sn[t>>4&63]+Sn[t<<2&63]+"=")),i.join("")}var yl={byteLength:_N,toByteArray:bN,fromByteArray:wN},RN=function(e,t,n,r,i){var o,s,a=i*8-r-1,l=(1<<a)-1,u=l>>1,d=-7,f=n?i-1:0,p=n?-1:1,g=e[t+f];for(f+=p,o=g&(1<<-d)-1,g>>=-d,d+=a;d>0;o=o*256+e[t+f],f+=p,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=r;d>0;s=s*256+e[t+f],f+=p,d-=8);if(o===0)o=1-u;else{if(o===l)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-u}return(g?-1:1)*s*Math.pow(2,o-r)},DN=function(e,t,n,r,i,o){var s,a,l,u=o*8-i-1,d=(1<<u)-1,f=d>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:o-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,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?t+=p/l:t+=p*Math.pow(2,1-f),t*l>=2&&(s++,l/=2),s+f>=d?(a=0,s=d):s+f>=1?(a=(t*l-1)*Math.pow(2,i),s=s+f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+g]=a&255,g+=m,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+g]=s&255,g+=m,s/=256,u-=8);e[n+g-m]|=b*128},Gr={read:RN,write:DN},Da=vN(function(e,t){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;var r=2147483647;t.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.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 c=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(c,h),c.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(c){if(c>r)throw new RangeError('The value "'+c+'" is invalid for option "size"');var h=new Uint8Array(c);return Object.setPrototypeOf(h,s.prototype),h}function s(c,h,y){if(typeof c=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(c)}return a(c,h,y)}s.poolSize=8192;function a(c,h,y){if(typeof c=="string")return f(c,h);if(ArrayBuffer.isView(c))return g(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(c));if(De(c,ArrayBuffer)||c&&De(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(De(c,SharedArrayBuffer)||c&&De(c.buffer,SharedArrayBuffer)))return m(c,h,y);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var x=c.valueOf&&c.valueOf();if(x!=null&&x!==c)return s.from(x,h,y);var D=b(c);if(D)return D;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return s.from(c[Symbol.toPrimitive]("string"),h,y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(c))}s.from=function(c,h,y){return a(c,h,y)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function u(c,h,y){return l(c),c<=0?o(c):h!==void 0?typeof y=="string"?o(c).fill(h,y):o(c).fill(h):o(c)}s.alloc=function(c,h,y){return u(c,h,y)};function d(c){return l(c),o(c<0?0:I(c)|0)}s.allocUnsafe=function(c){return d(c)},s.allocUnsafeSlow=function(c){return d(c)};function f(c,h){if((typeof h!="string"||h==="")&&(h="utf8"),!s.isEncoding(h))throw new TypeError("Unknown encoding: "+h);var y=$(c,h)|0,x=o(y),D=x.write(c,h);return D!==y&&(x=x.slice(0,D)),x}function p(c){for(var h=c.length<0?0:I(c.length)|0,y=o(h),x=0;x<h;x+=1)y[x]=c[x]&255;return y}function g(c){if(De(c,Uint8Array)){var h=new Uint8Array(c);return m(h.buffer,h.byteOffset,h.byteLength)}return p(c)}function m(c,h,y){if(h<0||c.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<h+(y||0))throw new RangeError('"length" is outside of buffer bounds');var x;return h===void 0&&y===void 0?x=new Uint8Array(c):y===void 0?x=new Uint8Array(c,h):x=new Uint8Array(c,h,y),Object.setPrototypeOf(x,s.prototype),x}function b(c){if(s.isBuffer(c)){var h=I(c.length)|0,y=o(h);return y.length===0||c.copy(y,0,0,h),y}if(c.length!==void 0)return typeof c.length!="number"||Je(c.length)?o(0):p(c);if(c.type==="Buffer"&&Array.isArray(c.data))return p(c.data)}function I(c){if(c>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return c|0}function A(c){return+c!=c&&(c=0),s.alloc(+c)}s.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==s.prototype},s.compare=function(c,h){if(De(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),De(h,Uint8Array)&&(h=s.from(h,h.offset,h.byteLength)),!s.isBuffer(c)||!s.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===h)return 0;for(var y=c.length,x=h.length,D=0,M=Math.min(y,x);D<M;++D)if(c[D]!==h[D]){y=c[D],x=h[D];break}return y<x?-1:x<y?1:0},s.isEncoding=function(c){switch(String(c).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}},s.concat=function(c,h){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return s.alloc(0);var y;if(h===void 0)for(h=0,y=0;y<c.length;++y)h+=c[y].length;var x=s.allocUnsafe(h),D=0;for(y=0;y<c.length;++y){var M=c[y];if(De(M,Uint8Array))D+M.length>x.length?s.from(M).copy(x,D):Uint8Array.prototype.set.call(x,M,D);else if(s.isBuffer(M))M.copy(x,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=M.length}return x};function $(c,h){if(s.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||De(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(c));var y=c.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&y===0)return 0;for(var D=!1;;)switch(h){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return te(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return Ke(c).length;default:if(D)return x?-1:te(c).length;h=(""+h).toLowerCase(),D=!0}}s.byteLength=$;function j(c,h,y){var x=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,h>>>=0,y<=h))return"";for(c||(c="utf8");;)switch(c){case"hex":return lt(this,h,y);case"utf8":case"utf-8":return Ue(this,h,y);case"ascii":return et(this,h,y);case"latin1":case"binary":return Te(this,h,y);case"base64":return Ve(this,h,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,h,y);default:if(x)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),x=!0}}s.prototype._isBuffer=!0;function k(c,h,y){var x=c[h];c[h]=c[y],c[y]=x}s.prototype.swap16=function(){var c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var h=0;h<c;h+=2)k(this,h,h+1);return this},s.prototype.swap32=function(){var c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var h=0;h<c;h+=4)k(this,h,h+3),k(this,h+1,h+2);return this},s.prototype.swap64=function(){var c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var h=0;h<c;h+=8)k(this,h,h+7),k(this,h+1,h+6),k(this,h+2,h+5),k(this,h+3,h+4);return this},s.prototype.toString=function(){var c=this.length;return c===0?"":arguments.length===0?Ue(this,0,c):j.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(c){if(!s.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:s.compare(this,c)===0},s.prototype.inspect=function(){var c="",h=t.INSPECT_MAX_BYTES;return c=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(c+=" ... "),"<Buffer "+c+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(c,h,y,x,D){if(De(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(c));if(h===void 0&&(h=0),y===void 0&&(y=c?c.length:0),x===void 0&&(x=0),D===void 0&&(D=this.length),h<0||y>c.length||x<0||D>this.length)throw new RangeError("out of range index");if(x>=D&&h>=y)return 0;if(x>=D)return-1;if(h>=y)return 1;if(h>>>=0,y>>>=0,x>>>=0,D>>>=0,this===c)return 0;for(var M=D-x,W=y-h,Ne=Math.min(M,W),Ie=this.slice(x,D),be=c.slice(h,y),He=0;He<Ne;++He)if(Ie[He]!==be[He]){M=Ie[He],W=be[He];break}return M<W?-1:W<M?1:0};function G(c,h,y,x,D){if(c.length===0)return-1;if(typeof y=="string"?(x=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,Je(y)&&(y=D?0:c.length-1),y<0&&(y=c.length+y),y>=c.length){if(D)return-1;y=c.length-1}else if(y<0)if(D)y=0;else return-1;if(typeof h=="string"&&(h=s.from(h,x)),s.isBuffer(h))return h.length===0?-1:Pe(c,h,y,x,D);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?D?Uint8Array.prototype.indexOf.call(c,h,y):Uint8Array.prototype.lastIndexOf.call(c,h,y):Pe(c,[h],y,x,D);throw new TypeError("val must be string, number or Buffer")}function Pe(c,h,y,x,D){var M=1,W=c.length,Ne=h.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(c.length<2||h.length<2)return-1;M=2,W/=2,Ne/=2,y/=2}function Ie(re,ke){return M===1?re[ke]:re.readUInt16BE(ke*M)}var be;if(D){var He=-1;for(be=y;be<W;be++)if(Ie(c,be)===Ie(h,He===-1?0:be-He)){if(He===-1&&(He=be),be-He+1===Ne)return He*M}else He!==-1&&(be-=be-He),He=-1}else for(y+Ne>W&&(y=W-Ne),be=y;be>=0;be--){for(var Z=!0,ge=0;ge<Ne;ge++)if(Ie(c,be+ge)!==Ie(h,ge)){Z=!1;break}if(Z)return be}return-1}s.prototype.includes=function(c,h,y){return this.indexOf(c,h,y)!==-1},s.prototype.indexOf=function(c,h,y){return G(this,c,h,y,!0)},s.prototype.lastIndexOf=function(c,h,y){return G(this,c,h,y,!1)};function We(c,h,y,x){y=Number(y)||0;var D=c.length-y;x?(x=Number(x),x>D&&(x=D)):x=D;var M=h.length;x>M/2&&(x=M/2);for(var W=0;W<x;++W){var Ne=parseInt(h.substr(W*2,2),16);if(Je(Ne))return W;c[y+W]=Ne}return W}function B(c,h,y,x){return Se(te(h,c.length-y),c,y,x)}function le(c,h,y,x){return Se(pe(h),c,y,x)}function ne(c,h,y,x){return Se(Ke(h),c,y,x)}function ye(c,h,y,x){return Se(xe(h,c.length-y),c,y,x)}s.prototype.write=function(c,h,y,x){if(h===void 0)x="utf8",y=this.length,h=0;else if(y===void 0&&typeof h=="string")x=h,y=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(y)?(y=y>>>0,x===void 0&&(x="utf8")):(x=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var D=this.length-h;if((y===void 0||y>D)&&(y=D),c.length>0&&(y<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");for(var M=!1;;)switch(x){case"hex":return We(this,c,h,y);case"utf8":case"utf-8":return B(this,c,h,y);case"ascii":case"latin1":case"binary":return le(this,c,h,y);case"base64":return ne(this,c,h,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,c,h,y);default:if(M)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),M=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ve(c,h,y){return h===0&&y===c.length?yl.fromByteArray(c):yl.fromByteArray(c.slice(h,y))}function Ue(c,h,y){y=Math.min(c.length,y);for(var x=[],D=h;D<y;){var M=c[D],W=null,Ne=M>239?4:M>223?3:M>191?2:1;if(D+Ne<=y){var Ie,be,He,Z;switch(Ne){case 1:M<128&&(W=M);break;case 2:Ie=c[D+1],(Ie&192)===128&&(Z=(M&31)<<6|Ie&63,Z>127&&(W=Z));break;case 3:Ie=c[D+1],be=c[D+2],(Ie&192)===128&&(be&192)===128&&(Z=(M&15)<<12|(Ie&63)<<6|be&63,Z>2047&&(Z<55296||Z>57343)&&(W=Z));break;case 4:Ie=c[D+1],be=c[D+2],He=c[D+3],(Ie&192)===128&&(be&192)===128&&(He&192)===128&&(Z=(M&15)<<18|(Ie&63)<<12|(be&63)<<6|He&63,Z>65535&&Z<1114112&&(W=Z))}}W===null?(W=65533,Ne=1):W>65535&&(W-=65536,x.push(W>>>10&1023|55296),W=56320|W&1023),x.push(W),D+=Ne}return rt(x)}var _=4096;function rt(c){var h=c.length;if(h<=_)return String.fromCharCode.apply(String,c);for(var y="",x=0;x<h;)y+=String.fromCharCode.apply(String,c.slice(x,x+=_));return y}function et(c,h,y){var x="";y=Math.min(c.length,y);for(var D=h;D<y;++D)x+=String.fromCharCode(c[D]&127);return x}function Te(c,h,y){var x="";y=Math.min(c.length,y);for(var D=h;D<y;++D)x+=String.fromCharCode(c[D]);return x}function lt(c,h,y){var x=c.length;(!h||h<0)&&(h=0),(!y||y<0||y>x)&&(y=x);for(var D="",M=h;M<y;++M)D+=ve[c[M]];return D}function fe(c,h,y){for(var x=c.slice(h,y),D="",M=0;M<x.length-1;M+=2)D+=String.fromCharCode(x[M]+x[M+1]*256);return D}s.prototype.slice=function(c,h){var y=this.length;c=~~c,h=h===void 0?y:~~h,c<0?(c+=y,c<0&&(c=0)):c>y&&(c=y),h<0?(h+=y,h<0&&(h=0)):h>y&&(h=y),h<c&&(h=c);var x=this.subarray(c,h);return Object.setPrototypeOf(x,s.prototype),x};function C(c,h,y){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+h>y)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(c,h,y){c=c>>>0,h=h>>>0,y||C(c,h,this.length);for(var x=this[c],D=1,M=0;++M<h&&(D*=256);)x+=this[c+M]*D;return x},s.prototype.readUintBE=s.prototype.readUIntBE=function(c,h,y){c=c>>>0,h=h>>>0,y||C(c,h,this.length);for(var x=this[c+--h],D=1;h>0&&(D*=256);)x+=this[c+--h]*D;return x},s.prototype.readUint8=s.prototype.readUInt8=function(c,h){return c=c>>>0,h||C(c,1,this.length),this[c]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(c,h){return c=c>>>0,h||C(c,2,this.length),this[c]|this[c+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(c,h){return c=c>>>0,h||C(c,2,this.length),this[c]<<8|this[c+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(c,h){return c=c>>>0,h||C(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(c,h){return c=c>>>0,h||C(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},s.prototype.readIntLE=function(c,h,y){c=c>>>0,h=h>>>0,y||C(c,h,this.length);for(var x=this[c],D=1,M=0;++M<h&&(D*=256);)x+=this[c+M]*D;return D*=128,x>=D&&(x-=Math.pow(2,8*h)),x},s.prototype.readIntBE=function(c,h,y){c=c>>>0,h=h>>>0,y||C(c,h,this.length);for(var x=h,D=1,M=this[c+--x];x>0&&(D*=256);)M+=this[c+--x]*D;return D*=128,M>=D&&(M-=Math.pow(2,8*h)),M},s.prototype.readInt8=function(c,h){return c=c>>>0,h||C(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},s.prototype.readInt16LE=function(c,h){c=c>>>0,h||C(c,2,this.length);var y=this[c]|this[c+1]<<8;return y&32768?y|4294901760:y},s.prototype.readInt16BE=function(c,h){c=c>>>0,h||C(c,2,this.length);var y=this[c+1]|this[c]<<8;return y&32768?y|4294901760:y},s.prototype.readInt32LE=function(c,h){return c=c>>>0,h||C(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},s.prototype.readInt32BE=function(c,h){return c=c>>>0,h||C(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},s.prototype.readFloatLE=function(c,h){return c=c>>>0,h||C(c,4,this.length),Gr.read(this,c,!0,23,4)},s.prototype.readFloatBE=function(c,h){return c=c>>>0,h||C(c,4,this.length),Gr.read(this,c,!1,23,4)},s.prototype.readDoubleLE=function(c,h){return c=c>>>0,h||C(c,8,this.length),Gr.read(this,c,!0,52,8)},s.prototype.readDoubleBE=function(c,h){return c=c>>>0,h||C(c,8,this.length),Gr.read(this,c,!1,52,8)};function S(c,h,y,x,D,M){if(!s.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>D||h<M)throw new RangeError('"value" argument is out of bounds');if(y+x>c.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(c,h,y,x){if(c=+c,h=h>>>0,y=y>>>0,!x){var D=Math.pow(2,8*y)-1;S(this,c,h,y,D,0)}var M=1,W=0;for(this[h]=c&255;++W<y&&(M*=256);)this[h+W]=c/M&255;return h+y},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(c,h,y,x){if(c=+c,h=h>>>0,y=y>>>0,!x){var D=Math.pow(2,8*y)-1;S(this,c,h,y,D,0)}var M=y-1,W=1;for(this[h+M]=c&255;--M>=0&&(W*=256);)this[h+M]=c/W&255;return h+y},s.prototype.writeUint8=s.prototype.writeUInt8=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,1,255,0),this[h]=c&255,h+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,2,65535,0),this[h]=c&255,this[h+1]=c>>>8,h+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,2,65535,0),this[h]=c>>>8,this[h+1]=c&255,h+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,4,4294967295,0),this[h+3]=c>>>24,this[h+2]=c>>>16,this[h+1]=c>>>8,this[h]=c&255,h+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,4,4294967295,0),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4},s.prototype.writeIntLE=function(c,h,y,x){if(c=+c,h=h>>>0,!x){var D=Math.pow(2,8*y-1);S(this,c,h,y,D-1,-D)}var M=0,W=1,Ne=0;for(this[h]=c&255;++M<y&&(W*=256);)c<0&&Ne===0&&this[h+M-1]!==0&&(Ne=1),this[h+M]=(c/W>>0)-Ne&255;return h+y},s.prototype.writeIntBE=function(c,h,y,x){if(c=+c,h=h>>>0,!x){var D=Math.pow(2,8*y-1);S(this,c,h,y,D-1,-D)}var M=y-1,W=1,Ne=0;for(this[h+M]=c&255;--M>=0&&(W*=256);)c<0&&Ne===0&&this[h+M+1]!==0&&(Ne=1),this[h+M]=(c/W>>0)-Ne&255;return h+y},s.prototype.writeInt8=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,1,127,-128),c<0&&(c=255+c+1),this[h]=c&255,h+1},s.prototype.writeInt16LE=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,2,32767,-32768),this[h]=c&255,this[h+1]=c>>>8,h+2},s.prototype.writeInt16BE=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,2,32767,-32768),this[h]=c>>>8,this[h+1]=c&255,h+2},s.prototype.writeInt32LE=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,4,2147483647,-2147483648),this[h]=c&255,this[h+1]=c>>>8,this[h+2]=c>>>16,this[h+3]=c>>>24,h+4},s.prototype.writeInt32BE=function(c,h,y){return c=+c,h=h>>>0,y||S(this,c,h,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4};function q(c,h,y,x,D,M){if(y+x>c.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function J(c,h,y,x,D){return h=+h,y=y>>>0,D||q(c,h,y,4),Gr.write(c,h,y,x,23,4),y+4}s.prototype.writeFloatLE=function(c,h,y){return J(this,c,h,!0,y)},s.prototype.writeFloatBE=function(c,h,y){return J(this,c,h,!1,y)};function Q(c,h,y,x,D){return h=+h,y=y>>>0,D||q(c,h,y,8),Gr.write(c,h,y,x,52,8),y+8}s.prototype.writeDoubleLE=function(c,h,y){return Q(this,c,h,!0,y)},s.prototype.writeDoubleBE=function(c,h,y){return Q(this,c,h,!1,y)},s.prototype.copy=function(c,h,y,x){if(!s.isBuffer(c))throw new TypeError("argument should be a Buffer");if(y||(y=0),!x&&x!==0&&(x=this.length),h>=c.length&&(h=c.length),h||(h=0),x>0&&x<y&&(x=y),x===y||c.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),c.length-h<x-y&&(x=c.length-h+y);var D=x-y;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(h,y,x):Uint8Array.prototype.set.call(c,this.subarray(y,x),h),D},s.prototype.fill=function(c,h,y,x){if(typeof c=="string"){if(typeof h=="string"?(x=h,h=0,y=this.length):typeof y=="string"&&(x=y,y=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!s.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(c.length===1){var D=c.charCodeAt(0);(x==="utf8"&&D<128||x==="latin1")&&(c=D)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(h<0||this.length<h||this.length<y)throw new RangeError("Out of range index");if(y<=h)return this;h=h>>>0,y=y===void 0?this.length:y>>>0,c||(c=0);var M;if(typeof c=="number")for(M=h;M<y;++M)this[M]=c;else{var W=s.isBuffer(c)?c:s.from(c,x),Ne=W.length;if(Ne===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(M=0;M<y-h;++M)this[M+h]=W[M%Ne]}return this};var se=/[^+/0-9A-Za-z-_]/g;function oe(c){if(c=c.split("=")[0],c=c.trim().replace(se,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function te(c,h){h=h||1/0;for(var y,x=c.length,D=null,M=[],W=0;W<x;++W){if(y=c.charCodeAt(W),y>55295&&y<57344){if(!D){if(y>56319){(h-=3)>-1&&M.push(239,191,189);continue}else if(W+1===x){(h-=3)>-1&&M.push(239,191,189);continue}D=y;continue}if(y<56320){(h-=3)>-1&&M.push(239,191,189),D=y;continue}y=(D-55296<<10|y-56320)+65536}else D&&(h-=3)>-1&&M.push(239,191,189);if(D=null,y<128){if((h-=1)<0)break;M.push(y)}else if(y<2048){if((h-=2)<0)break;M.push(y>>6|192,y&63|128)}else if(y<65536){if((h-=3)<0)break;M.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((h-=4)<0)break;M.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return M}function pe(c){for(var h=[],y=0;y<c.length;++y)h.push(c.charCodeAt(y)&255);return h}function xe(c,h){for(var y,x,D,M=[],W=0;W<c.length&&!((h-=2)<0);++W)y=c.charCodeAt(W),x=y>>8,D=y%256,M.push(D),M.push(x);return M}function Ke(c){return yl.toByteArray(oe(c))}function Se(c,h,y,x){for(var D=0;D<x&&!(D+y>=h.length||D>=c.length);++D)h[D+y]=c[D];return D}function De(c,h){return c instanceof h||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===h.name}function Je(c){return c!==c}var ve=function(){for(var c="0123456789abcdef",h=new Array(256),y=0;y<16;++y)for(var x=y*16,D=0;D<16;++D)h[x+D]=c[y]+c[D];return h}()}),Fe=Da.Buffer;Da.SlowBuffer;Da.INSPECT_MAX_BYTES;Da.kMaxLength;var qc=function(e,t){return qc=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])},qc(e,t)};function Na(e,t){qc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Sr=function(e){Na(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),st=function(e){Na(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 Zo(e){return e&&e.Math==Math&&e}function Zv(){return Zo(typeof globalThis=="object"&&globalThis)||Zo(typeof window=="object"&&window)||Zo(typeof self=="object"&&self)||Zo(typeof global=="object"&&global)||Function("return this")()}function NN(){var e=Zv();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var kN=function(e){var t=NN()?"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=Fe.alloc(e),r=0;r<e;++r)n[r]=Math.floor(Math.random()*256);return n},AN=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(Fe.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(Fe.alloc(t))}:kN}},Yv=AN();function PN(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function Rh(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function LN(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function MN(e){return ko(e)&&Object.prototype.toString.call(e)==="[object Date]"}function ko(e){return typeof e=="object"&&e!==null}function ka(e,t){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(t),n=!0),e.apply(this,i)}return r}function Vs(e){if(ArrayBuffer.isView(e))return Fe.from(e.buffer,e.byteOffset,e.byteLength);if(PN(e))return Fe.from(e);throw new st("Must use either Buffer or TypedArray")}var jN=/^(?:[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,Kv=function(e){return typeof e=="string"&&jN.test(e)},Wc=function(e){if(!Kv(e))throw new st('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 Fe.from(t,"hex")},Uf=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")},qP=Math.pow(2,63)-1,WP=-Math.pow(2,63),VN=Math.pow(2,53),BN=-Math.pow(2,53),Jv=4,Ir=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 st("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=Fe.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=Fe.from(t,"binary"):Array.isArray(t)?this.buffer=Fe.from(t):this.buffer=Vs(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new st("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new st("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 st("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=Fe.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=Fe.alloc(this.buffer.length+t.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(t)?(this.buffer.set(Vs(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 Hf(this.buffer.slice(0,this.position));throw new Sr('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=Fe.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=Fe.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=Wc(t.$uuid)),!r)throw new st("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===Jv?new Hf(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(Ir.prototype,"_bsontype",{value:"Binary"});var vl=16,Hf=function(e){Na(t,e);function t(n){var r=this,i,o;if(n==null)i=t.generate();else if(n instanceof t)i=Fe.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===vl)i=Vs(n);else if(typeof n=="string")i=Wc(n);else throw new st("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,Jv)||this,r.__id=o,r}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,t.cacheHexString&&(this.__id=Uf(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=Uf(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 Ir(this.id,Ir.SUBTYPE_UUID)},t.generate=function(){var n=Yv(vl);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Fe.from(n)},t.isValid=function(n){return n?n instanceof t?!0:typeof n=="string"?Kv(n):Rh(n)?n.length!==vl?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},t.createFromHexString=function(n){var r=Wc(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}(Ir),Aa=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(Aa.prototype,"_bsontype",{value:"Code"});function FN(e){return ko(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var co=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var o=t.split(".");o.length===2&&(r=o.shift(),t=o.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(co.prototype,"_bsontype",{value:"DBRef"});var en=void 0;try{en=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 $f=65536,UN=1<<24,ti=$f*$f,Qv=ti*ti,zf=Qv/2,qf={},Wf={},X=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,o;return n?(t>>>=0,(o=0<=t&&t<256)&&(i=Wf[t],i)?i:(r=e.fromBits(t,(t|0)<0?-1:0,!0),o&&(Wf[t]=r),r)):(t|=0,(o=-128<=t&&t<128)&&(i=qf[t],i)?i:(r=e.fromBits(t,t<0?-1:0,!1),o&&(qf[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>=Qv)return e.MAX_UNSIGNED_VALUE}else{if(t<=-zf)return e.MIN_VALUE;if(t+1>=zf)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%ti|0,t/ti|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 o=e.fromNumber(Math.pow(r,8)),s=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),u=parseInt(t.substring(a,a+l),r);if(l<8){var d=e.fromNumber(Math.pow(r,l));s=s.mul(d).add(e.fromNumber(u))}else s=s.mul(o),s=s.add(e.fromNumber(u))}return s.unsigned=n,s},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 ko(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,o=this.low&65535,s=t.high>>>16,a=t.high&65535,l=t.low>>>16,u=t.low&65535,d=0,f=0,p=0,g=0;return g+=o+u,p+=g>>>16,g&=65535,p+=i+l,f+=p>>>16,p&=65535,f+=r+a,d+=f>>>16,f&=65535,d+=n+s,d&=65535,e.fromBits(p<<16|g,d<<16|f,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(en){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?en.div_u:en.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,en.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=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 s=this.shr(1);return r=s.div(t).shl(1),r.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),o=r.add(i.div(t)),o)}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();o=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),u=e.fromNumber(r),d=u.mul(t);d.isNegative()||d.gt(i);)r-=l,u=e.fromNumber(r,this.unsigned),d=u.mul(t);u.isZero()&&(u=e.ONE),o=o.add(u),i=i.sub(d)}return o},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)),en){var n=(this.unsigned?en.rem_u:en.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,en.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)),en){var n=en.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,en.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,o=this.low>>>16,s=this.low&65535,a=t.high>>>16,l=t.high&65535,u=t.low>>>16,d=t.low&65535,f=0,p=0,g=0,m=0;return m+=s*d,g+=m>>>16,m&=65535,g+=o*d,p+=g>>>16,g&=65535,g+=s*u,p+=g>>>16,g&=65535,p+=i*d,f+=p>>>16,p&=65535,p+=o*u,f+=p>>>16,p&=65535,p+=s*l,f+=p>>>16,p&=65535,f+=r*d+i*u+o*l+s*a,f&=65535,e.fromBits(g<<16|m,f<<16|p,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)*ti+(this.low>>>0):this.high*ti+(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 o=e.fromNumber(Math.pow(t,6),this.unsigned),s=this,a="";;){var l=s.div(o),u=s.sub(l.mul(o)).toInt()>>>0,d=u.toString(t);if(s=l,s.isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+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(UN),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(X.prototype,"__isLong__",{value:!0});Object.defineProperty(X.prototype,"_bsontype",{value:"Long"});var HN=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,$N=/^(\+|-)?(Infinity|inf)$/i,zN=/^(\+|-)?NaN$/i,Di=6111,_l=-6176,Gf=6176,qN=34,bl=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Zf=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Yf=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),WN=/^([-+])?(\d+)?$/,GN=31,Kf=16383,ZN=30,YN=31;function Jf(e){return!isNaN(parseInt(e,10))}function KN(e){var t=X.fromNumber(1e9),n=X.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 X(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function JN(e,t){if(!e&&!t)return{high:X.fromNumber(0),low:X.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new X(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new X(t.getLowBits(),0),s=n.multiply(i),a=n.multiply(o),l=r.multiply(i),u=r.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new X(a.getLowBits(),0).add(l).add(u.shiftRightUnsigned(32)),s=s.add(a.shiftRightUnsigned(32)),u=a.shiftLeft(32).add(new X(u.getLowBits(),0)),{high:s,low:u}}function QN(e,t){var n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){var i=e.low>>>0,o=t.low>>>0;if(i<o)return!0}return!1}function Zr(e,t){throw new st('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var Dh=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(Rh(t)){if(t.byteLength!==16)throw new st("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new st("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var n=!1,r=!1,i=!1,o=0,s=0,a=0,l=0,u=0,d=[0],f=0,p=0,g=0,m=0,b=0,I=0,A=new X(0,0),$=new X(0,0),j=0,k=0;if(t.length>=7e3)throw new st(""+t+" not a valid Decimal128 string");var G=t.match(HN),Pe=t.match($N),We=t.match(zN);if(!G&&!Pe&&!We||t.length===0)throw new st(""+t+" not a valid Decimal128 string");if(G){var B=G[2],le=G[4],ne=G[5],ye=G[6];le&&ye===void 0&&Zr(t,"missing exponent power"),le&&B===void 0&&Zr(t,"missing exponent base"),le===void 0&&(ne||ye)&&Zr(t,"missing e before exponent")}if((t[k]==="+"||t[k]==="-")&&(n=t[k++]==="-"),!Jf(t[k])&&t[k]!=="."){if(t[k]==="i"||t[k]==="I")return new e(Fe.from(n?Zf:Yf));if(t[k]==="N")return new e(Fe.from(bl))}for(;Jf(t[k])||t[k]===".";){if(t[k]==="."){r&&Zr(t,"contains multiple periods"),r=!0,k=k+1;continue}f<34&&(t[k]!=="0"||i)&&(i||(u=s),i=!0,d[p++]=parseInt(t[k],10),f=f+1),i&&(a=a+1),r&&(l=l+1),s=s+1,k=k+1}if(r&&!s)throw new st(""+t+" not a valid Decimal128 string");if(t[k]==="e"||t[k]==="E"){var Ve=t.substr(++k).match(WN);if(!Ve||!Ve[2])return new e(Fe.from(bl));b=parseInt(Ve[0],10),k=k+Ve[0].length}if(t[k])return new e(Fe.from(bl));if(g=0,!f)g=0,m=0,d[0]=0,a=1,f=1,o=0;else if(m=f-1,o=a,o!==1)for(;d[u+o-1]===0;)o=o-1;for(b<=l&&l-b>16384?b=_l:b=b-l;b>Di;){if(m=m+1,m-g>qN){var Ue=d.join("");if(Ue.match(/^0+$/)){b=Di;break}Zr(t,"overflow")}b=b-1}for(;b<_l||f<a;){if(m===0&&o<f){b=_l,o=0;break}if(f<a?a=a-1:m=m-1,b<Di)b=b+1;else{var Ue=d.join("");if(Ue.match(/^0+$/)){b=Di;break}Zr(t,"overflow")}}if(m-g+1<o){var _=s;r&&(u=u+1,_=_+1),n&&(u=u+1,_=_+1);var rt=parseInt(t[u+m+1],10),et=0;if(rt>=5&&(et=1,rt===5)){for(et=d[m]%2===1?1:0,I=u+m+2;I<_;I++)if(parseInt(t[I],10)){et=1;break}}if(et){for(var Te=m;Te>=0;Te--)if(++d[Te]>9&&(d[Te]=0,Te===0))if(b<Di)b=b+1,d[Te]=1;else return new e(Fe.from(n?Zf:Yf))}}if(A=X.fromNumber(0),$=X.fromNumber(0),o===0)A=X.fromNumber(0),$=X.fromNumber(0);else if(m-g<17){var Te=g;for($=X.fromNumber(d[Te++]),A=new X(0,0);Te<=m;Te++)$=$.multiply(X.fromNumber(10)),$=$.add(X.fromNumber(d[Te]))}else{var Te=g;for(A=X.fromNumber(d[Te++]);Te<=m-17;Te++)A=A.multiply(X.fromNumber(10)),A=A.add(X.fromNumber(d[Te]));for($=X.fromNumber(d[Te++]);Te<=m;Te++)$=$.multiply(X.fromNumber(10)),$=$.add(X.fromNumber(d[Te]))}var lt=JN(A,X.fromString("100000000000000000"));lt.low=lt.low.add($),QN(lt.low,$)&&(lt.high=lt.high.add(X.fromNumber(1))),j=b+Gf;var fe={low:X.fromNumber(0),high:X.fromNumber(0)};lt.high.shiftRightUnsigned(49).and(X.fromNumber(1)).equals(X.fromNumber(1))?(fe.high=fe.high.or(X.fromNumber(3).shiftLeft(61)),fe.high=fe.high.or(X.fromNumber(j).and(X.fromNumber(16383).shiftLeft(47))),fe.high=fe.high.or(lt.high.and(X.fromNumber(0x7fffffffffff)))):(fe.high=fe.high.or(X.fromNumber(j&16383).shiftLeft(49)),fe.high=fe.high.or(lt.high.and(X.fromNumber(562949953421311)))),fe.low=lt.low,n&&(fe.high=fe.high.or(X.fromString("9223372036854775808")));var C=Fe.alloc(16);return k=0,C[k++]=fe.low.low&255,C[k++]=fe.low.low>>8&255,C[k++]=fe.low.low>>16&255,C[k++]=fe.low.low>>24&255,C[k++]=fe.low.high&255,C[k++]=fe.low.high>>8&255,C[k++]=fe.low.high>>16&255,C[k++]=fe.low.high>>24&255,C[k++]=fe.high.low&255,C[k++]=fe.high.low>>8&255,C[k++]=fe.high.low>>16&255,C[k++]=fe.high.low>>24&255,C[k++]=fe.high.high&255,C[k++]=fe.high.high>>8&255,C[k++]=fe.high.high>>16&255,C[k++]=fe.high.high>>24&255,new e(C)},e.prototype.toString=function(){for(var t,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,a,l={parts:[0,0,0,0]},u,d,f=[];o=0;var p=this.bytes,g=p[o++]|p[o++]<<8|p[o++]<<16|p[o++]<<24,m=p[o++]|p[o++]<<8|p[o++]<<16|p[o++]<<24,b=p[o++]|p[o++]<<8|p[o++]<<16|p[o++]<<24,I=p[o++]|p[o++]<<8|p[o++]<<16|p[o++]<<24;o=0;var A={low:new X(g,m),high:new X(b,I)};A.high.lessThan(X.ZERO)&&f.push("-");var $=I>>26&GN;if($>>3===3){if($===ZN)return f.join("")+"Infinity";if($===YN)return"NaN";t=I>>15&Kf,a=8+(I>>14&1)}else a=I>>14&7,t=I>>17&Kf;var j=t-Gf;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)s=!0;else for(d=3;d>=0;d--){var k=0,G=KN(l);if(l=G.quotient,k=G.rem.low,!!k)for(u=8;u>=0;u--)r[d*9+u]=k%10,k=Math.floor(k/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var Pe=n-1+j;if(Pe>=34||Pe<=-7||j>0){if(n>34)return f.push("".concat(0)),j>0?f.push("E+".concat(j)):j<0&&f.push("E".concat(j)),f.join("");f.push("".concat(r[o++])),n=n-1,n&&f.push(".");for(var i=0;i<n;i++)f.push("".concat(r[o++]));f.push("E"),Pe>0?f.push("+".concat(Pe)):f.push("".concat(Pe))}else if(j>=0)for(var i=0;i<n;i++)f.push("".concat(r[o++]));else{var We=n+j;if(We>0)for(var i=0;i<We;i++)f.push("".concat(r[o++]));else f.push("0");for(f.push(".");We++<0;)f.push("0");for(var i=0;i<n-Math.max(We-1,0);i++)f.push("".concat(r[o++]))}return f.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(Dh.prototype,"_bsontype",{value:"Decimal128"});var Pa=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(Pa.prototype,"_bsontype",{value:"Double"});var La=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(La.prototype,"_bsontype",{value:"Int32"});var Nh=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(Nh.prototype,"_bsontype",{value:"MaxKey"});var kh=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(kh.prototype,"_bsontype",{value:"MinKey"});var XN=new RegExp("^[0-9a-fA-F]{24}$"),fr=null,En=Symbol("id"),Ht=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 st("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=Fe.from(t.toHexString(),"hex"):n=t.id}else n=t;if(n==null||typeof n=="number")this[En]=e.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[En]=n instanceof Fe?n:Vs(n);else if(typeof n=="string")if(n.length===12){var r=Fe.from(n);if(r.byteLength===12)this[En]=r;else throw new st("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&XN.test(n))this[En]=Fe.from(n,"hex");else throw new st("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new st("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[En]},set:function(t){this[En]=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=Fe.alloc(12);return r.writeUInt32BE(t,0),fr===null&&(fr=Yv(5)),r[4]=fr[0],r[5]=fr[1],r[6]=fr[2],r[7]=fr[3],r[8]=fr[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[En][11]===t[En][11]&&this[En].equals(t[En]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&Rh(this.id))return t===Fe.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 Fe.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=Fe.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 st("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(Fe.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(Ht.prototype,"generate",{value:ka(function(e){return Ht.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Ht.prototype,"getInc",{value:ka(function(){return Ht.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ht.prototype,"get_inc",{value:ka(function(){return Ht.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ht,"get_inc",{value:ka(function(){return Ht.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ht.prototype,"_bsontype",{value:"ObjectID"});function ek(e){return e.split("").sort().join("")}var uo=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=ek(n??""),this.pattern.indexOf("\0")!==-1)throw new Sr("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new Sr("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 Sr("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 st("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(uo.prototype,"_bsontype",{value:"BSONRegExp"});var Ah=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(Ah.prototype,"_bsontype",{value:"Symbol"});var tk=X,Xv=function(e){Na(t,e);function t(n,r){var i=this;return i instanceof t?(X.isLong(n)?i=e.call(this,n.low,n.high,!0)||this:ko(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(X.fromInt(n,!0))},t.fromNumber=function(n){return new t(X.fromNumber(n,!0))},t.fromBits=function(n,r){return new t(n,r)},t.fromString=function(n,r){return new t(X.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=X.MAX_UNSIGNED_VALUE,t}(tk);function nk(e){return ko(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var e_=2147483647,t_=-2147483648,n_=9223372036854776e3,r_=-9223372036854776e3,rk={$oid:Ht,$binary:Ir,$uuid:Ir,$symbol:Ah,$numberInt:La,$numberDecimal:Dh,$numberDouble:Pa,$numberLong:X,$minKey:kh,$maxKey:Nh,$regex:uo,$regularExpression:uo,$timestamp:Xv};function i_(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=t_&&e<=e_)return new La(e);if(e>=r_&&e<=n_)return X.fromNumber(e)}return new Pa(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter(function(f){return f.startsWith("$")&&e[f]!=null}),r=0;r<n.length;r++){var i=rk[n[r]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var o=e.$date,s=new Date;return t.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):X.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&t.relaxed&&s.setTime(o),s}if(e.$code!=null){var a=Object.assign({},e);return e.$scope&&(a.$scope=i_(e.$scope)),Aa.fromExtendedJSON(e)}if(FN(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(l instanceof co)return l;var u=Object.keys(l).filter(function(f){return f.startsWith("$")}),d=!0;if(u.forEach(function(f){["$ref","$id","$db"].indexOf(f)===-1&&(d=!1)}),d)return co.fromExtendedJSON(l)}return e}function ik(e,t){return e.map(function(n,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Qn(n,t)}finally{t.seenObjects.pop()}})}function Qf(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function Qn(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(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(A){return"".concat(A," -> ")}).join(""),a=r[r.length-1],l=" ".repeat(i.length+o.length/2),u="-".repeat(s.length+(o.length+a.length)/2-1);throw new st(`Converting circular structure to EJSON:
|
|
42
|
+
`+" ".concat(i).concat(o).concat(s).concat(a,`
|
|
43
|
+
`)+" ".concat(l,"\\").concat(u,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return ik(e,t);if(e===void 0)return null;if(e instanceof Date||MN(e)){var d=e.getTime(),f=d>-1&&d<2534023188e5;return t.legacy?t.relaxed&&f?{$date:e.getTime()}:{$date:Qf(e)}:t.relaxed&&f?{$date:Qf(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var p=e>=t_&&e<=e_,g=e>=r_&&e<=n_;if(p)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||LN(e)){var m=e.flags;if(m===void 0){var b=e.toString().match(/[gimuy]*$/);b&&(m=b[0])}var I=new uo(e.source,m);return I.toExtendedJSON(t)}return e!=null&&typeof e=="object"?sk(e,t):e}var ok={Binary:function(e){return new Ir(e.value(),e.sub_type)},Code:function(e){return new Aa(e.code,e.scope)},DBRef:function(e){return new co(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new Dh(e.bytes)},Double:function(e){return new Pa(e.value)},Int32:function(e){return new La(e.value)},Long:function(e){return X.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 Nh},MinKey:function(){return new kh},ObjectID:function(e){return new Ht(e)},ObjectId:function(e){return new Ht(e)},BSONRegExp:function(e){return new uo(e.pattern,e.options)},Symbol:function(e){return new Ah(e.value)},Timestamp:function(e){return Xv.fromBits(e.low,e.high)}};function sk(e,t){if(e==null||typeof e!="object")throw new Sr("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 o=Qn(e[i],t);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{t.seenObjects.pop()}}return r}else if(nk(e)){var s=e;if(typeof s.toExtendedJSON!="function"){var a=ok[e._bsontype];if(!a)throw new st("Unrecognized or invalid _bsontype: "+e._bsontype);s=a(s)}return n==="Code"&&s.scope?s=new Aa(s.code,Qn(s.scope,t)):n==="DBRef"&&s.oid&&(s=new co(Qn(s.collection,t),Qn(s.oid,t),Qn(s.db,t),Qn(s.fields,t))),s.toExtendedJSON(t)}else throw new Sr("_bsontype must be a string, but was: "+typeof n)}var Xf;(function(e){function t(o,s){var a=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(o,function(l,u){if(l.indexOf("\0")!==-1)throw new Sr("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return i_(u,a)})}e.parse=t;function n(o,s,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(l=s,s=void 0,a=0);var u=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),d=Qn(o,u);return JSON.stringify(d,s,a)}e.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}e.serialize=r;function i(o,s){return s=s||{},t(JSON.stringify(o),s)}e.deserialize=i})(Xf||(Xf={}));var ep,tp=Zv();tp.Map?ep=tp.Map:ep=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],o=r[1];this._keys.push(i),this._values[i]={v:o,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 GP=X.fromNumber(VN),ZP=X.fromNumber(BN),wl=new Uint8Array(8),YP=new DataView(wl.buffer,wl.byteOffset,wl.byteLength),ak=1024*1024*17,KP=Fe.alloc(ak),lk=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}},El=class{constructor(e,t={},n,r){this.name=e,this.properties=t,this.id=r?new Ht(r):new Ht,this.occurred=new Date,n&&(this.trigger=new lk(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},$i=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,t){if(!e)return;let n=document.createElement("script");n.id=t??"",n.src=e,so.mode==="local"&&(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 injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,t=document.head){if(!e)return;let n=document.createElement("link");n.rel="stylesheet",n.href=e,e===this.SWIPER_CSS&&(n.crossOrigin="anonymous",n.onload=r=>{let i=r.currentTarget?.sheet?.cssRules;if(i){for(let o of i)if(o.type==CSSRule.FONT_FACE_RULE){let s=e.split("/"),a=s.slice(0,s.length-1).join("/"),l=o.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let u=document.createElement("style");u.appendChild(document.createTextNode(l)),document.head.appendChild(u)}}}),t.appendChild(n)}static loadSwiperScript(){let e="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";return new Promise(t=>{if(window.Swiper){t();return}if(Array.from(document.scripts).some(r=>r.src.includes(e))){let r=setInterval(()=>{window.Swiper&&(clearInterval(r),t())},50)}let n=document.createElement("script");n.src=e,n.onload=()=>{t()},n.onerror=()=>{n.remove()},document.body.appendChild(n)})}},Ph=class{static getBestSources(e){if(!e)return[];let t=[],n=e.filter(i=>i.format==="mp4").sort((i,o)=>o.width-i.width)[0];n&&t.push(n);let r=e.filter(i=>i.format==="m3u8").sort((i,o)=>o.width-i.width)[0];return r&&t.push(r),t}};function ck(e,t){e&1&&(ar(),je(0,"path",3))}function uk(e,t){e&1&&(ar(),je(0,"path",4))}var o_=class Gc{muted;videoEl;toggled=new tt;toggleMute(t){t.stopPropagation(),t.preventDefault(),this.muted=!this.muted,this.videoEl.muted=this.muted,this.toggled.emit(),this.muted||this.videoEl.play()}static \u0275fac=function(t){return new(t||Gc)};static \u0275cmp=Vt({type:Gc,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted",videoEl:"videoEl"},outputs:{toggled:"toggled"},decls:5,vars:1,consts:[["type","button",1,"lc:bg-black/50",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),ut("click",function(r){return n.toggleMute(r)}),ar(),Y(1,"svg",1),je(2,"path",2),pt(3,ck,1,0,":svg:path",3)(4,uk,1,0,":svg:path",4),K()()),t&2&&(z(3),yt(n.muted?3:4))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})},xl;function hk(){if(xl==null){let e=typeof document<"u"?document.head:null;xl=!!(e&&(e.createShadowRoot||e.attachShadow))}return xl}function Ma(e){if(hk()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Sl(){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 mn(e){return e.composedPath?e.composedPath()[0]:e.target}function s_(e){return e.buttons===0||e.detail===0}function a_(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)}function dk(e,t=0){return fk(e)?Number(e):arguments.length===2?t:0}function fk(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function hn(e){return e instanceof $t?e.nativeElement:e}function Ut(e,t,n,r,i){let o=parseInt(qd.major),s=parseInt(qd.minor);return o>19||o===19&&s>0||o===0&&s===0?e.listen(t,n,r,i):(t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)})}var Yo=new WeakMap,ja=(()=>{class e{_appRef;_injector=N(Lt);_environmentInjector=N(Vn);load(n){let r=this._appRef=this._appRef||this._injector.get(lr),i=Yo.get(r);i||(i={loaders:new Set,refs:[]},Yo.set(r,i),r.onDestroy(()=>{Yo.get(r)?.refs.forEach(o=>o.destroy()),Yo.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(Qy(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Zc;try{Zc=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Zc=!1}var Gn=(()=>{class e{_platformId=N(sa);isBrowser=this._platformId?sT(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||Zc)&&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=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pk=new Ee("cdk-dir-doc",{providedIn:"root",factory:gk});function gk(){return N(nt)}var mk=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function yk(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?mk.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Bs=(()=>{class e{value="ltr";change=new tt;constructor(){let n=N(pk,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=yk(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pr;function vk(){if(pr==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return pr=!1,pr;if("scrollBehavior"in document.documentElement.style)pr=!0;else{let e=Element.prototype.scrollTo;e?pr=!/\{\s*\[native code\]\s*\}/.test(e.toString()):pr=!1}}return pr}var _k=20,bk=(()=>{class e{_ngZone=N(Ye);_platform=N(Gn);_renderer=N(wn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new de;_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=_k){return this._platform.isBrowser?new _t(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(mg(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):gu()}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(mu(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,n)&&r.push(o)}),r}_scrollableContainsElement(n,r){let i=hn(r),o=n.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),wk=20,Lh=(()=>{class e{_platform=N(Gn);_listeners;_viewportSize;_change=new de;_document=N(nt,{optional:!0});constructor(){let n=N(Ye),r=N(wn).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=o=>this._change.next(o);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,o=i.getBoundingClientRect(),s=-o.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-o.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(n=wk){return n>0?this._change.pipe(mg(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=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Il={},l_=(()=>{class e{_appId=N($u);getId(n){return this._appId!=="ng"&&(n+=this._appId),Il.hasOwnProperty(n)||(Il[n]=0),`${n}${Il[n]++}`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function c_(e){return Array.isArray(e)?e:[e]}function u_(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"?ip(e,t):(r==="input"||r==="select"||r==="textarea")&&rp(e,t),np("canvas",e,t,ip),np("input, textarea, select",e,t,rp),t}function np(e,t,n,r){let i=t.querySelectorAll(e);if(i.length){let o=n.querySelectorAll(e);for(let s=0;s<i.length;s++)r(i[s],o[s])}}var Ek=0;function rp(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${Ek++}`)}function ip(e,t){let n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch{}}function Mh(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 Yc(e,t,n){let{top:r,bottom:i,left:o,right:s}=e;return n>=r&&n<=i&&t>=o&&t<=s}function zi(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function op(e,t,n,r){let{top:i,right:o,bottom:s,left:a,width:l,height:u}=e,d=l*t,f=u*t;return r>i-f&&r<s+f&&n>a-d&&n<o+d}var h_=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:Mh(t)})})}handleScroll(e){let t=mn(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,i,o;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,o=l.left}else i=t.scrollTop,o=t.scrollLeft;let s=r.top-i,a=r.left-o;return this.positions.forEach((l,u)=>{l.clientRect&&t!==u&&t.contains(u)&&zi(l.clientRect,s,a)}),r.top=i,r.left=o,{top:s,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function d_(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 jh(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 Yr(e,t){let n=t?"":"none";jh(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 sp(e,t,n){jh(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},n)}function Fs(e,t){return t&&t!="none"?e+" "+t:e}function ap(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=Us(t.left,t.top)}function Us(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function lp(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function xk(e){let t=getComputedStyle(e),n=Cl(t,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),o=Cl(t,"transition-duration"),s=Cl(t,"transition-delay");return lp(o[i])+lp(s[i])}function Cl(e,t){return e.getPropertyValue(t).split(",").map(n=>n.trim())}var Sk=new Set(["position"]),Ik=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,n,r,i,o,s,a,l,u){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=i,this._previewClass=o,this._pickupPositionOnPage=s,this._initialTransform=a,this._zIndex=l,this._renderer=u}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),cp(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 xk(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,o=e.viewContainer.createEmbeddedView(n,e.context);o.detectChanges(),r=d_(o,this._document),this._previewEmbeddedView=o,e.matchSize?ap(r,i):r.style.transform=Us(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=u_(this._rootElement),ap(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return jh(r.style,{"pointer-events":"none",margin:cp(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Sk),Yr(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 cp(e){return"showPopover"in e}var Ck={passive:!0},up={passive:!1},Tk={passive:!1,capture:!0},Ok=800,hp=new Set(["position"]),Rk=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=ir(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new de;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=vt.EMPTY;_pointerUpSubscription=vt.EMPTY;_scrollSubscription=vt.EMPTY;_resizeSubscription=vt.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=>Yr(t,e)))}_disabled=!1;beforeStarted=new de;started=new de;released=new de;ended=new de;entered=new de;exited=new de;dropped=new de;moved=this._moveEvents;data;constrainPosition;constructor(e,t,n,r,i,o,s){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=o,this._renderer=s,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new h_(n),o.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=>hn(n)),this._handles.forEach(n=>Yr(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=hn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Ut(this._renderer,t,"mousedown",this._pointerDown,up),Ut(this._renderer,t,"touchstart",this._pointerDown,Ck),Ut(this._renderer,t,"dragstart",this._nativeDragStart,up)]),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?hn(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),Yr(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Yr(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 o=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),s=this._dropContainer;if(!o){this._endDragSequence(e);return}(!s||!s.isDragging()&&!s.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){Ni(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Ut(this._renderer,t,"selectstart",Dk,Tk)}),n){let r=this._rootElement,i=r.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(s,r),this._initialTransform=r.style.transform||"",this._preview=new Ik(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)),sp(r,!1,hp),this._document.body.appendChild(i.replaceChild(o,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=Ni(t),i=!r&&t.button!==0,o=this._rootElement,s=mn(t),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+Ok>Date.now(),l=r?a_(t):s_(t);if(s&&s.draggable&&t.type==="mousedown"&&t.preventDefault(),n||i||a||l)return;if(this._handles.length){let f=o.style;this._rootElementTapHighlight=f.webkitTapHighlightColor||"",f.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(f=>this._updateOnScroll(f)),this._boundaryElement&&(this._boundaryRect=Mh(this._boundaryElement));let u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){sp(this._rootElement,!0,hp),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),o=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:o,distance:i,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,o,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=s=>{(!s||this._preview&&mn(s)===this._preview.element&&s.propertyName==="transform")&&(o(),n(),clearTimeout(i))},i=setTimeout(r,t*1.5),o=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=d_(this._placeholderRef,this._document)):n=u_(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,o=Ni(n)?n.targetTouches[0]:n,s=this._getViewportScrollPosition(),a=o.pageX-i.left-s.left,l=o.pageY-i.top-s.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=Ni(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 o=this._ownerSVGElement.getScreenCTM();if(o){let s=this._ownerSVGElement.createSVGPoint();return s.x=r,s.y=i,s.matrixTransform(o.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:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,s=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),u=s.top+o,d=s.bottom-(l-o),f=s.left+i,p=s.right-(a-i);n=dp(n,f,p),r=dp(r,u,d)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-i.x),s=Math.abs(n-i.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=t>i.x?1:-1,i.x=t),s>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,Yr(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let n=1/this.scale,r=Us(e*n,t*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Fs(r,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=Us(e,t);this._preview.setTransform(Fs(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,o=n.right-r.right,s=r.top-n.top,a=n.bottom-r.bottom;r.width>n.width?(i>0&&(e+=i),o>0&&(e-=o)):e=0,r.height>n.height?(s>0&&(t+=s),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:Ni(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=mn(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&zi(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=Ma(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 hn(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 dp(e,t,n){return Math.max(t,Math.min(n,e))}function Ni(e){return e.type[0]==="t"}function Dk(e){e.preventDefault()}function f_(e,t,n){let r=fp(t,e.length-1),i=fp(n,e.length-1);if(r===i)return;let o=e[r],s=i<r?-1:1;for(let a=r;a!==i;a+=s)e[a]=e[a+s];e[i]=o}function fp(e,t){return Math.max(0,Math.min(t,e))}var pp=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,o=this._getItemIndexFromPointerPosition(e,t,n,r);if(o===-1&&i.length>0)return null;let s=this.orientation==="horizontal",a=i.findIndex(b=>b.drag===e),l=i[o],u=i[a].clientRect,d=l.clientRect,f=a>o?1:-1,p=this._getItemOffsetPx(u,d,f),g=this._getSiblingOffsetPx(a,i,f),m=i.slice();return f_(i,a,o),i.forEach((b,I)=>{if(m[I]===b)return;let A=b.drag===e,$=A?p:g,j=A?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=$;let k=Math.round(b.offset*(1/b.drag.scale));s?(j.style.transform=Fs(`translate3d(${k}px, 0, 0)`,b.initialTransform),zi(b.clientRect,0,$)):(j.style.transform=Fs(`translate3d(0, ${k}px, 0)`,b.initialTransform),zi(b.clientRect,$,0))}),this._previousSwap.overlaps=Yc(d,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=s?r.x:r.y,{previousIndex:a,currentIndex:o}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,o=this._activeDraggables,s=o.indexOf(e),a=e.getPlaceholderElement(),l=o[i];if(l===e&&(l=o[i+1]),!l&&(i==null||i===-1||i<o.length-1)&&this._shouldEnterAsFirstChild(t,n)&&(l=o[0]),s>-1&&o.splice(s,1),l&&!this._dragDropRegistry.isDragging(l)){let u=l.getRootElement();u.parentElement.insertBefore(a,u),o.splice(i,0,e)}else this._element.appendChild(a),o.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})=>{zi(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:Mh(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,o=t[e+n*-1],s=i[r?"width":"height"]*n;if(o){let a=r?"left":"top",l=r?"right":"bottom";n===-1?s-=o.clientRect[a]-i[l]:s+=i[a]-o.clientRect[l]}return s}_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",o=this._itemPositions.findIndex(({drag:s,clientRect:a})=>{if(s===e)return!1;if(r){let l=i?r.x:r.y;if(s===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 o===-1||!this._sortPredicate(o,e)?-1:o}},Nk=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),o=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let s=this._activeItems[i];if(o.drag===s&&o.overlaps&&o.deltaX===r.x&&o.deltaY===r.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),u=s.getRootElement();i>a?u.after(l):u.before(l),f_(this._activeItems,a,i);let d=this._getRootNode().elementFromPoint(t,n);return o.deltaX=r.x,o.deltaY=r.y,o.drag=s,o.overlaps=u===d||u.contains(d),{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 o=this._activeItems[i],s=this._activeItems.indexOf(e);s>-1&&this._activeItems.splice(s,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(i,0,e),o.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(o=>{let s=o.getRootElement();return r===s||s.contains(r)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=Ma(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 o=0;o<this._activeItems.length;o++){let s=this._activeItems[o];if(s!==e){let{x:a,y:l}=s.getRootElement().getBoundingClientRect(),u=Math.hypot(t-a,n-l);u<r&&(r=u,i=o)}}return i}},gp=.05,p_=.05,nn=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(nn||{}),At=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(At||{}),kk=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new de;entered=new de;exited=new de;dropped=new de;sorted=new de;receivingStarted=new de;receivingStopped=new de;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=vt.EMPTY;_verticalScrollDirection=nn.NONE;_horizontalScrollDirection=At.NONE;_scrollNode;_stopScrollTimers=new de;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,n,r,i){this._dragDropRegistry=t,this._ngZone=r,this._viewportRuler=i;let o=this.element=hn(e);this._document=n,this.withOrientation("vertical").withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new h_(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,o,s,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:i,distance:o,dropPoint:s,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 pp&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new Nk(this._document,this._dragDropRegistry);else{let t=new pp(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=hn(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||!op(this._domRect,gp,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=nn.NONE,i=At.NONE;if(this._parentPositions.positions.forEach((o,s)=>{s===this._document||!o.clientRect||n||op(o.clientRect,gp,e,t)&&([r,i]=Ak(s,o.clientRect,this._direction,e,t),(r||i)&&(n=s))}),!r&&!i){let{width:o,height:s}=this._viewportRuler.getViewportSize(),a={width:o,height:s,top:0,right:o,bottom:s,left:0};r=g_(a,t),i=m_(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(),zb(0,fb).pipe(ai(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===nn.UP?e.scrollBy(0,-t):this._verticalScrollDirection===nn.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===At.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===At.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&Yc(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||!Yc(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=Ma(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 g_(e,t){let{top:n,bottom:r,height:i}=e,o=i*p_;return t>=n-o&&t<=n+o?nn.UP:t>=r-o&&t<=r+o?nn.DOWN:nn.NONE}function m_(e,t){let{left:n,right:r,width:i}=e,o=i*p_;return t>=n-o&&t<=n+o?At.LEFT:t>=r-o&&t<=r+o?At.RIGHT:At.NONE}function Ak(e,t,n,r,i){let o=g_(t,i),s=m_(t,r),a=nn.NONE,l=At.NONE;if(o){let u=e.scrollTop;o===nn.UP?u>0&&(a=nn.UP):e.scrollHeight-u>e.clientHeight&&(a=nn.DOWN)}if(s){let u=e.scrollLeft;n==="rtl"?s===At.RIGHT?u<0&&(l=At.RIGHT):e.scrollWidth+u>e.clientWidth&&(l=At.LEFT):s===At.LEFT?u>0&&(l=At.LEFT):e.scrollWidth-u>e.clientWidth&&(l=At.RIGHT)}return[a,l]}var ki={capture:!0},Tl={passive:!1,capture:!0},Pk=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Vt({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}
|
|
44
|
+
`],encapsulation:2,changeDetection:0})}return e})(),y_=(()=>{class e{_ngZone=N(Ye);_document=N(nt);_styleLoader=N(ja);_renderer=N(wn).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=ir([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new de;pointerUp=new de;scroll=new de;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=Ut(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,Tl)})}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(Pk),this._activeDragInstances.update(i=>[...i,n]),this._activeDragInstances().length===1)){let i=r.type.startsWith("touch"),o=a=>this.pointerUp.next(a),s=[["scroll",a=>this.scroll.next(a),ki],["selectstart",this._preventDefaultWhileDragging,Tl]];i?s.push(["touchend",o,ki],["touchcancel",o,ki]):s.push(["mouseup",o,ki]),i||s.push(["mousemove",a=>this.pointerMove.next(a),Tl]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=s.map(([a,l,u])=>Ut(this._renderer,this._document,a,l,u))})}}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 _t(i=>this._ngZone.runOutsideAngular(()=>{let o=Ut(this._renderer,n,"scroll",s=>{this._activeDragInstances().length&&i.next(s)},ki);return()=>{o()}}))),Js(...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=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Lk={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Mk=(()=>{class e{_document=N(nt);_ngZone=N(Ye);_viewportRuler=N(Lh);_dragDropRegistry=N(y_);_renderer=N(wn).createRenderer(null,null);constructor(){}createDrag(n,r=Lk){return new Rk(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new kk(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),mp=new Ee("CDK_DRAG_PARENT"),jk=new Ee("CdkDragHandle"),Vk=new Ee("CDK_DRAG_CONFIG"),Bk=new Ee("CdkDropList"),Fk=(()=>{class e{element=N($t);dropContainer=N(Bk,{optional:!0,skipSelf:!0});_ngZone=N(Ye);_viewContainerRef=N(wi);_dir=N(Bs,{optional:!0});_changeDetectorRef=N(Co);_selfHandle=N(jk,{optional:!0,self:!0});_parentDrag=N(mp,{optional:!0,skipSelf:!0});_dragDropRegistry=N(y_);_destroyed=new de;_handles=new uu([]);_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 tt;released=new tt;ended=new tt;entered=new tt;exited=new tt;dropped=new tt;moved=new _t(n=>{let r=this._dragRef.moved.pipe(Ks(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=N(Lt);constructor(){let n=this.dropContainer,r=N(Vk,{optional:!0}),i=N(Mk);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(ai(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(){wo(()=>{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):hn(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,i=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=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:dk(i),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(Wb(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:o,previewClass:s,boundaryElement:a,draggingDisabled:l,rootElementSelector:u,previewContainer:d}=n;this.disabled=l??!1,this.dragStartDelay=i||0,r&&(this.lockAxis=r),o&&(this.constrainPosition=o),s&&(this.previewClass=s),a&&(this.boundaryElement=a),u&&(this.rootElementSelector=u),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.pipe(Kb(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),vg(n=>Js(...n.map(r=>r._stateChanges.pipe(yg(r))))),ai(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=ma({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&_a("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",kC],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",AC]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[cC([{provide:mp,useExisting:e}]),zg]})}return e})(),Uk=e=>({"lc:cursor-grab":e}),yp=(e,t)=>t.url;function Hk(e,t){if(e&1&&je(0,"source",11),e&2){let n=t.$implicit;Nn("type",n.mimeType),xi("media","(max-width: ",n.width,"px)"),Me("src",n.url,Yt)}}function $k(e,t){if(e&1&&je(0,"source",12),e&2){let n=t.$implicit;Nn("type",n.mimeType),Me("src",n.url,Yt)}}var zk=class Kc{constructor(t){this.elementRef=t}video;closeClicked=new tt;videoClicked=new tt;isDragging=!1;VideoUtils=Ph;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||Kc)(Tt($t))};static \u0275cmp=Vt({type:Kc,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:16,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","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-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type","media"],[3,"src","type"]],template:function(t,n){t&1&&(Y(0,"div",0),ut("click",function(){return n.onVideoClick()})("keyup",function(){return n.onVideoClick()})("cdkDragMoved",function(){return n.isDragging=!0}),Y(1,"button",1),ut("click",function(r){return r.stopPropagation(),n.close()}),ar(),Y(2,"svg",2),je(3,"path",3)(4,"path",4),K()(),ws(),Y(5,"div",5)(6,"div",6),ar(),Y(7,"svg",7),je(8,"path",8),K()(),ws(),Y(9,"div",9),ht(10,"Tap to unmute"),K()(),Y(11,"video",10),Mt(12,Hk,1,4,"source",11,yp),Mt(14,$k,1,2,"source",12,yp),K()()),t&2&&(Me("ngClass",uC(3,Uk,n.isDragging))("cdkDragBoundary","body"),z(11),Me("muted",!0),z(),jt(n.video.sources),z(2),jt(n.VideoUtils.getBestSources(n.video.sources)))},dependencies:[rT,Fk],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})},Vh=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}},Jc=class extends Vh{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,n,r,i){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.projectableNodes=i}},v_=class extends Vh{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()}},qk=class extends Vh{element;constructor(e){super(),this.element=e instanceof $t?e.nativeElement:e}},Bh=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Jc)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof v_)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof qk)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)}},Wk=class extends Bh{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(io,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||Lt.NULL,i=r.get(Vn,n.injector);t=Qy(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]}},vp=(()=>{class e extends Bh{_moduleRef=N(io,{optional:!0});_document=N(nt);_viewContainerRef=N(wi);_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 tt;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=ma({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ei]})}return e})(),Ai;function Gk(){if(Ai==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ai=!0}))}finally{Ai=Ai||!1}return Ai}function Zk(e){return Gk()?e:!!e.capture}var Yk=new Ee("cdk-input-modality-detector-options"),Kk={ignoreKeys:[18,17,224,91,16]},__=650,Ol={passive:!0,capture:!0},Jk=(()=>{class e{_platform=N(Gn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new uu(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=mn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<__||(this._modality.next(s_(n)?"keyboard":"mouse"),this._mostRecentTarget=mn(n))};_onTouchstart=n=>{if(a_(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=mn(n)};constructor(){let n=N(Ye),r=N(nt),i=N(Yk,{optional:!0});if(this._options=L(L({},Kk),i),this.modalityDetected=this._modality.pipe(Yb(1)),this.modalityChanged=this.modalityDetected.pipe(Gb()),this._platform.isBrowser){let o=N(wn).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Ut(o,r,"keydown",this._onKeydown,Ol),Ut(o,r,"mousedown",this._onMousedown,Ol),Ut(o,r,"touchstart",this._onTouchstart,Ol)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ls=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(ls||{}),Qk=new Ee("cdk-focus-monitor-default-options"),Ko=Zk({passive:!0,capture:!0}),Xk=(()=>{class e{_ngZone=N(Ye);_platform=N(Gn);_inputModalityDetector=N(Jk);_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=N(nt,{optional:!0});_stopInputModalityDetector=new de;constructor(){let n=N(Qk,{optional:!0});this._detectionMode=n?.detectionMode||ls.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=mn(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=hn(n);if(!this._platform.isBrowser||i.nodeType!==1)return gu();let o=Ma(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new de,rootNode:o};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=hn(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 o=hn(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,r,l)):(this._setOrigin(r),typeof o.focus=="function"&&o.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===ls.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===ls.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?__:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=mn(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),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,Ko),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Ko)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ai(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!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,Ko),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Ko),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,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,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 o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),eA=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Vt({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}
|
|
45
|
+
`],encapsulation:2,changeDetection:0})}return e})(),b_=(()=>{class e{_platform=N(Gn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return nA(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=tA(uA(n));if(r&&(_p(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=_p(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!lA(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return cA(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function tA(e){try{return e.frameElement}catch{return null}}function nA(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function rA(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function iA(e){return sA(e)&&e.type=="hidden"}function oA(e){return aA(e)&&e.hasAttribute("href")}function sA(e){return e.nodeName.toLowerCase()=="input"}function aA(e){return e.nodeName.toLowerCase()=="a"}function w_(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function _p(e){if(!w_(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function lA(e){let t=e.nodeName.toLowerCase(),n=t==="input"&&e.type;return n==="text"||n==="password"||t==="select"||t==="textarea"}function cA(e){return iA(e)?!1:rA(e)||oA(e)||e.hasAttribute("contenteditable")||w_(e)}function uA(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var hA=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,o){this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._injector=o,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?wo(e,{injector:this._injector}):setTimeout(e)}},dA=(()=>{class e{_checker=N(b_);_ngZone=N(Ye);_document=N(nt);_injector=N(Lt);constructor(){N(ja).load(eA)}create(n,r=!1){return new hA(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function bp(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function ft(e){return e==null?"":typeof e=="string"?e:`${e}px`}function fA(e,...t){return t.length?t.some(n=>e[n]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var wp=vk(),pA=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=ft(-this._previousScrollPosition.left),e.style.top=ft(-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||"",o=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),wp&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),wp&&(n.scrollBehavior=i,r.scrollBehavior=o)}}_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}},gA=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(mu(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())}},E_=class{enable(){}disable(){}attach(){}};function Qc(e,t){return t.some(n=>{let r=e.bottom<n.top,i=e.top>n.bottom,o=e.right<n.left,s=e.left>n.right;return r||i||o||s})}function Ep(e,t){return t.some(n=>{let r=e.top<n.top,i=e.bottom>n.bottom,o=e.left<n.left,s=e.right>n.right;return r||i||o||s})}var mA=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();Qc(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}},yA=(()=>{class e{_scrollDispatcher=N(bk);_viewportRuler=N(Lh);_ngZone=N(Ye);_document=N(nt);constructor(){}noop=()=>new E_;close=n=>new gA(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new pA(this._viewportRuler,this._document);reposition=n=>new mA(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),x_=class{positionStrategy;scrollStrategy=new E_;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])}}},vA=class{connectionPair;scrollableViewProperties;constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}},S_=(()=>{class e{_attachedOverlays=[];_document=N(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=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),_A=(()=>{class e extends S_{_ngZone=N(Ye);_renderer=N(wn).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=bm(e)))(r||e)}})();static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),bA=(()=>{class e extends S_{_platform=N(Gn);_ngZone=N(Ye);_renderer=N(wn).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(()=>[Ut(this._renderer,r,"pointerdown",this._pointerDownListener,i),Ut(this._renderer,r,"click",this._clickListener,i),Ut(this._renderer,r,"auxclick",this._clickListener,i),Ut(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=mn(n)};_clickListener=n=>{let r=mn(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(xp(a.overlayElement,r)||xp(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=bm(e)))(r||e)}})();static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function xp(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 I_=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Vt({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}
|
|
46
|
+
`],encapsulation:2,changeDetection:0})}return e})(),Fh=(()=>{class e{_platform=N(Gn);_containerElement;_document=N(nt);_styleLoader=N(ja);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||bp()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),bp()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(I_)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),wA=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()}},Uh=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new de;_attachments=new de;_detachments=new de;_positionStrategy;_scrollStrategy;_locationChanges=vt.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new de;_outsidePointerEvents=new de;_renders=new de;_afterRenderRef;_afterNextRenderRef;constructor(e,t,n,r,i,o,s,a,l,u=!1,d,f){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=o,this._document=s,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=u,this._injector=d,this._renderer=f,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=PC(()=>Um(()=>{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=wo(()=>{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=L(L({},this._config),e),this._updateElementSize()}setDirection(e){this._config=Qe(L({},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=ft(this._config.width),e.height=ft(this._config.height),e.minWidth=ft(this._config.minWidth),e.minHeight=ft(this._config.minHeight),e.maxWidth=ft(this._config.maxWidth),e.maxHeight=ft(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new wA(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=c_(t||[]).filter(i=>!!i);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(ai(Js(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?.()}},Sp="cdk-overlay-connected-position-bounding-box",EA=/([A-Za-z%]+)$/,xA=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 de;_resizeSubscription=vt.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(Sp),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=[],o;for(let s of this._preferredPositions){let a=this._getOriginPoint(e,r,s),l=this._getOverlayPoint(a,t,s),u=this._getOverlayFit(l,t,n,s);if(u.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(s,a);return}if(this._canFitWithFlexibleDimensions(u,l,n)){i.push({position:s,origin:a,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(a,s)});continue}(!o||o.overlayFit.visibleArea<u.visibleArea)&&(o={overlayFit:u,overlayPoint:l,originPoint:a,position:s,overlayRect:t})}if(i.length){let s=null,a=-1;for(let l of i){let u=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);u>a&&(a=u,s=l)}this._isPushed=!1,this._applyPosition(s.position,s.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(o.position,o.originPoint);return}this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&gr(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Sp),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 o=this._isRtl()?e.right:e.left,s=this._isRtl()?e.left:e.right;r=n.originX=="start"?o:s}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=Cp(t),{x:o,y:s}=e,a=this._getOffset(r,"x"),l=this._getOffset(r,"y");a&&(o+=a),l&&(s+=l);let u=0-o,d=o+i.width-n.width,f=0-s,p=s+i.height-n.height,g=this._subtractOverflows(i.width,u,d),m=this._subtractOverflows(i.height,f,p),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,o=Ip(this._overlayRef.getConfig().minHeight),s=Ip(this._overlayRef.getConfig().minWidth),a=e.fitsInViewportVertically||o!=null&&o<=r,l=e.fitsInViewportHorizontally||s!=null&&s<=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=Cp(t),i=this._viewportRect,o=Math.max(e.x+r.width-i.width,0),s=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),u=0,d=0;return r.width<=i.width?u=l||-o:u=e.x<this._viewportMargin?i.left-n.left-e.x:0,r.height<=i.height?d=a||-s:d=e.y<this._viewportMargin?i.top-n.top-e.y:0,this._previousPushAmount={x:u,y:d},{x:e.x+u,y:e.y+d}}_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||!SA(this._lastScrollVisibility,n)){let r=new vA(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,o,s;if(t.overlayY==="top")o=e.y,i=n.height-o+this._viewportMargin;else if(t.overlayY==="bottom")s=n.height-e.y+this._viewportMargin*2,i=n.height-s+this._viewportMargin;else{let p=Math.min(n.bottom-e.y+n.top,e.y),g=this._lastBoundingBoxSize.height;i=p*2,o=e.y-p,i>g&&!this._isInitialRender&&!this._growAfterOpen&&(o=e.y-g/2)}let a=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,l=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,u,d,f;if(l)f=n.width-e.x+this._viewportMargin*2,u=e.x-this._viewportMargin;else if(a)d=e.x,u=n.right-e.x;else{let p=Math.min(n.right-e.x+n.left,e.x),g=this._lastBoundingBoxSize.width;u=p*2,d=e.x-p,u>g&&!this._isInitialRender&&!this._growAfterOpen&&(d=e.x-g/2)}return{top:o,left:d,bottom:s,right:f,width:u,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,o=this._overlayRef.getConfig().maxWidth;r.height=ft(n.height),r.top=ft(n.top),r.bottom=ft(n.bottom),r.width=ft(n.width),r.left=ft(n.left),r.right=ft(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=ft(i)),o&&(r.maxWidth=ft(o))}this._lastBoundingBoxSize=n,gr(this._boundingBox.style,r)}_resetBoundingBoxStyles(){gr(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){gr(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){let u=this._viewportRuler.getViewportScrollPosition();gr(n,this._getExactOverlayY(t,e,u)),gr(n,this._getExactOverlayX(t,e,u))}else n.position="static";let s="",a=this._getOffset(t,"x"),l=this._getOffset(t,"y");a&&(s+=`translateX(${a}px) `),l&&(s+=`translateY(${l}px)`),n.transform=s.trim(),o.maxHeight&&(r?n.maxHeight=ft(o.maxHeight):i&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=ft(o.maxWidth):i&&(n.maxWidth="")),gr(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 o=this._document.documentElement.clientHeight;r.bottom=`${o-(i.y+this._overlayRect.height)}px`}else r.top=ft(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 o;if(this._isRtl()?o=e.overlayX==="end"?"left":"right":o=e.overlayX==="end"?"right":"left",o==="right"){let s=this._document.documentElement.clientWidth;r.right=`${s-(i.x+this._overlayRect.width)}px`}else r.left=ft(i.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Ep(e,n),isOriginOutsideView:Qc(e,n),isOverlayClipped:Ep(t,n),isOverlayOutsideView:Qc(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&&c_(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 $t)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 gr(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Ip(e){if(typeof e!="number"&&e!=null){let[t,n]=e.split(EA);return!n||n==="px"?parseFloat(t):null}return e||null}function Cp(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 SA(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var Tp="cdk-global-overlay-wrapper",IA=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(Tp),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:o,maxHeight:s}=n,a=(r==="100%"||r==="100vw")&&(!o||o==="100%"||o==="100vw"),l=(i==="100%"||i==="100vh")&&(!s||s==="100%"||s==="100vh"),u=this._xPosition,d=this._xOffset,f=this._overlayRef.getConfig().direction==="rtl",p="",g="",m="";a?m="flex-start":u==="center"?(m="center",f?g=d:p=d):f?u==="left"||u==="end"?(m="flex-end",p=d):(u==="right"||u==="start")&&(m="flex-start",g=d):u==="left"||u==="start"?(m="flex-start",p=d):(u==="right"||u==="end")&&(m="flex-end",g=d),e.position=this._cssPosition,e.marginLeft=a?"0":p,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(Tp),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},CA=(()=>{class e{_viewportRuler=N(Lh);_document=N(nt);_platform=N(Gn);_overlayContainer=N(Fh);constructor(){}global(){return new IA}flexibleConnectedTo(n){return new xA(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),C_=(()=>{class e{scrollStrategies=N(yA);_overlayContainer=N(Fh);_positionBuilder=N(CA);_keyboardDispatcher=N(_A);_injector=N(Lt);_ngZone=N(Ye);_document=N(nt);_directionality=N(Bs);_location=N(nv);_outsideClickDispatcher=N(bA);_animationsModuleType=N(tE,{optional:!0});_idGenerator=N(l_);_renderer=N(wn).createRenderer(null,null);_appRef;_styleLoader=N(ja);constructor(){}create(n){this._styleLoader.load(I_);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new x_(n);return s.direction=s.direction||this._directionality.value,new Uh(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Vn),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(lr)),new Wk(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function TA(e,t){}var Hs=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},OA=(()=>{class e extends Bh{_elementRef=N($t);_focusTrapFactory=N(dA);_config;_interactivityChecker=N(b_);_ngZone=N(Ye);_overlayRef=N(Uh);_focusMonitor=N(Xk);_renderer=N(Sy);_platform=N(Gn);_document=N(nt,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=N(Co);_injector=N(Lt);_isDestroyed=!1;constructor(){super(),this._config=N(Hs,{optional:!0})||new Hs,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=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=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||wo(()=>{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=Sl(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.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=Sl();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Sl()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Vt({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&uc(vp,7),n&2){let i;hc(i=dc())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&ya("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:[Ei],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&pt(0,TA,0,0,"ng-template",0)},dependencies:[vp],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
47
|
+
`],encapsulation:2})}return e})(),cs=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new de;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&&!fA(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}},RA=new Ee("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=N(C_);return()=>e.scrollStrategies.block()}}),T_=new Ee("DialogData"),DA=new Ee("DefaultDialogConfig"),NA=(()=>{class e{_overlay=N(C_);_injector=N(Lt);_defaultOptions=N(DA,{optional:!0});_parentDialog=N(e,{optional:!0,skipSelf:!0});_overlayContainer=N(Fh);_idGenerator=N(l_);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new de;_afterOpenedAtThisLevel=new de;_ariaHiddenElements=new Map;_scrollStrategy=N(RA);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=jb(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(yg(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Hs;r=L(L({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),s=this._overlay.create(o),a=new cs(s,r),l=this._attachContainer(s,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(){Rl(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){Rl(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),Rl(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new x_({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 o=i.injector||i.viewContainerRef?.injector,s=[{provide:Hs,useValue:i},{provide:cs,useValue:r},{provide:Uh,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,s.push(...i.container.providers(i))):a=OA;let l=new Jc(a,i.viewContainerRef,Lt.create({parent:o||this._injector,providers:s}));return n.attach(l).instance}_attachDialogContent(n,r,i,o){if(n instanceof no){let s=this._createInjector(o,r,i,void 0),a={$implicit:o.data,dialogRef:r};o.templateContext&&(a=L(L({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new v_(n,null,a,s))}else{let s=this._createInjector(o,r,i,this._injector),a=i.attachComponentPortal(new Jc(n,o.viewContainerRef,s));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,o){let s=n.injector||n.viewContainerRef?.injector,a=[{provide:T_,useValue:n.data},{provide:cs,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!s||!s.get(Bs,null,{optional:!0}))&&a.push({provide:Bs,useValue:{value:n.direction,change:gu()}}),Lt.create({parent:s||o,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.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 o=r[i];o!==n&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.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=ue({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Rl(e,t){let n=e.length;for(;n--;)t(e[n])}var kA=Ig;function AA(e){return!!e[kA]}var PA=Symbol("__destroy"),O_=Symbol("__decoratorApplied");function R_(e){return typeof e=="string"?Symbol(`__destroy__${e}`):PA}function LA(e){e.prototype[O_]=!0}function D_(e,t){e[t]||(e[t]=new de)}function N_(e,t){e[t]&&(e[t].next(),e[t].complete(),e[t]=null)}function k_(e){e instanceof vt&&e.unsubscribe()}function MA(e){Array.isArray(e)&&e.forEach(k_)}function A_(e,t){return function(){if(e&&e.call(this),N_(this,R_()),t.arrayName&&MA(this[t.arrayName]),t.checkProperties)for(let n in this)t.blackList?.includes(n)||k_(this[n])}}function jA(e,t){e.prototype.ngOnDestroy=A_(e.prototype.ngOnDestroy,t)}function VA(e,t){let n=e.\u0275pipe;n.onDestroy=A_(n.onDestroy,t)}function BA(e={}){return t=>{AA(t)?VA(t,e):jA(t,e),LA(t)}}var Op=7,Rp=Symbol("CheckerHasBeenSet");function FA(e,t){e[Rp]||UA()||(Dp(()=>Ys(Promise.resolve()).pipe(Wi(()=>{let n;try{n=G1(e)}catch{n=null}let r=n?.lView;if(r==null)return fu;let i=r[Op]||(r[Op]=[]),o=new de;return i.push(function(){Dp(()=>{o.next(),o.complete()})}),o}),Wi(()=>Promise.resolve())).subscribe(()=>{(t.observed??t.observers.length>0)&&console.warn(HA(e))})),e[Rp]=!0)}function UA(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function Dp(e){let t=Gi.Zone;return t&&typeof t.root?.run=="function"?t.root.run(e):e()}function HA(e){return`
|
|
80
48
|
The ${e.constructor.name} still has subscriptions that haven't been unsubscribed.
|
|
81
49
|
This may happen if the class extends another class decorated with @UntilDestroy().
|
|
82
50
|
The child class implements its own ngOnDestroy() method but doesn't call super.ngOnDestroy().
|
|
@@ -113,5 +81,5 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
|
|
|
113
81
|
super.ngOnDestroy();
|
|
114
82
|
}
|
|
115
83
|
}
|
|
116
|
-
`}var HE=!1;function WU(e,t,n){let r=e[t];if(HE&&typeof r!="function")throw new Error(`${e.constructor.name} is using untilDestroyed but doesn't implement ${t}`);dR(e,n),e[t]=function(){r.apply(this,arguments),fR(this,n),e[t]=r}}function gR(e,t){return n=>{let r=uR(t);typeof t=="string"?WU(e,t,r):(HE&&GU(e),dR(e,r));let i=e[r];return HE&&HU(e,i),n.pipe(hr(i))}}function GU(e){let t=Object.getPrototypeOf(e);if(!(lR in t))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var ER=Re(np()),yR=Re(np()),Rh=class Hf{engagementTrigger;isMobile;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData,this.isMobile=new yR.default().getDevice().type==="mobile"}static \u0275fac=function(t){return new(t||Hf)};static \u0275cmp=yt({type:Hf,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(t,n){},encapsulation:2})},jE=Re(qn());function zU(e,t){e&1&&tn(0," Open Cart ")}function qU(e,t){e&1&&tn(0," Add To Cart ")}var Nh=class Wy{item;performCTA=new Je;atcClicked=!1;clickAddToCart(t){t.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?jE.ClickActionType.OPEN_CART:jE.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||Wy)};static \u0275cmp=yt({type:Wy,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:12,vars:11,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1),Ne(2,"img",2),re(3,"div",3)(4,"div",4),tn(5),ie(),Ne(6,"div",5),Sn(7,"cooeeCurrency"),Sn(8,"safeHtml"),ie()(),re(9,"button",6),Rt("click",function(r){return n.clickAddToCart(r)}),xt(10,zU,1,0)(11,qU,1,0),ie()()),t&2&&(X(2),zn("alt",n.item.name),Be("src",n.item.imageURL,an),X(3),as(" ",n.item.name," "),X(),Be("innerHTML",Nn(8,9,Nn(7,7,n.item.price)),Fr),X(3),go("atc-clicked",n.atcClicked),X(),$t(n.atcClicked?10:11))},dependencies:[li,ui],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#f6339a;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})},Oh=Re(qn()),vR=Re(aE()),YU=(0,vR.default)(fetch),Ah=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let n,r=Dt.getRootPrefix()+`products/${t}.js`;try{n=await(await YU(r)).json()}catch(i){C.error(`Failed to fetch ${r}`,i);let s=_t.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){C.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}}},KU=(e,t)=>t.id;function ZU(e,t){if(e&1&&Ne(0,"img",9),e&2){let n=t.$implicit,r=me(2);Be("src",n,an)("alt",r.item.name)}}function XU(e,t){if(e&1&&Qt(0,ZU,1,2,"img",9,ss),e&2){let n=me();en(n.ajaxItem.images)}}function JU(e,t){if(e&1&&Ne(0,"img",9),e&2){let n=me();Be("src",n.item.imageURL,an)("alt",n.item.name)}}function QU(e,t){if(e&1&&(Ne(0,"span",12),Sn(1,"cooeeCurrency"),Sn(2,"safeHtml")),e&2){let n=me();Be("innerHTML",Nn(2,3,Nn(1,1,(n.selectedVariant==null?null:n.selectedVariant.price)/100)),Fr)}}function eH(e,t){if(e&1&&(Ne(0,"span",12),Sn(1,"cooeeCurrency"),Sn(2,"safeHtml")),e&2){let n=me();Be("innerHTML",Nn(2,3,Nn(1,1,n.item.price)),Fr)}}function tH(e,t){if(e&1){let n=nr();re(0,"div",18),Rt("click",function(){let r=Xt(n).$implicit,i=me(2);return Jt(i.selectedVariant=r)})("keydown",function(){let r=Xt(n).$implicit,i=me(2);return Jt(i.selectedVariant=r)}),re(1,"span",19),tn(2),ie()()}if(e&2){let n=t.$implicit,r=me(2);go("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),X(2),Ca(n.title)}}function nH(e,t){if(e&1&&(re(0,"div",13),Qt(1,tH,3,3,"div",17,KU),ie()),e&2){let n=me();X(),en(n.availableVariants)}}function rH(e,t){if(e&1&&(re(0,"div",20),tn(1,"Description"),ie(),Ne(2,"div",21),Sn(3,"safeHtml")),e&2){let n=me();X(2),Be("innerHTML",Nn(3,1,n.ajaxItem==null?null:n.ajaxItem.description),Fr)}}function iH(e,t){e&1&&tn(0," Open Cart ")}function oH(e,t){e&1&&tn(0," Add To Cart ")}var Mh=class I_{constructor(t){this.cd=t}item;closeModel=new Je;performCTA=new Je;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=Oh.ClickActionType;async ngOnInit(){this.ajaxItem=await Ah.getAjaxItem(this.item),this.processVariants(),this.cd.markForCheck()}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?Oh.ClickActionType.OPEN_CART:Oh.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||I_)(Mt(rr))};static \u0275cmp=yt({type:I_,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:25,vars:6,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","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-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-variant-list"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],["tabindex","{0}",1,"lc-variant",3,"lc-selected-variant"],["tabindex","{0}",1,"lc-variant",3,"click","keydown"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2),tn(3,"Shop Now"),ie(),re(4,"button",3),Rt("click",function(){return n.closeDialog()}),vr(),re(5,"svg",4),Ne(6,"path",5)(7,"path",6),ie()()(),rs(),re(8,"div",7)(9,"div",8),xt(10,XU,2,0)(11,JU,1,2,"img",9),ie(),re(12,"div",10)(13,"div",11),tn(14),ie(),xt(15,QU,3,5,"span",12)(16,eH,3,5,"span",12)(17,nH,3,0,"div",13)(18,rH,4,3),ie()(),re(19,"div",14)(20,"button",15),Rt("click",function(){return n.clickAddToCart(n.item)}),xt(21,iH,1,0)(22,oH,1,0),ie(),re(23,"button",16),Rt("click",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})}),tn(24," More Info "),ie()()()),t&2&&(X(10),$t(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?10:11),X(4),Ca(n.item.name),X(),$t(n.selectedVariant!=null&&n.selectedVariant.price?15:16),X(2),$t(n.availableVariants[0]!=null&&n.availableVariants[0].title!=="Default Title"?17:-1),X(),$t(n.ajaxItem!=null&&n.ajaxItem.description?18:-1),X(3),$t(n.atcClicked?21:22))},dependencies:[ui,li],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.lc-card-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500}.lc-variant-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;width:100%}.lc-variant[_ngcontent-%COMP%]{padding:4px 8px;border-radius:4px;background-color:#f3f4f6;color:#1f2937;font-size:12px;cursor:pointer;border:1px solid #e5e7eb;display:flex;align-items:center;gap:4px}.lc-selected-variant[_ngcontent-%COMP%]{background-color:#fce8f3;border:1px solid #F8B4D9;color:#db2777}.lc-description-title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin-top:8px;line-height:normal}.lc-description[_ngcontent-%COMP%]{line-height:normal}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#ffe4e6;color:#db2777}"]})};function sH(e,t){e&1&&(vr(),re(0,"svg",1),Ne(1,"path",2)(2,"path",3),ie())}function aH(e,t){e&1&&(vr(),re(0,"svg",1),Ne(1,"path",2)(2,"path",4),ie())}var Ph=class e0{muted;buttonClicked=new Je;static \u0275fac=function(t){return new(t||e0)};static \u0275cmp=yt({type:e0,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted"},outputs:{buttonClicked:"buttonClicked"},decls:3,vars:1,consts:[[1,"lc-mute-button","lc:bg-black/50",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&&(re(0,"button",0),Rt("click",function(){return n.buttonClicked.emit()}),xt(1,sH,3,0,":svg:svg",1)(2,aH,3,0,":svg:svg",1),ie()),t&2&&(X(),$t(n.muted?1:2))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})},kh=class t0{width;static \u0275fac=function(t){return new(t||t0)};static \u0275cmp=yt({type:t0,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&&(re(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Ne(4,"div"),ie()()()()),t&2&&(X(3),mo("width",n.width,"%"))},encapsulation:2})},cH=["swiperContainer"],lH=["videoPlayers"],_R=(e,t)=>t.url,uH=(e,t)=>t.mID;function dH(e,t){if(e&1&&Ne(0,"source",12),e&2){let n=t.$implicit;zn("type",n.mimeType),ji("media","(max-width: ",n.width,"px)"),Be("src",n.url,an)}}function fH(e,t){if(e&1&&Ne(0,"source",13),e&2){let n=t.$implicit;zn("type",n.mimeType),Be("src",n.url,an)}}function pH(e,t){e&1&&Bd(0)}function hH(e,t){if(e&1){let n=nr();re(0,"cooee-product-modal",21),Rt("performCTA",function(r){Xt(n);let i=me(3);return Jt(i.performClickToAction(r,i.selectedVideo))})("closeModel",function(){Xt(n);let r=me(3);return Jt(r.productModalClosed())}),ie()}if(e&2){let n=me(3);Be("item",n.selectedItem)}}function mH(e,t){if(e&1){let n=nr();re(0,"cooee-product-card",22),Rt("performCTA",function(r){Xt(n);let i=me(2).$implicit,s=me();return Jt(s.performClickToAction(r,i))})("click",function(){let r=Xt(n).$implicit,i=me(2).$implicit,s=me();return Jt(s.productCardClicked(r,i))}),ie()}if(e&2){let n=t.$implicit;Be("item",n)}}function gH(e,t){if(e&1){let n=nr();Ne(0,"cooee-video-progress-bar",14),re(1,"div",15)(2,"cooee-mute-toggle",16),Rt("buttonClicked",function(){Xt(n);let r=me(2);return Jt(r.toggleMute())}),ie(),xt(3,pH,1,0,"ng-container",10),ie(),xt(4,hH,1,1,"cooee-product-modal",17),re(5,"div",18)(6,"div",19),Qt(7,mH,1,1,"cooee-product-card",20,uH),ie()()}if(e&2){let n=me(),r=n.$implicit,i=n.$index,s=me(),o=by(11);Be("width",s.videoProgress[i]||0),X(2),Be("muted",s.muted),X(),Be("ngTemplateOutlet",o),X(),$t(s.selectedItem?4:-1),X(3),en(r.items)}}function yH(e,t){if(e&1){let n=nr();re(0,"div",6)(1,"video",11,2),Rt("timeupdate",function(r){let i=Xt(n).$index,s=me();return Jt(s.updateProgress(r,i))})("click",function(){let r=Xt(n).$index,i=me();return Jt(i.currentIndex===r&&i.toggleMute())})("ended",function(){Xt(n);let r=me();return Jt(r.onVideoEnded())}),Qt(3,dH,1,4,"source",12,_R),Qt(5,fH,1,2,"source",13,_R),ie(),xt(7,gH,9,4),ie()}if(e&2){let n=t.$implicit,r=t.$index,i=me();X(),Be("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,an),va("data-video-id",n.id),X(2),en(n.sources),X(2),en(i.VideoUtils.getBestSources(n.sources)),X(2),$t(i.currentIndex===r?7:-1)}}function vH(e,t){e&1&&Bd(0)}function _H(e,t){if(e&1){let n=nr();re(0,"button",23),Rt("click",function(){Xt(n);let r=me();return Jt(r.close())}),vr(),re(1,"svg",24),Ne(2,"path",25)(3,"path",26),ie()()}}var zr=class extends Rh{constructor(e,t,n,r){super(),this.cdr=e,this.elementRef=t,this.dialogRef=n,this.data=r,this.videos=r.videos,this.currentIndex=r.currentIndex,this.triggerContext=r.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoPlayers;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;VideoUtils=Po;onResize(){this.isMobile=new ER.default().getDevice().type==="mobile",this.swiperInstance?.destroy?.(),this.initSwiper()}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot,t=vt.get().website.commonCSS;Nt.injectRawCSS(t,e),Nt.injectStylesheet(mn.styleURL,e),Nt.injectSwiperCSS(e)}ngAfterViewInit(){Di(this.getCurrentVideoElement(),"loadeddata").pipe(gR(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(e=this.videos[this.currentIndex],t=this.currentIndex){let n=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:e,lastVideoIndex:t,lastVideoDuration:n?.currentTime})}performClickToAction(e,t){this.data.onCTAPerformed({cta:e.cta,item:e.item,video:t})}getCurrentVideoElement(){return this.videoPlayers.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoPlayers.forEach(e=>e.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(t=>t.nativeElement.muted=this.muted);let e=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e),await rt.set(ge.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let e=this.getCurrentVideoElement();e&&(e.currentTime=1,e.play().then(async()=>{this.muted=await rt.get(ge.MUTED,!1),e.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)if(this.selectedItem){let e=this.getCurrentVideoElement();e.currentTime=0,e.play()}else this.moveToNextVideo();else{let e=this.videoPlayers.last;if(e){let t=this.getPreviousVideoDataForEvent(),n=[k.EVENT_LAST_VIDEO_ENDED,{previous:t},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),e.nativeElement.currentTime=0,e.nativeElement.play()}}}updateProgress(e,t){let n=e.target;this.videoProgress[t]=n.currentTime/n.duration*100,this.cdr.detectChanges()}onSlideChange(e){let t=this.getPreviousVideoDataForEvent();this.currentIndex=e.realIndex,this.cdr.detectChanges(),this.playActiveVideo(),this.selectedItem=null,delete this.selectedVideo;let n=this.currentVideoProps(),r={previous:t,current:n},i=[k.EVENT_VIDEO_CHANGE,r,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i)}productCardClicked(e,t){let n={videoID:t.id,videoIndex:this.currentIndex},r=[k.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),this.selectedItem=e,this.selectedVideo=t,this.swiperInstance.disable()}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:1,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!0},breakpoints:{1280:{slidesPerView:3}},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",e=>{this.onSlideChange(e)}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let e=this.currentVideoProps(),t=this.videoPlayers.find(r=>r.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;e.playedTillMS=Math.ceil(t?.currentTime*1e3);let n=t?.duration*1e3;return e.playedTillPercent=+(e.playedTillMS/n).toFixed(4),e}};Gh(zr,"\u0275fac",function(e){return new(e||zr)(Mt(rr),Mt(Ct),Mt(js),Mt(UE))}),Gh(zr,"\u0275cmp",yt({type:zr,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(e,t){if(e&1&&(Ea(cH,5),Ea(lH,5)),e&2){let n;wa(n=ba())&&(t.swiperContainerRef=n.first),wa(n=ba())&&(t.videoPlayers=n)}},hostBindings:function(e,t){e&1&&Rt("resize",function(){return t.onResize()},!1,aS)},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[ho],decls:12,vars:1,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoPlayers",""],[1,"lc-shadow-inner"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],["playsinline","","preload","metadata",3,"timeupdate","click","ended","autoplay","muted","poster"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc-video-controls"],[3,"buttonClicked","muted"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"item"],[1,"lc-card-container"],[1,"lc-card-scroll"],[3,"item"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"performCTA","closeModel","item"],[3,"performCTA","click","item"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","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"]],template:function(e,t){if(e&1&&(re(0,"div",3)(1,"div",4,0)(3,"div",5),Qt(4,yH,8,5,"div",6,ss),ie(),Ne(6,"div",7)(7,"div",8),ie(),re(8,"div",9),xt(9,vH,1,0,"ng-container",10),ie()(),xt(10,_H,4,0,"ng-template",null,1,nD)),e&2){let n=by(11);X(4),en(t.videos),X(5),Be("ngTemplateOutlet",n)}},dependencies:[Nh,Mh,Ph,kh,gD],styles:[`.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}
|
|
117
|
-
`],encapsulation:3})),
|
|
84
|
+
`}var Xc=!1;function $A(e,t,n){let r=e[t];if(Xc&&typeof r!="function")throw new Error(`${e.constructor.name} is using untilDestroyed but doesn't implement ${t}`);D_(e,n),e[t]=function(){r.apply(this,arguments),N_(this,n),e[t]=r}}function zA(e,t){return n=>{let r=R_(t);typeof t=="string"?$A(e,t,r):(Xc&&qA(e),D_(e,r));let i=e[r];return Xc&&FA(e,i),n.pipe(ai(i))}}function qA(e){let t=Object.getPrototypeOf(e);if(!(O_ in t))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var WA=an(Mp()),GA=an(Mp()),ZA=class eu{engagementTrigger;isMobile;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData,this.isMobile=new GA.default().getDevice().type==="mobile"}static \u0275fac=function(t){return new(t||eu)};static \u0275cmp=Vt({type:eu,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(t,n){},encapsulation:2})},Np=an(ho());function YA(e,t){e&1&&ht(0," Open Cart ")}function KA(e,t){e&1&&ht(0," Add To Cart ")}var JA=class tu{item;performCTA=new tt;atcClicked=!1;clickAddToCart(t){t.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?Np.ClickActionType.OPEN_CART:Np.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||tu)};static \u0275cmp=Vt({type:tu,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:12,vars:11,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(t,n){t&1&&(Y(0,"div",0)(1,"div",1),je(2,"img",2),Y(3,"div",3)(4,"div",4),ht(5),K(),je(6,"div",5),Gt(7,"cooeeCurrency"),Gt(8,"safeHtml"),K()(),Y(9,"button",6),ut("click",function(r){return n.clickAddToCart(r)}),pt(10,YA,1,0)(11,KA,1,0),K()()),t&2&&(z(2),Nn("alt",n.item.name),Me("src",n.item.imageURL,Yt),z(3),On(" ",n.item.name," "),z(),Me("innerHTML",on(8,9,on(7,7,n.item.price)),Hr),z(3),_a("atc-clicked",n.atcClicked),z(),yt(n.atcClicked?10:11))},dependencies:[Oa,Ra],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#f6339a;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})},Dl=an(ho()),QA=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}},XA=an(A0()),eP=(0,XA.default)(fetch),tP=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let n,r=QA.getRootPrefix()+`products/${t}.js`;try{n=await(await eP(r)).json()}catch(i){Ct.error(`Failed to fetch ${r}`,i);let o=Bv.getInstance();i instanceof Response?o.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:e.mID,path:r}):o.captureException(i,{mID:e.mID,path:r});return}if(!n){Ct.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}}},nP=(e,t)=>t.id;function rP(e,t){if(e&1&&je(0,"img",9),e&2){let n=t.$implicit,r=ae(2);Me("src",n,Yt)("alt",r.item.name)}}function iP(e,t){if(e&1&&Mt(0,rP,1,2,"img",9,ba),e&2){let n=ae();jt(n.ajaxItem.images)}}function oP(e,t){if(e&1&&je(0,"img",9),e&2){let n=ae();Me("src",n.item.imageURL,Yt)("alt",n.item.name)}}function sP(e,t){if(e&1&&(je(0,"span",12),Gt(1,"cooeeCurrency"),Gt(2,"safeHtml")),e&2){let n=ae();Me("innerHTML",on(2,3,on(1,1,(n.selectedVariant==null?null:n.selectedVariant.price)/100)),Hr)}}function aP(e,t){if(e&1&&(je(0,"span",12),Gt(1,"cooeeCurrency"),Gt(2,"safeHtml")),e&2){let n=ae();Me("innerHTML",on(2,3,on(1,1,n.item.price)),Hr)}}function lP(e,t){if(e&1){let n=Dn();Y(0,"div",18),ut("click",function(){let r=Et(n).$implicit,i=ae(2);return xt(i.selectedVariant=r)})("keydown",function(){let r=Et(n).$implicit,i=ae(2);return xt(i.selectedVariant=r)}),Y(1,"span",19),ht(2),K()()}if(e&2){let n=t.$implicit,r=ae(2);_a("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),z(2),wa(n.title)}}function cP(e,t){if(e&1&&(Y(0,"div",13),Mt(1,lP,3,3,"div",17,nP),K()),e&2){let n=ae();z(),jt(n.availableVariants)}}function uP(e,t){if(e&1&&(Y(0,"div",20),ht(1,"Description"),K(),je(2,"div",21),Gt(3,"safeHtml")),e&2){let n=ae();z(2),Me("innerHTML",on(3,1,n.ajaxItem==null?null:n.ajaxItem.description),Hr)}}function hP(e,t){e&1&&ht(0," Open Cart ")}function dP(e,t){e&1&&ht(0," Add To Cart ")}var fP=class nu{constructor(t){this.cd=t}item;closeModel=new tt;performCTA=new tt;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=Dl.ClickActionType;async ngOnInit(){this.ajaxItem=await tP.getAjaxItem(this.item),this.processVariants(),this.cd.markForCheck()}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?Dl.ClickActionType.OPEN_CART:Dl.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||nu)(Tt(Co))};static \u0275cmp=Vt({type:nu,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:25,vars:6,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","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-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-variant-list"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],["tabindex","{0}",1,"lc-variant",3,"lc-selected-variant"],["tabindex","{0}",1,"lc-variant",3,"click","keydown"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(t,n){t&1&&(Y(0,"div",0)(1,"div",1)(2,"div",2),ht(3,"Shop Now"),K(),Y(4,"button",3),ut("click",function(){return n.closeDialog()}),ar(),Y(5,"svg",4),je(6,"path",5)(7,"path",6),K()()(),ws(),Y(8,"div",7)(9,"div",8),pt(10,iP,2,0)(11,oP,1,2,"img",9),K(),Y(12,"div",10)(13,"div",11),ht(14),K(),pt(15,sP,3,5,"span",12)(16,aP,3,5,"span",12)(17,cP,3,0,"div",13)(18,uP,4,3),K()(),Y(19,"div",14)(20,"button",15),ut("click",function(){return n.clickAddToCart(n.item)}),pt(21,hP,1,0)(22,dP,1,0),K(),Y(23,"button",16),ut("click",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})}),ht(24," More Info "),K()()()),t&2&&(z(10),yt(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?10:11),z(4),wa(n.item.name),z(),yt(n.selectedVariant!=null&&n.selectedVariant.price?15:16),z(2),yt(n.availableVariants[0]!=null&&n.availableVariants[0].title!=="Default Title"?17:-1),z(),yt(n.ajaxItem!=null&&n.ajaxItem.description?18:-1),z(3),yt(n.atcClicked?21:22))},dependencies:[Ra,Oa],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.lc-card-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500}.lc-variant-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;width:100%}.lc-variant[_ngcontent-%COMP%]{padding:4px 8px;border-radius:4px;background-color:#f3f4f6;color:#1f2937;font-size:12px;cursor:pointer;border:1px solid #e5e7eb;display:flex;align-items:center;gap:4px}.lc-selected-variant[_ngcontent-%COMP%]{background-color:#fce8f3;border:1px solid #F8B4D9;color:#db2777}.lc-description-title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin-top:8px;line-height:normal}.lc-description[_ngcontent-%COMP%]{line-height:normal}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#ffe4e6;color:#db2777}"]})},pP=class ru{width;static \u0275fac=function(t){return new(t||ru)};static \u0275cmp=Vt({type:ru,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),je(4,"div"),K()()()()),t&2&&(z(3),va("width",n.width,"%"))},encapsulation:2})},gP=["swiperContainer"],mP=["videoEl"],kp=(e,t)=>t.url,yP=(e,t)=>t.mID;function vP(e,t){if(e&1&&je(0,"source",12),e&2){let n=t.$implicit;Nn("type",n.mimeType),xi("media","(max-width: ",n.width,"px)"),Me("src",n.url,Yt)}}function _P(e,t){if(e&1&&je(0,"source",13),e&2){let n=t.$implicit;Nn("type",n.mimeType),Me("src",n.url,Yt)}}function bP(e,t){e&1&&ch(0)}function wP(e,t){if(e&1){let n=Dn();Y(0,"cooee-product-modal",21),ut("performCTA",function(r){Et(n);let i=ae(3);return xt(i.performClickToAction(r,i.selectedVideo))})("closeModel",function(){Et(n);let r=ae(3);return xt(r.productModalClosed())}),K()}if(e&2){let n=ae(3);Me("item",n.selectedItem)}}function EP(e,t){if(e&1){let n=Dn();Y(0,"cooee-product-card",22),ut("performCTA",function(r){Et(n);let i=ae(2).$implicit,o=ae();return xt(o.performClickToAction(r,i))})("click",function(){let r=Et(n).$implicit,i=ae(2).$implicit,o=ae();return xt(o.productCardClicked(r,i))}),K()}if(e&2){let n=t.$implicit;Me("item",n)}}function xP(e,t){if(e&1){let n=Dn();je(0,"cooee-video-progress-bar",14),Y(1,"div",15)(2,"cooee-mute-toggle",16),ut("toggled",function(){Et(n);let r=ae(2);return xt(r.toggleMute())}),K(),pt(3,bP,1,0,"ng-container",10),K(),pt(4,wP,1,1,"cooee-product-modal",17),Y(5,"div",18)(6,"div",19),Mt(7,EP,1,1,"cooee-product-card",20,yP),K()()}if(e&2){let n=ae(),r=n.$implicit,i=n.$index,o=wr(2),s=ae(),a=wr(11);Me("width",s.videoProgress[i]||0),z(2),Me("muted",s.muted)("videoEl",o),z(),Me("ngTemplateOutlet",a),z(),yt(s.selectedItem?4:-1),z(3),jt(r.items)}}function SP(e,t){if(e&1){let n=Dn();Y(0,"div",6)(1,"video",11,2),ut("timeupdate",function(r){let i=Et(n).$index,o=ae();return xt(o.updateProgress(r,i))})("click",function(){let r=Et(n).$index,i=ae();return xt(i.currentIndex===r&&i.toggleMute())})("ended",function(){Et(n);let r=ae();return xt(r.onVideoEnded())}),Mt(3,vP,1,4,"source",12,kp),Mt(5,_P,1,2,"source",13,kp),K(),pt(7,xP,9,5),K()}if(e&2){let n=t.$implicit,r=t.$index,i=ae();z(),Me("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,Yt),ya("data-video-id",n.id),z(2),jt(n.sources),z(2),jt(i.VideoUtils.getBestSources(n.sources)),z(2),yt(i.currentIndex===r?7:-1)}}function IP(e,t){e&1&&ch(0)}function CP(e,t){if(e&1){let n=Dn();Y(0,"button",23),ut("click",function(){Et(n);let r=ae();return xt(r.close())}),ar(),Y(1,"svg",24),je(2,"path",25)(3,"path",26),K()()}}var yr=class extends ZA{constructor(e,t,n,r){super(),this.cdr=e,this.elementRef=t,this.dialogRef=n,this.data=r,this.videos=r.videos,this.currentIndex=r.currentIndex,this.triggerContext=r.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoElements;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;VideoUtils=Ph;onResize(){this.isMobile=new WA.default().getDevice().type==="mobile",this.swiperInstance?.destroy?.(),this.initSwiper()}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot,t=dv.get().website.commonCSS;$i.injectRawCSS(t,e),$i.injectStylesheet(so.styleURL,e),$i.injectSwiperCSS(e)}ngAfterViewInit(){Ml(this.getCurrentVideoElement(),"loadeddata").pipe(zA(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(e=this.videos[this.currentIndex],t=this.currentIndex){let n=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:e,lastVideoIndex:t,lastVideoDuration:n?.currentTime})}performClickToAction(e,t){this.data.onCTAPerformed({cta:e.cta,item:e.item,video:t})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(e=>e.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(t=>t.nativeElement.muted=this.muted);let e=[this.muted?wt.EVENT_VIDEO_MUTED:wt.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e),await bc.set(As.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let e=this.getCurrentVideoElement();e&&(e.currentTime=1,e.play().then(async()=>{this.muted=await bc.get(As.MUTED,!1),e.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)if(this.selectedItem){let e=this.getCurrentVideoElement();e.currentTime=0,e.play()}else this.moveToNextVideo();else{let e=this.videoElements.last;if(e){let t=this.getPreviousVideoDataForEvent(),n=[wt.EVENT_LAST_VIDEO_ENDED,{previous:t},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),e.nativeElement.currentTime=0,e.nativeElement.play()}}}updateProgress(e,t){let n=e.target;this.videoProgress[t]=n.currentTime/n.duration*100,this.cdr.detectChanges()}onSlideChange(e){let t=this.getPreviousVideoDataForEvent();this.currentIndex=e.realIndex,this.cdr.detectChanges(),this.playActiveVideo(),this.selectedItem=null,delete this.selectedVideo;let n=this.currentVideoProps(),r={previous:t,current:n},i=[wt.EVENT_VIDEO_CHANGE,r,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i)}productCardClicked(e,t){let n={videoID:t.id,videoIndex:this.currentIndex},r=[wt.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),this.selectedItem=e,this.selectedVideo=t,this.swiperInstance.disable()}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:1,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!0},breakpoints:{1280:{slidesPerView:3}},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",e=>{this.onSlideChange(e)}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let e=this.currentVideoProps(),t=this.videoElements.find(r=>r.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;e.playedTillMS=Math.ceil(t?.currentTime*1e3);let n=t?.duration*1e3;return e.playedTillPercent=+(e.playedTillMS/n).toFixed(4),e}};Yh(yr,"\u0275fac",function(e){return new(e||yr)(Tt(Co),Tt($t),Tt(cs),Tt(T_))}),Yh(yr,"\u0275cmp",Vt({type:yr,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(e,t){if(e&1&&(uc(gP,5),uc(mP,5)),e&2){let n;hc(n=dc())&&(t.swiperContainerRef=n.first),hc(n=dc())&&(t.videoElements=n)}},hostBindings:function(e,t){e&1&&ut("resize",function(){return t.onResize()},!1,GE)},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[Ei],decls:12,vars:1,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoEl",""],[1,"lc-shadow-inner"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],["playsinline","","preload","metadata",3,"timeupdate","click","ended","autoplay","muted","poster"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"item"],[1,"lc-card-container"],[1,"lc-card-scroll"],[3,"item"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"performCTA","closeModel","item"],[3,"performCTA","click","item"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","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"]],template:function(e,t){if(e&1&&(Y(0,"div",3)(1,"div",4,0)(3,"div",5),Mt(4,SP,8,5,"div",6,ba),K(),je(6,"div",7)(7,"div",8),K(),Y(8,"div",9),pt(9,IP,1,0,"ng-container",10),K()(),pt(10,CP,4,0,"ng-template",null,1,pC)),e&2){let n=wr(11);z(4),jt(t.videos),z(5),Me("ngTemplateOutlet",n)}},dependencies:[JA,fP,o_,pP,iT],styles:[`.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}
|
|
85
|
+
`],encapsulation:3})),yr=S0([BA()],yr);var $s=(e,t)=>t.url;function TP(e,t){if(e&1&&(Y(0,"div",1),ht(1),K()),e&2){let n=ae();z(),On(" ",n.videoConfig.heading," ")}}function OP(e,t){if(e&1&&je(0,"source",7),e&2){let n=t.$implicit;Nn("type",n.mimeType),xi("media","(max-width: ",n.width,"px)"),Me("src",n.url,Yt)}}function RP(e,t){if(e&1&&je(0,"source",8),e&2){let n=t.$implicit;Nn("type",n.mimeType),Me("src",n.url,Yt)}}function DP(e,t){if(e&1&&(Y(0,"div",11)(1,"span",13),ht(2),K(),je(3,"span",14),Gt(4,"cooeeCurrency"),Gt(5,"safeHtml"),K()),e&2){ae();let n=er(0);z(2),On(" ",n.name," "),z(),Me("innerHTML",on(5,4,on(4,2,n.price)),Hr)}}function NP(e,t){if(e&1){let n=Dn();Y(0,"button",15),ut("click",function(){Et(n);let r=ae().$implicit,i=er(0),o=ae(2);return xt(o.addToCartClicked(r,i))}),ht(1," Add to cart "),K()}}function kP(e,t){if(e&1){let n=Dn();Io(0)(1),Y(2,"div",4)(3,"a",5),ut("click",function(r){let i=Et(n),o=i.$implicit,s=i.$index,a=wr(5),l=ae(2);return xt(l.injectScriptAndOpenDialog(r,o,s,a))}),Y(4,"video",6,0),ut("mouseenter",function(){Et(n);let r=wr(5);ae(2);let i=er(3);return xt(i&&r.play())})("mouseleave",function(){Et(n);let r=wr(5);ae(2);let i=er(3);return xt(i&&r.pause())}),Mt(6,OP,1,4,"source",7,$s),Mt(8,RP,1,2,"source",8,$s),K(),Y(10,"div",9),je(11,"cooee-mute-toggle",10),K(),pt(12,DP,6,6,"div",11),K(),pt(13,NP,2,0,"button",12),K()}if(e&2){let n=t.$implicit,r=wr(5),i=ae(2),o=er(2),s=er(4),a=Ui(n.items==null?null:n.items[0])&&i.videoConfig.footerContent==i.VideoConfigFooterContent.FIRST_ITEM;z(4),Me("muted",!0),ya("autoplay",o||null),z(2),jt(n.sources),z(2),jt(i.VideoUtils.getBestSources(n.sources)),z(3),Me("muted",!0)("videoEl",r),z(),yt(s&&a?12:-1),z(),yt(s&&a?13:-1)}}function AP(e,t){if(e&1&&(Y(0,"div",2),Mt(1,kP,14,7,"div",4,ba),K()),e&2){let n=ae();z(),jt(n.videos)}}function PP(e,t){if(e&1&&je(0,"source",7),e&2){let n=t.$implicit;Nn("type",n.mimeType),xi("media","(max-width: ",n.width,"px)"),Me("src",n.url,Yt)}}function LP(e,t){if(e&1&&je(0,"source",8),e&2){let n=t.$implicit;Nn("type",n.mimeType),Me("src",n.url,Yt)}}function MP(e,t){if(e&1){let n=Dn();Y(0,"div",16),ar(),Y(1,"svg",17),je(2,"circle",18)(3,"circle",19),K(),ws(),Y(4,"div",20)(5,"video",21),ut("click",function(r){let i=Et(n),o=i.$implicit,s=i.$index,a=ae(2);return xt(a.injectScriptAndOpenDialog(r,o,s))}),Mt(6,PP,1,4,"source",7,$s),Mt(8,LP,1,2,"source",8,$s),K()()()}if(e&2){let n=t.$implicit,r=ae(2);z(5),Me("muted",!0),z(),jt(n.sources),z(2),jt(r.VideoUtils.getBestSources(n.sources))}}function jP(e,t){if(e&1&&(Y(0,"div",3),Mt(1,MP,10,1,"div",16,ba),K()),e&2){let n=ae();z(),jt(n.videos)}}function VP(e,t){if(e&1){let n=Dn();Y(0,"cooee-draggable-video-popup",23),ut("videoClicked",function(){Et(n),ae();let r=er(0),i=ae();return xt(i.onPopupVideoClicked(r,0))})("closeClicked",function(){Et(n);let r=ae(2);return xt(r.onPopupVideoClosed())}),K()}if(e&2){ae();let n=er(0);Me("video",n)}}function BP(e,t){if(e&1&&(Io(0),pt(1,VP,1,1,"cooee-draggable-video-popup",22)),e&2){let n=ae();Ui(n.videos[0]),z(),yt(n.hidePopupVideo?-1:1)}}var FP=class iu extends Hv{constructor(t,n){super(),this.dialog=t,this.cdr=n}videos;VideoUtils=Ph;VideoConfigSource=$v;VideoConfigTemplate=zv;VideoConfigFooterContent=Wv;VideoConfigAutoPlay=qv;hidePopupVideo;videoConfig;dialogRef=null;ngOnInit(){super.ngOnInit(),$i.loadSwiperScript()}engagementTriggerReceived(t){this.videos=t.content?.videoConfig?.videos,this.videoConfig=t.content?.videoConfig}sendTriggerClicked(t,n){let r=new El(wt.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);r.videos=[t.id],n&&(r.items=[n]),this.sendEventToRenderer(r)}injectScriptAndOpenDialog(t,n,r,i){if(t?.stopPropagation(),t?.preventDefault(),this.videoConfig.footerContent!=="FIRST_ITEM"){i?.play();return}let o=n.items?.[0];this.sendTriggerClicked(n,o),$i.loadSwiperScript().then(()=>this.openDialog(n,r))}async performCTA(t){let n,r=this.triggerContext;if(t.cta===Go.ClickActionType.ADD_TO_CART)n=wt.EVENT_ADD_TO_CART_CLICKED;else if(t.cta===Go.ClickActionType.GO_TO_PRODUCT)n=wt.EVENT_VIEW_ITEM_CLICKED;else if(t.cta===Go.ClickActionType.OPEN_CART)n=wt.EVENT_OPEN_CART_CLICKED,r.triggerData.redirectBehaviour=yN.RedirectBehaviour.CART_DRAWER;else{Ct.warn(`Unsupported CTA type: ${t.cta}`);return}let i={at:t.cta},o={videoID:t.video.id};this.sendEvent(n,{current:o},t.video,t.item),this.executeCTAViaRenderer({clickAction:i,embeddedItem:t.item})}addToCartClicked(t,n){this.performCTA({cta:Go.ClickActionType.ADD_TO_CART,item:n,video:t})}onPopupVideoClicked(t,n){this.hidePopupVideo=!0,this.injectScriptAndOpenDialog(null,t,n),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let t=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(wt.EVENT_TRIGGER_CLOSED,{duration:t})}update(){}sendEvent(t,n,r,i){let o=new El(t,n,this.engagementTrigger);r&&(o.videos=[r.id]),i&&(o.items=[i]),this.sendEventToRenderer(o)}openDialog(t,n){let r={videos:this.videos,currentIndex:n,triggerContext:this.triggerContext,onCTAPerformed:o=>this.performCTA(o)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(yr,{width:"100vw",height:"100vh",data:r});let i={videoID:t.id,videoIndex:n};this.sendEvent(wt.EVENT_VIDEO_DIALOG_OPENED,{current:i},t),this.dialogRef.closed.subscribe(o=>{if(!o)return;let s=o.lastVideoDuration*1e3,a={videoID:o.lastVideo.id,videoIndex:o.lastVideoIndex,playedTillMS:s,playedTillPercent:s/t.durationMS},l=new El(wt.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[o.lastVideo.id],this.sendEventToRenderer(l),this.dialogRef=null})}static \u0275fac=function(t){return new(t||iu)(Tt(NA),Tt(Co))};static \u0275cmp=Vt({type:iu,selectors:[["cooee-shoppable-videos"]],features:[Ei],decls:9,vars:5,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text","lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],[1,"lc-video-list","lc:flex","lc:overflow-auto","lc:m-3","lc:gap-10","lc:justify-center","lc:items-center"],[1,"lc-video-stories","lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-card","lc:flex","lc:flex-col","lc:gap-1"],["href","",1,"lc-video-wrapper","lc:rounded-lg",3,"click"],["width","100%","playsinline","","loop","",1,"sa","lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"mouseenter","mouseleave","muted"],[3,"src","type","media"],[3,"src","type"],[1,"lc-video-controls"],[3,"muted","videoEl"],["id","lc-single-product",1,"lc-single-product","lc:w-full","lc:flex","lc:flex-col","lc:gap-1","lc:text-sm","lc:mt-1","lc:mb-1"],["id","lc-cta-button","type","button",1,"lc-cta-button","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-4","lc:text-xl"],["id","lc-item-name",1,"lc-item-name","lc:font-semibold","lc:line-clamp-1","lc:text-xl"],["id","lc-item-price",1,"lc-item-price","lc:text-xl",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button","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-4","lc:text-xl",3,"click"],[1,"lc-video-story","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"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["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&&(Io(0)(1)(2)(3)(4),pt(5,TP,2,1,"div",1)(6,AP,3,0,"div",2)(7,jP,3,0,"div",3)(8,BP,2,2)),t&2){let r=n.videoConfig.source,i=n.videoConfig.template;z(2),Ui(!n.videoConfig.autoPlay||n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON),z(),Ui(n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON_HOVER),z(),Ui(r===n.VideoConfigSource.GALLERY),z(),yt(n.videoConfig.heading?5:-1),z(),yt(i===n.VideoConfigTemplate.SIMPLE||i===n.VideoConfigTemplate.SWIPER?6:i===n.VideoConfigTemplate.STORY?7:i===n.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[Oa,zk,Ra,o_],styles:["[_nghost-%COMP%]{display:block}.lc-video-wrapper[_ngcontent-%COMP%]{position:relative}.lc-video-card[_ngcontent-%COMP%]{min-width:200px;max-width:300px}.lc-video-card[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{scale:1.1}.lc-video-controls[_ngcontent-%COMP%]{position:absolute;bottom:8px;z-index:10;right:8px;display:none;gap:8px}"]})};Ct.configure("CooeeWidgetSDK");(async()=>{let e=await IT(PT),t=(n,r)=>{let i=GC(n,{injector:e.injector});customElements.define(r,i)};t(mN,"cooee-sticky-atc"),t(hN,"cooee-progressbar"),t(FP,"cooee-shoppable-videos")})();})();
|