1import{a as po,c as Sl,d as Xe,e as yt,f as wl,i as xl,j as Rl,l as mo,m as Cl}from"/build/_shared/chunk-RYVZ6E5I.js";import{a as ho,c as bl}from"/build/_shared/chunk-2KNE7ZNJ.js";import{a as yl}from"/build/_shared/chunk-PHB6ZJYR.js";import{a as vl}from"/build/_shared/chunk-DZGDZ3GC.js";import{a as At}from"/build/_shared/chunk-2VHJHPYT.js";import{a as zn}from"/build/_shared/chunk-YNIM7QIU.js";import{a as Wn}from"/build/_shared/chunk-RZLDKGLN.js";import{a as Zt}from"/build/_shared/chunk-POUH3CHJ.js";import{a as Ht,b as uo,c as fo}from"/build/_shared/chunk-4IHN3LFR.js";import{a as Bn}from"/build/_shared/chunk-DEVQKMWM.js";import{c as gl}from"/build/_shared/chunk-SF7SKMF7.js";import{c as pl}from"/build/_shared/chunk-L4FEFM7G.js";import{a as ml}from"/build/_shared/chunk-5OBEDPFR.js";import{a as Un}from"/build/_shared/chunk-H6S7FWVP.js";import{b as ce,d as gt}from"/build/_shared/chunk-T36URGAI.js";var Nl=ce((go,yo)=>{(function(r,e){typeof go=="object"&&typeof yo<"u"?yo.exports=e():typeof define=="function"&&define.amd?define(e):(r=r||self).algoliasearch=e()})(go,function(){"use strict";function r(f,d,p){return d in f?Object.defineProperty(f,d,{value:p,enumerable:!0,configurable:!0,writable:!0}):f[d]=p,f}function e(f,d){var p=Object.keys(f);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(f);d&&(y=y.filter(function(w){return Object.getOwnPropertyDescriptor(f,w).enumerable})),p.push.apply(p,y)}return p}function t(f){for(var d=1;d<arguments.length;d++){var p=arguments[d]!=null?arguments[d]:{};d%2?e(Object(p),!0).forEach(function(y){r(f,y,p[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(p)):e(Object(p)).forEach(function(y){Object.defineProperty(f,y,Object.getOwnPropertyDescriptor(p,y))})}return f}function n(f,d){if(f==null)return{};var p,y,w=function(P,R){if(P==null)return{};var T,D,_={},B=Object.keys(P);for(D=0;D<B.length;D++)T=B[D],R.indexOf(T)>=0||(_[T]=P[T]);return _}(f,d);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(f);for(y=0;y<C.length;y++)p=C[y],d.indexOf(p)>=0||Object.prototype.propertyIsEnumerable.call(f,p)&&(w[p]=f[p])}return w}function i(f,d){return function(p){if(Array.isArray(p))return p}(f)||function(p,y){if(Symbol.iterator in Object(p)||Object.prototype.toString.call(p)==="[object Arguments]"){var w=[],C=!0,P=!1,R=void 0;try{for(var T,D=p[Symbol.iterator]();!(C=(T=D.next()).done)&&(w.push(T.value),!y||w.length!==y);C=!0);}catch(_){P=!0,R=_}finally{try{C||D.return==null||D.return()}finally{if(P)throw R}}return w}}(f,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(f){return function(d){if(Array.isArray(d)){for(var p=0,y=new Array(d.length);p<d.length;p++)y[p]=d[p];return y}}(f)||function(d){if(Symbol.iterator in Object(d)||Object.prototype.toString.call(d)==="[object Arguments]")return Array.from(d)}(f)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(f){var d,p="algoliasearch-client-js-".concat(f.key),y=function(){return d===void 0&&(d=f.localStorage||window.localStorage),d},w=function(){return JSON.parse(y().getItem(p)||"{}")},C=function(R){y().setItem(p,JSON.stringify(R))},P=function(){var R=f.timeToLive?1e3*f.timeToLive:null,T=w(),D=Object.fromEntries(Object.entries(T).filter(function(B){return i(B,2)[1].timestamp!==void 0}));if(C(D),R){var _=Object.fromEntries(Object.entries(D).filter(function(B){var U=i(B,2)[1],K=new Date().getTime();return!(U.timestamp+R<K)}));C(_)}};return{get:function(R,T){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){P();var _=JSON.stringify(R);return w()[_]}).then(function(_){return Promise.all([_?_.value:T(),_!==void 0])}).then(function(_){var B=i(_,2),U=B[0],K=B[1];return Promise.all([U,K||D.miss(U)])}).then(function(_){return i(_,1)[0]})},set:function(R,T){return Promise.resolve().then(function(){var D=w();return D[JSON.stringify(R)]={timestamp:new Date().getTime(),value:T},y().setItem(p,JSON.stringify(D)),T})},delete:function(R){return Promise.resolve().then(function(){var T=w();delete T[JSON.stringify(R)],y().setItem(p,JSON.stringify(T))})},clear:function(){return Promise.resolve().then(function(){y().removeItem(p)})}}}function c(f){var d=s(f.caches),p=d.shift();return p===void 0?{get:function(y,w){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},P=w();return P.then(function(R){return Promise.all([R,C.miss(R)])}).then(function(R){return i(R,1)[0]})},set:function(y,w){return Promise.resolve(w)},delete:function(y){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(y,w){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return p.get(y,w,C).catch(function(){return c({caches:d}).get(y,w,C)})},set:function(y,w){return p.set(y,w).catch(function(){return c({caches:d}).set(y,w)})},delete:function(y){return p.delete(y).catch(function(){return c({caches:d}).delete(y)})}
1,clear:function(){return p.clear().catch(function(){return c({caches:d}).clear()})}}}function a(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},d={};return{get:function(p,y){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},C=JSON.stringify(p);if(C in d)return Promise.resolve(f.serializable?JSON.parse(d[C]):d[C]);var P=y(),R=w&&w.miss||function(){return Promise.resolve()};return P.then(function(T){return R(T)}).then(function(){return P})},set:function(p,y){return d[JSON.stringify(p)]=f.serializable?JSON.stringify(y):y,Promise.resolve(y)},delete:function(p){return delete d[JSON.stringify(p)],Promise.resolve()},clear:function(){return d={},Promise.resolve()}}}function l(f,d,p){var y={"x-algolia-api-key":p,"x-algolia-application-id":d};return{headers:function(){return f===S.WithinHeaders?y:{}},queryParameters:function(){return f===S.WithinQueryParameters?y:{}}}}function u(f){var d=0;return f(function p(){return d++,new Promise(function(y){setTimeout(function(){y(f(p))},Math.min(100*d,1e3))})})}function h(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(p,y){return Promise.resolve()};return Object.assign(f,{wait:function(p){return h(f.then(function(y){return Promise.all([d(y,p),y])}).then(function(y){return y[1]}))}})}function m(f){for(var d=f.length-1;d>0;d--){var p=Math.floor(Math.random()*(d+1)),y=f[d];f[d]=f[p],f[p]=y}return f}function b(f,d){return d&&Object.keys(d).forEach(function(p){f[p]=d[p](f)}),f}function g(f){for(var d=arguments.length,p=new Array(d>1?d-1:0),y=1;y<d;y++)p[y-1]=arguments[y];var w=0;return f.replace(/%s/g,function(){return encodeURIComponent(p[w++])})}var S={WithinQueryParameters:0,WithinHeaders:1};function v(f,d){var p=f||{},y=p.data||{};return Object.keys(p).forEach(function(w){["timeout","headers","queryParameters","data","cacheable"].indexOf(w)===-1&&(y[w]=p[w])}),{data:Object.entries(y).length>0?y:void 0,timeout:p.timeout||d,headers:p.headers||{},queryParameters:p.queryParameters||{},cacheable:p.cacheable}}var I={Read:1,Write:2,Any:3},A=1,x=2,F=3;function M(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A;return t(t({},f),{},{status:d,lastUpdate:Date.now()})}function N(f){return typeof f=="string"?{protocol:"https",url:f,accept:I.Any}:{protocol:f.protocol||"https",url:f.url,accept:f.accept||I.Any}}var G="DELETE",$="GET",L="POST",Q="PUT";function re(f,d){return Promise.all(d.map(function(p){return f.get(p,function(){return Promise.resolve(M(p))})})).then(function(p){var y=p.filter(function(P){return function(R){return R.status===A||Date.now()-R.lastUpdate>12e4}(P)}),w=p.filter(function(P){return function(R){return R.status===F&&Date.now()-R.lastUpdate<=12e4}(P)}),C=[].concat(s(y),s(w));return{getTimeout:function(P,R){return(w.length===0&&P===0?1:w.length+3+P)*R},statelessHosts:C.length>0?C.map(function(P){return N(P)}):d}})}function ue(f,d,p,y){var w=[],C=function(U,K){if(!(U.method===$||U.data===void 0&&K.data===void 0)){var z=Array.isArray(U.data)?U.data:t(t({},U.data),K.data);return JSON.stringify(z)}}(p,y),P=function(U,K){var z=t(t({},U.headers),K.headers),ae={};return Object.keys(z).forEach(function(me){var Le=z[me];ae[me.toLowerCase()]=Le}),ae}(f,y),R=p.method,T=p.method!==$?{}:t(t({},p.data),y.data),D=t(t(t({"x-algolia-agent":f.userAgent.value},f.queryParameters),T),y.queryParameters),_=0,B=function U(K,z){var ae=K.pop();if(ae===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact [email protected].",transporterStackTrace:Z(w)};var me={data:C,headers:P,method:R,url:ct(ae,p.path,D),connectTimeout:z(_,f.timeouts.connect),responseTimeout:z(_,y.timeout)},Le=function($e){var Ae={request:me,response:$e,host:ae,triesLeft:K.length};return w.push(Ae),Ae},kr={onSuccess:function($e){return function(Ae){try{return JSON.parse(Ae.content)}catch(jt){throw function(It,Jt){return{name:"DeserializationError",message:It,response:Jt}}(jt.message,Ae)}}($e)},onRetry:function($e){var Ae=Le($e);
1return $e.isTimedOut&&_++,Promise.all([f.logger.info("Retryable failure",oe(Ae)),f.hostsCache.set(ae,M(ae,$e.isTimedOut?F:x))]).then(function(){return U(K,z)})},onFail:function($e){throw Le($e),function(Ae,jt){var It=Ae.content,Jt=Ae.status,Nr=It;try{Nr=JSON.parse(It).message}catch{}return function(Hn,lo,Cg){return{name:"ApiError",message:Hn,status:lo,transporterStackTrace:Cg}}(Nr,Jt,jt)}($e,Z(w))}};return f.requester.send(me).then(function($e){return function(Ae,jt){return function(It){var Jt=It.status;return It.isTimedOut||function(Nr){var Hn=Nr.isTimedOut,lo=Nr.status;return!Hn&&~~lo==0}(It)||~~(Jt/100)!=2&&~~(Jt/100)!=4}(Ae)?jt.onRetry(Ae):~~(Ae.status/100)==2?jt.onSuccess(Ae):jt.onFail(Ae)}($e,kr)})};return re(f.hostsCache,d).then(function(U){return B(s(U.statelessHosts).reverse(),U.getTimeout)})}function j(f){var d=f.hostsCache,p=f.logger,y=f.requester,w=f.requestsCache,C=f.responsesCache,P=f.timeouts,R=f.userAgent,T=f.hosts,D=f.queryParameters,_={hostsCache:d,logger:p,requester:y,requestsCache:w,responsesCache:C,timeouts:P,userAgent:R,headers:f.headers,queryParameters:D,hosts:T.map(function(B){return N(B)}),read:function(B,U){var K=v(U,_.timeouts.read),z=function(){return ue(_,_.hosts.filter(function(me){return(me.accept&I.Read)!=0}),B,K)};if((K.cacheable!==void 0?K.cacheable:B.cacheable)!==!0)return z();var ae={request:B,mappedRequestOptions:K,transporter:{queryParameters:_.queryParameters,headers:_.headers}};return _.responsesCache.get(ae,function(){return _.requestsCache.get(ae,function(){return _.requestsCache.set(ae,z()).then(function(me){return Promise.all([_.requestsCache.delete(ae),me])},function(me){return Promise.all([_.requestsCache.delete(ae),Promise.reject(me)])}).then(function(me){var Le=i(me,2);return Le[0],Le[1]})})},{miss:function(me){return _.responsesCache.set(ae,me)}})},write:function(B,U){return ue(_,_.hosts.filter(function(K){return(K.accept&I.Write)!=0}),B,v(U,_.timeouts.write))}};return _}function Qe(f){var d={value:"Algolia for JavaScript (".concat(f,")"),add:function(p){var y="; ".concat(p.segment).concat(p.version!==void 0?" (".concat(p.version,")"):"");return d.value.indexOf(y)===-1&&(d.value="".concat(d.value).concat(y)),d}};return d}function ct(f,d,p){var y=se(p),w="".concat(f.protocol,"://").concat(f.url,"/").concat(d.charAt(0)==="/"?d.substr(1):d);return y.length&&(w+="?".concat(y)),w}function se(f){return Object.keys(f).map(function(d){return g("%s=%s",d,(p=f[d],Object.prototype.toString.call(p)==="[object Object]"||Object.prototype.toString.call(p)==="[object Array]"?JSON.stringify(f[d]):f[d]));var p}).join("&")}function Z(f){return f.map(function(d){return oe(d)})}function oe(f){var d=f.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return t(t({},f),{},{request:t(t({},f.request),{},{headers:t(t({},f.request.headers),d)})})}var Ie=function(f){return function(d,p){return f.transporter.write({method:L,path:"2/abtests",data:d},p)}},Ke=function(f){return function(d,p){return f.transporter.write({method:G,path:g("2/abtests/%s",d)},p)}},De=function(f){return function(d,p){return f.transporter.read({method:$,path:g("2/abtests/%s",d)},p)}},Et=function(f){return function(d){return f.transporter.read({method:$,path:"2/abtests"},d)}},ze=function(f){return function(d,p){return f.transporter.write({method:L,path:g("2/abtests/%s/stop",d)},p)}},lt=function(f){return function(d){return f.transporter.read({method:$,path:"1/strategies/personalization"},d)}},ut=function(f){return function(d,p){return f.transporter.write({method:L,path:"1/strategies/personalization",data:d},p)}};function _e(f){return function d(p){return f.request(p).then(function(y){if(f.batch!==void 0&&f.batch(y.hits),!f.shouldStop(y))return y.cursor?d({cursor:y.cursor}):d({page:(p.page||0)+1})})}({})}var Me=function(f){return function(d,p){var y=p||{},w=y.queryParameters,C=n(y,["queryParameters"]),P=t({acl:d},w!==void 0?{queryParameters:w}:{});return h(f.transporter.write({method:L,path:"1/keys",data:P},C),function(R,T){return u(function(D){return Mr(f)(R.key,T).catch(function(_){if(_.status!==404)throw _;return D()})})})}},Ce=function(f){return function(d,p,y){var w=v(y);return w.queryParameters["X-Algolia-User-ID"]=d,f.transporter.write({method:L,path:"1/clusters/mapping",data:{cluster:p}},w)}},Ve=function(f){return function(d,p,y){return f.transporter.write({method:L,path:"1/clusters/mapping/batch",data:{users:d,cluster:p}},y)}},Ee=function(f){return function(d,p){return h(f.transporter.write({method:L,path:g("/1/dictionaries/%s/batch",d),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},p),function(y,w){return Kt(f)(y.taskID,w)})}},H=function(f){return function(d,p,y){return h(f.transporter.write({method:L,path:g("1/indexes/%s/operation",d),data:{operation:"copy",destination:p}},y),function(w,C){return Fr(f)(d,{methods:{waitTask:we}}).waitTask(w.taskID,C)})}},Se=function(f){return function(d,p,y){return H(f)(d,p,t(t({},y),{}
1,{scope:[co.Rules]}))}},ee=function(f){return function(d,p,y){return H(f)(d,p,t(t({},y),{},{scope:[co.Settings]}))}},q=function(f){return function(d,p,y){return H(f)(d,p,t(t({},y),{},{scope:[co.Synonyms]}))}},te=function(f){return function(d,p){return d.method===$?f.transporter.read(d,p):f.transporter.write(d,p)}},W=function(f){return function(d,p){return h(f.transporter.write({method:G,path:g("1/keys/%s",d)},p),function(y,w){return u(function(C){return Mr(f)(d,w).then(C).catch(function(P){if(P.status!==404)throw P})})})}},$t=function(f){return function(d,p,y){var w=p.map(function(C){return{action:"deleteEntry",body:{objectID:C}}});return h(f.transporter.write({method:L,path:g("/1/dictionaries/%s/batch",d),data:{clearExistingDictionaryEntries:!1,requests:w}},y),function(C,P){return Kt(f)(C.taskID,P)})}},Mr=function(f){return function(d,p){return f.transporter.read({method:$,path:g("1/keys/%s",d)},p)}},rl=function(f){return function(d,p){return f.transporter.read({method:$,path:g("1/task/%s",d.toString())},p)}},xm=function(f){return function(d){return f.transporter.read({method:$,path:"/1/dictionaries/*/settings"},d)}},Rm=function(f){return function(d){return f.transporter.read({method:$,path:"1/logs"},d)}},Cm=function(f){return function(d){return f.transporter.read({method:$,path:"1/clusters/mapping/top"},d)}},Em=function(f){return function(d,p){return f.transporter.read({method:$,path:g("1/clusters/mapping/%s",d)},p)}},Im=function(f){return function(d){var p=d||{},y=p.retrieveMappings,w=n(p,["retrieveMappings"]);return y===!0&&(w.getClusters=!0),f.transporter.read({method:$,path:"1/clusters/mapping/pending"},w)}},Fr=function(f){return function(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y={transporter:f.transporter,appId:f.appId,indexName:d};return b(y,p.methods)}},Am=function(f){return function(d){return f.transporter.read({method:$,path:"1/keys"},d)}},Tm=function(f){return function(d){return f.transporter.read({method:$,path:"1/clusters"},d)}},Pm=function(f){return function(d){return f.transporter.read({method:$,path:"1/indexes"},d)}},Om=function(f){return function(d){return f.transporter.read({method:$,path:"1/clusters/mapping"},d)}},_m=function(f){return function(d,p,y){return h(f.transporter.write({method:L,path:g("1/indexes/%s/operation",d),data:{operation:"move",destination:p}},y),function(w,C){return Fr(f)(d,{methods:{waitTask:we}}).waitTask(w.taskID,C)})}},Mm=function(f){return function(d,p){return h(f.transporter.write({method:L,path:"1/indexes/*/batch",data:{requests:d}},p),function(y,w){return Promise.all(Object.keys(y.taskID).map(function(C){return Fr(f)(C,{methods:{waitTask:we}}).waitTask(y.taskID[C],w)}))})}},Fm=function(f){return function(d,p){return f.transporter.read({method:L,path:"1/indexes/*/objects",data:{requests:d}},p)}},nl=function(f){return function(d,p){var y=d.map(function(w){return t(t({},w),{},{params:se(w.params||{})})});return f.transporter.read({method:L,path:"1/indexes/*/queries",data:{requests:y},cacheable:!0},p)}},il=function(f){return function(d,p){return Promise.all(d.map(function(y){var w=y.params,C=w.facetName,P=w.facetQuery,R=n(w,["facetName","facetQuery"]);return Fr(f)(y.indexName,{methods:{searchForFacetValues:ul}}).searchForFacetValues(C,P,t(t({},p),R))}))}},km=function(f){return function(d,p){var y=v(p);return y.queryParameters["X-Algolia-User-ID"]=d,f.transporter.write({method:G,path:"1/clusters/mapping"},y)}},Nm=function(f){return function(d,p,y){var w=p.map(function(C){return{action:"addEntry",body:C}});return h(f.transporter.write({method:L,path:g("/1/dictionaries/%s/batch",d),data:{clearExistingDictionaryEntries:!0,requests:w}},y),function(C,P){return Kt(f)(C.taskID,P)})}},Dm=function(f){return function(d,p){return h(f.transporter.write({method:L,path:g("1/keys/%s/restore",d)},p),function(y,w){return u(function(C){return Mr(f)(d,w).catch(function(P){if(P.status!==404)throw P;return C()})})})}},Lm=function(f){return function(d,p,y){var w=p.map(function(C){return{action:"addEntry",body:C}});return h(f.transporter.write({method:L,path:g("/1/dictionaries/%s/batch",d),data:{clearExistingDictionaryEntries:!1,requests:w}},y),function(C,P){return Kt(f)(C.taskID,P)})}},$m=function(f){return function(d,p,y){return f.transporter.read({method:L,path:g("/1/dictionaries/%s/search",d),data:{query:p},cacheable:!0},y)}},jm=function(f){return function(d,p){return f.transporter.read({method:L,path:"1/clusters/mapping/search",data:{query:d}},p)}},Hm=function(f){return function(d,p){return h(f.transporter.write({method:Q,path:"/1/dictionaries/*/settings",data:d},p),function(y,w){return Kt(f)(y.taskID,w)})}},Um=function(f){return function(d,p){var y=Object.assign({},p),w=p||{},C=w.queryParameters,P=n(w,["queryParameters"]),R=C?{queryParameters:C}:{},T=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"];return h(f.transporter.write({method:Q,path:g("1/keys/%s",d),data:R},P),function(D,_){return u(function(B){return Mr(f)(d,_).then(function(U){return function(K){return Object.keys(y).filter(function(z){return T.indexOf(z)!==-1}).every(function(z){if(Array.isArray(K[z])&&Array.isArray(y[z])){var ae=K[z];return ae.length===y[z].length&&ae.every(function(me,Le){return me===y[z][Le]})}return K[z]===y[z]})}(U)?Promise.resolve():B()})})})}},Kt=function(f){return function(d,p){return u(function(y){return rl(f)(d,p).then(function(w){return w.status!=="published"?y():void 0})})}},sl=function(f){return function(d,p){return h(f.transporter.write({method:L,path:g("1/indexes/%s/batch",f.indexName),data:{requests:d}},p),function(y,w){return we(f)(y.taskID,w)})}}
1,Bm=function(f){return function(d){return _e(t(t({shouldStop:function(p){return p.cursor===void 0}},d),{},{request:function(p){return f.transporter.read({method:L,path:g("1/indexes/%s/browse",f.indexName),data:p},d)}}))}},Wm=function(f){return function(d){var p=t({hitsPerPage:1e3},d);return _e(t(t({shouldStop:function(y){return y.hits.length<p.hitsPerPage}},p),{},{request:function(y){return fl(f)("",t(t({},p),y)).then(function(w){return t(t({},w),{},{hits:w.hits.map(function(C){return delete C._highlightResult,C})})})}}))}},zm=function(f){return function(d){var p=t({hitsPerPage:1e3},d);return _e(t(t({shouldStop:function(y){return y.hits.length<p.hitsPerPage}},p),{},{request:function(y){return hl(f)("",t(t({},p),y)).then(function(w){return t(t({},w),{},{hits:w.hits.map(function(C){return delete C._highlightResult,C})})})}}))}},io=function(f){return function(d,p,y){var w=y||{},C=w.batchSize,P=n(w,["batchSize"]),R={taskIDs:[],objectIDs:[]};return h(function T(){var D,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,B=[];for(D=_;D<d.length&&(B.push(d[D]),B.length!==(C||1e3));D++);return B.length===0?Promise.resolve(R):sl(f)(B.map(function(U){return{action:p,body:U}}),P).then(function(U){return R.objectIDs=R.objectIDs.concat(U.objectIDs),R.taskIDs.push(U.taskID),D++,T(D)})}(),function(T,D){return Promise.all(T.taskIDs.map(function(_){return we(f)(_,D)}))})}},Vm=function(f){return function(d){return h(f.transporter.write({method:L,path:g("1/indexes/%s/clear",f.indexName)},d),function(p,y){return we(f)(p.taskID,y)})}},Gm=function(f){return function(d){var p=d||{},y=p.forwardToReplicas,w=v(n(p,["forwardToReplicas"]));return y&&(w.queryParameters.forwardToReplicas=1),h(f.transporter.write({method:L,path:g("1/indexes/%s/rules/clear",f.indexName)},w),function(C,P){return we(f)(C.taskID,P)})}},qm=function(f){return function(d){var p=d||{},y=p.forwardToReplicas,w=v(n(p,["forwardToReplicas"]));return y&&(w.queryParameters.forwardToReplicas=1),h(f.transporter.write({method:L,path:g("1/indexes/%s/synonyms/clear",f.indexName)},w),function(C,P){return we(f)(C.taskID,P)})}},Ym=function(f){return function(d,p){return h(f.transporter.write({method:L,path:g("1/indexes/%s/deleteByQuery",f.indexName),data:d},p),function(y,w){return we(f)(y.taskID,w)})}},Qm=function(f){return function(d){return h(f.transporter.write({method:G,path:g("1/indexes/%s",f.indexName)},d),function(p,y){return we(f)(p.taskID,y)})}},Km=function(f){return function(d,p){return h(ol(f)([d],p).then(function(y){return{taskID:y.taskIDs[0]}}),function(y,w){return we(f)(y.taskID,w)})}},ol=function(f){return function(d,p){var y=d.map(function(w){return{objectID:w}});return io(f)(y,Xt.DeleteObject,p)}},Xm=function(f){return function(d,p){var y=p||{},w=y.forwardToReplicas,C=v(n(y,["forwardToReplicas"]));return w&&(C.queryParameters.forwardToReplicas=1),h(f.transporter.write({method:G,path:g("1/indexes/%s/rules/%s",f.indexName,d)},C),function(P,R){return we(f)(P.taskID,R)})}},Jm=function(f){return function(d,p){var y=p||{},w=y.forwardToReplicas,C=v(n(y,["forwardToReplicas"]));return w&&(C.queryParameters.forwardToReplicas=1),h(f.transporter.write({method:G,path:g("1/indexes/%s/synonyms/%s",f.indexName,d)},C),function(P,R){return we(f)(P.taskID,R)})}},Zm=function(f){return function(d){return al(f)(d).then(function(){return!0}).catch(function(p){if(p.status!==404)throw p;return!1})}},eg=function(f){return function(d,p,y){return f.transporter.read({method:L,path:g("1/answers/%s/prediction",f.indexName),data:{query:d,queryLanguages:p},cacheable:!0},y)}},tg=function(f){return function(d,p){var y=p||{},w=y.query,C=y.paginate,P=n(y,["query","paginate"]),R=0;return function T(){return ll(f)(w||"",t(t({},P),{},{page:R})).then(function(D){for(var _=0,B=Object.entries(D.hits);_<B.length;_++){var U=i(B[_],2),K=U[0],z=U[1];if(d(z))return{object:z,position:parseInt(K,10),page:R}}if(R++,C===!1||R>=D.nbPages)throw{name:"ObjectNotFoundError",message:"Object not found."};return T()})}()}},rg=function(f){return function(d,p){return f.transporter.read({method:$,path:g("1/indexes/%s/%s",f.indexName,d)},p)}},ng=function(){return function(f,d){for(var p=0,y=Object.entries(f.hits);p<y.length;p++){var w=i(y[p],2),C=w[0];if(w[1].objectID===d)return parseInt(C,10)}return-1}},ig=function(f){return function(d,p){var y=p||{},w=y.attributesToRetrieve,C=n(y,["attributesToRetrieve"]),P=d.map(function(R){return t({indexName:f.indexName,objectID:R},w?{attributesToRetrieve:w}:{})});return f.transporter.read({method:L,path:"1/indexes/*/objects",data:{requests:P}},C)}},sg=function(f){return function(d,p){return f.transporter.read({method:$,path:g("1/indexes/%s/rules/%s",f.indexName,d)},p)}},al=function(f){return function(d){return f.transporter.read({method:$,path:g("1/indexes/%s/settings",f.indexName),data:{getVersion:2}},d)}},og=function(f){return function(d,p){return f.transporter.read({method:$,path:g("1/indexes/%s/synonyms/%s",f.indexName,d)},p)}},ag=function(f){return function(d,p){return h(cl(f)([d],p).then(function(y){return{objectID:y.objectIDs[0],taskID:y.taskIDs[0]}}),function(y,w){return we(f)(y.taskID,w)})}},cl=function(f){return function(d,p){var y=p||{},w=y.createIfNotExists,C=n(y,["createIfNotExists"]),P=w?Xt.PartialUpdateObject:Xt.PartialUpdateObjectNoCreate;return io(f)(d,P,C)}},cg=function(f){return function(d,p){var y=p||{},w=y.safe,C=y.autoGenerateObjectIDIfNotExist,P=y.batchSize,R=n(y,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),T=function(z,ae,me,Le){return h(f.transporter.write({method:L,path:g("1/indexes/%s/operation",z),data:{operation:me,destination:ae}},Le),function(kr,$e){return we(f)(kr.taskID,$e)})},D=Math.random().toString(36).substring(7),_="".concat(f.indexName,"_tmp_").concat(D),B=so({appId:f.appId,transporter:f.transporter,indexName:_}),U=[],K=T(f.indexName,_,"copy",t(t({},R),{},{scope:["settings","synonyms","rules"]}));return U.push(K),h((w?K.wait(R):K).then(function(){var z=B(d,t(t({},R),{},{autoGenerateObjectIDIfNotExist:C,batchSize:P}));return U.push(z),w?z.wait(R):z}).then(function(){var z=T(_,f.indexName,"move",R);return U.push(z),w?z.wait(R):z}).then(function(){return Promise.all(U)}).then(function(z){var ae=i(z,3),me=ae[0],Le=ae[1],kr=ae[2];return{objectIDs:Le.objectIDs,taskIDs:[me.taskID].concat(s(Le.taskIDs),[kr.taskID])}}),function(z,ae){return Promise.all(U.map(function(me){return me.wait(ae)}))})}},lg=function(f){return function(d,p){return oo(f)(d,t(t({},p),{},{clearExistingRules:!0}))}},ug=function(f){return function(d,p){return ao(f)(d,t(t({},p),{},{clearExistingSynonyms:!0}))}},fg=function(f){return function(d,p){return h(so(f)([d],p).then(function(y){return{objectID:y.objectIDs[0],taskID:y.taskIDs[0]}}),function(y,w){return we(f)(y.taskID,w)})}},so=function(f){return function(d,p){var y=p||{},w=y.autoGenerateObjectIDIfNotExist,C=n(y,["autoGenerateObjectIDIfNotExist"]),P=w?Xt.AddObject:Xt.UpdateObject;if(P===Xt.UpdateObject){var R=!0,T=!1,D=void 0;try{for(var _,B=d[Symbol.iterator]();!(R=(_=B.next()).done);R=!0)if(_.value.objectID===void 0)return h(Promise.reject({name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}))}catch(U){T=!0,D=U}finally{try{R||B.return==null||B.return()}finally{if(T)throw D}}}return io(f)(d,P,C)}},hg=function(f){return function(d,p){return oo(f)([d],p)}},oo=function(f){return function(d,p){var y=p||{},w=y.forwardToReplicas,C=y.clearExistingRules,P=v(n(y,["forwardToReplicas","clearExistingRules"]));return w&&(P.queryParameters.forwardToReplicas=1),C&&(P.queryParameters.clearExistingRules=1),h(f.transporter.write({method:L,path:g("1/indexes/%s/rules/batch",f.indexName),data:d},P),function(R,T){return we(f)(R.taskID,T)})}},dg=function(f){return function(d,p){return ao(f)([d],p)}},ao=function(f){return function(d,p){var y=p||{},w=y.forwardToReplicas,C=y.clearExistingSynonyms,P=y.replaceExistingSynonyms,R=v(n(y,["forwardToReplicas","clearExistingSynonyms","replaceExistingSynonyms"]));return w&&(R.queryParameters.forwardToReplicas=1),(P||C)&&(R.queryParameters.replaceExistingSynonyms=1),h(f.transporter.write({method:L,path:g("1/indexes/%s/synonyms/batch",f.indexName),data:d},R),function(T,D){return we(f)(T.taskID,D)})}},ll=function(f){return function(d,p){return f.transporter.read({method:L,path:g("1/indexes/%s/query",f.indexName),data:{query:d},cacheable:!0},p)}},ul=function(f){return function(d,p,y){return f.transporter.read({method:L,path:g("1/indexes/%s/facets/%s/query",f.indexName,d),data:{facetQuery:p},cacheable:!0},y)}},fl=function(f){return function(d,p){return f.transporter.read({method:L,path:g("1/indexes/%s/rules/search",f.indexName),data:{query:d}},p)}},hl=function(f){return function(d,p){return f.transporter.read({method:L,path:g("1/indexes/%s/synonyms/search",f.indexName),data:{query:d}},p)}},pg=function(f){return function(d,p){var y=p||{},w=y.forwardToReplicas,C=v(n(y,["forwardToReplicas"]));return w&&(C.queryParameters.forwardToReplicas=1),h(f.transporter.write({method:Q,path:g("1/indexes/%s/settings",f.indexName),data:d},C),function(P,R){return we(f)(P.taskID,R)})}},we=function(f){return function(d,p){return u(function(y){return function(w){return function(C,P){return w.transporter.read({method:$,path:g("1/indexes/%s/task/%s",w.indexName,C.toString())},P)}}(f)(d,p).then(function(w){return w.status!=="published"?y():void 0})})}}
1,Xt={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},co={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},mg=1,gg=2,yg=3,jn=function(f){return function(d,p){var y=d.map(function(w){return t(t({},w),{},{threshold:w.threshold||0})});return f.transporter.read({method:L,path:"1/indexes/*/recommendations",data:{requests:y},cacheable:!0},p)}},vg=function(f){return function(d,p){return jn(f)(d.map(function(y){return t(t({},y),{},{fallbackParameters:{},model:"bought-together"})}),p)}},bg=function(f){return function(d,p){return jn(f)(d.map(function(y){return t(t({},y),{},{model:"related-products"})}),p)}},Sg=function(f){return function(d,p){var y=d.map(function(w){return t(t({},w),{},{model:"trending-facets",threshold:w.threshold||0})});return f.transporter.read({method:L,path:"1/indexes/*/recommendations",data:{requests:y},cacheable:!0},p)}},wg=function(f){return function(d,p){var y=d.map(function(w){return t(t({},w),{},{model:"trending-items",threshold:w.threshold||0})});return f.transporter.read({method:L,path:"1/indexes/*/recommendations",data:{requests:y},cacheable:!0},p)}},xg=function(f){return function(d,p){return jn(f)(d.map(function(y){return t(t({},y),{},{model:"looking-similar"})}),p)}},Rg=function(f){return function(d,p){var y=d.map(function(w){return t(t({},w),{},{model:"recommended-for-you",threshold:w.threshold||0})});return f.transporter.read({method:L,path:"1/indexes/*/recommendations",data:{requests:y},cacheable:!0},p)}};function dl(f,d,p){var y,w={appId:f,apiKey:d,timeouts:{connect:1,read:2,write:30},requester:{send:function(R){return new Promise(function(T){var D=new XMLHttpRequest;D.open(R.method,R.url,!0),Object.keys(R.headers).forEach(function(K){return D.setRequestHeader(K,R.headers[K])});var _,B=function(K,z){return setTimeout(function(){D.abort(),T({status:0,content:z,isTimedOut:!0})},1e3*K)},U=B(R.connectTimeout,"Connection timeout");D.onreadystatechange=function(){D.readyState>D.OPENED&&_===void 0&&(clearTimeout(U),_=B(R.responseTimeout,"Socket timeout"))},D.onerror=function(){D.status===0&&(clearTimeout(U),clearTimeout(_),T({content:D.responseText||"Network request failed",status:D.status,isTimedOut:!1}))},D.onload=function(){clearTimeout(U),clearTimeout(_),T({content:D.responseText,status:D.status,isTimedOut:!1})},D.send(R.data)})}},logger:(y=yg,{debug:function(R,T){return mg>=y&&console.debug(R,T),Promise.resolve()},info:function(R,T){return gg>=y&&console.info(R,T),Promise.resolve()},error:function(R,T){return console.error(R,T),Promise.resolve()}}),responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:c({caches:[o({key:"".concat("4.23.3","-").concat(f)}),a()]}),userAgent:Qe("4.23.3").add({segment:"Browser"})},C=t(t({},w),p),P=function(){return function(R){return function(T){var D=T.region||"us",_=l(S.WithinHeaders,T.appId,T.apiKey),B=j(t(t({hosts:[{url:"personalization.".concat(D,".algolia.com")}]},T),{},{headers:t(t(t({},_.headers()),{"content-type":"application/json"}),T.headers),queryParameters:t(t({},_.queryParameters()),T.queryParameters)}));return b({appId:T.appId,transporter:B},T.methods)}(t(t(t({},w),R),{},{methods:{getPersonalizationStrategy:lt,setPersonalizationStrategy:ut}}))}};return function(R){var T=R.appId,D=l(R.authMode!==void 0?R.authMode:S.WithinHeaders,T,R.apiKey),_=j(t(t({hosts:[{url:"".concat(T,"-dsn.algolia.net"),accept:I.Read},{url:"".concat(T,".algolia.net"),accept:I.Write}].concat(m([{url:"".concat(T,"-1.algolianet.com")},{url:"".concat(T,"-2.algolianet.com")},{url:"".concat(T,"-3.algolianet.com")}]))},R),{},{headers:t(t(t({},D.headers()),{"content-type":"application/x-www-form-urlencoded"}),R.headers),queryParameters:t(t({},D.queryParameters()),R.queryParameters)}));return b({transporter:_,appId:T,addAlgoliaAgent:function(B,U){_.userAgent.add({segment:B,version:U})},clearCache:function(){return Promise.all([_.requestsCache.clear(),_.responsesCache.clear()]).then(function(){})}},R.methods)}(t(t({},C),{},{methods:{search:nl,searchForFacetValues:il,multipleBatch:Mm,multipleGetObjects:Fm,multipleQueries:nl,copyIndex:H,copySettings:ee,copySynonyms:q,copyRules:Se,moveIndex:_m,listIndices:Pm,getLogs:Rm,listCluster
1s:Tm,multipleSearchForFacetValues:il,getApiKey:Mr,addApiKey:Me,listApiKeys:Am,updateApiKey:Um,deleteApiKey:W,restoreApiKey:Dm,assignUserID:Ce,assignUserIDs:Ve,getUserID:Em,searchUserIDs:jm,listUserIDs:Om,getTopUserIDs:Cm,removeUserID:km,hasPendingMappings:Im,clearDictionaryEntries:Ee,deleteDictionaryEntries:$t,getDictionarySettings:xm,getAppTask:rl,replaceDictionaryEntries:Nm,saveDictionaryEntries:Lm,searchDictionaryEntries:$m,setDictionarySettings:Hm,waitAppTask:Kt,customRequest:te,initIndex:function(R){return function(T){return Fr(R)(T,{methods:{batch:sl,delete:Qm,findAnswers:eg,getObject:rg,getObjects:ig,saveObject:fg,saveObjects:so,search:ll,searchForFacetValues:ul,waitTask:we,setSettings:pg,getSettings:al,partialUpdateObject:ag,partialUpdateObjects:cl,deleteObject:Km,deleteObjects:ol,deleteBy:Ym,clearObjects:Vm,browseObjects:Bm,getObjectPosition:ng,findObject:tg,exists:Zm,saveSynonym:dg,saveSynonyms:ao,getSynonym:og,searchSynonyms:hl,browseSynonyms:zm,deleteSynonym:Jm,clearSynonyms:qm,replaceAllObjects:cg,replaceAllSynonyms:ug,searchRules:fl,getRule:sg,deleteRule:Xm,saveRule:hg,saveRules:oo,replaceAllRules:lg,browseRules:Wm,clearRules:Gm}})}},initAnalytics:function(){return function(R){return function(T){var D=T.region||"us",_=l(S.WithinHeaders,T.appId,T.apiKey),B=j(t(t({hosts:[{url:"analytics.".concat(D,".algolia.com")}]},T),{},{headers:t(t(t({},_.headers()),{"content-type":"application/json"}),T.headers),queryParameters:t(t({},_.queryParameters()),T.queryParameters)}));return b({appId:T.appId,transporter:B},T.methods)}(t(t(t({},w),R),{},{methods:{addABTest:Ie,getABTest:De,getABTests:Et,stopABTest:ze,deleteABTest:Ke}}))}},initPersonalization:P,initRecommendation:function(){return function(R){return C.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),P()(R)}},getRecommendations:jn,getFrequentlyBoughtTogether:vg,getLookingSimilar:xg,getRecommendedForYou:Rg,getRelatedProducts:bg,getTrendingFacets:Sg,getTrendingItems:wg}}))}return dl.version="4.23.3",dl})});var vo=ce(($0,Ll)=>{function Te(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Ll.exports=Te;Te.prototype._events=void 0;Te.prototype._maxListeners=void 0;Te.defaultMaxListeners=10;Te.prototype.setMaxListeners=function(r){if(!kg(r)||r<0||isNaN(r))throw TypeError("n must be a positive number");return this._maxListeners=r,this};Te.prototype.emit=function(r){var e,t,n,i,s,o;if(this._events||(this._events={}),r==="error"&&(!this._events.error||Lr(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(t=this._events[r],Dl(t))return!1;if(vt(t))switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),t.apply(this,i)}else if(Lr(t))for(i=Array.prototype.slice.call(arguments,1),o=t.slice(),n=o.length,s=0;s<n;s++)o[s].apply(this,i);return!0};Te.prototype.addListener=function(r,e){var t;if(!vt(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",r,vt(e.listener)?e.listener:e),this._events[r]?Lr(this._events[r])?this._events[r].push(e):this._events[r]=[this._events[r],e]:this._events[r]=e,Lr(this._events[r])&&!this._events[r].warned&&(Dl(this._maxListeners)?t=Te.defaultMaxListeners:t=this._maxListeners,t&&t>0&&this._events[r].length>t&&(this._events[r].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[r].length),typeof console.trace=="function"&&console.trace())),this};Te.prototype.on=Te.prototype.addListener;Te.prototype.once=function(r,e){if(!vt(e))throw TypeError("listener must be a function");var t=!1;function n(){this.removeListener(r,n),t||(t=!0,e.apply(this,arguments))}return n.listener=e,this.on(r,n),this};Te.prototype.removeListener=function(r,e){var t,n,i,s;if(!vt(e))throw TypeError("listener must be a function");if(!this._events||!this._events[r])return this;if(t=this._events[r],i=t.length,n=-1,t===e||vt(t.listener)&&t.listener===e)delete this._events[r],this._events.removeListener&&this.emit
1("removeListener",r,e);else if(Lr(t)){for(s=i;s-- >0;)if(t[s]===e||t[s].listener&&t[s].listener===e){n=s;break}if(n<0)return this;t.length===1?(t.length=0,delete this._events[r]):t.splice(n,1),this._events.removeListener&&this.emit("removeListener",r,e)}return this};Te.prototype.removeAllListeners=function(r){var e,t;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[r]&&delete this._events[r],this;if(arguments.length===0){for(e in this._events)e!=="removeListener"&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(t=this._events[r],vt(t))this.removeListener(r,t);else if(t)for(;t.length;)this.removeListener(r,t[t.length-1]);return delete this._events[r],this};Te.prototype.listeners=function(r){var e;return!this._events||!this._events[r]?e=[]:vt(this._events[r])?e=[this._events[r]]:e=this._events[r].slice(),e};Te.prototype.listenerCount=function(r){if(this._events){var e=this._events[r];if(vt(e))return 1;if(e)return e.length}return 0};Te.listenerCount=function(r,e){return r.listenerCount(e)};function vt(r){return typeof r=="function"}function kg(r){return typeof r=="number"}function Lr(r){return typeof r=="object"&&r!==null}function Dl(r){return r===void 0}});var bo=ce((j0,$l)=>{"use strict";function Ng(r,e){r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}$l.exports=Ng});var Hl=ce((H0,jl)=>{"use strict";var Dg=vo(),Lg=bo();function Yn(r,e){this.main=r,this.fn=e,this.lastResults=null}Lg(Yn,Dg);Yn.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)};Yn.prototype.getModifiedState=function(r){return this.fn(r)};jl.exports=Yn});var Qn=ce((U0,Ul)=>{"use strict";function $g(r){return typeof r!="string"?r:String(r).replace(/^-/,"\\-")}function jg(r){return typeof r!="string"?r:r.replace(/^\\-/,"-")}Ul.exports={escapeFacetValue:$g,unescapeFacetValue:jg}});var $r=ce((B0,Bl)=>{"use strict";function Hg(r){return typeof r=="object"&&r!==null?So(Array.isArray(r)?[]:{},r):r}function Kn(r){return typeof r=="function"||Array.isArray(r)||Object.prototype.toString.call(r)==="[object Object]"}function So(r,e){if(r===e)return r;for(var t in e)if(!(!Object.prototype.hasOwnProperty.call(e,t)||t==="__proto__"||t==="constructor")){var n=e[t],i=r[t];typeof i<"u"&&typeof n>"u"||(Kn(i)&&Kn(n)?r[t]=So(i,n):r[t]=Hg(n))}return r}function Ug(r){Kn(r)||(r={});for(var e=1,t=arguments.length;e<t;e++){var n=arguments[e];Kn(n)&&So(r,n)}return r}Bl.exports=Ug});var Xn=ce((W0,Wl)=>{"use strict";function Bg(r){return r&&Object.keys(r).length>0}Wl.exports=Bg});var Jn=ce((z0,zl)=>{"use strict";function Wg(r,e){if(r===null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}zl.exports=Wg});var Gl=ce((V0,Vl)=>{"use strict";var wo=$r();function xo(r){return Object.keys(r).sort().reduce(function(e,t){return e[t]=r[t],e},{})}var Ge={_getQueries:function(e,t){var n=[];return n.push({indexName:e,params:Ge._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach(function(i){n.push({indexName:e,params:Ge._getDisjunctiveFacetSearchParams(t,i)})}),t.getRefinedHierarchicalFacets().forEach(function(i){var s=t.getHierarchicalFacetByName(i),o=t.getHierarchicalRefinement(i),c=t._getHierarchicalFacetSeparator(s);if(o.length>0&&o[0].split(c).length>1){var a=o[0].split(c).slice(0,-1).reduce(function(u,h,m){return u.concat({attribute:s.attributes[m],value:m===0?h:[u[u.length-1].value,h].join(c)})},[]);a.forEach(function(l,u){var h=Ge._getDisjunctiveFacetSearchParams(t,l.attribute,u===0);function m(S){return s.attributes.some(function(v){return v===S.split(":")[0]})}var b=(h.facetFilters||[]).reduce(function(S,v){if(Array.isArray(v)){var I=v.filter(function(A){return!m(A)});I.length>0&&S.push(I)}return typeof v=="string"&&!m(v)&&S.push(v),S},[]),g=a[u-1];u>0?h.facetFilters=b.concat(g.attribute+":"+g.value):h.facetFilters=b.length>0?b:void 0,n.push({indexName:e,params:h})})}}),n},_getHitsSearchParams:function(r){var e=r.facets.concat(r.disjunctiveFacets).concat(Ge._getHitsHierarchicalFacetsAttributes(r)).sort(),t=Ge._getFacetFilters(r),n=Ge._getNumericFilters(r),i=Ge._getTagFilters(r),s={facets:e.indexOf("*")>-1?["*"]:e,tagFilters:i};return t.length>0&&(s.facetFilters=t),n.length>0&&(s.numericFilters=n),xo(wo({},r.getQueryParams(),s))},_getDisjunctiveFacetSearchParams:function(r,e,t){var n=Ge._getFacetFilters(r,e,t),i=Ge._getNumericFilters(r,e),s=Ge._getTagFilters(r),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};s.length>0&&(o.tagFilters=s);var c=r.getHierarchicalFacetByName(e);return c?o.facets=Ge._getDisjunctiveHierarchicalFacetAttribute(r,c,t):o.facets=e,i.length>0&&(o.numericFilters=i),n.length>0&&(o.facetFilters=n),xo(wo({},r.getQueryParams(),o))},_getNumericFilters:function(r,e){if(r.numericFilters)return r.numericFilters;var t=[];
1return Object.keys(r.numericRefinements).forEach(function(n){var i=r.numericRefinements[n]||{};Object.keys(i).forEach(function(s){var o=i[s]||[];e!==n&&o.forEach(function(c){if(Array.isArray(c)){var a=c.map(function(l){return n+s+l});t.push(a)}else t.push(n+s+c)})})}),t},_getTagFilters:function(r){return r.tagFilters?r.tagFilters:r.tagRefinements.join(",")},_getFacetFilters:function(r,e,t){var n=[],i=r.facetsRefinements||{};Object.keys(i).sort().forEach(function(a){var l=i[a]||[];l.sort().forEach(function(u){n.push(a+":"+u)})});var s=r.facetsExcludes||{};Object.keys(s).sort().forEach(function(a){var l=s[a]||[];l.sort().forEach(function(u){n.push(a+":-"+u)})});var o=r.disjunctiveFacetsRefinements||{};Object.keys(o).sort().forEach(function(a){var l=o[a]||[];if(!(a===e||!l||l.length===0)){var u=[];l.sort().forEach(function(h){u.push(a+":"+h)}),n.push(u)}});var c=r.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach(function(a){var l=c[a]||[],u=l[0];if(u!==void 0){var h=r.getHierarchicalFacetByName(a),m=r._getHierarchicalFacetSeparator(h),b=r._getHierarchicalRootPath(h),g,S;if(e===a){if(u.indexOf(m)===-1||!b&&t===!0||b&&b.split(m).length===u.split(m).length)return;b?(S=b.split(m).length-1,u=b):(S=u.split(m).length-2,u=u.slice(0,u.lastIndexOf(m))),g=h.attributes[S]}else S=u.split(m).length-1,g=h.attributes[S];g&&n.push([g+":"+u])}}),n},_getHitsHierarchicalFacetsAttributes:function(r){var e=[];return r.hierarchicalFacets.reduce(function(n,i){var s=r.getHierarchicalRefinement(i.name)[0];if(!s)return n.push(i.attributes[0]),n;var o=r._getHierarchicalFacetSeparator(i),c=s.split(o).length,a=i.attributes.slice(0,c+1);return n.concat(a)},e)},_getDisjunctiveHierarchicalFacetAttribute:function(r,e,t){var n=r._getHierarchicalFacetSeparator(e);if(t===!0){var i=r._getHierarchicalRootPath(e),s=0;return i&&(s=i.split(n).length),[e.attributes[s]]}var o=r.getHierarchicalRefinement(e.name)[0]||"",c=o.split(n).length-1;return e.attributes.slice(0,c+1)},getSearchForFacetQuery:function(r,e,t,n){var i=n.isDisjunctiveFacet(r)?n.clearRefinements(r):n,s={facetQuery:e,facetName:r};return typeof t=="number"&&(s.maxFacetHits=t),xo(wo({},Ge._getHitsSearchParams(i),s))}};Vl.exports=Ge});var Zn=ce((G0,ql)=>{"use strict";ql.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight(function(t,n){return Object.keys(Object(n)).forEach(function(i){n[i]!==void 0&&(t[i]!==void 0&&delete t[i],t[i]=n[i])}),t},{})}});var jr=ce((q0,Yl)=>{"use strict";Yl.exports=function(e,t){if(Array.isArray(e)){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}}});var Kl=ce((Y0,Ql)=>{"use strict";function zg(r,e){return r.filter(function(t,n){return e.indexOf(t)>-1&&r.indexOf(t)===n})}Ql.exports=zg});var Zl=ce((Q0,Jl)=>{"use strict";function Xl(r){if(typeof r=="number")return r;if(typeof r=="string")return parseFloat(r);if(Array.isArray(r))return r.map(Xl);throw new Error("The value should be a number, a parsable string or an array of those.")}Jl.exports=Xl});var tu=ce((K0,eu)=>{"use strict";eu.exports=function(e){return e===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(e)}});var nu=ce((X0,ru)=>{"use strict";var Vg=Zn(),Gg=Xn(),qg=Jn(),Ut={addRefinement:function(e,t,n){if(Ut.isRefined(e,t,n))return e;var i=""+n,s=e[t]?e[t].concat(i):[i],o={};return o[t]=s,Vg({},o,e)},removeRefinement:function(e,t,n){if(n===void 0)return Ut.clearRefinement(e,function(s,o){return t===o});var i=""+n;return Ut.clearRefinement(e,function(s,o){return t===o&&i===s})},toggleRefinement:function(e,t,n){if(n===void 0)throw new Error("toggleRefinement should be used with a value");return Ut.isRefined(e,t,n)?Ut.removeRefinement(e,t,n):Ut.addRefinement(e,t,n)},clearRefinement:function(e,t,n){if(t===void 0)return Gg(e)?{}:e;if(typeof t=="string")return qg(e,[t]);if(typeof t=="function"){var i=!1,s=Object.keys(e).reduce(function(o,c){var a=e[c]||[],l=a.filter(function(u){return!t(u,c,n)});return l.length!==a.length&&(i=!0),o[c]=l,o},{});return i?s:e}},isRefined:function(e,t,n){var i=Boolean(e[t])&&e[t].length>0;if(n===void 0||!i)return i;var s=""+n;return e[t].indexOf(s)!==-1}};ru.exports=Ut});var To=ce((J0,au)=>{"use strict";var Ro=Zn(),ou=jr(),iu=Kl(),Eo=$r(),Io=Xn(),su=Jn(),Co=Zl(),Yg=tu(),ge=nu();function Ao(r,e){return Array.isArray(r)&&Array.isArray(e)?r.length===e.length&&r.every(function(t,n){return Ao(e[n],t)}):r===e}function Qg(r,e){return ou(r,function(t){return Ao(t,e)})}function je(r){var e=r?je._parseNumbers(r):{};e.userToken!==void 0&&!Yg(e.userToken)&&console.warn("[algoliasearch-helper] The `userToken` parameter is invali
1d. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=e.facets||[],this.disjunctiveFacets=e.disjunctiveFacets||[],this.hierarchicalFacets=e.hierarchicalFacets||[],this.facetsRefinements=e.facetsRefinements||{},this.facetsExcludes=e.facetsExcludes||{},this.disjunctiveFacetsRefinements=e.disjunctiveFacetsRefinements||{},this.numericRefinements=e.numericRefinements||{},this.tagRefinements=e.tagRefinements||[],this.hierarchicalFacetsRefinements=e.hierarchicalFacetsRefinements||{};var t=this;Object.keys(e).forEach(function(n){var i=je.PARAMETERS.indexOf(n)!==-1,s=e[n]!==void 0;!i&&s&&(t[n]=e[n])})}je.PARAMETERS=Object.keys(new je);je._parseNumbers=function(r){if(r instanceof je)return r;var e={},t=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(t.forEach(function(i){var s=r[i];if(typeof s=="string"){var o=parseFloat(s);e[i]=isNaN(o)?s:o}}),Array.isArray(r.insideBoundingBox)&&(e.insideBoundingBox=r.insideBoundingBox.map(function(i){return Array.isArray(i)?i.map(function(s){return parseFloat(s)}):i})),r.numericRefinements){var n={};Object.keys(r.numericRefinements).forEach(function(i){var s=r.numericRefinements[i]||{};n[i]={},Object.keys(s).forEach(function(o){var c=s[o],a=c.map(function(l){return Array.isArray(l)?l.map(function(u){return typeof u=="string"?parseFloat(u):u}):typeof l=="string"?parseFloat(l):l});n[i][o]=a})}),e.numericRefinements=n}return Eo({},r,e)};je.make=function(e){var t=new je(e),n=e.hierarchicalFacets||[];return n.forEach(function(i){if(i.rootPath){var s=t.getHierarchicalRefinement(i.name);s.length>0&&s[0].indexOf(i.rootPath)!==0&&(t=t.clearRefinements(i.name)),s=t.getHierarchicalRefinement(i.name),s.length===0&&(t=t.toggleHierarchicalFacetRefinement(i.name,i.rootPath))}}),t};je.validate=function(r,e){var t=e||{};return r.tagFilters&&t.tagRefinements&&t.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):r.tagRefinements.length>0&&t.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):r.numericFilters&&t.numericRefinements&&Io(t.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):Io(r.numericRefinements)&&t.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null};je.prototype={constructor:je,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:ge.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:ge.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:ge.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:ge.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return this.tagFilters===void 0&&this.tagRefinements.length===0?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(r,e,t){var n=Co(t);if(this.isNumericRefined(r,e,n))return this;var i=Eo({},this.numericRefinements);return i[r]=Eo({},i[r]),i[r][e]?(i[r][e]=i[r][e].slice(),i[r][e].push(n)):i[r][e]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(r){return this.isConjunctiveFacet(r)?this.facetsRefinements[r]||[]:[]},getDisjunctiveRefinements:function(r){return this.isDisjunctiveFacet(r)?this.disjunctiveFacetsRefinements[r]||[]:[]},getHierarchicalRefinement:function(r){return this.hierarchicalFacetsRefinements[r]||[]},getExcludeRefinements:function(r){return this.isConjunctiveFacet(r)?this.facetsExcludes[r]||[]:[]},removeNumericRefinement:function(r,e,t){var n=t;return n!==void 0?this.isNumericRefined(r,e,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,s){return s===r&&i.op===e&&Ao(i.val,Co(n))})}):this:e!==void 0?this.isNumericRefined(r,e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,s){return s===r&&i.op===e})}):this:this.isNumericRefined(r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,s){return s===r})}):this},getNumericRefinements:function(r){return this.numericRefinements[r]||{}},getNumericRefinement:function(r,e){return this.numericRefinements[r]&&this.numericRefinements[r][e]},_clearNumericRefinements:function(e){if(e===void 0)return Io(this.numericRefinements)?{}:this.numericRefinements;if(typeof e=="string")return su(this.numericRefinements,[e]);if(typeof e=="function"){var t=!1,n=this.numericRefinements,i=Object.keys(n).reduce(function(s,o){var c=n[o],a={};return c=c||{}
1,Object.keys(c).forEach(function(l){var u=c[l]||[],h=[];u.forEach(function(m){var b=e({val:m,op:l},o,"numeric");b||h.push(m)}),h.length!==u.length&&(t=!0),a[l]=h}),s[o]=a,s},{});return t?i:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return ge.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:ge.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return ge.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:ge.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return ge.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:ge.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter(function(t){return t!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(t){return t!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(t){return t.name!==e})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return ge.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:ge.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return ge.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:ge.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return ge.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:ge.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter(function(n){return n!==e})};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:ge.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:ge.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:ge.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={},s=this.hierarchicalFacetsRefinements[e]!==void 0&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||this.hierarchicalFacetsRefinements[e][0].indexOf(t+n)===0);return s?t.indexOf(n)===-1?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(n))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:Ro({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(r,e){if(this.isHierarchicalFacetRefined(r))throw new Error(r+" is already refined.");if(!this.isHierarchicalFacet(r))throw new Error(r+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var t={};return t[r]=[e],this.setQueryParameters({hierarchicalFacetsRefinements:Ro({},t,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(r){if(!this.isHierarchicalFacetRefined(r))return this;var e={};return e[r]=[],this.setQueryParameters({hierarchicalFacetsRefinements:Ro({},e,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(r){return this.disjunctiveFacets.indexOf(r)>-1},isHierarchicalFacet:function(r){return this.getHierarchicalFacetByName(r)!==void 0},isConjunctiveFacet:function(r){return this.facets.indexOf(r)>-1},isFacetRefined:function(e,t){return this.isConjunctiveFacet(e)?ge.isRefined(this.facetsRefinements,e,t):!1},isExcludeRefined:function(e,t){return this.isConjunctiveFacet(e)?ge.isRefined(this.facetsExcludes,e,t):!1},isDisjunctiveFacetRefined:function(e,t){return this.isDisjunctiveFacet(e)?ge.isRefined(this.disjunctiveFacetsRefinements,e,t):!1},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var n=this.getHierarchicalRefinement(e);return t?n.indexOf(t)!==-1:n.length>0},isNumericRefined:function(e,t,n){if(n===void 0&&t===void 0)return Boolean(this.numericRefinements[e]);var i=this.numericRefinements[e]&&this.numericRefinements[e][t]!==void 0;if(n===void 0||!i)return i;var s=Co(n),o=Qg(this.numericRefinements[e][t],s)!==void 0;return i&&o},isTagRefined:function(e){return this.tagRefinements.indexOf(e)!==-1},getRefinedDisjunctiveFacets:function(){var e=this,t=iu(Object.keys(this.numericRefinements).filter(function(n){return Object.keys(e.numericRefinements[n]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(n){return e.disjunctiveFacetsRefinements[n].length>0}).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return iu(this.hierarchicalFacets.map(function(t){return t.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(t){return e.hierarchicalFacetsRefinements[t].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var r=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(e){return r.indexOf(e)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},n=this;
1return Object.keys(this).forEach(function(i){var s=n[i];e.indexOf(i)===-1&&s!==void 0&&(t[i]=s)}),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var n={};return n[e]=t,this.setQueryParameters(n)},setQueryParameters:function(e){if(!e)return this;var t=je.validate(this,e);if(t)throw t;var n=this,i=je._parseNumbers(e),s=Object.keys(this).reduce(function(c,a){return c[a]=n[a],c},{}),o=Object.keys(i).reduce(function(c,a){var l=c[a]!==void 0,u=i[a]!==void 0;return l&&!u?su(c,[a]):(u&&(c[a]=i[a]),c)},s);return new this.constructor(o)},resetPage:function(){return this.page===void 0?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(r){return r.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(r){return r.separator||" > "},_getHierarchicalRootPath:function(r){return r.rootPath||null},_getHierarchicalShowParentLevel:function(r){return typeof r.showParentLevel=="boolean"?r.showParentLevel:!0},getHierarchicalFacetByName:function(r){return ou(this.hierarchicalFacets,function(e){return e.name===r})},getHierarchicalFacetBreadcrumb:function(r){if(!this.isHierarchicalFacet(r))return[];var e=this.getHierarchicalRefinement(r)[0];if(!e)return[];var t=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(r)),n=e.split(t);return n.map(function(i){return i.trim()})},toString:function(){return JSON.stringify(this,null,2)}};au.exports=je});var lu=ce((Z0,cu)=>{"use strict";cu.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}});var fu=ce((eC,uu)=>{"use strict";uu.exports=function(e,t){if(!Array.isArray(e))return-1;for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}});var Po=ce((tC,hu)=>{"use strict";var Kg=jr();hu.exports=function(e,t){var n=(t||[]).map(function(i){return i.split(":")});return e.reduce(function(s,o){var c=o.split(":"),a=Kg(n,function(l){return l[0]===c[0]});return c.length>1||!a?(s[0].push(c[0]),s[1].push(c[1]),s):(s[0].push(a[0]),s[1].push(a[1]),s)},[[],[]])}});var Oo=ce((rC,du)=>{"use strict";function Xg(r,e){if(r!==e){var t=r!==void 0,n=r===null,i=e!==void 0,s=e===null;if(!s&&r>e||n&&i||!t)return 1;if(!n&&r<e||s&&t||!i)return-1}return 0}function Jg(r,e,t){if(!Array.isArray(r))return[];Array.isArray(t)||(t=[]);var n=r.map(function(i,s){return{criteria:e.map(function(o){return i[o]}),index:s,value:i}});return n.sort(function(s,o){for(var c=-1;++c<s.criteria.length;){var a=Xg(s.criteria[c],o.criteria[c]);if(a)return c>=t.length?a:t[c]==="desc"?-a:a}return s.index-o.index}),n.map(function(i){return i.value})}du.exports=Jg});var gu=ce((nC,mu)=>{"use strict";mu.exports=iy;var pu=Qn(),Zg=jr(),ey=Po(),ty=Oo(),ry=pu.escapeFacetValue,ny=pu.unescapeFacetValue;function iy(r){return function(t,n){var i=r.hierarchicalFacets[n],s=r.hierarchicalFacetsRefinements[i.name]&&r.hierarchicalFacetsRefinements[i.name][0]||"",o=r._getHierarchicalFacetSeparator(i),c=r._getHierarchicalRootPath(i),a=r._getHierarchicalShowParentLevel(i),l=ey(r._getHierarchicalFacetSortBy(i)),u=t.every(function(b){return b.exhaustive}),h=sy(l,o,c,a,s),m=t;return c&&(m=t.slice(c.split(o).length)),m.reduce(h,{name:r.hierarchicalFacets[n].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:u,data:null})}}function sy(r,e,t,n,i){return function(o,c,a){var l=o;if(a>0){var u=0;for(l=o;u<a;){var h=l&&Array.isArray(l.data)?l.data:[];l=Zg(h,function(b){return b.isRefined}),u++}}if(l){var m=Object.keys(c.data).map(function(b){return[b,c.data[b]]}).filter(function(b){var g=b[0];return oy(g,l.path||t,i,e,t,n)});l.data=ty(m.map(function(b){var g=b[0],S=b[1];return ay(S,g,e,ny(i),c.exhaustive)}),r[0],r[1])}return o}}function oy(r,e,t,n,i,s){return i&&(r.indexOf(i)!==0||i===r)?!1:!i&&r.indexOf(n)===-1||i&&r.split(n).length-i.split(n).length===1||r.indexOf(n)===-1&&t.indexOf(n)===-1||t.indexOf(r)===0||r.indexOf(e+n)===0&&(s||r.indexOf(t)===0)}function ay(r,e,t,n,i){var s=e.split(t);return{name:s[s.length-1].trim(),path:e,escapedValue:ry(e),count:r,isRefined:n===e||n.indexOf(e+t)===0,exhaustive:i,data:null}}});var ko=ce((iC,Eu)=>{"use strict";var _o=lu(),ei=Zn(),Su=Qn(),Ze=jr(),Hr=fu(),cy=Po(),ly=$r(),wu=Oo(),yu=Su.escapeFacetValue,xu=Su.unescapeFacetValue,uy=gu();function vu(r){var e={};return r.forEach(function(t,n){e[t]=n}),e}function Mo(r,e,t){e&&e[t]&&(r.stats=e[t])}function fy(r,e){return Ze(r,function(n){var i=n.attributes||[];return i.indexOf(e)>-1})}function Tt(r,e,t){var n=e[0];this._rawResults=e;var i=this;
1Object.keys(n).forEach(function(u){i[u]=n[u]}),Object.keys(t||{}).forEach(function(u){i[u]=t[u]}),this.processingTimeMS=e.reduce(function(u,h){return h.processingTimeMS===void 0?u:u+h.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=r.hierarchicalFacets.map(function(){return[]}),this.facets=[];var s=r.getRefinedDisjunctiveFacets(),o=vu(r.facets),c=vu(r.disjunctiveFacets),a=1,l=n.facets||{};Object.keys(l).forEach(function(u){var h=l[u],m=fy(r.hierarchicalFacets,u);if(m){var b=m.attributes.indexOf(u),g=Hr(r.hierarchicalFacets,function(A){return A.name===m.name});i.hierarchicalFacets[g][b]={attribute:u,data:h,exhaustive:n.exhaustiveFacetsCount}}else{var S=r.disjunctiveFacets.indexOf(u)!==-1,v=r.facets.indexOf(u)!==-1,I;S&&(I=c[u],i.disjunctiveFacets[I]={name:u,data:h,exhaustive:n.exhaustiveFacetsCount},Mo(i.disjunctiveFacets[I],n.facets_stats,u)),v&&(I=o[u],i.facets[I]={name:u,data:h,exhaustive:n.exhaustiveFacetsCount},Mo(i.facets[I],n.facets_stats,u))}}),this.hierarchicalFacets=_o(this.hierarchicalFacets),s.forEach(function(u){var h=e[a],m=h&&h.facets?h.facets:{},b=r.getHierarchicalFacetByName(u);Object.keys(m).forEach(function(g){var S=m[g],v;if(b){v=Hr(r.hierarchicalFacets,function(x){return x.name===b.name});var I=Hr(i.hierarchicalFacets[v],function(x){return x.attribute===g});if(I===-1)return;i.hierarchicalFacets[v][I].data=ly({},i.hierarchicalFacets[v][I].data,S)}else{v=c[g];var A=n.facets&&n.facets[g]||{};i.disjunctiveFacets[v]={name:g,data:ei({},S,A),exhaustive:h.exhaustiveFacetsCount},Mo(i.disjunctiveFacets[v],h.facets_stats,g),r.disjunctiveFacetsRefinements[g]&&r.disjunctiveFacetsRefinements[g].forEach(function(x){!i.disjunctiveFacets[v].data[x]&&r.disjunctiveFacetsRefinements[g].indexOf(xu(x))>-1&&(i.disjunctiveFacets[v].data[x]=0)})}}),a++}),r.getRefinedHierarchicalFacets().forEach(function(u){var h=r.getHierarchicalFacetByName(u),m=r._getHierarchicalFacetSeparator(h),b=r.getHierarchicalRefinement(u);b.length===0||b[0].split(m).length<2||e.slice(a).forEach(function(g){var S=g&&g.facets?g.facets:{};Object.keys(S).forEach(function(v){var I=S[v],A=Hr(r.hierarchicalFacets,function(N){return N.name===h.name}),x=Hr(i.hierarchicalFacets[A],function(N){return N.attribute===v});if(x!==-1){var F={};if(b.length>0){var M=b[0].split(m)[0];F[M]=i.hierarchicalFacets[A][x].data[M]}i.hierarchicalFacets[A][x].data=ei(F,I,i.hierarchicalFacets[A][x].data)}}),a++})}),Object.keys(r.facetsExcludes).forEach(function(u){var h=r.facetsExcludes[u],m=o[u];i.facets[m]={name:u,data:l[u],exhaustive:n.exhaustiveFacetsCount},h.forEach(function(b){i.facets[m]=i.facets[m]||{name:u},i.facets[m].data=i.facets[m].data||{},i.facets[m].data[b]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(uy(r)),this.facets=_o(this.facets),this.disjunctiveFacets=_o(this.disjunctiveFacets),this._state=r}Tt.prototype.getFacetByName=function(r){function e(t){return t.name===r}return Ze(this.facets,e)||Ze(this.disjunctiveFacets,e)||Ze(this.hierarchicalFacets,e)};function hy(r,e){function t(u){return u.name===e}if(r._state.isConjunctiveFacet(e)){var n=Ze(r.facets,t);return n?Object.keys(n.data).map(function(u){var h=yu(u);return{name:u,escapedValue:h,count:n.data[u],isRefined:r._state.isFacetRefined(e,h),isExcluded:r._state.isExcludeRefined(e,u)}}):[]}else if(r._state.isDisjunctiveFacet(e)){var i=Ze(r.disjunctiveFacets,t);return i?Object.keys(i.data).map(function(u){var h=yu(u);return{name:u,escapedValue:h,count:i.data[u],isRefined:r._state.isDisjunctiveFacetRefined(e,h)}}):[]}else if(r._state.isHierarchicalFacet(e)){var s=Ze(r.hierarchicalFacets,t);if(!s)return s;var o=r._state.getHierarchicalFacetByName(e),c=r._state._getHierarchicalFacetSeparator(o),a=xu(r._state.getHierarchicalRefinement(e)[0]||"");a.indexOf(o.rootPath)===0&&(a=a.replace(o.rootPath+c,""));var l=a.split(c);return l.unshift(e),Ru(s,l,0),s}}function Ru(r,e,t){r.isRefined=r.name===e[t],r.data&&r.data.forEach(function(n){Ru(n,e,t+1)})}function Cu(r,e,t,n){if(n=n||0,Array.isArray(e))return r(e,t[n]);if(!e.data||e.data.length===0)return e;var i=e.data.map(function(c){return Cu(r,c,t,n+1)}),s=r(i,t[n]),o=ei({data:s},e);return o}
1Tt.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function dy(r,e){return e.sort(r)}function py(r,e){var t=[],n=[],i=e.order||[],s=i.reduce(function(a,l,u){return a[l]=u,a},{});r.forEach(function(a){var l=a.path||a.name;s[l]!==void 0?t[s[l]]=a:n.push(a)}),t=t.filter(function(a){return a});var o=e.sortRemainingBy,c;return o==="hidden"?t:(o==="alpha"?c=[["path","name"],["asc","asc"]]:c=[["count"],["desc"]],t.concat(wu(n,c[0],c[1])))}function my(r,e){return r.renderingContent&&r.renderingContent.facetOrdering&&r.renderingContent.facetOrdering.values&&r.renderingContent.facetOrdering.values[e]}Tt.prototype.getFacetValues=function(r,e){var t=hy(this,r);if(t){var n=ei({},e,{sortBy:Tt.DEFAULT_SORT,facetOrdering:!(e&&e.sortBy)}),i=this,s;if(Array.isArray(t))s=[r];else{var o=i._state.getHierarchicalFacetByName(t.name);s=o.attributes}return Cu(function(c,a){if(n.facetOrdering){var l=my(i,a);if(l)return py(c,l)}if(Array.isArray(n.sortBy)){var u=cy(n.sortBy,Tt.DEFAULT_SORT);return wu(c,u[0],u[1])}else if(typeof n.sortBy=="function")return dy(n.sortBy,c);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},t,s)}};Tt.prototype.getFacetStats=function(r){if(this._state.isConjunctiveFacet(r))return bu(this.facets,r);if(this._state.isDisjunctiveFacet(r))return bu(this.disjunctiveFacets,r)};function bu(r,e){var t=Ze(r,function(n){return n.name===e});return t&&t.stats}Tt.prototype.getRefinements=function(){var r=this._state,e=this,t=[];return Object.keys(r.facetsRefinements).forEach(function(n){r.facetsRefinements[n].forEac
1h(function(i){t.push(Fo(r,"facet",n,i,e.facets))})}),Object.keys(r.facetsExcludes).forEach(function(n){r.facetsExcludes[n].forEach(function(i){t.push(Fo(r,"exclude",n,i,e.facets))})}),Object.keys(r.disjunctiveFacetsRefinements).forEach(function(n){r.disjunctiveFacetsRefinements[n].forEach(function(i){t.push(Fo(r,"disjunctive",n,i,e.disjunctiveFacets))})}),Object.keys(r.hierarchicalFacetsRefinements).forEach(function(n){r.hierarchicalFacetsRefinements[n].forEach(function(i){t.push(gy(r,n,i,e.hierarchicalFacets))})}),Object.keys(r.numericRefinements).forEach(function(n){var i=r.numericRefinements[n];Object.keys(i).forEach(function(s){i[s].forEach(function(o){t.push({type:"numeric",attributeName:n,name:o,numericValue:o,operator:s})})})}),r.tagRefinements.forEach(function(n){t.push({type:"tag",attributeName:"_tags",name:n})}),t};function Fo(r,e,t,n,i){var s=Ze(i,function(a){return a.name===t}),o=s&&s.data&&s.data[n]?s.data[n]:0,c=s&&s.exhaustive||!1;return{type:e,attributeName:t,name:n,count:o,exhaustive:c}}function gy(r,e,t,n){var i=r.getHierarchicalFacetByName(e),s=r._getHierarchicalFacetSeparator(i),o=t.split(s),c=Ze(n,function(m){return m.name===e}),a=o.reduce(function(m,b){var g=m&&Ze(m.data,function(S){return S.name===b});return g!==void 0?g:m},c),l=a&&a.count||0,u=a&&a.exhaustive||!1,h=a&&a.path||"";return{type:"hierarchical",attributeName:e,name:h,count:l,exhaustive:u}}Eu.exports=Tt});var No=ce((sC,Iu)=>{"use strict";Iu.exports="3.15.0"});var _u=ce((oC,Ou)=>{"use strict";var yy=vo(),vy=Hl(),by=Qn().escapeFacetValue,Sy=bo(),wy=$r(),xy=Xn(),Ry=Jn(),er=Gl(),Lo=To(),Do=ko(),Au=No();function k(r,e,t){typeof r.addAlgoliaAgent=="function"&&r.addAlgoliaAgent("JS Helper ("+Au+")"),this.setClient(r);var n=t||{};n.index=e,this.state=Lo.make(n),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}Sy(k,yy);k.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this};k.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this};k.prototype.getQuery=function(){var r=this.state;return er._getHitsSearchParams(r)};k.prototype.searchOnce=function(r,e){var t=r?this.state.setQueryParameters(r):this.state,n=er._getQueries(t.index,t),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:t}),e){this.client.search(n).then(function(s){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),e(null,new Do(t,s.results),t)}).catch(function(s){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),e(s,null,t)});return}return this.client.search(n).then(function(s){return i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),{content:new Do(t,s.results),state:t,_originalResponse:s}},function(s){throw i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),s})};k.prototype.findAnswers=function(r){console.warn("[algoliasearch-helper] answers is no longer supported");var e=this.state,t=this.derivedHelpers[0];if(!t)return Promise.resolve([]);var n=t.getModifiedState(e),i=wy({attributesForPrediction:r.attributesForPrediction,nbHits:r.nbHits},{params:Ry(er._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if(typeof this.client.initIndex!="function")throw new Error(s);var o=this.client.initIndex(n.index);if(typeof o.findAnswers!="function")throw new Error(s);return o.findAnswers(n.query,r.queryLanguages,i)};k.prototype.searchForFacetValues=function(r,e,t,n){var i=typeof this.client.searchForFacetValues=="function",s=typeof this.client.initIndex=="function";if(!i&&!s&&typeof this.client.search!="function")throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var o=this.state.setQueryParameters(n||{}),c=o.isDisjunctiveFacet(r),a=er.getSearchForFacetQuery(r,e,t,o);this._currentNbQueries++;var l=this,u;return i?u=this.client.searchForFacetValues([{indexName:o.index,params:a}]):s?u=this.client.initIndex(o.index).searchForFacetValues(a):(delete a.facetName,u=this.client.search([{type:"facet",facet:r,indexName:o.index,params:a}]).then(function(m){return m.results[0]}
1)),this.emit("searchForFacetValues",{state:o,facet:r,query:e}),u.then(function(m){return l._currentNbQueries--,l._currentNbQueries===0&&l.emit("searchQueueEmpty"),m=Array.isArray(m)?m[0]:m,m.facetHits.forEach(function(b){b.escapedValue=by(b.value),b.isRefined=c?o.isDisjunctiveFacetRefined(r,b.escapedValue):o.isFacetRefined(r,b.escapedValue)}),m},function(h){throw l._currentNbQueries--,l._currentNbQueries===0&&l.emit("searchQueueEmpty"),h})};k.prototype.setQuery=function(r){return this._change({state:this.state.resetPage().setQuery(r),isPageReset:!0}),this};k.prototype.clearRefinements=function(r){return this._change({state:this.state.resetPage().clearRefinements(r),isPageReset:!0}),this};k.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this};k.prototype.addDisjunctiveFacetRefinement=function(r,e){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(r,e),isPageReset:!0}),this};k.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)};k.prototype.addHierarchicalFacetRefinement=function(r,e){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(r,e),isPageReset:!0}),this};k.prototype.addNumericRefinement=function(r,e,t){return this._change({state:this.state.resetPage().addNumericRefinement(r,e,t),isPageReset:!0}),this};k.prototype.addFacetRefinement=function(r,e){return this._change({state:this.state.resetPage().addFacetRefinement(r,e),isPageReset:!0}),this};k.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)};k.prototype.addFacetExclusion=function(r,e){return this._change({state:this.state.resetPage().addExcludeRefinement(r,e),isPageReset:!0}),this};k.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)};k.prototype.addTag=function(r){return this._change({state:this.state.resetPage().addTagRefinement(r),isPageReset:!0}),this};k.prototype.removeNumericRefinement=function(r,e,t){return this._change({state:this.state.resetPage().removeNumericRefinement(r,e,t),isPageReset:!0}),this};k.prototype.removeDisjunctiveFacetRefinement=function(r,e){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(r,e),isPageReset:!0}),this};k.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)};k.prototype.removeHierarchicalFacetRefinement=function(r){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(r),isPageReset:!0}),this};k.prototype.removeFacetRefinement=function(r,e){return this._change({state:this.state.resetPage().removeFacetRefinement(r,e),isPageReset:!0}),this};k.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)};k.prototype.removeFacetExclusion=function(r,e){return this._change({state:this.state.resetPage().removeExcludeRefinement(r,e),isPageReset:!0}),this};k.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)};k.prototype.removeTag=function(r){return this._change({state:this.state.resetPage().removeTagRefinement(r),isPageReset:!0}),this};k.prototype.toggleFacetExclusion=function(r,e){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(r,e),isPageReset:!0}),this};k.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)};k.prototype.toggleRefinement=function(r,e){return this.toggleFacetRefinement(r,e)};k.prototype.toggleFacetRefinement=function(r,e){return this._change({state:this.state.resetPage().toggleFacetRefinement(r,e),isPageReset:!0}),this};k.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)};k.prototype.toggleTag=function(r){return this._change({state:this.state.resetPage().toggleTagRefinement(r),isPageReset:!0}),this};k.prototype.nextPage=function(){var r=this.state.page||0;return this.setPage(r+1)};k.prototype.previousPage=function(){var r=this.state.page||0;return this.setPage(r-1)};function Tu(r){if(r<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(r),isPageReset:!1}),this}k.prototype.setCurrentPage=Tu;k.prototype.setPage=Tu;k.prototype.setIndex=function(r){return this._change({state:this.state.resetPage().setIndex(r),isPageReset:!0}),this};k.prototype.setQueryParameter=function(r,e){return this._change({state:this.state.resetPage().setQueryParameter(r,e),isPageReset:!0}),this};k.prototype.setState=function(r){return this._change({state:Lo.make(r),isPageReset:!1}),this};k.prototype.overrideStateWithoutTriggeringChangeEvent=function(r){return this.state=new Lo(r),this};
1k.prototype.hasRefinements=function(r){return xy(this.state.getNumericRefinements(r))?!0:this.state.isConjunctiveFacet(r)?this.state.isFacetRefined(r):this.state.isDisjunctiveFacet(r)?this.state.isDisjunctiveFacetRefined(r):this.state.isHierarchicalFacet(r)?this.state.isHierarchicalFacetRefined(r):!1};k.prototype.isExcluded=function(r,e){return this.state.isExcludeRefined(r,e)};k.prototype.isDisjunctiveRefined=function(r,e){return this.state.isDisjunctiveFacetRefined(r,e)};k.prototype.hasTag=function(r){return this.state.isTagRefined(r)};k.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)};k.prototype.getIndex=function(){return this.state.index};function Pu(){return this.state.page}k.prototype.getCurrentPage=Pu;k.prototype.getPage=Pu;k.prototype.getTags=function(){return this.state.tagRefinements};k.prototype.getRefinements=function(r){var e=[];if(this.state.isConjunctiveFacet(r)){var t=this.state.getConjunctiveRefinements(r);t.forEach(function(o){e.push({value:o,type:"conjunctive"})});var n=this.state.getExcludeRefinements(r);n.forEach(function(o){e.push({value:o,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(r)){var i=this.state.getDisjunctiveRefinements(r);i.forEach(function(o){e.push({value:o,type:"disjunctive"})})}var s=this.state.getNumericRefinements(r);return Object.keys(s).forEach(function(o){var c=s[o];e.push({value:c,operator:o,type:"numeric"})}),e};k.prototype.getNumericRefinement=function(r,e){return this.state.getNumericRefinement(r,e)};k.prototype.getHierarchicalFacetBreadcrumb=function(r){return this.state.getHierarchicalFacetBreadcrumb(r)};k.prototype._search=function(r){var e=this.state,t=[],n=[];r.onlyWithDerivedHelpers||(n=er._getQueries(e.index,e),t.push({state:e,queriesCount:n.length,helper:this}),this.emit("search",{state:e,results:this.lastResults}));var i=this.derivedHelpers.map(function(c){var a=c.getModifiedState(e),l=a.index?er._getQueries(a.index,a):[];return t.push({state:a,queriesCount:l.length,helper:c}),c.emit("search",{state:a,results:c.lastResults}),l}),s=Array.prototype.concat.apply(n,i),o=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,t,o));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,t,o)).catch(this._dispatchAlgoliaError.bind(this,o))}catch(c){this.emit("error",{error:c})}};k.prototype._dispatchAlgoliaResponse=function(r,e,t){if(!(e<this._lastQueryIdReceived)){this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this._currentNbQueries===0&&this.emit("searchQueueEmpty");var n=t.results.slice();r.forEach(function(i){var s=i.state,o=i.queriesCount,c=i.helper,a=n.splice(0,o);if(!s.index){c.emit("result",{results:null,state:s});return}c.lastResults=new Do(s,a),c.emit("result",{results:c.lastResults,state:s})})}};k.prototype._dispatchAlgoliaError=function(r,e){r<this._lastQueryIdReceived||(this._currentNbQueries-=r-this._lastQueryIdReceived,this._lastQueryIdReceived=r,this.emit("error",{error:e}),this._currentNbQueries===0&&this.emit("searchQueueEmpty"))};k.prototype.containsRefinement=function(r,e,t,n){return r||e.length!==0||t.length!==0||n.length!==0};k.prototype._hasDisjunctiveRefinements=function(r){return this.state.disjunctiveRefinements[r]&&this.state.disjunctiveRefinements[r].length>0};k.prototype._change=function(r){var e=r.state,t=r.isPageReset;e!==this.state&&(this.state=e,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:t}))};k.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this};k.prototype.setClient=function(r){return this.client===r?this:(typeof r.addAlgoliaAgent=="function"&&r.addAlgoliaAgent("JS Helper ("+Au+")"),this.client=r,this)};k.prototype.getClient=function(){return this.client};k.prototype.derive=function(r){var e=new vy(this,r);return this.derivedHelpers.push(e),e};k.prototype.detachDerivedHelper=function(r){var e=this.derivedHelpers.indexOf(r);if(e===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)};k.prototype.hasPendingRequests=function(){return this._currentNbQueries>0};Ou.exports=k});var ku=ce((aC,Fu)=>{"use strict";var Mu=_u(),Cy=To(),Ey=ko();function Ur(r,e,t){return new Mu(r,e,t)}Ur.version=No();Ur.AlgoliaSearchHelper=Mu;Ur.SearchParameters=Cy;Ur.SearchResults=Ey;Fu.exports=Ur});var Xf=ce((FT,Kf)=>{"use strict";function ma(r){return typeof r=="function"}var Fe=console.error.bind(console);function an(r,e,t){var n=!!r[e]&&r.propertyIsEnumerable(e);Object.defineProperty(r,e,{configurable:!0,enumerable:n,writable:!0,value:t})}function cn(r){r&&r.logger&&(ma(r.logger)?Fe=r.logger:Fe("new logger isn't a function, not replacing"))}function Yf(r,e,t){if(!r||!r[e]){Fe("no original function "+e+" to wrap");return}if(!t){Fe("no wrapper function"),Fe(new Error().stack);return}if(!ma(r[e])||!ma(t)){Fe("original object and wrapper must be functions");return}var n=r[e],i=t(n,e);return an(i,"__original",n),an(i,"__unwrap",function(){r[e]===i&&an(r,e,n)}),an(i,"__wrapped",!0),an(r,e,i),i}function _v(r,e,t){if(r)Array.isArray(r)||(r=[r]);else{Fe("must provide one or more modules to patch"),Fe(new Error().stack);return}if(!(e&&Array.isArray(e))){Fe("must provide one or more functions to wrap on modules");return}r.forEach(function(n){e.forEach(function(i){Yf(n,i,t)})})}function Qf(r,e){if(!r||!r[e]){Fe("no function to unwrap."),Fe(new Error().stack);return}if(!r[e].__unwrap)Fe("no original to unwrap to -- has "+e+" already been unwrapped?");else return r[e].__unwrap()}function Mv(r,e){if(r)Array.isArray(r)||(r=[r]);else{Fe("must provide one or more modules to patch"),Fe(new Error().stack);return}if(!(e&&Array.isArray(e))){Fe("must provide one or more functions to unwrap on modules");return}r.forEach(function(t){e.forEach(function(n){Qf(t,n)})})}cn.wrap=Yf;cn.massWrap=_v;cn.unwrap=Qf;cn.massUnwrap=Mv;Kf.exports=cn});var Eg={burton:"https://media.burton.co.uk/i/burton/",wallis:"https://media.wallis.co.uk/i/wallis/",oasis:"https://media.oasisfashion.com/i/oasisfashion/","dorothy-perkins":"https://media.dorothyperkins.com/i/dorothyperkins/",coast:"https://media.coastfashion.com/i/coastfashion/",coastie:"https://media.coastfashion.com/i/coastfashion/",debenhams:"https://media.debenhams.com/i/debenhams/",warehouse:"https://media.warehousefashion.com/i/warehouse/",misspap:"https://media.misspap.com/i/misspap/"};function El(r,e){if(!e)return r;let t=Eg[e];return t?r.replace("https://media.boohoo.com/i/boohoo/",t):r}var Ig=r=>({id:r,url:r,fetchMetaData:!1}),Il=r=>({desktop:Ig(r)}),Al=(r,e)=>r?Il(El(typeof r=="string"?r:r.url,e)):void 0,Tl=(r,e)=>r!=null&&r.length?r.map(t=>Il(El(typeof t=="string"?t:t.url,e))):void 0;var Dr={savePrefix:"Save ",saveUpToPrefix:"Up to ",saveUpToSuffix:"% off",saveSuffix:"%"},Pl={savePrefix:"\xC9conomisez ",saveUpToPrefix:"Jusqu'\xE0 ",saveUpToSuffix:"% de r\xE9duction",saveSuffix:"%"},Ol={savePrefix:"Bespaar ",saveUpToPrefix:"Tot ",saveUpToSuffix:"% KORTING",saveSuffix:"%"},_l={savePrefix:"Spara ",saveUpToPrefix:"Fram till ",saveUpToSuffix:"% RABATT",saveSuffix:"%"},Ml=(r,e)=>{if(e){let t=Ag(r,e);return`(${Dr.savePrefix}${t}${Dr.saveSuffix})`}},Ag=(r,e)=>r&&e?Math.round(100-r.centAmount/e.centAmount*100):0;var kl=(r,e,t,n)=>{let{hits:i=[]}=r;return i.map(s=>Pg(s,e,t,n))},Tg=(r,e,t)=>
1{let n=fo[Ht(t)],i={centAmount:e.price?e.price*100:0,currencyCode:n},s=e.wasPrice&&e.wasPrice>e.price?{centAmount:e.wasPrice*100,currencyCode:n}:void 0,o=Ml(i,s);return{price:ho(r,i),wasPrice:s?ho(r,s):void 0,percentageSaving:o?o.replace(/[()]/g,""):void 0}},Vn=(r,e,t)=>t.map(n=>bl(r,e,n)).join(" - "),Fl=(r,e)=>{let t=uo(e),n=Dr;switch(t){case"fr-FR":n=Pl;break;case"nl-NL":n=Ol;break;case"sv-SE":n=_l;break;default:n=Dr;break}let[i,s]=r;return i==="exact"?`${n.savePrefix}${s}${n.saveSuffix}`:`${n.saveUpToPrefix}${s}${n.saveUpToSuffix}`},Pg=(r,e,t,n)=>{var l,u,h,m,b,g,S,v,I,A,x,F;let i=uo(n),{price:s,wasPrice:o,percentageSaving:c}=Tg(i,r,n),a=fo[Ht(n)];return{id:r.objectID,productKey:r.productKey,slug:r.slug||r.objectID,name:r.name,brand:r.collection,breadcrumbs:r.breadcrumbs||[],classification:r.classification,description:r.description||"",descriptionHtml:r.description||"",price:s,wasPrice:o,percentageSaving:c,detailsAndCareHtml:r.detailsAndCare,imagesResponsive:(l=Tl(r==null?void 0:r.images,n))!=null?l:[],colour:r.colour,size:r.size,gender:r.gender,department:r.department,styleTaxonomy:r.styleTaxonomy,categoryTaxonomy:r.categoryTaxonomy,occasion:r.occasion,categoryNames:r.categoryNames,categorySlugs:r.categorySlugs,colourVariants:(u=r.colourVariants)!=null&&u.length?r.colourVariants.map(M=>({...M,image:void 0,imageResponsive:Al(M.image,n)})):null,productType:r.productType,priceVariants:(h=r.priceVariants)!=null&&h.every(M=>M.price)&&(m=r.priceVariants)!=null&&m.length?r.priceVariants.map(M=>{let N={colour:M.colour,price:Vn(i,a,M.price)};return M.wasPrice&&(N.wasPrice=Vn(i,a,[M.wasPrice])),M.percentageSaved&&(N.percentageSaving=Fl(M.percentageSaved,n)),M.size&&(N.size=M.size.join(" - ")),N}):null,isPremier:gl.includes(r.productKey),hasGiftWithPurchase:r.giftWithPurchase,isOnStock:(b=r.isOnStock)!=null?b:!1,averageRating:(g=r.averageRating)!=null?g:0,ratingRange:(S=r.ratingRange)!=null?S:0,totalReviewCount:(v=r.totalReviewCount)!=null?v:0,ratingGroup:r.ratingGroup,variantSkus:(I=r.variantSkus)!=null?I:[],page:t,pricesBySize:(A=r.pricesBySize)!=null&&A.every(M=>{var N;return(N=M.sizePrices)==null?void 0:N.every(G=>{var $;return($=G.price)==null?void 0:$.centamount})})&&(F=(x=r.pricesBySize)==null?void 0:x.map(M=>({colour:M.colour,sizePrices:M==null?void 0:M.sizePrices.map(N=>{let G={size:N.size,price:{centamount:Vn(i,a,[N.price.centamount])}};return N.price.wasprice&&(G.price.wasprice=Vn(i,a,[N.price.wasprice])),N.price.savingPercentage&&(G.price.savingPercentage=Fl(["exact",N.price.savingPercentage])),G})})))!=null?F:void 0,availableAt:r.availableAt}};var Og="enableGoogleSearch",_g="enableGoogleSearchOnly",Mg="enableGoogleBrowseOnly",Gn=r=>{let e=r!=null?r:[],t=e.includes(Og);return{searchLane:t||e.includes(_g),browseLane:t||e.includes(Mg)}},Fg=r=>r==="category",qn=(r,e)=>Fg(e)?r.browseLane:r.searchLane;var tl=gt(Un());var at=gt(Un()),mm=gt(Nl()),gm=gt(ku());var He={isNextDay:{key:"isNextDay",label:"Next Day Delivery"},source:{key:"source",label:"Delivery"},productKey:{key:"productKey",label:"Product Key"},sizes:{key:"sizes",label:"Size"},colourFacets:{key:"colourFacets",label:"Colour"},styleTaxonomy:{key:"styleTaxonomy",label:"Style"},categoryTaxonomy:{key:"categoryTaxonomy",label:"Category"},gender:{key:"gender",label:"Gender"},brand:{key:"brand",label:"Brands"},department:{key:"department",label:"Department"},fabrication:{key:"fabrication",label:"Fabrication"},occasion:{key:"occasion",label:"Occasion"},discountBands:{key:"discountBands",label:"Discount"},neckline:{key:"neckline",label:"Neckline"},sleeveLength:{key:"sleeveLength",label:"Sleeve Length"},collection:{key:"collection",label:"Brands"},classification:{key:"classification",label:"Body Fit"},design:{key:"design",label:"Pattern"},detail:{key:"detail",label:"Detail"},priceBands:{key:"priceBands",label:"Price"},priceRange:{key:"priceRange",label:"PriceRange"},publishedRange:{key:"publishedRange",label:"Published Range"},ratingGroup:{key:"ratingGroup",label:"Rating"},discountRange:{key:"discountRange",label:"DiscountRange"},"aiattributes.Band_Size":{key:"aiattributes.Band_Size",label:"Band Size"},"aiattributes.Home_Setting":{key:"aiattributes.Home_Setting",label:"Room"},"aiattributes.Arm_Style":{key:"aiattributes.Arm_Style",label:"Arm Style"},"aiattributes.Back_Exposure":{key:"aiattributes.Back_Exposure",label:"Back Exposure"},"aiattributes.Back_Style":{key:"aiattributes.Back_Style",label:"Back Style"},"aiattributes.Band":{key:"aiattributes.Band",label:"Band Type"},"aiattributes.Band_Thickness":{key:"aiattributes.Band_Thickness",label:"Band Thickness"},"aiattributes.Base_Type":{key:"aiattributes.Base_Type",label:"Base"},"aiattributes.Benefit":{key:"aiattributes.Benefit",label:"Benefit"},"aiattributes.Bra_Cup_Details":{key:"aiattributes.Bra_Cup_Details",label:"Bra Cup"},"aiattributes.Care":{key:"aiattributes.Care",label:"Care"},"aiattributes.Colour_Temperature":{key:"aiattributes.Colour_Temperature",label:"Light Colour"},"aiattributes.Comfort_Type":{key:"aiattributes.Comfort_Type",label:"Mattress Firmness"},"aiattributes.Concern":{key:"aiattributes.Concern",label:"Skincare Concern"},"aiattributes.Coverage":{key:"aiattributes.Coverage",label:"Coverage"},"aiattributes.Cuff_Details":{key:"aiattributes.Cuff_Details",label:"Cuff"},"aiattributes.Denim_Wash":{key:"aiattributes.Denim_Wash",label:"Wash"},"aiattributes.Density":{key:"aiattributes.Density",label:"Pillow Firmness"},"aiattributes.Embellishment":{key:"aiattributes.Embellishment",label:"Embellishment"},"aiattributes.Fabric_Content":{key:"aiattributes.Fabric_Content",label:"Fabric Type"},"aiattributes.Fabric_Functionality":{key:"aiattributes.Fabric_Functionality",label:"Functionality"},"aiattributes.Fill_Material":{key:"aiattributes.Fill_Material",label:"Filling Type"},"aiattributes.Finish":{key:"aiattributes.Finish",label:"Finish"},"aiattributes.Fit":{key:"aiattributes.Fit",label:"Product Fit"},"aiattributes.Flower_Species":{key:"aiattributes.Flower_Species",label:"Flower Species"},"aiattributes.Fragrance_Family":{key:"aiattributes.Fragrance_Family",label:"Fragrance"},"aiattributes.Frame_Style":{key:"aiattributes.Frame_Style",label:"Frame Type"},"aiattributes.Hair_Type":{key:"aiattributes.Hair_Type",label:"Hair Type"},"aiattributes.Hanging_Style":{key:"aiattributes.Hanging_Style",label:"Header"},"aiattributes.Heat_Compatibility":{key:"aiattributes.Heat_Compatibility",label:"Heat Compatibility"},"aiattributes.Heel_Height":{key:"aiattributes.Heel_Height",label:"Heel Height"},"aiattributes.Heel_Style":{key:"aiattributes.Heel_Style",label:"Heel Style"},"aiattributes.Home_Style":{key:"aiattributes.Home_Style",label:"Room Style"},"aiattributes.Impact_Level":{key:"aiattributes.Impact_Level",label:"Support Level"},"aiattributes.Ingredient_Preference":{key:"aiattributes.Ingredient_Preference",label:"Formulation"},"aiattributes.Ingredients":{key:"aiattributes.Ingredients",label:"Key Ingredients"},"aiattributes.Key_Notes":{key:"aiattributes.Key_Notes",label:"Key Note"},"aiattributes.Lash_Band":{key:"aiattributes.Lash_Band",label:"Lash Type"},"aiattributes.Lash_Length":{key:"aiattributes.Lash_Length",label:"Lash Length"},"aiattributes.Lash_Material":{key:"aiattributes.Lash_Material",label:"Lash Material"},"aiattributes.Lash_Shape":{key:"aiattributes.Lash_Shape",label:"Lash Shape"},"aiattributes.Length":{key:"aiattributes.Length",label:"Length"},"aiattributes.Lens_Specialty":{key:"aiattributes.Lens_Specialty",label:"Lens Specialty"},"aiattributes.Lens_Style":{key:"aiattributes.Lens_Style",label:"Lens Type"},"aiattributes.Light_Filtration":{key:"aiattributes.Light_Filtration",label:"Light Filtration"},"aiattributes.Lining_Type":{key:"aiattributes.Lining_Type",label:"Lining"},"aiattributes.Material":{key:"aiattributes.Material",label:"Material"},"aiattributes.Mattress_Type":{key:"aiattributes.Mattress_Type",label:"Mattress Type"},"aiattributes.Metal":{key:"aiattributes.Metal",label:"Metal"},"aiattributes.Neck_Style":{key:"aiattributes.Neck_Style",label:"Neckline"},"aiattributes.Pattern":{key:"aiattributes.Pattern",label:"Pattern"},"aiattributes.Plant_Species":{key:"aiattributes.Plant_Species",label:"Plant Type"},"aiattributes.Print":{key:"aiattributes.Print",label:"Pattern"},"aiattributes.Seat_Style":{key:"aiattributes.Seat_Style",label:"Chair Design"},"aiattributes.Seating_Capacity":{key:"aiattributes.Seating_Capacity",label:"Seating Capacity"},"aiattributes.Shade_Shape":{key:"aiattributes.Shade_Shape",label:"Shade"},"aiattributes.Skin_Tone":{key:"aiattributes.Skin_Tone",label:"Skin Tone"},"aiattributes.Skin_Type":{key:"aiattributes.Skin_Type",label:"Skin Type"},"aiattributes.Sleeve_Length":{key:"aiattributes.Sleeve_Length",label:"Sleeve Length"},"aiattributes.Special_Occasion":{key:"aiattributes.Special_Occasion",label:"Occasion"},"aiattributes.Strap_Details":{key:"aiattributes.Strap_Details",label:"Strap Details"}
1,"aiattributes.Waist_Rise":{key:"aiattributes.Waist_Rise",label:"Waist Rise"},"aiattributes.Wax_Type":{key:"aiattributes.Wax_Type",label:"Wax Type"},"aiattributes.Wick_Count":{key:"aiattributes.Wick_Count",label:"Wick Count"},"aiattributes.Window_Blinds_Style":{key:"aiattributes.Window_Blinds_Style",label:"Blinds Type"},"aiattributes.Functionality":{key:"aiattributes.Functionality",label:"Product Features"},"aiattributes.Closure":{key:"aiattributes.Closure",label:"Closure"}},Nu=[...Object.values(He).map(r=>r.key)],$o=Object.values(He).reduce((r,e)=>(r[e.key]=e.label,r),{}),Du=[...new Set([...Object.keys(He),...Object.values(He).map(r=>r.key)])];var Lu=";";var $u=r=>{if(!r||r.length===0)return[r!=null?r:[]];let e=Math.min(5,Math.max(1,...r.flatMap(t=>t.values.map(n=>n.split(Lu).length))));return Array.from({length:e},(t,n)=>r.map(i=>({...i,values:i.values.map(s=>{let o=s.split(Lu),c=n===e-1?o.length-1:Math.min(n,o.length-1);return o[c]})})))},ju=(r,e)=>{let t=r.findIndex(n=>n>=e);return t===-1?r.length-1:t};function Br(r){return Br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Br(r)}function Wr(r){if(r===null||r===!0||r===!1)return NaN;var e=Number(r);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function et(r,e){if(e.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+e.length+" present")}function zr(r){et(1,arguments);var e=Object.prototype.toString.call(r);return r instanceof Date||Br(r)==="object"&&e==="[object Date]"?new Date(r.getTime()):typeof r=="number"||e==="[object Number]"?new Date(r):((typeof r=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function jo(r,e){et(2,arguments);var t=zr(r),n=Wr(e);return isNaN(n)?new Date(NaN):(n&&t.setDate(t.getDate()+n),t)}function ti(r){var e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),r.getTime()-e.getTime()}function ri(r){et(1,arguments);var e=zr(r);return e.setHours(0,0,0,0),e}var Iy=864e5;function ni(r,e){et(2,arguments);var t=ri(r),n=ri(e),i=t.getTime()-ti(t),s=n.getTime()-ti(n);return Math.round((i-s)/Iy)}function Vr(r,e){et(2,arguments);var t=Wr(e);return jo(r,-t)}var ii=r=>!isNaN(Number(r))&&!isNaN(parseFloat(r)),Ho={priceRange:"price",discountRange:"discountPercentage",publishedRange:"publishedAtTimestamp"},Uo=(r,e)=>r.filter(t=>Nu.includes(t.key)).reduce((t,n)=>{var s,o,c,a;if(n.key==="priceRange"||n.key==="discountRange"){let l=Ho[n.key],[u,h]=(o=(s=n.values[0])==null?void 0:s.split("-"))!=null?o:[];if(!ii(u)||!(ii(h)||(h==null?void 0:h.toLowerCase())==="max"))return t;let m=t.addNumericRefinement(l,">=",parseFloat(u));return h.toLowerCase()==="max"?m:m.addNumericRefinement(l,"<=",parseFloat(h))}if(n.key==="publishedRange"){let[l,u]=(a=(c=n.values[0])==null?void 0:c.split("-"))!=null?a:[];if(!ii(u)||!ii(l))return t;let h=new Date,m=Vr(h,parseInt(u)).getTime(),b=Vr(h,parseInt(l)).getTime();return t.addNumericRefinement("publishedAtTimestamp",">=",m).addNumericRefinement("publishedAtTimestamp","<=",b)}let i=Object.keys(He).filter(l=>He[l].key===n.key)[0];return n.values.reduce((l,u)=>l.addDisjunctiveFacetRefinement(n.key,u).addDisjunctiveFacetRefinement(i,u),t)},e),Hu=(r,e)=>{e.setState(Uo(r,e.state))};var Bo="Delivered Before Christmas",Py=(r,e,t)=>{let n=(l,u)=>e.name===He.sizes.label?0:l.term.localeCompare(u.term),i=(l,u)=>u.count-l.count,s=e.name==="priceBands"||e.name==="discountBands",o=Object.keys(r).filter(l=>
1!l.includes("MIRAKL")).map(l=>({term:l,label:l==="BOOHOOGROUP"?"Before Christmas":l,count:r[l]})),c=[],a=[...o];if(t!=null&&t.order&&(c=t.order.map(l=>o.find(u=>u.term===l||u.label===l)).filter(l=>l),a=o.filter(l=>{var u,h;return!((u=t==null?void 0:t.order)!=null&&u.includes(l.term))||!((h=t==null?void 0:t.order)!=null&&h.includes(l.label))})),s)return c.concat(a);switch(t==null?void 0:t.sortRemainingBy){case"hidden":return c;case"count":return c.concat(a.sort(i));default:return c.concat(a.sort(n))}},Uu=r=>r.replace(/^attributes\./,"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim().replace(/\b\w/g,e=>e.toUpperCase()),Oy=(r,e)=>(r[e.name]||[]).map(t=>{var n,i;return{key:((n=He[e.name])==null?void 0:n.key)||e.name,label:((i=He[e.name])==null?void 0:i.label)||Uu(e.name),facetType:"terms",dataType:"text",term:t,termLabel:t.includes("BOOHOOGROUP")?Bo:t}}),Bu=(r,e)=>{var s,o,c;let t=e.disjunctiveFacetsRefinements,n=(s=r.renderingContent)==null?void 0:s.facetOrdering,i=r.disjunctiveFacets.map(a=>{var u,h,m,b;let l=a.data;return{key:((u=He[a.name])==null?void 0:u.key)||a.name,label:((h=He[a.name])==null?void 0:h.label)||Uu(a.name),facetType:"terms",dataType:"text",terms:Py(l,a,(m=n==null?void 0:n.values)==null?void 0:m[a.name]),selectedCount:(b=t[a.name])==null?void 0:b.length,selected:Oy(t,a)}});return(c=(o=n==null?void 0:n.facets)==null?void 0:o.order)!=null&&c.length?n.facets.order.map(l=>i.find(u=>{var h;return u.key===(((h=He[l])==null?void 0:h.key)||l)})).filter(l=>l!==void 0):i};var _y=(r,e)=>{let{offset:t}=r,n=t||0;return e.map((i,s)=>({cursor:Buffer.from(String(n+s)).toString("base64"),node:i}))},My=(r,e)=>{let{nbHits:t,offset:n,length:i,hits:s,nbPages:o,page:c}=r,a=c+1<o,l=e.length?e[e.length-1].cursor:"",u=n+(s||[]).length<t;return{hasNextPage:a,endCursor:l,hasNext:u,hasPrevious:c!==0,length:i||0,offset:n||0}},Wu=r=>(e,t,n)=>{let i=_y(e,r(e,t,n)),s=My(e,i);return{edges:i,pageInfo:s}};var zu=r=>{let e=r.disjunctiveFacetsRefinements,t=Object.keys(e).filter(i=>!!$o[i]).flatMap(i=>e[i].map(s=>({key:i,label:$o[i],facetType:"terms",dataType:"text",term:s,termLabel:s==="BOOHOOGROUP"?Bo:s}))),n=r.numericRefinements;if(n&&n.price){let i=Object.values(n.price).join("-"),s=`Price Range: ${Object.values(n.price).map(o=>`\xA3${o}`).join("-")}`;t.push({key:"priceRange",label:"Price",facetType:"range",dataType:"number",term:i,termLabel:s})}if(n&&n.discountPercentage){let i=Object.values(n.discountPercentage).join("-"),s=`Discount Range: ${Object.values(n.discountPercentage).map(o=>`${o}%`).join("-")}`;t.push({key:"discountRange",label:"Discount",facetType:"range",dataType:"number",term:i,termLabel:s})}if(n&&n.publishedAtTimestamp){let i=Date.now(),o=Object.values(n.publishedAtTimestamp).map(l=>{let u=Array.isArray(l)?l[0]:l;return ni(i,u)}).reverse(),c=o.join("-"),a=`Published Range: ${o.map(l=>`${l} days`).join("-")}`;t.push({key:"publishedRange",label:"Published Range",facetType:"range",dataType:"number",term:c,termLabel:a})}return t};var si=(r,e,t,n)=>{var o,c,a;let i=Wu((l,u,h)=>kl(l,u,h,n))((o=r==null?void 0:r.content)!=null?o:{},e,t),s=((a=(c=r==null?void 0:r.content)==null?void 0:c.userData)!=null?a:[]).filter(l=>!!l.redirect);return s.length>0&&(i.redirect=s[0].redirect,i.redirectMobile=s[0].redirectMobile),i.sortOptions=Fy(),r?(i.total=r.content.nbHits,i.facets=Bu(r.content,r.state),i.selectedFacets=zu(r.state),i.queryId=r.content.queryID,i.abTestVariantID=r.content.abTestVariantID,i.abTestID=r.content.abTestID,i):{...i,total:0,facets:[],selectedFacets:[]}},Fy=()=>[{key:"price-asc",label:"Price: Low-High",default:!1},{key:"price-desc",label:"Price: High-Low",default:!1},{key:"relevance",label:"Sort: Relevance",default:!0},{key:"best-sellers",label:"Sort: Best Sellers",default:!1},{key:"newness",label:"Sort: Newness",default:!1},{key:"rating-desc",label:"Sort: Top Rated",default:!1}];var xe=class{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){let t=new xe({...e,headers:{...e.headers}});return t.query&&(t.query=ky(t.query)),t}static isInstance(e){if(!e)return!1;let t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query=="object"&&typeof t.headers=="object"}clone(){return xe.clone(this)}};function ky(r){return Object.keys(r).reduce((e,t)=>
1{let n=r[t];return{...e,[t]:Array.isArray(n)?[...n]:n}},{})}var qe=class{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let t=e;return typeof t.statusCode=="number"&&typeof t.headers=="object"}};var Gr=r=>{if(typeof r=="function")return r;let e=Promise.resolve(r);return()=>e};var tt=r=>encodeURIComponent(r).replace(/[!'()*]/g,Ny),Ny=r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;function Pt(r){let e=[];for(let t of Object.keys(r).sort()){let n=r[t];if(t=tt(t),Array.isArray(n))for(let i=0,s=n.length;i<s;i++)e.push(`${t}=${tt(n[i])}`);else{let i=t;(n||typeof n=="string")&&(i+=`=${tt(n)}`),e.push(i)}}return e.join("&")}var oi="[aws-rum-web:unknown.unknown]",E=class{static configure(e){E.debugEnabled=e}static getCallerInfo(){var e,t;try{let n=new Error().stack;if(!n)return oi;let i=n.split(` 2`);if(i.length<4)return oi;let s=i[3];if(!s)return oi;let o=s.match(/at (?:(.+?)\s+\()?/);if(o&&o.length>=2){let c=o[1].trim(),a=c.split(".");if(a.length>=2){let l=(e=a[a.length-2])!==null&&e!==void 0?e:"unknown",u=(t=a[a.length-1])!==null&&t!==void 0?t:"unknown";return`[aws-rum-web:${l}.${u}]`}return`[aws-rum-web:${c}]`}}catch{}return oi}static info(e,...t){if(!E.debugEnabled)return;let n=this.getCallerInfo();console.info(n,e,...t)}static debug(e,...t){if(!E.debugEnabled)return;let n=this.getCallerInfo();console.debug(n,e,...t)}static warn(e,...t){if(!E.debugEnabled)return;let n=this.getCallerInfo();console.warn(n,e,...t)}static error(e,...t){if(!E.debugEnabled)return;let n=this.getCallerInfo();console.error(n,e,...t)}};E.debugEnabled=!1;var Vu=2048,Gu=.2,Dy=()=>typeof CompressionStream<"u",Ly=async r=>{let e=new Blob([r]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},qu=async r=>{let e=r.length;if(E.debug(`compressIfBeneficial called, payload size: ${e}B`),!Dy())return E.debug("CompressionStream not supported, skipping compression"),{body:r,compressed:!1};if(e<Vu)return E.debug(`Payload size ${e}B below threshold ${Vu}B, skipping compression`),{body:r,compressed:!1};let t=await Ly(r),n=1-t.length/e;return n>=Gu?(E.debug(`Compressed ${e}B -> ${t.length}B (${(n*100).toFixed(1)}% reduction)`),{body:t,compressed:!0}):(E.debug(`Compression ratio ${(n*100).toFixed(1)}% below threshold ${Gu*100}%, skipping`),{body:r,compressed:!1})};var $y="POST",jy="application/json",Hy="text/plain;charset=UTF-8",Uy=64e3,ai=class{constructor(e,t){this.sendFetch=async n=>{var i,s;let o=JSON.stringify(Yu(n)),c=(s=(i=this.config.compressionStrategy)===null||i===void 0?void 0:i.enabled)!==null&&s!==void 0?s:!1,{body:a,compressed:l}=c?await qu(o):{body:o,compressed:!1},u=await this.getHttpRequestOptions(n,a,jy,l),h=new xe(u);return this.signing&&(h=await this.signing.sign(h)),this.config.fetchRequestHandler.handle(h)},this.sendBeacon=async n=>{let i=JSON.stringify(Yu(n));if(i.length>Uy)throw new Error("Payload too large for sendBeacon");let s=await this.getHttpRequestOptions(n,i,Hy,!1),o=new xe(s);return this.signing&&(o=await this.signing.presign(o)),this.config.beaconRequestHandler.handle(o)},this.getHttpRequestOptions=async(n,i,s,o)=>{let c=this.config.endpoint.pathname.replace(/\/$/,""),a=Object.assign({"content-type":s,host:this.config.endpoint.host},this.config.headers);o&&(a["Content-Encoding"]="gzip");let l={method:$y,protocol:this.config.endpoint.protocol,port:Number(this.config.endpoint.port)||void 0,headers:a,hostname:this.config.endpoint.hostname,path:`${c}/appmonitors/${n.AppMonitorDetails.id}`,body:i};return this.signing?Object.assign(Object.assign({},l),{headers:Object.assign(Object.assign({},l.headers),{"X-Amz-Content-Sha256":await this.signing.hashAndEncode(i)})}):l},this.config=e,this.signing=t}},Yu=r=>{let e=[];r.RumEvents.forEach(n=>e.push(By(n)));let t={BatchId:r.BatchId,AppMonitorDetails:r.AppMonitorDetails,UserDetails:r.UserDetails,RumEvents:e};return r.SessionMetadata&&(t=Object.assign(Object.assign({},t),{SessionMetadata:r.SessionMetadata})),r.Alias&&(t=Object.assign(Object.assign({},t),{Alias:r.Alias})),t},By=r=>({id:r.id,timestamp:Math.round(r.timestamp.getTime()/1e3),type:r.type,metadata:r.metadata,details:r.details});var ci=class{handle(e){let t=this.sendBeacon(e);return new Promise((n,i)=>{t?n({response:new qe({statusCode:200})}):i()})}updateHttpClientConfig(e,t){}httpHandlerConfigs(){return{}}sendBeacon(e){let t=e.path;if(e.query){let s=Pt(e.query);s&&(t+=`?${s}`)}let{port:n}=e,i=`${e.protocol}//${e.hostname}${n?`:${n}`:""}${t}`;return navigator.sendBeacon(i,e.body)}};var Qu=(r=0)=>new Promise((e,t)=>
2{r&&setTimeout(()=>{let n=new Error(`Request did not complete within ${r} ms`);n.name="TimeoutError",t(n)},r)});var li=class{constructor({fetchFunction:e,requestTimeout:t}={}){this.requestTimeout=t,this.fetchFunction=e}destroy(){}handle(e,{abortSignal:t}={}){let n=this.requestTimeout;if(t?.aborted){let m=new Error("Request aborted");return m.name="AbortError",Promise.reject(m)}let i=e.path;if(e.query){let m=Pt(e.query);m&&(i+=`?${m}`)}let{port:s,method:o}=e,c=`${e.protocol}//${e.hostname}${s?`:${s}`:""}${i}`,l={body:o==="GET"||o==="HEAD"?void 0:e.body,headers:new Headers(e.headers),method:o};typeof AbortController<"u"&&(l.signal=t);let u=new Request(c,l),h=[this.fetchFunction.apply(window,[u]).then(m=>{let b=m.headers,g={};for(let v of b.entries())g[v[0]]=v[1];return m.body!==void 0?{response:new qe({headers:g,statusCode:m.status,body:m.body})}:m.blob().then(v=>({response:new qe({headers:g,statusCode:m.status,body:v})}))}),Qu(n)];return t&&h.push(new Promise((m,b)=>{t.onabort=()=>{let g=new Error("Request aborted");g.name="AbortError",b(g)}})),Promise.race(h)}updateHttpClientConfig(e,t){}httpHandlerConfigs(){return{}}};var ui=r=>{if(crypto)return crypto.getRandomValues(r);if(msCrypto)return msCrypto.getRandomValues(r);throw new Error("No crypto library found.")};var Ku=[];for(let r=0;r<256;r++)Ku[r]=(r+256).toString(16).substr(1);var qr="X-Amzn-Trace-Id",Yr="traceparent",Wy=2,zy=32,Vy=16,Gy=4,fi=(r,e)=>Array.isArray(e)?e.some(t=>t.test(r)):e,hi={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},Xu=r=>200<=r&&r<300,di=r=>Math.floor(r/100)===4,tr=r=>Math.floor(r/100)===5,rr=r=>r===429,pi=(r,e)=>{let t=e.urlsToInclude.some(i=>i.test(r)),n=e.urlsToExclude.some(i=>i.test(r));return t&&!n},Ot=()=>Date.now()/1e3,Ju=(r,e,t)=>{let n={request:{}};return n.request.method=e?.method?e.method:"GET",n.request.traced=t,n.request.url=Qr(r),n},mi=(r,e,t,n)=>{let i={version:"1.0.0",name:r,origin:"AWS::RUM::AppMonitor",id:rf(),start_time:e,trace_id:t?Qy():Yy(),end_time:void 0,subsegments:[],in_progress:!1};return n&&(i.http=n),i},gi=(r,e,t)=>{let n={id:rf(),name:r,start_time:e,end_time:void 0,in_progress:!1,namespace:r.endsWith(".amazonaws.com")?"aws":"remote"};return t&&(n.http=t),n},yi=r=>{try{return r.hostname?r.hostname:r.url?new URL(r.url).hostname:new URL(r.toString()).hostname}catch{return window.location.hostname}},Zu=(r,e,t,n)=>{r.headers||(r.headers={}),n?r.headers[Yr]=bi(e,t):r.headers[qr]=vi(e,t)},ef=(r,e,t,n)=>{n?r.set(Yr,bi(e,t)):r.set(qr,vi(e,t))},vi=(r,e)=>"Root="+r+";Parent="+e+";Sampled=1",bi=(r,e)=>"00-"+r+"-"+e+"-01",qy=r=>r?.length===Gy&&r[0].length===Wy&&r[1].length===zy&&r[2].length===Vy&&(r[3]==="00"||r[3]==="01"),tf=(r,e)=>{var t,n;let i={};if(r)if(e){let s=(t=r.get(Yr))===null||t===void 0?void 0:t.split("-");s&&qy(s)&&(i.traceId=s[1],i.segmentId=s[2])}else{let s=(n=r.get(qr))===null||n===void 0?void 0:n.split(";");s?.length===3&&(i.traceId=s[0].split("Root=")[1],i.segmentId=s[1].split("Parent=")[1])}return i},Qr=r=>r.url?r.url:r.toString(),Yy=()=>`1-${Ky()}-${Xy()}`,Qy=()=>{let r=new Uint8Array(16);return ui(r),`${Wo(r)}`},rf=()=>{let r=new Uint8Array(8);return ui(r),Wo(r)},Ky=()=>Math.floor(Date.now()/1e3).toString(16),Xy=()=>{let r=new Uint8Array(12);return ui(r),Wo(r)},Wo=r=>{let e="";for(let t=0;t<r.length;t++)e+=Ku[r[t]];return e};var Si=class{constructor(e,t,n=i=>2e3*Math.pow(2,i-1)){this.handler=e,this.retries=t,this.backoff=n}async handle(e){let t=this.retries;for(;;)try{let n=await this.handler.handle(e);if(Xu(n.response.statusCode))return n;throw n.response.statusCode}catch(n){if(typeof n=="number"&&!rr(n)&&!tr(n))throw new Error(`${n}`);if(t<=0)throw n;t--,await this.sleep(this.backoff(this.retries-t))}}async sleep(e){return new Promise(t=>setTimeout(t,e))}updateHttpClientConfig(e,t){}httpHandlerConfigs(){return{}}};var ft="cwr_c",nr="cwr_i",Bt="cwr_s",Wt="cwr_u";var zo="arw-module";var nf="CWR: Cannot dispatch; no AWS credentials.",Kr=class{constructor(e,t,n,i,s){this.disableCodes=["403","404"],this.shouldPurgeCredentials=!0,this.dispatchFetch=async()=>
2{if(this.doRequest()){let o=this.createRequest();return E.info(`Dispatching ${o.RumEvents.length} events via fetch`),this.rum.sendFetch(o).catch(this.handleReject)}},this.dispatchBeacon=async()=>{if(this.doRequest()){let o=this.createRequest();return E.info(`Dispatching ${o.RumEvents.length} events via beacon`),this.rum.sendBeacon(o).catch(()=>this.rum.sendFetch(o))}},this.dispatchFetchFailSilent=async()=>this.dispatchFetch().catch(o=>{E.error("Dispatch fetch failed silently:",o)}),this.dispatchBeaconFailSilent=async()=>this.dispatchBeacon().catch(o=>{E.error("Dispatch beacon failed silently:",o)}),this.flushSync=()=>{if(document.visibilityState==="hidden"&&this.doRequest(!0)){let o=this.rum.sendBeacon,c=this.rum.sendFetch;this.config.useBeacon||([o,c]=[c,o]);let a=this.createRequest(!0);E.debug(`Flushing ${a.RumEvents.length} events on page hide`),o(a).catch(()=>c(a)).catch(l=>{E.error("Page hide flush failed:",l)})}},this.handleReject=o=>{throw o instanceof Error&&(o.message==="403"&&this.config.signing&&this.shouldPurgeCredentials?(this.shouldPurgeCredentials=!1,this.forceRebuildClient()):this.disableCodes.includes(o.message)&&(E.error("Dispatch failed with status code:",o.message),this.disable())),o},this.defaultClientBuilder=(o,c,a,l)=>{let u=a&&this.signingConfigFactory?this.signingConfigFactory(a,c):void 0;return new ai({fetchRequestHandler:new Si(new li({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new ci,endpoint:o,region:c,credentials:a,headers:this.headers,compressionStrategy:l},u)},this.applicationId=e,this.region=t,this.endpoint=n,this.eventCache=i,this.enabled=!0,this.buildClient=s.clientBuilder||this.defaultClientBuilder,this.config=s,this.headers=s.headers,this.startDispatchTimer(),s.signing?this.rum={sendFetch:()=>Promise.reject(new Error(nf)),sendBeacon:()=>Promise.reject(new Error(nf))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${ft}_${e}`:ft,this.identityStorageKey=this.config.cookieAttributes.unique?`${nr}_${e}`:nr}enable(){this.enabled=!0,this.startDispatchTimer()}disable(){this.stopDispatchTimer(),this.enabled=!1,E.warn("Dispatch disabled")}setAwsCredentials(e){this.credentialProvider=e,this.rum=this.buildClient(this.endpoint,this.region,e,this.config.compressionStrategy),typeof e=="function"&&e()}setCognitoCredentialProviderFactory(e){this.cognitoCredentialProviderFactory=e}setSigningConfigFactory(e){this.signingConfigFactory=e}setCognitoCredentials(e,t){this.identityPoolId=e,this.guestRoleArn=t,this.cognitoCredentialProviderFactory&&this.setAwsCredentials(this.cognitoCredentialProviderFactory(this.config,this.applicationId,e,t))}startDispatchTimer(){document.addEventListener("visibilitychange",this.flushSync),document.addEventListener("pagehide",this.flushSync),!(this.config.dispatchInterval<=0||this.dispatchTimerId)&&(this.dispatchTimerId=window.setInterval(this.dispatchFetchFailSilent,this.config.dispatchInterval))}stopDispatchTimer(){document.removeEventListener("visibilitychange",this.flushSync),document.removeEventListener("pagehide",this.flushSync),this.dispatchTimerId&&(window.clearInterval(this.dispatchTimerId),this.dispatchTimerId=void 0)}doRequest(e=!1){return this.enabled?e&&this.eventCache.hasCandidates()?!0:this.eventCache.hasEvents():!1}createRequest(e=!1){return{BatchId:At(),AppMonitorDetails:this.eventCache.getAppMonitorDetails(),UserDetails:this.eventCache.getUserDetails(),SessionMetadata:JSON.stringify(this.eventCache.getCommonMetadata()),RumEvents:this.eventCache.getEventBatch(e),Alias:this.config.alias}}forceRebuildClient(){E.warn("Removing credentials from local storage"),localStorage.removeItem(this.credentialStorageKey),this.identityPoolId?(E.info("Rebuilding client with fresh cognito credentials"),localStorage.removeItem(this.identityStorageKey),this.setCognitoCredentials(this.identityPoolId,this.guestRoleArn)):this.credentialProvider&&(E.info("Rebuilding client with most recently passed provider"),this.setAwsCredentials(this.credentialProvider))}};var sf={},Jy={};for(let r=0;r<256;r++){let e=r.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),sf[r]=e,Jy[e]=r}function of(r){let e="";for(let t=0;t<r.byteLength;t++)e+=sf[r[t]];return e}var wi=class{format(e){let t=[];for(let s of Object.keys(e)){let o=po(s);t.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[s]))}let n=new Uint8Array(t.reduce((s,o)=>s+o.byteLength,0)),i=0;for(let s of t)n.set(s,i),i+=s.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":let i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":let s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);let o=new Uint8Array(s.buffer);return o.set(e.value,3),o;case"string":let c=po(e.value),a=new DataView(new ArrayBuffer(3+c.byteLength));a.setUint8(0,7),a.setUint16(1,c.byteLength,!1);let l=new Uint8Array(a.buffer);return l.set(c,3),l;case"timestamp":let u=new Uint8Array(9);return u[0]=8,u.set(Xr.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Zy.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);let h=new Uint8Array(17);return h[0]=9,h.set(Sl(e.value.replace(/\-/g,"")),1),h}}},af;(function(r){r[r.boolTrue=0]="boolTrue",r[r.boolFalse=1]="boolFalse",r[r.byte=2]="byte",r[r.short=3]="short",r[r.integer=4]="integer",r[r.long=5]="long",r[r.byteArray=6]="byteArray",r[r.string=7]="string",r[r.timestamp=8]="timestamp",r[r.uuid=9]="uuid"})(af||(af={}));var Zy=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Xr=class{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);let t=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(e));n>-1&&i>0;n--,i/=256)t[n]=i;return e<0&&cf(t),new Xr(t)}valueOf(){let e=this.bytes.slice(0),t=e[0]&128;return t&&cf(e),parseInt(Xe(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function cf(r){for(let e=0;e<8;e++)r[e]^=255;for(let e=7;e>-1&&(r[e]++,r[e]===0);e--);}
2var lf="X-Amz-Algorithm",uf="X-Amz-Credential",Vo="X-Amz-Date",ff="X-Amz-SignedHeaders",hf="X-Amz-Expires",Go="X-Amz-Signature",qo="X-Amz-Security-Token";var Yo="authorization",Qo=Vo.toLowerCase(),ev="date",df=[Yo,Qo,ev],pf=Go.toLowerCase(),Jr="x-amz-content-sha256",mf=qo.toLowerCase();var gf={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},yf=/^proxy-/,vf=/^sec-/;var xi="AWS4-HMAC-SHA256";var bf="AWS4-HMAC-SHA256-PAYLOAD",Sf="UNSIGNED-PAYLOAD",wf=50,Ko="aws4_request",xf=60*60*24*7;var Rf=({query:r={}})=>{let e=[],t={};for(let n of Object.keys(r)){if(n.toLowerCase()===pf)continue;let i=tt(n);e.push(i);let s=r[n];typeof s=="string"?t[i]=`${i}=${tt(s)}`:Array.isArray(s)&&(t[i]=s.slice(0).reduce((o,c)=>o.concat([`${i}=${tt(c)}`]),[]).sort().join("&"))}return e.sort().map(n=>t[n]).filter(n=>n).join("&")};var Cf=r=>tv(r).toISOString().replace(/\.\d{3}Z$/,"Z"),tv=r=>typeof r=="number"?new Date(r*1e3):typeof r=="string"?Number(r)?new Date(Number(r)*1e3):new Date(r):r;var Ri=class{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:s,uriEscapePath:o=!0}){this.service=i,this.sha256=s,this.uriEscapePath=o,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=Gr(n),this.credentialProvider=Gr(t)}createCanonicalRequest(e,t,n){let i=Object.keys(t).sort();return`${e.method} 3${this.getCanonicalPath(e)} 4${Rf(e)} 5${i.map(s=>`${s}:${t[s]}`).join(` 6`)} 7 8${i.join(";")} 9${n}`}async createStringToSign(e,t,n,i){let s=new this.sha256;s.update(yt(n));let o=await s.digest();return`${i} 10${e} 11${t} 12${Xe(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let s of e.split("/"))s?.length!==0&&s!=="."&&(s===".."?t.pop():t.push(s));let n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return tt(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){let t=Cf(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}};var Ci={},Xo=[],Ei=(r,e,t)=>`${r}/${e}/${t}/${Ko}`,If=async(r,e,t,n,i)=>{let s=await Ef(r,e.secretAccessKey,e.accessKeyId),o=`${t}:${n}:${i}:${Xe(s)}:${e.sessionToken}`;if(o in Ci)return Ci[o];for(Xo.push(o);Xo.length>wf;)delete Ci[Xo.shift()];let c=`AWS4${e.secretAccessKey}`;for(let a of[t,n,i,Ko])c=await Ef(r,c,a);return Ci[o]=c};var Ef=(r,e,t)=>{let n=new r(e);return n.update(yt(t)),n.digest()};var Jo=({headers:r},e,t)=>{let n={};for(let i of Object.keys(r).sort()){if(r[i]==null)continue;let s=i.toLowerCase();(s in gf||e?.has(s)||yf.test(s)||vf.test(s))&&(!t||t&&!t.has(s))||(n[s]=r[i].trim().replace(/\s+/g," "))}return n};var Ii=async({headers:r,body:e},t)=>{for(let n of Object.keys(r))if(n.toLowerCase()===Jr)return r[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||wl(e)){let n=new t;return n.update(yt(e)),Xe(await n.digest())}return Sf};var Af=(r,e)=>{r=r.toLowerCase();for(let t of Object.keys(e))if(r===t.toLowerCase())return!0;return!1};var Tf=(r,e={})=>{let{headers:t,query:n={}}=xe.clone(r);for(let i of Object.keys(t)){let s=i.toLowerCase();(s.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(s)||e.hoistableHeaders?.has(s))&&(n[i]=t[i],delete t[i])}return{...r,headers:t,query:n}};var Zo=r=>{r=xe.clone(r);for(let e of Object.keys(r.headers))df.indexOf(e.toLowerCase())>-1&&delete r.headers[e];return r};var Ai=class extends Ri{headerFormatter=new wi;constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:s,uriEscapePath:o=!0}){super({applyChecksum:e,credentials:t,region:n,service:i,sha256:s,uriEscapePath:o})}async presign(e,t={}
12){let{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:s,unhoistableHeaders:o,signableHeaders:c,hoistableHeaders:a,signingRegion:l,signingService:u}=t,h=await this.credentialProvider();this.validateResolvedCredentials(h);let m=l??await this.regionProvider(),{longDate:b,shortDate:g}=this.formatDate(n);if(i>xf)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let S=Ei(g,m,u??this.service),v=Tf(Zo(e),{unhoistableHeaders:o,hoistableHeaders:a});h.sessionToken&&(v.query[qo]=h.sessionToken),v.query[lf]=xi,v.query[uf]=`${h.accessKeyId}/${S}`,v.query[Vo]=b,v.query[hf]=i.toString(10);let I=Jo(v,s,c);return v.query[ff]=this.getCanonicalHeaderList(I),v.query[Go]=await this.getSignature(b,S,this.getSigningKey(h,m,g,u),this.createCanonicalRequest(v,I,await Ii(e,this.sha256))),v}async sign(e,t){return typeof e=="string"?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:s,signingService:o,eventStreamCredentials:c}){let a=s??await this.regionProvider(),{shortDate:l,longDate:u}=this.formatDate(n),h=Ei(l,a,o??this.service),m=await Ii({headers:{},body:t},this.sha256),b=new this.sha256;b.update(e);let g=Xe(await b.digest()),S=[bf,u,h,i,g,m].join(` 13`);return this.signString(S,{signingDate:n,signingRegion:a,signingService:o,eventStreamCredentials:c})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:i,eventStreamCredentials:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:i,priorSignature:e.priorSignature,eventStreamCredentials:s}).then(c=>({message:e.message,signature:c}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:i,eventStreamCredentials:s}={}){let o=s??await this.credentialProvider();this.validateResolvedCredentials(o);let c=n??await this.regionProvider(),{shortDate:a}
13=this.formatDate(t),l=new this.sha256(await this.getSigningKey(o,c,a,i));return l.update(yt(e)),Xe(await l.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:s,signingService:o}={}){let c=await this.credentialProvider();this.validateResolvedCredentials(c);let a=s??await this.regionProvider(),l=Zo(e),{longDate:u,shortDate:h}=this.formatDate(t),m=Ei(h,a,o??this.service);l.headers[Qo]=u,c.sessionToken&&(l.headers[mf]=c.sessionToken);let b=await Ii(l,this.sha256);!Af(Jr,l.headers)&&this.applyChecksum&&(l.headers[Jr]=b);let g=Jo(l,i,n),S=await this.getSignature(u,m,this.getSigningKey(c,a,h,o),this.createCanonicalRequest(l,g,b));return l.headers[Yo]=`${xi} Credential=${c.accessKeyId}/${m}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${S}`,l}async getSignature(e,t,n,i){let s=await this.createStringToSign(e,t,i,xi),o=new this.sha256(await n);return o.update(yt(s)),Xe(await o.digest())}getSigningKey(e,t,n,i){return If(this.sha256,e,n,t,i||this.service)}};var Ue=64,Pf=32,Of=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),_f=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Mf=Math.pow(2,53)-1;var Zr=function(){function r(){this.state=Int32Array.from(_f),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>Mf)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Ue&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%Ue>=Ue-8){for(var i=this.bufferLength;i<Ue;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<Ue-8;i++)t.setUint8(i,0);t.setUint32(Ue-8,Math.floor(e/4294967296),!0),t.setUint32(Ue-4,e),this.hashBuffer(),this.finished=!0}for(var s=new Uint8Array(Pf),i=0;i<8;i++)s[i*4]=this.state[i]>>>24&255,s[i*4+1]=this.state[i]>>>16&255,s[i*4+2]=this.state[i]>>>8&255,s[i*4+3]=this.state[i]>>>0&255;return s},r.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,i=n[0],s=n[1],o=n[2],c=n[3],a=n[4],l=n[5],u=n[6],h=n[7],m=0;m<Ue;m++){if(m<16)this.temp[m]=(t[m*4]&255)<<24|(t[m*4+1]&255)<<16|(t[m*4+2]&255)<<8|t[m*4+3]&255;else{var b=this.temp[m-2],g=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10;b=this.temp[m-15];var S=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;this.temp[m]=(g+this.temp[m-7]|0)+(S+this.temp[m-16]|0)}var v=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&l^~a&u)|0)+(h+(Of[m]+this.temp[m]|0)|0)|0,I=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&o^s&o)|0;h=u,u=l,l=a,a=c+v|0,c=o,o=s,s=i,i=v+I|0}n[0]+=i,n[1]+=s,n[2]+=o,n[3]+=c,n[4]+=a,n[5]+=l,n[6]+=u,n[7]+=h},r}();var ea=function(){function r(e){this.secret=e,this.hash=new Zr,this.reset()}return r.prototype.update=function(e){if(!(Cl(e)||this.error))try{this.hash.update(mo(e))}catch(t){this.error=t}},r.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},r.prototype.digest=function(){return xl(this,void 0,void 0,function(){return Rl(this,function(e){return[2,this.digestSync()]})})},r.prototype.reset=function(){if(this.hash=new Zr,this.secret){this.outer=new Zr;var e=rv(this.secret),t=new Uint8Array(Ue);t.set(e);for(var n=0;n<Ue;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(var n=0;n<e.byteLength;n++)e[n]=0}},r}();function rv(r){var e=mo(r);if(e.byteLength>Ue){var t=new Zr;t.update(e),e=t.digest()}var n=new Uint8Array(Ue);return n.set(e),n}
13var nv="rum",iv={expiresIn:60},ta=(r,e)=>{let t=new Ai({applyChecksum:!0,credentials:r,region:e,service:nv,uriEscapePath:!0,sha256:ea});return{sign:async n=>await t.sign(n),presign:async n=>await t.presign(n,iv),hashAndEncode:async n=>{let i=new ea;return i.update(n),of(await i.digest()).toLowerCase()}}};function ra(r,e){return new Request(r,e)}function Ff(r=0){return new Promise((e,t)=>{r&&setTimeout(()=>{let n=new Error(`Request did not complete within ${r} ms`);n.name="TimeoutError",t(n)},r)})}var na={supported:void 0},_t=class{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new _t(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(t=>t||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),na.supported===void 0&&(na.supported=Boolean(typeof Request<"u"&&"keepalive"in ra("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let i=n??this.config.requestTimeout,s=this.config.keepAlive===!0,o=this.config.credentials;if(t?.aborted){let A=kf(t);return Promise.reject(A)}let c=e.path,a=Pt(e.query||{});a&&(c+=`?${a}`),e.fragment&&(c+=`#${e.fragment}`);let l="";if(e.username!=null||e.password!=null){let A=e.username??"",x=e.password??"";l=`${A}:${x}@`}let{port:u,method:h}=e,m=`${e.protocol}//${l}${e.hostname}${u?`:${u}`:""}${c}`,b=h==="GET"||h==="HEAD"?void 0:e.body,g={body:b,headers:new Headers(e.headers),method:h,credentials:o};this.config?.cache&&(g.cache=this.config.cache),b&&(g.duplex="half"),typeof AbortController<"u"&&(g.signal=t),na.supported&&(g.keepalive=s),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(e));let S=()=>{},v=ra(m,g),I=[fetch(v).then(A=>{let x=A.headers,F={};for(let N of x.entries())F[N[0]]=N[1];return A.body!=null?{response:new qe({headers:F,reason:A.statusText,statusCode:A.status,body:A.body})}:A.blob().then(N=>({response:new qe({headers:F,reason:A.statusText,statusCode:A.status,body:N})}))}),Ff(i)];return t&&I.push(new Promise((A,x)=>{let F=()=>{let M=kf(t);x(M)};if(typeof t.addEventListener=="function"){let M=t;M.addEventListener("abort",F,{once:!0}),S=()=>M.removeEventListener("abort",F)}else t.onabort=F})),Promise.race(I).finally(S)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}};function kf(r){let e=r&&typeof r=="object"&&"reason"in r?r.reason:void 0;if(e){if(e instanceof Error){let i=new Error("Request aborted");return i.name="AbortError",i.cause=e,i}let n=new Error(String(e));return n.name="AbortError",n}let t=new Error("Request aborted");return t.name="AbortError",t}var Ti=async r=>{let{value:e}=await r.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},Nf=async r=>{let{value:e}=await r.body.getReader().read();return String.fromCharCode.apply(null,e)};var sv="POST",ov="application/x-www-form-urlencoded",av="https:",cv="AssumeRoleWithWebIdentity",lv="2011-06-15",Pi=class{constructor(e){this.assumeRoleWithWebIdentity=async t=>{try{let n=Object.assign(Object.assign({},t),{Action:cv,Version:lv}),i=new URLSearchParams(Object.entries(n)).toString(),s=new xe({method:sv,headers:{"content-type":ov,host:this.hostname},protocol:av,hostname:this.hostname,body:i}),{response:o}=await this.fetchRequestHandler.handle(s),c=await Nf(o);return{accessKeyId:c.split("<AccessKeyId>")[1].split("</AccessKeyId>")[0],secretAccessKey:c.split("<SecretAccessKey>")[1].split("</SecretAccessKey>")[0],sessionToken:c.split("<SessionToken>")[1].split("</SessionToken>")[0],expiration:new Date(c.split("<Expiration>")[1].split("</Expiration>")[0])}}catch(n){throw new Error(`CWR: Failed to retrieve credentials from STS: ${n}`)}},this.hostname=`sts.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler}};var uv="POST",fv="application/x-amz-json-1.1",hv="https:",dv="AWSCognitoIdentityService.GetId",pv="AWSCognitoIdentityService.GetOpenIdToken",mv="AWSCognitoIdentityService.GetCredentialsForIdentity",Oi=class{constructor(e){var t;this.getId=async n=>{var i;let s=null;try{s=JSON.parse(localStorage.getItem(this.identityStorageKey))}catch(o){!((i=this.config)===null||i===void 0)&&i.debug&&E.error("Failed to parse stored identity:",o)}if(s&&s.IdentityId)return Promise.resolve(s);try{let o=JSON.stringify(n),c=this.getHttpRequest(dv,o),a=await Ti((await this.fetchRequestHandler.handle(c)).response);try{localStorage.setItem(this.identityStorageKey,JSON.stringify({IdentityId:a.IdentityId}))}catch(l){E.error("Failed to store identity:",l)}return a}catch(o){throw new Error(`CWR: Failed to retrieve Cognito identity: ${o}`)}},this.getOpenIdToken=async n=>{try{let i=JSON.stringify(n),s=this.getHttpRequest(pv,i),{response:o}=await this.fetchRequestHandler.handle(s);
13return this.validateOpenIdTokenResponse(await Ti(o))}catch(i){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve Cognito OpenId token: ${i}`)}},this.getCredentialsForIdentity=async n=>{try{let i=JSON.stringify({IdentityId:n}),s=this.getHttpRequest(mv,i),{response:o}=await this.fetchRequestHandler.handle(s),{AccessKeyId:c,Expiration:a,SecretKey:l,SessionToken:u}=this.validateCredenentialsResponse(await Ti(o));return{accessKeyId:c,secretAccessKey:l,sessionToken:u,expiration:new Date(a*1e3)}}catch(i){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve credentials for Cognito identity: ${i}`)}},this.validateOpenIdTokenResponse=n=>{if("IdentityId"in n&&"Token"in n)return n;throw n&&"__type"in n&&"message"in n?new Error(`${n.__type}: ${n.message}`):new Error("Unknown OpenIdToken response")},this.validateCredenentialsResponse=n=>{if("IdentityId"in n&&"Credentials"in n)return n.Credentials;throw n&&"__type"in n&&"message"in n?new Error(`${n.__type}: ${n.message}`):new Error("Unknown Credentials response")},this.getHttpRequest=(n,i)=>new xe({method:uv,headers:{"content-type":fv,"x-amz-target":n},protocol:hv,hostname:this.hostname,body:i}),this.hostname=`cognito-identity.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler,this.config=e.clientConfig,this.identityStorageKey=!((t=e.clientConfig)===null||t===void 0)&&t.cookieAttributes.unique?`${nr}_${e.applicationId}`:nr}};var ir=class{constructor(e,t){this.ChainAnonymousCredentialsProvider=async()=>this.AnonymousCredentialsProvider().catch(this.AnonymousStorageCredentialsProvider).catch(this.AnonymousCognitoCredentialsProvider),this.AnonymousCredentialsProvider=async()=>new Promise((i,s)=>{if(this.renewCredentials())return s();i(this.credentials)}),this.AnonymousStorageCredentialsProvider=async()=>new Promise((i,s)=>{let o;try{o=JSON.parse(localStorage.getItem(this.credentialStorageKey))}catch{return s()}if(this.credentials=Object.assign(Object.assign({},o),{expiration:new Date(o.expiration)}),this.renewCredentials())return s();i(this.credentials)});let n=e.identityPoolId.split(":")[0];this.config=e,this.cognitoIdentityClient=new Oi({fetchRequestHandler:new _t,region:n,clientConfig:e,applicationId:t}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${ft}_${t}`:ft}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;let e=new Date(this.credentials.expiration.getTime()-3e4);return new Date>e}};var en=class extends ir{constructor(e,t){super(e,t),this.AnonymousCognitoCredentialsProvider=async()=>{let i=1;for(;;)try{let s=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),o=await this.cognitoIdentityClient.getOpenIdToken(s),c=await this.stsClient.assumeRoleWithWebIdentity({RoleArn:this.config.guestRoleArn,RoleSessionName:"
13cwr",WebIdentityToken:o.Token});this.credentials=c;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(c))}catch{}return E.debug("AWS credentials fetched successfully"),c}catch(s){if(i)i--,E.warn("AWS credential fetch failed, retrying");else throw E.error("AWS credential fetch failed:",s),s}};let n=e.identityPoolId.split(":")[0];this.stsClient=new Pi({fetchRequestHandler:new _t,region:n})}};var tn=class extends ir{constructor(e,t){super(e,t),this.AnonymousCognitoCredentialsProvider=async()=>{let n=1;for(;;)try{let i=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),s=await this.cognitoIdentityClient.getCredentialsForIdentity(i.IdentityId);this.credentials=s;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(s))}catch{}return E.debug("AWS credentials fetched successfully"),s}catch(i){if(n)n--,E.warn("AWS credential fetch failed, retrying");else throw E.error("AWS credential fetch failed:",i),i}}}};var Be="com.amazon.rum",Df="com.amazonaws.rum",sr=`${Be}.http_event`,_i=`${Be}.xray_trace_event`,Lf=`${Be}.largest_contentful_paint_event`,$f=`${Be}.first_input_delay_event`,jf=`${Be}.cumulative_layout_shift_event`,Hf=`${Be}.interaction_to_next_paint_event`,rn=`${Be}.performance_navigation_event`,Mi=`${Be}.performance_resource_event`,Uf=`${Be}.dom_event`,Bf=`${Be}.js_error_event`,Wf=`${Be}.page_view_event`,nn=`${Be}.session_start_event`,WA=`${Be}.time_to_interactive_event`,ia=`${Be}.rrweb_event`;var ye=class{constructor(e){this.enabled=!0,this.pluginId=ye.generatePluginId(e)}static generatePluginId(e){return`${ye.idPrefix}.${e}`}load(e){var t;this.context=e,(t=this.onload)===null||t===void 0||t.call(this)}getPluginId(){return this.pluginId}};ye.idPrefix=Df;var sn=class{constructor(e){this.context=e,this.plugins=new Map}addPlugin(e){let t=e.getPluginId();if(this.hasPlugin(t))throw new Error(`Plugin "${t}" already defined in the PluginManager`);this.plugins.set(t,e),e.load(this.context),E.debug(`Plugin loaded: ${t}`)}updatePlugin(e,t){var n;let i=this.getPlugin(e);(n=i?.update)===null||n===void 0||n.call(i,t)}enable(){this.plugins.forEach(e=>e.enable())}disable(){this.plugins.forEach(e=>e.disable())}flush(){this.plugins.forEach(e=>{var t;return(t=e.flush)===null||t===void 0?void 0:t.call(e)})}hasPlugin(e){return Boolean(this.getPlugin(e))}record(e,t){let n=this.getPlugin(e);if(n?.record instanceof Function)n.record(t);else throw new Error("AWS RUM Client record: Invalid plugin ID")}getPlugin(e){var t;return(t=this.plugins.get(e))!==null&&t!==void 0?t:this.plugins.get(ye.generatePluginId(e))}};var sa=(r,e,t,n,i)=>{let s=r+"=";s+=e||"",i!==void 0?s+=`; Expires=${i.toUTCString()}`:n!==void 0&&(s+=`; Expires=${yv(n).toUTCString()}`),s+=`; Domain=${t.domain}`,s+=`; Path=${t.path}`,s+=`; SameSite=${t.sameSite}`,s+=t.secure?"; Secure":"",document.cookie=s},yv=r=>new Date(new Date().getTime()+r*1e3),oa=(r,e)=>{let t=r+"=";t+=`; Expires=${new Date(0)}`,t+=`; Domain=${e.domain}`,t+=`; Path=${e.path}`,t+=`; SameSite=${e.sameSite}`,t+=e.secure?"Secure":"",document.cookie=t},aa=r=>{let e=document.cookie.split("; ");for(let t of e){let n=t.split("=");if(n[0]===r)return n[1]}return""};var or;(function(r){r.Path="PATH",r.Hash="HASH",r.PathAndHash="PATH_AND_HASH"})(or||(or={}));var zf=()=>{var r,e;let t=navigator.userAgentData;if(!t)return;let n=(r=t.brands)!==null&&r!==void 0?r:[],i=(e=n.find(s=>s.brand!=="Chromium"&&!s.brand.startsWith("Not")))!==null&&e!==void 0?e:n[0];return{browserName:i?.brand,browserVersion:i?.version,osName:t.platform,deviceType:t.mobile?"mobile":"desktop"}};var Fi="00000000-0000-0000-0000-000000000000";var vv="desktop",bv="web";var ki=class{constructor(e,t,n,i){this.isSessionIdManual=!1,this.isUserIdManual=!1,this.appMonitorDetails=e,this.config=t,this.recordEvent=n,this.pageManager=i,this.sessionCookieName=this.config.cookieAttributes.unique?`${Bt}_${this.appMonitorDetails.id}`:Bt,this.session={sessionId:Fi,record:this.sample(),eventCount:0},this.config.userId||this.initializeUser(),this.collectAttributes(),this.addSessionAttributes(this.config.sessionAttributes),this.get
13SessionFromCookie(),this.config.userId&&(this.isUserIdManual=!0,this.adoptUser(this.config.userId)),this.config.sessionId&&(this.isSessionIdManual=!0,this.adoptSession(this.config.sessionId))}isSampled(){return this.session.record}getSession(){return this.isSessionIdManual?(new Date>=this.sessionExpiry&&(this.session.eventCount=0,this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie()),this.session):(this.session.sessionId===Fi?this.createSession():new Date>=this.sessionExpiry&&this.createSession(),this.session)}getAttributes(){return this.attributes}addSessionAttributes(e){this.attributes=Object.assign(Object.assign({},this.attributes),e)}pinSessionId(e){if(!e){E.warn("pinSessionId called with empty value; ignoring.");return}this.isSessionIdManual=!0,e!==this.session.sessionId&&this.adoptSession(e)}startSession(e){return e?.userId!==void 0&&(e.userId?(this.isUserIdManual=!0,e.userId!==this.userId&&this.adoptUser(e.userId)):E.warn("startSession called with empty userId; ignoring user rotation.")),e?.sessionId!==void 0?e.sessionId?(this.isSessionIdManual=!0,this.adoptSession(e.sessionId),this.config.suppressSessionStartEvent||this.recordEvent(nn,{version:"1.0.0"})):(E.warn("startSession called with empty sessionId; minting a fresh session."),this.isSessionIdManual=!1,this.createSession()):(this.isSessionIdManual=!1,this.createSession()),this.session.sessionId}getUserId(){return this.isUserIdManual?this.userId:this.useCookies()?this.userId:Fi}pinUserId(e){if(!e){E.warn("pinUserId called with empty value; ignoring.");return}this.isUserIdManual=!0,e!==this.userId&&this.adoptUser(e)}incrementSessionEventCount(){this.session.eventCount++,this.renewSession()}isLimitExceeded(){return this.session.eventCount>=this.config.sessionEventLimit&&this.config.sessionEventLimit>0}canRecord(){return this.session.record&&!this.isLimitExceeded()}initializeUser(){let e="";this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.config.userIdRetentionDays<=0?this.userId="00000000-0000-0000-0000-000000000000":this.useCookies()?(e=this.getUserIdCookie(),this.userId=e||At(),this.createOrRenewUserCookie(e,this.userExpiry)):this.userId=At()}createOrRenewSessionCookie(e,t){btoa&&sa(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,t)}createOrRenewUserCookie(e,t){sa(Wt,e,this.config.cookieAttributes,void 0,t)}getUserIdCookie(){return aa(Wt)}getSessionFromCookie(){if(this.useCookies()){let e=aa(this.sessionCookieName);if(e&&atob)try{this.session=JSON.parse(atob(e)),this.pageManager.resumeSession(this.session.page),E.info(`Restored session: ${this.session.sessionId}`)}catch(t){E.error("Failed to restore session",t)}}}storeSessionAsCookie(){this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),this.useCookies()&&this.createOrRenewSessionCookie(this.session,this.sessionExpiry)}createSession(){this.session={sessionId:At(),record:this.session.sessionId===Fi?this.session.record:this.sample(),eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),E.info(`Session start: ${this.session.sessionId}`),this.session.record||E.warn(`Session is NOT sampled. Consider increasing sessionSampleRate to avoid data loss (currently ${this.config.sessionSampleRate})`),this.config.suppressSessionStartEvent||this.recordEvent(nn,{version:"1.0.0"})}adoptSession(e){this.session={sessionId:e,record:this.session.record,eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),E.info(`Adopted session: ${e}`)}adoptUser(e){this.userId=e,this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),E.info(`Adopted user: ${e}`)}renewSession(){this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.session.page=this.pageManager.getPage(),this.storeSessionAsCookie()}collectAttributes(){var e;let t=zf();this.attributes={browserLanguage:navigator.language,browserName:t?.browserName,browserVersion:t?.browserVersion,osName:t?.osName,osVersion:t?.osVersion,deviceType:(e=t?.deviceType)!==null&&e!==void 0?e:vv,platformType:bv,domain:window.location.hostname,"aws:releaseId":this.config.releaseId},t||(this.attributes["aws:userAgent"]=navigator.userAgent)}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}sample(){return Math.random()<this.config.sessionSampleRate}};var Ni=class{constructor(e,t){this.config=e,this.record=t,this.page=void 0,this.resumed=!1,this.recordInteraction=!1}getPage(){return this.page}getAttributes(){return this.attributes}resumeSession(e){this.recordInteraction=!0,e&&(this.page=e,this.resumed=!0)}recordPageView(e){let t;if(typeof e=="string"?t=e:t=e.pageId,E.debug(`recordPageView called with pageId: ${t}`),this.useCookies()&&(this.recordInteraction=!0),!this.page)this.createLandingPage(t),E.info(`Landing page created: ${t}`);else if(this.page.pageId!==t)this.createNextPage(this.page,t),E.debug(`Navigation to new page: ${t}`);else if(this.resumed){E.info(`Resumed session for page: ${t}`),this.collectAttributes(this.page,typeof e=="object"?e:void 0);return}else{E.debug(`No page change detected for: ${t}`);return}this.collectAttributes(this.page,typeof e=="object"?e:void 0),this.recordPageViewEvent(this.page)}createNextPage(e,t){let n=Date.now();E.debug(`Creating next page ${t}, interaction: ${e.interaction+1}`),this.timeOnParentPage=n-e.start,this.resumed=!1,this.page={pageId:t,parentPageId:e.pageId,interaction:e.interaction+1,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:n}}createLandingPage(e){this.page={pageId:e,interaction:0,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:Date.now()}}collectAttributes(e,t){var n;this.attributes={title:!((n=t?.pageAttributes)===null||n===void 0)&&n.title?t.pageAttributes.title:document.title,pageId:e.pageId},this.recordInteraction&&(this.attributes.interaction=e.interaction,e.parentPageId!==void 0&&(this.attributes.parentPageId=e.parentPageId)),t?.pageTags&&(this.attributes.pageTags=t.pageTags),t?.pageAttributes&&(this.attributes=Object.assign(Object.assign({},t.pageAttributes),this.attributes))}createPageViewEvent(e){let t={version:"1.0.0",pageId:e.pageId};return this.recordInteraction&&(t.interaction=e.interaction,t.pageInteractionId=e.pageId+"-"+e.interaction,e.parentPageId!==void 0&&(t.parentPageInteractionId=e.parentPageId+"-"+(e.interaction-1),t.timeOnParentPage=this.timeOnParentPage),t.referrer=document.referrer,t.referrerDomain=this.getDomainFromReferrer()),t}recordPageViewEvent(e){this.record(Wf,this.createPageViewEvent(e))}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}getDomainFromReferrer(){try{return new URL(document.referrer).hostname}catch{return document.referrer==="localhost"?document.referrer:""}}};var Mt;(function(r){r.EVENT="event"})(Mt||(Mt={}));var Ft=class{constructor(){this.subscribers=new Map}subscribe(e,t){var n;let i=(n=this.subscribers.get(e))!==null&&n!==void 0?n:[];i.length||this.subscribers.set(e,i),i.push(t)}unsubscribe(e,t){let n=this.subscribers.get(e);if(n){for(let i=0;i<n.length;i++)if(n[i]===t)return n.splice(i,1),!0}return!1}
13dispatch(e,t){let n=this.subscribers.get(e);if(n)for(let i of n)i(t)}};var Vf="3.1.0";var Sv=new Set(["pageId","parentPageId","interaction","pageTags","title"]),ca=(r,e)=>{if(!r)return{};let t={};for(let[n,i]of Object.entries(r)){if(n.startsWith("aws:")){E.warn(`Dropping ${e} metadata key "${n}": "aws:" namespace is reserved.`);continue}if((e==="event"||e==="hook")&&Sv.has(n)){E.warn(`Dropping ${e} metadata key "${n}": owned by page state.`);continue}let s=typeof i;if(s!=="string"&&s!=="number"&&s!=="boolean"){E.warn(`Dropping ${e} metadata key "${n}": value must be string|number|boolean.`);continue}t[n]=i}return t},on=class{constructor(e,t,n=new Ft){this.eventBus=n,this.events=[],this.candidates=new Map,this.droppedEvent=0,this.sessionLimitExceeded=0,this.recordPageView=i=>{this.isCurrentUrlAllowed()&&this.pageManager.recordPageView(i)},this.recordEvent=(i,s,o)=>{this.enabled&&this.isCurrentUrlAllowed()&&(i!==nn&&this.sessionManager.getSession(),this.sessionManager.canRecord()?(this.sessionManager.incrementSessionEventCount(),this.addRecordToCache(i,s,o)):this.sessionLimitExceeded++)},this.recordCandidate=(i,s,o)=>{let c=this.sessionManager.getSession();if(!this.enabled||!this.isCurrentUrlAllowed()||!c.record)return;let[a]=this.createEvent(i,s,o);if(this.candidates.has(i)){this.candidates.set(i,a);return}this.candidates.size<this.config.candidatesCacheSize&&!this.sessionManager.isLimitExceeded()&&(this.candidates.set(i,a),this.sessionManager.incrementSessionEventCount())},this.getSession=()=>{if(this.isCurrentUrlAllowed())return this.sessionManager.getSession()}
13,this.getSessionId=()=>this.sessionManager.getSession().sessionId,this.pinSessionId=i=>{this.sessionManager.pinSessionId(i)},this.startSession=i=>this.sessionManager.startSession(i),this.getUserId=()=>this.sessionManager.getUserId(),this.pinUserId=i=>{this.sessionManager.pinUserId(i)},this.addRecordToCache=(i,s,o)=>{if(!this.enabled)return;if(this.events.length>=this.config.eventCacheSize){this.droppedEvent+=1;return}let[c,a]=this.createEvent(i,s,o);this.eventBus.dispatch(Mt.EVENT,a),this.events.push(c)},this.createEvent=(i,s,o)=>{var c;let a=(c=this.pageManager.getAttributes())!==null&&c!==void 0?c:{},l=ca(o,"event"),u={};if(this.eventMetadataHook)try{let b=Object.freeze(Object.assign({},a)),g=this.eventMetadataHook(i,s,b);g&&(u=ca(g,"hook"))}catch(b){E.warn(`eventMetadataHook threw for type "${i}"; dropping hook output for this event.`,b)}let h=Object.assign(Object.assign(Object.assign({},a),u),l),m={id:At(),timestamp:new Date,type:i};return[Object.assign(Object.assign({},m),{details:JSON.stringify(s),metadata:JSON.stringify(h)}),Object.assign(Object.assign({},m),{details:s,metadata:h})]},this.appMonitorDetails=e,this.config=t,this.enabled=!0,this.pageManager=new Ni(t,this.recordEvent),this.sessionManager=new ki(e,t,this.recordEvent,this.pageManager),this.installationMethod=t.client,this.applicationAttributes=Object.freeze(ca(t.applicationAttributes,"application"))}enable(){this.enabled=!0}disable(){this.enabled=!1}setPluginFlushHook(e){this.pluginFlushHook=e}isSessionSampled(){return this.sessionManager.isSampled()}hasEvents(){if(this.sessionLimitExceeded>0){let e=this.events.length+this.sessionLimitExceeded;this.sessionManager.isSampled()?E.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because the session limit has exceeded. Consider increasing sessionEventLimit (currently ${this.config.sessionEventLimit}) to ${e} or more to avoid data loss.`):E.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because current session is not sampled. Consider increasing sessionSampleRate (currently ${this.config.sessionSampleRate}) to capture more user sessions.`),this.sessionLimitExceeded=0}return this.events.length!==0}hasCandidates(){return this.candidates.size!==0}getEventBatch(e=!1){var t;if(this.droppedEvent>0){let i=this.events.length+this.droppedEvent;E.warn(`Dropped ${this.droppedEvent} of ${i} recently observed events (${(this.droppedEvent/i*100).toFixed(2)}%) due to insufficient in-memory queue. Increase eventCacheSize to ${i} (currently ${this.config.eventCacheSize}) to avoid data loss.`),this.droppedEvent=0}let n=[];if(e&&((t=this.pluginFlushHook)===null||t===void 0||t.call(this)),e&&this.hasCandidates())if(this.candidates.size<=this.config.batchLimit)n=Array.from(this.candidates.values()),this.candidates.clear();else{let i=0;for(let s of Array.from(this.candidates.keys())){if(i++>=this.config.batchLimit)break;let o=this.candidates.get(s);o&&(n.push(o),this.candidates.delete(s))}}return this.events.length&&(this.events.length<=this.config.batchLimit-n.length?(n.push(...this.events),this.events=[]):n.push(...this.events.splice(0,this.config.batchLimit-n.length))),n}getAppMonitorDetails(){return this.appMonitorDetails}getUserDetails(){return{userId:this.sessionManager.getUserId(),sessionId:this.sessionManager.getSession().sessionId}}addSessionAttributes(e){this.sessionManager.addSessionAttributes(e)}getCommonMetadata(){return Object.assign(Object.assign(Object.assign({},this.sessionManager.getAttributes()),this.applicationAttributes),{version:"1.0.0","aws:client":this.installationMethod,"aws:clientVersion":Vf})}setEventMetadataHook(e){this.eventMetadataHook=e}clearEventMetadataHook(){this.eventMetadataHook=void 0}isCurrentUrlAllowed(){let e=document.location.toString(),t=this.config.pagesToExclude.some(i=>i.test(e));return this.config.pagesToInclude.some(i=>i.test(e))&&!t}};var ve;(function(r){r.OTHER="other",r.STYLESHEET="stylesheet",r.DOCUMENT="document",r.SCRIPT="script",r.IMAGE="image",r.FONT="font"})(ve||(ve={}));var bt;(function(r){r.IMG="img",r.IMAGE="image",r.INPUT="input",r.IFRAME="iframe",r.FRAME="frame",r.SCRIPT="script",r.CSS="css"})(bt||(bt={}));var la=r=>[r.startTime,r.duration].join("#"),wv=[{name:ve.STYLESHEET,list:["css","less"]},{name:ve.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:ve.SCRIPT,list:["js"]},{name:ve.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:ve.FONT,list:["fnt","fon","otf","ttf","woff"]}],ua=(r,e)=>{let t=ve.OTHER;if(r){let n=r.substring(r.lastIndexOf("/")+1),i=n.substring(n.lastIndexOf(".")+1).split(/[?#]/)[0];wv.forEach(s=>{s.list.indexOf(i)>-1&&(t=s.name)})}if(e&&t===ve.OTHER)switch(e){case bt.IMAGE:case bt.IMG:case bt.INPUT:t=ve.IMAGE;break;case bt.IFRAME:case bt.FRAME:t=ve.DOCUMENT;break;case bt.SCRIPT:t=ve.SCRIPT;break;case bt.CSS:t=ve.STYLESHEET;break}return t};var Gf=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint");var xv=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,qf=(r,e)=>{try{return new URL(r).hostname===e&&xv.test(r)}catch{return!1}};var fa="dom-event",Rv={interactionId:()=>"",enableMutationObserver:!1,events:[]},ar=class extends ye{constructor(e){super(fa),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},Rv),e)}static getElementInfo(e){let t={name:"UNKNOWN"};return e.target instanceof Node&&(t.name=e.target.nodeName),e.target instanceof Element&&e.target.id&&(t.id=e.target.id),t}enable(){if(document.readyState!=="complete"){window.addEventListener("load",()=>this.enable());return}this.enabled||(this.addListeners(),this.config.enableMutationObserver&&this.observeDOMMutation(),this.enabled=!0)}disable(){this.enabled&&(this.removeListeners(),this.observer&&this.observer.disconnect(),this.enabled=!1)}update(e){e.forEach(t=>{this.addEventHandler(t),this.config.events.push(t)})}onload(){this.enable()}
13removeListeners(){this.config.events.forEach(e=>this.removeEventHandler(e))}addListeners(){this.config.events.forEach(e=>this.addEventHandler(e))}getEventListener(e){return t=>{var n;let i=ar.getElementInfo(t),s=this.config.interactionId(t),o=Object.assign(Object.assign(Object.assign({version:"1.1.0",event:t.type,element:i.name},i.id?{elementId:i.id}:{}),s?{interactionId:s}:{}),e?{cssLocator:e}:{});!((n=this.context)===null||n===void 0)&&n.record&&this.context.record(Uf,o)}}addEventHandler(e){let t=e.event,n=this.getEventListener(e.cssLocator),i=[],s=this.eventListenerMap.has(e)?this.eventListenerMap.get(e):[];if(e.cssLocator)document.querySelectorAll(e.cssLocator).forEach(c=>{i.push(c)});else if(e.elementId){let o=document.getElementById(e.elementId);o&&i.push(o)}else e.element&&i.push(e.element);i.forEach(o=>{o.addEventListener(t,n),s.push({element:o,eventListener:n})}),this.eventListenerMap.set(e,s)}removeEventHandler(e){let t=this.eventListenerMap.get(e);t&&(t.forEach(n=>{let i=n.element,s=n.eventListener;i.removeEventListener(e.event,s)}),this.eventListenerMap.delete(e))}observeDOMMutation(){this.observer=new MutationObserver(()=>{this.removeListeners(),this.addListeners()}),this.observer.observe(document,{childList:!0,subtree:!0})}};var Cv=r=>{let e=typeof r;return(e==="object"||e==="function")&&!!r},Ev=r=>{let e={version:"1.0.0",type:"undefined",message:"undefined"};return r.type!==void 0&&(e.type=r.type),r.message!==void 0&&(e.message=r.message),r.filename!==void 0&&(e.filename=r.filename),r.lineno!==void 0&&(e.lineno=r.lineno),r.colno!==void 0&&(e.colno=r.colno),e},Iv=(r,e)=>{r.type!=="unhandledrejection"&&(r.type=e.toString()),r.message=e.toString()},Av=(r,e,t)=>{e.name&&(r.type=e.name),e.message&&(r.message=e.message),e.fileName&&(r.filename=e.fileName),e.lineNumber&&(r.lineno=e.lineNumber),e.columnNumber&&(r.colno=e.columnNumber),t&&e.stack&&(r.stack=e.stack.length>t?e.stack.substring(0,t)+"...":e.stack)},ha=r=>r!==Object(r)&&r!==void 0&&r!==null,cr=(r,e)=>{let t=Ev(r),n=r.error;return Cv(n)?Av(t,n,e):ha(n)&&Iv(t,n),t};var da="js-error",Tv={stackTraceLength:1e3,ignore:()=>!1},Di=class extends ye{constructor(e){super(da),this.eventHandler=t=>{this.config.ignore(t)||this.recordJsErrorEvent(t)}
13,this.promiseRejectEventHandler=t=>{this.config.ignore(t)||this.recordJsErrorEvent({type:t.type,error:t.reason})},this.config=Object.assign(Object.assign({},Tv),e)}enable(){this.enabled||(this.addEventHandler(),this.enabled=!0)}disable(){this.enabled&&(this.removeEventHandler(),this.enabled=!1)}record(e){e instanceof ErrorEvent?this.recordJsErrorEvent(e):this.recordJsErrorEvent({type:"error",error:e})}onload(){this.addEventHandler()}recordJsErrorEvent(e){var t;(t=this.context)===null||t===void 0||t.record(Bf,cr(e,this.config.stackTraceLength))}addEventHandler(){window.addEventListener("error",this.eventHandler),window.addEventListener("unhandledrejection",this.promiseRejectEventHandler)}removeEventHandler(){window.removeEventListener("error",this.eventHandler),window.removeEventListener("unhandledrejection",this.promiseRejectEventHandler)}};var Pv=r=>r.entryType==="resource"&&(!/^https?:/.test(r.name)||/^(fetch|xmlhttprequest)$/.test(r.initiatorType)),lr={eventLimit:10,ignore:Pv,recordAllTypes:[ve.DOCUMENT,ve.SCRIPT,ve.STYLESHEET,ve.FONT],sampleTypes:[ve.IMAGE,ve.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1};var Ov="navigation",ur="navigation",pa="load",Li=class extends ye{constructor(e){super(Ov),this.eventListener=()=>{performance.getEntriesByType(ur).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(n=>{n.getEntries().filter(i=>i.entryType===ur).filter(i=>!this.config.ignore(i)).forEach(i=>{this.performanceNavigationEventHandlerTimingLevel2(i)})}).observe({entryTypes:[ur]})},this.performanceNavigationEventHandlerTimingLevel1=()=>{setTimeout(()=>{var n;let i=performance.timing,s=i.navigationStart,o={version:"1.0.0",initiatorType:"navigation",startTime:0,unloadEventStart:i.unloadEventStart>0?i.unloadEventStart-s:0,promptForUnload:i.unloadEventEnd-i.unloadEventStart,redirectStart:i.redirectStart>0?i.redirectStart-s:0,redirectTime:i.redirectEnd-i.redirectStart,fetchStart:i.fetchStart>0?i.fetchStart-s:0,domainLookupStart:i.domainLookupStart>0?i.domainLookupStart-s:0,dns:i.domainLookupEnd-i.domainLookupStart,connectStart:i.connectStart>0?i.connectStart-s:0,connect:i.connectEnd-i.connectStart,secureConnectionStart:i.secureConnectionStart>0?i.secureConnectionStart-s:0,tlsTime:i.secureConnectionStart>0?i.connectEnd-i.secureConnectionStart:0,requestStart:i.requestStart>0?i.requestStart-s:0,timeToFirstByte:i.responseStart-i.requestStart,responseStart:i.responseStart>0?i.responseStart-s:0,responseTime:i.responseStart>0?i.responseEnd-i.responseStart:0,domInteractive:i.domInteractive>0?i.domInteractive-s:0,domContentLoadedEventStart:i.domContentLoadedEventStart>0?i.domContentLoadedEventStart-s:0,domContentLoaded:i.domContentLoadedEventEnd-i.domContentLoadedEventStart,domComplete:i.domComplete>0?i.domComplete-s:0,domProcessingTime:i.loadEventStart-i.responseEnd,loadEventStart:i.loadEventStart>0?i.loadEventStart-s:0,loadEventTime:i.loadEventEnd-i.loadEventStart,duration:i.loadEventEnd-i.navigationStart,navigationTimingLevel:1};!((n=this.context)===null||n===void 0)&&n.record&&this.context.record(rn,o)},0)},this.performanceNavigationEventHandlerTimingLevel2=t=>{var n;let i={version:"1.0.0",initiatorType:t.initiatorType,navigationType:t.type,startTime:t.startTime,unloadEventStart:t.unloadEventStart,promptForUnload:t.unloadEventEnd-t.unloadEventStart,redirectCount:t.redirectCount,redirectStart:t.redirectStart,redirectTime:t.redirectEnd-t.redirectStart,workerStart:t.workerStart,workerTime:t.workerStart>0?t.fetchStart-t.workerStart:0,fetchStart:t.fetchStart,domainLookupStart:t.domainLookupStart,dns:t.domainLookupEnd-t.domainLookupStart,nextHopProtocol:t.nextHopProtocol,connectStart:t.connectStart,connect:t.connectEnd-t.connectStart,secureConnectionStart:t.secureConnectionStart,tlsTime:t.secureConnectionStart>0?t.connectEnd-t.secureConnectionStart:0,requestStart:t.requestStart,timeToFirstByte:t.responseStart-t.requestStart,responseStart:t.responseStart,responseTime:t.responseStart>0?t.responseEnd-t.responseStart:0,domInteractive:t.domInteractive,domContentLoadedEventStart:t.domContentLoadedEventStart,domContentLoaded:t.domContentLoadedEventEnd-t.domContentLoadedEventStart,domComplete:t.domComplete,domProcessingTime:t.loadEventStart-t.responseEnd,loadEventStart:t.loadEventStart,loadEventTime:t.loadEventEnd-t.loadEventStart,duration:t.duration,headerSize:t.transferSize>0?t.transferSize-t.encodedBodySize:0,transferSize:t.transferSize,compressionRatio:t.encodedBodySize>0?t.decodedBodySize/t.encodedBodySize:0,navigationTimingLevel:2};!((n=this.context)===null||n===void 0)&&n.record&&this.context.record(rn,i)},this.config=Object.assign(Object.assign({},lr),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(pa,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(pa,this.eventListener))}hasTheWindowLoadEventFired(){if(window.performance&&window.performance.getEntriesByType(ur).length){let e=window.performance.getEntriesByType(ur)[0];return Boolean(e.loadEventEnd)}return!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(ur).filter(e=>
13!this.config.ignore(e)).forEach(e=>this.performanceNavigationEventHandlerTimingLevel2(e)):window.addEventListener(pa,this.eventListener))}};var fr=gt(Xf());var kt=class extends ye{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){let e=fr.wrap.bind(fr);for(let t of this.patches)e(t.nodule,t.name,t.wrapper())}unpatchAll(){let e=fr.unwrap.bind(fr);for(let t of this.patches)e(t.nodule,t.name)}patch(e=!0){this.enabled!==e&&(this.enabled=e,e?this.patchAll():this.unpatchAll())}};var Fv="page-view",$i=class extends kt{constructor(){super(Fv),this.pushState=()=>{let e=this;return t=>function(n,i,s){let o=t.apply(this,arguments);return e.recordPageView(),o}},this.replaceState=()=>{let e=this;return t=>function(n,i,s){let o=t.apply(this,arguments);return e.recordPageView(),o}},this.popstateListener=e=>{this.recordPageView()},this.recordPageView=()=>{this.context.recordPageView(this.createIdForCurrentPage())},this.enable()}onload(){this.addListener(),this.recordPageView()}get patches(){return[{nodule:History.prototype,name:"pushState",wrapper:this.pushState},{nodule:History.prototype,name:"replaceState",wrapper:this.replaceState}]}addListener(){window.addEventListener("popstate",this.popstateListener)}createIdForCurrentPage(){let e=window.location.pathname,t=window.location.hash;switch(this.context.config.pageIdFormat){case or.PathAndHash:return e&&t?e+t:e||t||"";case or.Hash:return t||"";case or.Path:default:return e||""}}};var kv="resource",ga="resource",ji=class extends ye{constructor(e){super(kv),this.performanceEntryHandler=t=>{this.recordPerformanceEntries(t.getEntries())},this.recordPerformanceEntries=t=>{t.forEach(n=>{if(n.entryType!==ga||this.config.ignore(n))return;let{name:i,initiatorType:s}=n,o=ua(i,s);this.config.recordAllTypes.includes(o)?this.recordResourceEvent(n):this.config.sampleTypes.includes(o)&&this.eventCount<this.config.eventLimit&&(this.recordResourceEvent(n),this.eventCount++)})},this.recordResourceEvent=({name:t,startTime:n,initiatorType:i,duration:s,transferSize:o})=>{var c;if(!qf(t,this.context.config.endpointUrl.hostname)&&!((c=this.context)===null||c===void 0)&&c.record){let a={version:"1.0.0",initiatorType:i,startTime:n,duration:s,fileType:ua(t,i),transferSize:o};this.context.config.recordResourceUrl&&(a.targetUrl=t),this.context.record(Mi,a)}},this.config=Object.assign(Object.assign({},lr),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:ga,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:ga,buffered:!0})}};var ba,Jf,Wi=function(){var r=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(r&&r.responseStart>0&&r.responseStart<performance.now())return r},xa=function(r){if(document.readyState==="loading")return"loading";var e=Wi();if(e){if(r<e.domInteractive)return"loading";if(e.domContentLoadedEventStart===0||r<e.domContentLoadedEventStart)return"dom-interactive";if(e.domComplete===0||r<e.domComplete)return"dom-content-loaded"}return"complete"},Nv=function(r){var e=r.nodeName;return r.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},zi=function(r,e){var t="";try{for(;r&&r.nodeType!==9;){var n=r,i=n.id?"#"+n.id:Nv(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(t.length+i.length>(e||100)-1)return t||i;if(t=t?i+">"+t:i,n.id)break;r=n.parentNode}}catch{}return t},ah=-1,Dv=function(){return ah},mr=function(r){addEventListener("pageshow",function(e){e.persisted&&(ah=e.timeStamp,r(e))},!0)},Ra=function(){var r=Wi();return r&&r.activationStart||0},ht=function(r,e){var t=Wi(),n="navigate";return Dv()>=0?n="back-forward-cache":t&&(document.prerendering||Ra()>0?n="prerender":document.wasDiscarded?n="restore":t.type&&(n=t.type.replace(/_/g,"-"))),{name:r,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},zt=function(r,e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(r)){var n=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return n.observe(Object.assign({type:r,buffered:!0},t||{})),n}}catch{}},dt=function(r,e,t,n){var i,s;return function(o){e.value>=0&&(o||n)&&((s=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=s,e.rating=function(c,a){return c>a[1]?"poor":c>a[0]?"needs-improvement":"good"}(e.value,t),r(e))}},Ca=function(r){requestAnimationFrame(function(){return requestAnimationFrame(function(){return r()})})},hn=function(r){document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&r()})},Vi=function(r){var e=!1;return function(){e||(r(),e=!0)}},hr=-1,Zf=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Ui=function(r){document.visibilityState==="hidden"&&hr>-1&&(hr=r.type==="visibilitychange"?r.timeStamp:0,Lv())},eh=function(){addEventListener("visibilitychange",Ui,!0),addEventListener("prerenderingchange",Ui,!0)},Lv=function(){removeEventListener("visibilitychange",Ui,!0),removeEventListener("prerenderingchange",Ui,!0)},Ea=function(){return hr<0&&(hr=Zf(),eh(),mr(function(){setTimeout(function(){hr=Zf(),eh()},0)})),{get firstHiddenTime(){return hr}}},Gi=function(r){document.prerendering?addEventListener("prerenderingchange",function(){return r()},!0):r()},th=[1800,3e3],$v=function(r,e){e=e||{},Gi(function(){var t,n=Ea(),i=ht("FCP"),s=zt("paint",function(o){o.forEach(function(c){c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(i.value=Math.max(c.startTime-Ra(),0
13),i.entries.push(c),t(!0)))})});s&&(t=dt(r,i,th,e.reportAllChanges),mr(function(o){i=ht("FCP"),t=dt(r,i,th,e.reportAllChanges),Ca(function(){i.value=performance.now()-o.timeStamp,t(!0)})}))})},rh=[.1,.25],ch=function(r,e){(function(t,n){n=n||{},$v(Vi(function(){var i,s=ht("CLS",0),o=0,c=[],a=function(u){u.forEach(function(h){if(!h.hadRecentInput){var m=c[0],b=c[c.length-1];o&&h.startTime-b.startTime<1e3&&h.startTime-m.startTime<5e3?(o+=h.value,c.push(h)):(o=h.value,c=[h])}}),o>s.value&&(s.value=o,s.entries=c,i())},l=zt("layout-shift",a);l&&(i=dt(t,s,rh,n.reportAllChanges),hn(function(){a(l.takeRecords()),i(!0)}),mr(function(){o=0,s=ht("CLS",0),i=dt(t,s,rh,n.reportAllChanges),Ca(function(){return i()})}),setTimeout(i,0))}))})(function(t){var n=function(i){var s,o={};if(i.entries.length){var c=i.entries.reduce(function(l,u){return l&&l.value>u.value?l:u});if(c&&c.sources&&c.sources.length){var a=(s=c.sources).find(function(l){return l.node&&l.node.nodeType===1})||s[0];a&&(o={largestShiftTarget:zi(a.node),largestShiftTime:c.startTime,largestShiftValue:c.value,largestShiftSource:a,largestShiftEntry:c,loadState:xa(c.startTime)})}}return Object.assign(i,{attribution:o})}(t);r(n)},e)};var lh=0,ya=1/0,Hi=0,jv=function(r){r.forEach(function(e){e.interactionId&&(ya=Math.min(ya,e.interactionId),Hi=Math.max(Hi,e.interactionId),lh=Hi?(Hi-ya)/7+1:0)})},uh=function(){return ba?lh:performance.interactionCount||0},Hv=function(){"interactionCount"in performance||ba||(ba=zt("event",jv,{type:"event",buffered:!0,durationThreshold:0}))},rt=[],un=new Map,fh=0,Uv=function(){var r=Math.min(rt.length-1,Math.floor((uh()-fh)/50));return rt[r]},hh=[],Bv=function(r){if(hh.forEach(function(i){return i(r)}),r.interactionId||r.entryType==="first-input"){var e=rt[rt.length-1],t=un.get(r.interactionId);if(t||rt.length<10||r.duration>e.latency){if(t)r.duration>t.latency?(t.entries=[r],t.latency=r.duration):r.duration===t.latency&&r.startTime===t.entries[0].startTime&&t.entries.push(r);else{var n={id:r.interactionId,latency:r.duration,entries:[r]};un.set(n.id,n),rt.push(n)}rt.sort(function(i,s){return s.latency-i.latency}),rt.length>10&&rt.splice(10).forEach(function(i){return un.delete(i.id)})}}},Ia=function(r){var e=self.requestIdleCallback||self.setTimeout,t=-1;return r=Vi(r),document.visibilityState==="hidden"?r():(t=e(r),hn(r)),t},nh=[200,500],Wv=function(r,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},Gi(function(){var t;Hv();var n,i=ht("INP"),s=function(c){Ia(function(){c.forEach(Bv);var a=Uv();a&&a.latency!==i.value&&(i.value=a.latency,i.entries=a.entries,n())})},o=zt("event",s,{durationThreshold:(t=e.durationThreshold)!==null&&t!==void 0?t:40});n=dt(r,i,nh,e.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),hn(function(){s(o.takeRecords()),n(!0)}),mr(function(){fh=uh(),rt.length=0,un.clear(),i=ht("INP"),n=dt(r,i,nh,e.reportAllChanges)}))}))},dr=[],Nt=[],Sa=0,Aa=new WeakMap,pr=new Map,wa=-1,zv=function(r){dr=dr.concat(r),dh()},dh=function(){wa<0&&(wa=Ia(Vv))},Vv=function(){pr.size>10&&pr.forEach(function(o,c){un.has(c)||pr.delete(c)});var r=rt.map(function(o){return Aa.get(o.entries[0])}),e=Nt.length-50;Nt=Nt.filter(function(o,c){return c>=e||r.includes(o)});for(var t=new Set,n=0;n<Nt.length;n++){var i=Nt[n];mh(i.startTime,i.processingEnd).forEach(function(o){t.add(o)})}var s=dr.length-1-50;dr=dr.filter(function(o,c){return o.startTime>Sa&&c>s||t.has(o)}),wa=-1};hh.push(function(r){r.interactionId&&r.target&&!pr.has(r.interactionId)&&pr.set(r.interactionId,r.target)},function(r){var e,t=r.startTime+r.duration;Sa=Math.max(Sa,r.processingEnd);for(var n=Nt.length-1;n>=0;n--){var i=Nt[n];if(Math.abs(t-i.renderTime)<=8){(e=i).startTime=Math.min(r.startTime,e.startTime),e.processingStart=Math.min(r.processingStart,e.processingStart),e.processingEnd=Math.max(r.processingEnd,e.processingEnd),e.entries.push(r);break}}e||(e={startTime:r.startTime,processingStart:r.processingStart,processingEnd:r.processingEnd,renderTime:t,entries:[r]},Nt.push(e)),(r.interactionId||r.entryType==="first-input")&&Aa.set(r,e),dh()});var Dt,fn,ph,Bi,mh=function(r,e){for(var t,n=[],i=0;t=dr[i];i++)if(!(t.startTime+t.duration<r)){if(t.startTime>e)break;n.push(t)}return n},gh=function(r,e){Jf||(Jf=zt("long-animation-frame",zv)),Wv(function(t){var n=function(i){var s=i.entries[0],o=Aa.get(s),c=s.processingStart,a=o.processingEnd,l=o.entries.sort(function(v,I){return v.processingStart-I.processingStart}),u=mh(s.startTime,a),h=i.entries.find(function(v){return v.target}),m=h&&h.target||pr.get(s.interactionId),b=[s.startTime+s.duration,a].concat(u.map(function(v){return v.startTime+v.duration})),g=Math.max.apply(Math,b),S={interactionTarget:zi(m),interactionTargetElement:m,interactionType:s.name.startsWith("key")?"keyboard":"pointer",interactionTime:s.startTime,nextPaintTime:g,processedEventEntries:l,longAnimationFrameEntries:u,inputDelay:c-s.startTime,processingDuration:a-c,presentationDelay:Math.max(g-a,0),loadState:xa(s.startTime)};return Object.assign(i,{attribution:S})}(t);r(n)},e)},ih=[2500,4e3],va={},yh=function(r,e){(function(t,n){n=n||{},Gi(function(){var i,s=Ea(),o=ht("LCP"),c=function(u){n.reportAllChanges||(u=u.slice(-1)),u.forEach(function(h){h.startTime<s.firstHiddenTime&&(o.value=Math.max(h.startTime-Ra(),0
13),o.entries=[h],i())})},a=zt("largest-contentful-paint",c);if(a){i=dt(t,o,ih,n.reportAllChanges);var l=Vi(function(){va[o.id]||(c(a.takeRecords()),a.disconnect(),va[o.id]=!0,i(!0))});["keydown","click"].forEach(function(u){addEventListener(u,function(){return Ia(l)},{once:!0,capture:!0})}),hn(l),mr(function(u){o=ht("LCP"),i=dt(t,o,ih,n.reportAllChanges),Ca(function(){o.value=performance.now()-u.timeStamp,va[o.id]=!0,i(!0)})})}})})(function(t){var n=function(i){var s={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:i.value};if(i.entries.length){var o=Wi();if(o){var c=o.activationStart||0,a=i.entries[i.entries.length-1],l=a.url&&performance.getEntriesByType("resource").filter(function(g){return g.name===a.url})[0],u=Math.max(0,o.responseStart-c),h=Math.max(u,l?(l.requestStart||l.startTime)-c:0),m=Math.max(h,l?l.responseEnd-c:0),b=Math.max(m,a.startTime-c);s={element:zi(a.element),timeToFirstByte:u,resourceLoadDelay:h-u,resourceLoadDuration:m-h,elementRenderDelay:b-m,navigationEntry:o,lcpEntry:a},a.url&&(s.url=a.url),l&&(s.lcpResourceEntry=l)}}return Object.assign(i,{attribution:s})}(t);r(n)},e)};var ln={passive:!0,capture:!0},Gv=new Date,sh=function(r,e){Dt||(Dt=e,fn=r,ph=new Date,bh(removeEventListener),vh())},vh=function(){if(fn>=0&&fn<ph-Gv){var r={entryType:"first-input",name:Dt.type,target:Dt.target,cancelable:Dt.cancelable,startTime:Dt.timeStamp,processingStart:Dt.timeStamp+fn};Bi.forEach(function(e){e(r)}),Bi=[]}},qv=function(r){if(r.cancelable){var e=(r.timeStamp>1e12?new Date:performance.now())-r.timeStamp;r.type=="pointerdown"?function(t,n){var i=function(){sh(t,n),o()},s=function(){o()},o=function(){removeEventListener("pointerup",i,ln),removeEventListener("pointercancel",s,ln)};addEventListener("pointerup",i,ln),addEventListener("pointercancel",s,ln)}(e,r):sh(e,r)}},bh=function(r){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return r(e,qv,ln)})},oh=[100,300],Yv=function(r,e){e=e||{},Gi(function(){var t,n=Ea(),i=ht("FID"),s=function(a){a.startTime<n.firstHiddenTime&&(i.value=a.processingStart-a.startTime,i.entries.push(a),t(!0))},o=function(a){a.forEach(s)},c=zt("first-input",o);t=dt(r,i,oh,e.reportAllChanges),c&&(hn(Vi(function(){o(c.takeRecords()),c.disconnect()})),mr(function(){var a;i=ht("FID"),t=dt(r,i,oh,e.reportAllChanges),Bi=[],fn=-1,Dt=null,bh(addEventListener),a=s,Bi.push(a),vh()}))})},Sh=function(r,e){Yv(function(t){var n=function(i){var s=i.entries[0],o={eventTarget:zi(s.target),eventType:s.name,eventTime:s.startTime,eventEntry:s,loadState:xa(s.startTime)};return Object.assign(i,{attribution:o})}(t);r(n)},e)};var Qv="web-vitals",qi=class extends ye{constructor(e){super(Qv),this.resourceEventIds=new Map,this.cacheLCPCandidates=Gf(),this.handleEvent=t=>{switch(t.type){case Mi:let n=t.details;this.cacheLCPCandidates&&n.fileType===ve.IMAGE&&this.resourceEventIds.set(la(t.details),t.id);break;case rn:this.navigationEventId=t.id;break}},this.config=Object.assign(Object.assign({},lr),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Mt.EVENT,this.handleEvent),yh(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),Sh(e=>this.handleFID(e)),ch(e=>this.handleCLS(e),{reportAllChanges:!0}),gh(e=>this.handleINP(e),{reportAllChanges:!0})}handleLCP(e){var t,n;let i=e.attribution,s={element:i?.element,url:i?.url,timeToFirstByte:i?.timeToFirstByte,resourceLoadDelay:i?.resourceLoadDelay,resourceLoadTime:i?.resourceLoadDuration,elementRenderDelay:i?.elementRenderDelay};if(i?.lcpResourceEntry){let o=la(i?.lcpResourceEntry);s.lcpResourceEntry=this.resourceEventIds.get(o)}this.navigationEventId&&(s.navigationEntry=this.navigationEventId),(t=this.context)===null||t===void 0||t.record(Lf,{version:"1.0.0",value:e.value,attribution:s}),(n=this.context)===null||n===void 0||n.eventBus.unsubscribe(Mt.EVENT,this.handleEvent),this.resourceEventIds.clear(),this.navigationEventId=void 0}handleCLS(e){let t=e.attribution,{record:n,recordCandidate:i}=this.context;(this.config.reportAllCLS?n:i)(jf,{version:"1.0.0",value:e.value,attribution:{largestShiftTarget:t?.largestShiftTarget,largestShiftValue:t?.largestShiftValue,largestShiftTime:t?.largestShiftTime,loadState:t?.loadState}})}handleFID(e){var t;let n=e.attribution;(t=this.context)===null||t===void 0||t.record($f,{version:"1.0.0",value:e.value,attribution:{eventTarget:n?.eventTarget,eventType:n?.eventType,eventTime:n?.eventTime,loadState:n?.loadState}})}handleINP(e){let t=e.attribution,{record:n,recordCandidate:i}=this.context;(this.config.reportAllINP?n:i)(Hf,{version:"1.0.0",value:e.value,attribution:{interactionTarget:t?.interactionTarget,interactionTime:t?.interactionTime,nextPaintTime:t?.nextPaintTime,interactionType:t?.interactionType,inputDelay:t?.inputDelay,processingDuration:t?.processingDuration,presentationDelay:t?.presentationDelay,loadState:t?.loadState}})}};var Kv="fetch",Yi=class extends kt{constructor(e){super(Kv),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var t;return((t=this.context.getSession())===null||t===void 0?void 0:t.record)||!1},this.beginTrace=(t,n,i)=>{let s=Ot(),o=Ju(t,n,!0),c=mi(this.config.logicalServiceName,s,this.context.config.enableW3CTraceId),a=gi(yi(t),s,o);return c.subsegments.push(a),this.isTraceIdHeaderEnabled(t)&&this.addXRayTraceIdHeader(t,n,i,c),c},this.addXRayTraceIdHeader=(t,n,i,s)=>{if(t.headers)return ef(t.headers,s.trace_id,s.subsegments[0].id,this.context.config.enableW3CTraceId);n||(n={},[].push.call(i,n)),Zu(n,s.trace_id,s.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(t,n,i)=>{if(t){let s=Ot();if(t.subsegments[0].end_time=s,t.end_time=s,n){t.subsegments[0].http.response={status:n.status},rr(n.status)?(t.subsegments[0].throttle=!0,t.throttle=!0):di(n.status)?(t.subsegments[0].error=!0,t.error=!0):tr(n.status)&&(t.subsegments[0].fault=!0,t.fault=!0);
13let o=n.headers.get("Content-Length"),c=o?parseInt(o,10):NaN;isNaN(c)||(t.subsegments[0].http.response.content_length=c)}i&&(t.fault=!0,t.subsegments[0].fault=!0,i instanceof Object?this.appendErrorCauseFromObject(t.subsegments[0],i):ha(i)&&this.appendErrorCauseFromPrimitive(t.subsegments[0],i.toString())),this.context.record(_i,t)}},this.createHttpEvent=(t,n)=>{let i=t;return{version:"1.0.0",request:{url:Qr(t),method:n?.method?n.method:i.method?i.method:"GET"}}},this.recordHttpEventWithResponse=(t,n)=>{(this.config.recordAllRequests||!n.ok)&&(t.response={status:n.status,statusText:n.statusText},this.context.record(sr,t))},this.recordHttpEventWithError=(t,n)=>{t.error=cr({type:"error",error:n},this.config.stackTraceLength),this.context.record(sr,t)},this.fetch=(t,n,i,s,o)=>{let c=this.createHttpEvent(s,o),a;if(!pi(Qr(s),this.config))return t.apply(n,i);let l=tf(s.headers,this.context.config.enableW3CTraceId);return l.traceId&&l.segmentId?(c.trace_id=l.traceId,c.segment_id=l.segmentId):this.isTracingEnabled()&&this.isSessionRecorded()&&(a=this.beginTrace(s,o,i),c.trace_id=a.trace_id,c.segment_id=a.subsegments[0].id),t.apply(n,i).then(u=>(this.endTrace(a,u,void 0),this.recordHttpEventWithResponse(c,u),u)).catch(u=>{throw this.endTrace(a,void 0,u),this.recordHttpEventWithError(c,u),u})},this.fetchWrapper=()=>{let t=this;return n=>function(i,s){return t.fetch(n,this,arguments,i,s)}},this.config=Object.assign(Object.assign({},hi),e)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(e){let t=Qr(e);return fi(t,this.config.addXRayTraceIdHeader)}appendErrorCauseFromPrimitive(e,t){e.cause={exceptions:[{type:t}]}}appendErrorCauseFromObject(e,t){e.cause={exceptions:[{type:t.name,message:t.message}]}}};var Qi=class extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}};var Xv="xhr",Ki=class extends kt{constructor(e){super(Xv),this.addXRayTraceIdHeader=t=>fi(t,this.config.addXRayTraceIdHeader),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var t;return((t=this.context.getSession())===null||t===void 0?void 0:t.record)||!1},this.handleXhrLoadEvent=t=>{let n=t.target,i=this.xhrMap.get(n);if(i){let s=Ot();i.trace.end_time=s,i.trace.subsegments[0].end_time=s,i.trace.subsegments[0].http.response={status:n.status},rr(n.status)?(i.trace.subsegments[0].throttle=!0,i.trace.throttle=!0):di(n.status)?(i.trace.subsegments[0].error=!0,i.trace.error=!0):tr(n.status)&&(i.trace.subsegments[0].fault=!0,i.trace.fault=!0);let o=n.getResponseHeader("Content-Length"),c=o?parseInt(o,10):NaN;isNaN(c)||(i.trace.subsegments[0].http.response.content_length=c),this.recordTraceEvent(i.trace),this.recordHttpEventWithResponse(i,n)}},this.handleXhrErrorEvent=t=>{let n=t.target,i=this.xhrMap.get(n),s="XMLHttpRequest error",o=n.statusText?n.status.toString()+": "+n.statusText:n.status.toString();if(i){let c=Ot();i.trace.fault=!0,i.trace.end_time=c,i.trace.subsegments[0].end_time=c,i.trace.subsegments[0].fault=!0,i.trace.subsegments[0].cause={exceptions:[{type:s,message:o}]},this.recordTraceEvent(i.trace),this.recordHttpEventWithError(i,n,new Qi(o))}},this.handleXhrAbortEvent=t=>{let n=t.target,i=this.xhrMap.get(n);i&&this.handleXhrDetailsOnError(i,n,"XMLHttpRequest abort")},this.handleXhrTimeoutEvent=t=>{let n=t.target,i=this.xhrMap.get(n),s="XMLHttpRequest timeout";this.handleXhrDetailsOnError(i,n,s)},this.initializeTrace=t=>{let n=Ot();t.trace=mi(this.config.logicalServiceName,n,this.context.config.enableW3CTraceId),t.trace.subsegments.push(gi(yi(t.url),n,{request:{method:t.method,url:t.url,traced:!0}}))},this.sendWrapper=()=>{let t=this;return n=>function(){let i=t.xhrMap.get(this);return i&&(this.addEventListener("load",t.handleXhrLoadEvent),this.addEventListener("error",t.handle
13XhrErrorEvent),this.addEventListener("abort",t.handleXhrAbortEvent),this.addEventListener("timeout",t.handleXhrTimeoutEvent),t.initializeTrace(i),!t.isSyntheticsUA&&t.isTracingEnabled()&&t.addXRayTraceIdHeader(i.url)&&t.isSessionRecorded()&&(t.context.config.enableW3CTraceId?this.setRequestHeader(Yr,bi(i.trace.trace_id,i.trace.subsegments[0].id)):this.setRequestHeader(qr,vi(i.trace.trace_id,i.trace.subsegments[0].id)))),n.apply(this,arguments)}},this.openWrapper=()=>{let t=this;return n=>function(i,s,o){return pi(s,t.config)&&t.xhrMap.set(this,{url:s,method:i,async:o}),n.apply(this,arguments)}},this.config=Object.assign(Object.assign({},hi),e),this.xhrMap=new Map,this.isSyntheticsUA=navigator.userAgent.includes("CloudWatchSynthetics")}onload(){this.enable()}get patches(){return[{nodule:XMLHttpRequest.prototype,name:"send",wrapper:this.sendWrapper},{nodule:XMLHttpRequest.prototype,name:"open",wrapper:this.openWrapper}]}handleXhrDetailsOnError(e,t,n){if(e){let i=Ot();e.trace.end_time=i,e.trace.subsegments[0].end_time=i,e.trace.subsegments[0].error=!0,e.trace.subsegments[0].cause={exceptions:[{type:n}]},this.recordTraceEvent(e.trace),this.recordHttpEventWithError(e,t,n)}}statusOk(e){return e>=200&&e<300}recordHttpEventWithResponse(e,t){this.xhrMap.delete(t);let n={version:"1.0.0",request:{method:e.method,url:e.url},response:{status:t.status,statusText:t.statusText}};this.isTracingEnabled()&&(n.trace_id=e.trace.trace_id,n.segment_id=e.trace.subsegments[0].id),(this.config.recordAllRequests||!this.statusOk(t.status))&&this.context.record(sr,n)}recordHttpEventWithError(e,t,n){this.xhrMap.delete(t);let i={version:"1.0.0",request:{method:e.method,url:e.url},error:cr({type:"error",error:n},this.config.stackTraceLength)};this.isTracingEnabled()&&(i.trace_id=e.trace.trace_id,i.segment_id=e.trace.subsegments[0].id),this.context.record(sr,i)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(_i,e)}};var Jv=Object.defineProperty,Zv=(r,e,t)=>e in r?Jv(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,O=(r,e,t)=>Zv(r,typeof e!="symbol"?e+"":e,t),wh,eb=Object.defineProperty,tb=(r,e,t)=>e in r?eb(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,xh=(r,e,t)=>tb(r,typeof e!="symbol"?e+"":e,t),Re=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(Re||{}),Rh={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ch={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Xi={},rb=()=>!!globalThis.Zone;function Oc(r){if(Xi[r])return Xi[r];let e=globalThis[r],t=e.prototype,n=r in Rh?Rh[r]:void 0,i=Boolean(n&&n.every(c=>{var a,l;return Boolean((l=(a=Object.getOwnPropertyDescriptor(t,c))==null?void 0:a.get)==null?void 0:l.toString().includes("[native code]"))})),s=r in Ch?Ch[r]:void 0,o=Boolean(s&&s.every(c=>{var a;return typeof t[c]=="function"&&((a=t[c])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!rb())return Xi[r]=e.prototype,e.prototype;try{let c=document.createElement("iframe");document.body.appendChild(c);let a=c.contentWindow;if(!a)return e.prototype;let l=a[r].prototype;return document.body.removeChild(c),l?Xi[r]=l:t}catch{return t}}var Ta={};function Rt(r,e,t){var n;let i=`${r}.${String(t)}`;if(Ta[i])return Ta[i].call(e);let s=Oc(r),o=(n=Object.getOwnPropertyDescriptor(s,t))==null?void 0:n.get;return o?(Ta[i]=o,o.call(e)):e[t]}var Pa={};function bd(r,e,t){let n=`${r}.${String(t)}`;if(Pa[n])return Pa[n].bind(e);let s=Oc(r)[t];return typeof s!="function"?e[t]:(Pa[n]=s,s.bind(e))}function nb(r){return Rt("Node",r,"ownerDocument")}function ib(r){return Rt("Node",r,"childNodes")}function sb(r){return Rt("Node",r,"parentNode")}function ob(r){return Rt("Node",r,"parentElement")}function ab(r){return Rt("Node",r,"textContent")}function cb(r,e){return bd("Node",r,"contains")(e)}function lb(r){return bd("Node",r,"getRootNode")()}function ub(r){return!r||!("host"in r)?null:Rt("ShadowRoot",r,"host")}function fb(r){return r.styleSheets}function hb(r){return!r||!("shadowRoot"in r)?null:Rt("Element",r,"shadowRoot")}function db(r,e){return Rt("Element",r,"querySelector")(e)}function pb(r,e){return Rt("Element",r,"querySelectorAll")(e)}function mb(){return Oc("MutationObserver").constructor}function gb(r,e,t){try{if(!(e in r))return()=>{};let n=r[e],i=t(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=i,()=>{r[e]=n}}catch{return()=>{}}}var Pe={ownerDocument:nb,childNodes:ib,parentNode:sb,parentElement:ob,textContent:ab,contains:cb,getRootNode:lb,host:ub,styleSheets:fb,shadowRoot:hb,querySelector:db,querySelectorAll:pb,mutationObserver:mb,patch:gb};function Sd(r){return r.nodeType===r.ELEMENT_NODE}function vn(r){let e=r&&"host"in r&&"mode"in r&&Pe.host(r)||null;return Boolean(e&&"shadowRoot"in e&&Pe.shadowRoot(e)===r)}function bn(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}function yb(r){return r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}function vb(r){let{cssText:e}=r;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(r.href)})`];return r.layerName===""?t.push("layer"):r.layerName&&t.push(`layer(${r.layerName})`),r.supportsText&&t.push(`supports(${r.supportsText})`),r.media.length&&t.push(r.media.mediaText),t.join(" ")+";"}function Ba(r){try{let e=r.rules||r.cssRules;if(!e)return null;let t=r.href;!t&&r.ownerNode&&(t=r.ownerNode.baseURI);let n=Array.from(e,i=>wd(i,t)).join("");
vendor: 4,681 bytes, line 13
13return yb(n)}catch{return null}}function wd(r,e){if(Sb(r)){let t;try{t=Ba(r.styleSheet)||vb(r)}catch{t=r.cssText}return r.styleSheet.href?Ps(t,r.styleSheet.href):t}else{let t=r.cssText;return wb(r)&&r.selectorText.includes(":")&&(t=bb(t)),e?Ps(t,e):t}}function bb(r){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}function Sb(r){return"styleSheet"in r}function wb(r){return"selectorText"in r}var Is=class{constructor(){xh(this,"idNodeMap",new Map),xh(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function xb(){return new Is}function As({element:r,maskInputOptions:e,tagName:t,type:n,value:i,maskInputFn:s}){let o=i||"",c=n&&Gt(n);return(e[t.toLowerCase()]||c&&e[c])&&(s?o=s(o,r):o="*".repeat(o.length)),o}function Gt(r){return r.toLowerCase()}var Eh="__rrweb_original__";function Rb(r){let e=r.getContext("2d");if(!e)return!0;let t=50;for(let n=0;n<r.width;n+=t)for(let i=0;i<r.height;i+=t){let s=e.getImageData,o=Eh in s?s[Eh]:s;if(new Uint32Array(o.call(e,n,i,Math.min(t,r.width-n),Math.min(t,r.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Ts(r){let e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?Gt(e):null}function xd(r,e){let t;try{t=new URL(r,e??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(n);return i?.[1]??null}function Cb(r){let e="";return r.indexOf("//")>-1?e=r.split("/").slice(0,3).join("/"):e=r.split("/")[0],e=e.split("?")[0],e}var Eb=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ib=/^(?:[a-z+]+:)?\/\//i,Ab=/^www\..*/i,Tb=/^(data:)([^,]*),(.*)/i;function Ps(r,e){return(r||"").replace(Eb,(t,n,i,s,o,c)=>{let a=i||o||c,l=n||s||"";if(!a)return t;if(Ib.test(a)||Ab.test(a))return`url(${l}${a}${l})`;if(Tb.test(a))return`url(${l}${a}${l})`;if(a[0]==="/")return`url(${l}${Cb(e)+a}${l})`;let u=e.split("/"),h=a.split("/");u.pop();for(let m of h)m!=="."&&(m===".."?u.pop():u.push(m));return`url(${l}${u.join("/")}${l})`})}function Ji(r,e=!1){return e?r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Pb(r,e,t=!1){let n=Array.from(e.childNodes),i=[],s=0;if(n.length>1&&r&&typeof r=="string"){let o=Ji(r,t),c=o.length/r.length;for(let a=1;a<n.length;a++)if(n[a].textContent&&typeof n[a].textContent=="string"){let l=Ji(n[a].textContent,t),u=100,h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,h),1)!==-1);h++);for(;h<l.length;h++){let m=l.substring(0,h),b=o.split(m),g=-1;if(b.length===2)g=b[0].length;else if(b.length>2&&b[0]===""&&n[a-1].textContent!=="")g=o.indexOf(m,1);else if(b.length===1){if(m=m.substring(0,m.length-1),b=o.split(m),b.length<=1)return i.push(r),i;h=u+1}else h===l.length-1&&(g=o.indexOf(m));if(b.length>=2&&h>u){let S=n[a-1].textContent;if(S&&typeof S=="string"){let v=Ji(S).length;g=o.indexOf(m,v)}g===-1&&(g=b[0].length)}if(g!==-1){let S=Math.floor(g/c);for(;S>0&&S<r.length;){if(s+=1,s>50*n.length)return i.push(r),i;let v=Ji(r.substring(0,S),t);if(v.length===g){i.push(r.substring(0,S)),r=r.substring(S),o=o.substring(g);break}else v.length<g?S+=Math.max(1,Math.floor((g-v.length)/c)):S-=Math.max(1,Math.floor((v.length-g)*c))}break}}}}return i.push(r),i}function Ob(r,e){return Pb(r,e).join("/* rr_split */")}var _b=1,Mb=new RegExp("[^a-z0-9-_:]"),wn=-2;function Rd(){return _b++}function Fb(r){if(r instanceof HTMLFormElement)return"form";let e=Gt(r.tagName);return Mb.test(e)?"div":e}var gr,Ih,kb=/^[^ \t\n\r\u000c]+/,Nb=/^[, \t\n\r\u000c]+/;function Db(r,e){if(e.trim()==="")return e;let t=0;function n(s){let o,c=s.exec(e.substring(t));return c?(o=c[0],t+=o.length,o):""}let i=[];for(;n(Nb),!(t>=e.length);){let s=n(kb);if(s.slice(-1)===",")s=br(r,s.substring(0,s.length-1)),i.push(s);else{let o="";s=br(r,s);let c=!1;for(;;){let a=e.charAt(t);if(a===""){i.push((s+o).trim());break}else if(c)a===")"&&(c=!1);else if(a===","){t+=1,i.push((s+o).trim());break}else a==="("&&(c=!0);o+=a,t+=1}}}return i.join(", ")}var Ah=new WeakMap;function br(r,e){return!e||e.trim()===""?e:_c(r,e)}
vendor: 9,538 bytes, line 13
13function Lb(r){return Boolean(r.tagName==="svg"||r.ownerSVGElement)}function _c(r,e){let t=Ah.get(r);if(t||(t=r.createElement("a"),Ah.set(r,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Cd(r,e,t,n){return n&&(t==="src"||t==="href"&&!(e==="use"&&n[0]==="#")||t==="xlink:href"&&n[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?br(r,n):t==="srcset"?Db(r,n):t==="style"?Ps(n,_c(r)):e==="object"&&t==="data"?br(r,n):n)}function Ed(r,e,t){return["video","audio"].includes(r)&&e==="autoplay"}function $b(r,e,t){try{if(typeof e=="string"){if(r.classList.contains(e))return!0}else for(let n=r.classList.length;n--;){let i=r.classList[n];if(e.test(i))return!0}if(t)return r.matches(t)}catch{}return!1}function Os(r,e,t){if(!r)return!1;if(r.nodeType!==r.ELEMENT_NODE)return t?Os(Pe.parentNode(r),e,t):!1;for(let n=r.classList.length;n--;){let i=r.classList[n];if(e.test(i))return!0}return t?Os(Pe.parentNode(r),e,t):!1}function Id(r,e,t,n){let i;if(Sd(r)){if(i=r,!Pe.childNodes(i).length)return!1}else{if(Pe.parentElement(r)===null)return!1;i=Pe.parentElement(r)}try{if(typeof e=="string"){if(n){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Os(i,e,n))return!0;if(t){if(n){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function jb(r,e,t){let n=r.contentWindow;if(!n)return;let i=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){let c=setTimeout(()=>{i||(e(),i=!0)},t);r.addEventListener("load",()=>{clearTimeout(c),i=!0,e()});return}let o="about:blank";if(n.location.href!==o||r.src===o||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e)}function Hb(r,e,t){let n=!1,i;try{i=r.sheet}catch{return}if(i)return;let s=setTimeout(()=>{n||(e(),n=!0)},t);r.addEventListener("load",()=>{clearTimeout(s),n=!0,e()})}function Ub(r,e){let{doc:t,mirror:n,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:c,maskInputOptions:a={},maskTextFn:l,maskInputFn:u,dataURLOptions:h={},inlineImages:m,recordCanvas:b,keepIframeSrcFn:g,newlyAddedElement:S=!1,cssCaptured:v=!1}=e,I=Bb(t,n);switch(r.nodeType){case r.DOCUMENT_NODE:return r.compatMode!=="CSS1Compat"?{type:Re.Document,childNodes:[],compatMode:r.compatMode}:{type:Re.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return{type:Re.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:I};case r.ELEMENT_NODE:return zb(r,{doc:t,blockClass:i,blockSelector:s,inlineStylesheet:c,maskInputOptions:a,maskInputFn:u,dataURLOptions:h,inlineImages:m,recordCanvas:b,keepIframeSrcFn:g,newlyAddedElement:S,rootId:I});case r.TEXT_NODE:return Wb(r,{doc:t,needsMask:o,maskTextFn:l,rootId:I,cssCaptured:v});case r.CDATA_SECTION_NODE:return{type:Re.CDATA,textContent:"",rootId:I};case r.COMMENT_NODE:return{type:Re.Comment,textContent:Pe.textContent(r)||"",rootId:I};default:return!1}}function Bb(r,e){if(!e.hasNode(r))return;let t=e.getId(r);return t===1?void 0:t}function Wb(r,e){let{needsMask:t,maskTextFn:n,rootId:i,cssCaptured:s}=e,o=Pe.parentNode(r),c=o&&o.tagName,a="",l=c==="STYLE"?!0:void 0,u=c==="SCRIPT"?!0:void 0;return u?a="SCRIPT_PLACEHOLDER":s||(a=Pe.textContent(r),l&&a&&(a=Ps(a,_c(e.doc)))),!l&&!u&&a&&t&&(a=n?n(a,Pe.parentElement(r)):a.replace(/[\S]/g,"*")),{type:Re.Text,textContent:a||"",rootId:i}}function zb(r,e){let{doc:t,blockClass:n,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:c,dataURLOptions:a={},inlineImages:l,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:b}=e,g=$b(r,n,i),S=Fb(r),v={},I=r.attributes.length;for(let x=0;x<I;x++){let F=r.attributes[x];Ed(S,F.name,F.value)||(v[F.name]=Cd(t,S,Gt(F.name),F.value))}if(S==="link"&&s){let x=Array.from(t.styleSheets).find(M=>M.href===r.href),F=null;x&&(F=Ba(x)),F&&(delete v.rel,delete v.href,v._cssText=F)}if(S==="style"&&r.sheet){let x=Ba(r.sheet);x&&(r.childNodes.length>1&&(x=Ob(x,r)),v._cssText=x)}if(["input","textarea","select"].includes(S)){let x=r.value,F=r.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&x?v.value=As({element:r,type:Ts(r),tagName:S,value:x,maskInputOptions:o,maskInputFn:c}):F&&(v.checked=F)}if(S==="option"&&(r.selected&&!o.select?v.selected=!0:delete v.selected),S==="dialog"&&r.open&&(v.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal"),S==="canvas"&&u){if(r.__context==="2d")Rb(r)||(v.rr_dataURL=r.toDataURL(a.type,a.quality));else if(!("__context"in r)){let x=r.toDataURL(a.type,a.quality),F=t.createElement("canvas");F.width=r.width,F.height=r.height;let M=F.toDataURL(a.type,a.quality);x!==M&&(v.rr_dataURL=x)}}if(S==="img"&&l){gr||(gr=t.createElement("canvas"),Ih=gr.getContext("2d"));let x=r,F=x.currentSrc||x.getAttribute("src")||"<unknown-src>",M=x.crossOrigin,N=()=>{x.removeEventListener("load",N);try{gr.width=x.naturalWidth,gr.height=x.naturalHeight,Ih.drawImage(x,0,0),v.rr_dataURL=gr.toDataURL(a.type,a.quality)}catch(G){if(x.crossOrigin!=="anonymous"){x.crossOrigin="anonymous",x.complete&&x.naturalWidth!==0?N():x.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${F}! Error: ${G}`)}x.crossOrigin==="anonymous"&&(M?v.crossOrigin=M:x.removeAttribute("crossorigin"))};x.complete&&x.naturalWidth!==0?N():x.addEventListener("load",N)}if(["audio","video"].includes(S)){let x=v;x.rr_mediaState=r.paused?"paused":"played",x.rr_mediaCurrentTime=r.currentTime,x.rr_mediaPlaybackRate=r.playbackRate,x.rr_mediaMuted=r.muted,x.rr_mediaLoop=r.loop,x.rr_mediaVolume=r.volume}if(m||(r.scrollLeft&&(v.rr_scrollLeft=r.scrollLeft),r.scrollTop&&(v.rr_scrollTop=r.scrollTop)),g){let{width:x,height:F}=r.getBoundingClientRect();v={class:v.class,rr_width:`${x}px`,rr_height:`${F}px`}}S==="iframe"&&!h(v.src)&&(r.contentDocument||(v.rr_src=v.src),delete v.src);let A;try{customElements.get(S)&&(A=!0)}catch{}return{type:Re.Element,tagName:S,attributes:v,childNodes:[],isSVG:Lb(r)||void 0,needBlock:g,rootId:b,isCustom:A}}function le(r){return r==null?"":r.toLowerCase()}function Ad(r){return r===!0||r==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:r==="all",headMetaDescKeywords:r==="all",headTitleMutations:r==="all"}:r||{}}function Vb(r,e){if(e.comment&&r.type===Re.Comment)return!0;if(r.type===Re.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&xd(r.attributes.href)==="js"))return!0;if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&(le(r.attributes.name).match(/^msapplication-tile(image|color)$/)||le(r.attributes.name)==="application-name"||le(r.attributes.rel)==="icon"||le(r.attributes.rel)==="apple-touch-icon"||le(r.attributes.rel)==="shortcut icon")))return!0;if(r.tagName==="meta"){if(e.headMetaDescKeywords&&le(r.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(le(r.attributes.property).match(/^(og|twitter|fb):/)||le(r.attributes.name).match(/^(og|twitter):/)||le(r.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(le(r.attributes.name)==="robots"||le(r.attributes.name)==="googlebot"||le(r.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(le(r.attributes.name)==="author"||le(r.attributes.name)==="generator"||le(r.attributes.name)==="framework"||le(r.attributes.name)==="publisher"||le(r.attributes.name)==="progid"||le(r.attributes.property).match(/^article:/)||le(r.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(le(r.attributes.name)==="google-site-verification"||le(r.attributes.name)==="yandex-verification"||le(r.attributes.name)==="csrf-token"||le(r.attributes.name)==="p:domain_verify"||le(r.attributes.name)==="verify-v1"||le(r.attributes.name)==="verification"||le(r.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Sr(r,e){let{doc:t,mirror:n,blockClass:i,blockSelector:s,maskTextClass:o,maskTextSelector:c,skipChild:a=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:m,slimDOMOptions:b,dataURLOptions:g={},inlineImages:S=!1,recordCanvas:v=!1,onSerialize:I,onIframeLoad:A,iframeLoadTimeout:x=5e3,onStylesheetLoad:F,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:G=!1,cssCaptured:$=!1}=e,{needsMask:L}=e,{preserveWhiteSpace:Q=!0}=e;L||(L=Id(r,o,c,L===void 0));let re=Ub(r,{doc:t,mirror:n,blockClass:i,blockSelector:s,needsMask:L,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:m,dataURLOptions:g,inlineImages:S,recordCanvas:v,keepIframeSrcFn:N,newlyAddedElement:G,cssCaptured:$});if(!re)return console.warn(r,"not serialized"),null;let ue;n.hasNode(r)?ue=n.getId(r):Vb(re,b)||!Q&&re.type===Re.Text&&!re.textContent.replace(/^\s+|\s+$/gm,"").length?ue=wn:ue=Rd();let j=Object.assign(re,{id:ue});if(n.add(r,j),ue===wn)return null;I&&I(r);let Qe=!a;if(j.type===Re.Element){Qe=Qe&&!j.needBlock,delete j.needBlock;let se=Pe.shadowRoot(r);se&&bn(se)&&(j.isShadowHost=!0)}if((j.type===Re.Document||j.type===Re.Element)&&Qe){b.headWhitespace&&j.type===Re.Element&&j.tagName==="head"&&(Q=!1);let se={doc:t,mirror:n,blockClass:i,blockSelector:s,needsMask:L,maskTextClass:o,maskTextSelector:c,skipChild:a,inlineStylesheet:l,maskInputOptions:u,maskTextFn:
vendor: 9,401 bytes, lines 13-29
13h,maskInputFn:m,slimDOMOptions:b,dataURLOptions:g,inlineImages:S,recordCanvas:v,preserveWhiteSpace:Q,onSerialize:I,onIframeLoad:A,iframeLoadTimeout:x,onStylesheetLoad:F,stylesheetLoadTimeout:M,keepIframeSrcFn:N,cssCaptured:!1};if(!(j.type===Re.Element&&j.tagName==="textarea"&&j.attributes.value!==void 0)){j.type===Re.Element&&j.attributes._cssText!==void 0&&typeof j.attributes._cssText=="string"&&(se.cssCaptured=!0);for(let oe of Array.from(Pe.childNodes(r))){let Ie=Sr(oe,se);Ie&&j.childNodes.push(Ie)}}let Z=null;if(Sd(r)&&(Z=Pe.shadowRoot(r)))for(let oe of Array.from(Pe.childNodes(Z))){let Ie=Sr(oe,se);Ie&&(bn(Z)&&(Ie.isShadow=!0),j.childNodes.push(Ie))}}let ct=Pe.parentNode(r);return ct&&vn(ct)&&bn(ct)&&(j.isShadow=!0),j.type===Re.Element&&j.tagName==="iframe"&&jb(r,()=>{let se=r.contentDocument;if(se&&A){let Z=Sr(se,{doc:se,mirror:n,blockClass:i,blockSelector:s,needsMask:L,maskTextClass:o,maskTextSelector:c,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:b,dataURLOptions:g,inlineImages:S,recordCanvas:v,preserveWhiteSpace:Q,onSerialize:I,onIframeLoad:A,iframeLoadTimeout:x,onStylesheetLoad:F,stylesheetLoadTimeout:M,keepIframeSrcFn:N});Z&&A(r,Z)}},x),j.type===Re.Element&&j.tagName==="link"&&typeof j.attributes.rel=="string"&&(j.attributes.rel==="stylesheet"||j.attributes.rel==="preload"&&typeof j.attributes.href=="string"&&xd(j.attributes.href)==="css")&&Hb(r,()=>{if(F){let se=Sr(r,{doc:t,mirror:n,blockClass:i,blockSelector:s,needsMask:L,maskTextClass:o,maskTextSelector:c,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:b,dataURLOptions:g,inlineImages:S,recordCanvas:v,preserveWhiteSpace:Q,onSerialize:I,onIframeLoad:A,iframeLoadTimeout:x,onStylesheetLoad:F,stylesheetLoadTimeout:M,keepIframeSrcFn:N});se&&F(r,se)}},M),j}function Gb(r,e){let{mirror:t=new Is,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:a=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:m,slimDOM:b=!1,dataURLOptions:g,preserveWhiteSpace:S,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:A,onStylesheetLoad:x,stylesheetLoadTimeout:F,keepIframeSrcFn:M=()=>!1}=e||{},N=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,G=Ad(b);return Sr(r,{doc:r,mirror:t,blockClass:n,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:N,maskTextFn:h,maskInputFn:m,slimDOMOptions:G,dataURLOptions:g,inlineImages:a,recordCanvas:l,preserveWhiteSpace:S,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:A,onStylesheetLoad:x,stylesheetLoadTimeout:F,keepIframeSrcFn:M,newlyAddedElement:!1})}function qb(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Yb(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Mc={exports:{}},fe=String,Td=function(){return{isColorSupported:!1,reset:fe,bold:fe,dim:fe,italic:fe,underline:fe,inverse:fe,hidden:fe,strikethrough:fe,black:fe,red:fe,green:fe,yellow:fe,blue:fe,magenta:fe,cyan:fe,white:fe,gray:fe,bgBlack:fe,bgRed:fe,bgGreen:fe,bgYellow:fe,bgBlue:fe,bgMagenta:fe,bgCyan:fe,bgWhite:fe}};Mc.exports=Td();Mc.exports.createColors=Td;var Qb=Mc.exports,Kb={},Xb=Object.freeze(Object.defineProperty({__proto__:null,default:Kb},Symbol.toStringTag,{value:"Module"})),it=Yb(Xb),Th=Qb,Ph=it,Wa=class Pd extends Error{constructor(e,t,n,i,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof n<"u"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Pd)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Th.isColorSupported),Ph&&e&&(t=Ph(t));let n=t.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,n.length),o=String(s).length,c,a;if(e){let{bold:l,gray:u,red:h}=Th.createColors(!0);c=m=>l(h(m)),a=m=>u(m)}else c=a=l=>l;return n.slice(i,s).map((l,u)=>{let h=i+1+u,m=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let b=a(m.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return c(">")+a(m)+l+` 14 `+b+c("^")}return" "+a(m)+l}).join(` 15`)}toString(){let e=this.showSourceCode();return e&&(e=` 16 17`+e+` 18`),this.name+": "+this.message+e}},Fc=Wa;Wa.default=Wa;var Mn={};Mn.isClean=Symbol("isClean");Mn.my=Symbol("my");var Oh={after:` 19`,beforeClose:` 20`,beforeComment:` 21`,beforeDecl:` 22`,beforeOpen:" ",beforeRule:` 23`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Jb(r){return r[0].toUpperCase()+r.slice(1)}var za=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let s=(e.raws.between||"")+(t?";":"");this.builder(n+i+s,e)}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(n.includes(` 24`)){let o=this.raw(e,null,"indent");if(o.length)for(let c=0;c<s;c++)n+=o}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let s=e.nodes[i],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,t!==i||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,n){let i;if(n||(n=t),t&&(i=e.raws[t],typeof i<"u"))return i;let s=e.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return Oh[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let c="raw"+Jb(n);this[c]?i=this[c](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Oh[n]),o.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return t=n.raws.after,t.includes(` 25`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` 26`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` 27`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return t=n.raws.before,t.includes(` 28`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return t=n.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before<"u"){let s=n.raws.before.split(` 29`);return t=s[s.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let n=e[t],i=e.raws[t];return i&&i.value===n?i.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},Od=za;za.default=za;var Zb=Od;function Va(r,e){new Zb(e).stringify(r)}var Ws=Va;Va.default=Va;var{isClean:Zi,my:eS}
vendor: 1,629 bytes, line 29
29=Mn,tS=Fc,rS=Od,nS=Ws;function Ga(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let i=r[n],s=typeof i;n==="parent"&&s==="object"?e&&(t[n]=e):n==="source"?t[n]=i:Array.isArray(i)?t[n]=i.map(o=>Ga(o,t)):(s==="object"&&i!==null&&(i=Ga(i)),t[n]=i)}return t}var qa=class{constructor(e={}){this.raws={},this[Zi]=!1,this[eS]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Ga(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},t)}return new tS(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}
vendor: 2,032 bytes, lines 29-30
29markDirty(){if(this[Zi]){this[Zi]=!1;let e=this;for(;e=e.parent;)e[Zi]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(n=this.positionInside(i,t))}return n}positionInside(e,t){let n=t||this.toString(),i=this.source.start.column,s=this.source.start.line;for(let o=0;o<e;o++)n[o]===` 30`?(i=1,s+=1):i+=1;return{column:i,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),s=i.indexOf(e.word);s!==-1&&(t=this.positionInside(s,i),n=this.positionInside(s+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new rS().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let i of e)i===this?n=!0:n?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},i=t==null;t=t||new Map;let s=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let c=this[o];if(Array.isArray(c))n[o]=c.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof c=="object"&&c.toJSON)n[o]=c.toJSON(null,t);else if(o==="source"){let a=t.get(c.input);
30a==null&&(a=s,t.set(c.input,s),s++),n[o]={end:c.end,inputId:a,start:c.start}}else n[o]=c}return i&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=nS){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n}),t}warn(e,t,n){let i={node:this};for(let s in n)i[s]=n[s];return e.warn(t,i)}get proxyOf(){return this}},zs=qa;qa.default=qa;var iS=zs,Ya=class extends iS{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Vs=Ya;Ya.default=Ya;var sS="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",oS=(r,e=21)=>(t=e)=>{let n="",i=t;for(;i--;)n+=r[Math.random()*r.length|0];return n},aS=(r=21)=>{let e="",t=r;for(;t--;)e+=sS[Math.random()*64|0];return e},cS={nanoid:aS,customAlphabet:oS},{SourceMapConsumer:_h,SourceMapGenerator:Mh}=it,{existsSync:lS,readFileSync:uS}=it,{dirname:Oa,join:fS}=it;function hS(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}var Qa=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,i=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Oa(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new _h(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(i.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return hS(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)))}loadFile(e){if(this.root=Oa(e),lS(e))return this.mapFile=e,uS(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(t instanceof _h)return Mh.fromSourceMap(t).toString();if(t instanceof Mh)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=fS(Oa(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},_d=Qa;Qa.default=Qa;var{SourceMapConsumer:dS,SourceMapGenerator:pS}=it,{fileURLToPath:Fh,pathToFileURL:es}=it,{isAbsolute:Ka,resolve:Xa}=it,{nanoid:mS}
vendor: 43,720 bytes, lines 30-55
30=cS,_a=it,kh=Fc,gS=_d,Ma=Symbol("fromOffsetCache"),yS=Boolean(dS&&pS),Nh=Boolean(Xa&&Ka),_s=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Nh||/^\w+:\/\//.test(t.from)||Ka(t.from)?this.file=t.from:this.file=Xa(t.from)),Nh&&yS){let n=new gS(this.css,t);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+mS(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let s,o,c;if(t&&typeof t=="object"){let l=t,u=n;if(typeof l.offset=="number"){let h=this.fromOffset(l.offset);t=h.line,n=h.col}else t=l.line,n=l.column;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);o=h.line,c=h.col}else o=u.line,c=u.column}else if(!n){let l=this.fromOffset(t);t=l.line,n=l.col}let a=this.origin(t,n,o,c);return a?s=new kh(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):s=new kh(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:c,line:o},this.css,this.file,i.plugin),s.input={column:n,endColumn:c,endLine:o,line:t,source:this.css},this.file&&(es&&(s.input.url=es(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[Ma])n=this[Ma];else{let s=this.css.split(` 31`);n=new Array(s.length);let o=0;for(let c=0,a=s.length;c<a;c++)n[c]=o,o+=s[c].length+1;this[Ma]=n}t=n[n.length-1];let i=0;if(e>=t)i=n.length-1;else{let s=n.length-2,o;for(;i<s;)if(o=i+(s-i>>1),e<n[o])s=o-1;else if(e>=n[o+1])i=o+1;else{i=o;break}}return{col:e-n[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Xa(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,i){if(!this.map)return!1;let s=this.map.consumer(),o=s.originalPositionFor({column:t,line:e});if(!o.source)return!1;let c;typeof n=="number"&&(c=s.originalPositionFor({column:i,line:n}));let a;Ka(o.source)?a=es(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||es(this.map.mapFile));let l={column:o.column,endColumn:c&&c.column,endLine:c&&c.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Fh)l.file=Fh(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=s.sourceContentFor(o.source);return u&&(l.source=u),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Gs=_s;_s.default=_s;_a&&_a.registerInput&&_a.registerInput(_s);var{SourceMapConsumer:Md,SourceMapGenerator:Ss}=it,{dirname:ws,relative:Fd,resolve:kd,sep:Nd}=it,{pathToFileURL:Dh}=it,vS=Gs,bS=Boolean(Md&&Ss),SS=Boolean(ws&&kd&&Fd&&Nd),wS=class{constructor(e,t,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=` 32`;this.css.includes(`\r 33`)&&(t=`\r 34`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||ws(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Md(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),SS&&bS&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ss.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ss({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ss({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(c,a,l)=>{if(this.css+=c,a&&l!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),s=c.match(/\n/g),s?(e+=s.length,o=c.lastIndexOf(` 35`),t=c.length-o):t+=c.length,a&&l!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?ws(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=ws(kd(n,this.mapOpts.annotation)));let i=Fd(n,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new vS(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Dh){let n=Dh(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Nd==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},Dd=wS,xS=zs,Ja=class extends xS{constructor(e){super(e),this.type="comment"}},qs=Ja;Ja.default=Ja;var{isClean:Ld,my:$d}=Mn,jd=Vs,Hd=qs,RS=zs,Ud,kc,Nc,Bd;function Wd(r){return r.map(e=>(e.nodes&&(e.nodes=Wd(e.nodes)),delete e.source,e))}function zd(r){if(r[Ld]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)zd(e)}var wt=class Vd extends RS{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],i=e(this.proxyOf.nodes[n],n),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(i=>typeof i=="function"?(s,o)=>i(s.toProxy(),o):i)):t==="every"||t==="some"?n=>e[t]((i,...s)=>n(i.toProxy(),...s)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],n<s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),i=n===0?"prepend":!1,s=this.normalize(t,this.proxyOf.nodes[n],i).reverse();n=this.index(e);for(let c of s)this.proxyOf.nodes.splice(n,0,c);let o;for(let c in this.indexes)o=this.indexes[c],n<=o&&(this.indexes[c]=o+s.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Wd(Ud(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new jd(e)]}else if(e.selector)e=[new kc(e)];else if(e.name)e=[new Nc(e)];else if(e.text)e=[new Hd(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[$d]||Vd.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ld]&&zd(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let i;try{i=e(t,n)}catch(s){throw t.addToError(s)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="atrule")return t(n,i)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="decl")return t(n,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="rule")return t(n,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};wt.registerParse=r=>{Ud=r};wt.registerRule=r=>{kc=r};wt.registerAtRule=r=>{Nc=r};wt.registerRoot=r=>{Bd=r};var qt=wt;wt.default=wt;wt.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,Nc.prototype):r.type==="rule"?Object.setPrototypeOf(r,kc.prototype):r.type==="decl"?Object.setPrototypeOf(r,jd.prototype):r.type==="comment"?Object.setPrototypeOf(r,Hd.prototype):r.type==="root"&&Object.setPrototypeOf(r,Bd.prototype),r[$d]=!0,r.nodes&&r.nodes.forEach(e=>{wt.rebuild(e)})};var CS=qt,Gd,qd,xn=class extends CS{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Gd(new qd,this,e).stringify()}};xn.registerLazyResult=r=>{Gd=r};xn.registerProcessor=r=>{qd=r};var Dc=xn;xn.default=xn;var Za=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Yd=Za;Za.default=Za;var ES=Yd,ec=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new ES(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Lc=ec;ec.default=ec;var Fa="'".charCodeAt(0),Lh='"'.charCodeAt(0),ts="\\".charCodeAt(0),$h="/".charCodeAt(0),rs=` 36`.charCodeAt(0),dn=" ".charCodeAt(0),ns="\f".charCodeAt(0),is=" ".charCodeAt(0),ss="\r".charCodeAt(0),IS="[".charCodeAt(0),AS="]".charCodeAt(0),TS="(".charCodeAt(0),PS=")".charCodeAt(0),OS="{".charCodeAt(0),_S="}".charCodeAt(0),MS=";".charCodeAt(0),FS="*".charCodeAt(0),kS=":".charCodeAt(0),NS="@".charCodeAt(0),os=/[\t\n\f\r "#'()/;[\\\]{}]/g,as=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,DS=/.[\r\n"'(/\\]/,jh=/[\da-f]/i,LS=function(e,t={}){let n=e.css.valueOf(),i=t.ignoreErrors,s,o,c,a,l,u,h,m,b,g,S=n.length,v=0,I=[],A=[];function x(){return v}function F($){throw e.error("Unclosed "+$,v)}function M(){return A.length===0&&v>=S}function N($){if(A.length)return A.pop();if(v>=S)return;let L=$?$.ignoreUnclosed:!1;switch(s=n.charCodeAt(v),s){case rs:case dn:case is:case ss:case ns:{o=v;do o+=1,s=n.charCodeAt(o);while(s===dn||s===rs||s===is||s===ss||s===ns);g=["space",n.slice(v,o)],v=o-1;break}case IS:case AS:case OS:case _S:case kS:case MS:case PS:{let Q=String.fromCharCode(s);g=[Q,Q,v];break}case TS:{if(m=I.length?I.pop()[1]:"",b=n.charCodeAt(v+1),m==="url"&&b!==Fa&&b!==Lh&&b!==dn&&b!==rs&&b!==is&&b!==ns&&b!==ss){o=v;do{if(u=!1,o=n.indexOf(")",o+1),o===-1)if(i||L){o=v;break}else F("bracket");for(h=o;n.charCodeAt(h-1)===ts;)h-=1,u=!u}while(u);g=["brackets",n.slice(v,o+1),v,o],v=o}else o=n.indexOf(")",v+1),a=n.slice(v,o+1),o===-1||DS.test(a)?g=["(","(",v]:(g=["brackets",a,v,o],v=o);break}case Fa:case Lh:{c=s===Fa?"'":'"',o=v;do{if(u=!1,o=n.indexOf(c,o+1),o===-1)if(i||L){o=v+1;break}else F("string");for(h=o;n.charCodeAt(h-1)===ts;)h-=1,u=!u}while(u);g=["string",n.slice(v,o+1),v,o],v=o;break}case NS:{os.lastIndex=v+1,os.test(n),os.lastIndex===0?o=n.length-1:o=os.lastIndex-2,g=["at-word",n.slice(v,o+1),v,o],v=o;break}case ts:{for(o=v,l=!0;n.charCodeAt(o+1)===ts;)o+=1,l=!l;if(s=n.charCodeAt(o+1),l&&s!==$h&&s!==dn&&s!==rs&&s!==is&&s!==ss&&s!==ns&&(o+=1,jh.test(n.charAt(o)))){for(;jh.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===dn&&(o+=1)}g=["word",n.slice(v,o+1),v,o],v=o;break}default:{s===$h&&n.charCodeAt(v+1)===FS?(o=n.indexOf("*/",v+2)+1,o===0&&(i||L?o=n.length:F("comment")),g=["comment",n.slice(v,o+1),v,o],v=o):(as.lastIndex=v+1,as.test(n),as.lastIndex===0?o=n.length-1:o=as.lastIndex-2,g=["word",n.slice(v,o+1),v,o],I.push(g),v=o);break}}return v++,g}function G($){A.push($)}return{back:G,endOfFile:M,nextToken:N,position:x}},Qd=qt,Ms=class extends Qd{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},$c=Ms;Ms.default=Ms;Qd.registerAtRule(Ms);var Kd=qt,Xd,Jd,xr=class extends Kd{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let i=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of i)s.raws.before=t.raws.before}return i}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Xd(new Jd,this,e).stringify()}};xr.registerLazyResult=r=>{Xd=r};xr.registerProcessor=r=>{Jd=r};var Fn=xr;xr.default=xr;Kd.registerRoot(xr);var Rn={comma(r){return Rn.split(r,[","],!0)},space(r){let e=[" ",` 37`," "];return Rn.split(r,e)},split(r,e,t){let n=[],i="",s=!1,o=0,c=!1,a="",l=!1;for(let u of r)l?l=!1:u==="\\"?l=!0:c?u===a&&(c=!1):u==='"'||u==="'"?(c=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(s=!0),s?(i!==""&&n.push(i.trim()),i="",s=!1):i+=u;return(t||i!=="")&&n.push(i.trim()),n}},Zd=Rn;Rn.default=Rn;var ep=qt,$S=Zd,Fs=class extends ep{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return $S.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}},jc=Fs;Fs.default=Fs;ep.registerRule(Fs);var jS=Vs,HS=LS,US=qs,BS=$c,WS=Fn,Hh=jc,Uh={empty:!0,space:!0};function zS(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}var VS=class{constructor(e){this.input=e,this.root=new WS,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new BS;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,s,o=!1,c=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?l.push(n==="("?")":"]"):n==="{"&&l.length>0?l.push("}"):n===l[l.length-1]&&l.pop(),l.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){c=!0;break}else if(n==="}"){if(a.length>0){for(s=a.length-1,i=a[s];i&&i[0]==="space";)i=a[--s];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),c&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,i;for(let s=t-1;s>=0&&(i=e[s],!(i[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,n,i,s;for(let[o,c]of e.entries()){if(n=c,i=n[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!s)this.doubleColon(n);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=n}return!1}comment(e){let t=new US;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=HS(this.input)}decl(e,t){let n=new jS;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||zS(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let l=e[0][0];if(l===":"||l==="space"||l==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){n.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],c;for(;e.length&&(c=e[0][0],!(c!=="space"&&c!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let l=e.length-1;l>=0;l--){if(s=e[l],s[1].toLowerCase()==="!important"){n.important=!0;let u=this.stringFrom(e,l);u=this.spacesFromEnd(e)+u,u!==" !important"&&(n.raws.important=u);break}else if(s[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let m=l;m>0;m--){let b=u[m][0];if(h.trim().indexOf("!")===0&&b!=="space")break;h=u.pop()[1]+h}h.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=h,e=u)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(n.raws.between+=o.map(l=>l[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Hh;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,n=null,i=!1,s=null,o=[],c=e[1].startsWith("--"),a=[],l=e;for(;l;){if(n=l[0],a.push(l),n==="("||n==="[")s||(s=l),o.push(n==="("?")":"]");else if(c&&i&&n==="{")s||(s=l),o.push("}");else if(o.length===0)if(n===";")if(i){this.decl(a,c);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=!0;break}else n===":"&&(i=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&i){if(!c)for(;a.length&&(l=a[a.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,c)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,i){let s,o,c=n.length,a="",l=!0,u,h;for(let m=0;m<c;m+=1)s=n[m],o=s[0],o==="space"&&m===c-1&&!i?l=!1:o==="comment"?(h=n[m-1]?n[m-1][0]:"empty",u=n[m+1]?n[m+1][0]:"empty",!Uh[h]&&!Uh[u]?a.slice(-1)===","?l=!1:a+=s[1]:l=!1):a+=s[1];if(!l){let m=n.reduce((b,g)=>b+g[1],"");e.raws[t]={raw:m,value:a}}e[t]=a}rule(e){e.pop();let t=new Hh;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let i=t;i<e.length;i++)n+=e[i][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},GS=VS,qS=qt,YS=GS,QS=Gs;function ks(r,e){let t=new QS(r,e),n=new YS(t);try{n.parse()}catch(i){throw i}return n.root}var Hc=ks;ks.default=ks;qS.registerParse(ks);var{isClean:pt,my:KS}=Mn,XS=Dd,JS=Ws,ZS=qt,ew=Dc;var Bh=Lc,tw=Hc,rw=Fn,nw={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},iw={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},sw={Once:!0,postcssPlugin:!0,prepare:!0},Rr=0;function pn(r){return typeof r=="object"&&typeof r.then=="function"}function tp(r){let e=!1,t=nw[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Rr,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Rr,t+"Exit"]:[t,t+"Exit"]}function Wh(r){let e;return r.type==="document"?e=["Document",Rr,"DocumentExit"]:r.type==="root"?e=["Root",Rr,"RootExit"]:e=tp(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function tc(r){return r[pt]=!1,r.nodes&&r.nodes.forEach(e=>tc(e)),r}var rc={},Cr=class rp{constructor(e,t,n){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=tc(t);else if(t instanceof rp||t instanceof Bh)i=tc(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let s=tw;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{i=s(t,n)}catch(o){this.processed=!0,this.error=o}i&&!i[KS]&&ZS.rebuild(i)}this.result=new Bh(e,i,n),this.helpers={...rc,postcss:rc,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!iw[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!sw[n])if(typeof t[n]=="object")for(let i in t[n])i==="*"?e(t,n,t[n][i]):e(t,n+"-"+i.toLowerCase(),t[n][i]);else typeof t[n]=="function"&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(pn(n))try{await n}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pt];){e[pt]=!0;let t=[Wh(e)];for(;t.length>0;){let n=this.visitTick(t);if(pn(n))try{await n}catch(i){let s=t[t.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(s=>n(s,this.helpers));await Promise.all(i)}else await n(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return pn(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=JS;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new XS(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(pn(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pt];)e[pt]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,i]of e){this.result.lastPlugin=n;let s;try{s=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(pn(s))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,c]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return c(n.toProxy(),this.helpers)}catch(a){throw this.handleError(a,n)}}if(t.iterator!==0){let o=t.iterator,c;for(;c=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!c[pt]){c[pt]=!0,e.push(Wh(c));return}t.iterator=0,delete n.indexes[o]}let s=t.events;for(;t.eventIndex<s.length;){let o=s[t.eventIndex];if(t.eventIndex+=1,o===Rr){n.nodes&&n.nodes.length&&(n[pt]=!0,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[pt]=!0;let t=tp(e);for(let n of t)if(n===Rr)e.nodes&&e.each(i=>{i[pt]||this.walkSync(i)});else{let i=this.listeners[n];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Cr.registerPostcss=r=>{rc=r};var np=Cr;Cr.default=Cr;rw.registerLazyResult(Cr);ew.registerLazyResult(Cr);var ow=Dd,aw=Ws;var cw=Hc,lw=Lc,nc=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let i,s=aw;this.result=new lw(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let c=new ow(s,i,this._opts,t);if(c.isMap()){let[a,l]=c.generate();a&&(this.result.css=a),l&&(this.result.map=l)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=cw;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},uw=nc;nc.default=nc;var fw=uw,hw=np,dw=Dc,pw=Fn,Cn=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new fw(this,e,t):new hw(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},mw=Cn;Cn.default=Cn;pw.registerProcessor(Cn);dw.registerProcessor(Cn);var gw=Vs,yw=_d,vw=qs,bw=$c,Sw=Gs,ww=Fn,xw=jc;function En(r,e){if(Array.isArray(r))return r.map(i=>En(i));let{inputs:t,...n}=r;if(t){e=[];for(let i of t){let s={...i,__proto__:Sw.prototype};s.map&&(s.map={...s.map,__proto__:yw.prototype}),e.push(s)}}if(n.nodes&&(n.nodes=r.nodes.map(i=>En(i,e))),n.source){let{inputId:i,...s}=n.source;n.source=s,i!=null&&(n.source.input=e[i])}if(n.type==="root")return new ww(n);if(n.type==="decl")return new gw(n);if(n.type==="rule")return new xw(n);if(n.type==="comment")return new vw(n);if(n.type==="atrule")return new bw(n);throw new Error("Unknown node type: "+r.type)}var Rw=En;En.default=En;var Cw=Fc,ip=Vs,Ew=np,Iw=qt,Uc=mw,Aw=Ws,Tw=Rw,sp=Dc,Pw=Yd,op=qs,ap=$c,Ow=Lc,_w=Gs,Mw=Hc,Fw=Zd,cp=jc,lp=Fn,kw=zs;function ne(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Uc(r)}ne.plugin=function(e,t){let n=!1;function i(...o){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: 38https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357: 39https://www.w3ctech.com/topic/2226`));let c=t(...o);return c.postcssPlugin=e,c.postcssVersion=new Uc().version,c}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(o,c,a){return ne([i(a)]).process(o,c)},i};ne.stringify=Aw;ne.parse=Mw;ne.fromJSON=Tw;ne.list=Fw;ne.comment=r=>new op(r);ne.atRule=r=>new ap(r);ne.decl=r=>new ip(r);ne.rule=r=>new cp(r);ne.root=r=>new lp(r);ne.document=r=>new sp(r);ne.CssSyntaxError=Cw;ne.Declaration=ip;ne.Container=Iw;ne.Processor=Uc;ne.Document=sp;ne.Comment=op;ne.Warning=Pw;ne.AtRule=ap;ne.Result=Ow;ne.Input=_w;ne.Rule=cp;ne.Root=lp;ne.Node=kw;Ew.registerPostcss(ne);var Nw=ne;ne.default=ne;var de=qb(Nw);de.stringify;de.fromJSON;de.plugin;de.parse;de.list;de.document;de.comment;de.atRule;de.rule;de.decl;de.root;de.CssSyntaxError;de.Declaration;de.Container;de.Processor;de.Document;de.Comment;de.Warning;de.AtRule;de.Result;de.Input;de.Rule;de.Root;de.Node;var Dw=Object.defineProperty,Lw=(r,e,t)=>e in r?Dw(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Je=(r,e,t)=>Lw(r,typeof e!="symbol"?e+"":e,t);function $w(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function jw(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Bc={exports:{}},he=String,up=function(){return{isColorSupported:!1,reset:he,bold:he,dim:he,italic:he,underline:he,inverse:he,hidden:he,strikethrough:he,black:he,red:he,green:he,yellow:he,blue:he,magenta:he,cyan:he,white:he,gray:he,bgBlack:he,bgRed:he,bgGreen:he,bgYellow:he,bgBlue:he,bgMagenta:he,bgCyan:he,bgWhite:he}};Bc.exports=up();Bc.exports.createColors=up;var Hw=Bc.exports,Uw={},Bw=Object.freeze(Object.defineProperty({__proto__:null,default:Uw},Symbol.toStringTag,{value:"Module"})),st=jw(Bw),zh=Hw,Vh=st,ic=class fp extends Error{constructor(e,t,n,i,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof n<"u"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,fp)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=zh.isColorSupported),Vh&&e&&(t=Vh(t));let n=t.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,n.length),o=String(s).length,c,a;if(e){let{bold:l,gray:u,red:h}=zh.createColors(!0);c=m=>l(h(m)),a=m=>u(m)}else c=a=l=>l;return n.slice(i,s).map((l,u)=>{let h=i+1+u,m=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let b=a(m.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return c(">")+a(m)+l+` 40 `+b+c("^")}return" "+a(m)+l}).join(` 41`)}toString(){let e=this.showSourceCode();return e&&(e=` 42 43`+e+` 44`),this.name+": "+this.message+e}},Wc=ic;ic.default=ic;var kn={};kn.isClean=Symbol("isClean");kn.my=Symbol("my");var Gh={after:` 45`,beforeClose:` 46`,beforeComment:` 47`,beforeDecl:` 48`,beforeOpen:" ",beforeRule:` 49`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ww(r){return r[0].toUpperCase()+r.slice(1)}var sc=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let s=(e.raws.between||"")+(t?";":"");this.builder(n+i+s,e)}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(n.includes(` 50`)){let o=this.raw(e,null,"indent");if(o.length)for(let c=0;c<s;c++)n+=o}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let s=e.nodes[i],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,t!==i||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,n){let i;if(n||(n=t),t&&(i=e.raws[t],typeof i<"u"))return i;let s=e.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return Gh[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let c="raw"+Ww(n);this[c]?i=this[c](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Gh[n]),o.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return t=n.raws.after,t.includes(` 51`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` 52`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(` 53`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return t=n.raws.before,t.includes(` 54`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return t=n.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before<"u"){let s=n.raws.before.split(` 55`);return t=s[s.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let n=e[t],i=e.raws[t];return i&&i.value===n?i.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},hp=sc;sc.default=sc;var zw=hp;function oc(r,e){new zw(e).stringify(r)}var Ys=oc;oc.default=oc;var{isClean:cs,my:Vw}=kn,Gw=Wc,qw=hp,Yw=Ys;function ac(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let i=r[n],s=typeof i;n==="parent"&&s==="object"?e&&(t[n]=e):n==="source"?t[n]=i:Array.isArray(i)?t[n]=i.map(o=>
vendor: 1,365 bytes, line 55
55ac(o,t)):(s==="object"&&i!==null&&(i=ac(i)),t[n]=i)}return t}var cc=class{constructor(e={}){this.raws={},this[cs]=!1,this[Vw]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ac(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},t)}return new Gw(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}
vendor: 2,032 bytes, lines 55-56
55markDirty(){if(this[cs]){this[cs]=!1;let e=this;for(;e=e.parent;)e[cs]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(n=this.positionInside(i,t))}return n}positionInside(e,t){let n=t||this.toString(),i=this.source.start.column,s=this.source.start.line;for(let o=0;o<e;o++)n[o]===` 56`?(i=1,s+=1):i+=1;return{column:i,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),s=i.indexOf(e.word);s!==-1&&(t=this.positionInside(s,i),n=this.positionInside(s+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new qw().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let i of e)i===this?n=!0:n?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},i=t==null;t=t||new Map;let s=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let c=this[o];if(Array.isArray(c))n[o]=c.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof c=="object"&&c.toJSON)n[o]=c.toJSON(null,t);else if(o==="source"){let a=t.get(c.input);
56a==null&&(a=s,t.set(c.input,s),s++),n[o]={end:c.end,inputId:a,start:c.start}}else n[o]=c}return i&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Yw){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n}),t}warn(e,t,n){let i={node:this};for(let s in n)i[s]=n[s];return e.warn(t,i)}get proxyOf(){return this}},Qs=cc;cc.default=cc;var Qw=Qs,lc=class extends Qw{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Ks=lc;lc.default=lc;var Kw="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Xw=(r,e=21)=>(t=e)=>{let n="",i=t;for(;i--;)n+=r[Math.random()*r.length|0];return n},Jw=(r=21)=>{let e="",t=r;for(;t--;)e+=Kw[Math.random()*64|0];return e},Zw={nanoid:Jw,customAlphabet:Xw},{SourceMapConsumer:qh,SourceMapGenerator:Yh}=st,{existsSync:ex,readFileSync:tx}=st,{dirname:ka,join:rx}=st;function nx(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}var uc=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,i=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ka(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new qh(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(i.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return nx(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)))}loadFile(e){if(this.root=ka(e),ex(e))return this.mapFile=e,tx(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(t instanceof qh)return Yh.fromSourceMap(t).toString();if(t instanceof Yh)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=rx(ka(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},dp=uc;uc.default=uc;var{SourceMapConsumer:ix,SourceMapGenerator:sx}=st,{fileURLToPath:Qh,pathToFileURL:ls}=st,{isAbsolute:fc,resolve:hc}=st,{nanoid:ox}
vendor: 34,604 bytes, lines 56-63
56=Zw,Na=st,Kh=Wc,ax=dp,Da=Symbol("fromOffsetCache"),cx=Boolean(ix&&sx),Xh=Boolean(hc&&fc),Ns=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Xh||/^\w+:\/\//.test(t.from)||fc(t.from)?this.file=t.from:this.file=hc(t.from)),Xh&&cx){let n=new ax(this.css,t);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ox(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let s,o,c;if(t&&typeof t=="object"){let l=t,u=n;if(typeof l.offset=="number"){let h=this.fromOffset(l.offset);t=h.line,n=h.col}else t=l.line,n=l.column;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);o=h.line,c=h.col}else o=u.line,c=u.column}else if(!n){let l=this.fromOffset(t);t=l.line,n=l.col}let a=this.origin(t,n,o,c);return a?s=new Kh(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):s=new Kh(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:c,line:o},this.css,this.file,i.plugin),s.input={column:n,endColumn:c,endLine:o,line:t,source:this.css},this.file&&(ls&&(s.input.url=ls(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[Da])n=this[Da];else{let s=this.css.split(` 57`);n=new Array(s.length);let o=0;for(let c=0,a=s.length;c<a;c++)n[c]=o,o+=s[c].length+1;this[Da]=n}t=n[n.length-1];let i=0;if(e>=t)i=n.length-1;else{let s=n.length-2,o;for(;i<s;)if(o=i+(s-i>>1),e<n[o])s=o-1;else if(e>=n[o+1])i=o+1;else{i=o;break}}return{col:e-n[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:hc(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,i){if(!this.map)return!1;let s=this.map.consumer(),o=s.originalPositionFor({column:t,line:e});if(!o.source)return!1;let c;typeof n=="number"&&(c=s.originalPositionFor({column:i,line:n}));let a;fc(o.source)?a=ls(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||ls(this.map.mapFile));let l={column:o.column,endColumn:c&&c.column,endLine:c&&c.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Qh)l.file=Qh(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=s.sourceContentFor(o.source);return u&&(l.source=u),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Xs=Ns;Ns.default=Ns;Na&&Na.registerInput&&Na.registerInput(Ns);var{SourceMapConsumer:pp,SourceMapGenerator:xs}=st,{dirname:Rs,relative:mp,resolve:gp,sep:yp}=st,{pathToFileURL:Jh}=st,lx=Xs,ux=Boolean(pp&&xs),fx=Boolean(Rs&&gp&&mp&&yp),hx=class{constructor(e,t,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=` 58`;this.css.includes(`\r 59`)&&(t=`\r 60`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||Rs(e.file),i;this.mapOpts.sourcesContent===!1?(i=new pp(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),fx&&ux&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=xs.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new xs({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new xs({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(c,a,l)=>{if(this.css+=c,a&&l!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),s=c.match(/\n/g),s?(e+=s.length,o=c.lastIndexOf(` 61`),t=c.length-o):t+=c.length,a&&l!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?Rs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Rs(gp(n,this.mapOpts.annotation)));let i=mp(n,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new lx(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Jh){let n=Jh(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;yp==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},vp=hx,dx=Qs,dc=class extends dx{constructor(e){super(e),this.type="comment"}},Js=dc;dc.default=dc;var{isClean:bp,my:Sp}=kn,wp=Ks,xp=Js,px=Qs,Rp,zc,Vc,Cp;function Ep(r){return r.map(e=>(e.nodes&&(e.nodes=Ep(e.nodes)),delete e.source,e))}function Ip(r){if(r[bp]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)Ip(e)}var xt=class Ap extends px{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],i=e(this.proxyOf.nodes[n],n),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(i=>typeof i=="function"?(s,o)=>i(s.toProxy(),o):i)):t==="every"||t==="some"?n=>e[t]((i,...s)=>n(i.toProxy(),...s)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],n<s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),i=n===0?"prepend":!1,s=this.normalize(t,this.proxyOf.nodes[n],i).reverse();n=this.index(e);for(let c of s)this.proxyOf.nodes.splice(n,0,c);let o;for(let c in this.indexes)o=this.indexes[c],n<=o&&(this.indexes[c]=o+s.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ep(Rp(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new wp(e)]}else if(e.selector)e=[new zc(e)];else if(e.name)e=[new Vc(e)];else if(e.text)e=[new xp(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Sp]||Ap.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[bp]&&Ip(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let i;try{i=e(t,n)}catch(s){throw t.addToError(s)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="atrule")return t(n,i)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="decl")return t(n,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="rule")return t(n,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};xt.registerParse=r=>{Rp=r};xt.registerRule=r=>{zc=r};xt.registerAtRule=r=>{Vc=r};xt.registerRoot=r=>{Cp=r};var Yt=xt;xt.default=xt;xt.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,Vc.prototype):r.type==="rule"?Object.setPrototypeOf(r,zc.prototype):r.type==="decl"?Object.setPrototypeOf(r,wp.prototype):r.type==="comment"?Object.setPrototypeOf(r,xp.prototype):r.type==="root"&&Object.setPrototypeOf(r,Cp.prototype),r[Sp]=!0,r.nodes&&r.nodes.forEach(e=>{xt.rebuild(e)})};var mx=Yt,Tp,Pp,In=class extends mx{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Tp(new Pp,this,e).stringify()}};In.registerLazyResult=r=>{Tp=r};In.registerProcessor=r=>{Pp=r};var Gc=In;In.default=In;var pc=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Op=pc;pc.default=pc;var gx=Op,mc=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new gx(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},qc=mc;mc.default=mc;var La="'".charCodeAt(0),Zh='"'.charCodeAt(0),us="\\".charCodeAt(0),ed="/".charCodeAt(0),fs=` 62`.charCodeAt(0),mn=" ".charCodeAt(0),hs="\f".charCodeAt(0),ds=" ".charCodeAt(0),ps="\r".charCodeAt(0),yx="[".charCodeAt(0),vx="]".charCodeAt(0),bx="(".charCodeAt(0),Sx=")".charCodeAt(0),wx="{".charCodeAt(0),xx="}".charCodeAt(0),Rx=";".charCodeAt(0),Cx="*".charCodeAt(0),Ex=":".charCodeAt(0),Ix="@".charCodeAt(0),ms=/[\t\n\f\r "#'()/;[\\\]{}]/g,gs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ax=/.[\r\n"'(/\\]/,td=/[\da-f]/i,Tx=function(e,t={}){let n=e.css.valueOf(),i=t.ignoreErrors,s,o,c,a,l,u,h,m,b,g,S=n.length,v=0,I=[],A=[];function x(){return v}function F($){throw e.error("Unclosed "+$,v)}function M(){return A.length===0&&v>=S}function N($){if(A.length)return A.pop();if(v>=S)return;let L=$?$.ignoreUnclosed:!1;switch(s=n.charCodeAt(v),s){case fs:case mn:case ds:case ps:case hs:{o=v;do o+=1,s=n.charCodeAt(o);while(s===mn||s===fs||s===ds||s===ps||s===hs);g=["space",n.slice(v,o)],v=o-1;break}case yx:case vx:case wx:case xx:case Ex:case Rx:case Sx:{let Q=String.fromCharCode(s);g=[Q,Q,v];break}case bx:{if(m=I.length?I.pop()[1]:"",b=n.charCodeAt(v+1),m==="url"&&b!==La&&b!==Zh&&b!==mn&&b!==fs&&b!==ds&&b!==hs&&b!==ps){o=v;do{if(u=!1,o=n.indexOf(")",o+1),o===-1)if(i||L){o=v;break}else F("bracket");for(h=o;n.charCodeAt(h-1)===us;)h-=1,u=!u}while(u);g=["brackets",n.slice(v,o+1),v,o],v=o}else o=n.indexOf(")",v+1),a=n.slice(v,o+1),o===-1||Ax.test(a)?g=["(","(",v]:(g=["brackets",a,v,o],v=o);break}case La:case Zh:{c=s===La?"'":'"',o=v;do{if(u=!1,o=n.indexOf(c,o+1),o===-1)if(i||L){o=v+1;break}else F("string");for(h=o;n.charCodeAt(h-1)===us;)h-=1,u=!u}while(u);g=["string",n.slice(v,o+1),v,o],v=o;break}case Ix:{ms.lastIndex=v+1,ms.test(n),ms.lastIndex===0?o=n.length-1:o=ms.lastIndex-2,g=["at-word",n.slice(v,o+1),v,o],v=o;break}case us:{for(o=v,l=!0;n.charCodeAt(o+1)===us;)o+=1,l=!l;if(s=n.charCodeAt(o+1),l&&s!==ed&&s!==mn&&s!==fs&&s!==ds&&s!==ps&&s!==hs&&(o+=1,td.test(n.charAt(o)))){for(;td.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===mn&&(o+=1)}g=["word",n.slice(v,o+1),v,o],v=o;break}default:{s===ed&&n.charCodeAt(v+1)===Cx?(o=n.indexOf("*/",v+2)+1,o===0&&(i||L?o=n.length:F("comment")),g=["comment",n.slice(v,o+1),v,o],v=o):(gs.lastIndex=v+1,gs.test(n),gs.lastIndex===0?o=n.length-1:o=gs.lastIndex-2,g=["word",n.slice(v,o+1),v,o],I.push(g),v=o);break}}return v++,g}function G($){A.push($)}return{back:G,endOfFile:M,nextToken:N,position:x}},_p=Yt,Ds=class extends _p{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Yc=Ds;Ds.default=Ds;_p.registerAtRule(Ds);var Mp=Yt,Fp,kp,Er=class extends Mp{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let i=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of i)s.raws.before=t.raws.before}return i}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Fp(new kp,this,e).stringify()}};Er.registerLazyResult=r=>{Fp=r};Er.registerProcessor=r=>{kp=r};var Nn=Er;Er.default=Er;Mp.registerRoot(Er);var An={comma(r){return An.split(r,[","],!0)},space(r){let e=[" ",` 63`," "];return An.split(r,e)},split(r,e,t){let n=[],i="",s=!1,o=0,c=!1,a="",l=!1;for(let u of r)l?l=!1:u==="\\"?l=!0:c?u===a&&(c=!1):u==='"'||u==="'"?(c=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(s=!0),s?(i!==""&&n.push(i.trim()),i="",s=!1):i+=u;return(t||i!=="")&&n.push(i.trim()),n}},Np=An;An.default=An;var Dp=Yt,Px=Np,Ls=class extends Dp{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Px.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}},Qc=Ls;Ls.default=Ls;Dp.registerRule(Ls);var Ox=Ks,_x=Tx,Mx=Js,Fx=Yc,kx=Nn,rd=Qc,nd={empty:!0,space:!0};function Nx(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}var Dx=class{constructor(e){this.input=e,this.root=new kx,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Fx;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,s,o=!1,c=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?l.push(n==="("?")":"]"):n==="{"&&l.length>0?l.push("}"):n===l[l.length-1]&&l.pop(),l.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){c=!0;break}else if(n==="}"){if(a.length>0){for(s=a.length-1,i=a[s];i&&i[0]==="space";)i=a[--s];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),c&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,i;for(let s=t-1;s>=0&&(i=e[s],!(i[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,n,i,s;for(let[o,c]of e.entries()){if(n=c,i=n[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!s)this.doubleColon(n);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=n}return!1}comment(e){let t=new Mx;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=_x(this.input)}decl(e,t){let n=new Ox;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||Nx(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let l=e[0][0];if(l===":"||l==="space"||l==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){n.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],c;for(;e.length&&(c=e[0][0],!(c!=="space"&&c!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let l=e.length-1;l>=0;l--){if(s=e[l],s[1].toLowerCase()==="!important"){n.important=!0;let u=this.stringFrom(e,l);u=this.spacesFromEnd(e)+u,u!==" !important"&&(n.raws.important=u);break}else if(s[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let m=l;m>0;m--){let b=u[m][0];if(h.trim().indexOf("!")===0&&b!=="space")break;h=u.pop()[1]+h}h.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=h,e=u)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(n.raws.between+=o.map(l=>l[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new rd;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,n=null,i=!1,s=null,o=[],c=e[1].startsWith("--"),a=[],l=e;for(;l;){if(n=l[0],a.push(l),n==="("||n==="[")s||(s=l),o.push(n==="("?")":"]");else if(c&&i&&n==="{")s||(s=l),o.push("}");else if(o.length===0)if(n===";")if(i){this.decl(a,c);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=!0;break}else n===":"&&(i=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&i){if(!c)for(;a.length&&(l=a[a.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,c)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,i){let s,o,c=n.length,a="",l=!0,u,h;for(let m=0;m<c;m+=1)s=n[m],o=s[0],o==="space"&&m===c-1&&!i?l=!1:o==="comment"?(h=n[m-1]?n[m-1][0]:"empty",u=n[m+1]?n[m+1][0]:"empty",!nd[h]&&!nd[u]?a.slice(-1)===","?l=!1:a+=s[1]:l=!1):a+=s[1];if(!l){let m=n.reduce((b,g)=>b+g[1],"");e.raws[t]={raw:m,value:a}}e[t]=a}rule(e){e.pop();let t=new rd;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let i=t;i<e.length;i++)n+=e[i][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Lx=Dx,$x=Yt,jx=Lx,Hx=Xs;function $s(r,e){let t=new Hx(r,e),n=new jx(t);try{n.parse()}catch(i){throw i}return n.root}var Kc=$s;$s.default=$s;$x.registerParse($s);var{isClean:mt,my:Ux}=kn,Bx=vp,Wx=Ys,zx=Yt,Vx=Gc;var id=qc,Gx=Kc,qx=Nn,Yx={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Qx={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Kx={Once:!0,postcssPlugin:!0,prepare:!0},Ir=0;function gn(r){return typeof r=="object"&&typeof r.then=="function"}function Lp(r){let e=!1,t=Yx[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Ir,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Ir,t+"Exit"]:[t,t+"Exit"]}function sd(r){let e;return r.type==="document"?e=["Document",Ir,"DocumentExit"]:r.type==="root"?e=["Root",Ir,"RootExit"]:e=Lp(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function gc(r){return r[mt]=!1,r.nodes&&r.nodes.forEach(e=>gc(e)),r}var yc={},Ar=class $p{constructor(e,t,n){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=gc(t);else if(t instanceof $p||t instanceof id)i=gc(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let s=Gx;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{i=s(t,n)}catch(o){this.processed=!0,this.error=o}i&&!i[Ux]&&zx.rebuild(i)}this.result=new id(e,i,n),this.helpers={...yc,postcss:yc,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!Qx[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Kx[n])if(typeof t[n]=="object")for(let i in t[n])i==="*"?e(t,n,t[n][i]):e(t,n+"-"+i.toLowerCase(),t[n][i]);else typeof t[n]=="function"&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(gn(n))try{await n}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[mt];){e[mt]=!0;let t=[sd(e)];for(;t.length>0;){let n=this.visitTick(t);if(gn(n))try{await n}catch(i){let s=t[t.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(s=>n(s,this.helpers));await Promise.all(i)}else await n(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return gn(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Wx;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Bx(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(gn(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[mt];)e[mt]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,i]of e){this.result.lastPlugin=n;let s;try{s=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(gn(s))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,c]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return c(n.toProxy(),this.helpers)}catch(a){throw this.handleError(a,n)}}if(t.iterator!==0){let o=t.iterator,c;for(;c=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!c[mt]){c[mt]=!0,e.push(sd(c));return}t.iterator=0,delete n.indexes[o]}let s=t.events;for(;t.eventIndex<s.length;){let o=s[t.eventIndex];if(t.eventIndex+=1,o===Ir){n.nodes&&n.nodes.length&&(n[mt]=!0,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[mt]=!0;let t=Lp(e);for(let n of t)if(n===Ir)e.nodes&&e.each(i=>{i[mt]||this.walkSync(i)});else{let i=this.listeners[n];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ar.registerPostcss=r=>{yc=r};var jp=Ar;Ar.default=Ar;qx.registerLazyResult(Ar);Vx.registerLazyResult(Ar);var Xx=vp,Jx=Ys;var Zx=Kc,eR=qc,vc=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let i,s=Jx;this.result=new eR(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let c=new Xx(s,i,this._opts,t);if(c.isMap()){let[a,l]=c.generate();a&&(this.result.css=a),l&&(this.result.map=l)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Zx;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},tR=vc;vc.default=vc;var rR=tR,nR=jp,iR=Gc,sR=Nn,Tn=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new rR(this,e,t):new nR(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},oR=Tn;Tn.default=Tn;sR.registerProcessor(Tn);iR.registerProcessor(Tn);
63var aR=Ks,cR=dp,lR=Js,uR=Yc,fR=Xs,hR=Nn,dR=Qc;function Pn(r,e){if(Array.isArray(r))return r.map(i=>Pn(i));let{inputs:t,...n}=r;if(t){e=[];for(let i of t){let s={...i,__proto__:fR.prototype};s.map&&(s.map={...s.map,__proto__:cR.prototype}),e.push(s)}}if(n.nodes&&(n.nodes=r.nodes.map(i=>Pn(i,e))),n.source){let{inputId:i,...s}=n.source;n.source=s,i!=null&&(n.source.input=e[i])}if(n.type==="root")return new hR(n);if(n.type==="decl")return new aR(n);if(n.type==="rule")return new dR(n);if(n.type==="comment")return new lR(n);if(n.type==="atrule")return new uR(n);throw new Error("Unknown node type: "+r.type)}var pR=Pn;Pn.default=Pn;var mR=Wc,Hp=Ks,gR=jp,yR=Yt,Xc=oR,vR=Ys,bR=pR,Up=Gc,SR=Op,Bp=Js,Wp=Yc,wR=qc,xR=Xs,RR=Kc,CR=Np,zp=Qc,Vp=Nn,ER=Qs;function ie(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Xc(r)}ie.plugin=function(e,t){let n=!1;function i(...o){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: 64https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357: 65https://www.w3ctech.com/topic/2226`));let c=t(...o);return c.postcssPlugin=e,c.postcssVersion=new Xc().version,c}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(o,c,a){return ie([i(a)]).process(o,c)},i};ie.stringify=vR;ie.parse=RR;ie.fromJSON=bR;ie.list=CR;ie.comment=r=>new Bp(r);ie.atRule=r=>new Wp(r);ie.decl=r=>new Hp(r);ie.rule=r=>new zp(r);ie.root=r=>new Vp(r);ie.document=r=>new Up(r);ie.CssSyntaxError=mR;ie.Declaration=Hp;ie.Container=yR;ie.Processor=Xc;ie.Document=Up;ie.Comment=Bp;ie.Warning=SR;ie.AtRule=Wp;ie.Result=wR;ie.Input=xR;ie.Rule=zp;ie.Root=Vp;ie.Node=ER;gR.registerPostcss(ie);var IR=ie;ie.default=ie;var pe=$w(IR);pe.stringify;pe.fromJSON;pe.plugin;pe.parse;pe.list;pe.document;pe.comment;pe.atRule;pe.rule;pe.decl;pe.root;pe.CssSyntaxError;pe.Declaration;pe.Container;pe.Processor;pe.Document;pe.Comment;pe.Warning;pe.AtRule;pe.Result;pe.Input;pe.Rule;pe.Root;pe.Node;var On=class{constructor(...e){Je(this,"parentElement",null),Je(this,"parentNode",null),Je(this,"ownerDocument"),Je(this,"firstChild",null),Je(this,"lastChild",null),Je(this,"previousSibling",null),Je(this,"nextSibling",null),Je(this,"ELEMENT_NODE",1),Je(this,"TEXT_NODE",3),Je(this,"nodeType"),Je(this,"nodeName"),Je(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof On){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},od={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ad={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ys={},AR=()=>!!globalThis.Zone;function Jc(r){if(ys[r])return ys[r];let e=globalThis[r],t=e.prototype,n=r in od?od[r]:void 0,i=Boolean(n&&n.every(c=>{var a,l;return Boolean((l=(a=Object.getOwnPropertyDescriptor(t,c))==null?void 0:a.get)==null?void 0:l.toString().includes("[native code]"))})),s=r in ad?ad[r]:void 0,o=Boolean(s&&s.every(c=>{var a;return typeof t[c]=="function"&&((a=t[c])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!AR())return ys[r]=e.prototype,e.prototype;try{let c=document.createElement("iframe");document.body.appendChild(c);let a=c.contentWindow;if(!a)return e.prototype;let l=a[r].prototype;return document.body.removeChild(c),l?ys[r]=l:t}catch{return t}}var $a={};function Ct(r,e,t){var n;let i=`${r}.${String(t)}`;if($a[i])return $a[i].call(e);let s=Jc(r),o=(n=Object.getOwnPropertyDescriptor(s,t))==null?void 0:n.get;return o?($a[i]=o,o.call(e)):e[t]}var ja={};function Gp(r,e,t){let n=`${r}.${String(t)}`;if(ja[n])return ja[n].bind(e);let s=Jc(r)[t];return typeof s!="function"?e[t]:(ja[n]=s,s.bind(e))}function TR(r){return Ct("Node",r,"ownerDocument")}function PR(r){return Ct("Node",r,"childNodes")}function OR(r){return Ct("Node",r,"parentNode")}function _R(r){return Ct("Node",r,"parentElement")}function MR(r){return Ct("Node",r,"textContent")}function FR(r,e){return Gp("Node",r,"contains")(e)}function kR(r){return Gp("Node",r,"getRootNode")()}function NR(r){return!r||!("host"in r)?null:Ct("ShadowRoot",r,"host")}function DR(r){return r.styleSheets}function LR(r){return!r||!("shadowRoot"in r)?null:Ct("Element",r,"shadowRoot")}function $R(r,e){return Ct("Element",r,"querySelector")(e)}function jR(r,e){return Ct("Element",r,"querySelectorAll")(e)}function qp(){return Jc("MutationObserver").constructor}function Qt(r,e,t){try{if(!(e in r))return()=>{};let n=r[e],i=t(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=i,()=>{r[e]=n}}catch{return()=>{}}}var V={ownerDocument:TR,childNodes:PR,parentNode:OR,parentElement:_R,textContent:MR,contains:FR,getRootNode:kR,host:NR,styleSheets:DR,shadowRoot:LR,querySelector:$R,querySelectorAll:jR,mutationObserver:qp,patch:Qt};function ke(r,e,t=document){let n={capture:!0,passive:!0};return t.addEventListener(r,e,n),()=>t.removeEventListener(r,e,n)}var yr=`Please stop import mirror directly. Instead of that,\r
66now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 67or you can use record.mirror to access the mirror instance during recording.`,cd={map:{},getId(){return console.error(yr),-1},getNode(){return console.error(yr),null},removeNodeFromMap(){console.error(yr)},has(){return console.error(yr),!1},reset(){console.error(yr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(cd=new Proxy(cd,{get(r,e,t){return e==="map"&&console.error(yr),Reflect.get(r,e,t)}}));function _n(r,e,t={}){let n=null,i=0;return function(...s){let o=Date.now();!i&&t.leading===!1&&(i=o);let c=e-(o-i),a=this;c<=0||c>e?(n&&(clearTimeout(n),n=null),i=o,r.apply(a,s)):!n&&t.trailing!==!1&&(n=setTimeout(()=>{i=t.leading===!1?0:Date.now(),n=null,r.apply(a,s)},c))}}function Zs(r,e,t,n,i=window){let s=i.Object.getOwnPropertyDescriptor(r,e);return i.Object.defineProperty(r,e,n?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>Zs(r,e,s||{},!0)}var js=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(js=()=>new Date().getTime());function Yp(r){var e,t,n,i;let s=r.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:r.pageXOffset!==void 0?r.pageXOffset:s.documentElement.scrollLeft||s?.body&&((e=V.parentElement(s.body))==null?void 0:e.scrollLeft)||((t=s?.body)==null?void 0:t.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:r.pageYOffset!==void 0?r.pageYOffset:s?.documentElement.scrollTop||s?.body&&((n=V.parentElement(s.body))==null?void 0:n.scrollTop)||((i=s?.body)==null?void 0:i.scrollTop)||0}}function Qp(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Kp(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Xp(r){return r?r.nodeType===r.ELEMENT_NODE?r:V.parentElement(r):null}function Ne(r,e,t,n){if(!r)return!1;let i=Xp(r);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||n&&i.closest("."+e)!==null)return!0}else if(Os(i,e,n))return!0}catch{}return!!(t&&(i.matches(t)||n&&i.closest(t)!==null))}function HR(r,e){return e.getId(r)!==-1}function Ha(r,e,t){return r.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(r)===wn}function Jp(r,e){if(vn(r))return!1;let t=e.getId(r);if(!e.has(t))return!0;let n=V.parentNode(r);return n&&n.nodeType===r.DOCUMENT_NODE?!1:n?Jp(n,e):!0}function bc(r){return Boolean(r.changedTouches)}function UR(r=window){"NodeList"in r&&!r.NodeList.prototype.forEach&&(r.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in r&&!r.DOMTokenList.prototype.forEach&&(r.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Zp(r,e){return Boolean(r.nodeName==="IFRAME"&&e.getMeta(r))}function em(r,e){return Boolean(r.nodeName==="LINK"&&r.nodeType===r.ELEMENT_NODE&&r.getAttribute&&r.getAttribute("rel")==="stylesheet"&&e.getMeta(r))}function Sc(r){return r?r instanceof On&&"shadowRoot"in r?Boolean(r.shadowRoot):Boolean(V.shadowRoot(r)):!1}var wc=class{constructor(){O(this,"id",1),O(this,"styleIDMap",new WeakMap),O(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return t===void 0?n=this.id++:n=t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function tm(r){var e;let t=null;return"getRootNode"in r&&((e=V.getRootNode(r))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&V.host(V.getRootNode(r))&&(t=V.host(V.getRootNode(r))),t}function BR(r){let e=r,t;for(;t=tm(e);)e=t;return e}function WR(r){let e=V.ownerDocument(r);if(!e)return!1;let t=BR(r);return V.contains(e,t)}function rm(r){let e=V.ownerDocument(r);return e?V.contains(e,r)||WR(r):!1}var J=(r=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(J||{}),Y=(r=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",r))(Y||{}),We=(r=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(We||{}),St=(r=>(r[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r))(St||{}),Tr=(r=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))(Tr||{}),vr=(r=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r[r.RateChange=4]="RateChange",r))(vr||{}),nm=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(nm||{});function ld(r){return"__ln"in r}var xc=class{constructor(){O(this,"length",0),O(this,"head",null),O(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&ld(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&
vendor: 13,202 bytes, line 67
67(n.previous=t)}else if(e.nextSibling&&ld(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},ud=(r,e)=>`${r}@${e}`,Rc=class{constructor(){O(this,"frozen",!1),O(this,"locked",!1),O(this,"texts",[]),O(this,"attributes",[]),O(this,"attributeMap",new WeakMap),O(this,"removes",[]),O(this,"mapRemoves",[]),O(this,"movedMap",{}),O(this,"addedSet",new Set),O(this,"movedSet",new Set),O(this,"droppedSet",new Set),O(this,"removesSubTreeCache",new Set),O(this,"mutationCb"),O(this,"blockClass"),O(this,"blockSelector"),O(this,"maskTextClass"),O(this,"maskTextSelector"),O(this,"inlineStylesheet"),O(this,"maskInputOptions"),O(this,"maskTextFn"),O(this,"maskInputFn"),O(this,"keepIframeSrcFn"),O(this,"recordCanvas"),O(this,"inlineImages"),O(this,"slimDOMOptions"),O(this,"dataURLOptions"),O(this,"doc"),O(this,"mirror"),O(this,"iframeManager"),O(this,"stylesheetManager"),O(this,"shadowDomManager"),O(this,"canvasManager"),O(this,"processedNodeManager"),O(this,"unattachedDoc"),O(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),O(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new xc,i=a=>{let l=a,u=wn;for(;u===wn;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},s=a=>{let l=V.parentNode(a);if(!l||!rm(a))return;let u=!1;if(a.nodeType===Node.TEXT_NODE){let g=l.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(l)&&(u=!0)}let h=vn(l)?this.mirror.getId(tm(a)):this.mirror.getId(l),m=i(a);if(h===-1||m===-1)return n.addNode(a);let b=Sr(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:g=>{Zp(g,this.mirror)&&this.iframeManager.addIframe(g),em(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Sc(a)&&this.shadowDomManager.addShadowRoot(V.shadowRoot(a),this.doc)},onIframeLoad:(g,S)=>{this.iframeManager.attachIframe(g,S),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,S)=>{this.stylesheetManager.attachLinkElement(g,S)},cssCaptured:u});b&&(e.push({parentId:h,nextId:m,node:b}),t.add(b.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)fd(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(V.parentNode(a))||s(a);for(let a of this.addedSet)!hd(this.droppedSet,a)&&!fd(this.removesSubTreeCache,a,this.mirror)||hd(this.movedSet,a)?s(a):this.droppedSet.add(a);let o=null;for(;n.length;){let a=null;if(o){let l=this.mirror.getId(V.parentNode(o.value)),u=i(o.value);l!==-1&&u!==-1&&(a=o)}if(!a){let l=n.tail;for(;l;){let u=l;if(l=l.previous,u){let h=this.mirror.getId(V.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){a=u;break}else{let b=u.value,g=V.parentNode(b);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let S=V.host(g);if(this.mirror.getId(S)!==-1){a=u;break}}}}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}o=a.previous,n.removeNode(a.value),s(a.value)}let c={texts:this.texts.map(a=>{let l=a.node,u=V.parentNode(l);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(l),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:l}=a;if(typeof l.style=="string"){let u=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);u.length<l.style.length&&(u+h).split("var(").length===l.style.split("var(").length&&(l.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:l}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(c))}),O(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let n=Array.from(V.childNodes(e),i=>V.textContent(i)||"").join("");t.attributes.value=As({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ts(e),value:n,maskInputFn:this.maskInputFn})}),O(this,"processMutation",e=>{if(!Ha(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=V.textContent(e.target);!Ne(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Id(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Xp(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,n=e.attributeName,i=e.target.getAttribute(n);if(n==="value"){let o=Ts(t);i=As({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(Ne(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let s=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)n="rr_src";else return;if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),n==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Ed(t.tagName,n))if(s.attributes[n]=Cd(this.doc,Gt(t.tagName),Gt(n),i),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let c of Array.from(t.style)){let a=t.style.getPropertyValue(c),l=t.style.getPropertyPriority(c);a!==o.style.getPropertyValue(c)||l!==o.style.getPropertyPriority(c)?l===""?s.styleDiff[c]=a:s.styleDiff[c]=[a,l]:s._unchangedStyles[c]=[a,l]}for(let c of Array.from(o.style))t.style.getPropertyValue(c)===""&&(s.styleDiff[c]=!1)}else n==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal");break}case"childList":{if(Ne(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),i=vn(e.target)?this.mirror.getId(V.host(e.target)):this.mirror.getId(e.target);Ne(e.target,this.blockClass,this.blockSelector,!1)||Ha(t,this.mirror,this.slimDOMOptions)||!HR(t,this.mirror)||(this.addedSet.has(t)?(Cc(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||Jp(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ud(n,i)]?Cc(this.movedSet,t):(this.removes.push({parentId:i,id:n,isShadow:vn(e.target)&&bn(e.target)?!0:void 0}),zR(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),O(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ha(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[ud(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ne(e,this.blockClass,this.blockSelector,!1)||(V.childNodes(e).forEach(n=>this.genAdds(n)),Sc(e)&&V.childNodes(V.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Cc(r,e){r.delete(e),V.childNodes(e).forEach(t=>Cc(r,t))}function zR(r,e){let t=[r];for(;t.length;){let n=t.pop();e.has(n)||(e.add(n),V.childNodes(n).forEach(i=>t.push(i)))}}function fd(r,e,t){return r.size===0?!1:VR(r,e)}function VR(r,e,t){let n=V.parentNode(e);return n?r.has(n):!1}function hd(r,e){return r.size===0?!1:im(r,e)}function im(r,e){let t=V.parentNode(e);return t?r.has(t)?!0:im(r,t):!1}var Sn;function GR(r){Sn=r}function qR(){Sn=void 0}var X=r=>Sn?(...t)=>{try{return r(...t)}catch(n){if(Sn&&Sn(n)===!0)return;throw n}}:r,Vt=[];function Dn(r){try{if("composedPath"in r){let e=r.composedPath();if(e.length)return e[0]}else if("path"in r&&r.path.length)return r.path[0]}catch{}return r&&r.target}function sm(r,e){let t=new Rc;Vt.push(t),t.init(r);let n=new(qp())(X(t.processMutations.bind(t)));return n.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function YR({mousemoveCb:r,sampling:e,doc:t,mirror:n}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],c,a=_n(X(h=>{let m=Date.now()-c;r(o.map(b=>(b.timeOffset-=m,b)),h),o=[],c=null}),s),l=X(_n(X(h=>{let m=Dn(h),{clientX:b,clientY:g}=bc(h)?h.changedTouches[0]:h;c||(c=js()),o.push({x:b,y:g,id:n.getId(m),timeOffset:js()-c}),a(typeof DragEvent<"u"&&h instanceof DragEvent?Y.Drag:h instanceof MouseEvent?Y.MouseMove:Y.TouchMove)}),i,{trailing:!1})),u=[ke("mousemove",l,t),ke("touchmove",l,t),ke("drag",l,t)];return X(()=>{u.forEach(h=>h())})}function QR({mouseInteractionCb:r,doc:e,mirror:t,blockClass:n,blockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let o=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[],a=null,l=u=>h=>{let m=Dn(h);if(Ne(m,n,i,!0))return;let b=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":b=St.Mouse;break;case"touch":b=St.Touch;break;case"pen":b=St.Pen;break}b===St.Touch?We[u]===We.MouseDown?g="TouchStart":We[u]===We.MouseUp&&(g="TouchEnd"):St.Pen}else bc(h)&&(b=St.Touch);b!==null?(a=b,(g.startsWith("Touch")&&b===St.Touch||g.startsWith("Mouse")&&b===St.Mouse)&&(b=null)):We[u]===We.Click&&(b=a,a=null);let S=bc(h)?h.changedTouches[0]:h;if(!S)return;let v=t.getId(m),{clientX:I,clientY:A}=S;X(r)({type:We[g],id:v,x:I,y:A,...b!==null&&{pointerType:b}})};return Object.keys(We).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=Gt(u),m=l(u);if(window.PointerEvent)switch(We[u]){case We.MouseDown:case We.MouseUp:h=h.replace("mouse","pointer");break;case We.TouchStart:case We.TouchEnd:return}c.push(ke(h,m,e))}),X(()=>{c.forEach(u=>u())})}function om({scrollCb:r,doc:e,mirror:t,blockClass:n,blockSelector:i,sampling:s}){let o=X(_n(X(c=>{let a=Dn(c);if(!a||Ne(a,n,i,!0))return;let l=t.getId(a);if(a===e&&e.defaultView){let u=Yp(e.defaultView);r({id:l,x:u.left,y:u.top})}else r({id:l,x:a.scrollLeft,y:a.scrollTop})}),s.scroll||100));return ke("scroll",o,e)}function KR({viewportResizeCb:r},{win:e}){let t=-1,n=-1,i=X(_n(X(()=>{let s=Qp(),o=Kp();(t!==s||n!==o)&&(r({width:Number(o),height:Number(s)}),t=s,n=o)}),200));return ke("resize",i,e)}var XR=["INPUT","TEXTAREA","SELECT"],dd=new WeakMap;function JR({inputCb:r,doc:e,mirror:t,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:c,maskInputFn:a,sampling:l,userTriggeredOnInput:u}){function h(A){let x=Dn(A),F=A.isTrusted,M=x&&x.tagName;if(x&&M==="OPTION"&&(x=V.parentElement(x)),!x||!M||XR.indexOf(M)<0||Ne(x,n,i,!0)||x.classList.contains(s)||o&&x.matches(o))return;let N=x.value,G=!1,$=Ts(x)||"";$==="radio"||$==="checkbox"?G=x.checked:(c[M.toLowerCase()]||c[$])&&(N=As({element:x,maskInputOptions:c,tagName:M,type:$,value:N,maskInputFn:a})),m(x,u?{text:N,isChecked:G,userTriggered:F}:{text:N,isChecked:G});let L=x.name;$==="radio"&&L&&G&&e.querySelectorAll(`input[type="radio"][name="${L}"]`).forEach(Q=>{if(Q!==x){let re=Q.value;m(Q,u?{text:re,isChecked:!G,userTriggered:!1}:{text:re,isChecked:!G})}})}function m(A,x){let F=dd.get(A);if(!F||F.text!==x.text||F.isChecked!==x.isChecked){dd.set(A,x);let M=t.getId(A);X(r)({...x,id:M})}}
vendor: 9,510 bytes, line 67
67let g=(l.input==="last"?["change"]:["input","change"]).map(A=>ke(A,X(h),e)),S=e.defaultView;if(!S)return()=>{g.forEach(A=>A())};let v=S.Object.getOwnPropertyDescriptor(S.HTMLInputElement.prototype,"value"),I=[[S.HTMLInputElement.prototype,"value"],[S.HTMLInputElement.prototype,"checked"],[S.HTMLSelectElement.prototype,"value"],[S.HTMLTextAreaElement.prototype,"value"],[S.HTMLSelectElement.prototype,"selectedIndex"],[S.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&g.push(...I.map(A=>Zs(A[0],A[1],{set(){X(h)({target:this,isTrusted:!1})}},!1,S))),X(()=>{g.forEach(A=>A())})}function Hs(r){let e=[];function t(n,i){if(vs("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||vs("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||vs("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||vs("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let o=Array.from(n.parentRule.cssRules).indexOf(n);i.unshift(o)}else if(n.parentStyleSheet){let o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(o)}return i}return t(r,e)}function Lt(r,e,t){let n,i;return r?(r.ownerNode?n=e.getId(r.ownerNode):i=t.getId(r),{styleId:i,id:n}):{}}function ZR({styleSheetRuleCb:r,mirror:e,stylesheetManager:t},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:X((u,h,m)=>{let[b,g]=m,{id:S,styleId:v}=Lt(h,e,t.styleMirror);return(S&&S!==-1||v&&v!==-1)&&r({id:S,styleId:v,adds:[{rule:b,index:g}]}),u.apply(h,m)})}),n.CSSStyleSheet.prototype.addRule=function(u,h,m=this.cssRules.length){let b=`${u} { ${h} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[b,m])};let s=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:X((u,h,m)=>{let[b]=m,{id:g,styleId:S}=Lt(h,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&r({id:g,styleId:S,removes:[{index:b}]}),u.apply(h,m)})}),n.CSSStyleSheet.prototype.removeRule=function(u){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:X((u,h,m)=>{let[b]=m,{id:g,styleId:S}=Lt(h,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&r({id:g,styleId:S,replace:b}),u.apply(h,m)})}));let c;n.CSSStyleSheet.prototype.replaceSync&&(c=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:X((u,h,m)=>{let[b]=m,{id:g,styleId:S}=Lt(h,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&r({id:g,styleId:S,replaceSync:b}),u.apply(h,m)})}));let a={};bs("CSSGroupingRule")?a.CSSGroupingRule=n.CSSGroupingRule:(bs("CSSMediaRule")&&(a.CSSMediaRule=n.CSSMediaRule),bs("CSSConditionRule")&&(a.CSSConditionRule=n.CSSConditionRule),bs("CSSSupportsRule")&&(a.CSSSupportsRule=n.CSSSupportsRule));let l={};return Object.entries(a).forEach(([u,h])=>{l[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(l[u].insertRule,{apply:X((m,b,g)=>{let[S,v]=g,{id:I,styleId:A}=Lt(b.parentStyleSheet,e,t.styleMirror);return(I&&I!==-1||A&&A!==-1)&&r({id:I,styleId:A,adds:[{rule:S,index:[...Hs(b),v||0]}]}),m.apply(b,g)})}),h.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:X((m,b,g)=>{let[S]=g,{id:v,styleId:I}=Lt(b.parentStyleSheet,e,t.styleMirror);return(v&&v!==-1||I&&I!==-1)&&r({id:v,styleId:I,removes:[{index:[...Hs(b),S]}]}),m.apply(b,g)})})}),X(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=s,o&&(n.CSSStyleSheet.prototype.replace=o),c&&(n.CSSStyleSheet.prototype.replaceSync=c),Object.entries(a).forEach(([u,h])=>{h.prototype.insertRule=l[u].insertRule,h.prototype.deleteRule=l[u].deleteRule})})}function am({mirror:r,stylesheetManager:e},t){var n,i,s;let o=null;t.nodeName==="#document"?o=r.getId(t):o=r.getId(V.host(t));let c=t.nodeName==="#document"?(n=t.defaultView)==null?void 0:n.Document:(s=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.ShadowRoot,a=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!c||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var l;return(l=a.get)==null?void 0:l.call(this)},set(l){var u;let h=(u=a.set)==null?void 0:u.call(this,l);if(o!==null&&o!==-1)try{e.adoptStyleSheets(l,o)}catch{}return h}}),X(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function e0({styleDeclarationCb:r,mirror:e,ignoreCSSAttributes:t,stylesheetManager:n},{win:i}){let s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:X((c,a,l)=>{var u;let[h,m,b]=l;if(t.has(h))return s.apply(a,[h,m,b]);let{id:g,styleId:S}=Lt((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return(g&&g!==-1||S&&S!==-1)&&r({id:g,styleId:S,set:{property:h,value:m,priority:b},index:Hs(a.parentRule)}),c.apply(a,l)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:X((c,a,l)=>{var u;let[h]=l;if(t.has(h))return o.apply(a,[h]);let{id:m,styleId:b}=Lt((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return(m&&m!==-1||b&&b!==-1)&&r({id:m,styleId:b,remove:{property:h},index:Hs(a.parentRule)}),c.apply(a,l)})}),X(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function t0({mediaInteractionCb:r,blockClass:e,blockSelector:t,mirror:n,sampling:i,doc:s}){let o=X(a=>_n(X(l=>{let u=Dn(l);if(!u||Ne(u,e,t,!0))return;let{currentTime:h,volume:m,muted:b,playbackRate:g,loop:S}=u;r({type:a,id:n.getId(u),currentTime:h,volume:m,muted:b,playbackRate:g,loop:S})}),i.media||500)),c=[ke("play",o(vr.Play),s),ke("pause",o(vr.Pause),s),ke("seeked",o(vr.Seeked),s),ke("volumechange",o(vr.VolumeChange),s),ke("ratechange",o(vr.RateChange),s)];return X(()=>{c.forEach(a=>a())})}function r0({fontCb:r,doc:e}){let t=e.defaultView;if(!t)return()=>{};let n=[],i=new WeakMap,s=t.FontFace;t.FontFace=function(a,l,u){let h=new s(a,l,u);return i.set(h,{family:a,buffer:typeof l!="string",descriptors:u,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),h};let o=Qt(e.fonts,"add",function(c){return function(a){return setTimeout(X(()=>{let l=i.get(a);l&&(r(l),i.delete(a))}),0),c.apply(this,[a])}});return n.push(()=>{t.FontFace=s}),n.push(o),X(()=>{n.forEach(c=>c())})}function n0(r){let{doc:e,mirror:t,blockClass:n,blockSelector:i,selectionCb:s}=r,o=!0,c=X(()=>{let a=e.getSelection();if(!a||o&&a?.isCollapsed)return;o=a.isCollapsed||!1;let l=[],u=a.rangeCount||0;for(let h=0;h<u;h++){let m=a.getRangeAt(h),{startContainer:b,startOffset:g,endContainer:S,endOffset:v}=m;Ne(b,n,i,!0)||Ne(S,n,i,!0)||l.push({start:t.getId(b),startOffset:g,end:t.getId(S),endOffset:v})}s({ranges:l})});return c(),ke("selectionchange",c)}function i0({doc:r,customElementCb:e}){let t=r.defaultView;return!t||!t.customElements?()=>{}:Qt(t.customElements,"define",function(i){return function(s,o,c){try{e({define:{name:s}})}catch{console.warn(`Custom element callback failed for ${s}`)}return i.apply(this,[s,o,c])}})}function s0(r,e){let{mutationCb:t,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:c,mediaInteractionCb:a,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:h,fontCb:m,selectionCb:b,customElementCb:g}=r;r.mutationCb=(...S)=>{e.mutation&&e.mutation(...S),t(...S)},r.mousemoveCb=(...S)=>{e.mousemove&&e.mousemove(...S),n(...S)},r.mouseInteractionCb=(...S)=>{e.mouseInteraction&&e.mouseInteraction(...S),i(...S)},r.scrollCb=(...S)=>{e.scroll&&e.scroll(...S),s(...S)},r.viewportResizeCb=(...S)=>{e.viewportResize&&e.viewportResize(...S),o(...S)},r.inputCb=(...S)=>{e.input&&e.input(...S),c(...S)},r.mediaInteractionCb=(...S)=>{e.mediaInteaction&&e.mediaInteaction(...S),a(...S)},r.styleSheetRuleCb=(...S)=>{e.styleSheetRule&&e.styleSheetRule(...S),l(...S)},r.styleDeclarationCb=(...S)=>{e.styleDeclaration&&e.styleDeclaration(...S),u(...S)},r.canvasMutationCb=(...S)=>{e.canvasMutation&&e.canvasMutation(...S),h(...S)},r.fontCb=(...S)=>{e.font&&e.font(...S),m(...S)},r.selectionCb=(...S)=>{e.selection&&e.selection(...S),b(...S)},r.customElementCb=(...S)=>{e.customElement&&e.customElement(...S),g(...S)}}function o0(r,e={}){let t=r.doc.defaultView;if(!t)return()=>{};s0(r,e);let n;r.recordDOM&&(n=sm(r,r.doc));let i=YR(r),s=QR(r),o=om(r),c=KR(r,{win:t}),a=JR(r),l=t0(r),u=()=>{},h=()=>{},m=()=>{},b=()=>{};r.recordDOM&&(u=ZR(r,{win:t}),h=am(r,r.doc),m=e0(r,{win:t}),r.collectFonts&&(b=r0(r)));let g=n0(r),S=i0(r),v=[];for(let I of r.plugins)v.push(I.observer(I.callback,t,I.options));return X(()=>{Vt.forEach(I=>I.reset()),n?.disconnect(),i(),s(),o(),c(),a(),l(),u(),h(),m(),b(),g(),S(),v.forEach(I=>I())})}function vs(r){return typeof window[r]<"u"}function bs(r){return Boolean(typeof window[r]<"u"&&window[r].prototype&&"insertRule"in window[r].prototype&&"deleteRule"in window[r].prototype)}var Us=class{constructor(e){O(this,"iframeIdToRemoteIdMap",new WeakMap),O(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,i){let s=n||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),c=s.get(t);return c||(c=this.generateIdFn(),s.set(t,c),o.set(c,t)),c}getIds(e,t){let n=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(s=>this.getId(e,s,n,i))}
vendor: 11,518 bytes, line 67
67getRemoteId(e,t,n){let i=n||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let s=i.get(t);return s||-1}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},Ec=class{constructor(e){O(this,"iframes",new WeakMap),O(this,"crossOriginIframeMap",new WeakMap),O(this,"crossOriginIframeMirror",new Us(Rd)),O(this,"crossOriginIframeStyleMirror"),O(this,"crossOriginIframeRootIdMap",new WeakMap),O(this,"mirror"),O(this,"mutationCb"),O(this,"wrappedEmit"),O(this,"loadListener"),O(this,"stylesheetManager"),O(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Us(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let s=this.transformCrossOriginEvent(i,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case J.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:J.IncrementalSnapshot,data:{source:Y.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case J.Meta:case J.Load:case J.DomContentLoaded:return!1;case J.Plugin:return t;case J.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case J.IncrementalSnapshot:switch(t.data.source){case Y.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(i.node,s)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case Y.Drag:case Y.TouchMove:case Y.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case Y.ViewportResize:return!1;case Y.MediaInteraction:case Y.MouseInteraction:case Y.Scroll:case Y.CanvasMutation:case Y.Input:return this.replaceIds(t.data,e,["id"]),t;case Y.StyleSheetRule:case Y.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Y.Font:return t;case Y.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case Y.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(n=t.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,n,i){for(let s of i)!Array.isArray(t[s])&&typeof t[s]!="number"||(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,t)})}patchRootIdOnNode(e,t){e.type!==nm.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t)})}},Ic=class{constructor(e){O(this,"shadowDoms",new WeakSet),O(this,"mutationCb"),O(this,"scrollCb"),O(this,"bypassOptions"),O(this,"mirror"),O(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!bn(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=sm({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(om({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(V.host(e))),this.restoreHandlers.push(am({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(Qt(e.prototype,"attachShadow",function(i){return function(s){let o=i.call(this,s),c=V.shadowRoot(this);return c&&rm(this)&&n.addShadowRoot(c,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},wr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a0=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(yn=0;yn<wr.length;yn++)a0[wr.charCodeAt(yn)]=yn;var yn,c0=function(r){var e=new Uint8Array(r),t,n=e.length,i="";for(t=0;t<n;t+=3)i+=wr[e[t]>>2],i+=wr[(e[t]&3)<<4|e[t+1]>>4],i+=wr[(e[t+1]&15)<<2|e[t+2]>>6],i+=wr[e[t+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},pd=new Map;function l0(r,e){let t=pd.get(r);return t||(t=new Map,pd.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}var cm=(r,e,t)=>{if(!r||!(um(r,e)||typeof r=="object"))return;let n=r.constructor.name,i=l0(t,n),s=i.indexOf(r);return s===-1&&(s=i.length,i.push(r)),s};function Cs(r,e,t){if(r instanceof Array)return r.map(n=>Cs(n,e,t));if(r===null)return r;if(r instanceof Float32Array||r instanceof Float64Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Uint8Array||r instanceof Uint16Array||r instanceof Int16Array||r instanceof Int8Array||r instanceof Uint8ClampedArray)return{rr_type:r.constructor.name,args:[Object.values(r)]};if(r instanceof ArrayBuffer){let n=r.constructor.name,i=c0(r);return{rr_type:n,base64:i}}else{if(r instanceof DataView)return{rr_type:r.constructor.name,args:[Cs(r.buffer,e,t),r.byteOffset,r.byteLength]};if(r instanceof HTMLImageElement){let n=r.constructor.name,{src:i}=r;return{rr_type:n,src:i}}else if(r instanceof HTMLCanvasElement){let n="HTMLImageElement",i=r.toDataURL();return{rr_type:n,src:i}}else{if(r instanceof ImageData)return{rr_type:r.constructor.name,args:[Cs(r.data,e,t),r.width,r.height]};if(um(r,e)||typeof r=="object"){let n=r.constructor.name,i=cm(r,e,t);return{rr_type:n,index:i}}}}return r}var lm=(r,e,t)=>r.map(n=>Cs(n,e,t)),um=(r,e)=>{let n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function");return Boolean(n.find(i=>r instanceof e[i]))};function u0(r,e,t,n){let i=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of s)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let c=Qt(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...l){return Ne(this.canvas,t,n,!0)||setTimeout(()=>{let u=lm(l,e,this);r(this.canvas,{type:Tr["2D"],property:o,args:u})},0),a.apply(this,l)}});i.push(c)}catch{let c=Zs(e.CanvasRenderingContext2D.prototype,o,{set(a){r(this.canvas,{type:Tr["2D"],property:o,args:[a],setter:!0})}});i.push(c)}return()=>{i.forEach(o=>o())}}function f0(r){return r==="experimental-webgl"?"webgl":r}function md(r,e,t,n){let i=[];try{let s=Qt(r.HTMLCanvasElement.prototype,"getContext",function(o){return function(c,...a){if(!Ne(this,e,t,!0)){let l=f0(c);if("__context"in this||(this.__context=l),n&&["webgl","webgl2"].includes(l))if(a[0]&&typeof a[0]=="object"){let u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[c,...a])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function gd(r,e,t,n,i,s){let o=[],c=Object.getOwnPropertyNames(r);for(let a of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof r[a]!="function")continue;let l=Qt(r,a,function(u){return function(...h){let m=u.apply(this,h);if(cm(m,s,this),"tagName"in this.canvas&&!Ne(this.canvas,n,i,!0)){let b=lm(h,s,this),g={type:e,property:a,args:b};t(this.canvas,g)}return m}});o.push(l)}catch{let l=Zs(r,a,{set(u){t(this.canvas,{type:e,property:a,args:[u],setter:!0})}});o.push(l)}return o}function h0(r,e,t,n){let i=[];return i.push(...gd(e.WebGLRenderingContext.prototype,Tr.WebGL,r,t,n,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...gd(e.WebGL2RenderingContext.prototype,Tr.WebGL2,r,t,n,e)),()=>{i.forEach(s=>s())}}var fm="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3B
67hcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",d0=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),yd=typeof window<"u"&&window.Blob&&new Blob([d0(fm)],{type:"text/javascript;charset=utf-8"});function p0(r){let e;try{if(e=yd&&(window.URL||window.webkitURL).createObjectURL(yd),!e)throw"";let t=new Worker(e,{name:r?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+fm,{name:r?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}var Ac=class{constructor(e){O(this,"pendingCanvasMutations",new Map),O(this,"rafStamps",{latestId:0,invokeId:null}),O(this,"mirror"),O(this,"mutationCb"),O(this,"resetObservers"),O(this,"frozen",!1),O(this,"locked",!1),O(this,"processMutation",(a,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(l)});let{sampling:t="all",win:n,blockClass:i,blockSelector:s,recordCanvas:o,dataURLOptions:c}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(n,i,s),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,n,i,s,{dataURLOptions:c})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,i,s){let o=md(t,n,i,!0),c=new Map,a=new p0;a.onmessage=g=>{let{id:S}=g.data;if(c.set(S,!1),!("base64"in g.data))return;let{base64:v,type:I,width:A,height:x}=g.data;this.mutationCb({id:S,type:Tr["2D"],commands:[{property:"clearRect",args:[0,0,A,x]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:v}],type:I}]},0,0]}]})};let l=1e3/e,u=0,h,m=()=>{let g=[];return t.document.querySelectorAll("canvas").forEach(S=>{Ne(S,n,i,!0)||g.push(S)}),g},b=g=>{if(u&&g-u<l){h=requestAnimationFrame(b);return}
vendor: 5,981 bytes, line 67
67u=g,m().forEach(async S=>{var v;let I=this.mirror.getId(S);if(c.get(I)||S.width===0||S.height===0)return;if(c.set(I,!0),["webgl","webgl2"].includes(S.__context)){let x=S.getContext(S.__context);((v=x?.getContextAttributes())==null?void 0:v.preserveDrawingBuffer)===!1&&x.clear(x.COLOR_BUFFER_BIT)}let A=await createImageBitmap(S);a.postMessage({id:I,bitmap:A,width:S.width,height:S.height,dataURLOptions:s.dataURLOptions},[A])}),h=requestAnimationFrame(b)};h=requestAnimationFrame(b),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=md(e,t,n,!1),s=u0(this.processMutation.bind(this),e,t,n),o=h0(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{i(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let i=n.map(o=>{let{type:c,...a}=o;return a}),{type:s}=n[0];this.mutationCb({id:t,type:s,commands:i}),this.pendingCanvasMutations.delete(e)}},Tc=class{constructor(e){O(this,"trackedLinkElements",new WeakSet),O(this,"mutationCb"),O(this,"adoptedStyleSheetCb"),O(this,"styleMirror",new wc),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},i=[];for(let s of e){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(c,a)=>({rule:wd(c,s.href),index:a}))})),n.styleIds.push(o)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Pc=class{constructor(){O(this,"nodeMap",new WeakMap),O(this,"active",!1)}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},be,Es,Ua,Bs=!1;try{if(Array.from([1],r=>r*2)[0]!==2){let r=document.createElement("iframe");document.body.appendChild(r),Array.from=((wh=r.contentWindow)==null?void 0:wh.Array.from)||Array.from,document.body.removeChild(r)}}catch(r){console.debug("Unable to override Array.from",r)}var nt=xb();function Pr(r={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:s=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:m,slimDOMOptions:b,maskInputFn:g,maskTextFn:S,hooks:v,packFn:I,sampling:A={},dataURLOptions:x={},mousemoveWait:F,recordDOM:M=!0,recordCanvas:N=!1,recordCrossOriginIframes:G=!1,recordAfter:$=r.recordAfter==="DOMContentLoaded"?r.recordAfter:"load",userTriggeredOnInput:L=!1,collectFonts:Q=!1,inlineImages:re=!1,plugins:ue,keepIframeSrcFn:j=()=>!1,ignoreCSSAttributes:Qe=new Set([]),errorHandler:ct}=r;GR(ct);let se=G?window.parent===window:!0,Z=!1;if(!se)try{window.parent.document&&(Z=!1)}catch{Z=!0}if(se&&!e)throw new Error("emit function is required");if(!se&&!Z)return()=>{};F!==void 0&&A.mousemove===void 0&&(A.mousemove=F),nt.reset();let oe=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},Ie=Ad(b);UR();let Ke,De=0,Et=H=>{for(let Se of ue||[])Se.eventProcessor&&(H=Se.eventProcessor(H));return I&&!Z&&(H=I(H)),H};be=(H,Se)=>{var ee;let q=H;if(q.timestamp=js(),(ee=Vt[0])!=null&&ee.isFrozen()&&q.type!==J.FullSnapshot&&!(q.type===J.IncrementalSnapshot&&q.data.source===Y.Mutation)&&Vt.forEach(te=>te.unfreeze()),se)e?.(Et(q),Se);else if(Z){let te={type:"rrweb",event:Et(q),origin:window.location.origin,isCheckout:Se};window.parent.postMessage(te,"*")}if(q.type===J.FullSnapshot)Ke=q,De=0;else if(q.type===J.IncrementalSnapshot){if(q.data.source===Y.Mutation&&q.data.isAttachIframe)return;De++;let te=n&&De>=n,W=t&&q.timestamp-Ke.timestamp>t;(te||W)&&Es(!0)}};let ze=H=>{be({type:J.IncrementalSnapshot,data:{source:Y.Mutation,...H}})},lt=H=>be({type:J.IncrementalSnapshot,data:{source:Y.Scroll,...H}}),ut=H=>be({type:J.IncrementalSnapshot,data:{source:Y.CanvasMutation,...H}}),_e=H=>be({type:J.IncrementalSnapshot,data:{source:Y.AdoptedStyleSheet,...H}}),Me=new Tc({mutationCb:ze,adoptedStyleSheetCb:_e}),Ce=new Ec({mirror:nt,mutationCb:ze,stylesheetManager:Me,recordCrossOriginIframes:G,wrappedEmit:be});for(let H of ue||[])H.getMirror&&H.getMirror({nodeMirror:nt,crossOriginIframeMirror:Ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ce.crossOriginIframeStyleMirror});let Ve=new Pc;Ua=new Ac({recordCanvas:N,mutationCb:ut,win:window,blockClass:i,blockSelector:s,mirror:nt,sampling:A.canvas,dataURLOptions:x});let Ee=new Ic({mutationCb:ze,scrollCb:lt,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:oe,dataURLOptions:x,maskTextFn:S,maskInputFn:g,recordCanvas:N,inlineImages:re,sampling:A,slimDOMOptions:Ie,iframeManager:Ce,stylesheetManager:Me,canvasManager:Ua,keepIframeSrcFn:j,processedNodeManager:Ve},mirror:nt});Es=(H=!1)=>
67{if(!M)return;be({type:J.Meta,data:{href:window.location.href,width:Kp(),height:Qp()}},H),Me.reset(),Ee.init(),Vt.forEach(ee=>ee.lock());let Se=Gb(document,{mirror:nt,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:oe,maskTextFn:S,maskInputFn:g,slimDOM:Ie,dataURLOptions:x,recordCanvas:N,inlineImages:re,onSerialize:ee=>{Zp(ee,nt)&&Ce.addIframe(ee),em(ee,nt)&&Me.trackLinkElement(ee),Sc(ee)&&Ee.addShadowRoot(V.shadowRoot(ee),document)},onIframeLoad:(ee,q)=>{Ce.attachIframe(ee,q),Ee.observeAttachShadow(ee)},onStylesheetLoad:(ee,q)=>{Me.attachLinkElement(ee,q)},keepIframeSrcFn:j});if(!Se)return console.warn("Failed to snapshot the document");be({type:J.FullSnapshot,data:{node:Se,initialOffset:Yp(window)}},H),Vt.forEach(ee=>ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Me.adoptStyleSheets(document.adoptedStyleSheets,nt.getId(document))};try{let H=[],Se=q=>{var te;return X(o0)({mutationCb:ze,mousemoveCb:(W,$t)=>be({type:J.IncrementalSnapshot,data:{source:$t,positions:W}}),mouseInteractionCb:W=>be({type:J.IncrementalSnapshot,data:{source:Y.MouseInteraction,...W}}),scrollCb:lt,viewportResizeCb:W=>be({type:J.IncrementalSnapshot,data:{source:Y.ViewportResize,...W}}),inputCb:W=>be({type:J.IncrementalSnapshot,data:{source:Y.Input,...W}}),mediaInteractionCb:W=>be({type:J.IncrementalSnapshot,data:{source:Y.MediaInteraction,...W}}),styleSheetRuleCb:W=>be({type:J.IncrementalSnapshot,data:{source:Y.StyleSheetRule,...W}}),styleDeclarationCb:W=>be({type:J.IncrementalSnapshot,data:{source:Y.StyleDeclaration,...W}}),canvasMutationCb:ut,fontCb:W=>be({type:J.IncrementalSnapshot,data:{source:Y.Font,...W}}),selectionCb:W=>{be({type:J.IncrementalSnapshot,data:{source:Y.Selection,...W}})},customElementCb:W=>{be({type:J.IncrementalSnapshot,data:{source:Y.CustomElement,...W}})},blockClass:i,ignoreClass:o,ignoreSelector:c,maskTextClass:a,maskTextSelector:l,maskInputOptions:oe,inlineStylesheet:u,sampling:A,recordDOM:M,recordCanvas:N,inlineImages:re,userTriggeredOnInput:L,collectFonts:Q,doc:q,maskInputFn:g,maskTextFn:S,keepIframeSrcFn:j,blockSelector:s,slimDOMOptions:Ie,dataURLOptions:x,mirror:nt,iframeManager:Ce,stylesheetManager:Me,shadowDomManager:Ee,processedNodeManager:Ve,canvasManager:Ua,ignoreCSSAttributes:Qe,plugins:((te=ue?.filter(W=>W.observer))==null?void 0:te.map(W=>({observer:W.observer,options:W.options,callback:$t=>be({type:J.Plugin,data:{plugin:W.name,payload:$t}})})))||[]},v)};Ce.addLoadListener(q=>{try{H.push(Se(q.contentDocument))}catch(te){console.warn(te)}});let ee=()=>{Es(),H.push(Se(document)),Bs=!0};return["interactive","complete"].includes(document.readyState)?ee():(H.push(ke("DOMContentLoaded",()=>{be({type:J.DomContentLoaded,data:{}}),$==="DOMContentLoaded"&&ee()})),H.push(ke("load",()=>{be({type:J.Load,data:{}}),$==="load"&&ee()},window))),()=>{H.forEach(q=>{try{q()}catch(te){String(te).toLowerCase().includes("cross-origin")||console.warn(te)}}),Ve.destroy(),Bs=!1,qR()}}catch(H){console.warn(H)}}Pr.addCustomEvent=(r,e)=>{if(!Bs)throw new Error("please add custom event after start recording");be({type:J.Custom,data:{tag:r,payload:e}})};Pr.freezePage=()=>{Vt.forEach(r=>r.freeze())};Pr.takeFullSnapshot=r=>{if(!Bs)throw new Error("please take full snapshot after start recording");Es(r)};Pr.mirror=nt;var vd;(function(r){r[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped"})(vd||(vd={}));var m0="rrweb",g0={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},y0={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},hm=y0,eo=class extends ye{constructor(e){super(m0),this.recordingEvents=[],this.isRecording=!1,this.recordingStartTime=null,this.flushTimer=null,this.stopRecording=null,this.enabled=!1;let t=Object.assign(Object.assign(Object.assign({},hm.recordOptions),e?.recordOptions),g0);this.config=Object.assign(Object.assign(Object.assign({},hm),e),{recordOptions:t}),E.info("RRWebPlugin initialized",{additionalSampleRate:this.config.additionalSampleRate,batchSize:this.config.batchSize,flushInterval:this.config.flushInterval})}enable(){var e;if(this.enabled){E.info("RRWebPlugin already enabled");return}let t=(e=this.context)===null||e===void 0?void 0:e.getSession();
67if(!t||!t.record){E.warn("RRWebPlugin skipping - session not being recorded",{hasSession:!!t,sessionRecord:t?.record});return}let n=Math.random();if(n>this.config.additionalSampleRate){E.warn("RRWebPlugin skipping - session replay additionalSampleRate",{randomValue:n,samplingRate:this.config.additionalSampleRate});return}this.enabled=!0,E.info("RRWebPlugin enabled - starting recording"),this.startRecording()}disable(){if(!this.enabled){E.info("RRWebPlugin already disabled");return}E.info("RRWebPlugin disabled - stopping recording"),this.enabled=!1,this.stopCurrentRecording()}record(e){let t=e?.action;t==="start"?(E.info("RRWebPlugin manual start recording"),this.startRecording()):t==="stop"&&(E.info("RRWebPlugin manual stop recording"),this.stopCurrentRecording())}onload(){}startRecording(){this.recordingStartTime=Date.now(),this.recordingEvents=[],this.isRecording=!0,E.info("RRWebPlugin starting rrweb recording",{startTime:this.recordingStartTime});let e=Pr(Object.assign(Object.assign({},this.config.recordOptions),{emit:this.handleRRWebEvent.bind(this)}));e?(this.stopRecording=e,E.info("RRWebPlugin rrweb recording initialized successfully")):E.warn("RRWebPlugin failed to initialize rrweb recording"),this.flushTimer=window.setInterval(()=>{this.flush()},this.config.flushInterval)}stopCurrentRecording(){if(!this.isRecording){E.info("RRWebPlugin stopCurrentRecording called but not recording");return}E.info("RRWebPlugin stopping current recording"),this.isRecording=!1,this.stopRecording&&(this.stopRecording(),this.stopRecording=null,E.info("RRWebPlugin rrweb recording stopped")),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null,E.info("RRWebPlugin flush timer cleared")),this.flush()}handleRRWebEvent(e){this.isRecording&&(this.recordingEvents.push(e),this.recordingEvents.length>=this.config.batchSize&&(E.info("RRWebPlugin flushing events due to batch size",{eventCount:this.recordingEvents.length,batchSize:this.config.batchSize}),this.flush()))}flush(){if(this.recordingEvents.length===0){E.info("RRWebPlugin flushEvent called but no events to flush");return}E.info("RRWebPlugin flushing events",{eventCount:this.recordingEvents.length});let e=[...this.recordingEvents],t={version:"1.0.0",events:e,eventCount:e.length};this.context.record(ia,t),E.info("RRWebPlugin events sent to RUM",{eventType:ia,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}};var v0=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t},to;(function(r){r.Path="PATH",r.Hash="HASH",r.PathAndHash="PATH_AND_HASH"})(to||(to={}));var dm="us-west-2",Zc=`https://dataplane.rum.${dm}.amazonaws.com`,Ln=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),ro=r=>({allowCookies:!1,batchLimit:100,client:zo,compressionStrategy:{enabled:!0},cookieAttributes:r,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:Zc,endpointUrl:new URL(Zc),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:to.Path,pagesToExclude:[],pagesToInclude:[/.*/],signing:!1,recordResourceUrl:!0,retries:2,routeChangeComplete:100,routeChangeTimeout:1e4,sessionAttributes:{},sessionEventLimit:200,sessionLengthSeconds:60*30,sessionSampleRate:1,suppressSessionStartEvent:!1,useBeacon:!0,userIdRetentionDays:30,enableW3CTraceId:!1,candidatesCacheSize:10}),Or=class{constructor(e,t,n,i={}){var{cookieAttributes:s}=i,o=v0(i,["cookieAttributes"]);this.eventBus=new Ft,typeof n>"u"&&(n="us-west-2"),this.applicationId=e;let c=Object.assign(Object.assign({},Ln()),s);this.config=Object.assign(Object.assign({fetchFunction:fetch},ro(c)),o),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=o.endpoint?o.endpoint:Zc.replace(dm,n),this.config.endpointUrl=new URL(this.config.endpoint),E.configure(this.config.debug),E.info("Initialized RUM Slim"),this.eventCache=new on({id:e,version:t},this.config,this.eventBus),this.dispatchManager=this.initDispatch(n,e),this.pluginManager=this.initPluginManager(e,t),this.eventCache.setPluginFlushHook(()=>this.pluginManager.flush()),this.config.enableRumClient?this.enable():this.disable()}setAwsCredentials(e){this.dispatchManager.setAwsCredentials(e)}setSigningConfigFactory(e){this.dispatchManager.setSigningConfigFactory(e)}addSessionAttributes(e){this.eventCache.addSessionAttributes(e)}getSessionId(){return this.eventCache.getSessionId()}pinSessionId(e){this.eventCache.pinSessionId(e)}startSession(e){return this.eventCache.startSession(e)}getUserId(){return this.eventCache.getUserId()}pinUserId(e){this.eventCache.pinUserId(e)}setEventMetadataHook(e){this.eventCache.setEventMetadataHook(e)}clearEventMetadataHook(){this.eventCache.clearEventMetadataHook()}
67addPlugin(e){this.pluginManager.addPlugin(e)}dispatch(){this.dispatchManager.dispatchFetch()}dispatchBeacon(){this.dispatchManager.dispatchBeacon()}enable(){this.eventCache.enable(),this.pluginManager.enable(),this.dispatchManager.enable()}disable(){this.dispatchManager.disable(),this.pluginManager.disable(),this.eventCache.disable()}allowCookies(e){this.config.allowCookies=e}clearCookies(){let e=this.config.cookieAttributes;[Bt,Wt,ft,`${Bt}_${this.applicationId}`,`${Wt}_${this.applicationId}`,`${ft}_${this.applicationId}`].forEach(n=>oa(n,e))}recordPageView(e){this.eventCache.recordPageView(e)}recordError(e){this.pluginManager.record("com.amazonaws.rum.js-error",e)}registerDomEvents(e){this.pluginManager.updatePlugin("com.amazonaws.rum.dom-event",e)}recordEvent(e,t,n){this.eventCache.recordEvent(e,t,n)}initDispatch(e,t){return new Kr(t,e,this.config.endpointUrl,this.eventCache,this.config)}initPluginManager(e,t){let n={applicationId:e,applicationVersion:t,config:this.config,record:this.eventCache.recordEvent,recordCandidate:this.eventCache.recordCandidate,recordPageView:this.eventCache.recordPageView,getSession:this.eventCache.getSession,eventBus:this.eventBus},i=new sn(n);return this.config.disableAutoPageView||i.addPlugin(new $i),this.config.eventPluginsToLoad.forEach(s=>{i.addPlugin(s)}),i}};var Ye;(function(r){r.Errors="errors",r.Performance="performance",r.Interaction="interaction",r.Http="http",r.Replay="replay"})(Ye||(Ye={}));var el;(function(r){r.Path="PATH",r.Hash="HASH",r.PathAndHash="PATH_AND_HASH"})(el||(el={}));var pm=r=>Object.assign(Object.assign({},ro(r)),{signing:!0,telemetries:[Ye.Errors,Ye.Performance,Ye.Http,Ye.Replay]});var $n=class extends Or{constructor(e,t,n,i={}){super(e,t,n,Object.assign(Object.assign({},pm(Ln())),i)),E.info(`RUM client initialized for app: ${e}`),E.info(`Telemetries enabled: ${this.config.telemetries.join(", ")||"none"}`)}initDispatch(e,t){let n=super.initDispatch(e,t);return n.setSigningConfigFactory(ta),n.setCognitoCredentialProviderFactory((i,s,o,c)=>{let a={identityPoolId:o,guestRoleArn:c,cookieAttributes:i.cookieAttributes};return o&&c?new en(a,s).ChainAnonymousCredentialsProvider:new tn(a,s).ChainAnonymousCredentialsProvider}),this.config.signing&&this.config.identityPoolId&&n.setCognitoCredentials(this.config.identityPoolId,this.config.guestRoleArn),n}initPluginManager(e,t){let n=super.initPluginManager(e,t);return this.constructBuiltinPlugins().forEach(s=>{n.addPlugin(s)}),n}recordError(e){this.pluginManager.record(da,e)}registerDomEvents(e){this.pluginManager.updatePlugin(fa,e)}constructBuiltinPlugins(){let e=[],t=this.telemetryFunctor();return this.config.telemetries.forEach(n=>{typeof n=="string"&&t[n.toLowerCase()]?e=[...e,...t[n.toLowerCase()]({})]:Array.isArray(n)&&t[n[0].toLowerCase()]&&(e=[...e,...t[n[0].toLowerCase()](n[1])])}),e}telemetryFunctor(){return{[Ye.Errors]:e=>[new Di(e)],[Ye.Performance]:e=>[new Li(e),new ji(e),new qi(e)],[Ye.Interaction]:e=>[new ar(e)],[Ye.Http]:e=>[new Ki(e),new Yi(e)],[Ye.Replay]:e=>[new eo(e)]}}};var ot=gt(Un());var no=gt(ml()),_r=ot.default.createContext({rum:void 0,setRum:void 0}),QO=({children:r,rumKey:e,appVersion:t})=>{let[n,i]=(0,ot.useState)(void 0);return(0,ot.useEffect)(()=>{if(!e){console.log("[RUM] Disabled: no rumKey configured");return}let s=vl("performance"),o={sessionSampleRate:e.webSessionSampleRate||0,guestRoleArn:e.role,identityPoolId:e.identityPoolId,endpoint:"https://dataplane.rum.eu-west-2.amazonaws.com",telemetries:e.webTelemetries||["errors","http","performance"],allowCookies:s,enableXRay:e.webEnableXRay!==void 0?e.webEnableXRay:!0,disableAutoPageView:!1};try{let c=new $n(e.id,t,"eu-west-2",o);i(c),console.log("[RUM] Initialized successfully",{...o})}catch(c){console.error("[RUM] Failed to initialize:",c)}},[e,t]),(0,no.jsxs)(_r.Provider,{value:{rum:n,setRum:i},children:[(0,no.jsx)(b0,{}),r]})},b0=()=>{let{rum:r}=(0,ot.useContext)(_r),e=pl(),t=(0,ot.useRef)(null);return(0,ot.useEffect)(()=>{if(!r)return;let n=e.pathname;n!==t.current&&(t.current=n,r.recordPageView(n))},[r,e.pathname]),null};function S0(r){var n;let t=`; ${document.cookie}`.split(`; ${r}=`);if(t.length===2)return(n=t==null?void 0:t.pop())==null?void 0:n.split(";").shift()}var w0={legacy:{"price-asc":"price-asc","price-desc":"price-desc","best-sellers":"best-sellers",newness:"newness"},virtual:{"price-asc":"vi-sort-low-high","price-desc":"vi-sort-high-low","best-sellers":"vi-sort-best-sellers",newness:"vi-sort-newness","rating-desc":"vi-avg-rating-desc"}},x0=(r,e)=>{e.clearRefinements(),r.forEach(t=>{t.values&&t.values.length>
670&&t.values.forEach(n=>{t.key==="categorySlugs"?e.addFacetRefinement(t.key,n):(t.key,e.addDisjunctiveFacetRefinement(t.key,n))})})},ym=({listType:r})=>{var A;let{rum:e}=(0,at.useContext)(_r),t=(0,at.useContext)(Bn),{user:n}=(0,at.useContext)(Wn),[i,s]=(0,at.useState)("idle"),[o,c]=(0,at.useState)("idle"),[a,l]=(0,at.useState)(void 0),{enableVirtualIndexes:u,enableAlgoliaAppSeparation:h}=(0,at.useContext)(Zt),{algoliaAppId:m,algoliaSearchKey:b}=yl(t.key,h),g=(0,mm.default)(m,b),S=(A=t==null?void 0:t.algolia)==null?void 0:A.algoliaSourceIndex,v=x=>{if(!S||!x)return S||"debenhams-dbz-prod";let M=w0[u?"virtual":"legacy"][x];return M?`${S}-${M}`:S};return{search:(0,at.useCallback)(async(x,F,M,N,G,$,L)=>{var ze,lt,ut,_e;s("loading");let Q=[],re=[],ue=L||r,j=JSON.parse(window.localStorage.getItem("userSession")||"{}"),Qe=typeof n=="undefined"?"guest"in j?j.guest:!0:n==null?void 0:n.guest,ct={disjunctiveFacets:Du,facets:["categorySlugs","curatedSlugs"],facetingAfterDistinct:!0,hitsPerPage:M,userToken:Qe?S0("_ALGOLIA")||"":(j==null?void 0:j.id)||(n==null?void 0:n.id),enablePersonalization:!0,distinct:$,ruleContexts:[ue]},se=v(G);if(!se)throw new Error("No Algolia index available");let Z=(0,gm.default)(g,se,ct);if(x)ue==="visually-search"?(Q.push("visual-search"),re.push("visual-search")):ue==="curated"?(Z.addFacetRefinement("curatedSlugs",x),Q.push("curation-search"),re.push("curation-search")):ue!=="category"?(Z.setQuery(x),Q.push("text-search"),re.push("text-search")):(Z.addFacetRefinement("categorySlugs",x),Q.push("category-search"),re.push("category-search"),((ze=x==null?void 0:x.toLowerCase())!=null&&ze.includes("sale")||(lt=x==null?void 0:x.toLowerCase())!=null&<.includes("outlet"))&&re.push("sale"),((ut=x==null?void 0:x.toLowerCase())!=null&&ut.includes("promo")||(_e=x==null?void 0:x.toLowerCase())!=null&&_e.includes("promotion"))&&re.push("promotion"),!re.includes("sale")&&!re.includes("promotion")&&re.push("fullprice"));else if(ue==="skus"){let Ce=x.split(",").map(Ve=>Ve.trim()).map(Ve=>`productKey:${Ve}`).join(" OR ");Z.setQueryParameter("filters",Ce),Q.push("sku-search"),re.push("sku-search")}else ue==="samples"&&re.push(ue);let oe=[N!=null?N:[]];N&&N.length>0&&(ue==="carousel"?x0(N,Z):(oe=$u(N),Hu(oe[0],Z)),Q.push("facet-refinement")),Z.setQueryParameter("ruleContexts",re).setQueryParameter("clickAnalytics",!0).setQueryParameter("analyticsTags",Q).setQueryParameter("getRankingInfo",!0).setPage(F),c("loading");let Ie=Date.now(),Ke;if(oe.length===1)Ke=await Z.searchOnce({});else{let Me=(N!=null?N:[]).map(Ee=>{var H;return(H=Ho[Ee.key])!=null?H:Ee.key});oe.slice(1).forEach(Ee=>{Z.derive(H=>{let Se=Me.reduce((ee,q)=>ee.clearRefinements(q),H);return Uo(Ee,Se)})});let Ce=new Array(oe.length);await new Promise((Ee,H)=>{let Se=oe.length,ee=()=>{Se-=1,Se===0&&Ee()};Z.once("result",({results:q,state:te})=>{Ce[0]={content:q,state:te},ee()}),Z.once("error",({error:q})=>H(q)),Z.derivedHelpers.forEach((q,te)=>{q.once("result",({results:W,state:$t})=>{Ce[te+1]={content:W,state:$t},ee()}),q.once("error",({error:W})=>H(W))}),Z.search()});let Ve=ju(Ce.map(Ee=>Ee.content.nbHits),M);Ke=Ce[Ve]}let De=Date.now()-Ie;console.log(`[Algolia] Search took ${De}ms`),e==null||e.recordEvent("searchDuration",{provider:"algolia",duration:De}),e==null||e.dispatchBeacon();let Et=si(Ke,Ht(t==null?void 0:t.key),F.toString(),t==null?void 0:t.key);return l({plpProductSearch:Et}),s("idle"),c("success"),Ke},[S,r,n,t,e]),state:i,searchLifeCycle:o,data:a}};var Oe=gt(Un());function vm(r){if(/under|moins|onder|under/i.test(r))return 0;let e=r.match(/\d+/);return e?parseInt(e[0],10):1/0}function bm(r){if(/up to|jusqu'Ã |tot|upp till/i.test(r))return 0;let e=r.match(/\d+/);return e?parseInt(e[0],10):1/0}function R0(r,e){let t=Object.entries(e);return r==="priceBands"?t.sort((n,i)=>vm(n[0])-vm(i[0])):r==="discountBands"&&t.sort((n,i)=>bm(n[0])-bm(i[0])),Object.fromEntries(t)}function Sm(r){let e={};for(let[t,n]of Object.entries(r))e[t]=R0(t,n);return e}function C0(r){var n;let t=`; ${document.cookie}`.split(`; ${r}=`);if(t.length===2)return(n=t==null?void 0:t.pop())==null?void 0:n.split(";").shift()}var E0={priceRange:"price",discountRange:"discountPercentage",publishedRange:"publishedAtTimestamp"};function I0(r,e){let t=E0[r];if(!t||!e[0])return;if(r==="publishedRange"){let[c,a]=e[0].split("-"),l=Number(c),u=Number(a);if(Number.isNaN(l)||Number.isNaN(u))return;let h=24*60*60*1e3,m=Date.now();return{attribute:t,bounds:[m-u*h,m-l*h]}}let[n,i]=e[0].split("-"),s=Number(n);if(Number.isNaN(s))return;let o=[s];return i!==void 0&&i.toLowerCase()!=="max"&&!Number.isNaN(Number(i))&&o.push(Number(i)),{attribute:t,bounds:o}}function A0(r){let e=r==null?void 0:r.trim();if(e)return e.replace(/^(?:https?:\/\/)?[^/]*/i,"")||"/"}var wm=({listType:r,breadcrumbAsString:e})=>{let t=(0,Oe.useContext)(Bn),{rum:n}=(0,Oe.useContext)(_r),{user:i}=(0,Oe.useContext)(Wn),{AbtastyConfig:s}=(0,Oe.useContext)(zn),{enableGoogleSearch:o,enableGoogleDynamicFacets:c}=(0,Oe.useContext)(Zt),a=o||qn(Gn(s),r),l=s==null?void 0:s.includes("enableGoogleDynamicFacets"),u=c||l,[h,m]=(0,Oe.useState)("idle"),[b,g]=(0,Oe.useState)("idle"),[S,v]=(0,Oe.useState)(void 0),[I,A]=(0,Oe.useState)(void 0),[x,F]=(0,Oe.useState)(void 0),[M,N]=(0,Oe.useState)(void 0),[G,$]=(0,Oe.useState)(void 0);return{search:(0,Oe.useCallback)(async(Q,re,ue,j,Qe,ct,se)=>{var Z;m("loading");try{let oe=se||r,Ie=C0("_ga"),Ke=Ie?Ie.split(".").slice(2).join("."):void 0,De=new URLSearchParams({query:oe==="category"&&e?e:Q,listType:oe,page:String(re),hitsPerPage:String(ue),enableGoogleSearch:a?"true":"false",enableGoogleDynamicFacets:u?"true":"false"});oe==="category"&&De.append("categorySlug",Q),Ke&&De.append("visitorId",Ke),Qe&&De.append("sort",Qe),j&&j.length>0&&De.append("filters",JSON.stringify(j)),g("loading");let Et=Date.now(),ze=await fetch(`/_api/search/plpProductsSearch?${De.toString()}`);if(!ze.ok)throw new Error(`Search API failed: ${ze.statusText}`);let lt=await ze.json(),ut=Date.now()-Et;console.log(`[Google] Search took ${ut}ms`),n==null||n.recordEvent("searchDuration",{provider:"google",duration:ut}),n==null||n.dispatchBeacon();let _e=lt.plpProductSearch,Me=Sm(_e.facets||{}),Ce=new Set(oe==="category"?[]:["categoryTaxonomy"]),Ve=Object.entries(Me).filter(([te])=>!Ce.has(te)).filter(([,te])=>Object.keys(te).length>0).map(([te,W])=>({name:te,data:W})).sort((te,W)=>te.name==="isNextDay"?-1:W.name==="isNextDay"?1:0),Ee={},H={};j&&j.length>
670&&j.forEach(te=>{let W=I0(te.key,te.values);W?H[W.attribute]=W.bounds:Ee[te.key]=te.values});let Se={content:{..._e,hits:_e.hits||[],offset:re*ue,length:((Z=_e.hits)==null?void 0:Z.length)||0,disjunctiveFacets:Ve,hierarchicalFacets:[],facets:Me},state:{disjunctiveFacetsRefinements:Ee,numericRefinements:H,facetsRefinements:{},hierarchicalFacetsRefinements:{}}},ee=si(Se,Ht(t==null?void 0:t.key),re.toString(),t==null?void 0:t.key),q=A0(_e.redirectUri);return q&&(ee.redirect=q),v({plpProductSearch:ee}),A(_e.attributionToken||void 0),F(oe==="category"&&(e||Q)||void 0),N(oe==="category"?void 0:Q||void 0),$(lt.userId||void 0),m("idle"),g("success"),Se}catch(oe){throw m("idle"),g("idle"),oe}},[i,t,a,u,e,r,n]),state:h,searchLifeCycle:b,attributionToken:I,attributionPageCategories:x,attributionSearchQuery:M,attributionUserId:G,data:S}};var C1=r=>{let{enableGoogleSearch:e}=(0,tl.useContext)(Zt),{AbtastyConfig:t}=(0,tl.useContext)(zn),n=qn(Gn(t),r.listType),s=!(r.listType==="curated"||r.listType==="visually-search"||r.listType.includes("carousel"))&&!!(e||n),{breadcrumbAsString:o,...c}=r,a=ym(c),l=wm({...c,breadcrumbAsString:o});return{...s?l:a,isGoogleSearch:s}};export{Nl as a,ku as b,Du as c,Hu as d,Pg as e,QO as f,Gn as g,qn as h,C1 as i}; 68/*! Bundled license information: 69 70algoliasearch/dist/algoliasearch.umd.js: 71 (*! algoliasearch.umd.js | 4.23.3 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript *) 72*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.