@statsig/js-client 3.18.2 → 3.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,2 @@
1
- var rrwebRecord=function(){"use strict";var N;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(N||(N={}));function Bt(e){return e.nodeType===e.ELEMENT_NODE}function ce(e){const t=e?.host;return Boolean(t?.shadowRoot===e)}function de(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Vt(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Ht(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function ye(e){try{const t=e.rules||e.cssRules;return t?Vt(Array.from(t,He).join("")):null}catch{return null}}function He(e){let t;if(qt(e))try{t=ye(e.styleSheet)||Ht(e)}catch{}else if(Xt(e)&&e.selectorText.includes(":"))return Gt(e.cssText);return t||e.cssText}function Gt(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function qt(e){return"styleSheet"in e}function Xt(e){return"selectorText"in e}class Ge{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return n??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Yt(){return new Ge}function De({element:e,maskInputOptions:t,tagName:r,type:n,value:o,maskInputFn:a}){let l=o||"";const i=n&&K(n);return(t[r.toLowerCase()]||i&&t[i])&&(a?l=a(l,e):l="*".repeat(l.length)),l}function K(e){return e.toLowerCase()}const qe="__rrweb_original__";function Jt(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let n=0;n<e.width;n+=r)for(let o=0;o<e.height;o+=r){const a=t.getImageData,l=qe in a?a[qe]:a;if(new Uint32Array(l.call(t,n,o,Math.min(r,e.width-n),Math.min(r,e.height-o)).data.buffer).some(i=>i!==0))return!1}return!0}function Ae(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?K(t):null}function Xe(e,t){var r;let n;try{n=new URL(e,t??window.location.href)}catch{return null}const o=/\.([0-9a-z]+)(?:$)/i,a=n.pathname.match(o);return(r=a?.[1])!==null&&r!==void 0?r:null}let Kt=1;const Qt=new RegExp("[^a-z0-9-_:]"),ue=-2;function Ye(){return Kt++}function Zt(e){if(e instanceof HTMLFormElement)return"form";const t=K(e.tagName);return Qt.test(t)?"div":t}function er(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let re,Je;const tr=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,rr=/^(?:[a-z+]+:)?\/\//i,nr=/^www\..*/i,or=/^(data:)([^,]*),(.*)/i;function ge(e,t){return(e||"").replace(tr,(r,n,o,a,l,i)=>{const s=o||l||i,c=n||a||"";if(!s)return r;if(rr.test(s)||nr.test(s))return`url(${c}${s}${c})`;if(or.test(s))return`url(${c}${s}${c})`;if(s[0]==="/")return`url(${c}${er(t)+s}${c})`;const d=t.split("/"),p=s.split("/");d.pop();for(const h of p)h!=="."&&(h===".."?d.pop():d.push(h));return`url(${c}${d.join("/")}${c})`})}const sr=/^[^ \t\n\r\u000c]+/,ar=/^[, \t\n\r\u000c]+/;function ir(e,t){if(t.trim()==="")return t;let r=0;function n(a){let l;const i=a.exec(t.substring(r));return i?(l=i[0],r+=l.length,l):""}const o=[];for(;n(ar),!(r>=t.length);){let a=n(sr);if(a.slice(-1)===",")a=Se(e,a.substring(0,a.length-1)),o.push(a);else{let l="";a=Se(e,a);let i=!1;for(;;){const s=t.charAt(r);if(s===""){o.push((a+l).trim());break}else if(i)s===")"&&(i=!1);else if(s===","){r+=1,o.push((a+l).trim());break}else s==="("&&(i=!0);l+=s,r+=1}}}return o.join(", ")}const Ke=new WeakMap;function Se(e,t){return!t||t.trim()===""?t:be(e,t)}function lr(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function be(e,t){let r=Ke.get(e);if(r||(r=e.createElement("a"),Ke.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Qe(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?Se(e,n):r==="srcset"?ir(e,n):r==="style"?ge(n,be(e)):t==="object"&&r==="data"?Se(e,n):n)}function Ze(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function cr(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const o=e.classList[n];if(t.test(o))return!0}if(r)return e.matches(r)}catch{}return!1}function ve(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?ve(e.parentNode,t,r):!1;for(let n=e.classList.length;n--;){const o=e.classList[n];if(t.test(o))return!0}return r?ve(e.parentNode,t,r):!1}function et(e,t,r,n){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(typeof t=="string"){if(n){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(ve(o,t,n))return!0;if(r){if(n){if(o.closest(r))return!0}else if(o.matches(r))return!0}}catch{}return!1}function dr(e,t,r){const n=e.contentWindow;if(!n)return;let o=!1,a;try{a=n.document.readyState}catch{return}if(a!=="complete"){const i=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),o=!0,t()});return}const l="about:blank";if(n.location.href!==l||e.src===l||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function ur(e,t,r){let n=!1,o;try{o=e.sheet}catch{return}if(o)return;const a=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),n=!0,t()})}function pr(e,t){const{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:l,inlineStylesheet:i,maskInputOptions:s={},maskTextFn:c,maskInputFn:d,dataURLOptions:p={},inlineImages:h,recordCanvas:m,keepIframeSrcFn:f,newlyAddedElement:u=!1}=t,y=hr(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:e.compatMode}:{type:N.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return fr(e,{doc:r,blockClass:o,blockSelector:a,inlineStylesheet:i,maskInputOptions:s,maskInputFn:d,dataURLOptions:p,inlineImages:h,recordCanvas:m,keepIframeSrcFn:f,newlyAddedElement:u,rootId:y});case e.TEXT_NODE:return mr(e,{doc:r,needsMask:l,maskTextFn:c,rootId:y});case e.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:N.Comment,textContent:e.textContent||"",rootId:y};default:return!1}}function hr(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function mr(e,t){var r;const{needsMask:n,maskTextFn:o,rootId:a}=t,l=e.parentNode&&e.parentNode.tagName;let i=e.textContent;const s=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;if(s&&i){try{e.nextSibling||e.previousSibling||!((r=e.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(i=ye(e.parentNode.sheet))}catch(d){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${d}`,e)}i=ge(i,be(t.doc))}return c&&(i="SCRIPT_PLACEHOLDER"),!s&&!c&&i&&n&&(i=o?o(i,e.parentElement):i.replace(/[\S]/g,"*")),{type:N.Text,textContent:i||"",isStyle:s,rootId:a}}function fr(e,t){const{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:i,dataURLOptions:s={},inlineImages:c,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m}=t,f=cr(e,n,o),u=Zt(e);let y={};const S=e.attributes.length;for(let g=0;g<S;g++){const v=e.attributes[g];Ze(u,v.name,v.value)||(y[v.name]=Qe(r,u,K(v.name),v.value))}if(u==="link"&&a){const g=Array.from(r.styleSheets).find(R=>R.href===e.href);let v=null;g&&(v=ye(g)),v&&(delete y.rel,delete y.href,y._cssText=ge(v,g.href))}if(u==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const g=ye(e.sheet);g&&(y._cssText=ge(g,be(r)))}if(u==="input"||u==="textarea"||u==="select"){const g=e.value,v=e.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&g?y.value=De({element:e,type:Ae(e),tagName:u,value:g,maskInputOptions:l,maskInputFn:i}):v&&(y.checked=v)}if(u==="option"&&(e.selected&&!l.select?y.selected=!0:delete y.selected),u==="canvas"&&d){if(e.__context==="2d")Jt(e)||(y.rr_dataURL=e.toDataURL(s.type,s.quality));else if(!("__context"in e)){const g=e.toDataURL(s.type,s.quality),v=document.createElement("canvas");v.width=e.width,v.height=e.height;const R=v.toDataURL(s.type,s.quality);g!==R&&(y.rr_dataURL=g)}}if(u==="img"&&c){re||(re=r.createElement("canvas"),Je=re.getContext("2d"));const g=e,v=g.crossOrigin;g.crossOrigin="anonymous";const R=()=>{g.removeEventListener("load",R);try{re.width=g.naturalWidth,re.height=g.naturalHeight,Je.drawImage(g,0,0),y.rr_dataURL=re.toDataURL(s.type,s.quality)}catch(D){console.warn(`Cannot inline img src=${g.currentSrc}! Error: ${D}`)}v?y.crossOrigin=v:g.removeAttribute("crossorigin")};g.complete&&g.naturalWidth!==0?R():g.addEventListener("load",R)}if(u==="audio"||u==="video"){const g=y;g.rr_mediaState=e.paused?"paused":"played",g.rr_mediaCurrentTime=e.currentTime,g.rr_mediaPlaybackRate=e.playbackRate,g.rr_mediaMuted=e.muted,g.rr_mediaLoop=e.loop,g.rr_mediaVolume=e.volume}if(h||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),f){const{width:g,height:v}=e.getBoundingClientRect();y={class:y.class,rr_width:`${g}px`,rr_height:`${v}px`}}u==="iframe"&&!p(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src);let b;try{customElements.get(u)&&(b=!0)}catch{}return{type:N.Element,tagName:u,attributes:y,childNodes:[],isSVG:lr(e)||void 0,needBlock:f,rootId:m,isCustom:b}}function T(e){return e==null?"":e.toLowerCase()}function yr(e,t){return!!(t.comment&&e.type===N.Comment||e.type===N.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Xe(e.attributes.href)==="js")||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(T(e.attributes.name).match(/^msapplication-tile(image|color)$/)||T(e.attributes.name)==="application-name"||T(e.attributes.rel)==="icon"||T(e.attributes.rel)==="apple-touch-icon"||T(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&T(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(T(e.attributes.property).match(/^(og|twitter|fb):/)||T(e.attributes.name).match(/^(og|twitter):/)||T(e.attributes.name)==="pinterest")||t.headMetaRobots&&(T(e.attributes.name)==="robots"||T(e.attributes.name)==="googlebot"||T(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(T(e.attributes.name)==="author"||T(e.attributes.name)==="generator"||T(e.attributes.name)==="framework"||T(e.attributes.name)==="publisher"||T(e.attributes.name)==="progid"||T(e.attributes.property).match(/^article:/)||T(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(T(e.attributes.name)==="google-site-verification"||T(e.attributes.name)==="yandex-verification"||T(e.attributes.name)==="csrf-token"||T(e.attributes.name)==="p:domain_verify"||T(e.attributes.name)==="verify-v1"||T(e.attributes.name)==="verification"||T(e.attributes.name)==="shopify-checkout-api-token"))))}function ne(e,t){const{doc:r,mirror:n,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:i,skipChild:s=!1,inlineStylesheet:c=!0,maskInputOptions:d={},maskTextFn:p,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f={},inlineImages:u=!1,recordCanvas:y=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:g=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:R=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:V=!1}=t;let{needsMask:W}=t,{preserveWhiteSpace:j=!0}=t;!W&&e.childNodes&&(W=et(e,l,i,W===void 0));const z=pr(e,{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:W,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:h,dataURLOptions:f,inlineImages:u,recordCanvas:y,keepIframeSrcFn:D,newlyAddedElement:V});if(!z)return console.warn(e,"not serialized"),null;let X;n.hasNode(e)?X=n.getId(e):yr(z,m)||!j&&z.type===N.Text&&!z.isStyle&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?X=ue:X=Ye();const C=Object.assign(z,{id:X});if(n.add(e,C),X===ue)return null;S&&S(e);let Z=!s;if(C.type===N.Element){Z=Z&&!C.needBlock,delete C.needBlock;const P=e.shadowRoot;P&&de(P)&&(C.isShadowHost=!0)}if((C.type===N.Document||C.type===N.Element)&&Z){m.headWhitespace&&C.type===N.Element&&C.tagName==="head"&&(j=!1);const P={doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:W,maskTextClass:l,maskTextSelector:i,skipChild:s,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f,inlineImages:u,recordCanvas:y,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:g,onStylesheetLoad:v,stylesheetLoadTimeout:R,keepIframeSrcFn:D};if(!(C.type===N.Element&&C.tagName==="textarea"&&C.attributes.value!==void 0))for(const J of Array.from(e.childNodes)){const H=ne(J,P);H&&C.childNodes.push(H)}if(Bt(e)&&e.shadowRoot)for(const J of Array.from(e.shadowRoot.childNodes)){const H=ne(J,P);H&&(de(e.shadowRoot)&&(H.isShadow=!0),C.childNodes.push(H))}}return e.parentNode&&ce(e.parentNode)&&de(e.parentNode)&&(C.isShadow=!0),C.type===N.Element&&C.tagName==="iframe"&&dr(e,()=>{const P=e.contentDocument;if(P&&b){const J=ne(P,{doc:P,mirror:n,blockClass:o,blockSelector:a,needsMask:W,maskTextClass:l,maskTextSelector:i,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f,inlineImages:u,recordCanvas:y,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:g,onStylesheetLoad:v,stylesheetLoadTimeout:R,keepIframeSrcFn:D});J&&b(e,J)}},g),C.type===N.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&Xe(C.attributes.href)==="css")&&ur(e,()=>{if(v){const P=ne(e,{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:W,maskTextClass:l,maskTextSelector:i,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f,inlineImages:u,recordCanvas:y,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:g,onStylesheetLoad:v,stylesheetLoadTimeout:R,keepIframeSrcFn:D});P&&v(e,P)}},R),C}function gr(e,t){const{mirror:r=new Ge,blockClass:n="rr-block",blockSelector:o=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:i=!0,inlineImages:s=!1,recordCanvas:c=!1,maskAllInputs:d=!1,maskTextFn:p,maskInputFn:h,slimDOM:m=!1,dataURLOptions:f,preserveWhiteSpace:u,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:g,stylesheetLoadTimeout:v,keepIframeSrcFn:R=()=>!1}=t||{};return ne(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:i,maskInputOptions:d===!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}:d===!1?{password:!0}:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:f,inlineImages:s,recordCanvas:c,preserveWhiteSpace:u,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:g,stylesheetLoadTimeout:v,keepIframeSrcFn:R,newlyAddedElement:!1})}function A(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const oe=`Please stop import mirror directly. Instead of that,\r
2
- now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3
- or you can use record.mirror to access the mirror instance during recording.`;let tt={map:{},getId(){return console.error(oe),-1},getNode(){return console.error(oe),null},removeNodeFromMap(){console.error(oe)},has(){return console.error(oe),!1},reset(){console.error(oe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(tt=new Proxy(tt,{get(e,t,r){return t==="map"&&console.error(oe),Reflect.get(e,t,r)}}));function pe(e,t,r={}){let n=null,o=0;return function(...a){const l=Date.now();!o&&r.leading===!1&&(o=l);const i=t-(l-o),s=this;i<=0||i>t?(n&&(clearTimeout(n),n=null),o=l,e.apply(s,a)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{o=r.leading===!1?0:Date.now(),n=null,e.apply(s,a)},i))}}function Ie(e,t,r,n,o=window){const a=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(l){setTimeout(()=>{r.set.call(this,l)},0),a&&a.set&&a.set.call(this,l)}}),()=>Ie(e,t,a||{},!0)}function se(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}let Me=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Me=()=>new Date().getTime());function rt(e){var t,r,n,o,a,l;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:i?.documentElement.scrollLeft||((r=(t=i?.body)==null?void 0:t.parentElement)==null?void 0:r.scrollLeft)||((n=i?.body)==null?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:i?.documentElement.scrollTop||((a=(o=i?.body)==null?void 0:o.parentElement)==null?void 0:a.scrollTop)||((l=i?.body)==null?void 0:l.scrollTop)||0}}function nt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ot(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function st(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function F(e,t,r,n){if(!e)return!1;const o=st(e);if(!o)return!1;try{if(typeof t=="string"){if(o.classList.contains(t)||n&&o.closest("."+t)!==null)return!0}else if(ve(o,t,n))return!0}catch{}return!!(r&&(o.matches(r)||n&&o.closest(r)!==null))}function Sr(e,t){return t.getId(e)!==-1}function Fe(e,t){return t.getId(e)===ue}function at(e,t){if(ce(e))return!1;const r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?at(e.parentNode,t):!0:!0}function _e(e){return Boolean(e.changedTouches)}function br(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function it(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function lt(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Pe(e){return Boolean(e?.shadowRoot)}class vr{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ct(e){var t,r;let n=null;return((r=(t=e.getRootNode)==null?void 0:t.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(n=e.getRootNode().host),n}function Ir(e){let t=e,r;for(;r=ct(t);)t=r;return t}function Mr(e){const t=e.ownerDocument;if(!t)return!1;const r=Ir(e);return t.contains(r)}function dt(e){const t=e.ownerDocument;return t?t.contains(e)||Mr(e):!1}var w=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(w||{}),I=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(I||{}),_=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(_||{}),q=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(q||{}),ae=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ae||{}),ie=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(ie||{}),wr=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(wr||{});function ut(e){return"__ln"in e}class Cr{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&ut(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&ut(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;!this.head||(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const pt=(e,t)=>`${e}@${t}`;class kr{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,n=new Cr,o=s=>{let c=s,d=ue;for(;d===ue;)c=c&&c.nextSibling,d=c&&this.mirror.getId(c);return d},a=s=>{if(!s.parentNode||!dt(s)||s.parentNode.tagName==="TEXTAREA")return;const c=ce(s.parentNode)?this.mirror.getId(ct(s)):this.mirror.getId(s.parentNode),d=o(s);if(c===-1||d===-1)return n.addNode(s);const p=ne(s,{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:h=>{it(h,this.mirror)&&this.iframeManager.addIframe(h),lt(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),Pe(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(h,m)=>{this.iframeManager.attachIframe(h,m),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,m)=>{this.stylesheetManager.attachLinkElement(h,m)}});p&&(t.push({parentId:c,nextId:d,node:p}),r.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const s of this.movedSet)ht(this.removes,s,this.mirror)&&!this.movedSet.has(s.parentNode)||a(s);for(const s of this.addedSet)!ft(this.droppedSet,s)&&!ht(this.removes,s,this.mirror)||ft(this.movedSet,s)?a(s):this.droppedSet.add(s);let l=null;for(;n.length;){let s=null;if(l){const c=this.mirror.getId(l.value.parentNode),d=o(l.value);c!==-1&&d!==-1&&(s=l)}if(!s){let c=n.tail;for(;c;){const d=c;if(c=c.previous,d){const p=this.mirror.getId(d.value.parentNode);if(o(d.value)===-1)continue;if(p!==-1){s=d;break}else{const h=d.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=h.parentNode.host;if(this.mirror.getId(m)!==-1){s=d;break}}}}}}if(!s){for(;n.head;)n.removeNode(n.head.value);break}l=s.previous,n.removeNode(s.value),a(s.value)}const i={texts:this.texts.map(s=>{const c=s.node;return c.parentNode&&c.parentNode.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c.parentNode),{id:this.mirror.getId(c),value:s.value}}).filter(s=>!r.has(s.id)).filter(s=>this.mirror.has(s.id)),attributes:this.attributes.map(s=>{const{attributes:c}=s;if(typeof c.style=="string"){const d=JSON.stringify(s.styleDiff),p=JSON.stringify(s._unchangedStyles);d.length<c.style.length&&(d+p).split("var(").length===c.style.split("var(").length&&(c.style=s.styleDiff)}return{id:this.mirror.getId(s.node),attributes:c}}).filter(s=>!r.has(s.id)).filter(s=>this.mirror.has(s.id)),removes:this.removes,adds:t};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.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.movedMap={},this.mutationCb(i))},this.genTextAreaValueMutation=t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(t.childNodes,n=>n.textContent||"").join("")},this.processMutation=t=>{if(!Fe(t.target,this.mirror))switch(t.type){case"characterData":{const r=t.target.textContent;!F(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:et(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,st(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.attributeName,o=t.target.getAttribute(n);if(n==="value"){const l=Ae(r);o=De({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:l,value:o,maskInputFn:this.maskInputFn})}if(F(t.target,this.blockClass,this.blockSelector,!1)||o===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(o))if(!r.contentDocument)n="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Ze(r.tagName,n)&&(a.attributes[n]=Qe(this.doc,K(r.tagName),K(n),o),n==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(const i of Array.from(r.style)){const s=r.style.getPropertyValue(i),c=r.style.getPropertyPriority(i);s!==l.style.getPropertyValue(i)||c!==l.style.getPropertyPriority(i)?c===""?a.styleDiff[i]=s:a.styleDiff[i]=[s,c]:a._unchangedStyles[i]=[s,c]}for(const i of Array.from(l.style))r.style.getPropertyValue(i)===""&&(a.styleDiff[i]=!1)}break}case"childList":{if(F(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),o=ce(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);F(t.target,this.blockClass,this.blockSelector,!1)||Fe(r,this.mirror)||!Sr(r,this.mirror)||(this.addedSet.has(r)?($e(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||at(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[pt(n,o)]?$e(this.movedSet,r):this.removes.push({parentId:o,id:n,isShadow:ce(t.target)&&de(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Fe(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[pt(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);F(t,this.blockClass,this.blockSelector,!1)||(t.childNodes.forEach(n=>this.genAdds(n)),Pe(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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 $e(e,t){e.delete(t),t.childNodes.forEach(r=>$e(e,r))}function ht(e,t,r){return e.length===0?!1:mt(e,t,r)}function mt(e,t,r){const{parentNode:n}=t;if(!n)return!1;const o=r.getId(n);return e.some(a=>a.id===o)?!0:mt(e,n,r)}function ft(e,t){return e.size===0?!1:yt(e,t)}function yt(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:yt(e,r):!1}let he;function Or(e){he=e}function Tr(){he=void 0}const M=e=>he?(...t)=>{try{return e(...t)}catch(r){if(he&&he(r)===!0)return;throw r}}:e;var Er=Object.defineProperty,Rr=Object.defineProperties,xr=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,Nr=Object.prototype.propertyIsEnumerable,St=(e,t,r)=>t in e?Er(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bt=(e,t)=>{for(var r in t||(t={}))Lr.call(t,r)&&St(e,r,t[r]);if(gt)for(var r of gt(t))Nr.call(t,r)&&St(e,r,t[r]);return e},Dr=(e,t)=>Rr(e,xr(t));const Q=[];function me(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function vt(e,t){var r,n;const o=new kr;Q.push(o),o.init(e);let a=window.MutationObserver||window.__rrMutationObserver;const l=(n=(r=window?.Zone)==null?void 0:r.__symbol__)==null?void 0:n.call(r,"MutationObserver");l&&window[l]&&(a=window[l]);const i=new a(M(o.processMutations.bind(o)));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Ar({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let l=[],i;const s=pe(M(p=>{const h=Date.now()-i;e(l.map(m=>(m.timeOffset-=h,m)),p),l=[],i=null}),a),c=M(pe(M(p=>{const h=me(p),{clientX:m,clientY:f}=_e(p)?p.changedTouches[0]:p;i||(i=Me()),l.push({x:m,y:f,id:n.getId(h),timeOffset:Me()-i}),s(typeof DragEvent<"u"&&p instanceof DragEvent?I.Drag:p instanceof MouseEvent?I.MouseMove:I.TouchMove)}),o,{trailing:!1})),d=[A("mousemove",c,r),A("touchmove",c,r),A("drag",c,r)];return M(()=>{d.forEach(p=>p())})}function Fr({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const l=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,i=[];let s=null;const c=d=>p=>{const h=me(p);if(F(h,n,o,!0))return;let m=null,f=d;if("pointerType"in p){switch(p.pointerType){case"mouse":m=q.Mouse;break;case"touch":m=q.Touch;break;case"pen":m=q.Pen;break}m===q.Touch?_[d]===_.MouseDown?f="TouchStart":_[d]===_.MouseUp&&(f="TouchEnd"):q.Pen}else _e(p)&&(m=q.Touch);m!==null?(s=m,(f.startsWith("Touch")&&m===q.Touch||f.startsWith("Mouse")&&m===q.Mouse)&&(m=null)):_[d]===_.Click&&(m=s,s=null);const u=_e(p)?p.changedTouches[0]:p;if(!u)return;const y=r.getId(h),{clientX:S,clientY:b}=u;M(e)(bt({type:_[f],id:y,x:S,y:b},m!==null&&{pointerType:m}))};return Object.keys(_).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&l[d]!==!1).forEach(d=>{let p=K(d);const h=c(d);if(window.PointerEvent)switch(_[d]){case _.MouseDown:case _.MouseUp:p=p.replace("mouse","pointer");break;case _.TouchStart:case _.TouchEnd:return}i.push(A(p,h,t))}),M(()=>{i.forEach(d=>d())})}function It({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:a}){const l=M(pe(M(i=>{const s=me(i);if(!s||F(s,n,o,!0))return;const c=r.getId(s);if(s===t&&t.defaultView){const d=rt(t.defaultView);e({id:c,x:d.left,y:d.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),a.scroll||100));return A("scroll",l,t)}function _r({viewportResizeCb:e},{win:t}){let r=-1,n=-1;const o=M(pe(M(()=>{const a=nt(),l=ot();(r!==a||n!==l)&&(e({width:Number(l),height:Number(a)}),r=a,n=l)}),200));return A("resize",o,t)}const Pr=["INPUT","TEXTAREA","SELECT"],Mt=new WeakMap;function $r({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,ignoreClass:a,ignoreSelector:l,maskInputOptions:i,maskInputFn:s,sampling:c,userTriggeredOnInput:d}){function p(S){let b=me(S);const g=S.isTrusted,v=b&&b.tagName;if(b&&v==="OPTION"&&(b=b.parentElement),!b||!v||Pr.indexOf(v)<0||F(b,n,o,!0)||b.classList.contains(a)||l&&b.matches(l))return;let R=b.value,D=!1;const V=Ae(b)||"";V==="radio"||V==="checkbox"?D=b.checked:(i[v.toLowerCase()]||i[V])&&(R=De({element:b,maskInputOptions:i,tagName:v,type:V,value:R,maskInputFn:s})),h(b,d?{text:R,isChecked:D,userTriggered:g}:{text:R,isChecked:D});const W=b.name;V==="radio"&&W&&D&&t.querySelectorAll(`input[type="radio"][name="${W}"]`).forEach(j=>{if(j!==b){const z=j.value;h(j,d?{text:z,isChecked:!D,userTriggered:!1}:{text:z,isChecked:!D})}})}function h(S,b){const g=Mt.get(S);if(!g||g.text!==b.text||g.isChecked!==b.isChecked){Mt.set(S,b);const v=r.getId(S);M(e)(Dr(bt({},b),{id:v}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(S=>A(S,M(p),t)),f=t.defaultView;if(!f)return()=>{m.forEach(S=>S())};const u=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),y=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return u&&u.set&&m.push(...y.map(S=>Ie(S[0],S[1],{set(){M(p)({target:this,isTrusted:!1})}},!1,f))),M(()=>{m.forEach(S=>S())})}function we(e){const t=[];function r(n,o){if(Ce("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Ce("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Ce("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Ce("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const a=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(a)}else if(n.parentStyleSheet){const a=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(a)}return o}return r(e,t)}function Y(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function Wr({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:M((d,p,h)=>{const[m,f]=h,{id:u,styleId:y}=Y(p,t,r.styleMirror);return(u&&u!==-1||y&&y!==-1)&&e({id:u,styleId:y,adds:[{rule:m,index:f}]}),d.apply(p,h)})});const a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:M((d,p,h)=>{const[m]=h,{id:f,styleId:u}=Y(p,t,r.styleMirror);return(f&&f!==-1||u&&u!==-1)&&e({id:f,styleId:u,removes:[{index:m}]}),d.apply(p,h)})});let l;n.CSSStyleSheet.prototype.replace&&(l=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:M((d,p,h)=>{const[m]=h,{id:f,styleId:u}=Y(p,t,r.styleMirror);return(f&&f!==-1||u&&u!==-1)&&e({id:f,styleId:u,replace:m}),d.apply(p,h)})}));let i;n.CSSStyleSheet.prototype.replaceSync&&(i=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(i,{apply:M((d,p,h)=>{const[m]=h,{id:f,styleId:u}=Y(p,t,r.styleMirror);return(f&&f!==-1||u&&u!==-1)&&e({id:f,styleId:u,replaceSync:m}),d.apply(p,h)})}));const s={};ke("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(ke("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),ke("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),ke("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(s).forEach(([d,p])=>{c[d]={insertRule:p.prototype.insertRule,deleteRule:p.prototype.deleteRule},p.prototype.insertRule=new Proxy(c[d].insertRule,{apply:M((h,m,f)=>{const[u,y]=f,{id:S,styleId:b}=Y(m.parentStyleSheet,t,r.styleMirror);return(S&&S!==-1||b&&b!==-1)&&e({id:S,styleId:b,adds:[{rule:u,index:[...we(m),y||0]}]}),h.apply(m,f)})}),p.prototype.deleteRule=new Proxy(c[d].deleteRule,{apply:M((h,m,f)=>{const[u]=f,{id:y,styleId:S}=Y(m.parentStyleSheet,t,r.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,removes:[{index:[...we(m),u]}]}),h.apply(m,f)})})}),M(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=a,l&&(n.CSSStyleSheet.prototype.replace=l),i&&(n.CSSStyleSheet.prototype.replaceSync=i),Object.entries(s).forEach(([d,p])=>{p.prototype.insertRule=c[d].insertRule,p.prototype.deleteRule=c[d].deleteRule})})}function wt({mirror:e,stylesheetManager:t},r){var n,o,a;let l=null;r.nodeName==="#document"?l=e.getId(r):l=e.getId(r.host);const i=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(a=(o=r.ownerDocument)==null?void 0:o.defaultView)==null?void 0:a.ShadowRoot,s=i!=null&&i.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!i||!s?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var c;return(c=s.get)==null?void 0:c.call(this)},set(c){var d;const p=(d=s.set)==null?void 0:d.call(this,c);if(l!==null&&l!==-1)try{t.adoptStyleSheets(c,l)}catch{}return p}}),M(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function Ur({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){const a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:M((i,s,c)=>{var d;const[p,h,m]=c;if(r.has(p))return a.apply(s,[p,h,m]);const{id:f,styleId:u}=Y((d=s.parentRule)==null?void 0:d.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||u&&u!==-1)&&e({id:f,styleId:u,set:{property:p,value:h,priority:m},index:we(s.parentRule)}),i.apply(s,c)})});const l=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:M((i,s,c)=>{var d;const[p]=c;if(r.has(p))return l.apply(s,[p]);const{id:h,styleId:m}=Y((d=s.parentRule)==null?void 0:d.parentStyleSheet,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,remove:{property:p},index:we(s.parentRule)}),i.apply(s,c)})}),M(()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=l})}function jr({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:o,doc:a}){const l=M(s=>pe(M(c=>{const d=me(c);if(!d||F(d,t,r,!0))return;const{currentTime:p,volume:h,muted:m,playbackRate:f,loop:u}=d;e({type:s,id:n.getId(d),currentTime:p,volume:h,muted:m,playbackRate:f,loop:u})}),o.media||500)),i=[A("play",l(ie.Play),a),A("pause",l(ie.Pause),a),A("seeked",l(ie.Seeked),a),A("volumechange",l(ie.VolumeChange),a),A("ratechange",l(ie.RateChange),a)];return M(()=>{i.forEach(s=>s())})}function zr({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(i,s,c){const d=new a(i,s,c);return o.set(d,{family:i,buffer:typeof s!="string",descriptors:c,fontSource:typeof s=="string"?s:JSON.stringify(Array.from(new Uint8Array(s)))}),d};const l=se(t.fonts,"add",function(i){return function(s){return setTimeout(M(()=>{const c=o.get(s);c&&(e(c),o.delete(s))}),0),i.apply(this,[s])}});return n.push(()=>{r.FontFace=a}),n.push(l),M(()=>{n.forEach(i=>i())})}function Br(e){const{doc:t,mirror:r,blockClass:n,blockSelector:o,selectionCb:a}=e;let l=!0;const i=M(()=>{const s=t.getSelection();if(!s||l&&s?.isCollapsed)return;l=s.isCollapsed||!1;const c=[],d=s.rangeCount||0;for(let p=0;p<d;p++){const h=s.getRangeAt(p),{startContainer:m,startOffset:f,endContainer:u,endOffset:y}=h;F(m,n,o,!0)||F(u,n,o,!0)||c.push({start:r.getId(m),startOffset:f,end:r.getId(u),endOffset:y})}a({ranges:c})});return i(),A("selectionchange",i)}function Vr({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:se(r.customElements,"define",function(n){return function(o,a,l){try{t({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return n.apply(this,[o,a,l])}})}function Hr(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:a,viewportResizeCb:l,inputCb:i,mediaInteractionCb:s,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:p,fontCb:h,selectionCb:m,customElementCb:f}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),r(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),n(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),o(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),a(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),l(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),i(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),s(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),c(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),d(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),p(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),h(...u)},e.selectionCb=(...u)=>{t.selection&&t.selection(...u),m(...u)},e.customElementCb=(...u)=>{t.customElement&&t.customElement(...u),f(...u)}}function Gr(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Hr(e,t);let n;e.recordDOM&&(n=vt(e,e.doc));const o=Ar(e),a=Fr(e),l=It(e),i=_r(e,{win:r}),s=$r(e),c=jr(e);let d=()=>{},p=()=>{},h=()=>{},m=()=>{};e.recordDOM&&(d=Wr(e,{win:r}),p=wt(e,e.doc),h=Ur(e,{win:r}),e.collectFonts&&(m=zr(e)));const f=Br(e),u=Vr(e),y=[];for(const S of e.plugins)y.push(S.observer(S.callback,r,S.options));return M(()=>{Q.forEach(S=>S.reset()),n?.disconnect(),o(),a(),l(),i(),s(),c(),d(),p(),h(),m(),f(),u(),y.forEach(S=>S())})}function Ce(e){return typeof window[e]<"u"}function ke(e){return Boolean(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ct{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,o){const a=n||this.getIdToRemoteIdMap(t),l=o||this.getRemoteIdToIdMap(t);let i=a.get(r);return i||(i=this.generateIdFn(),a.set(r,i),l.set(i,r)),i}getIds(t,r){const n=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,n,o))}getRemoteId(t,r,n){const o=n||this.getRemoteIdToIdMap(t);return typeof r!="number"?r:o.get(r)||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(o=>this.getRemoteId(t,o,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class qr{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ct(Ye),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ct(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(n=this.loadListener)==null||n.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const o=this.transformCrossOriginEvent(n,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case w.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const o=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,o),this.patchRootIdOnNode(r.data.node,o),{timestamp:r.timestamp,type:w.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case w.Meta:case w.Load:case w.DomContentLoaded:return!1;case w.Plugin:return r;case w.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case w.IncrementalSnapshot:switch(r.data.source){case I.Mutation:return r.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(o.node,a)}),r.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),r.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),r.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),r;case I.Drag:case I.TouchMove:case I.MouseMove:return r.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),r;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(r.data,t,["id"]),r;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case I.Font:return r;case I.Selection:return r.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),r;case I.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),r}}return!1}replace(t,r,n,o){for(const a of o)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(n,r[a]):r[a]=t.getId(n,r[a]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==N.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}var Xr=Object.defineProperty,Yr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Qr=Object.prototype.propertyIsEnumerable,Ot=(e,t,r)=>t in e?Xr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tt=(e,t)=>{for(var r in t||(t={}))Kr.call(t,r)&&Ot(e,r,t[r]);if(kt)for(var r of kt(t))Qr.call(t,r)&&Ot(e,r,t[r]);return e},Et=(e,t)=>Yr(e,Jr(t));class Zr{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!de(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=vt(Et(Tt({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(It(Et(Tt({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(wt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const n=this;this.restoreHandlers.push(se(t.prototype,"attachShadow",function(o){return function(a){const l=o.call(this,a);return this.shadowRoot&&dt(this)&&n.addShadowRoot(this.shadowRoot,r),l}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",en=typeof Uint8Array>"u"?[]:new Uint8Array(256),Oe=0;Oe<le.length;Oe++)en[le.charCodeAt(Oe)]=Oe;var tn=function(e){var t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=le[t[r]>>2],o+=le[(t[r]&3)<<4|t[r+1]>>4],o+=le[(t[r+1]&15)<<2|t[r+2]>>6],o+=le[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const Rt=new Map;function rn(e,t){let r=Rt.get(e);return r||(r=new Map,Rt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const xt=(e,t,r)=>{if(!e||!(Nt(e,t)||typeof e=="object"))return;const n=e.constructor.name,o=rn(r,n);let a=o.indexOf(e);return a===-1&&(a=o.length,o.push(e)),a};function Te(e,t,r){if(e instanceof Array)return e.map(n=>Te(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const n=e.constructor.name,o=tn(e);return{rr_type:n,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Te(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:o}=e;return{rr_type:n,src:o}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",o=e.toDataURL();return{rr_type:n,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Te(e.data,t,r),e.width,e.height]};if(Nt(e,t)||typeof e=="object"){const n=e.constructor.name,o=xt(e,t,r);return{rr_type:n,index:o}}}}return e}const Lt=(e,t,r)=>e.map(n=>Te(n,t,r)),Nt=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof t[n]=="function");return Boolean(r.find(n=>e instanceof t[n]))};function nn(e,t,r,n){const o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const l of a)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;const i=se(t.CanvasRenderingContext2D.prototype,l,function(s){return function(...c){return F(this.canvas,r,n,!0)||setTimeout(()=>{const d=Lt(c,t,this);e(this.canvas,{type:ae["2D"],property:l,args:d})},0),s.apply(this,c)}});o.push(i)}catch{const s=Ie(t.CanvasRenderingContext2D.prototype,l,{set(c){e(this.canvas,{type:ae["2D"],property:l,args:[c],setter:!0})}});o.push(s)}return()=>{o.forEach(l=>l())}}function on(e){return e==="experimental-webgl"?"webgl":e}function Dt(e,t,r,n){const o=[];try{const a=se(e.HTMLCanvasElement.prototype,"getContext",function(l){return function(i,...s){if(!F(this,t,r,!0)){const c=on(i);if("__context"in this||(this.__context=c),n&&["webgl","webgl2"].includes(c))if(s[0]&&typeof s[0]=="object"){const d=s[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[i,...s])}});o.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(a=>a())}}function At(e,t,r,n,o,a,l){const i=[],s=Object.getOwnPropertyNames(e);for(const c of s)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof e[c]!="function")continue;const d=se(e,c,function(p){return function(...h){const m=p.apply(this,h);if(xt(m,l,this),"tagName"in this.canvas&&!F(this.canvas,n,o,!0)){const f=Lt(h,l,this),u={type:t,property:c,args:f};r(this.canvas,u)}return m}});i.push(d)}catch{const p=Ie(e,c,{set(h){r(this.canvas,{type:t,property:c,args:[h],setter:!0})}});i.push(p)}return i}function sn(e,t,r,n,o){const a=[];return a.push(...At(t.WebGLRenderingContext.prototype,ae.WebGL,e,r,n,o,t)),typeof t.WebGL2RenderingContext<"u"&&a.push(...At(t.WebGL2RenderingContext.prototype,ae.WebGL2,e,r,n,o,t)),()=>{a.forEach(l=>l())}}function an(e,t){var r=t===void 0?null:t,n=e.toString(),o=n.split(`
4
- `);o.pop(),o.shift();for(var a=o[0].search(/\S/),l=/(['"])__worker_loader_strict__(['"])/g,i=0,s=o.length;i<s;++i)o[i]=o[i].substring(a).replace(l,"$1use strict$2")+`
5
- `;return r&&o.push("//# sourceMappingURL="+r+`
6
- `),o}function ln(e,t){var r=an(e,t),n=new Blob(r,{type:"application/javascript"});return URL.createObjectURL(n)}function cn(e,t){var r;return function(o){return r=r||ln(e,t),new Worker(r,o)}}var dn=cn(function(){(function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256),r=0;r<e.length;r++)t[e.charCodeAt(r)]=r;var n=function(s){var c=new Uint8Array(s),d,p=c.length,h="";for(d=0;d<p;d+=3)h+=e[c[d]>>2],h+=e[(c[d]&3)<<4|c[d+1]>>4],h+=e[(c[d+1]&15)<<2|c[d+2]>>6],h+=e[c[d+2]&63];return p%3===2?h=h.substring(0,h.length-1)+"=":p%3===1&&(h=h.substring(0,h.length-2)+"=="),h};const o=new Map,a=new Map;async function l(s,c,d){const p=`${s}-${c}`;if("OffscreenCanvas"in globalThis){if(a.has(p))return a.get(p);const h=new OffscreenCanvas(s,c);h.getContext("2d");const m=await(await h.convertToBlob(d)).arrayBuffer(),f=n(m);return a.set(p,f),f}else return""}const i=self;i.onmessage=async function(s){if("OffscreenCanvas"in globalThis){const{id:c,bitmap:d,width:p,height:h,dataURLOptions:m}=s.data,f=l(p,h,m),u=new OffscreenCanvas(p,h);u.getContext("2d").drawImage(d,0,0),d.close();const y=await u.convertToBlob(m),S=y.type,b=await y.arrayBuffer(),g=n(b);if(!o.has(c)&&await f===g)return o.set(c,g),i.postMessage({id:c});if(o.get(c)===g)return i.postMessage({id:c});i.postMessage({id:c,type:S,base64:g,width:p,height:h}),o.set(c,g)}else return i.postMessage({id:s.data.id})}})()},null),Ft=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,hn=(e,t)=>{var r={};for(var n in e)un.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ft)for(var n of Ft(e))t.indexOf(n)<0&&pn.call(e,n)&&(r[n]=e[n]);return r},mn=(e,t,r)=>new Promise((n,o)=>{var a=s=>{try{i(r.next(s))}catch(c){o(c)}},l=s=>{try{i(r.throw(s))}catch(c){o(c)}},i=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,l);i((r=r.apply(e,t)).next())});class fn{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(s,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(s)||this.pendingCanvasMutations.set(s,[]),this.pendingCanvasMutations.get(s).push(c)};const{sampling:r="all",win:n,blockClass:o,blockSelector:a,recordCanvas:l,dataURLOptions:i}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,l&&r==="all"&&this.initCanvasMutationObserver(n,o,a),l&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,o,a,{dataURLOptions:i})}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(t,r,n,o,a){const l=Dt(r,n,o,!0),i=new Map,s=new dn;s.onmessage=f=>{const{id:u}=f.data;if(i.set(u,!1),!("base64"in f.data))return;const{base64:y,type:S,width:b,height:g}=f.data;this.mutationCb({id:u,type:ae["2D"],commands:[{property:"clearRect",args:[0,0,b,g]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:S}]},0,0]}]})};const c=1e3/t;let d=0,p;const h=()=>{const f=[];return r.document.querySelectorAll("canvas").forEach(u=>{F(u,n,o,!0)||f.push(u)}),f},m=f=>{if(d&&f-d<c){p=requestAnimationFrame(m);return}d=f,h().forEach(u=>mn(this,null,function*(){var y;const S=this.mirror.getId(u);if(i.get(S)||u.width===0||u.height===0)return;if(i.set(S,!0),["webgl","webgl2"].includes(u.__context)){const g=u.getContext(u.__context);((y=g?.getContextAttributes())==null?void 0:y.preserveDrawingBuffer)===!1&&g.clear(g.COLOR_BUFFER_BIT)}const b=yield createImageBitmap(u);s.postMessage({id:S,bitmap:b,width:u.width,height:u.height,dataURLOptions:a.dataURLOptions},[b])})),p=requestAnimationFrame(m)};p=requestAnimationFrame(m),this.resetObservers=()=>{l(),cancelAnimationFrame(p)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=Dt(t,r,n,!1),a=nn(this.processMutation.bind(this),t,r,n),l=sn(this.processMutation.bind(this),t,r,n,this.mirror);this.resetObservers=()=>{o(),a(),l()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const o=n.map(l=>hn(l,["type"])),{type:a}=n[0];this.mutationCb({id:r,type:a,commands:o}),this.pendingCanvasMutations.delete(t)}}class yn{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new vr,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},o=[];for(const a of t){let l;this.styleMirror.has(a)?l=this.styleMirror.getId(a):(l=this.styleMirror.add(a),o.push({styleId:l,rules:Array.from(a.rules||CSSRule,(i,s)=>({rule:He(i),index:s}))})),n.styleIds.push(l)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class gn{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,r){const n=this.nodeMap.get(t);return n&&Array.from(n).some(o=>o!==r)}add(t,r){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}var Sn=Object.defineProperty,_t=Object.getOwnPropertySymbols,bn=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,Pt=(e,t,r)=>t in e?Sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$=(e,t)=>{for(var r in t||(t={}))bn.call(t,r)&&Pt(e,r,t[r]);if(_t)for(var r of _t(t))vn.call(t,r)&&Pt(e,r,t[r]);return e},$t;let E,Ee,We,Re=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(($t=e.contentWindow)==null?void 0:$t.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const U=Yt();function fe(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:a=null,ignoreClass:l="rr-ignore",ignoreSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:c=null,inlineStylesheet:d=!0,maskAllInputs:p,maskInputOptions:h,slimDOMOptions:m,maskInputFn:f,maskTextFn:u,hooks:y,packFn:S,sampling:b={},dataURLOptions:g={},mousemoveWait:v,recordDOM:R=!0,recordCanvas:D=!1,recordCrossOriginIframes:V=!1,recordAfter:W=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:z=!1,inlineImages:X=!1,plugins:C,keepIframeSrcFn:Z=()=>!1,ignoreCSSAttributes:P=new Set([]),errorHandler:J}=e;Or(J);const H=V?window.parent===window:!0;let xe=!1;if(!H)try{window.parent.document&&(xe=!1)}catch{xe=!0}if(H&&!t)throw new Error("emit function is required");v!==void 0&&b.mousemove===void 0&&(b.mousemove=v),U.reset();const Ue=p===!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}:h!==void 0?h:{password:!0},je=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};br();let Wt,ze=0;const Ut=k=>{for(const B of C||[])B.eventProcessor&&(k=B.eventProcessor(k));return S&&!xe&&(k=S(k)),k};E=(k,B)=>{var x;const L=k;if(L.timestamp=Me(),((x=Q[0])==null?void 0:x.isFrozen())&&L.type!==w.FullSnapshot&&!(L.type===w.IncrementalSnapshot&&L.data.source===I.Mutation)&&Q.forEach(G=>G.unfreeze()),H)t?.(Ut(L),B);else if(xe){const G={type:"rrweb",event:Ut(L),origin:window.location.origin,isCheckout:B};window.parent.postMessage(G,"*")}if(L.type===w.FullSnapshot)Wt=L,ze=0;else if(L.type===w.IncrementalSnapshot){if(L.data.source===I.Mutation&&L.data.isAttachIframe)return;ze++;const G=n&&ze>=n,O=r&&L.timestamp-Wt.timestamp>r;(G||O)&&Ee(!0)}};const Le=k=>{E({type:w.IncrementalSnapshot,data:$({source:I.Mutation},k)})},jt=k=>E({type:w.IncrementalSnapshot,data:$({source:I.Scroll},k)}),zt=k=>E({type:w.IncrementalSnapshot,data:$({source:I.CanvasMutation},k)}),In=k=>E({type:w.IncrementalSnapshot,data:$({source:I.AdoptedStyleSheet},k)}),ee=new yn({mutationCb:Le,adoptedStyleSheetCb:In}),te=new qr({mirror:U,mutationCb:Le,stylesheetManager:ee,recordCrossOriginIframes:V,wrappedEmit:E});for(const k of C||[])k.getMirror&&k.getMirror({nodeMirror:U,crossOriginIframeMirror:te.crossOriginIframeMirror,crossOriginIframeStyleMirror:te.crossOriginIframeStyleMirror});const Be=new gn;We=new fn({recordCanvas:D,mutationCb:zt,win:window,blockClass:o,blockSelector:a,mirror:U,sampling:b.canvas,dataURLOptions:g});const Ne=new Zr({mutationCb:Le,scrollCb:jt,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:s,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:Ue,dataURLOptions:g,maskTextFn:u,maskInputFn:f,recordCanvas:D,inlineImages:X,sampling:b,slimDOMOptions:je,iframeManager:te,stylesheetManager:ee,canvasManager:We,keepIframeSrcFn:Z,processedNodeManager:Be},mirror:U});Ee=(k=!1)=>{if(!R)return;E({type:w.Meta,data:{href:window.location.href,width:ot(),height:nt()}},k),ee.reset(),Ne.init(),Q.forEach(x=>x.lock());const B=gr(document,{mirror:U,blockClass:o,blockSelector:a,maskTextClass:s,maskTextSelector:c,inlineStylesheet:d,maskAllInputs:Ue,maskTextFn:u,slimDOM:je,dataURLOptions:g,recordCanvas:D,inlineImages:X,onSerialize:x=>{it(x,U)&&te.addIframe(x),lt(x,U)&&ee.trackLinkElement(x),Pe(x)&&Ne.addShadowRoot(x.shadowRoot,document)},onIframeLoad:(x,L)=>{te.attachIframe(x,L),Ne.observeAttachShadow(x)},onStylesheetLoad:(x,L)=>{ee.attachLinkElement(x,L)},keepIframeSrcFn:Z});if(!B)return console.warn("Failed to snapshot the document");E({type:w.FullSnapshot,data:{node:B,initialOffset:rt(window)}},k),Q.forEach(x=>x.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ee.adoptStyleSheets(document.adoptedStyleSheets,U.getId(document))};try{const k=[],B=L=>{var G;return M(Gr)({mutationCb:Le,mousemoveCb:(O,Ve)=>E({type:w.IncrementalSnapshot,data:{source:Ve,positions:O}}),mouseInteractionCb:O=>E({type:w.IncrementalSnapshot,data:$({source:I.MouseInteraction},O)}),scrollCb:jt,viewportResizeCb:O=>E({type:w.IncrementalSnapshot,data:$({source:I.ViewportResize},O)}),inputCb:O=>E({type:w.IncrementalSnapshot,data:$({source:I.Input},O)}),mediaInteractionCb:O=>E({type:w.IncrementalSnapshot,data:$({source:I.MediaInteraction},O)}),styleSheetRuleCb:O=>E({type:w.IncrementalSnapshot,data:$({source:I.StyleSheetRule},O)}),styleDeclarationCb:O=>E({type:w.IncrementalSnapshot,data:$({source:I.StyleDeclaration},O)}),canvasMutationCb:zt,fontCb:O=>E({type:w.IncrementalSnapshot,data:$({source:I.Font},O)}),selectionCb:O=>{E({type:w.IncrementalSnapshot,data:$({source:I.Selection},O)})},customElementCb:O=>{E({type:w.IncrementalSnapshot,data:$({source:I.CustomElement},O)})},blockClass:o,ignoreClass:l,ignoreSelector:i,maskTextClass:s,maskTextSelector:c,maskInputOptions:Ue,inlineStylesheet:d,sampling:b,recordDOM:R,recordCanvas:D,inlineImages:X,userTriggeredOnInput:j,collectFonts:z,doc:L,maskInputFn:f,maskTextFn:u,keepIframeSrcFn:Z,blockSelector:a,slimDOMOptions:je,dataURLOptions:g,mirror:U,iframeManager:te,stylesheetManager:ee,shadowDomManager:Ne,processedNodeManager:Be,canvasManager:We,ignoreCSSAttributes:P,plugins:((G=C?.filter(O=>O.observer))==null?void 0:G.map(O=>({observer:O.observer,options:O.options,callback:Ve=>E({type:w.Plugin,data:{plugin:O.name,payload:Ve}})})))||[]},y)};te.addLoadListener(L=>{try{k.push(B(L.contentDocument))}catch(G){console.warn(G)}});const x=()=>{Ee(),k.push(B(document)),Re=!0};return document.readyState==="interactive"||document.readyState==="complete"?x():(k.push(A("DOMContentLoaded",()=>{E({type:w.DomContentLoaded,data:{}}),W==="DOMContentLoaded"&&x()})),k.push(A("load",()=>{E({type:w.Load,data:{}}),W==="load"&&x()},window))),()=>{k.forEach(L=>L()),Be.destroy(),Re=!1,Tr()}}catch(k){console.warn(k)}}return fe.addCustomEvent=(e,t)=>{if(!Re)throw new Error("please add custom event after start recording");E({type:w.Custom,data:{tag:e,payload:t}})},fe.freezePage=()=>{Q.forEach(e=>e.freeze())},fe.takeFullSnapshot=e=>{if(!Re)throw new Error("please take full snapshot after start recording");Ee(e)},fe.mirror=U,fe}();
7
-
8
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("rrwebRecord")):"function"==typeof define&&define.amd?define(["rrwebRecord"],e):"object"==typeof exports?exports.Statsig=e(require("rrwebRecord")):t.Statsig=e(t.rrwebRecord)}(this,a=>(()=>{"use strict";var $Q=(e)=>Object.defineProperty(e,"__esModule",{value:!0});var $Q2=(a,b,c)=>Object.defineProperty(a,b,c);var $P=(a,b)=>Object.assign(a,b);var $A=()=>((t,r,u,l)=>{return new(u=u||Promise)(function(n,e){function i(t){try{s(l.next(t))}catch(t){e(t)}}function o(t){try{s(l.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(i,o)}s((l=l.apply(t,r||[])).next())})});var i={3331:t=>{t.exports=a},1845:(t,i,e)=>{var n;$Q2(i,"__esModule",{value:!0}),i.t=i.i=i.l=void 0;const s=e(7512);i.l=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:u}catch(t){return u}},i.i=t=>(0,i.l)()[t];i.t=t=>{var e=(0,i.l)();return t?e.instances&&e.instances[t]:(e.instances&&1<Object.keys(e.instances).length&&s.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),e.firstInstance)};var r="__STATSIG__",l="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},o="undefined"!=typeof globalThis?globalThis:{};const u=null!=(n=null!=(n=null!=(n=l[r])?n:e[r])?n:o[r])?n:{instance:i.t};l[r]=u,e[r]=u,o[r]=u},2137:(t,e,i)=>{$Q(e),e.o=e.u=void 0;const s=i(1406);function n(t,e,i){if(i)return i(t,e);const n=e&&e.customIDs?e.customIDs:{};e=["uid:"+(null!=(i=null==e?void 0:e.userID)?i:""),"cids:"+Object.keys(n).sort((t,e)=>t.localeCompare(e)).map(t=>t+"-"+n[t]).join(","),"k:"+t];return(0,s.h)(e.join("|"))}e.u=n,e.o=function(t,e,i){return e?n(t,e,i):(0,s.h)("k:"+t)}},6427:(t,e)=>{$Q(e)},694:function(t,e,i){var s=this&&this.__awaiter||$A();$Q(e),e.Wn=e.DataAdapterCore=void 0;const u=i(7512),a=i(9122),r=i(8578),l=i(4534),c=i(3401);function h(t,e,i,n){return{source:t,data:e,receivedAt:Date.now(),stableID:i,fullUserHash:(0,r.v)(n)}}e.DataAdapterCore=class{constructor(t,e){this._=t,this.p=e,this.m=null,this.O=null,this.j="statsig.last_modified_time."+e,this.S=new n}attach(t,e,i){this.O=t,this.m=e}getDataSync(t){var t=t&&(0,r.T)(t,this.m),e=this.k(t),i=this.S.get(e,t);return i&&this.Li(i)?i:(i=this.I(e))&&this.Li(i)?(this.S.add(e,i),this.S.get(e,t)):null}setData(t,e){var e=e&&(0,r.T)(e,this.m),i=this.k(e);this.S.add(i,h("Bootstrap",t,null,e))}Li(t){return null==t.stableID||t.stableID===a.StableID.get(this.C())}D(e,i,n){return s(this,void 0,void 0,function*(){l.Storage.isReady()||(yield l.Storage.isReadyResolver());var t=null!=e?e:this.getDataSync(i),t=[this.M(t,i,n)];return null!=n&&n.timeoutMs&&t.push(new Promise(t=>setTimeout(t,n.timeoutMs)).then(()=>(u.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}A(i,n){return s(this,void 0,void 0,function*(){var t=i&&(0,r.T)(i,this.m),e=this.k(t),t=yield this.D(null,t,n);t&&this.S.add(e,$P($P({},t),{source:"Prefetch"}))})}M(r,l,o){return s(this,void 0,void 0,function*(){var t=null!=(t=null==r?void 0:r.data)?t:null,e=null!=r&&this.N(r,l),e=yield this.R(t,l,o,e);if(!e)return u.Log.debug("No response returned for latest value"),null;var i=(0,c.P)(e,"has_updates","Response"),n=this.C(),n=a.StableID.get(n);let s=null;if(!0===(null==i?void 0:i.has_updates))s=h("Network",e,n,l);else{if(!t||!1!==(null==i?void 0:i.has_updates))return null;s=h("NetworkNotModified",t,n,l)}e=this.k(l);return this.S.add(e,s),this.U(e,s),s})}C(){return null!=this.O?this.O:(u.Log.error(this._+" is not attached to a Client"),"")}I(t){var e=null==(e=l.Storage.getItem)?void 0:e.call(l.Storage,t);return null!=e&&(t=(0,c.P)(e,"source","Cached Result"))?$P($P({},t),{source:"Cache"}):null}U(t,e){l.Storage.setItem(t,JSON.stringify(e)),this.F(t)}F(t){var e=null!=(e=(0,l.G)(this.j))?e:{},t=(e[t]=Date.now(),o(e,10));t&&(delete e[t],l.Storage.removeItem(t)),(0,l.L)(this.j,e)}},e.Wn=h;class n{constructor(){this.K={}}get(t,e){var t=this.K[t],i=null==t?void 0:t.stableID,e=null==(e=null==e?void 0:e.customIDs)?void 0:e.stableID;return e&&i&&e!==i?(u.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e){var i=o(this.K,9);i&&delete this.K[i],this.K[t]=e}merge(t){this.K=$P($P({},this.K),t)}}function o(s,t){var e=Object.keys(s);return e.length<=t?null:e.reduce((t,e)=>{var i=s[t],n=s[e];return"object"==typeof i&&"object"==typeof n?n.receivedAt<i.receivedAt?e:t:n<i?e:t})}},8962:(t,l)=>{$Q2(l,"__esModule",{value:!0}),l.Diagnostics=void 0;const n=new Map,i="start";function s(t,e,i,n){return $P({key:i,action:e,step:n,timestamp:Date.now()},t)}function r(t,e){var i=null!=(i=n.get(t))?i:[];i.push(e),n.set(t,i)}function e(t,e){if(e in t)return t[e]}l.Diagnostics={q:t=>n.get(t),B:t=>{r(t,s({},i,"overall"))},V:(t,e,i)=>{r(t,s({success:e,error:e?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:i},"end","overall"))},J:(t,e)=>{r(t,s(e,i,"initialize","network_request"))},$:(t,e)=>{r(t,s(e,"end","initialize","network_request"))},W:t=>{r(t,s({},i,"initialize","process"))},H:(t,e)=>{r(t,s(e,"end","initialize","process"))},Y:t=>{n.delete(t)},X(t){if(t&&"object"==typeof t)return{code:e(t,"code"),name:e(t,"name"),message:e(t,"message")}},Z(t,e,i,n){return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null==(t=null==t?void 0:t.headers)?void 0:t.get("x-statsig-region"),isDelta:!0===i.includes('"is_delta":true')||void 0,attempt:e,error:l.Diagnostics.X(n)}},tt(t,e,i,n){var s,r=l.Diagnostics.q(i);return null==r||r.length<=0?-1:(s=r[r.length-1].timestamp-r[0].timestamp,l.Diagnostics.Y(i),i=function(t,e){t={eventName:"statsig::diagnostics",user:t,value:null,metadata:e,time:Date.now()};return t}(t,{context:"initialize",markers:r.slice(),statsigOptions:n}),e.enqueue(i),s)}}},8809:function(t,e){var i=this&&this.__awaiter||$A();$Q(e),e.et=void 0;const s=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),r="https://cloudflare-dns.com/dns-query",l=["i","e","d"],o=200;e.et=function(e){return i(this,void 0,void 0,function*(){var i=yield e(r,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:s});if(i.ok){var t,i=yield i.arrayBuffer(),i=new Uint8Array(i);{var n=i,i=n.findIndex((t,e)=>e<o&&"="===String.fromCharCode(t)&&l.includes(String.fromCharCode(n[e-1])));if(-1===i)throw(t=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",t;let e="";for(let t=i-1;t<n.length;t++)e+=String.fromCharCode(n[t]);return e.split(",")}}throw(t=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",t})}},3539:(t,e)=>{$Q(e)},5542:function(t,o,e){var i=this&&this.__awaiter||$A();$Q2(o,"__esModule",{value:!0}),o.ErrorBoundary=o.EXCEPTION_ENDPOINT=void 0;const n=e(7512),u=e(5902),a=e(8e3),c=(o.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function h(t){return t instanceof Error?t:"string"==typeof t?new Error(t):new Error("An unknown error occurred.")}o.ErrorBoundary=class{constructor(t,e,i,n){this.O=t,this.m=e,this.nt=i,this.qn=n,this.it=new Set}wrap(n){try{const t=n;!function(t){const e=new Set;let i=Object.getPrototypeOf(t);for(;i&&i!==Object.prototype;)Object.getOwnPropertyNames(i).filter(t=>"function"==typeof(null===i||void 0===i?void 0:i[t])).forEach(t=>e.add(t)),i=Object.getPrototypeOf(i);return Array.from(e)}(t).forEach(e=>{const i=t[e];"$EB"in i||(t[e]=(...t)=>this.rt(e,()=>i.apply(n,t)),t[e].$EB=!0)})}catch(t){this.st("eb:wrap",t)}}logError(t,e){this.st(t,e)}getLastSeenErrorAndReset(){var t=this.qn;return this.qn=void 0,null!=t?t:null}attachErrorIfNoneExists(t){this.qn||(this.qn=h(t))}rt(e,t){try{var i=t();return i&&i instanceof Promise?i.catch(t=>this.st(e,t)):i}catch(t){return this.st(e,t),null}}st(r,l){try{n.Log.warn("Caught error in "+r,{error:l});i(this,void 0,void 0,function*(){var t,e=l||Error(c),i=e instanceof Error,n=i?e.name:"No Name",s=h(e);this.qn=s,this.it.has(n)||(this.it.add(n),null!=(s=null==(s=this.m)?void 0:s.networkConfig)&&s.preventAllNetworkTraffic?null!=(s=this.nt)&&s.call(this,{name:"error",error:l,tag:r}):(s=u.SDKType.lt(this.O),t=a.StatsigMetadataProvider.get(),i=i?e.stack:function(t){try{return JSON.stringify(t)}catch(t){return c}}(e),e=$P({tag:r,exception:n,info:i,statsigOptions:function(t){if(!t)return{};const i={};return Object.entries(t).forEach(([t,e])=>{switch(typeof e){case"number":case"bigint":case"boolean":i[String(t)]=e;break;case"string":e.length<50?i[String(t)]=e:i[String(t)]="set";break;case"object":"environment"===t?i.environment=e:"networkConfig"===t?i.networkConfig=e:i[String(t)]=null!=e?"set":"unset"}}),i}(this.m)},$P($P({},t),{sdkType:s})),yield(null!=(n=null==(i=null==(n=this.m)?void 0:n.networkConfig)?void 0:i.networkOverrideFunc)?n:fetch)(o.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this.O,"STATSIG-SDK-TYPE":String(s),"STATSIG-SDK-VERSION":String(t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(e)}),null!=(i=this.nt)&&i.call(this,{name:"error",error:l,tag:r})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},2922:(t,e)=>{$Q(e)},2417:(t,e)=>{$Q(e)},7770:function(t,e,i){var n=this&&this.__awaiter||$A();$Q(e),e.EventLogger=void 0;const s=i(2137),r=i(1406),l=i(7512),o=i(7410),u=i(6830),a=i(1637),c=i(586),h=i(4534),d=i(1881),v=i(2397),f={},g={Startup:"startup",GainedFocus:"gained_focus"};class _{static ot(t){null!=(t=f[t])&&t.flush().catch(()=>{})}static ut(t){null!=(t=f[t])&&t.ct(g.GainedFocus)}constructor(t,e,i,n){this.O=t,this.nt=e,this.ht=i,this.m=n,this.dt=[],this.vt={},this.ft={},this._t=!1,this.gt=Date.now(),this.Yn=null!=(t=null==n?void 0:n.loggingEnabled)?t:!0===(null==n?void 0:n.disableLogging)?c.LoggingEnabledOption.disabled:c.LoggingEnabledOption.browserOnly,null!=n&&n.loggingEnabled&&void 0!==n.disableLogging&&l.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this.yt=null!=(e=null==n?void 0:n.loggingBufferMaxSize)?e:100;i=null==n?void 0:n.networkConfig;this.Ot=new d.UrlConfiguration(o.Endpoint.jt,null==i?void 0:i.logEventUrl,null==i?void 0:i.api,null==i?void 0:i.logEventFallbackUrls)}setLogEventCompressionMode(t){this.ht.setLogEventCompressionMode(t)}setLoggingEnabled(t){this.Yn=t}enqueue(t){this.St(t)&&(this.wt(t),this.Tt(),this.dt.length>this.yt)&&_.ot(this.O)}incrementNonExposureCount(t){var e=null!=(e=this.ft[t])?e:0;this.ft[t]=e+1}reset(){this.flush().catch(()=>{}),this.vt={}}start(){var t,e=(0,u.kt)();e&&"always"!==(null==(t=this.m)?void 0:t.loggingEnabled)||(f[this.O]=this,e||(0,v.It)(t=>{"background"===t?_.ot(this.O):"foreground"===t&&_.ut(this.O)}),this.ct(g.Startup),this.Dt())}stop(){return n(this,void 0,void 0,function*(){this.Et&&(clearInterval(this.Et),this.Et=null),delete f[this.O],yield this.flush()})}flush(){return n(this,void 0,void 0,function*(){var t;this.Mt(),0!==this.dt.length&&(t=this.dt,this.dt=[],yield this.At(t))})}Tt(){this._t||(this._t=!0,200<Date.now()-this.gt)||setTimeout(()=>_.ot(this.O),200)}St(t){if("always"!==(null==(e=this.m)?void 0:e.loggingEnabled)&&(0,u.kt)())return!1;if((0,a.xt)(t)){var e=t.user||{statsigEnvironment:void 0},e=(0,s.u)(this.O,e),i=t.metadata||{},t=[t.eventName,e,i.gate,i.config,i.ruleID,i.allocatedExperiment,i.parameterName,String(i.isExplicitParameter),i.reason].join("|"),e=this.vt[t],i=Date.now();if(e&&i-e<6e5)return!1;1e3<Object.keys(this.vt).length&&(this.vt={}),this.vt[t]=i}return!0}At(s){return n(this,void 0,void 0,function*(){var t,e;if("disabled"===this.Yn)return this.Nt(s),!1;try{var i=(0,v.Rt)()&&this.ht.isBeaconSupported()&&null==(null==(e=null==(t=this.m)?void 0:t.networkConfig)?void 0:e.networkOverrideFunc),n=(this.nt({name:"pre_logs_flushed",events:s}),i?this.Pt(s):yield this.Ct(s));return n.success?(this.nt({name:"logs_flushed",events:s}),!0):(l.Log.warn("Failed to flush events."),this.Nt(s),!1)}catch(t){return l.Log.warn("Failed to flush events."),!1}})}Ct(e){return n(this,void 0,void 0,function*(){var t=yield this.ht.post(this.Ut(e)),t=null!=(t=null==t?void 0:t.code)?t:-1;return{success:200<=t&&t<300}})}Pt(t){return{success:this.ht.beacon(this.Ut(t))}}Ut(t){return{sdkKey:this.O,data:{events:t},urlConfig:this.Ot,retries:3,isCompressable:!0,params:{[o.NetworkParam.EventCount]:String(t.length)},credentials:"same-origin"}}Nt(t){for(;500<t.length;)t.shift();var e=this.o();try{(0,h.L)(e,t)}catch(t){l.Log.warn("Unable to save failed logs to storage")}}ct(e){const i=this.o();n(this,void 0,void 0,function*(){h.Storage.isReady()||(yield h.Storage.isReadyResolver());var t=(0,h.G)(i);t&&(e===g.Startup&&h.Storage.removeItem(i),yield this.At(t))&&e===g.GainedFocus&&h.Storage.removeItem(i)}).catch(()=>{l.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,r.h)(this.O)}wt(t){t.user&&(t.user=$P({},t.user),delete t.user.privateAttributes);var e={},i=this.Ft(),i=(i&&(e.statsigMetadata={currentPage:i}),$P($P({},t),e));l.Log.debug("Enqueued Event:",i),this.dt.push(i)}Mt(){0!==Object.keys(this.ft).length&&(this.wt({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:$P({},this.ft)}}),this.ft={})}Ft(){var t;if(!1!==(null==(t=this.m)?void 0:t.includeCurrentPageUrlWithEvents))return(0,u.Gt)()}Dt(){var t=null!=(t=null==(t=this.m)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{var t=f[this.O];t&&t.Et===e?_.ot(this.O):clearInterval(e)},t);this.Et=e}}e.EventLogger=_},1406:(t,r,e)=>{$Q2(r,"__esModule",{value:!0}),r.Lt=r.Kt=r.h=void 0;const l=e(6634);r.h=e=>{let i=0;for(let t=0;t<e.length;t++){var n=e.charCodeAt(t);i=(i<<5)-i+n,i&=i}return String(i>>>0)},r.Kt=(t,e)=>(0,r.h)(JSON.stringify((0,r.Lt)(t,e)));r.Lt=(i,n)=>{if(null==i)return null;var t=Object.keys(i).sort();const s={};return t.forEach(t=>{var e=i[t];0===n||"object"!==(0,l.zt)(e)?s[t]=e:s[t]=(0,r.Lt)(e,null!=n?n-1:n)}),s}},1333:(t,e)=>{$Q(e)},7512:(t,e)=>{$Q(e),e.Log=e.LogLevel=void 0;function i(t){return t.unshift("[Statsig]"),t}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...t){n.level>=e.LogLevel.Info&&console.info(" INFO ",...i(t))}static debug(...t){n.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...i(t))}static warn(...t){n.level>=e.LogLevel.Warn&&console.warn(" WARN ",...i(t))}static error(...t){n.level>=e.LogLevel.Error&&console.error(" ERROR ",...i(t))}}(e.Log=n).level=e.LogLevel.Warn},7787:(t,e)=>{$Q(e),e.createMemoKey=e.MemoPrefix=void 0,e.MemoPrefix={Kn:"g",Ln:"c",Vn:"e",$n:"l",Bn:"p"};const r=new Set([]),l=new Set(["userPersistedValues"]);e.createMemoKey=function(t,e,i){let n=t+"|"+e;if(i)for(const s of Object.keys(i)){if(l.has(s))return;r.has(s)?n+=`|${s}=true`:n+=`|${s}=`+i[s]}return n}},7410:(t,e)=>{$Q(e),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={qt:"initialize",jt:"rgstr",Bt:"download_config_specs"},e.NetworkDefault={[e.Endpoint.jt]:"https://prodregistryv2.org/v1",[e.Endpoint.qt]:"https://featureassets.org/v1",[e.Endpoint.Bt]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(t,e,i){var y=this&&this.__awaiter||$A();$Q(e),e.NetworkCore=void 0,i(1845);const v=i(1845),O=i(8962),j=i(7512),S=i(7410),n=i(308),f=i(3091),l=i(5902),s=i(6830),o=i(4143),u=i(9122),w=i(2636),a=i(8e3),g=i(586),k=i(2397),E=500,R=3e4;const T=new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(t,e){this.nt=e,this.$t=null,this.Vt=1e4,this.Jt={},this.m={},this.Oi={},this.Jn=null,t&&(this.m=t),this.m.networkConfig&&(this.Jt=this.m.networkConfig),this.Jt.networkTimeoutMs&&(this.Vt=this.Jt.networkTimeoutMs),this.Wt=new n.NetworkFallbackResolver(this.m),this.setLogEventCompressionMode(this.Qn(t))}setLogEventCompressionMode(t){this.m.logEventCompressionMode=t}setErrorBoundary(t){this.$t=t,this.$t.wrap(this),this.$t.wrap(this.Wt),this.Wt.setErrorBoundary(t)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var t=this.Jn;return this.Jn=null,t}beacon(t){var e,i;return!!M(t)&&(t=this.Ht("POST",t),e=this.Xt(t),(i=navigator).sendBeacon.bind(i)(e,t.body))}post(e){return y(this,void 0,void 0,function*(){var t=this.Ht("POST",e);return this.Pi(t),yield this.Ci(t),this.Zt(t)})}get(t){t=this.Ht("GET",t);return this.Zt(t)}Zt(m){return y(this,void 0,void 0,function*(){var e;if(!M(m))return null;if(this.Jt.preventAllNetworkTraffic)return null;var{method:i,body:n,retries:s,attempt:r}=m,l=m.urlConfig.endpoint;if(this.Si(l))return j.Log.warn(`Request to ${l} was blocked because you are making requests too frequently.`),null;r=null!=r?r:1;const o="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>{null!==o&&void 0!==o&&o.abort(`Timeout of ${this.Vt}ms expired.`)},this.Vt),u=this.Xt(m);let a=null;var c,h=(0,k.Rt)();try{var d,v,f,g={method:i,body:n,headers:$P({},m.headers),signal:null===o||void 0===o?void 0:o.signal,priority:m.priority,keepalive:h},_=(c=r,(b=m).urlConfig.endpoint===S.Endpoint.qt&&O.Diagnostics.J(b.sdkKey,{attempt:c}),this.Oi[l]),p=(_&&(_.lastRequestTime=Date.now(),this.Oi[l]=_),null!=(e=this.Jt.networkOverrideFunc)?e:fetch);if(a=yield p(u,g),clearTimeout(t),a.ok)return f=yield a.text(),I(m,a,r,f),this.Wt.tryBumpExpiryTime(m.sdkKey,m.urlConfig),{body:f,code:a.status};throw d=yield a.text().catch(()=>"No Text"),(v=new Error(`NetworkError: ${u} `+d)).name="NetworkError",v}catch(t){var n=function(t,e){if(null!=t&&t.signal.aborted&&"string"==typeof t.signal.reason)return t.signal.reason;if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(o,t),h=function(t){t=(null==t?void 0:t.signal.aborted)&&"string"==typeof t.signal.reason&&t.signal.reason.includes("Timeout");return t||!1}(o),b=(I(m,a,r,"",t),yield this.Wt.tryFetchUpdatedFallbackInfo(m.sdkKey,m.urlConfig,n,h));return(b&&(m.fallbackUrl=this.Wt.getActiveFallbackUrl(m.sdkKey,m.urlConfig)),!s||s<r||!T.has(null!=(c=null===a||void 0===a?void 0:a.status)?c:500))?(null!=(l=this.nt)&&l.call(this,{name:"error",error:t,tag:w.ErrorTag.NetworkError,requestArgs:m}),_=`A networking error occurred during ${i} request to ${u}.`,j.Log.error(_,n,t),null!=(e=this.$t)&&e.attachErrorIfNoneExists(_),null):(yield function(e){return y(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(E*(e*e),R)))})}(r),this.Zt($P($P({},m),{retries:s,attempt:r+1})))}})}Qn(t){let e=null==t?void 0:t.logEventCompressionMode;return e=(e=e||!0!==(null==t?void 0:t.disableCompression)?e:g.LogEventCompressionMode.Disabled)||g.LogEventCompressionMode.Enabled}Si(t){var e=Date.now(),i=null!=(i=this.Oi[t])?i:{count:0,lastRequestTime:e},n=e-i.lastRequestTime,n=Math.floor(.05*n);return i.count=Math.max(0,i.count-n),50<=i.count||(i.count+=1,i.lastRequestTime=e,this.Oi[t]=i,!1)}Xt(t){var e=null!=(e=t.fallbackUrl)?e:t.urlConfig.getUrl();t.urlConfig.endpoint!==S.Endpoint.qt&&t.urlConfig.endpoint!==S.Endpoint.Bt||(this.Jn=e);const i=$P({[S.NetworkParam.SdkKey]:t.sdkKey,[S.NetworkParam.SdkType]:l.SDKType.lt(t.sdkKey),[S.NetworkParam.SdkVersion]:a.SDK_VERSION,[S.NetworkParam.Time]:String(Date.now()),[S.NetworkParam.SessionID]:o.SessionID.get(t.sdkKey)},t.params);t=Object.keys(i).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(i[t])).join("&");return e+(t?"?"+t:"")}Pi(e){var t,i=(0,s.te)(),n=e.body;if(e.isStatsigEncodable&&!this.m.disableStatsigEncoding&&"string"==typeof n&&null==(0,v.i)("no-encode")&&null!=i&&i.btoa)try{e.body=i.btoa(n).split("").reverse().join(""),e.params=$P($P({},null!=(t=e.params)?t:{}),{[S.NetworkParam.StatsigEncoded]:"1"})}catch(t){j.Log.warn("Request encoding failed for "+e.urlConfig.getUrl(),t)}}Ci(d){return y(this,void 0,void 0,function*(){var e,i=d.body;if("string"==typeof i&&function(t,e){if(!t.isCompressable)return;if(null!=(0,v.i)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var i=null!=t.urlConfig.customUrl||null!=t.urlConfig.fallbackUrls,n=!0===f.SDKFlags.get(t.sdkKey,"enable_log_event_compression");switch(e.logEventCompressionMode){case g.LogEventCompressionMode.Disabled:return;case g.LogEventCompressionMode.Enabled:return i&&!n?void 0:1;case g.LogEventCompressionMode.Forced:return 1;default:return}}(d,this.m))try{for(var n,s=(new TextEncoder).encode(i),r=new CompressionStream("gzip"),l=r.writable.getWriter(),o=(l.write(s).catch(j.Log.error),l.close().catch(j.Log.error),r.readable.getReader()),u=[];!(n=yield o.read()).done;)u.push(n.value);var a=u.reduce((t,e)=>t+e.length,0),c=new Uint8Array(a);let t=0;for(const h of u)c.set(h,t),t+=h.length;d.body=c,d.params=$P($P({},null!=(e=d.params)?e:{}),{[S.NetworkParam.IsGzipped]:"1"})}catch(t){j.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),t)}})}Ht(t,e){var i=this.Wt.getActiveFallbackUrl(e.sdkKey,e.urlConfig),t=$P($P({},e),{method:t,fallbackUrl:i});return"data"in e&&r(t,e.data),t}};const M=t=>!!t.sdkKey||(j.Log.warn("Unable to make request without an SDK key"),!1),r=(t,e)=>{var{sdkKey:i,fallbackUrl:n}=t,s=u.StableID.get(i),r=o.SessionID.get(i),i=l.SDKType.lt(i);t.body=JSON.stringify($P($P({},e),{statsigMetadata:$P($P({},a.StatsigMetadataProvider.get()),{stableID:s,sessionID:r,sdkType:i,fallbackUrl:n})}))};function I(t,e,i,n,s){t.urlConfig.endpoint===S.Endpoint.qt&&O.Diagnostics.$(t.sdkKey,O.Diagnostics.Z(e,i,n,s))}},308:function(t,e,i){var o=this&&this.__awaiter||$A();$Q(e),e.ee=e.NetworkFallbackResolver=void 0;const l=i(8809),n=i(1406),r=i(7512),u=i(4534);function a(t,e){t=null!=(t=null==t?void 0:t.toLowerCase())?t:"";return e||t.includes("uncaught exception")||t.includes("failed to fetch")||t.includes("networkerror when attempting to fetch resource")}function c(t){return"statsig.network_fallback."+(0,n.h)(t)}function h(t,e){t=c(t);e&&0!==Object.keys(e).length?u.Storage.setItem(t,JSON.stringify(e)):u.Storage.removeItem(t)}e.NetworkFallbackResolver=class{constructor(t){this.ne=null,this.$t=null,this.ie={},this.re=null==(t=t.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(t){this.$t=t}tryBumpExpiryTime(t,e){var i=null==(i=this.ne)?void 0:i[e.endpoint];i&&(i.expiryTime=Date.now()+6048e5,h(t,$P($P({},this.ne),{[e.endpoint]:i})))}getActiveFallbackUrl(t,e){var i;if(null!=e.customUrl&&null!=e.fallbackUrls)return null;let n=this.ne;null==n&&(n=null!=(s=function(t){t=c(t),t=u.Storage.getItem(t);if(!t)return null;try{return JSON.parse(t)}catch(t){return r.Log.error("Failed to parse FallbackInfo"),null}}(t))?s:{},this.ne=n);var s=n[e.endpoint];return!s||Date.now()>(null!=(i=s.expiryTime)?i:0)||e.getChecksum()!==s.urlConfigChecksum?(delete n[e.endpoint],this.ne=n,h(t,this.ne),null):s.url||null}tryFetchUpdatedFallbackInfo(n,s,r,l){return o(this,void 0,void 0,function*(){var e,t,i;try{return a(r,l)?(t=null==s.customUrl&&null==s.fallbackUrls?yield this.se(s):s.fallbackUrls,!!(i=this.le(null==(e=this.ne)?void 0:e[s.endpoint],t))&&(this.oe(n,s,i),!0)):!1}catch(t){return null!=(e=this.$t)&&e.logError("tryFetchUpdatedFallbackInfo",t),!1}})}oe(t,e,i){var i={urlConfigChecksum:e.getChecksum(),url:i,expiryTime:Date.now()+6048e5,previous:[]},e=e.endpoint,n=null==(n=this.ne)?void 0:n[e],n=(n&&i.previous.push(...n.previous),10<i.previous.length&&(i.previous=[]),null==(n=null==(n=this.ne)?void 0:n[e])?void 0:n.url);null!=n&&i.previous.push(n),this.ne=$P($P({},this.ne),{[e]:i}),h(t,this.ne)}se(r){return o(this,void 0,void 0,function*(){var t=this.ie[r.endpoint];if(t&&Date.now()<t)return null;this.ie[r.endpoint]=Date.now()+144e5;var e=[],t=yield(0,l.et)(null!=(t=this.re)?t:fetch),i=function(t){try{return new URL(t).pathname}catch(t){return null}}(r.defaultUrl);for(const s of t)if(s.startsWith(r.endpointDnsKey+"=")){var n=s.split("=");if(1<n.length){let t=n[1];t.endsWith("/")&&(t=t.slice(0,-1)),e.push("https://"+t+i)}}return e})}le(t,e){var i;if(null==e)return null;var n=new Set(null!=(i=null==t?void 0:t.previous)?i:[]),s=null==t?void 0:t.url;let r=null;for(const o of e){var l=o.endsWith("/")?o.slice(0,-1):o;if(!n.has(o)&&l!==s){r=l;break}}return r}},e.ee=a},1405:(t,e)=>{$Q(e)},1361:(t,e)=>{$Q(e)},3091:(t,e)=>{$Q(e),e.SDKFlags=void 0;const i={};e.SDKFlags={setFlags:(t,e)=>{i[t]=e},get:(t,e)=>{return null!=(t=null==(t=i[t])?void 0:t[e])&&t}}},5902:(t,e)=>{$Q(e),e.SDKType=void 0;const i={};let n;e.SDKType={lt:t=>{return(null!=(t=i[t])?t:"js-mono")+(null!==n&&void 0!==n?n:"")},ue(t,e){i[t]=e},ae(t){n&&"-react"!==n||(n="-"+t)}}},6830:(t,n)=>{$Q2(n,"__esModule",{value:!0}),n.Hn=n.Gt=n.ce=n.he=n.kt=n.de=n.te=void 0;n.te=()=>"undefined"!=typeof window?window:null,n.de=()=>{var t=(0,n.te)();return null!=(t=null==t?void 0:t.document)?t:null},n.kt=()=>{var t;return null===(0,n.de)()&&(t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||t)},n.he=(t,e)=>{var i=(0,n.te)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},n.ce=(t,e)=>{var i=(0,n.de)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},n.Gt=()=>{var t;try{return null==(t=(0,n.te)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}};n.Hn=()=>{var t=(0,n.te)();return t&&"onpagehide"in t?"pagehide":"beforeunload"}},4143:(t,e,i)=>{$Q(e),e.StatsigSession=e.SessionID=void 0;const n=i(1845),s=i(2137),o=i(7512),u=i(4534),a=i(8023),c=18e5,h=144e5,d={};function v(e,t){return setTimeout(()=>{var t=null==(t=(0,n.l)())?void 0:t.instance(e);t&&t.$emt({name:"session_expired"})},t)}function f(t){return"statsig.session_id."+(0,s.o)(t)}e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:t=>{null==d[t]&&(d[t]=function(t){let e=function(t){t=f(t);return(0,u.G)(t)}(t);var i=Date.now();e=e||{sessionID:(0,a.getUUID)(),startTime:i,lastUpdate:i};return{data:e,sdkKey:t}}(t));var t=d[t],e=Date.now(),i=t.data,n=t.sdkKey,s=((function({lastUpdate:t}){return Date.now()-t>c}(i)||function({startTime:t}){return Date.now()-t>h}(i))&&(i.sessionID=(0,a.getUUID)(),i.startTime=e,l=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(n))&&l.$emt({name:"session_expired"}),i.lastUpdate=e,i),r=t.sdkKey;r=f(r);try{(0,u.L)(r,s)}catch(t){o.Log.warn("Failed to save SessionID")}clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID);var l=e-i.startTime;return t.idleTimeoutID=v(n,c),t.ageTimeoutID=v(n,h-l),t},overrideInitialSessionID:(t,e)=>{var i;d[e]=(t=t,e=e,i=Date.now(),{data:{sessionID:t,startTime:i,lastUpdate:i},sdkKey:e})}}},9122:(t,e,i)=>{$Q(e),e.StableID=void 0;const n=i(2137),s=i(7512),r=i(6830),l=i(4534),o=i(8023),u={},a={},c={};function h(t){return"statsig.stable_id."+(0,n.o)(t)}function d(t,e){e=h(e);try{(0,l.L)(e,t)}catch(t){s.Log.warn("Failed to save StableID to storage")}}function v(t,e){var i;a[e]&&document&&((i=new Date).setFullYear(i.getFullYear()+1),document.cookie=`${f(e)}=${encodeURIComponent(t)}; expires=${i.toUTCString()}; path=/`)}function f(t){return"statsig.stable_id."+(0,n.o)(t)}e.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:t=>{if(c[t])return null;if(null!=u[t])return u[t];let e=null;return null!=(e=function(t){if(a[t]&&null!=(0,r.de)())for(const n of document.cookie.split(";")){var[e,i]=n.trim().split("=");if(e===f(t))return decodeURIComponent(i)}return null}(t))?d(u[t]=e,t):(d(e=null==(e=function(t){t=h(t);return(0,l.G)(t)}(t))?(0,o.getUUID)():e,t),v(e,t),u[t]=e),e},setOverride:(t,e)=>{d(u[e]=t,e),v(t,e)},Xn:(t,e)=>{a[t]=e},_e:(t,e)=>{c[t]=e}}},1375:function(t,e,i){var n=this&&this.__awaiter||$A();$Q(e),e.StatsigClientBase=void 0,i(1845);const l=i(1845),o=i(5542),u=i(7770),a=i(7512),r=i(7787),c=i(6830),h=i(4143),d=i(9122),s=i(586),v=i(4534);e.StatsigClientBase=class{constructor(t,e,i,n){this.loadingStatus="Uninitialized",this.ve=null,this.fe={};var s,r=this.$emt.bind(this);null!=(null==n?void 0:n.logLevel)&&(a.Log.level=n.logLevel),null!=n&&n.disableStorage&&v.Storage._e(!0),null!=n&&n.initialSessionID&&h.StatsigSession.overrideInitialSessionID(n.initialSessionID,t),null!=n&&n.storageProvider&&v.Storage.ge(n.storageProvider),null!=n&&n.enableCookies&&d.StableID.Xn(t,n.enableCookies),null!=n&&n.disableStableID&&d.StableID._e(t,!0),this.O=t,this.m=null!=n?n:{},this.ji={},this.overrideAdapter=null!=(s=null==n?void 0:n.overrideAdapter)?s:null,this.pe=new u.EventLogger(t,r,i,n),this.$t=new o.ErrorBoundary(t,n,r),this.$t.wrap(this),this.$t.wrap(e),this.$t.wrap(this.pe),i.setErrorBoundary(this.$t),this.dataAdapter=e,this.dataAdapter.attach(t,n,i),this.storageProvider=v.Storage,null!=(e=null==(r=null==(s=this.overrideAdapter)?void 0:s.loadFromStorage)?void 0:r.call(s))&&e.catch(t=>this.$t.logError("OA::loadFromStorage",t)),this.be(),n=t,i=this,(0,c.kt)()||(r=(0,l.l)(),s=null!=(s=r.instances)?s:{},i=i,null!=s[n]&&a.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),s[n]=i,r.firstInstance||(r.firstInstance=i),r.instances=s,__STATSIG__=r)}updateRuntimeOptions(t){t.loggingEnabled?(this.m.loggingEnabled=t.loggingEnabled,this.pe.setLoggingEnabled(t.loggingEnabled)):null!=t.disableLogging&&(this.m.disableLogging=t.disableLogging,this.pe.setLoggingEnabled(t.disableLogging?"disabled":"browser-only")),null!=t.disableStorage&&(this.m.disableStorage=t.disableStorage,v.Storage._e(t.disableStorage)),null!=t.enableCookies&&(this.m.enableCookies=t.enableCookies,d.StableID.Xn(this.O,t.enableCookies)),t.logEventCompressionMode?this.pe.setLogEventCompressionMode(t.logEventCompressionMode):t.disableCompression&&this.pe.setLogEventCompressionMode(s.LogEventCompressionMode.Disabled)}flush(){return this.pe.flush()}shutdown(){return n(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this.me("Uninitialized",null),this.ve=null,yield this.pe.stop()})}on(t,e){this.fe[t]||(this.fe[t]=[]),this.fe[t].push(e)}off(t,e){this.fe[t]&&-1!==(e=this.fe[t].indexOf(e))&&this.fe[t].splice(e,1)}$on(t,e){e.__isInternal=!0,this.on(t,e)}$emt(i){var t;const e=e=>{try{e(i)}catch(t){!0===e.__isInternal?this.$t.logError("__emit:"+i.name,t):a.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",i)}};this.fe[i.name]&&this.fe[i.name].forEach(t=>e(t)),null!=(t=this.fe["*"])&&t.forEach(e)}me(t,e){this.loadingStatus=t,this.ji={},this.$emt({name:"values_updated",status:t,values:e})}ye(t,e,i){!0===(null==i?void 0:i.disableExposureLog)?this.pe.incrementNonExposureCount(t):this.pe.enqueue(e)}wi(n,s){return(t,e)=>{var i;return!this.m.disableEvaluationMemoization&&(i=(0,r.createMemoKey)(n,t,e))?(i in this.ji||(3e3<=Object.keys(this.ji).length&&(this.ji={}),this.ji[i]=s(t,e)),this.ji[i]):s(t,e)}}}},2636:(t,e)=>{$Q(e),e.ErrorTag=void 0,e.ErrorTag={NetworkError:"NetworkError"}},3206:(t,e)=>{$Q(e),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},1637:(t,e)=>{$Q(e),e.Oe=e.je=e.Ui=e.Se=e.xt=void 0;const r="statsig::config_exposure",l="statsig::gate_exposure",a="statsig::layer_exposure",c=(t,e,i,n,s)=>(i.bootstrapMetadata&&(n.bootstrapMetadata=i.bootstrapMetadata),{eventName:t,user:e,value:null,metadata:o(i,n),secondaryExposures:s,time:Date.now()});e.xt=({eventName:t})=>t===l||t===r||t===a;function h(t,e){return t.map(t=>"string"==typeof t?(null!=e?e:{})[t]:t).filter(t=>null!=t)}e.Se=(t,e,i)=>{var n,s={gate:e.name,gateValue:String(e.value),ruleID:e.ruleID};return null!=(null==(n=e.__evaluation)?void 0:n.version)&&(s.configVersion=e.__evaluation.version),c(l,t,e.details,s,h(null!=(t=null==(n=e.__evaluation)?void 0:n.secondary_exposures)?t:[],i))},e.Ui=h;e.je=(t,e,i)=>{var n,s={config:e.name,ruleID:e.ruleID};return null!=(null==(n=e.__evaluation)?void 0:n.version)&&(s.configVersion=e.__evaluation.version),null!=(null==(n=e.__evaluation)?void 0:n.passed)&&(s.rulePassed=String(e.__evaluation.passed)),c(r,t,e.details,s,h(null!=(t=null==(n=e.__evaluation)?void 0:n.secondary_exposures)?t:[],i))};e.Oe=(t,e,i,n)=>{var s,r=e.__evaluation,l=!0===(null==(l=null==r?void 0:r.explicit_parameters)?void 0:l.includes(i));let o="",u=null!=(s=null==r?void 0:r.undelegated_secondary_exposures)?s:[];l&&(o=null!=(s=r.allocated_experiment_name)?s:"",u=r.secondary_exposures);r=null==(s=e.__evaluation)?void 0:s.parameter_rule_ids,r={config:e.name,parameterName:i,ruleID:null!=(s=null==r?void 0:r[i])?s:e.ruleID,allocatedExperiment:o,isExplicitParameter:String(l)};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(r.configVersion=e.__evaluation.version),c(a,t,e.details,r,h(u,n))};const o=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},8e3:(t,e)=>{$Q(e),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.18.2";let i={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>i,add:t=>{i=$P($P({},i),t)}}},586:(t,e)=>{$Q(e),e.LoggingEnabledOption=e.LogEventCompressionMode=void 0,e.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},e.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(t,e)=>{$Q(e)},2059:(t,e,i)=>{$Q(e),e.we=e.Te=e.ke=e.Ie=e.De=e.Ee=void 0;const l=i(7512),o=i(6634);function s(t,e,i,n){return{name:t,details:e,ruleID:null!=(t=null==i?void 0:i.rule_id)?t:"",__evaluation:i,value:n}}function n(t,e,i){var n=null!=(n=null==i?void 0:i.value)?n:{};return $P($P({},s(t,e,i,n)),{get:r(t,null==i?void 0:i.value)})}function r(n,s,r){return(t,e)=>{var i=null!=(i=null==s?void 0:s[t])?i:null;return null==i?null!=e?e:null:null==e||(0,o.Me)(i,e)?(null!=r&&r(t),i):(l.Log.warn(`Parameter type mismatch. '${n}.${t}' was found to be type '${typeof i}' but fallback/return type is '${typeof e}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=e?e:null)}}e.Ee=function(t,e,i){return $P($P({},s(t,e,i,!0===(null==i?void 0:i.value))),{idType:null!=(t=null==i?void 0:i.id_type)?t:null})},e.De=n,e.Ie=function(t,e,i){return t=n(t,e,i),$P($P({},t),{groupName:null!=(e=null==i?void 0:i.group_name)?e:null})},e.ke=function(t,e,i,n){return $P($P({},s(t,e,i,void 0)),{get:r(t,null==i?void 0:i.value,n),groupName:null!=(e=null==i?void 0:i.group_name)?e:null,__value:null!=(t=null==i?void 0:i.value)?t:{}})},e.Te=function(t,e,i,n){return $P($P($P({},t),e),{get:r(t.name,i,n)})},e.we=r},1812:(t,e)=>{$Q(e)},3932:(t,e)=>{$Q(e),e.UPDATE_DETAIL_ERROR_MESSAGES=e.createUpdateDetails=void 0;e.createUpdateDetails=(t,e,i,n,s,r)=>({duration:i,source:e,success:t,error:n,sourceUrl:s,warnings:r}),e.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},8578:(t,e,i)=>{$Q(e),e.v=e.T=void 0;const n=i(1406),s=i(7512);e.T=function(t,e,i){try{var n=JSON.parse(JSON.stringify(t));return null!=e&&null!=e.environment?n.statsigEnvironment=e.environment:null!=i&&(n.statsigEnvironment={tier:i}),n}catch(t){return s.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},e.v=function(t){return t?(0,n.Kt)(t):null}},4534:(t,i,e)=>{$Q2(i,"__esModule",{value:!0}),i.L=i.G=i.Storage=void 0;var n=e(7512),e=e(6830);const s={},r={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:t=>s[t]||null,setItem:(t,e)=>{s[t]=e},removeItem:t=>{delete s[t]},getAllKeys:()=>Object.keys(s)};let l=null;try{const c=(0,e.te)();c&&c.localStorage&&"function"==typeof c.localStorage.getItem&&(l={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>c.localStorage.getItem(t),setItem:(t,e)=>c.localStorage.setItem(t,e),removeItem:t=>c.localStorage.removeItem(t),getAllKeys:()=>Object.keys(c.localStorage)})}catch(t){n.Log.warn("Failed to setup localStorageProvider.")}let o=null!==l&&void 0!==l?l:r,u=o;function a(e){try{return e()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return i.Storage.ge(r),null;throw t instanceof Error&&"QuotaExceededError"===t.name&&(e=i.Storage.getAllKeys().filter(t=>t.startsWith("statsig.")),t.message=t.message+". Statsig Keys: "+e.length),t}}i.Storage={isReady:()=>u.isReady(),isReadyResolver:()=>u.isReadyResolver(),getProviderName:()=>u.getProviderName(),getItem:t=>a(()=>u.getItem(t)),setItem:(t,e)=>a(()=>u.setItem(t,e)),removeItem:t=>u.removeItem(t),getAllKeys:()=>u.getAllKeys(),ge:t=>{o=t,u=t},_e:t=>{u=t?r:o}},i.G=function(t){return t=i.Storage.getItem(t),JSON.parse(null!=t?t:"null")},i.L=function(t,e){i.Storage.setItem(t,JSON.stringify(e))}},3401:(t,e,i)=>{$Q(e),e.P=void 0;const s=i(7512);e.P=function(t,e,i){try{var n=JSON.parse(t);if(n&&"object"==typeof n&&e in n)return n}catch(t){}return s.Log.error("Failed to parse "+i),null}},6634:(t,e)=>{$Q(e),e.Me=e.zt=void 0,e.zt=function(t){return Array.isArray(t)?"array":typeof t},e.Me=function(t,e){var i=t=>Array.isArray(t)?"array":typeof t;return i(t)===i(e)}},8023:(t,e)=>{$Q(e),e.getUUID=void 0,e.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let i=(new Date).getTime(),n="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let e=16*Math.random();return 0<i?(e=(i+e)%16|0,i=Math.floor(i/16)):(e=(n+e)%16|0,n=Math.floor(n/16)),("x"===t?e:7&e|8).toString(16)})}},1881:(t,e,i)=>{$Q(e),e.UrlConfiguration=void 0;const n=i(1406),s=i(7410),r={[s.Endpoint.qt]:"i",[s.Endpoint.jt]:"e",[s.Endpoint.Bt]:"d"};e.UrlConfiguration=class{constructor(t,e,i,n){this.customUrl=null,this.fallbackUrls=null,this.endpoint=t,this.endpointDnsKey=r[t],e&&(this.customUrl=e),!e&&i&&(this.customUrl=i.endsWith("/")?""+i+t:i+"/"+t),n&&(this.fallbackUrls=n);e=s.NetworkDefault[t];this.defaultUrl=e+"/"+t}getUrl(){var t;return null!=(t=this.customUrl)?t:this.defaultUrl}getChecksum(){var t=(null!=(t=this.fallbackUrls)?t:[]).sort().join(",");return(0,n.h)(this.customUrl+t)}}},2397:(t,e,i)=>{$Q(e),e.Ae=e.It=e.Rt=e.xe=void 0;i=i(6830);const n="foreground",s="background",r=[];let l=n,o=!1;e.xe=()=>l===n,e.Rt=()=>o,e.It=t=>{r.unshift(t)};e.Ae=e=>{e!==l&&(l=e,r.forEach(t=>t(e)))},(0,i.he)("focus",()=>{(o=!1,e.Ae)(n)}),(0,i.he)("blur",()=>(0,e.Ae)(s)),(0,i.ce)("visibilitychange",()=>{(0,e.Ae)("visible"===document.visibilityState?n:s)}),(0,i.he)((0,i.Hn)(),()=>{o=!0,(0,e.Ae)(s)})},6914:function(t,e,i){var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);s&&("get"in s?e.__esModule:!s.writable&&!s.configurable)||(s={enumerable:!0,get:function(){return e[i]}}),$Q2(t,n,s)}:function(t,e,i,n){t[n=void 0===n?i:n]=e[i]}),s=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)},r=($Q(e),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,i(1845),i(1845));const l=i(8962),o=($Q2(e,"Diagnostics",{enumerable:!0,get:function(){return l.Diagnostics}}),i(7770)),u=($Q2(e,"EventLogger",{enumerable:!0,get:function(){return o.EventLogger}}),i(7512));$Q2(e,"Log",{enumerable:!0,get:function(){return u.Log}});var a=i(8e3);const c=i(4534);$Q2(e,"Storage",{enumerable:!0,get:function(){return c.Storage}}),s(i(1845),e),s(i(2137),e),s(i(6427),e),s(i(694),e),s(i(8962),e),s(i(3539),e),s(i(5542),e),s(i(2922),e),s(i(2417),e),s(i(1406),e),s(i(1333),e),s(i(7512),e),s(i(7787),e),s(i(7410),e),s(i(7023),e),s(i(1405),e),s(i(1361),e),s(i(6830),e),s(i(5902),e),s(i(4143),e),s(i(9122),e),s(i(1375),e),s(i(2636),e),s(i(3206),e),s(i(1637),e),s(i(8e3),e),s(i(586),e),s(i(1098),e),s(i(2059),e),s(i(1812),e),s(i(8578),e),s(i(4534),e),s(i(3401),e),s(i(6634),e),s(i(1881),e),s(i(8023),e),s(i(2397),e),s(i(3932),e),s(i(3091),e),$P((0,r.l)(),{Log:u.Log,SDK_VERSION:a.SDK_VERSION})},2016:(t,e,i)=>{$Q(e),e.AutoInit=void 0;const b=i(6914),m=i(2018);function y(t,e){var i;return null!=(i=e.get(t))?i:e.get(t.toLowerCase())}e.AutoInit=class{static attempt(e){var t,i,n,s,r;try{var l=(0,b.te)(),o=(0,b.de)();if(l&&o&&o.currentScript){var u=o.currentScript.getAttribute("src"),a=null==(t=l.location)?void 0:t.href;if(u&&a){var c=new URL(u,a).searchParams,h=null!=(i=y("sdkKey",c))?i:y("apiKey",c);if(h){var d={},v=y("proxy",c),f=(v&&(d.networkConfig={api:v}),null==(s=null==(n=(0,b.l)())?void 0:n.instances)?void 0:s[h]);let t=null;if(t=f instanceof m.StatsigClient?f:t)e({sdkKey:h,client:t});else{var g=o.currentScript.dataset;const _=function(t,e){if(t)if(t in e&&"function"==typeof e[t])return e[t];return null}(null!=(r=g.onstatsiginit)?r:g.onStatsigInit,l),p=new m.StatsigClient(h,function(){var t=(0,b.te)();if(!t)return{};let e=t.statsigUser||{};var i=(e="object"!=typeof e?{}:e).custom||{},n=e.customIDs||{};return $P($P({},e),{customIDs:$P({},n),custom:$P($P({},i),{useragent:t.navigator.userAgent,page_url:(0,b.Gt)()||"",language:null==(n=t.navigator)?void 0:n.language})})}(),d);p.initializeAsync().then(()=>{_&&_(p)}).catch(t=>{b.Log.error(t)}),e({sdkKey:h,client:p})}}}}}catch(t){b.Log.error("AutoInit failed",t)}}}},7262:(t,e,i)=>{$Q(e),e.Ne=void 0;const n=i(6914);function s(t,e){null!=t&&t.forEach(t=>{delete e[t]})}e.Ne=function(t,e){var i;return(e=(0,n.P)(e,"checksum","DeltasEvaluationResponse"))?(t=t,i=e,t=$P($P($P({},t),i),{feature_gates:$P($P({},t.feature_gates),i.feature_gates),layer_configs:$P($P({},t.layer_configs),i.layer_configs),dynamic_configs:$P($P({},t.dynamic_configs),i.dynamic_configs)}),s((t=i=t).deleted_gates,t.feature_gates),delete t.deleted_gates,s(i.deleted_configs,t.dynamic_configs),delete t.deleted_configs,s(i.deleted_layers,t.layer_configs),delete t.deleted_layers,i=t,(t=(0,n.Kt)({feature_gates:i.feature_gates,dynamic_configs:i.dynamic_configs,layer_configs:i.layer_configs},2))===e.checksumV2?JSON.stringify(i):{hadBadDeltaChecksum:!0,badChecksum:t,badMergedConfigs:i,badFullResponse:e.deltas_full_response}):{hadBadDeltaChecksum:!0}}},4845:(t,e,i)=>{$Q(e);const s=i(6914);e.default=class{constructor(t){this.O=t,this.Re=null,this.Pe=null,this.Ce="Uninitialized",this.Ue=0,this.Fe=0,this.Ge=null,this.Le=new Set}reset(){this.Pe=null,this.Re=null,this.Ce="Loading",this.Ue=0,this.Fe=0,this.Ge=null}finalize(){this.Pe||(this.Ce="NoValues")}getValues(){return this.Re?(0,s.P)(this.Re,"has_updates","EvaluationStoreValues"):null}setValues(t,e){var i;return!!t&&null!=(i=(0,s.P)(t.data,"has_updates","EvaluationResponse"))&&(this.Ce=t.source,!0===(null==i?void 0:i.has_updates)&&(this.Re=t.data,this.Ue=i.time,this.Fe=t.receivedAt,this.Pe=i,this.Ge=this.Ke(t.source,i),t.source&&i.user&&this.ze(e,i),s.SDKFlags.setFlags(this.O,null!=(t=i.sdk_flags)?t:{})),!0)}getWarnings(){if(0!==this.Le.size)return Array.from(this.Le)}getGate(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.feature_gates,t)}getConfig(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.dynamic_configs,t)}getLayer(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.layer_configs,t)}getParamStore(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.param_stores,t)}getSource(){return this.Ce}getExposureMapping(){var t;return null==(t=this.Pe)?void 0:t.exposures}Ke(t,e){return"Bootstrap"!==t?null:(t={},e.user&&(t.user=e.user),e.sdkInfo&&(t.generatorSDKInfo=e.sdkInfo),t.lcut=e.time,t)}qe(t,e){let i=null;return{result:i=t?t[e]||t[(0,s.h)(e)]:i,details:this.Be(null==i)}}ze(t,e){var i,n=s.StableID.get(this.O);(null==(i=t.customIDs)?void 0:i.stableID)!==n&&(null!=(i=t.customIDs)&&i.stableID||n)?this.Le.add("StableIDMismatch"):"user"in e&&(i=e.user,(0,s.v)(t)!==(0,s.v)(i))&&this.Le.add("PartialUserMatch")}getCurrentSourceDetails(){var t;return"Uninitialized"===this.Ce||"NoValues"===this.Ce?{reason:this.Ce}:(t={reason:this.Ce,lcut:this.Ue,receivedAt:this.Fe},0<this.Le.size&&(t.warnings=Array.from(this.Le)),t)}Be(t){var e=this.getCurrentSourceDetails();let i=e.reason;var n=null!=(n=e.warnings)?n:[],t=("Bootstrap"===this.Ce&&0<n.length&&(i+=n[0]),"Uninitialized"!==i&&"NoValues"!==i&&(i=i+":"+(t?"Unrecognized":"Recognized")),"Bootstrap"===this.Ce&&null!=(n=this.Ge)?n:void 0);return t&&(e.bootstrapMetadata=t),$P($P({},e),{reason:i})}}},8448:function(t,e,i){var u=this&&this.__awaiter||$A();$Q(e);const a=i(6914),l=i(7262);class n extends a.NetworkCore{constructor(t,e){super(t,e);e=null==t?void 0:t.networkConfig;this.Fi=t,this.Ve=new a.UrlConfiguration(a.Endpoint.qt,null==e?void 0:e.initializeUrl,null==e?void 0:e.api,null==e?void 0:e.initializeFallbackUrls)}fetchEvaluations(n,s,r,l,o){return u(this,void 0,void 0,function*(){var t,e=s?(0,a.P)(s,"has_updates","InitializeResponse"):null;let i={user:l,hash:null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2",deltasResponseRequested:!1,full_checksum:null};return null!=e&&e.has_updates&&(t=(null==e?void 0:e.hash_used)!==(null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2"),i=$P($P({},i),{sinceTime:o&&!t?e.time:0,previousDerivedFields:"derived_fields"in e&&o?e.derived_fields:{},deltasResponseRequested:!0,full_checksum:e.full_checksum,partialUserMatchSinceTime:t?0:e.time})),this.Je(n,e,i,r)})}Je(i,n,s,r){return u(this,void 0,void 0,function*(){var t,e=yield this.post({sdkKey:i,urlConfig:this.Ve,data:s,retries:2,isStatsigEncodable:!0,priority:r});return 204===(null==e?void 0:e.code)?'{"has_updates": false}':200!==(null==e?void 0:e.code)?null!=(t=null==e?void 0:e.body)?t:null:!0!==(null==n?void 0:n.has_updates)||!0!==(null==(t=e.body)?void 0:t.includes('"is_delta":true'))||!0!==s.deltasResponseRequested?e.body:"string"==typeof(t=(0,l.Ne)(n,e.body))?t:this.Je(i,n,$P($P($P({},s),t),{deltasResponseRequested:!1}),r)})}}e.default=n},3583:(t,e,i)=>{$Q(e),e.$e=void 0;const d=i(6914),v={disableExposureLog:!0};function f(t){return null==t||!1===t.disableExposureLog}function g(t,e){return null!=e&&!(0,d.Me)(t,e)}e.$e=function(a,c,h){return(t,e)=>{if(null==c)return e;var i,n,s,r,l,o,u=c[t];if(null==u||null!=e&&(0,d.zt)(e)!==u.param_type)return e;switch(u.ref_type){case"static":return u.value;case"gate":return o=u,a.getFeatureGate(o.gate_name,f(h)?void 0:v).value?o.pass_value:o.fail_value;case"dynamic_config":return o=u,l=e,g(r=(r=a).getDynamicConfig(o.config_name,f(h)?void 0:v).get(o.param_name),l)?l:r;case"experiment":return l=u,r=e,g(s=(s=a).getExperiment(l.experiment_name,f(h)?void 0:v).get(l.param_name),r)?r:s;case"layer":return s=u,n=e,g(i=(i=a).getLayer(s.layer_name,f(h)?void 0:v).get(s.param_name),n)?n:i;default:return e}}}},8198:function(t,e,i){var r=this&&this.__awaiter||$A();$Q(e);const l=i(6914),o=i(4845),u=i(8448),s=i(3583),a=i(4131);class n extends l.StatsigClientBase{static instance(t){var e=(0,l.l)().instance(t);return e instanceof n?e:(l.Log.warn((0,l.kt)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new n(null!=t?t:"",{}))}constructor(t,e,i=null){l.SDKType.ue(t,"javascript-client");var n,s=new u.default(i,t=>{this.$emt(t)}),t=(super(t,null!=(n=null==i?void 0:i.dataAdapter)?n:new a.StatsigEvaluationsDataAdapter,s,i),this.getFeatureGate=this.wi(l.MemoPrefix.Kn,this.Ti.bind(this)),this.getDynamicConfig=this.wi(l.MemoPrefix.Ln,this.Ii.bind(this)),this.getExperiment=this.wi(l.MemoPrefix.Vn,this.ki.bind(this)),this.getLayer=this.wi(l.MemoPrefix.$n,this.Di.bind(this)),this.getParameterStore=this.wi(l.MemoPrefix.Bn,this.Ri.bind(this)),this.We=new o.default(t),this.ht=s,this.He=this.xi(e,i),this.zi=(0,l.getUUID)(),null!=(n=null==i?void 0:i.plugins)?n:[]);for(const r of t)r.bind(this)}initializeSync(t){var e;return"Uninitialized"!==this.loadingStatus?(0,l.createUpdateDetails)(!0,this.We.getSource(),-1,null,null,["MultipleInitializations",...null!=(e=this.We.getWarnings())?e:[]]):(this.pe.start(),this.updateUserSync(this.He,t))}initializeAsync(t){return r(this,void 0,void 0,function*(){return this.ve||(this.ve=this.Ye(t)),this.ve})}updateUserSync(e,t){var i=performance.now();try{return this.Ki(e,t,i)}catch(t){e=t instanceof Error?t:new Error(String(t));return this.qi(e,i)}}Ki(t,e,i){var n=[...null!=(n=this.We.getWarnings())?n:[]],t=(this.Xe(t),this.dataAdapter.getDataSync(this.He)),e=(null==t&&n.push("NoCachedValues"),this.We.setValues(t,this.He),this.Qe(t),null==e?void 0:e.disableBackgroundCacheRefresh);return!0===e||null==e&&"Bootstrap"===(null==t?void 0:t.source)||this.Ze(null!=t?t:null,this.He),(0,l.createUpdateDetails)(!0,this.We.getSource(),performance.now()-i,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),n)}updateUserAsync(t,n){return r(this,void 0,void 0,function*(){var e=performance.now();try{return yield this.Vi(t,n)}catch(t){var i=t instanceof Error?t:new Error(String(t));return this.qi(i,e)}})}Vi(n,s){return r(this,void 0,void 0,function*(){this.Xe(n);var t=this.He,e=(l.Diagnostics.B(this.O),this.dataAdapter.getDataSync(t));if(this.We.setValues(e,this.He),this.me("Loading",e),e=yield this.dataAdapter.getDataAsync(e,t,s),t!==this.He)return(0,l.createUpdateDetails)(!1,this.We.getSource(),-1,new Error("User changed during update"),this.ht.getLastUsedInitUrlAndReset());let i=!1;null!=e&&(l.Diagnostics.W(this.O),i=this.We.setValues(e,this.He),l.Diagnostics.H(this.O,{success:i})),this.Qe(e),i||(this.$t.attachErrorIfNoneExists(l.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),l.Diagnostics.V(this.O,i,this.We.getCurrentSourceDetails());t=l.Diagnostics.tt(this.He,this.pe,this.O,this.m);return(0,l.createUpdateDetails)(i,this.We.getSource(),t,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),this.We.getWarnings())})}getContext(){return{sdkKey:this.O,options:this.m,values:this.We.getValues(),user:JSON.parse(JSON.stringify(this.He)),errorBoundary:this.$t,session:l.StatsigSession.get(this.O),stableID:l.StableID.get(this.O),sdkInstanceID:this.zi}}checkGate(t,e){return this.getFeatureGate(t,e).value}logEvent(t,e,i){e="string"==typeof t?{eventName:t,value:e,metadata:i}:t;this.$emt({name:"log_event_called",event:e}),this.pe.enqueue($P($P({},e),{user:this.He,time:Date.now()}))}be(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.Qe(null)})}Ye(t){return r(this,void 0,void 0,function*(){return l.Storage.isReady()||(yield l.Storage.isReadyResolver()),this.pe.start(),this.updateUserAsync(this.He,t)})}qi(t,e){return(0,l.createUpdateDetails)(!1,this.We.getSource(),performance.now()-e,t,null,[...null!=(e=this.We.getWarnings())?e:[]])}Qe(t){this.We.finalize(),this.me("Ready",t)}Ze(t,e){this.dataAdapter.getDataAsync(t,e,{priority:"low"}).catch(t=>{l.Log.error("An error occurred after update.",t)})}Xe(t){this.pe.reset(),this.We.reset(),this.He=this.xi(t,this.m)}xi(t,e){t=(0,l.T)(t,e),e=null==(e=t.customIDs)?void 0:e.stableID;return e&&l.StableID.setOverride(e,this.O),t}Ti(t,e){var{result:i,details:n}=this.We.getGate(t),n=(0,l.Ee)(t,n,i),s=null==(s=null==(i=this.overrideAdapter)?void 0:i.getGateOverride)?void 0:s.call(i,n,this.He,e),i=null!=s?s:n;return this.ye(t,(0,l.Se)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"gate_evaluation",gate:i}),i}Ii(t,e){var{result:i,details:n}=this.We.getConfig(t),n=(0,l.De)(t,n,i),s=null==(s=null==(i=this.overrideAdapter)?void 0:i.getDynamicConfigOverride)?void 0:s.call(i,n,this.He,e),i=null!=s?s:n;return this.ye(t,(0,l.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:i}),i}ki(t,e){var{result:i,details:n}=this.We.getConfig(t),n=(0,l.Ie)(t,n,i),s=(null!=n.__evaluation&&(n.__evaluation.secondary_exposures=(0,l.Ui)(null!=(i=null==(i=n.__evaluation)?void 0:i.secondary_exposures)?i:[],this.We.getExposureMapping())),null==(s=null==(i=this.overrideAdapter)?void 0:i.getExperimentOverride)?void 0:s.call(i,n,this.He,e)),i=null!=s?s:n;return this.ye(t,(0,l.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"experiment_evaluation",experiment:i}),i}Di(e,i){var{result:t,details:n}=this.We.getLayer(e),n=(0,l.ke)(e,n,t),s=null==(s=null==(t=this.overrideAdapter)?void 0:t.getLayerOverride)?void 0:s.call(t,n,this.He,i);null!=i&&i.disableExposureLog&&this.pe.incrementNonExposureCount(e);const r=(0,l.Te)(n,s,null!=(t=null==s?void 0:s.__value)?t:n.__value,t=>{null!=i&&i.disableExposureLog||this.ye(e,(0,l.Oe)(this.He,r,t,this.We.getExposureMapping()),i)});return this.$emt({name:"layer_evaluation",layer:r}),r}Ri(t,e){var{result:i,details:n}=this.We.getParamStore(t),t=(this.pe.incrementNonExposureCount(t),{name:t,details:n,__configuration:i,get:(0,s.$e)(this,i,e)}),i=null==(i=null==(n=this.overrideAdapter)?void 0:n.getParamStoreOverride)?void 0:i.call(n,t,e);return null!=i&&(t.__configuration=i.config,t.details=i.details,t.get=(0,s.$e)(this,i.config,e)),t}}e.default=n},4131:function(t,e,i){var r=this&&this.__awaiter||$A();$Q(e),e.StatsigEvaluationsDataAdapter=void 0;const n=i(6914),s=i(8448);class l extends n.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this.ht=null,this.m=null}attach(t,e,i){super.attach(t,e,i),null!==i&&i instanceof s.default?this.ht=i:this.ht=new s.default(null!=e?e:{})}getDataAsync(t,e,i){return this.D(t,(0,n.T)(e,this.m),i)}prefetchData(t,e){return this.A(t,e)}setData(t){var e=(0,n.P)(t,"has_updates","data");e&&"user"in e?super.setData(t,e.user):n.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(t,e){super.setData(t,e)}R(e,i,n,s){return r(this,void 0,void 0,function*(){var t=yield null==(t=this.ht)?void 0:t.fetchEvaluations(this.C(),e,null==n?void 0:n.priority,i,s);return null!=t?t:null})}k(t){t=(0,n.o)(this.C(),t,null==(t=this.m)?void 0:t.customUserCacheKeyFunc);return`${n.DataAdapterCachePrefix}.${this.p}.`+t}N(t,e){return null!=t.fullUserHash&&t.fullUserHash===(0,n.v)(e)}}e.StatsigEvaluationsDataAdapter=l},2018:function(t,e,i){var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);s&&("get"in s?e.__esModule:!s.writable&&!s.configurable)||(s={enumerable:!0,get:function(){return e[i]}}),$Q2(t,n,s)}:function(t,e,i,n){t[n=void 0===n?i:n]=e[i]}),s=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)},r=($Q(e),e.StatsigClient=void 0,i(6914)),l=i(8198),s=(e.StatsigClient=l.default,s(i(6914),e),$P((0,r.l)(),{StatsigClient:l.default}));e.default=s},8788:(t,e,i)=>{$Q(e),e.SessionReplay=e.runStatsigSessionReplay=e.StatsigSessionReplayPlugin=void 0;const n=i(6914);var s=i(4069);const r=i(5967);function l(t,e){new o(t,e)}e.StatsigSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="session-replay"}bind(t){l(t,this.options)}},e.runStatsigSessionReplay=l;class o extends s.SessionReplayBase{constructor(t,e){super(t,e),this.tn.$on("values_updated",()=>{var t;this.Gi||this.li(null==(t=this.m)?void 0:t.forceRecording)}),this.li(null==(t=this.m)?void 0:t.forceRecording)}ri(t){super.Bi(t)}li(t=!1){var e;this.$i>=r.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():this.si.isRecording()||(this.Gi=!1,n.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.record((t,e)=>this.ci(t,e),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.SessionReplay=o},4069:(t,e,i)=>{$Q(e),e.SessionReplayBase=e.forceStartRecording=e.startRecording=e.stopRecording=void 0;const a=i(6914),n=i(759),c=i(5967),s=i(1807);function r(t){var e=null==t?(0,a.l)().firstSRInstance:null==(e=null==(e=(0,a.l)())?void 0:e.srInstances)?void 0:e[t];return e instanceof l?e:null}e.stopRecording=function(t){null!=(t=r(t))&&t.stopRecording()},e.startRecording=function(t){null!=(t=r(t))&&t.startRecording()},e.forceStartRecording=function(t){null!=(t=r(t))&&t.forceStartRecording()};class l{constructor(t,e){this.ti={startTime:-1,endTime:0,clickCount:0},this.ei=[],this.Gi=!1,this.Ji=0,this.$i=0,this.tn=t,this.m=e;var{sdkKey:t,errorBoundary:e}=this.tn.getContext();this.$t=e,this.$t.wrap(this),this.si=new n.SessionReplayClient,this.tn.$on("pre_shutdown",()=>this.ri()),this.tn.on("session_expired",()=>{this.ri("session_expired")}),(0,a.kt)()||((e=(0,a.l)()).srInstances=$P($P({},e.srInstances),{[t]:this}),e.firstSRInstance)||(e.firstSRInstance=this),this.ii=this.ni(),this.ui()}forceStartRecording(){this.Gi=!1,this.li(!0)}stopRecording(){this.Gi=!0,this.ri()}startRecording(){var t;this.Gi=!1,this.li(null==(t=this.m)?void 0:t.forceRecording)}isRecording(){return this.si.isRecording()}oi(t){0!==this.ei.length&&(t=(0,a.Rt)()?"is_leaving_page":t,this.vi(this.ii,t))}ai(t){"background"===t&&(this.oi(),this.tn.flush().catch(t=>{this.$t.logError("SR::visibility",t)}))}ui(){const i=this.tn.getContext()["sdkKey"];(0,a.It)(t=>{var e=null==(e=null==(e=(0,a.l)())?void 0:e.srInstances)?void 0:e[i];e instanceof l&&e.ai(t)})}vi(e,i){var n=this.ti;if(0!==this.ei.length){var s=JSON.stringify(this.ei),r=(0,c.Wi)(s),l=1<r.length?(0,a.getUUID)():null;for(let t=0;t<r.length;t++){var o=r[t],u=(0,c.Yi)(o,s,e,n,this.tn.getContext().sdkInstanceID);null!=l&&(0,c.Qi)(u.metadata,l,t,r.length,o.length),i&&(u.metadata[i]="true"),this.$i++,this.tn.logEvent(u),null!=l&&this.tn.flush().catch(t=>{a.Log.error(t)})}this.ei=[],this.$i>c.MAX_LOGS&&this.ri()}}di(){this.ni(),this.oi()}ni(){return this.tn.getContext().session.data.sessionID}Bi(t){this.si.isRecording()&&(this.si.stop(),a.StatsigMetadataProvider.add({isRecordingSession:"false"})),0!==this.ei.length&&this.oi(t),"session_expired"===t&&(this.Ji=0,this.ti=this.Hi())}Hi(){return{startTime:-1,endTime:0,clickCount:0}}ci(t,e){var i;this.ii!==this.ni()?this.ri("session_expired"):this.$i>=c.MAX_LOGS?this.ri():(t.eventIndex=this.Ji++,this.ti.clickCount+=e.clickCount,this.ti.startTime=-1===this.ti.startTime?e.startTime:Math.min(this.ti.startTime,e.startTime),this.ti.endTime=Math.max(this.ti.endTime,e.endTime),(e=(0,s.hi)(t,c.MAX_INDIVIDUAL_EVENT_BYTES))>c.MAX_INDIVIDUAL_EVENT_BYTES?a.Log.warn(`SessionReplay event is too large (~${e} bytes) and will not be logged`,t):(i=(0,s.hi)(this.ei,c.REPLAY_ENQUEUE_TRIGGER_BYTES),this.ei.push(t),i+e<c.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,a.xe)()?this.di():this.oi())))}}e.SessionReplayBase=l},759:(t,e,i)=>{$Q(e),e.SessionReplayClient=void 0;const n=i(3331),l=i(6914);e.SessionReplayClient=class{constructor(){this.fi=null,this._i=null}record(s,t,e,r=!1){var i;null==(0,l.de)()||(this.fi=null,this._i=null,this.bi=e,this.pi)||(this.pi=(e=(t,e)=>{var i;r?this.fi=!e&&null!=(i=this.fi)?i:t.timestamp:null==this.fi&&(this.fi=t.timestamp),this._i=t.timestamp;let n=0;3!==(i=t).type||2!==i.data.source||2!==i.data.type&&4!==i.data.type||n++,s($P($P({},t),{eventIndex:0}),{startTime:this.fi,endTime:this._i,clickCount:n},null!=e&&e),144e5<this._i-this.fi&&(null!=(t=this.pi)&&t.call(this),this.bi)&&this.bi()},t=t,i=r,("function"==typeof n?n:n.record)(i?$P($P({},t),{emit:e,checkoutEveryNms:3e4}):$P($P({},t),{emit:e}))))}stop(){this.pi&&(this.pi(),this.pi=void 0)}isRecording(){return null!=this.pi}}},5967:(t,e,i)=>{$Q(e),e.Qi=e.Wi=e.Yi=e.MAX_LOGS=e.MAX_INDIVIDUAL_EVENT_BYTES=e.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;const r=i(6914);e.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,e.MAX_INDIVIDUAL_EVENT_BYTES=10485760,e.MAX_LOGS=1e4,e.Yi=function(t,e,i,n,s){return{eventName:"statsig::session_recording",value:i,metadata:{session_start_ts:String(n.startTime),session_end_ts:String(n.endTime),clicks_captured_cumulative:String(n.clickCount),rrweb_events:t,rrweb_payload_size:String(e.length),session_replay_sdk_version:r.SDK_VERSION,sdk_instance_id:s}}},e.Wi=function(e){var i=[];for(let t=0;t<e.length;t+=1048576)i.push(e.slice(t,t+1048576));return i},e.Qi=function(t,e,i,n,s){t.sliced_id=e,t.slice_index=String(i),t.slice_count=String(n),t.slice_byte_size=String(s)}},1807:(t,o)=>{$Q2(o,"__esModule",{value:!0}),o.hi=void 0;o.hi=(e,i)=>{let n=0;var s=Object.keys(e);for(let t=0;t<s.length;t++){var r=s[t],l=e[r];if((n=(n+=r.length)+("object"==typeof l&&null!==l?(0,o.hi)(l,i)+2:String(l).length+1))>=i)return n}return n}},3691:(t,e,i)=>{$Q(e),e.TriggeredSessionReplay=e.runStatsigTriggeredSessionReplay=e.StatsigTriggeredSessionReplayPlugin=void 0;const s=i(6914);var n=i(4069);const r=i(5967);function l(t,e){new o(t,e)}e.StatsigTriggeredSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="triggered-session-replay"}bind(t){l(t,this.options)}},e.runStatsigTriggeredSessionReplay=l;class o extends n.SessionReplayBase{constructor(t,e){super(t,e),this.Xi=[],this.Zi=!1,this.Zn(e),null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.ts()}Zn(t){this.es(t),this.ns(),this.ss(),this.rs()}es(e){this.tn.$on("values_updated",()=>{var t;this.Gi||(null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.ts())})}ns(){this.tn.$on("log_event_called",t=>{var e;this.Gi||!1===(null==(e=this.tn.getContext().values)?void 0:e.passes_session_recording_targeting)||null==(null==e?void 0:e.session_recording_event_triggers)||null==(e=e.session_recording_event_triggers[t.event.eventName])||!1===e.passes_sampling||null!=(e=e.values)&&!e.includes(String(null!=(e=t.event.value)?e:""))||this.li(!0)})}ss(){this.tn.$on("gate_evaluation",t=>{this.ls(t.gate.name,String(t.gate.value))})}rs(){this.tn.$on("experiment_evaluation",t=>{this.ls(t.experiment.name,null!=(t=t.experiment.groupName)?t:"")})}ls(t,e){var i,n;this.Gi||!1===(null==(n=this.tn.getContext().values)?void 0:n.passes_session_recording_targeting)||null==(null==n?void 0:n.session_recording_exposure_triggers)||null==(i=null!=(i=n.session_recording_exposure_triggers[t])?i:n.session_recording_exposure_triggers[(0,s.h)(t)])||!1===i.passes_sampling||null!=(n=i.values)&&!n.includes(e)||this.li(!0)}forceStartRecording(){super.forceStartRecording()}stopRecording(){this.Zi=!1,this.Xi=[],super.stopRecording()}os(){if(this.Zi=!0,0!==this.Xi.length){var e=this.Xi.map(t=>t.events).flat();for(let t=0;t<e.length;t++)e[t].event.eventIndex=t,this.ti.clickCount+=e[t].data.clickCount,this.ti.startTime=-1===this.ti.startTime?e[t].data.startTime:Math.min(this.ti.startTime,e[t].data.startTime),this.ti.endTime=Math.max(this.ti.endTime,e[t].data.endTime);this.ei=e.map(t=>t.event),this.Ji=e.length,(0,s.xe)()?this.di():this.oi(),this.si.stop()}}ri(t){this.Zi=!1,this.Xi=[],super.Bi(t)}ci(t,e,i){if(!this.Zi)return this.ii!==this.ni()?void this.ri("session_expired"):void(i&&4===t.type||0===this.Xi.length?(1<this.Xi.length&&this.Xi.shift(),this.Xi.push({events:[{event:t,data:e}]})):this.Xi[this.Xi.length-1].events.push({event:t,data:e}));super.ci(t,e)}ts(){var t=this.tn.getContext().values;!1===(null==t?void 0:t.passes_session_recording_targeting)?this.ri():this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(t=null==(t=this.m)?void 0:t.rrwebConfig)?t:{},()=>{this.ri()},!0)}li(t=!1){var e;this.$i>=r.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():(this.os(),this.Gi=!1,s.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.TriggeredSessionReplay=o},3447:(t,e,i)=>{$Q(e),e.forceStartRecording=e.stopRecording=e.startRecording=e.StatsigTriggeredSessionReplayPlugin=e.StatsigSessionReplayPlugin=e.runStatsigTriggeredSessionReplay=e.runStatsigSessionReplay=e.SessionReplay=e.SessionReplayClient=void 0;var n=i(6914);const s=i(8788),r=($Q2(e,"SessionReplay",{enumerable:!0,get:function(){return s.SessionReplay}}),$Q2(e,"StatsigSessionReplayPlugin",{enumerable:!0,get:function(){return s.StatsigSessionReplayPlugin}}),$Q2(e,"runStatsigSessionReplay",{enumerable:!0,get:function(){return s.runStatsigSessionReplay}}),i(4069)),l=($Q2(e,"forceStartRecording",{enumerable:!0,get:function(){return r.forceStartRecording}}),$Q2(e,"startRecording",{enumerable:!0,get:function(){return r.startRecording}}),$Q2(e,"stopRecording",{enumerable:!0,get:function(){return r.stopRecording}}),i(759)),o=($Q2(e,"SessionReplayClient",{enumerable:!0,get:function(){return l.SessionReplayClient}}),i(3691));$Q2(e,"StatsigTriggeredSessionReplayPlugin",{enumerable:!0,get:function(){return o.StatsigTriggeredSessionReplayPlugin}}),$Q2(e,"runStatsigTriggeredSessionReplay",{enumerable:!0,get:function(){return o.runStatsigTriggeredSessionReplay}}),$P((0,n.l)(),{SessionReplayClient:l.SessionReplayClient,SessionReplay:s.SessionReplay,runStatsigSessionReplay:s.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:o.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:s.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:o.StatsigTriggeredSessionReplayPlugin,startRecording:r.startRecording,stopRecording:r.stopRecording,forceStartRecording:r.forceStartRecording})},4535:(t,e,i)=>{$Q(e),e.AutoCapture=e.runStatsigAutoCapture=e.StatsigAutoCapturePlugin=void 0;const c=i(6914),n=i(5423),s=i(6714),r=i(4716),l=i(7574),o=i(3843),u=i(4090),a={submit:n.AutoCaptureEventName.FORM_SUBMIT,click:n.AutoCaptureEventName.CLICK};function h(t,e){return new d(t,e)}e.StatsigAutoCapturePlugin=class{constructor(t){this.m=t,this.__plugin="auto-capture"}bind(t){h(t,this.m)}},e.runStatsigAutoCapture=h;class d{constructor(t,e){this.tn=t,this.rn={},this.sn=null,this.Ei=!1;var{sdkKey:t,errorBoundary:i,values:n}=t.getContext(),n=(this.rn=null!=(n=null==(n=null==n?void 0:n.auto_capture_settings)?void 0:n.disabled_events)?n:{},this.$t=i,this.$t.wrap(this),this.tn.$on("values_updated",()=>{var t=this.tn.getContext().values;this.rn=null!=(t=null==(t=null==t?void 0:t.auto_capture_settings)?void 0:t.disabled_events)?t:this.rn}),this.us=new s.EngagementManager,this.cs=new r.default,this.ln=null==e?void 0:e.eventFilterFunc,(0,c.de)());(0,c.kt)()||((e=null!=(i=(__STATSIG__=(0,c.l)()).acInstances)?i:{})[t]=this,__STATSIG__.acInstances=e),"loading"===(null==n?void 0:n.readyState)?n.addEventListener("DOMContentLoaded",()=>this.qt()):this.qt()}un(){var t=(0,c.te)(),e=(0,c.de)();if(t&&e){const i=(t,e=!0)=>{t=t||(null==(t=(0,c.te)())?void 0:t.event);this.an(t),e&&this.us.bumpInactiveTimer(),"click"===t.type&&t instanceof MouseEvent&&this.cs.isRageClick(t.clientX,t.clientY,Date.now())&&this.hs(t)};(0,l.cn)(e,"click",t=>i(t)),(0,l.cn)(e,"submit",t=>i(t)),(0,l.cn)(t,"error",t=>i(t,!1)),(0,l.cn)(t,"pagehide",()=>this.Mi()),(0,l.cn)(t,"beforeunload",()=>this.Mi())}}vn(){var t=(0,c.te)(),e=(0,c.de)();t&&e&&((0,l.cn)(t,"popstate",()=>this.fn()),window.history.pushState=new Proxy(window.history.pushState,{apply:(t,e,[i,n,s])=>{t.apply(e,[i,n,s]),this.fn()}}),this.fn())}an(t){var e,i,n=null==(n=t.type)?void 0:n.toLowerCase();"error"===n&&t instanceof ErrorEvent?this._n(t):(e=(0,l.gn)(t))&&(0,l.St)(t,e)&&(t=a[n])&&({value:n,metadata:e}=(0,o.pn)(e),i=(0,u.ds)((0,l.wn)()),this.bn(t,n,$P($P({},i),e)))}qt(){this.us.startInactivityTracking(()=>this.Mi(!0)),this.un(),this.vn(),this.mn(),this.yn()}_n(t){var e=(null==t?void 0:t.error)||{};let i=e;if("object"==typeof e)try{i=JSON.stringify(e)}catch(t){i="function"==typeof(null==e?void 0:e.toString)?e.toString():"Unknown Error"}this.bn(n.AutoCaptureEventName.ERROR,t.message,{message:t.message,filename:t.filename,lineno:t.lineno,colno:t.colno,error_str:i})}mn(){var t=this.On();try{this.jn(t)&&this.bn(n.AutoCaptureEventName.SESSION_START,(0,l.Sn)(),{sessionID:t.data.sessionID},{flushImmediately:!0})}catch(t){this.$t.logError("AC::logSession",t)}}fn(){var t=(0,l.wn)(),e=this.sn;e&&t.href===e.href||(this.us.setLastPageViewTime(Date.now()),this.sn=t,e=(this.Ei=!1,u.ds)(t),this.bn(n.AutoCaptureEventName.PAGE_VIEW,(0,l.Sn)(),e,{flushImmediately:!0,addNewSessionMetadata:!0}),this.us.bumpInactiveTimer())}Mi(t=!1){var e,i;this.Ei||(this.Ei=!0,e=this.us.getScrollMetrics(),i=this.us.getPageViewLength(),this.bn(n.AutoCaptureEventName.PAGE_VIEW_END,(0,l.Sn)(),$P($P({},e),{pageViewLength:i,dueToInactivity:t}),{flushImmediately:!0}))}hs(t){var{value:e,metadata:i}=(0,o.pn)(t.target);this.bn(n.AutoCaptureEventName.RAGE_CLICK,e,$P($P({x:t.clientX,y:t.clientY,timestamp:Date.now()},(0,u.ds)((0,l.wn)())),i))}yn(){const i=(0,c.te)();i&&i.performance&&void 0!==(null===i||void 0===i?void 0:i.performance)&&"function"==typeof i.performance.getEntriesByType&&"function"==typeof i.performance.getEntriesByName&&setTimeout(()=>{var t={},e=i.performance.getEntriesByType("navigation"),e=(e&&0<e.length&&e[0]instanceof PerformanceNavigationTiming&&(e=e[0],t.load_time_ms=e.duration,t.dom_interactive_time_ms=e.domInteractive-e.startTime,t.redirect_count=e.redirectCount,t.transfer_bytes=e.transferSize),i.performance.getEntriesByName("first-contentful-paint"));e&&0<e.length&&e[0]instanceof PerformancePaintTiming&&(t.first_contentful_paint_time_ms=e[0].startTime),this.bn(n.AutoCaptureEventName.PERFORMANCE,(0,l.Sn)(),$P($P({},t),(0,u.vs)()))},1)}bn(t,e,i,n){var s,r,l,o=t.slice("auto_capture::".length);if(!this.rn[t]&&!this.rn[o]){o=this.On();try{var u=$P({sessionID:o.data.sessionID,page_url:null!=(l=null==(r=null==(s=(0,c.te)())?void 0:s.location)?void 0:r.href)?l:""},i),a=(null!=n&&n.addNewSessionMetadata&&(u.isNewSession=String(this.jn(o))),{eventName:t,value:e,metadata:u});this.ln&&!this.ln(a)||(this.tn.logEvent(a),null!=n&&n.flushImmediately&&this.tn.flush().catch(t=>{c.Log.error(t)}))}catch(t){this.$t.logError("AC::enqueue",t)}}}jn(t){return Math.abs(t.data.startTime-Date.now())<1e3}On(){return this.tn.getContext().session}}e.AutoCapture=d},5423:(t,e)=>{$Q(e),e.AutoCaptureEventName=void 0,e.AutoCaptureEventName={PAGE_VIEW:"auto_capture::page_view",PAGE_VIEW_END:"auto_capture::page_view_end",ERROR:"auto_capture::error",SESSION_START:"auto_capture::session_start",PERFORMANCE:"auto_capture::performance",FORM_SUBMIT:"auto_capture::form_submit",CLICK:"auto_capture::click",RAGE_CLICK:"auto_capture::rage_click"}},6714:(t,e,i)=>{$Q(e),e.EngagementManager=void 0;const n=i(6914);e.EngagementManager=class{constructor(){this.fs=0,this.gs=0,this._s=0,this.ps=0,this.bs=Date.now(),this.Ai=null,this.ys=null,this.Os()}Os(){var t=(0,n.te)();t&&(t.addEventListener("scroll",()=>this.js()),t.addEventListener("scrollend",()=>this.js()),t.addEventListener("resize",()=>this.js()))}js(){var t,e=(0,n.te)(),i=(0,n.de)();e&&i&&(t=i.body.scrollHeight,i=e.scrollY||i.documentElement.scrollTop||0,e=e.innerHeight,this.fs=i,this.gs=Math.max(this.gs,i),i=Math.min(100,Math.round((i+e)/t*100)),this._s=i,this.ps=Math.max(this.ps,i),this.bumpInactiveTimer())}getScrollMetrics(){return{lastScrollY:this.fs,maxScrollY:this.gs,lastScrollPercentage:this._s,maxScrollPercentage:this.ps,scrollDepth:this.ps}}getPageViewLength(){return Date.now()-this.bs}setLastPageViewTime(t){this.bs=t}startInactivityTracking(t){this.ys=t}bumpInactiveTimer(){var t=(0,n.te)();t&&(this.Ai&&clearTimeout(this.Ai),this.Ai=t.setTimeout(()=>{this.ys&&this.ys()},6e5))}}},4716:(t,e)=>{$Q(e);e.default=class{constructor(){this.Ss=[]}isRageClick(t,e,i){this.Ss=this.Ss.filter(t=>i-t.timestamp<1e3);var n,s;return 0<this.Ss.length&&(n=this.Ss[this.Ss.length-1],s=t-n.x,n=e-n.y,!(Math.abs(s)+Math.abs(n)<=30))&&(this.Ss=[]),this.Ss.push({x:t,y:e,timestamp:i}),3<=this.Ss.length}}},7574:(t,e,i)=>{$Q(e),e.ws=e.ks=e.Es=e.kn=e.cn=e.Sn=e.wn=e.St=e.gn=e.Rs=void 0;const n=i(6914);function s(e){if(e){let t=e;for(;t;){var i=t.tagName.toLowerCase();if(["body","document"].includes(i))return null;if("a"===t.tagName.toLowerCase())return t;t=t.parentElement}}return null}e.Rs=function(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>null!=t&&""!==t&&void 0!==t))},e.gn=function(t){if(!t)return null;let e=t.target||t.srcElement;return e&&e instanceof Element?e=3===e.nodeType?e.parentNode||null:e:null},e.St=function(t,e){if(!t||!e||1!==e.nodeType)return!1;var i=e.tagName.toLowerCase(),n=t.type.toLowerCase();switch(i){case"html":return!1;case"form":return"submit"===n;case"input":case"select":case"textarea":return["change"].includes(n);default:if("click"===n){if("button"===i)return!0;if(s(e))return!0}return!1}},e.wn=function(){var t=null!=(t=null==(t=null==(t=(0,n.te)())?void 0:t.location)?void 0:t.href)?t:"";let e;try{e=new URL(t)}catch(t){e=new URL("error:")}return e},e.Sn=function(){return(0,n.Gt)()||""},e.cn=function(t,e,i){t&&t.addEventListener&&t.addEventListener(e,i,!0)},e.kn=function(){var t=(0,n.te)();return t&&t.navigator&&t.navigator.connection||null},e.Es=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return null}},e.ks=function(){try{return(new Date).getTimezoneOffset()}catch(t){return null}},e.ws=s},3843:(t,e,i)=>{$Q(e),e.Ts=e.pn=void 0;const u=i(6914),a=i(7574),n=1e3,s=100,l=50;function r(t,e){return t?t.length>e?t.substring(0,e)+"...":t:null}function c(t){var e={},i=Array.from(t.classList);return e.classList=0<i.length?i.slice(0,s):null,e.class=(r(t.getAttribute("class"),n)||"").replace(/\s+/g," ").trim(),e.id=r(t.getAttribute("id"),n),e.ariaLabel=r(t.getAttribute("aria-label"),n),e.selector=function(e){if(!e)return"";if(!e.parentNode){var i=e.tagName.toLowerCase();if(e.id)return"#"+e.id;let t=i;return e.className&&"string"==typeof e.className&&0<(i=e.className.trim().split(/\s+/)).length&&""!==i[0]&&(t+="."+i.join(".")),t}var t=[];let n=e,s=0;for(;n&&n.nodeType===Node.ELEMENT_NODE&&s<l;){var r=function(n){var t=n.tagName.toLowerCase();if(n.id)return"#"+n.id;let s=t;n.className&&"string"==typeof n.className&&0<(t=n.className.trim().split(/\s+/)).length&&""!==t[0]&&(s+="."+t.join("."));t=n.parentElement;if(t&&1<t.children.length){let t=1,e=1,i=n.previousElementSibling;for(;i;)t++,i.tagName===n.tagName&&e++,i=i.previousElementSibling;s+=`:nth-child(${t})`,(1<e||function(t){let e=t.nextElementSibling;for(;e;){if(e.tagName===t.tagName)return 1;e=e.nextElementSibling}return}(n))&&(s+=`:nth-of-type(${e})`)}return s}(n);if(t.unshift(r),n.id)break;if((n=n.parentElement)&&"body"===n.tagName.toLowerCase())break;s++}return t.join(" > ")}(t),e}e.pn=function(t){var e,i,n,s=t.tagName.toLowerCase(),r={},l=(0,u.Gt)()||"",o=(r.tagName=s,c(t));return $P(r,o),"form"===s&&$P(r,((o={}).action=(e=t).getAttribute("action"),o.method=null!=(i=e.getAttribute("method"))?i:"GET",o.formName=e.getAttribute("name"),o.formId=e.getAttribute("id"),o)),["input","select","textarea"].includes(s)&&"password"!==t.getAttribute("type")&&$P(r,((i={}).content=(e=t).value,i.inputName=e.getAttribute("name"),i)),(o=(0,a.ws)(t))&&$P(r,((n={}).href=o.getAttribute("href"),n)),"button"!==s&&!o||$P(r,((n={}).content=((s=o||t).textContent||"").trim(),s=function(t){var e={};if(t){var i=null==t?void 0:t.dataset;if(i)for(const n in i)e["data-"+n]=i[n]||""}return e}(s),$P(n,s),n)),{value:l,metadata:r}},e.Ts=c},1964:(t,e,i)=>{$Q(e),e.StatsigAutoCapturePlugin=e.runStatsigAutoCapture=e.AutoCapture=e.AutoCaptureEventName=void 0;var n=i(6914);const s=i(4535);$Q2(e,"AutoCapture",{enumerable:!0,get:function(){return s.AutoCapture}}),$Q2(e,"StatsigAutoCapturePlugin",{enumerable:!0,get:function(){return s.StatsigAutoCapturePlugin}}),$Q2(e,"runStatsigAutoCapture",{enumerable:!0,get:function(){return s.runStatsigAutoCapture}});var r=i(5423),i=($Q2(e,"AutoCaptureEventName",{enumerable:!0,get:function(){return r.AutoCaptureEventName}}),$P((0,n.l)(),{AutoCapture:s.AutoCapture,runStatsigAutoCapture:s.runStatsigAutoCapture,StatsigAutoCapturePlugin:s.StatsigAutoCapturePlugin}));e.default=i},4090:(t,e,i)=>{$Q(e),e.vs=e.ds=e.Ms=void 0;const r=i(6914),l=i(7574);function o(t){var e=(0,r.de)(),i=(0,r.te)();return(0,l.Rs)($P({title:null==e?void 0:e.title,current_url:null==(e=null==i?void 0:i.location)?void 0:e.href,user_agent:null!=(e=null==i?void 0:i.navigator)&&e.userAgent&&200<(null==(e=null==(e=null==i?void 0:i.navigator)?void 0:e.userAgent)?void 0:e.length)?i.navigator.userAgent.substring(0,200):null==(e=null==i?void 0:i.navigator)?void 0:e.userAgent,locale:null==(e=null==i?void 0:i.navigator)?void 0:e.language,hostname:t.hostname,pathname:t.pathname,screen_width:null==(e=null==i?void 0:i.screen)?void 0:e.width,screen_height:null==(t=null==i?void 0:i.screen)?void 0:t.height,viewport_width:null==i?void 0:i.innerWidth,viewport_height:null==i?void 0:i.innerHeight,timestamp:Date.now(),timezone:(0,l.Es)(),timezone_offset:(0,l.ks)()},n()))}function n(){var t=(0,l.kn)(),e={};return void 0!==(null==t?void 0:t.effectiveType)&&(e.effective_connection_type=t.effectiveType),void 0!==(null==t?void 0:t.rtt)&&(e.rtt_ms=t.rtt),void 0!==(null==t?void 0:t.downlink)&&(e.downlink_mbps=t.downlink,e.downlink_kbps=1e3*t.downlink),void 0!==(null==t?void 0:t.saveData)&&(e.save_data=t.saveData),e}e.Ms=o,e.ds=function(t){var e=(0,r.de)(),i=(0,r.te)();if(!e||!i)return{};var i=function(t){t=(null==t?void 0:t.referrer)||"";if(!t)return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""};try{var e=new URL(t);const s=e.hostname;var i=["google","bing","yahoo","duckduckgo","baidu"].find(t=>s.includes(t+"."))||"",n=e.searchParams.get("yahoo"===i?"p":"q")||"";return{referrer:t,referrer_domain:e.hostname,referrer_path:e.pathname,searchEngine:i,searchQuery:n}}catch(t){return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""}}}(e),e=o(t),n=function(t){const i=t.searchParams,n={};return["utm_source","utm_medium","utm_campaign","utm_term","utm_content","msclkid","dclid","fbclid","gad_source","gclid","gclsrc","wbraid","utm_id","irclid","igshid","_kx","li_fat_id","mc_cid","mc_eid","epik","qclid","rdt_cid","sccid","ttc","ttclid","ttc_id","twclid"].forEach(t=>{var e=i.get(t);e&&(n[t]=e)}),n}(t);const s={};return t.searchParams.forEach((t,e)=>{s[e]=t}),$P($P({},e),(0,l.Rs)($P($P($P({},i),n),s)))},e.vs=n}},n={};function s(t){var e=n[t];return void 0!==e||(e=n[t]={exports:{}},i[t].call(e.exports,e,e.exports,s)),e.exports}s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();var t={};{var e=t,r=s(6914);const o=s(3447),u=s(1964);var l=s(2016),r=(0,r.l)();e.default=r,l.AutoInit.attempt(({client:t})=>{new o.SessionReplay(t),new u.AutoCapture(t)})}return t.default})());
1
+ var $Q=(e)=>Object.defineProperty(e,"__esModule",{value:!0});var $Q2=(a,b,c)=>Object.defineProperty(a,b,c);var $P=(a,b)=>Object.assign(a,b);var $A=()=>((t,r,u,l)=>{return new(u=u||Promise)(function(n,e){function i(t){try{s(l.next(t))}catch(t){e(t)}}function o(t){try{s(l.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(i,o)}s((l=l.apply(t,r||[])).next())})});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).webVitals={})}(this,(function(e){"use strict";let t=-1;const n=e=>{addEventListener("pageshow",(n=>{n.persisted&&(t=n.timeStamp,e(n))}),!0)},i=(e,t,n,i)=>{let o,s;return r=>{t.value>=0&&(r||i)&&(s=t.value-(o??0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},o=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},r=()=>{const e=s();return e?.activationStart??0},c=(e,n=-1)=>{const i=s();let o="navigate";t>=0?o="back-forward-cache":i&&(document.prerendering||r()>0?o="prerender":document.wasDiscarded?o="restore":i.type&&(o=i.type.replace(/_/g,"-")));return{name:e,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},a=new WeakMap;function d(e,t){return a.get(e)||a.set(e,new t),a.get(e)}class h{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const f=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return i.observe({type:e,buffered:!0,...n}),i}}catch{}},u=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let l=-1;const m=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,p=e=>{"hidden"===document.visibilityState&&l>-1&&(l="visibilitychange"===e.type?e.timeStamp:0,v())},g=()=>{addEventListener("visibilitychange",p,!0),addEventListener("prerenderingchange",p,!0)},v=()=>{removeEventListener("visibilitychange",p,!0),removeEventListener("prerenderingchange",p,!0)},y=()=>{if(l<0){const e=r(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter((t=>"hidden"===t.name&&t.startTime>e))[0]?.startTime;l=t??m(),g(),n((()=>{setTimeout((()=>{l=m(),g()}))}))}return{get firstHiddenTime(){return l}}},b=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},T=[1800,3e3],P=(e,t={})=>{b((()=>{const s=y();let a,d=c("FCP");const h=f("paint",(e=>{for(const t of e)"first-contentful-paint"===t.name&&(h.disconnect(),t.startTime<s.firstHiddenTime&&(d.value=Math.max(t.startTime-r(),0),d.entries.push(t),a(!0)))}));h&&(a=i(e,d,T,t.reportAllChanges),n((n=>{d=c("FCP"),a=i(e,d,T,t.reportAllChanges),o((()=>{d.value=performance.now()-n.timeStamp,a(!0)}))})))}))},E=[.1,.25];let _=0,L=1/0,M=0;const C=e=>{for(const t of e)t.interactionId&&(L=Math.min(L,t.interactionId),M=Math.max(M,t.interactionId),_=M?(M-L)/7+1:0)};let I;const w=()=>I?_:performance.interactionCount??0,F=()=>{"interactionCount"in performance||I||(I=f("event",C,{type:"event",buffered:!0,durationThreshold:0}))};let k=0;class x{u=[];l=new Map;m;p;v(){k=w(),this.u.length=0,this.l.clear()}T(){const e=Math.min(this.u.length-1,Math.floor((w()-k)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort(((e,t)=>t.P-e.P)),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id)}this.p?.(n)}}}const A=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=u(e),document.addEventListener("visibilitychange",e,{once:!0}),t((()=>{e(),document.removeEventListener("visibilitychange",e)})))},B=[200,500];class N{m;h(e){this.m?.(e)}}const S=[2500,4e3],q=[800,1800],O=e=>{document.prerendering?b((()=>O(e))):"complete"!==document.readyState?addEventListener("load",(()=>O(e)),!0):setTimeout(e)};e.CLSThresholds=E,e.FCPThresholds=T,e.INPThresholds=B,e.LCPThresholds=S,e.TTFBThresholds=q,e.onCLS=(e,t={})=>{P(u((()=>{let s,r=c("CLS",0);const a=d(t,h),u=e=>{for(const t of e)a.h(t);a.i>r.value&&(r.value=a.i,r.entries=a.o,s())},l=f("layout-shift",u);l&&(s=i(e,r,E,t.reportAllChanges),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&(u(l.takeRecords()),s(!0))})),n((()=>{a.i=0,r=c("CLS",0),s=i(e,r,E,t.reportAllChanges),o((()=>s()))})),setTimeout(s))})))},e.onFCP=P,e.onINP=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&b((()=>{F();let o,s=c("INP");const r=d(t,x),a=e=>{A((()=>{for(const t of e)r.h(t);const t=r.T();t&&t.P!==s.value&&(s.value=t.P,s.entries=t.entries,o())}))},h=f("event",a,{durationThreshold:t.durationThreshold??40});o=i(e,s,B,t.reportAllChanges),h&&(h.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&(a(h.takeRecords()),o(!0))})),n((()=>{r.v(),s=c("INP"),o=i(e,s,B,t.reportAllChanges)})))}))},e.onLCP=(e,t={})=>{b((()=>{const s=y();let a,h=c("LCP");const l=d(t,N),m=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)l.h(t),t.startTime<s.firstHiddenTime&&(h.value=Math.max(t.startTime-r(),0),h.entries=[t],a())},p=f("largest-contentful-paint",m);if(p){a=i(e,h,S,t.reportAllChanges);const s=u((()=>{m(p.takeRecords()),p.disconnect(),a(!0)}));for(const e of["keydown","click","visibilitychange"])addEventListener(e,(()=>A(s)),{capture:!0,once:!0});n((n=>{h=c("LCP"),a=i(e,h,S,t.reportAllChanges),o((()=>{h.value=performance.now()-n.timeStamp,a(!0)}))}))}}))},e.onTTFB=(e,t={})=>{let o=c("TTFB"),a=i(e,o,q,t.reportAllChanges);O((()=>{const d=s();d&&(o.value=Math.max(d.responseStart-r(),0),o.entries=[d],a(!0),n((()=>{o=c("TTFB",0),a=i(e,o,q,t.reportAllChanges),a(!0)})))}))}}));
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Statsig=e():t.Statsig=e()}(this,()=>{return i={1845:(t,i,e)=>{"use strict";var s;Object.defineProperty(i,"__esModule",{value:!0}),i.t=i.i=i.l=void 0;const r=e(7512);i.l=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:l}catch(t){return l}},i.i=t=>(0,i.l)()[t];i.t=t=>{var e=(0,i.l)();return t?e.instances&&e.instances[t]:(e.instances&&1<Object.keys(e.instances).length&&r.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),e.firstInstance)};var n="__STATSIG__",o="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},a="undefined"!=typeof globalThis?globalThis:{};const l=null!=(s=null!=(s=null!=(s=o[n])?s:e[n])?s:a[n])?s:{instance:i.t};o[n]=l,e[n]=l,a[n]=l},2137:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.o=e.u=void 0;const r=i(1406);function s(t,e,i){if(i)return i(t,e);const s=e&&e.customIDs?e.customIDs:{};e=["uid:"+(null!=(i=null==e?void 0:e.userID)?i:""),"cids:"+Object.keys(s).sort((t,e)=>t.localeCompare(e)).map(t=>t+"-"+s[t]).join(","),"k:"+t];return(0,r.h)(e.join("|"))}e.u=s,e.o=function(t,e,i){return e?s(t,e,i):(0,r.h)("k:"+t)}},6427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},694:function(t,e,i){"use strict";var r=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.Wn=e.DataAdapterCore=void 0;const l=i(7512),h=i(9122),n=i(8578),o=i(4534),u=i(3401);function c(t,e,i,s){return{source:t,data:e,receivedAt:Date.now(),stableID:i,fullUserHash:(0,n.v)(s)}}e.DataAdapterCore=class{constructor(t,e){this._=t,this.p=e,this.m=null,this.O=null,this.j="statsig.last_modified_time."+e,this.S=new s}attach(t,e,i){this.O=t,this.m=e}getDataSync(t){var t=t&&(0,n.T)(t,this.m),e=this.k(t),i=this.S.get(e,t);return i&&this.Li(i)?i:(i=this.I(e))&&this.Li(i)?(this.S.add(e,i),this.S.get(e,t)):null}setData(t,e){var e=e&&(0,n.T)(e,this.m),i=this.k(e);this.S.add(i,c("Bootstrap",t,null,e))}Li(t){return null==t.stableID||t.stableID===h.StableID.get(this.C())}D(e,i,s){return r(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());var t=null!=e?e:this.getDataSync(i),t=[this.M(t,i,s)];return null!=s&&s.timeoutMs&&t.push(new Promise(t=>setTimeout(t,s.timeoutMs)).then(()=>(l.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}A(i,s){return r(this,void 0,void 0,function*(){var t=i&&(0,n.T)(i,this.m),e=this.k(t),t=yield this.D(null,t,s);t&&this.S.add(e,Object.assign(Object.assign({},t),{source:"Prefetch"}))})}M(n,o,a){return r(this,void 0,void 0,function*(){var t=null!=(t=null==n?void 0:n.data)?t:null,e=null!=n&&this.N(n,o),e=yield this.R(t,o,a,e);if(!e)return l.Log.debug("No response returned for latest value"),null;var i=(0,u.P)(e,"has_updates","Response"),s=this.C(),s=h.StableID.get(s);let r=null;if(!0===(null==i?void 0:i.has_updates))r=c("Network",e,s,o);else{if(!t||!1!==(null==i?void 0:i.has_updates))return null;r=c("NetworkNotModified",t,s,o)}e=this.k(o);return this.S.add(e,r),this.U(e,r),r})}C(){return null!=this.O?this.O:(l.Log.error(this._+" is not attached to a Client"),"")}I(t){var e=null==(e=o.Storage.getItem)?void 0:e.call(o.Storage,t);return null!=e&&(t=(0,u.P)(e,"source","Cached Result"))?Object.assign(Object.assign({},t),{source:"Cache"}):null}U(t,e){o.Storage.setItem(t,JSON.stringify(e)),this.F(t)}F(t){var e=null!=(e=(0,o.G)(this.j))?e:{},t=(e[t]=Date.now(),a(e,10));t&&(delete e[t],o.Storage.removeItem(t)),(0,o.L)(this.j,e)}},e.Wn=c;class s{constructor(){this.K={}}get(t,e){var t=this.K[t],i=null==t?void 0:t.stableID,e=null==(e=null==e?void 0:e.customIDs)?void 0:e.stableID;return e&&i&&e!==i?(l.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e){var i=a(this.K,9);i&&delete this.K[i],this.K[t]=e}merge(t){this.K=Object.assign(Object.assign({},this.K),t)}}function a(r,t){var e=Object.keys(r);return e.length<=t?null:e.reduce((t,e)=>{var i=r[t],s=r[e];return"object"==typeof i&&"object"==typeof s?s.receivedAt<i.receivedAt?e:t:s<i?e:t})}},8962:(t,o)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Diagnostics=void 0;const s=new Map,i="start";function r(t,e,i,s){return Object.assign({key:i,action:e,step:s,timestamp:Date.now()},t)}function n(t,e){var i=null!=(i=s.get(t))?i:[];i.push(e),s.set(t,i)}function e(t,e){if(e in t)return t[e]}o.Diagnostics={q:t=>s.get(t),B:t=>{n(t,r({},i,"overall"))},V:(t,e,i)=>{n(t,r({success:e,error:e?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:i},"end","overall"))},J:(t,e)=>{n(t,r(e,i,"initialize","network_request"))},$:(t,e)=>{n(t,r(e,"end","initialize","network_request"))},W:t=>{n(t,r({},i,"initialize","process"))},H:(t,e)=>{n(t,r(e,"end","initialize","process"))},Y:t=>{s.delete(t)},X(t){if(t&&"object"==typeof t)return{code:e(t,"code"),name:e(t,"name"),message:e(t,"message")}},Z(t,e,i,s){return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null==(t=null==t?void 0:t.headers)?void 0:t.get("x-statsig-region"),isDelta:!0===i.includes('"is_delta":true')||void 0,attempt:e,error:o.Diagnostics.X(s)}},tt(t,e,i,s){var r,n=o.Diagnostics.q(i);return null==n||n.length<=0?-1:(r=n[n.length-1].timestamp-n[0].timestamp,o.Diagnostics.Y(i),i=function(t,e){t={eventName:"statsig::diagnostics",user:t,value:null,metadata:e,time:Date.now()};return t}(t,{context:"initialize",markers:n.slice(),statsigOptions:s}),e.enqueue(i),r)}}},8809:function(t,e){"use strict";var i=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.et=void 0;const r=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),n="https://cloudflare-dns.com/dns-query",o=["i","e","d"],a=200;e.et=function(e){return i(this,void 0,void 0,function*(){var i=yield e(n,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:r});if(i.ok){var t,i=yield i.arrayBuffer(),i=new Uint8Array(i);{var s=i,i=s.findIndex((t,e)=>e<a&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(s[e-1])));if(-1===i)throw(t=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",t;let e="";for(let t=i-1;t<s.length;t++)e+=String.fromCharCode(s[t]);return e.split(",")}}throw(t=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",t})}},3539:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},5542:function(t,a,e){"use strict";var i=this&&this.__awaiter||$A();Object.defineProperty(a,"__esModule",{value:!0}),a.ErrorBoundary=a.EXCEPTION_ENDPOINT=void 0;const s=e(7512),l=e(5902),h=e(8e3),u=(a.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function c(t){return t instanceof Error?t:"string"==typeof t?new Error(t):new Error("An unknown error occurred.")}a.ErrorBoundary=class{constructor(t,e,i,s){this.O=t,this.m=e,this.nt=i,this.qn=s,this.it=new Set}wrap(s){try{const t=s;!function(t){const e=new Set;let i=Object.getPrototypeOf(t);for(;i&&i!==Object.prototype;)Object.getOwnPropertyNames(i).filter(t=>"function"==typeof(null===i||void 0===i?void 0:i[t])).forEach(t=>e.add(t)),i=Object.getPrototypeOf(i);return Array.from(e)}(t).forEach(e=>{const i=t[e];"$EB"in i||(t[e]=(...t)=>this.rt(e,()=>i.apply(s,t)),t[e].$EB=!0)})}catch(t){this.st("eb:wrap",t)}}logError(t,e){this.st(t,e)}getLastSeenErrorAndReset(){var t=this.qn;return this.qn=void 0,null!=t?t:null}attachErrorIfNoneExists(t){this.qn||(this.qn=c(t))}rt(e,t){try{var i=t();return i&&i instanceof Promise?i.catch(t=>this.st(e,t)):i}catch(t){return this.st(e,t),null}}st(n,o){try{s.Log.warn("Caught error in "+n,{error:o});i(this,void 0,void 0,function*(){var t,e=o||Error(u),i=e instanceof Error,s=i?e.name:"No Name",r=c(e);this.qn=r,this.it.has(s)||(this.it.add(s),null!=(r=null==(r=this.m)?void 0:r.networkConfig)&&r.preventAllNetworkTraffic?null!=(r=this.nt)&&r.call(this,{name:"error",error:o,tag:n}):(r=l.SDKType.lt(this.O),t=h.StatsigMetadataProvider.get(),i=i?e.stack:function(t){try{return JSON.stringify(t)}catch(t){return u}}(e),e=Object.assign({tag:n,exception:s,info:i,statsigOptions:function(t){if(!t)return{};const i={};return Object.entries(t).forEach(([t,e])=>{switch(typeof e){case"number":case"bigint":case"boolean":i[String(t)]=e;break;case"string":e.length<50?i[String(t)]=e:i[String(t)]="set";break;case"object":"environment"===t?i.environment=e:"networkConfig"===t?i.networkConfig=e:i[String(t)]=null!=e?"set":"unset"}}),i}(this.m)},Object.assign(Object.assign({},t),{sdkType:r})),yield(null!=(s=null==(i=null==(s=this.m)?void 0:s.networkConfig)?void 0:i.networkOverrideFunc)?s:fetch)(a.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this.O,"STATSIG-SDK-TYPE":String(r),"STATSIG-SDK-VERSION":String(t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(e)}),null!=(i=this.nt)&&i.call(this,{name:"error",error:o,tag:n})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},2922:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2417:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7770:function(t,e,i){"use strict";var s=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.EventLogger=void 0;const r=i(2137),n=i(1406),o=i(7512),a=i(7410),l=i(6830),h=i(1637),u=i(586),c=i(4534),d=i(1881),f=i(2397),v={},p={Startup:"startup",GainedFocus:"gained_focus"};class m{static ot(t){null!=(t=v[t])&&t.flush().catch(()=>{})}static ut(t){null!=(t=v[t])&&t.ct(p.GainedFocus)}constructor(t,e,i,s){this.O=t,this.nt=e,this.ht=i,this.m=s,this.dt=[],this.vt={},this.ft={},this._t=!1,this.gt=Date.now(),this.Yn=null!=(t=null==s?void 0:s.loggingEnabled)?t:!0===(null==s?void 0:s.disableLogging)?u.LoggingEnabledOption.disabled:u.LoggingEnabledOption.browserOnly,null!=s&&s.loggingEnabled&&void 0!==s.disableLogging&&o.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this.yt=null!=(e=null==s?void 0:s.loggingBufferMaxSize)?e:100;i=null==s?void 0:s.networkConfig;this.Ot=new d.UrlConfiguration(a.Endpoint.jt,null==i?void 0:i.logEventUrl,null==i?void 0:i.api,null==i?void 0:i.logEventFallbackUrls)}setLogEventCompressionMode(t){this.ht.setLogEventCompressionMode(t)}setLoggingEnabled(t){this.Yn=t}enqueue(t){this.St(t)&&(this.wt(t),this.Tt(),this.dt.length>this.yt)&&m.ot(this.O)}incrementNonExposureCount(t){var e=null!=(e=this.ft[t])?e:0;this.ft[t]=e+1}reset(){this.flush().catch(()=>{}),this.vt={}}start(){var t,e=(0,l.kt)();e&&"always"!==(null==(t=this.m)?void 0:t.loggingEnabled)||(v[this.O]=this,e||(0,f.It)(t=>{"background"===t?m.ot(this.O):"foreground"===t&&m.ut(this.O)}),this.ct(p.Startup),this.Dt())}stop(){return s(this,void 0,void 0,function*(){this.Et&&(clearInterval(this.Et),this.Et=null),delete v[this.O],yield this.flush()})}flush(){return s(this,void 0,void 0,function*(){var t;this.Mt(),0!==this.dt.length&&(t=this.dt,this.dt=[],yield this.At(t))})}Tt(){this._t||(this._t=!0,200<Date.now()-this.gt)||setTimeout(()=>m.ot(this.O),200)}St(t){if("always"!==(null==(e=this.m)?void 0:e.loggingEnabled)&&(0,l.kt)())return!1;if((0,h.xt)(t)){var e=t.user||{statsigEnvironment:void 0},e=(0,r.u)(this.O,e),i=t.metadata||{},t=[t.eventName,e,i.gate,i.config,i.ruleID,i.allocatedExperiment,i.parameterName,String(i.isExplicitParameter),i.reason].join("|"),e=this.vt[t],i=Date.now();if(e&&i-e<6e5)return!1;1e3<Object.keys(this.vt).length&&(this.vt={}),this.vt[t]=i}return!0}At(r){return s(this,void 0,void 0,function*(){var t,e;if("disabled"===this.Yn)return this.Nt(r),!1;try{var i=(0,f.Rt)()&&this.ht.isBeaconSupported()&&null==(null==(e=null==(t=this.m)?void 0:t.networkConfig)?void 0:e.networkOverrideFunc),s=(this.nt({name:"pre_logs_flushed",events:r}),i?this.Pt(r):yield this.Ct(r));return s.success?(this.nt({name:"logs_flushed",events:r}),!0):(o.Log.warn("Failed to flush events."),this.Nt(r),!1)}catch(t){return o.Log.warn("Failed to flush events."),!1}})}Ct(e){return s(this,void 0,void 0,function*(){var t=yield this.ht.post(this.Ut(e)),t=null!=(t=null==t?void 0:t.code)?t:-1;return{success:200<=t&&t<300}})}Pt(t){return{success:this.ht.beacon(this.Ut(t))}}Ut(t){return{sdkKey:this.O,data:{events:t},urlConfig:this.Ot,retries:3,isCompressable:!0,params:{[a.NetworkParam.EventCount]:String(t.length)},credentials:"same-origin"}}Nt(t){for(;500<t.length;)t.shift();var e=this.o();try{(0,c.L)(e,t)}catch(t){o.Log.warn("Unable to save failed logs to storage")}}ct(e){const i=this.o();s(this,void 0,void 0,function*(){c.Storage.isReady()||(yield c.Storage.isReadyResolver());var t=(0,c.G)(i);t&&(e===p.Startup&&c.Storage.removeItem(i),yield this.At(t))&&e===p.GainedFocus&&c.Storage.removeItem(i)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,n.h)(this.O)}wt(t){t.user&&(t.user=Object.assign({},t.user),delete t.user.privateAttributes);var e={},i=this.Ft(),i=(i&&(e.statsigMetadata={currentPage:i}),Object.assign(Object.assign({},t),e));o.Log.debug("Enqueued Event:",i),this.dt.push(i)}Mt(){0!==Object.keys(this.ft).length&&(this.wt({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this.ft)}}),this.ft={})}Ft(){var t;if(!1!==(null==(t=this.m)?void 0:t.includeCurrentPageUrlWithEvents))return(0,l.Gt)()}Dt(){var t=null!=(t=null==(t=this.m)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{var t=v[this.O];t&&t.Et===e?m.ot(this.O):clearInterval(e)},t);this.Et=e}}e.EventLogger=m},1406:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Lt=n.Kt=n.h=void 0;const o=e(6634);n.h=e=>{let i=0;for(let t=0;t<e.length;t++){var s=e.charCodeAt(t);i=(i<<5)-i+s,i&=i}return String(i>>>0)},n.Kt=(t,e)=>(0,n.h)(JSON.stringify((0,n.Lt)(t,e)));n.Lt=(i,s)=>{if(null==i)return null;var t=Object.keys(i).sort();const r={};return t.forEach(t=>{var e=i[t];0===s||"object"!==(0,o.zt)(e)?r[t]=e:r[t]=(0,n.Lt)(e,null!=s?s-1:s)}),r}},1333:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7512:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Log=e.LogLevel=void 0;function i(t){return t.unshift("[Statsig]"),t}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class s{static info(...t){s.level>=e.LogLevel.Info&&console.info(" INFO ",...i(t))}static debug(...t){s.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...i(t))}static warn(...t){s.level>=e.LogLevel.Warn&&console.warn(" WARN ",...i(t))}static error(...t){s.level>=e.LogLevel.Error&&console.error(" ERROR ",...i(t))}}(e.Log=s).level=e.LogLevel.Warn},7787:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMemoKey=e.MemoPrefix=void 0,e.MemoPrefix={Kn:"g",Ln:"c",Vn:"e",$n:"l",Bn:"p"};const n=new Set([]),o=new Set(["userPersistedValues"]);e.createMemoKey=function(t,e,i){let s=t+"|"+e;if(i)for(const r of Object.keys(i)){if(o.has(r))return;n.has(r)?s+=`|${r}=true`:s+=`|${r}=`+i[r]}return s}},7410:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={qt:"initialize",jt:"rgstr",Bt:"download_config_specs"},e.NetworkDefault={[e.Endpoint.jt]:"https://prodregistryv2.org/v1",[e.Endpoint.qt]:"https://featureassets.org/v1",[e.Endpoint.Bt]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(t,e,i){"use strict";var w=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkCore=void 0,i(1845);const f=i(1845),S=i(8962),I=i(7512),C=i(7410),s=i(308),v=i(3091),o=i(5902),r=i(6830),a=i(4143),l=i(9122),k=i(2636),h=i(8e3),p=i(586),_=i(2397),O=500,A=3e4;const M=new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(t,e){this.nt=e,this.$t=null,this.Vt=1e4,this.Jt={},this.m={},this.Oi={},this.Jn=null,t&&(this.m=t),this.m.networkConfig&&(this.Jt=this.m.networkConfig),this.Jt.networkTimeoutMs&&(this.Vt=this.Jt.networkTimeoutMs),this.Wt=new s.NetworkFallbackResolver(this.m),this.setLogEventCompressionMode(this.Qn(t))}setLogEventCompressionMode(t){this.m.logEventCompressionMode=t}setErrorBoundary(t){this.$t=t,this.$t.wrap(this),this.$t.wrap(this.Wt),this.Wt.setErrorBoundary(t)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var t=this.Jn;return this.Jn=null,t}beacon(t){var e,i;return!!j(t)&&(t=this.Ht("POST",t),e=this.Xt(t),(i=navigator).sendBeacon.bind(i)(e,t.body))}post(e){return w(this,void 0,void 0,function*(){var t=this.Ht("POST",e);return this.Pi(t),yield this.Ci(t),this.Zt(t)})}get(t){t=this.Ht("GET",t);return this.Zt(t)}Zt(y){return w(this,void 0,void 0,function*(){var e;if(!j(y))return null;if(this.Jt.preventAllNetworkTraffic)return null;var{method:i,body:s,retries:r,attempt:n}=y,o=y.urlConfig.endpoint;if(this.Si(o))return I.Log.warn(`Request to ${o} was blocked because you are making requests too frequently.`),null;n=null!=n?n:1;const a="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>{null!==a&&void 0!==a&&a.abort(`Timeout of ${this.Vt}ms expired.`)},this.Vt),l=this.Xt(y);let h=null;var u,c=(0,_.Rt)();try{var d,f,v,p={method:i,body:s,headers:Object.assign({},y.headers),signal:null===a||void 0===a?void 0:a.signal,priority:y.priority,keepalive:c},m=(u=n,(b=y).urlConfig.endpoint===C.Endpoint.qt&&S.Diagnostics.J(b.sdkKey,{attempt:u}),this.Oi[o]),g=(m&&(m.lastRequestTime=Date.now(),this.Oi[o]=m),null!=(e=this.Jt.networkOverrideFunc)?e:fetch);if(h=yield g(l,p),clearTimeout(t),h.ok)return v=yield h.text(),R(y,h,n,v),this.Wt.tryBumpExpiryTime(y.sdkKey,y.urlConfig),{body:v,code:h.status};throw d=yield h.text().catch(()=>"No Text"),(f=new Error(`NetworkError: ${l} `+d)).name="NetworkError",f}catch(t){var s=function(t,e){if(null!=t&&t.signal.aborted&&"string"==typeof t.signal.reason)return t.signal.reason;if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(a,t),c=function(t){t=(null==t?void 0:t.signal.aborted)&&"string"==typeof t.signal.reason&&t.signal.reason.includes("Timeout");return t||!1}(a),b=(R(y,h,n,"",t),yield this.Wt.tryFetchUpdatedFallbackInfo(y.sdkKey,y.urlConfig,s,c));return(b&&(y.fallbackUrl=this.Wt.getActiveFallbackUrl(y.sdkKey,y.urlConfig)),!r||r<n||!M.has(null!=(u=null===h||void 0===h?void 0:h.status)?u:500))?(null!=(o=this.nt)&&o.call(this,{name:"error",error:t,tag:k.ErrorTag.NetworkError,requestArgs:y}),m=`A networking error occurred during ${i} request to ${l}.`,I.Log.error(m,s,t),null!=(e=this.$t)&&e.attachErrorIfNoneExists(m),null):(yield function(e){return w(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(O*(e*e),A)))})}(n),this.Zt(Object.assign(Object.assign({},y),{retries:r,attempt:n+1})))}})}Qn(t){let e=null==t?void 0:t.logEventCompressionMode;return e=(e=e||!0!==(null==t?void 0:t.disableCompression)?e:p.LogEventCompressionMode.Disabled)||p.LogEventCompressionMode.Enabled}Si(t){var e=Date.now(),i=null!=(i=this.Oi[t])?i:{count:0,lastRequestTime:e},s=e-i.lastRequestTime,s=Math.floor(.05*s);return i.count=Math.max(0,i.count-s),50<=i.count||(i.count+=1,i.lastRequestTime=e,this.Oi[t]=i,!1)}Xt(t){var e=null!=(e=t.fallbackUrl)?e:t.urlConfig.getUrl();t.urlConfig.endpoint!==C.Endpoint.qt&&t.urlConfig.endpoint!==C.Endpoint.Bt||(this.Jn=e);const i=Object.assign({[C.NetworkParam.SdkKey]:t.sdkKey,[C.NetworkParam.SdkType]:o.SDKType.lt(t.sdkKey),[C.NetworkParam.SdkVersion]:h.SDK_VERSION,[C.NetworkParam.Time]:String(Date.now()),[C.NetworkParam.SessionID]:a.SessionID.get(t.sdkKey)},t.params);t=Object.keys(i).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(i[t])).join("&");return e+(t?"?"+t:"")}Pi(e){var t,i=(0,r.te)(),s=e.body;if(e.isStatsigEncodable&&!this.m.disableStatsigEncoding&&"string"==typeof s&&null==(0,f.i)("no-encode")&&null!=i&&i.btoa)try{e.body=i.btoa(s).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[C.NetworkParam.StatsigEncoded]:"1"})}catch(t){I.Log.warn("Request encoding failed for "+e.urlConfig.getUrl(),t)}}Ci(d){return w(this,void 0,void 0,function*(){var e,i=d.body;if("string"==typeof i&&function(t,e){if(!t.isCompressable)return;if(null!=(0,f.i)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var i=null!=t.urlConfig.customUrl||null!=t.urlConfig.fallbackUrls,s=!0===v.SDKFlags.get(t.sdkKey,"enable_log_event_compression");switch(e.logEventCompressionMode){case p.LogEventCompressionMode.Disabled:return;case p.LogEventCompressionMode.Enabled:return i&&!s?void 0:1;case p.LogEventCompressionMode.Forced:return 1;default:return}}(d,this.m))try{for(var s,r=(new TextEncoder).encode(i),n=new CompressionStream("gzip"),o=n.writable.getWriter(),a=(o.write(r).catch(I.Log.error),o.close().catch(I.Log.error),n.readable.getReader()),l=[];!(s=yield a.read()).done;)l.push(s.value);var h=l.reduce((t,e)=>t+e.length,0),u=new Uint8Array(h);let t=0;for(const c of l)u.set(c,t),t+=c.length;d.body=u,d.params=Object.assign(Object.assign({},null!=(e=d.params)?e:{}),{[C.NetworkParam.IsGzipped]:"1"})}catch(t){I.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),t)}})}Ht(t,e){var i=this.Wt.getActiveFallbackUrl(e.sdkKey,e.urlConfig),t=Object.assign(Object.assign({},e),{method:t,fallbackUrl:i});return"data"in e&&n(t,e.data),t}};const j=t=>!!t.sdkKey||(I.Log.warn("Unable to make request without an SDK key"),!1),n=(t,e)=>{var{sdkKey:i,fallbackUrl:s}=t,r=l.StableID.get(i),n=a.SessionID.get(i),i=o.SDKType.lt(i);t.body=JSON.stringify(Object.assign(Object.assign({},e),{statsigMetadata:Object.assign(Object.assign({},h.StatsigMetadataProvider.get()),{stableID:r,sessionID:n,sdkType:i,fallbackUrl:s})}))};function R(t,e,i,s,r){t.urlConfig.endpoint===C.Endpoint.qt&&S.Diagnostics.$(t.sdkKey,S.Diagnostics.Z(e,i,s,r))}},308:function(t,e,i){"use strict";var a=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.ee=e.NetworkFallbackResolver=void 0;const o=i(8809),s=i(1406),n=i(7512),l=i(4534);function h(t,e){t=null!=(t=null==t?void 0:t.toLowerCase())?t:"";return e||t.includes("uncaught exception")||t.includes("failed to fetch")||t.includes("networkerror when attempting to fetch resource")}function u(t){return"statsig.network_fallback."+(0,s.h)(t)}function c(t,e){t=u(t);e&&0!==Object.keys(e).length?l.Storage.setItem(t,JSON.stringify(e)):l.Storage.removeItem(t)}e.NetworkFallbackResolver=class{constructor(t){this.ne=null,this.$t=null,this.ie={},this.re=null==(t=t.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(t){this.$t=t}tryBumpExpiryTime(t,e){var i=null==(i=this.ne)?void 0:i[e.endpoint];i&&(i.expiryTime=Date.now()+6048e5,c(t,Object.assign(Object.assign({},this.ne),{[e.endpoint]:i})))}getActiveFallbackUrl(t,e){var i;if(null!=e.customUrl&&null!=e.fallbackUrls)return null;let s=this.ne;null==s&&(s=null!=(r=function(t){t=u(t),t=l.Storage.getItem(t);if(!t)return null;try{return JSON.parse(t)}catch(t){return n.Log.error("Failed to parse FallbackInfo"),null}}(t))?r:{},this.ne=s);var r=s[e.endpoint];return!r||Date.now()>(null!=(i=r.expiryTime)?i:0)||e.getChecksum()!==r.urlConfigChecksum?(delete s[e.endpoint],this.ne=s,c(t,this.ne),null):r.url||null}tryFetchUpdatedFallbackInfo(s,r,n,o){return a(this,void 0,void 0,function*(){var e,t,i;try{return h(n,o)?(t=null==r.customUrl&&null==r.fallbackUrls?yield this.se(r):r.fallbackUrls,!!(i=this.le(null==(e=this.ne)?void 0:e[r.endpoint],t))&&(this.oe(s,r,i),!0)):!1}catch(t){return null!=(e=this.$t)&&e.logError("tryFetchUpdatedFallbackInfo",t),!1}})}oe(t,e,i){var i={urlConfigChecksum:e.getChecksum(),url:i,expiryTime:Date.now()+6048e5,previous:[]},e=e.endpoint,s=null==(s=this.ne)?void 0:s[e],s=(s&&i.previous.push(...s.previous),10<i.previous.length&&(i.previous=[]),null==(s=null==(s=this.ne)?void 0:s[e])?void 0:s.url);null!=s&&i.previous.push(s),this.ne=Object.assign(Object.assign({},this.ne),{[e]:i}),c(t,this.ne)}se(n){return a(this,void 0,void 0,function*(){var t=this.ie[n.endpoint];if(t&&Date.now()<t)return null;this.ie[n.endpoint]=Date.now()+144e5;var e=[],t=yield(0,o.et)(null!=(t=this.re)?t:fetch),i=function(t){try{return new URL(t).pathname}catch(t){return null}}(n.defaultUrl);for(const r of t)if(r.startsWith(n.endpointDnsKey+"=")){var s=r.split("=");if(1<s.length){let t=s[1];t.endsWith("/")&&(t=t.slice(0,-1)),e.push("https://"+t+i)}}return e})}le(t,e){var i;if(null==e)return null;var s=new Set(null!=(i=null==t?void 0:t.previous)?i:[]),r=null==t?void 0:t.url;let n=null;for(const a of e){var o=a.endsWith("/")?a.slice(0,-1):a;if(!s.has(a)&&o!==r){n=o;break}}return n}},e.ee=h},1405:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},1361:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3091:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDKFlags=void 0;const i={};e.SDKFlags={setFlags:(t,e)=>{i[t]=e},get:(t,e)=>{return null!=(t=null==(t=i[t])?void 0:t[e])&&t}}},5902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDKType=void 0;const i={};let s;e.SDKType={lt:t=>{return(null!=(t=i[t])?t:"js-mono")+(null!==s&&void 0!==s?s:"")},ue(t,e){i[t]=e},ae(t){s&&"-react"!==s||(s="-"+t)}}},6830:(t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Hn=s.Gt=s.ce=s.he=s.kt=s.de=s.te=void 0;s.te=()=>"undefined"!=typeof window?window:null,s.de=()=>{var t=(0,s.te)();return null!=(t=null==t?void 0:t.document)?t:null},s.kt=()=>{var t;return null===(0,s.de)()&&(t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||t)},s.he=(t,e)=>{var i=(0,s.te)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},s.ce=(t,e)=>{var i=(0,s.de)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},s.Gt=()=>{var t;try{return null==(t=(0,s.te)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}};s.Hn=()=>{var t=(0,s.te)();return t&&"onpagehide"in t?"pagehide":"beforeunload"}},4143:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigSession=e.SessionID=void 0;const s=i(1845),r=i(2137),a=i(7512),l=i(4534),h=i(8023),u=18e5,c=144e5,d={};function f(e,t){return setTimeout(()=>{var t=null==(t=(0,s.l)())?void 0:t.instance(e);t&&t.$emt({name:"session_expired"})},t)}function v(t){return"statsig.session_id."+(0,r.o)(t)}e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:t=>{null==d[t]&&(d[t]=function(t){let e=function(t){t=v(t);return(0,l.G)(t)}(t);var i=Date.now();e=e||{sessionID:(0,h.getUUID)(),startTime:i,lastUpdate:i};return{data:e,sdkKey:t}}(t));var t=d[t],e=Date.now(),i=t.data,s=t.sdkKey,r=((function({lastUpdate:t}){return Date.now()-t>u}(i)||function({startTime:t}){return Date.now()-t>c}(i))&&(i.sessionID=(0,h.getUUID)(),i.startTime=e,o=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(s))&&o.$emt({name:"session_expired"}),i.lastUpdate=e,i),n=t.sdkKey;n=v(n);try{(0,l.L)(n,r)}catch(t){a.Log.warn("Failed to save SessionID")}clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID);var o=e-i.startTime;return t.idleTimeoutID=f(s,u),t.ageTimeoutID=f(s,c-o),t},overrideInitialSessionID:(t,e)=>{var i;d[e]=(t=t,e=e,i=Date.now(),{data:{sessionID:t,startTime:i,lastUpdate:i},sdkKey:e})}}},9122:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableID=void 0;const s=i(2137),r=i(7512),n=i(6830),o=i(4534),a=i(8023),l={},h={},u={};function c(t){return"statsig.stable_id."+(0,s.o)(t)}function d(t,e){e=c(e);try{(0,o.L)(e,t)}catch(t){r.Log.warn("Failed to save StableID to storage")}}function f(t,e){var i;h[e]&&document&&((i=new Date).setFullYear(i.getFullYear()+1),document.cookie=`${v(e)}=${encodeURIComponent(t)}; expires=${i.toUTCString()}; path=/`)}function v(t){return"statsig.stable_id."+(0,s.o)(t)}e.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:t=>{if(u[t])return null;if(null!=l[t])return l[t];let e=null;return null!=(e=function(t){if(h[t]&&null!=(0,n.de)())for(const s of document.cookie.split(";")){var[e,i]=s.trim().split("=");if(e===v(t))return decodeURIComponent(i)}return null}(t))?d(l[t]=e,t):(d(e=null==(e=function(t){t=c(t);return(0,o.G)(t)}(t))?(0,a.getUUID)():e,t),f(e,t),l[t]=e),e},setOverride:(t,e)=>{d(l[e]=t,e),f(t,e)},Xn:(t,e)=>{h[t]=e},_e:(t,e)=>{u[t]=e}}},1375:function(t,e,i){"use strict";var s=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClientBase=void 0,i(1845);const o=i(1845),a=i(5542),l=i(7770),h=i(7512),n=i(7787),u=i(6830),c=i(4143),d=i(9122),r=i(586),f=i(4534);e.StatsigClientBase=class{constructor(t,e,i,s){this.loadingStatus="Uninitialized",this.ve=null,this.fe={};var r,n=this.$emt.bind(this);null!=(null==s?void 0:s.logLevel)&&(h.Log.level=s.logLevel),null!=s&&s.disableStorage&&f.Storage._e(!0),null!=s&&s.initialSessionID&&c.StatsigSession.overrideInitialSessionID(s.initialSessionID,t),null!=s&&s.storageProvider&&f.Storage.ge(s.storageProvider),null!=s&&s.enableCookies&&d.StableID.Xn(t,s.enableCookies),null!=s&&s.disableStableID&&d.StableID._e(t,!0),this.O=t,this.m=null!=s?s:{},this.ji={},this.overrideAdapter=null!=(r=null==s?void 0:s.overrideAdapter)?r:null,this.pe=new l.EventLogger(t,n,i,s),this.$t=new a.ErrorBoundary(t,s,n),this.$t.wrap(this),this.$t.wrap(e),this.$t.wrap(this.pe),i.setErrorBoundary(this.$t),this.dataAdapter=e,this.dataAdapter.attach(t,s,i),this.storageProvider=f.Storage,null!=(e=null==(n=null==(r=this.overrideAdapter)?void 0:r.loadFromStorage)?void 0:n.call(r))&&e.catch(t=>this.$t.logError("OA::loadFromStorage",t)),this.be(),s=t,i=this,(0,u.kt)()||(n=(0,o.l)(),r=null!=(r=n.instances)?r:{},i=i,null!=r[s]&&h.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),r[s]=i,n.firstInstance||(n.firstInstance=i),n.instances=r,__STATSIG__=n)}updateRuntimeOptions(t){t.loggingEnabled?(this.m.loggingEnabled=t.loggingEnabled,this.pe.setLoggingEnabled(t.loggingEnabled)):null!=t.disableLogging&&(this.m.disableLogging=t.disableLogging,this.pe.setLoggingEnabled(t.disableLogging?"disabled":"browser-only")),null!=t.disableStorage&&(this.m.disableStorage=t.disableStorage,f.Storage._e(t.disableStorage)),null!=t.enableCookies&&(this.m.enableCookies=t.enableCookies,d.StableID.Xn(this.O,t.enableCookies)),t.logEventCompressionMode?this.pe.setLogEventCompressionMode(t.logEventCompressionMode):t.disableCompression&&this.pe.setLogEventCompressionMode(r.LogEventCompressionMode.Disabled)}flush(){return this.pe.flush()}shutdown(){return s(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this.me("Uninitialized",null),this.ve=null,yield this.pe.stop()})}on(t,e){this.fe[t]||(this.fe[t]=[]),this.fe[t].push(e)}off(t,e){this.fe[t]&&-1!==(e=this.fe[t].indexOf(e))&&this.fe[t].splice(e,1)}$on(t,e){e.__isInternal=!0,this.on(t,e)}$emt(i){var t;const e=e=>{try{e(i)}catch(t){!0===e.__isInternal?this.$t.logError("__emit:"+i.name,t):h.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",i)}};this.fe[i.name]&&this.fe[i.name].forEach(t=>e(t)),null!=(t=this.fe["*"])&&t.forEach(e)}me(t,e){this.loadingStatus=t,this.ji={},this.$emt({name:"values_updated",status:t,values:e})}ye(t,e,i){!0===(null==i?void 0:i.disableExposureLog)?this.pe.incrementNonExposureCount(t):this.pe.enqueue(e)}wi(s,r){return(t,e)=>{var i;return!this.m.disableEvaluationMemoization&&(i=(0,n.createMemoKey)(s,t,e))?(i in this.ji||(3e3<=Object.keys(this.ji).length&&(this.ji={}),this.ji[i]=r(t,e)),this.ji[i]):r(t,e)}}}},2636:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorTag=void 0,e.ErrorTag={NetworkError:"NetworkError"}},3206:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},1637:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Oe=e.je=e.Ui=e.Se=e.xt=void 0;const n="statsig::config_exposure",o="statsig::gate_exposure",h="statsig::layer_exposure",u=(t,e,i,s,r)=>(i.bootstrapMetadata&&(s.bootstrapMetadata=i.bootstrapMetadata),{eventName:t,user:e,value:null,metadata:a(i,s),secondaryExposures:r,time:Date.now()});e.xt=({eventName:t})=>t===o||t===n||t===h;function c(t,e){return t.map(t=>"string"==typeof t?(null!=e?e:{})[t]:t).filter(t=>null!=t)}e.Se=(t,e,i)=>{var s,r={gate:e.name,gateValue:String(e.value),ruleID:e.ruleID};return null!=(null==(s=e.__evaluation)?void 0:s.version)&&(r.configVersion=e.__evaluation.version),u(o,t,e.details,r,c(null!=(t=null==(s=e.__evaluation)?void 0:s.secondary_exposures)?t:[],i))},e.Ui=c;e.je=(t,e,i)=>{var s,r={config:e.name,ruleID:e.ruleID};return null!=(null==(s=e.__evaluation)?void 0:s.version)&&(r.configVersion=e.__evaluation.version),null!=(null==(s=e.__evaluation)?void 0:s.passed)&&(r.rulePassed=String(e.__evaluation.passed)),u(n,t,e.details,r,c(null!=(t=null==(s=e.__evaluation)?void 0:s.secondary_exposures)?t:[],i))};e.Oe=(t,e,i,s)=>{var r=e.__evaluation,n=!0===(null==(n=null==r?void 0:r.explicit_parameters)?void 0:n.includes(i));let o="",a=null!=(l=null==r?void 0:r.undelegated_secondary_exposures)?l:[];n&&(o=null!=(l=r.allocated_experiment_name)?l:"",a=null!=(l=r.secondary_exposures)?l:[]);var l=null==(r=e.__evaluation)?void 0:r.parameter_rule_ids,l={config:e.name,parameterName:i,ruleID:null!=(r=null==l?void 0:l[i])?r:e.ruleID,allocatedExperiment:o,isExplicitParameter:String(n)};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(l.configVersion=e.__evaluation.version),u(h,t,e.details,l,c(a,s))};const a=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},8e3:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.18.3";let i={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>i,add:t=>{i=Object.assign(Object.assign({},i),t)}}},586:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggingEnabledOption=e.LogEventCompressionMode=void 0,e.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},e.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2059:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.we=e.Te=e.ke=e.Ie=e.De=e.Ee=void 0;const o=i(7512),a=i(6634);function r(t,e,i,s){return{name:t,details:e,ruleID:null!=(t=null==i?void 0:i.rule_id)?t:"",__evaluation:i,value:s}}function s(t,e,i){var s=null!=(s=null==i?void 0:i.value)?s:{};return Object.assign(Object.assign({},r(t,e,i,s)),{get:n(t,null==i?void 0:i.value)})}function n(s,r,n){return(t,e)=>{var i=null!=(i=null==r?void 0:r[t])?i:null;return null==i?null!=e?e:null:null==e||(0,a.Me)(i,e)?(null!=n&&n(t),i):(o.Log.warn(`Parameter type mismatch. '${s}.${t}' was found to be type '${typeof i}' but fallback/return type is '${typeof e}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=e?e:null)}}e.Ee=function(t,e,i){return Object.assign(Object.assign({},r(t,e,i,!0===(null==i?void 0:i.value))),{idType:null!=(t=null==i?void 0:i.id_type)?t:null})},e.De=s,e.Ie=function(t,e,i){return t=s(t,e,i),Object.assign(Object.assign({},t),{groupName:null!=(e=null==i?void 0:i.group_name)?e:null})},e.ke=function(t,e,i,s){return Object.assign(Object.assign({},r(t,e,i,void 0)),{get:n(t,null==i?void 0:i.value,s),groupName:null!=(e=null==i?void 0:i.group_name)?e:null,__value:null!=(t=null==i?void 0:i.value)?t:{}})},e.Te=function(t,e,i,s){return Object.assign(Object.assign(Object.assign({},t),e),{get:n(t.name,i,s)})},e.we=n},1812:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3932:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UPDATE_DETAIL_ERROR_MESSAGES=e.createUpdateDetails=void 0;e.createUpdateDetails=(t,e,i,s,r,n)=>({duration:i,source:e,success:t,error:s,sourceUrl:r,warnings:n}),e.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},8578:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.v=e.T=void 0;const s=i(1406),r=i(7512);e.T=function(t,e,i){try{var s=JSON.parse(JSON.stringify(t));return null!=e&&null!=e.environment?s.statsigEnvironment=e.environment:null!=i&&(s.statsigEnvironment={tier:i}),s}catch(t){return r.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},e.v=function(t){return t?(0,s.Kt)(t):null}},4534:(t,i,e)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.L=i.G=i.Storage=void 0;var s=e(7512),e=e(6830);const r={},n={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:t=>r[t]||null,setItem:(t,e)=>{r[t]=e},removeItem:t=>{delete r[t]},getAllKeys:()=>Object.keys(r)};let o=null;try{const u=(0,e.te)();u&&u.localStorage&&"function"==typeof u.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>u.localStorage.getItem(t),setItem:(t,e)=>u.localStorage.setItem(t,e),removeItem:t=>u.localStorage.removeItem(t),getAllKeys:()=>Object.keys(u.localStorage)})}catch(t){s.Log.warn("Failed to setup localStorageProvider.")}let a=null!==o&&void 0!==o?o:n,l=a;function h(e){try{return e()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return i.Storage.ge(n),null;throw t instanceof Error&&"QuotaExceededError"===t.name&&(e=i.Storage.getAllKeys().filter(t=>t.startsWith("statsig.")),t.message=t.message+". Statsig Keys: "+e.length),t}}i.Storage={isReady:()=>l.isReady(),isReadyResolver:()=>l.isReadyResolver(),getProviderName:()=>l.getProviderName(),getItem:t=>h(()=>l.getItem(t)),setItem:(t,e)=>h(()=>l.setItem(t,e)),removeItem:t=>l.removeItem(t),getAllKeys:()=>l.getAllKeys(),ge:t=>{a=t,l=t},_e:t=>{l=t?n:a}},i.G=function(t){return t=i.Storage.getItem(t),JSON.parse(null!=t?t:"null")},i.L=function(t,e){i.Storage.setItem(t,JSON.stringify(e))}},3401:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.P=void 0;const r=i(7512);e.P=function(t,e,i){try{var s=JSON.parse(t);if(s&&"object"==typeof s&&e in s)return s}catch(t){}return r.Log.error("Failed to parse "+i),null}},6634:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Me=e.zt=void 0,e.zt=function(t){return Array.isArray(t)?"array":typeof t},e.Me=function(t,e){var i=t=>Array.isArray(t)?"array":typeof t;return i(t)===i(e)}},8023:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUUID=void 0,e.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let i=(new Date).getTime(),s="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let e=16*Math.random();return 0<i?(e=(i+e)%16|0,i=Math.floor(i/16)):(e=(s+e)%16|0,s=Math.floor(s/16)),("x"===t?e:7&e|8).toString(16)})}},1881:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlConfiguration=void 0;const s=i(1406),r=i(7410),n={[r.Endpoint.qt]:"i",[r.Endpoint.jt]:"e",[r.Endpoint.Bt]:"d"};e.UrlConfiguration=class{constructor(t,e,i,s){this.customUrl=null,this.fallbackUrls=null,this.endpoint=t,this.endpointDnsKey=n[t],e&&(this.customUrl=e),!e&&i&&(this.customUrl=i.endsWith("/")?""+i+t:i+"/"+t),s&&(this.fallbackUrls=s);e=r.NetworkDefault[t];this.defaultUrl=e+"/"+t}getUrl(){var t;return null!=(t=this.customUrl)?t:this.defaultUrl}getChecksum(){var t=(null!=(t=this.fallbackUrls)?t:[]).sort().join(",");return(0,s.h)(this.customUrl+t)}}},2397:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ae=e.It=e.Rt=e.xe=void 0;i=i(6830);const s="foreground",r="background",n=[];let o=s,a=!1;e.xe=()=>o===s,e.Rt=()=>a,e.It=t=>{n.unshift(t)};e.Ae=e=>{e!==o&&(o=e,n.forEach(t=>t(e)))},(0,i.he)("focus",()=>{(a=!1,e.Ae)(s)}),(0,i.he)("blur",()=>(0,e.Ae)(r)),(0,i.ce)("visibilitychange",()=>{(0,e.Ae)("visible"===document.visibilityState?s:r)}),(0,i.he)((0,i.Hn)(),()=>{a=!0,(0,e.Ae)(r)})},6914:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,r)}:function(t,e,i,s){t[s=void 0===s?i:s]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,i(1845),i(1845));const o=i(8962),a=(Object.defineProperty(e,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}}),i(7770)),l=(Object.defineProperty(e,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}}),i(7512));Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return l.Log}});var h=i(8e3);const u=i(4534);Object.defineProperty(e,"Storage",{enumerable:!0,get:function(){return u.Storage}}),r(i(1845),e),r(i(2137),e),r(i(6427),e),r(i(694),e),r(i(8962),e),r(i(3539),e),r(i(5542),e),r(i(2922),e),r(i(2417),e),r(i(1406),e),r(i(1333),e),r(i(7512),e),r(i(7787),e),r(i(7410),e),r(i(7023),e),r(i(1405),e),r(i(1361),e),r(i(6830),e),r(i(5902),e),r(i(4143),e),r(i(9122),e),r(i(1375),e),r(i(2636),e),r(i(3206),e),r(i(1637),e),r(i(8e3),e),r(i(586),e),r(i(1098),e),r(i(2059),e),r(i(1812),e),r(i(8578),e),r(i(4534),e),r(i(3401),e),r(i(6634),e),r(i(1881),e),r(i(8023),e),r(i(2397),e),r(i(3932),e),r(i(3091),e),Object.assign((0,n.l)(),{Log:l.Log,SDK_VERSION:h.SDK_VERSION})},2016:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoInit=void 0;const b=i(6914),y=i(2018);function w(t,e){var i;return null!=(i=e.get(t))?i:e.get(t.toLowerCase())}e.AutoInit=class{static attempt(e){var t,i,s,r,n;try{var o=(0,b.te)(),a=(0,b.de)();if(o&&a&&a.currentScript){var l=a.currentScript.getAttribute("src"),h=null==(t=o.location)?void 0:t.href;if(l&&h){var u=new URL(l,h).searchParams,c=null!=(i=w("sdkKey",u))?i:w("apiKey",u);if(c){var d={},f=w("proxy",u),v=(f&&(d.networkConfig={api:f}),null==(r=null==(s=(0,b.l)())?void 0:s.instances)?void 0:r[c]);let t=null;if(t=v instanceof y.StatsigClient?v:t)e({sdkKey:c,client:t});else{var p=a.currentScript.dataset;const m=function(t,e){if(t)if(t in e&&"function"==typeof e[t])return e[t];return null}(null!=(n=p.onstatsiginit)?n:p.onStatsigInit,o),g=new y.StatsigClient(c,function(){var t=(0,b.te)();if(!t)return{};let e=t.statsigUser||{};var i=(e="object"!=typeof e?{}:e).custom||{},s=e.customIDs||{};return Object.assign(Object.assign({},e),{customIDs:Object.assign({},s),custom:Object.assign(Object.assign({},i),{useragent:t.navigator.userAgent,page_url:(0,b.Gt)()||"",language:null==(s=t.navigator)?void 0:s.language})})}(),d);g.initializeAsync().then(()=>{m&&m(g)}).catch(t=>{b.Log.error(t)}),e({sdkKey:c,client:g})}}}}}catch(t){b.Log.error("AutoInit failed",t)}}}},7262:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ne=void 0;const s=i(6914);function r(t,e){null!=t&&t.forEach(t=>{delete e[t]})}e.Ne=function(t,e){var i;return(e=(0,s.P)(e,"checksum","DeltasEvaluationResponse"))?(t=t,i=e,t=Object.assign(Object.assign(Object.assign({},t),i),{feature_gates:Object.assign(Object.assign({},t.feature_gates),i.feature_gates),layer_configs:Object.assign(Object.assign({},t.layer_configs),i.layer_configs),dynamic_configs:Object.assign(Object.assign({},t.dynamic_configs),i.dynamic_configs)}),r((t=i=t).deleted_gates,t.feature_gates),delete t.deleted_gates,r(i.deleted_configs,t.dynamic_configs),delete t.deleted_configs,r(i.deleted_layers,t.layer_configs),delete t.deleted_layers,i=t,(t=(0,s.Kt)({feature_gates:i.feature_gates,dynamic_configs:i.dynamic_configs,layer_configs:i.layer_configs},2))===e.checksumV2?JSON.stringify(i):{hadBadDeltaChecksum:!0,badChecksum:t,badMergedConfigs:i,badFullResponse:e.deltas_full_response}):{hadBadDeltaChecksum:!0}}},4845:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=i(6914);e.default=class{constructor(t){this.O=t,this.Re=null,this.Pe=null,this.Ce="Uninitialized",this.Ue=0,this.Fe=0,this.Ge=null,this.Le=new Set}reset(){this.Pe=null,this.Re=null,this.Ce="Loading",this.Ue=0,this.Fe=0,this.Ge=null}finalize(){this.Pe||(this.Ce="NoValues")}getValues(){return this.Re?(0,r.P)(this.Re,"has_updates","EvaluationStoreValues"):null}setValues(t,e){var i;return!!t&&null!=(i=(0,r.P)(t.data,"has_updates","EvaluationResponse"))&&(this.Ce=t.source,!0===(null==i?void 0:i.has_updates)&&(this.Re=t.data,this.Ue=i.time,this.Fe=t.receivedAt,this.Pe=i,this.Ge=this.Ke(t.source,i),t.source&&i.user&&this.ze(e,i),r.SDKFlags.setFlags(this.O,null!=(t=i.sdk_flags)?t:{})),!0)}getWarnings(){if(0!==this.Le.size)return Array.from(this.Le)}getGate(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.feature_gates,t)}getConfig(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.dynamic_configs,t)}getLayer(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.layer_configs,t)}getParamStore(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.param_stores,t)}getSource(){return this.Ce}getExposureMapping(){var t;return null==(t=this.Pe)?void 0:t.exposures}Ke(t,e){return"Bootstrap"!==t?null:(t={},e.user&&(t.user=e.user),e.sdkInfo&&(t.generatorSDKInfo=e.sdkInfo),t.lcut=e.time,t)}qe(t,e){let i=null;return{result:i=t?t[e]||t[(0,r.h)(e)]:i,details:this.Be(null==i)}}ze(t,e){var i,s=r.StableID.get(this.O);(null==(i=t.customIDs)?void 0:i.stableID)!==s&&(null!=(i=t.customIDs)&&i.stableID||s)?this.Le.add("StableIDMismatch"):"user"in e&&(i=e.user,(0,r.v)(t)!==(0,r.v)(i))&&this.Le.add("PartialUserMatch")}getCurrentSourceDetails(){var t;return"Uninitialized"===this.Ce||"NoValues"===this.Ce?{reason:this.Ce}:(t={reason:this.Ce,lcut:this.Ue,receivedAt:this.Fe},0<this.Le.size&&(t.warnings=Array.from(this.Le)),t)}Be(t){var e=this.getCurrentSourceDetails();let i=e.reason;var s=null!=(s=e.warnings)?s:[],t=("Bootstrap"===this.Ce&&0<s.length&&(i+=s[0]),"Uninitialized"!==i&&"NoValues"!==i&&(i=i+":"+(t?"Unrecognized":"Recognized")),"Bootstrap"===this.Ce&&null!=(s=this.Ge)?s:void 0);return t&&(e.bootstrapMetadata=t),Object.assign(Object.assign({},e),{reason:i})}}},8448:function(t,e,i){"use strict";var l=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0});const h=i(6914),o=i(7262);class s extends h.NetworkCore{constructor(t,e){super(t,e);e=null==t?void 0:t.networkConfig;this.Fi=t,this.Ve=new h.UrlConfiguration(h.Endpoint.qt,null==e?void 0:e.initializeUrl,null==e?void 0:e.api,null==e?void 0:e.initializeFallbackUrls)}fetchEvaluations(s,r,n,o,a){return l(this,void 0,void 0,function*(){var t,e=r?(0,h.P)(r,"has_updates","InitializeResponse"):null;let i={user:o,hash:null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2",deltasResponseRequested:!1,full_checksum:null};return null!=e&&e.has_updates&&(t=(null==e?void 0:e.hash_used)!==(null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2"),i=Object.assign(Object.assign({},i),{sinceTime:a&&!t?e.time:0,previousDerivedFields:"derived_fields"in e&&a?e.derived_fields:{},deltasResponseRequested:!0,full_checksum:e.full_checksum,partialUserMatchSinceTime:t?0:e.time})),this.Je(s,e,i,n)})}Je(i,s,r,n){return l(this,void 0,void 0,function*(){var t,e=yield this.post({sdkKey:i,urlConfig:this.Ve,data:r,retries:2,isStatsigEncodable:!0,priority:n});return 204===(null==e?void 0:e.code)?'{"has_updates": false}':200!==(null==e?void 0:e.code)?null!=(t=null==e?void 0:e.body)?t:null:!0!==(null==s?void 0:s.has_updates)||!0!==(null==(t=e.body)?void 0:t.includes('"is_delta":true'))||!0!==r.deltasResponseRequested?e.body:"string"==typeof(t=(0,o.Ne)(s,e.body))?t:this.Je(i,s,Object.assign(Object.assign(Object.assign({},r),t),{deltasResponseRequested:!1}),n)})}}e.default=s},3583:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.$e=void 0;const d=i(6914),f={disableExposureLog:!0};function v(t){return null==t||!1===t.disableExposureLog}function p(t,e){return null!=e&&!(0,d.Me)(t,e)}e.$e=function(h,u,c){return(t,e)=>{if(null==u)return e;var i,s,r,n,o,a,l=u[t];if(null==l||null!=e&&(0,d.zt)(e)!==l.param_type)return e;switch(l.ref_type){case"static":return l.value;case"gate":return a=l,h.getFeatureGate(a.gate_name,v(c)?void 0:f).value?a.pass_value:a.fail_value;case"dynamic_config":return a=l,o=e,p(n=(n=h).getDynamicConfig(a.config_name,v(c)?void 0:f).get(a.param_name),o)?o:n;case"experiment":return o=l,n=e,p(r=(r=h).getExperiment(o.experiment_name,v(c)?void 0:f).get(o.param_name),n)?n:r;case"layer":return r=l,s=e,p(i=(i=h).getLayer(r.layer_name,v(c)?void 0:f).get(r.param_name),s)?s:i;default:return e}}}},8198:function(t,e,i){"use strict";var n=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0});const o=i(6914),a=i(4845),l=i(8448),r=i(3583),h=i(4131);class s extends o.StatsigClientBase{static instance(t){var e=(0,o.l)().instance(t);return e instanceof s?e:(o.Log.warn((0,o.kt)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new s(null!=t?t:"",{}))}constructor(t,e,i=null){o.SDKType.ue(t,"javascript-client");var s,r=new l.default(i,t=>{this.$emt(t)}),t=(super(t,null!=(s=null==i?void 0:i.dataAdapter)?s:new h.StatsigEvaluationsDataAdapter,r,i),this.getFeatureGate=this.wi(o.MemoPrefix.Kn,this.Ti.bind(this)),this.getDynamicConfig=this.wi(o.MemoPrefix.Ln,this.Ii.bind(this)),this.getExperiment=this.wi(o.MemoPrefix.Vn,this.ki.bind(this)),this.getLayer=this.wi(o.MemoPrefix.$n,this.Di.bind(this)),this.getParameterStore=this.wi(o.MemoPrefix.Bn,this.Ri.bind(this)),this.We=new a.default(t),this.ht=r,this.He=this.xi(e,i),this.js=(0,o.getUUID)(),null!=(s=null==i?void 0:i.plugins)?s:[]);for(const n of t)n.bind(this)}initializeSync(t){var e;return"Uninitialized"!==this.loadingStatus?(0,o.createUpdateDetails)(!0,this.We.getSource(),-1,null,null,["MultipleInitializations",...null!=(e=this.We.getWarnings())?e:[]]):(this.pe.start(),this.updateUserSync(this.He,t))}initializeAsync(t){return n(this,void 0,void 0,function*(){return this.ve||(this.ve=this.Ye(t)),this.ve})}updateUserSync(e,t){var i=performance.now();try{return this.zi(e,t,i)}catch(t){e=t instanceof Error?t:new Error(String(t));return this.Ki(e,i)}}zi(t,e,i){var s=[...null!=(s=this.We.getWarnings())?s:[]],t=(this.Xe(t),this.dataAdapter.getDataSync(this.He)),e=(null==t&&s.push("NoCachedValues"),this.We.setValues(t,this.He),this.Qe(t),null==e?void 0:e.disableBackgroundCacheRefresh);return!0===e||null==e&&"Bootstrap"===(null==t?void 0:t.source)||this.Ze(null!=t?t:null,this.He),(0,o.createUpdateDetails)(!0,this.We.getSource(),performance.now()-i,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),s)}updateUserAsync(t,s){return n(this,void 0,void 0,function*(){var e=performance.now();try{return yield this.qi(t,s)}catch(t){var i=t instanceof Error?t:new Error(String(t));return this.Ki(i,e)}})}qi(s,r){return n(this,void 0,void 0,function*(){this.Xe(s);var t=this.He,e=(o.Diagnostics.B(this.O),this.dataAdapter.getDataSync(t));if(this.We.setValues(e,this.He),this.me("Loading",e),e=yield this.dataAdapter.getDataAsync(e,t,r),t!==this.He)return(0,o.createUpdateDetails)(!1,this.We.getSource(),-1,new Error("User changed during update"),this.ht.getLastUsedInitUrlAndReset());let i=!1;null!=e&&(o.Diagnostics.W(this.O),i=this.We.setValues(e,this.He),o.Diagnostics.H(this.O,{success:i})),this.Qe(e),i||(this.$t.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics.V(this.O,i,this.We.getCurrentSourceDetails());t=o.Diagnostics.tt(this.He,this.pe,this.O,this.m);return(0,o.createUpdateDetails)(i,this.We.getSource(),t,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),this.We.getWarnings())})}getContext(){return{sdkKey:this.O,options:this.m,values:this.We.getValues(),user:JSON.parse(JSON.stringify(this.He)),errorBoundary:this.$t,session:o.StatsigSession.get(this.O),stableID:o.StableID.get(this.O),sdkInstanceID:this.js}}checkGate(t,e){return this.getFeatureGate(t,e).value}logEvent(t,e,i){e="string"==typeof t?{eventName:t,value:e,metadata:i}:t;this.$emt({name:"log_event_called",event:e}),this.pe.enqueue(Object.assign(Object.assign({},e),{user:this.He,time:Date.now()}))}be(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.Qe(null)})}Ye(t){return n(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this.pe.start(),this.updateUserAsync(this.He,t)})}Ki(t,e){return(0,o.createUpdateDetails)(!1,this.We.getSource(),performance.now()-e,t,null,[...null!=(e=this.We.getWarnings())?e:[]])}Qe(t){this.We.finalize(),this.me("Ready",t)}Ze(t,e){this.dataAdapter.getDataAsync(t,e,{priority:"low"}).catch(t=>{o.Log.error("An error occurred after update.",t)})}Xe(t){this.pe.reset(),this.We.reset(),this.He=this.xi(t,this.m)}xi(t,e){t=(0,o.T)(t,e),e=null==(e=t.customIDs)?void 0:e.stableID;return e&&o.StableID.setOverride(e,this.O),t}Ti(t,e){var{result:i,details:s}=this.We.getGate(t),s=(0,o.Ee)(t,s,i),r=null==(r=null==(i=this.overrideAdapter)?void 0:i.getGateOverride)?void 0:r.call(i,s,this.He,e),i=null!=r?r:s;return this.ye(t,(0,o.Se)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"gate_evaluation",gate:i}),i}Ii(t,e){var{result:i,details:s}=this.We.getConfig(t),s=(0,o.De)(t,s,i),r=null==(r=null==(i=this.overrideAdapter)?void 0:i.getDynamicConfigOverride)?void 0:r.call(i,s,this.He,e),i=null!=r?r:s;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:i}),i}ki(t,e){var{result:i,details:s}=this.We.getConfig(t),s=(0,o.Ie)(t,s,i),r=(null!=s.__evaluation&&(s.__evaluation.secondary_exposures=(0,o.Ui)(null!=(i=null==(i=s.__evaluation)?void 0:i.secondary_exposures)?i:[],this.We.getExposureMapping())),null==(r=null==(i=this.overrideAdapter)?void 0:i.getExperimentOverride)?void 0:r.call(i,s,this.He,e)),i=null!=r?r:s;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"experiment_evaluation",experiment:i}),i}Di(e,i){var{result:t,details:s}=this.We.getLayer(e),s=(0,o.ke)(e,s,t),r=null==(r=null==(t=this.overrideAdapter)?void 0:t.getLayerOverride)?void 0:r.call(t,s,this.He,i);null!=i&&i.disableExposureLog&&this.pe.incrementNonExposureCount(e);const n=(0,o.Te)(s,r,null!=(t=null==r?void 0:r.__value)?t:s.__value,t=>{null!=i&&i.disableExposureLog||this.ye(e,(0,o.Oe)(this.He,n,t,this.We.getExposureMapping()),i)});return this.$emt({name:"layer_evaluation",layer:n}),n}Ri(t,e){var{result:i,details:s}=this.We.getParamStore(t),t=(this.pe.incrementNonExposureCount(t),{name:t,details:s,__configuration:i,get:(0,r.$e)(this,i,e)}),i=null==(i=null==(s=this.overrideAdapter)?void 0:s.getParamStoreOverride)?void 0:i.call(s,t,e);return null!=i&&(t.__configuration=i.config,t.details=i.details,t.get=(0,r.$e)(this,i.config,e)),t}}e.default=s},4131:function(t,e,i){"use strict";var n=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigEvaluationsDataAdapter=void 0;const s=i(6914),r=i(8448);class o extends s.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this.ht=null,this.m=null}attach(t,e,i){super.attach(t,e,i),null!==i&&i instanceof r.default?this.ht=i:this.ht=new r.default(null!=e?e:{})}getDataAsync(t,e,i){return this.D(t,(0,s.T)(e,this.m),i)}prefetchData(t,e){return this.A(t,e)}setData(t){var e=(0,s.P)(t,"has_updates","data");e&&"user"in e?super.setData(t,e.user):s.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(t,e){super.setData(t,e)}R(e,i,s,r){return n(this,void 0,void 0,function*(){var t=yield null==(t=this.ht)?void 0:t.fetchEvaluations(this.C(),e,null==s?void 0:s.priority,i,r);return null!=t?t:null})}k(t){t=(0,s.o)(this.C(),t,null==(t=this.m)?void 0:t.customUserCacheKeyFunc);return`${s.DataAdapterCachePrefix}.${this.p}.`+t}N(t,e){return null!=t.fullUserHash&&t.fullUserHash===(0,s.v)(e)}}e.StatsigEvaluationsDataAdapter=o},2018:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,r)}:function(t,e,i,s){t[s=void 0===s?i:s]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClient=void 0,i(6914)),o=i(8198),r=(e.StatsigClient=o.default,r(i(6914),e),Object.assign((0,n.l)(),{StatsigClient:o.default}));e.default=r},8788:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionReplay=e.runStatsigSessionReplay=e.StatsigSessionReplayPlugin=void 0;const s=i(6914);var r=i(4069);const n=i(5967);function o(t,e){new a(t,e)}e.StatsigSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="session-replay"}bind(t){o(t,this.options)}},e.runStatsigSessionReplay=o;class a extends r.SessionReplayBase{constructor(t,e){super(t,e),this.tn.$on("values_updated",()=>{var t;this.ts||this.li(null==(t=this.m)?void 0:t.forceRecording)}),this.li(null==(t=this.m)?void 0:t.forceRecording)}ri(t){super.es(t)}li(t=!1){var e;this.ns>=n.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():this.si.isRecording()||(this.ts=!1,s.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.record((t,e)=>this.ci(t,e),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.SessionReplay=a},4069:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionReplayBase=e.forceStartRecording=e.startRecording=e.stopRecording=void 0;const h=i(6914),s=i(759),u=i(5967),r=i(1807);function n(t){var e=null==t?(0,h.l)().firstSRInstance:null==(e=null==(e=(0,h.l)())?void 0:e.srInstances)?void 0:e[t];return e instanceof o?e:null}e.stopRecording=function(t){null!=(t=n(t))&&t.stopRecording()},e.startRecording=function(t){null!=(t=n(t))&&t.startRecording()},e.forceStartRecording=function(t){null!=(t=n(t))&&t.forceStartRecording()};class o{constructor(t,e){this.ti={startTime:-1,endTime:0,clickCount:0},this.ei=[],this.ts=!1,this.ss=0,this.ns=0,this.tn=t,this.m=e;var{sdkKey:t,errorBoundary:e}=this.tn.getContext();this.$t=e,this.$t.wrap(this),this.si=new s.SessionReplayClient,this.tn.$on("pre_shutdown",()=>this.ri()),this.tn.on("session_expired",()=>{this.ri("session_expired")}),(0,h.kt)()||((e=(0,h.l)()).srInstances=Object.assign(Object.assign({},e.srInstances),{[t]:this}),e.firstSRInstance)||(e.firstSRInstance=this),this.ii=this.ni(),this.ui()}forceStartRecording(){this.ts=!1,this.li(!0)}stopRecording(){this.ts=!0,this.ri()}startRecording(){var t;this.ts=!1,this.li(null==(t=this.m)?void 0:t.forceRecording)}isRecording(){return this.si.isRecording()}oi(t){0!==this.ei.length&&(t=(0,h.Rt)()?"is_leaving_page":t,this.vi(this.ii,t))}ai(t){"background"===t&&(this.oi(),this.tn.flush().catch(t=>{this.$t.logError("SR::visibility",t)}))}ui(){const i=this.tn.getContext()["sdkKey"];(0,h.It)(t=>{var e=null==(e=null==(e=(0,h.l)())?void 0:e.srInstances)?void 0:e[i];e instanceof o&&e.ai(t)})}vi(e,i){var s=this.ti;if(0!==this.ei.length){var r=JSON.stringify(this.ei),n=(0,u.rs)(r),o=1<n.length?(0,h.getUUID)():null;for(let t=0;t<n.length;t++){var a=n[t],l=(0,u.ls)(a,r,e,s,this.tn.getContext().sdkInstanceID);null!=o&&(0,u.os)(l.metadata,o,t,n.length,a.length),i&&(l.metadata[i]="true"),this.ns++,this.tn.logEvent(l),null!=o&&this.tn.flush().catch(t=>{h.Log.error(t)})}this.ei=[],this.ns>u.MAX_LOGS&&this.ri()}}di(){this.ni(),this.oi()}ni(){return this.tn.getContext().session.data.sessionID}es(t){this.si.isRecording()&&(this.si.stop(),h.StatsigMetadataProvider.add({isRecordingSession:"false"})),0!==this.ei.length&&this.oi(t),"session_expired"===t&&(this.ss=0,this.ti=this.us())}us(){return{startTime:-1,endTime:0,clickCount:0}}ci(t,e){var i;this.ii!==this.ni()?this.ri("session_expired"):this.ns>=u.MAX_LOGS?this.ri():(t.eventIndex=this.ss++,this.ti.clickCount+=e.clickCount,this.ti.startTime=-1===this.ti.startTime?e.startTime:Math.min(this.ti.startTime,e.startTime),this.ti.endTime=Math.max(this.ti.endTime,e.endTime),(e=(0,r.hi)(t,u.MAX_INDIVIDUAL_EVENT_BYTES))>u.MAX_INDIVIDUAL_EVENT_BYTES?h.Log.warn(`SessionReplay event is too large (~${e} bytes) and will not be logged`,t):(i=(0,r.hi)(this.ei,u.REPLAY_ENQUEUE_TRIGGER_BYTES),this.ei.push(t),i+e<u.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,h.xe)()?this.di():this.oi())))}}e.SessionReplayBase=o},759:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionReplayClient=void 0;const s=i(3597),o=i(6914);e.SessionReplayClient=class{constructor(){this.fi=null,this._i=null}record(r,t,e,n=!1){null==(0,o.de)()||(this.fi=null,this._i=null,this.bi=e,this.pi)||(this.pi=(e=(t,e)=>{var i;n?this.fi=!e&&null!=(i=this.fi)?i:t.timestamp:null==this.fi&&(this.fi=t.timestamp),this._i=t.timestamp;let s=0;3!==(i=t).type||2!==i.data.source||2!==i.data.type&&4!==i.data.type||s++,r(Object.assign(Object.assign({},t),{eventIndex:0}),{startTime:this.fi,endTime:this._i,clickCount:s},null!=e&&e),144e5<this._i-this.fi&&(null!=(t=this.pi)&&t.call(this),this.bi)&&this.bi()},t=t,n?(0,s.record)(Object.assign(Object.assign({},t),{emit:e,checkoutEveryNms:3e4})):(0,s.record)(Object.assign(Object.assign({},t),{emit:e}))))}stop(){this.pi&&(this.pi(),this.pi=void 0)}isRecording(){return null!=this.pi}}},5967:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.os=e.rs=e.ls=e.MAX_LOGS=e.MAX_INDIVIDUAL_EVENT_BYTES=e.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;const n=i(6914);e.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,e.MAX_INDIVIDUAL_EVENT_BYTES=10485760,e.MAX_LOGS=1e4,e.ls=function(t,e,i,s,r){return{eventName:"statsig::session_recording",value:i,metadata:{session_start_ts:String(s.startTime),session_end_ts:String(s.endTime),clicks_captured_cumulative:String(s.clickCount),rrweb_events:t,rrweb_payload_size:String(e.length),session_replay_sdk_version:n.SDK_VERSION,sdk_instance_id:r}}},e.rs=function(e){var i=[];for(let t=0;t<e.length;t+=1048576)i.push(e.slice(t,t+1048576));return i},e.os=function(t,e,i,s,r){t.sliced_id=e,t.slice_index=String(i),t.slice_count=String(s),t.slice_byte_size=String(r)}},1807:(t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.hi=void 0;a.hi=(e,i)=>{let s=0;var r=Object.keys(e);for(let t=0;t<r.length;t++){var n=r[t],o=e[n];if((s=(s+=n.length)+("object"==typeof o&&null!==o?(0,a.hi)(o,i)+2:String(o).length+1))>=i)return s}return s}},3691:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggeredSessionReplay=e.runStatsigTriggeredSessionReplay=e.StatsigTriggeredSessionReplayPlugin=void 0;const r=i(6914);var s=i(4069);const n=i(5967);function o(t,e){new a(t,e)}e.StatsigTriggeredSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="triggered-session-replay"}bind(t){o(t,this.options)}},e.runStatsigTriggeredSessionReplay=o;class a extends s.SessionReplayBase{constructor(t,e){super(t,e),this.cs=[],this.hs=!1,this.ds(e),null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs()}ds(t){this.fs(t),this.gs(),this._s(),this.ps()}fs(e){this.tn.$on("values_updated",()=>{var t;this.ts||(null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs())})}gs(){this.tn.$on("log_event_called",t=>{var e;this.ts||!1===(null==(e=this.tn.getContext().values)?void 0:e.passes_session_recording_targeting)||null==(null==e?void 0:e.session_recording_event_triggers)||null==(e=e.session_recording_event_triggers[t.event.eventName])||!1===e.passes_sampling||null!=(e=e.values)&&!e.includes(String(null!=(e=t.event.value)?e:""))||this.li(!0)})}_s(){this.tn.$on("gate_evaluation",t=>{this.bs(t.gate.name,String(t.gate.value))})}ps(){this.tn.$on("experiment_evaluation",t=>{this.bs(t.experiment.name,null!=(t=t.experiment.groupName)?t:"")})}bs(t,e){var i,s;this.ts||!1===(null==(s=this.tn.getContext().values)?void 0:s.passes_session_recording_targeting)||null==(null==s?void 0:s.session_recording_exposure_triggers)||null==(i=null!=(i=s.session_recording_exposure_triggers[t])?i:s.session_recording_exposure_triggers[(0,r.h)(t)])||!1===i.passes_sampling||null!=(s=i.values)&&!s.includes(e)||this.li(!0)}forceStartRecording(){super.forceStartRecording()}stopRecording(){this.hs=!1,this.cs=[],super.stopRecording()}ys(){if(this.hs=!0,0!==this.cs.length){var e=this.cs.map(t=>t.events).flat();for(let t=0;t<e.length;t++)e[t].event.eventIndex=t,this.ti.clickCount+=e[t].data.clickCount,this.ti.startTime=-1===this.ti.startTime?e[t].data.startTime:Math.min(this.ti.startTime,e[t].data.startTime),this.ti.endTime=Math.max(this.ti.endTime,e[t].data.endTime);this.ei=e.map(t=>t.event),this.ss=e.length,(0,r.xe)()?this.di():this.oi(),this.si.stop()}}ri(t){this.hs=!1,this.cs=[],super.es(t)}ci(t,e,i){if(!this.hs)return this.ii!==this.ni()?void this.ri("session_expired"):void(i&&4===t.type||0===this.cs.length?(1<this.cs.length&&this.cs.shift(),this.cs.push({events:[{event:t,data:e}]})):this.cs[this.cs.length-1].events.push({event:t,data:e}));super.ci(t,e)}vs(){var t=this.tn.getContext().values;!1===(null==t?void 0:t.passes_session_recording_targeting)?this.ri():this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(t=null==(t=this.m)?void 0:t.rrwebConfig)?t:{},()=>{this.ri()},!0)}li(t=!1){var e;this.ns>=n.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():(this.ys(),this.ts=!1,r.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.TriggeredSessionReplay=a},3447:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forceStartRecording=e.stopRecording=e.startRecording=e.StatsigTriggeredSessionReplayPlugin=e.StatsigSessionReplayPlugin=e.runStatsigTriggeredSessionReplay=e.runStatsigSessionReplay=e.SessionReplay=e.SessionReplayClient=void 0;var s=i(6914);const r=i(8788),n=(Object.defineProperty(e,"SessionReplay",{enumerable:!0,get:function(){return r.SessionReplay}}),Object.defineProperty(e,"StatsigSessionReplayPlugin",{enumerable:!0,get:function(){return r.StatsigSessionReplayPlugin}}),Object.defineProperty(e,"runStatsigSessionReplay",{enumerable:!0,get:function(){return r.runStatsigSessionReplay}}),i(4069)),o=(Object.defineProperty(e,"forceStartRecording",{enumerable:!0,get:function(){return n.forceStartRecording}}),Object.defineProperty(e,"startRecording",{enumerable:!0,get:function(){return n.startRecording}}),Object.defineProperty(e,"stopRecording",{enumerable:!0,get:function(){return n.stopRecording}}),i(759)),a=(Object.defineProperty(e,"SessionReplayClient",{enumerable:!0,get:function(){return o.SessionReplayClient}}),i(3691));Object.defineProperty(e,"StatsigTriggeredSessionReplayPlugin",{enumerable:!0,get:function(){return a.StatsigTriggeredSessionReplayPlugin}}),Object.defineProperty(e,"runStatsigTriggeredSessionReplay",{enumerable:!0,get:function(){return a.runStatsigTriggeredSessionReplay}}),Object.assign((0,s.l)(),{SessionReplayClient:o.SessionReplayClient,SessionReplay:r.SessionReplay,runStatsigSessionReplay:r.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:a.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:r.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:a.StatsigTriggeredSessionReplayPlugin,startRecording:n.startRecording,stopRecording:n.stopRecording,forceStartRecording:n.forceStartRecording})},4535:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCapture=e.runStatsigAutoCapture=e.StatsigAutoCapturePlugin=void 0;const u=i(6914),s=i(5423),r=i(6714),n=i(4716),o=i(2678),a=i(5864),l=i(3769),h=i(9900),c={submit:s.AutoCaptureEventName.FORM_SUBMIT,click:s.AutoCaptureEventName.CLICK};function d(t,e){var i=t.getContext()["sdkKey"];if(!(0,u.kt)()){var s=null!=(s=(0,u.l)().acInstances)?s:{};if(s[i])return s[i]}return new f(t,e)}e.StatsigAutoCapturePlugin=class{constructor(t){this.m=t,this.__plugin="auto-capture"}bind(t){d(t,this.m)}},e.runStatsigAutoCapture=d;class f{constructor(t,e){this.tn=t,this.rn={},this.sn=null,this.Ei=!1;var{sdkKey:t,errorBoundary:i,values:s}=t.getContext(),s=(this.rn=null!=(s=null==(s=null==s?void 0:s.auto_capture_settings)?void 0:s.disabled_events)?s:{},this.$t=i,this.$t.wrap(this),this.tn.$on("values_updated",()=>{var t=this.tn.getContext().values;this.rn=null!=(t=null==(t=null==t?void 0:t.auto_capture_settings)?void 0:t.disabled_events)?t:this.rn}),this.Vi=new r.EngagementManager,this.Gi=new n.default,this.xs=new o.WebVitalsManager(this.bn.bind(this)),this.ln=null==e?void 0:e.eventFilterFunc,(0,u.de)());(0,u.kt)()||((e=null!=(i=(__STATSIG__=(0,u.l)()).acInstances)?i:{})[t]=this,__STATSIG__.acInstances=e),"loading"===(null==s?void 0:s.readyState)?s.addEventListener("DOMContentLoaded",()=>this.qt()):this.qt()}un(){var t=(0,u.te)(),e=(0,u.de)();if(t&&e){const i=(t,e=!0)=>{t=t||(null==(t=(0,u.te)())?void 0:t.event);this.an(t),e&&this.Vi.bumpInactiveTimer(),"click"===t.type&&t instanceof MouseEvent&&this.Gi.isRageClick(t.clientX,t.clientY,Date.now())&&this.Bi(t)};(0,a.cn)(e,"click",t=>i(t)),(0,a.cn)(e,"submit",t=>i(t)),(0,a.cn)(t,"error",t=>i(t,!1)),(0,a.cn)(t,"pagehide",()=>this.Mi()),(0,a.cn)(t,"beforeunload",()=>this.Mi())}}vn(){var t=(0,u.te)(),e=(0,u.de)();t&&e&&((0,a.cn)(t,"popstate",()=>this.fn()),window.history.pushState=new Proxy(window.history.pushState,{apply:(t,e,[i,s,r])=>{t.apply(e,[i,s,r]),this.fn()}}),this.fn())}an(t){var e,i,s=null==(s=t.type)?void 0:s.toLowerCase();"error"===s&&t instanceof ErrorEvent?this._n(t):(e=(0,a.gn)(t))&&(0,a.St)(t,e)&&(t=c[s])&&({value:s,metadata:e}=(0,l.pn)(e),i=(0,h.$i)((0,a.wn)()),this.bn(t,s,Object.assign(Object.assign({},i),e)))}qt(){this.xs.startTracking(),this.Vi.startInactivityTracking(()=>this.Mi(!0)),this.un(),this.vn(),this.mn(),this.yn()}_n(t){var e=(null==t?void 0:t.error)||{};let i=e;if("object"==typeof e)try{i=JSON.stringify(e)}catch(t){i="function"==typeof(null==e?void 0:e.toString)?e.toString():"Unknown Error"}this.bn(s.AutoCaptureEventName.ERROR,t.message,{message:t.message,filename:t.filename,lineno:t.lineno,colno:t.colno,error_str:i})}mn(){var t=this.On();try{this.jn(t)&&this.bn(s.AutoCaptureEventName.SESSION_START,(0,a.Sn)(),{sessionID:t.data.sessionID},{flushImmediately:!0})}catch(t){this.$t.logError("AC::logSession",t)}}fn(){var t=(0,a.wn)(),e=this.sn;e&&t.href===e.href||(this.Vi.setLastPageViewTime(Date.now()),this.sn=t,e=(this.Ei=!1,h.$i)(t),this.bn(s.AutoCaptureEventName.PAGE_VIEW,(0,a.Sn)(),e,{flushImmediately:!0,addNewSessionMetadata:!0}),this.Vi.bumpInactiveTimer())}Mi(t=!1){var e,i;this.Ei||(this.Ei=!0,e=this.Vi.getScrollMetrics(),i=this.Vi.getPageViewLength(),this.bn(s.AutoCaptureEventName.PAGE_VIEW_END,(0,a.Sn)(),Object.assign(Object.assign({},e),{pageViewLength:i,dueToInactivity:t}),{flushImmediately:!0}))}Bi(t){var{value:e,metadata:i}=(0,l.pn)(t.target);this.bn(s.AutoCaptureEventName.RAGE_CLICK,e,Object.assign(Object.assign({x:t.clientX,y:t.clientY,timestamp:Date.now()},(0,h.$i)((0,a.wn)())),i))}yn(){const i=(0,u.te)();i&&i.performance&&void 0!==(null===i||void 0===i?void 0:i.performance)&&"function"==typeof i.performance.getEntriesByType&&"function"==typeof i.performance.getEntriesByName&&setTimeout(()=>{var t={},e=i.performance.getEntriesByType("navigation"),e=(e&&0<e.length&&e[0]instanceof PerformanceNavigationTiming&&(e=e[0],t.load_time_ms=e.duration,t.dom_interactive_time_ms=e.domInteractive-e.startTime,t.redirect_count=e.redirectCount,t.transfer_bytes=e.transferSize),i.performance.getEntriesByName("first-contentful-paint"));e&&0<e.length&&e[0]instanceof PerformancePaintTiming&&(t.first_contentful_paint_time_ms=e[0].startTime),this.bn(s.AutoCaptureEventName.PERFORMANCE,(0,a.Sn)(),Object.assign(Object.assign({},t),(0,h.Ji)()))},1)}bn(t,e,i,s){var r,n,o,a=t.slice("auto_capture::".length);if(!this.rn[t]&&!this.rn[a]){a=this.On();try{var l=Object.assign({sessionID:a.data.sessionID,page_url:null!=(o=null==(n=null==(r=(0,u.te)())?void 0:r.location)?void 0:n.href)?o:""},i),h=(null!=s&&s.addNewSessionMetadata&&(l.isNewSession=String(this.jn(a))),{eventName:t,value:e,metadata:l});this.ln&&!this.ln(h)||(this.tn.logEvent(h),null!=s&&s.flushImmediately&&this.Ts())}catch(t){this.$t.logError("AC::enqueue",t)}}}Ts(){this.tn.flush().catch(t=>{u.Log.error(t)})}jn(t){return Math.abs(t.data.startTime-Date.now())<1e3}On(){return this.tn.getContext().session}}e.AutoCapture=f},5423:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCaptureEventName=void 0,e.AutoCaptureEventName={PAGE_VIEW:"auto_capture::page_view",PAGE_VIEW_END:"auto_capture::page_view_end",ERROR:"auto_capture::error",SESSION_START:"auto_capture::session_start",PERFORMANCE:"auto_capture::performance",FORM_SUBMIT:"auto_capture::form_submit",CLICK:"auto_capture::click",RAGE_CLICK:"auto_capture::rage_click",WEB_VITALS:"auto_capture::web_vitals"}},6714:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EngagementManager=void 0;const s=i(6914);e.EngagementManager=class{constructor(){this.Wi=0,this.Yi=0,this.Qi=0,this.Hi=0,this.Xi=Date.now(),this.Ai=null,this.Zi=null,this.Zn()}Zn(){var t=(0,s.te)();t&&(t.addEventListener("scroll",()=>this.tr()),t.addEventListener("scrollend",()=>this.tr()),t.addEventListener("resize",()=>this.tr()))}tr(){var t,e=(0,s.te)(),i=(0,s.de)();e&&i&&(t=i.body.scrollHeight,i=e.scrollY||i.documentElement.scrollTop||0,e=e.innerHeight,this.Wi=i,this.Yi=Math.max(this.Yi,i),i=Math.min(100,Math.round((i+e)/t*100)),this.Qi=i,this.Hi=Math.max(this.Hi,i),this.bumpInactiveTimer())}getScrollMetrics(){return{lastScrollY:this.Wi,maxScrollY:this.Yi,lastScrollPercentage:this.Qi,maxScrollPercentage:this.Hi,scrollDepth:this.Hi}}getPageViewLength(){return Date.now()-this.Xi}setLastPageViewTime(t){this.Xi=t}startInactivityTracking(t){this.Zi=t}bumpInactiveTimer(){var t=(0,s.te)();t&&(this.Ai&&clearTimeout(this.Ai),this.Ai=t.setTimeout(()=>{this.Zi&&this.Zi()},6e5))}}},4716:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(){this.er=[]}isRageClick(t,e,i){this.er=this.er.filter(t=>i-t.timestamp<1e3);var s,r;return 0<this.er.length&&(s=this.er[this.er.length-1],r=t-s.x,s=e-s.y,!(Math.abs(r)+Math.abs(s)<=30))&&(this.er=[]),this.er.push({x:t,y:e,timestamp:i}),3<=this.er.length}}},2678:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebVitalsManager=void 0;const s=i(8572),r=i(6914),n=i(5423),o=i(5864),a=["CLS","FCP","LCP","TTFB"];e.WebVitalsManager=class{constructor(t){this.Ns=t,this.Ds=!1}startTracking(){var t;this.Ds||"https:"!==(t=null==(t=null==(t=(0,r.te)())?void 0:t.location)?void 0:t.protocol)&&"http:"!==t||((0,s.onCLS)(t=>this.Fs(t)),(0,s.onFCP)(t=>this.Fs(t)),(0,s.onLCP)(t=>this.Fs(t)),(0,s.onTTFB)(t=>this.Fs(t)),this.Ds=!0)}Fs(t){var e;void 0!==t&&void 0!==(null==t?void 0:t.name)&&""!==(e=(0,o.Ls)())&&a.includes(t.name)&&this.Bs(t,e)}Bs(t,e){""!==e&&this.Ns(n.AutoCaptureEventName.WEB_VITALS,e,{name:t.name,value:t.value,delta:t.delta,id:t.id})}}},1964:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigAutoCapturePlugin=e.runStatsigAutoCapture=e.AutoCapture=e.AutoCaptureEventName=void 0;var s=i(6914);const r=i(4535);Object.defineProperty(e,"AutoCapture",{enumerable:!0,get:function(){return r.AutoCapture}}),Object.defineProperty(e,"StatsigAutoCapturePlugin",{enumerable:!0,get:function(){return r.StatsigAutoCapturePlugin}}),Object.defineProperty(e,"runStatsigAutoCapture",{enumerable:!0,get:function(){return r.runStatsigAutoCapture}});var n=i(5423),i=(Object.defineProperty(e,"AutoCaptureEventName",{enumerable:!0,get:function(){return n.AutoCaptureEventName}}),Object.assign((0,s.l)(),{AutoCapture:r.AutoCapture,runStatsigAutoCapture:r.runStatsigAutoCapture,StatsigAutoCapturePlugin:r.StatsigAutoCapturePlugin}));e.default=i},5864:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ir=e.nr=e.rr=e.kn=e.cn=e.Sn=e.Ls=e.wn=e.St=e.gn=e.sr=void 0;const s=i(6914);function r(){var t=null!=(t=null==(t=null==(t=(0,s.te)())?void 0:t.location)?void 0:t.href)?t:"";let e;try{e=new URL(t)}catch(t){e=new URL("error:")}return e}function n(e){if(e){let t=e;for(;t;){var i=t.tagName.toLowerCase();if(["body","document"].includes(i))return null;if("a"===t.tagName.toLowerCase())return t;t=t.parentElement}}return null}e.sr=function(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>null!=t&&""!==t&&void 0!==t))},e.gn=function(t){if(!t)return null;let e=t.target||t.srcElement;return e&&e instanceof Element?e=3===e.nodeType?e.parentNode||null:e:null},e.St=function(t,e){if(!t||!e||1!==e.nodeType)return!1;var i=e.tagName.toLowerCase(),s=t.type.toLowerCase();switch(i){case"html":return!1;case"form":return"submit"===s;case"input":case"select":case"textarea":return["change"].includes(s);default:if("click"===s){if("button"===i)return!0;if(n(e))return!0}return!1}},e.wn=r,e.Ls=function(){var t=r().toString();return t.startsWith("error:")?"":t},e.Sn=function(){return(0,s.Gt)()||""},e.cn=function(t,e,i){t&&t.addEventListener&&t.addEventListener(e,i,!0)},e.kn=function(){var t=(0,s.te)();return t&&t.navigator&&t.navigator.connection||null},e.rr=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return null}},e.nr=function(){try{return(new Date).getTimezoneOffset()}catch(t){return null}},e.ir=n},3769:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lr=e.pn=void 0;const l=i(6914),h=i(5864),s=1e3,r=100,o=50;function n(t,e){return t?t.length>e?t.substring(0,e)+"...":t:null}function u(t){var e={},i=Array.from(t.classList);return e.classList=0<i.length?i.slice(0,r):null,e.class=(n(t.getAttribute("class"),s)||"").replace(/\s+/g," ").trim(),e.id=n(t.getAttribute("id"),s),e.ariaLabel=n(t.getAttribute("aria-label"),s),e.selector=function(e){if(!e)return"";if(!e.parentNode){var i=e.tagName.toLowerCase();if(e.id)return"#"+e.id;let t=i;return e.className&&"string"==typeof e.className&&0<(i=e.className.trim().split(/\s+/)).length&&""!==i[0]&&(t+="."+i.join(".")),t}var t=[];let s=e,r=0;for(;s&&s.nodeType===Node.ELEMENT_NODE&&r<o;){var n=function(s){var t=s.tagName.toLowerCase();if(s.id)return"#"+s.id;let r=t;s.className&&"string"==typeof s.className&&0<(t=s.className.trim().split(/\s+/)).length&&""!==t[0]&&(r+="."+t.join("."));t=s.parentElement;if(t&&1<t.children.length){let t=1,e=1,i=s.previousElementSibling;for(;i;)t++,i.tagName===s.tagName&&e++,i=i.previousElementSibling;r+=`:nth-child(${t})`,(1<e||function(t){let e=t.nextElementSibling;for(;e;){if(e.tagName===t.tagName)return 1;e=e.nextElementSibling}return}(s))&&(r+=`:nth-of-type(${e})`)}return r}(s);if(t.unshift(n),s.id)break;if((s=s.parentElement)&&"body"===s.tagName.toLowerCase())break;r++}return t.join(" > ")}(t),e}e.pn=function(t){var e,i,s,r=t.tagName.toLowerCase(),n={},o=(0,l.Gt)()||"",a=(n.tagName=r,u(t));return Object.assign(n,a),"form"===r&&Object.assign(n,((a={}).action=(e=t).getAttribute("action"),a.method=null!=(i=e.getAttribute("method"))?i:"GET",a.formName=e.getAttribute("name"),a.formId=e.getAttribute("id"),a)),["input","select","textarea"].includes(r)&&"password"!==t.getAttribute("type")&&Object.assign(n,((i={}).content=(e=t).value,i.inputName=e.getAttribute("name"),i)),(a=(0,h.ir)(t))&&Object.assign(n,((s={}).href=a.getAttribute("href"),s)),"button"!==r&&!a||Object.assign(n,((s={}).content=((r=a||t).textContent||"").trim(),r=function(t){var e={};if(t){var i=null==t?void 0:t.dataset;if(i)for(const s in i)e["data-"+s]=i[s]||""}return e}(r),Object.assign(s,r),s)),{value:o,metadata:n}},e.lr=u},9900:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ji=e.$i=e.ur=void 0;const n=i(6914),o=i(5864);function a(t){var e=(0,n.de)(),i=(0,n.te)();return(0,o.sr)(Object.assign({title:null==e?void 0:e.title,current_url:null==(e=null==i?void 0:i.location)?void 0:e.href,user_agent:null!=(e=null==i?void 0:i.navigator)&&e.userAgent&&200<(null==(e=null==(e=null==i?void 0:i.navigator)?void 0:e.userAgent)?void 0:e.length)?i.navigator.userAgent.substring(0,200):null==(e=null==i?void 0:i.navigator)?void 0:e.userAgent,locale:null==(e=null==i?void 0:i.navigator)?void 0:e.language,hostname:t.hostname,pathname:t.pathname,screen_width:null==(e=null==i?void 0:i.screen)?void 0:e.width,screen_height:null==(t=null==i?void 0:i.screen)?void 0:t.height,viewport_width:null==i?void 0:i.innerWidth,viewport_height:null==i?void 0:i.innerHeight,timestamp:Date.now(),timezone:(0,o.rr)(),timezone_offset:(0,o.nr)()},s()))}function s(){var t=(0,o.kn)(),e={};return void 0!==(null==t?void 0:t.effectiveType)&&(e.effective_connection_type=t.effectiveType),void 0!==(null==t?void 0:t.rtt)&&(e.rtt_ms=t.rtt),void 0!==(null==t?void 0:t.downlink)&&(e.downlink_mbps=t.downlink,e.downlink_kbps=1e3*t.downlink),void 0!==(null==t?void 0:t.saveData)&&(e.save_data=t.saveData),e}e.ur=a,e.$i=function(t){var e=(0,n.de)(),i=(0,n.te)();if(!e||!i)return{};var i=function(t){t=(null==t?void 0:t.referrer)||"";if(!t)return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""};try{var e=new URL(t);const r=e.hostname;var i=["google","bing","yahoo","duckduckgo","baidu"].find(t=>r.includes(t+"."))||"",s=e.searchParams.get("yahoo"===i?"p":"q")||"";return{referrer:t,referrer_domain:e.hostname,referrer_path:e.pathname,searchEngine:i,searchQuery:s}}catch(t){return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""}}}(e),e=a(t),s=function(t){const i=t.searchParams,s={};return["utm_source","utm_medium","utm_campaign","utm_term","utm_content","msclkid","dclid","fbclid","gad_source","gclid","gclsrc","wbraid","utm_id","irclid","igshid","_kx","li_fat_id","mc_cid","mc_eid","epik","qclid","rdt_cid","sccid","ttc","ttclid","ttc_id","twclid"].forEach(t=>{var e=i.get(t);e&&(s[t]=e)}),s}(t);const r={};return t.searchParams.forEach((t,e)=>{r[e]=t}),Object.assign(Object.assign({},e),(0,o.sr)(Object.assign(Object.assign(Object.assign({},i),s),r)))},e.Ji=s},3597:(O,A)=>{"use strict";Object.defineProperty(A,Symbol.toStringTag,{value:"Module"});var M,j=Object.defineProperty,a=(t,e,i)=>{return i=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},R=Object.defineProperty,x=(t,e,i)=>{return i=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},X=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(X||{});const E={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},T={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},F={},L=()=>!!globalThis.Zone;function B(t){if(F[t])return F[t];var e=globalThis[t];const i=e.prototype;var s=t in E?E[t]:void 0,s=Boolean(s&&s.every(t=>{return Boolean(null==(t=null==(t=Object.getOwnPropertyDescriptor(i,t))?void 0:t.get)?void 0:t.toString().includes("[native code]"))})),r=t in T?T[t]:void 0,r=Boolean(r&&r.every(t=>{return"function"==typeof i[t]&&(null==(t=i[t])?void 0:t.toString().includes("[native code]"))}));if(s&&r&&!L())return F[t]=e.prototype,e.prototype;try{var n,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(n=a[t].prototype,document.body.removeChild(o),n?F[t]=n:i):e.prototype}catch{return i}}const U={};function P(t,e,i){var s=t+"."+String(i);return U[s]?U[s].call(e):(t=B(t),(t=null==(t=Object.getOwnPropertyDescriptor(t,i))?void 0:t.get)?(U[s]=t).call(e):e[i])}const G={};function W(t,e,i){var s=t+"."+String(i);return G[s]?G[s].bind(e):"function"!=typeof(t=B(t)[i])?e[i]:(G[s]=t).bind(e)}const $={childNodes:function(t){return P("Node",t,"childNodes")},parentNode:function(t){return P("Node",t,"parentNode")},parentElement:function(t){return P("Node",t,"parentElement")},textContent:function(t){return P("Node",t,"textContent")},contains:function(t,e){return W("Node",t,"contains")(e)},getRootNode:function(t){return W("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?P("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?P("Element",t,"shadowRoot"):null},querySelector:function(t,e){return P("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return P("Element",t,"querySelectorAll")(e)},mutationObserver:function(){return B("MutationObserver").constructor}};function V(t){return t.nodeType===t.ELEMENT_NODE}function z(t){var e=t&&"host"in t&&"mode"in t&&$.host(t)||null;return Boolean(e&&"shadowRoot"in e&&$.shadowRoot(e)===t)}function Z(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function st(t){try{var i=t.rules||t.cssRules;if(!i)return null;let e=t.href;!e&&t.ownerNode&&t.ownerNode.ownerDocument&&(e=t.ownerNode.ownerDocument.location.href);var s=Array.from(i,t=>Y(t,e)).join("");return r=(r=s).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")?r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):r}catch(t){return null}var r}function Y(i,e){if("styleSheet"in i){let e;try{e=st(i.styleSheet)||((s=(t=i).cssText).split('"').length<3?s:(s=["@import",`url(${JSON.stringify(t.href)})`],""===t.layerName?s.push("layer"):t.layerName&&s.push(`layer(${t.layerName})`),t.supportsText&&s.push(`supports(${t.supportsText})`),t.media.length&&s.push(t.media.mediaText),s.join(" ")+";"))}catch(t){e=i.cssText}return i.styleSheet.href?dt(e,i.styleSheet.href):e}{let t=i.cssText;return"selectorText"in i&&i.selectorText.includes(":")&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?dt(t,e):t}var t,s}class rt{constructor(){x(this,"idNodeMap",new Map),x(this,"nodeMetaMap",new WeakMap)}getId(t){return t?(null==(t=this.getMeta(t))?void 0:t.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){var i=e.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,e)}replace(t,e){var i=this.getNode(t);i&&(i=this.nodeMetaMap.get(i))&&this.nodeMetaMap.set(e,i),this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function nt({element:t,maskInputOptions:e,tagName:i,type:s,value:r,maskInputFn:n}){let o=r||"";r=s&&ot(s);return o=e[i.toLowerCase()]||r&&e[r]?n?n(o,t):"*".repeat(o.length):o}function ot(t){return t.toLowerCase()}const at="__rrweb_original__";function lt(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?ot(e):null}function K(t,e){let i;try{i=new URL(t,e??window.location.href)}catch(t){return null}t=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==t?void 0:t[1])??null}const J=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ht=/^(?:[a-z+]+:)?\/\//i,ut=/^www\..*/i,ct=/^(data:)([^,]*),(.*)/i;function dt(t,l){return(t||"").replace(J,(t,e,i,s,r,n)=>{i=i||r||n,r=e||s||"";if(!i)return t;if(ht.test(i)||ut.test(i))return`url(${r}${i}${r})`;if(ct.test(i))return`url(${r}${i}${r})`;if("/"===i[0])return`url(${r}${function(t){let e="";return e=(e=-1<t.indexOf("//")?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]}(l)+i}${r})`;var o=l.split("/"),n=i.split("/");o.pop();for(const a of n)"."!==a&&(".."===a?o.pop():o.push(a));return`url(${r}${o.join("/")}${r})`})}function ft(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function vt(t,e){return function(e,t){var i=Array.from(t.childNodes),s=[];if(1<i.length&&e&&"string"==typeof e){var r=ft(e);for(let t=1;t<i.length;t++)if(i[t].textContent&&"string"==typeof i[t].textContent){var n=ft(i[t].textContent);for(let t=3;t<n.length;t++){var o=n.substring(0,t);if(2===r.split(o).length){var a=r.indexOf(o);for(let t=a;t<e.length;t++)if(ft(e.substring(0,t)).length===a){s.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return s.push(e),s}(t,e).join("/* rr_split */")}let pt=1;const mt=new RegExp("[^a-z0-9-_:]"),gt=-2;function bt(){return pt++}let yt,wt;const St=/^[^ \t\n\r\u000c]+/,It=/^[, \t\n\r\u000c]+/;function Ct(s,r){if(""===r.trim())return r;let n=0;function t(t){var t=t.exec(r.substring(n));return t?(t=t[0],n+=t.length,t):""}for(var o=[];t(It),!(n>=r.length);){let i=t(St);if(","===i.slice(-1))i=_t(s,i.substring(0,i.length-1)),o.push(i);else{let t="",e=(i=_t(s,i),!1);for(;;){var a=r.charAt(n);if(""===a){o.push((i+t).trim());break}if(e)")"===a&&(e=!1);else{if(","===a){n+=1,o.push((i+t).trim());break}"("===a&&(e=!0)}t+=a,n+=1}}}return o.join(", ")}const kt=new WeakMap;function _t(t,e){return e&&""!==e.trim()?Ot(t,e):e}function Ot(t,e){let i=kt.get(t);if(i||(i=t.createElement("a"),kt.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function At(t,e,i,s){return s&&("src"!==i&&("href"!==i||"use"===e&&"#"===s[0])&&("xlink:href"!==i||"#"===s[0])&&("background"!==i||"table"!==e&&"td"!==e&&"th"!==e)?"srcset"===i?Ct(t,s):"style"===i?dt(s,Ot(t)):"object"===e&&"data"===i?_t(t,s):s:_t(t,s))}function Mt(t,e){return("video"===t||"audio"===t)&&"autoplay"===e}function jt(e,i,t){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!t&&jt($.parentNode(e),i,t);for(let t=e.classList.length;t--;){var s=e.classList[t];if(i.test(s))return!0}return!!t&&jt($.parentNode(e),i,t)}function Rt(t,e,i,s){let r;if(V(t)){if(r=t,!$.childNodes(r).length)return!1}else{if(null===$.parentElement(t))return!1;r=$.parentElement(t)}try{if("string"==typeof e){if(s){if(r.closest("."+e))return!0}else if(r.classList.contains(e))return!0}else if(jt(r,e,s))return!0;if(i)if(s){if(r.closest(i))return!0}else if(r.matches(i))return!0}catch(t){}return!1}function xt(i,t){var e,s,r,{doc:n,mirror:t,blockClass:o,blockSelector:a,needsMask:l,inlineStylesheet:h,maskInputOptions:F={},maskTextFn:L,maskInputFn:B,dataURLOptions:U={},inlineImages:P,recordCanvas:G,keepIframeSrcFn:W,newlyAddedElement:V=!1,cssCaptured:z=!1}=t,u=(e=n,!(t=t).hasNode(e)||1===(t=t.getId(e))?void 0:t);switch(i.nodeType){case i.DOCUMENT_NODE:return"CSS1Compat"!==i.compatMode?{type:X.Document,childNodes:[],compatMode:i.compatMode}:{type:X.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:u};case i.ELEMENT_NODE:{var c=i;var d={doc:n,blockClass:o,blockSelector:a,inlineStylesheet:h,maskInputOptions:F,maskInputFn:B,dataURLOptions:U,inlineImages:P,recordCanvas:G,keepIframeSrcFn:W,newlyAddedElement:V,rootId:u};const{doc:b,blockClass:y,blockSelector:w,inlineStylesheet:S,maskInputOptions:I={},maskInputFn:C,dataURLOptions:k={},inlineImages:_,recordCanvas:O,keepIframeSrcFn:A,newlyAddedElement:M=!1,rootId:j}=d,R=function(e,i,t){try{if("string"==typeof i){if(e.classList.contains(i))return!0}else for(let t=e.classList.length;t--;){var s=e.classList[t];if(i.test(s))return!0}if(t)return e.matches(t)}catch(t){}return!1}(c,y,w),x=function(t){return t instanceof HTMLFormElement?"form":(t=ot(t.tagName),mt.test(t)?"div":t)}(c);let e={};var Z=c.attributes.length;for(let t=0;t<Z;t++){var f=c.attributes[t];Mt(x,f.name,f.value)||(e[f.name]=At(b,x,ot(f.name),f.value))}if("link"===x&&S){d=Array.from(b.styleSheets).find(t=>t.href===c.href);let t=null;(t=d?st(d):t)&&(delete e.rel,delete e.href,e.ws=t)}if("style"===x&&c.sheet){let t=st(c.sheet);t&&(1<c.childNodes.length&&(t=vt(t,c)),e.ws=t)}"input"!==x&&"textarea"!==x&&"select"!==x||(d=c.value,s=c.checked,"radio"!==e.type&&"checkbox"!==e.type&&"submit"!==e.type&&"button"!==e.type&&d?e.value=nt({element:c,type:lt(c),tagName:x,value:d,maskInputOptions:I,maskInputFn:C}):s&&(e.checked=s));"option"===x&&(c.selected&&!I.select?e.selected=!0:delete e.selected);"dialog"===x&&c.open&&(e.rr_open_mode=c.matches("dialog:modal")?"modal":"non-modal");"canvas"===x&&O&&("2d"===c.__context?function(i){var s=i.getContext("2d");if(s)for(let e=0;e<i.width;e+=50)for(let t=0;t<i.height;t+=50){var r=s.getImageData,r=at in r?r[at]:r;if(new Uint32Array(r.call(s,e,t,Math.min(50,i.width-e),Math.min(50,i.height-t)).data.buffer).some(t=>0!==t))return}return 1}(c)||(e.rr_dataURL=c.toDataURL(k.type,k.quality)):"__context"in c||(d=c.toDataURL(k.type,k.quality),(s=b.createElement("canvas")).width=c.width,s.height=c.height,r=s.toDataURL(k.type,k.quality),d!==r&&(e.rr_dataURL=d)));if("img"===x&&_){yt||(yt=b.createElement("canvas"),wt=yt.getContext("2d"));const E=c,T=E.currentSrc||E.getAttribute("src")||"<unknown-src>",N=E.crossOrigin,D=()=>{E.removeEventListener("load",D);try{yt.width=E.naturalWidth,yt.height=E.naturalHeight,wt.drawImage(E,0,0),e.rr_dataURL=yt.toDataURL(k.type,k.quality)}catch(t){if("anonymous"!==E.crossOrigin)return E.crossOrigin="anonymous",void(E.complete&&0!==E.naturalWidth?D():E.addEventListener("load",D));console.warn(`Cannot inline img src=${T}! Error: `+t)}"anonymous"===E.crossOrigin&&(N?e.crossOrigin=N:E.removeAttribute("crossorigin"))};E.complete&&0!==E.naturalWidth?D():E.addEventListener("load",D)}"audio"!==x&&"video"!==x||((r=e).rr_mediaState=c.paused?"paused":"played",r.rr_mediaCurrentTime=c.currentTime,r.rr_mediaPlaybackRate=c.playbackRate,r.rr_mediaMuted=c.muted,r.rr_mediaLoop=c.loop,r.rr_mediaVolume=c.volume);M||(c.scrollLeft&&(e.rr_scrollLeft=c.scrollLeft),c.scrollTop&&(e.rr_scrollTop=c.scrollTop));R&&({width:d,height:v}=c.getBoundingClientRect(),e={class:e.class,rr_width:d+"px",rr_height:v+"px"});"iframe"!==x||A(e.src)||(c.contentDocument||(e.rr_src=e.src),delete e.src);let t;try{customElements.get(x)&&(t=!0)}catch(t){}return{type:X.Element,tagName:x,attributes:e,childNodes:[],isSVG:function(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}(c)||void 0,needBlock:R,rootId:j,isCustom:t};return}case i.TEXT_NODE:{d=i;var v={doc:n,needsMask:l,maskTextFn:L,rootId:u,cssCaptured:z};var{needsMask:Y,maskTextFn:p,rootId:K,cssCaptured:J}=v,m=$.parentNode(d),m=m&&m.tagName;let t="";var g="STYLE"===m||void 0,m="SCRIPT"===m||void 0;m?t="SCRIPT_PLACEHOLDER":J||(t=$.textContent(d),g&&(t=t&&dt(t,Ot(v.doc))));!g&&!m&&t&&Y&&(t=p?p(t,$.parentElement(d)):t.replace(/[\S]/g,"*"));return{type:X.Text,textContent:t||"",rootId:K};return}case i.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:u};case i.COMMENT_NODE:return{type:X.Comment,textContent:$.textContent(i)||"",rootId:u};default:return!1}}function D(t){return null==t?"":t.toLowerCase()}function Et(e,t){const{doc:i,mirror:s,blockClass:r,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v={},inlineImages:p=!1,recordCanvas:m=!1,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:C=!1,cssCaptured:k=!1}=t;let _=t["needsMask"],{preserveWhiteSpace:O=!0}=t;_||(t=void 0===_,_=Rt(e,o,a,t));t=xt(e,{doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:_,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,dataURLOptions:v,inlineImages:p,recordCanvas:m,keepIframeSrcFn:I,newlyAddedElement:C,cssCaptured:k});if(!t)return console.warn(e,"not serialized"),null;let A;A=s.hasNode(e)?s.getId(e):function(t,e){if(e.comment&&t.type===X.Comment)return 1;if(t.type===X.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===K(t.attributes.href)))return 1;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(D(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===D(t.attributes.name)||"icon"===D(t.attributes.rel)||"apple-touch-icon"===D(t.attributes.rel)||"shortcut icon"===D(t.attributes.rel))))return 1;if("meta"===t.tagName){if(e.headMetaDescKeywords&&D(t.attributes.name).match(/^description|keywords$/))return 1;if(e.headMetaSocial&&(D(t.attributes.property).match(/^(og|twitter|fb):/)||D(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===D(t.attributes.name)))return 1;if(e.headMetaRobots&&("robots"===D(t.attributes.name)||"googlebot"===D(t.attributes.name)||"bingbot"===D(t.attributes.name)))return 1;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return 1;if(e.headMetaAuthorship&&("author"===D(t.attributes.name)||"generator"===D(t.attributes.name)||"framework"===D(t.attributes.name)||"publisher"===D(t.attributes.name)||"progid"===D(t.attributes.name)||D(t.attributes.property).match(/^article:/)||D(t.attributes.property).match(/^product:/)))return 1;if(e.headMetaVerification&&("google-site-verification"===D(t.attributes.name)||"yandex-verification"===D(t.attributes.name)||"csrf-token"===D(t.attributes.name)||"p:domain_verify"===D(t.attributes.name)||"verify-v1"===D(t.attributes.name)||"verification"===D(t.attributes.name)||"shopify-checkout-api-token"===D(t.attributes.name)))return 1}}}(t,f)||!O&&t.type===X.Text&&!t.textContent.replace(/^\s+|\s+$/gm,"").length?gt:pt++;var M=Object.assign(t,{id:A});if(s.add(e,M),A===gt)return null;g&&g(e);let j=!l;if(M.type===X.Element&&(j=j&&!M.needBlock,delete M.needBlock,t=$.shadowRoot(e))&&Z(t)&&(M.isShadowHost=!0),(M.type===X.Document||M.type===X.Element)&&j){f.headWhitespace&&M.type===X.Element&&"head"===M.tagName&&(O=!1);var R={doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:_,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:O,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I,cssCaptured:!1};if(M.type!==X.Element||"textarea"!==M.tagName||void 0===M.attributes.value){M.type===X.Element&&void 0!==M.attributes.ws&&"string"==typeof M.attributes.ws&&(R.cssCaptured=!0);for(const T of Array.from($.childNodes(e))){var x=Et(T,R);x&&M.childNodes.push(x)}}let t=null;if(V(e)&&(t=$.shadowRoot(e)))for(const N of Array.from($.childNodes(t))){var E=Et(N,R);E&&(Z(t)&&(E.isShadow=!0),M.childNodes.push(E))}}t=$.parentNode(e);return t&&z(t)&&Z(t)&&(M.isShadow=!0),M.type===X.Element&&"iframe"===M.tagName&&function(i,s,r){var n=i.contentWindow;if(n){let t=!1,e;try{e=n.document.readyState}catch(t){return}if("complete"!==e){const o=setTimeout(()=>{t||(s(),t=!0)},r);void i.addEventListener("load",()=>{clearTimeout(o),t=!0,s()})}else{r="about:blank";if(n.location.href!==r||i.src===r||""===i.src)return setTimeout(s,0),i.addEventListener("load",s);i.addEventListener("load",s)}}}(e,()=>{var t=e.contentDocument;t&&b&&(t=Et(t,{doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:_,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:O,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I}))&&b(e,t)},y),M.type===X.Element&&"link"===M.tagName&&"string"==typeof M.attributes.rel&&("stylesheet"===M.attributes.rel||"preload"===M.attributes.rel&&"string"==typeof M.attributes.href&&"css"===K(M.attributes.href))&&function(t,e,i){let s=!1,r;try{r=t.sheet}catch(t){return}if(!r){const n=setTimeout(()=>{s||(e(),s=!0)},i);t.addEventListener("load",()=>{clearTimeout(n),s=!0,e()})}}(e,()=>{var t;w&&(t=Et(e,{doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:_,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:O,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I}))&&w(e,t)},S),M}function Tt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Nt(i){var e,s;return i.__esModule?i:("function"==typeof(e=i.default)?(s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:s={},Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(i).forEach(function(t){var e=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(s,t,e.get?e:{enumerable:!0,get:function(){return i[t]}})}),s)}function Dt(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}}var t={exports:{}},e=String,t=(t.exports=Dt(),t.exports.createColors=Dt,t.exports),i=Nt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ft=t,Lt=i;var t=class Go extends Error{constructor(t,e,i,s,r,n){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),s&&(this.source=s),n&&(this.plugin=n),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Go)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=Ft.isColorSupported);var i=(e=Lt&&t?Lt(e):e).split(/\r?\n/);let s=Math.max(this.line-3,0);var r=Math.min(this.line+2,i.length);let n=String(r).length,o,a;if(t){let{bold:e,gray:i,red:s}=Ft.createColors(!0);o=t=>e(s(t)),a=t=>i(t)}else o=a=t=>t;return i.slice(s,r).map((t,e)=>{var e=s+1+e,i=" "+(" "+e).slice(-n)+" | ";return e===this.line?(e=a(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(i)+t+"\n "+e+o("^")):" "+a(i)+t}).join("\n")}toString(){let t=this.showSourceCode();return t=t&&"\n\n"+t+"\n",this.name+": "+this.message+t}},s=t,t=(t.default=t,{});t.isClean=Symbol("isClean"),t.my=Symbol("my");const Bt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var r=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name;var s=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes?this.block(t,i+s):(e=(t.raws.between||"")+(e?";":""),this.builder(i+s+e,t))}beforeAfter(t,e){let i,s=(i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose"),t.parent),r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){var n=this.raw(t,null,"indent");if(n.length)for(let t=0;t<r;t++)i+=n}return i}block(t,e){var i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start");let s;(s=t.nodes&&t.nodes.length?(this.body(t),this.raw(t,"after")):this.raw(t,"after","emptyBody"))&&this.builder(s),this.builder("}",t,"end")}body(e){let i=e.nodes.length-1;for(;0<i&&"comment"===e.nodes[i].type;)--i;var s=this.raw(e,"semicolon");for(let t=0;t<e.nodes.length;t++){var r=e.nodes[t],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,i!==t||s)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon");let s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i=i||e,!e||void 0===(s=t.raws[e])){var r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return Bt[i];r=t.root();if(r.rawCache||(r.rawCache={}),void 0!==r.rawCache[i])return r.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var n="raw"+((n=i)[0].toUpperCase()+n.slice(1));this[n]?s=this[n](r,t):r.walk(t=>{if(void 0!==(s=t.raws[e]))return!1}),void 0===s&&(s=Bt[i]),r.rawCache[i]=s}return s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&0<t.nodes.length&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e=e&&e.replace(/\S/g,"")}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeDecl"):i&&i.replace(/\S/g,"")}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeRule"):i&&i.replace(/\S/g,"")}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(e){let i;return e.walk(t=>{if(t.nodes&&(t.parent!==e||e.first!==t)&&void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=i&&i.replace(/\S/g,"")}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(t=>{var e=t.parent;if(e&&e!==i&&e.parent&&e.parent===i&&void 0!==t.raws.before)return e=t.raws.before.split("\n"),s=(s=e[e.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],t=t.raws[e];return t&&t.value===i?t.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},n=r;r.default=r;let Ut=n;function Pt(t,e){new Ut(e).stringify(t)}r=Pt;Pt.default=Pt;let{isClean:Gt,my:Wt}=t,Vt=s,zt=n,Zt=r;function Yt(e,i){let s=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){let t=e[r];var n=typeof t;"parent"===r&&"object"==n?i&&(s[r]=i):"source"===r?s[r]=t:Array.isArray(t)?s[r]=t.map(t=>Yt(t,s)):("object"==n&&null!==t&&(t=Yt(t)),s[r]=t)}return s}var n=class{constructor(t={}){for(var e in this.raws={},this[Gt]=!1,this[Wt]=!0,t)if("nodes"===e){this.nodes=[];for(var i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){var e;return t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)&&(e=this.source,t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)),t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(var e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){var e,i=Yt(this);for(e in t)i[e]=t[e];return i}cloneAfter(t={}){t=this.clone(t);return this.parent.insertAfter(this,t),t}cloneBefore(t={}){t=this.clone(t);return this.parent.insertBefore(this,t),t}error(t,e={}){var i,s;return this.source?({end:i,start:s}=this.rangeBy(e),this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)):new Vt(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]!==i&&(t[e]=i,"prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0}}}markDirty(){if(this[Gt]){this[Gt]=!1;let t=this;for(;t=t.parent;)t[Gt]=!1}}next(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;return t.index?i=this.positionInside(t.index,e):t.word&&-1!==(t=(e=this.toString()).indexOf(t.word))&&(i=this.positionInside(t,e)),i}positionInside(e,t){var i=t||this.toString();let s=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===i[t]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};var s,r;return t.word?-1!==(r=(s=this.toString()).indexOf(t.word))&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s)):(t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1))),{end:i=i.line<e.line||i.line===e.line&&i.column<=e.column?{column:e.column+1,line:e.line}:i,start:e}}raw(t,e){return(new zt).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...i){if(this.parent){let t=this,e=!1;for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i,s={},r=null==e;e=e||new Map;let n=0;for(i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var o=this[i];if(Array.isArray(o))s[i]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)s[i]=o.toJSON(null,e);else if("source"===i){let t=e.get(o.input);null==t&&(t=n,e.set(o.input,n),n++),s[i]={end:o.end,inputId:t,start:o.start}}else s[i]=o}return r&&(s.inputs=[...e.keys()].map(t=>t.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Zt){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var s,r={node:this};for(s in i)r[s]=i[s];return t.warn(e,r)}get proxyOf(){return this}},o=n,n=(n.default=n,o),n=class extends n{constructor(t){super(t=t&&void 0!==t.value&&"string"!=typeof t.value?{...t,value:String(t.value)}:t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},l=n;n.default=n;n={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(s,r=21)=>(t=r)=>{let e="",i=t;for(;i--;)e+=s[Math.random()*s.length|0];return e}};let{SourceMapConsumer:Kt,SourceMapGenerator:Jt}=i,{existsSync:Xt,readFileSync:$t}=i,{dirname:Ht,join:qt}=i;var h=class{constructor(t,e){!1!==e.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=e.map?e.map.prev:void 0,t=this.loadMap(e.from,t),!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ht(this.mapFile)),t)&&(this.text=t)}consumer(){return this.consumerCache||(this.consumerCache=new Kt(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+e)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e,i=t.match(/\/\*\s*# sourceMappingURL=/gm);i&&(i=t.lastIndexOf(i.pop()),e=t.indexOf("*/",i),-1<i)&&-1<e&&(this.annotation=this.getAnnotationURL(t.substring(i,e)))}loadFile(t){if(this.root=Ht(t),Xt(t))return this.mapFile=t,$t(t,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Kt)return Jt.fromSourceMap(t).toString();if(t instanceof Jt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}t=t(e);if(t){var i=this.loadFile(t);if(i)return i;throw new Error("Unable to load previous source map: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=qt(Ht(e),t)),this.loadFile(t)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},u=h,{SourceMapConsumer:h,SourceMapGenerator:c}=(h.default=h,i);let{fileURLToPath:Qt,pathToFileURL:te}=i,{isAbsolute:ee,resolve:ie}=i,se=n["nanoid"];n=i;let re=s,ne=u,oe=Symbol("fromOffsetCache"),ae=Boolean(h&&c),le=Boolean(ie&&ee);h=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!le||/^\w+:\/\//.test(e.from)||ee(e.from)?this.file=e.from:this.file=ie(e.from)),le&&ae&&(t=new ne(this.css,e)).text&&(e=(this.map=t).consumer().file,!this.file)&&e&&(this.file=this.mapResolve(e)),this.file||(this.id="<input css "+se(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;e&&"object"==typeof e?(a=i,i="number"==typeof(l=e).offset?(e=(h=this.fromOffset(l.offset)).line,h.col):(e=l.line,l.column),o="number"==typeof a.offset?(h=this.fromOffset(a.offset),n=h.line,h.col):(n=a.line,a.column)):i||(e=(l=this.fromOffset(e)).line,i=l.col);var a,l,h=this.origin(e,i,n,o);return(r=h?new re(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new re(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin)).input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(te&&(r.input.url=te(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let s;if(this[oe])s=this[oe];else{var r=this.css.split("\n");s=new Array(r.length);let i=0;for(let t=0,e=r.length;t<e;t++)s[t]=i,i+=r[t].length+1;this[oe]=s}let i=0;if(s[s.length-1]<=e)i=s.length-1;else{let t=s.length-2;for(var n;i<t;)if(n=i+(t-i>>1),e<s[n])t=n-1;else{if(!(e>=s[n+1])){i=n;break}i=n+1}}return{col:e-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:ie(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;var r=this.map.consumer(),e=r.originalPositionFor({column:e,line:t});if(!e.source)return!1;let n;"number"==typeof i&&(n=r.originalPositionFor({column:s,line:i}));let o;o=ee(e.source)?te(e.source):new URL(e.source,this.map.consumer().sourceRoot||te(this.map.mapFile));t={column:e.column,endColumn:n&&n.column,endLine:n&&n.line,line:e.line,url:o.toString()};if("file:"===o.protocol){if(!Qt)throw new Error("file: protocol is not available in this PostCSS build");t.file=Qt(o)}s=r.sourceContentFor(e.source);return s&&(t.source=s),t}toJSON(){var t,e={};for(t of["hasBOM","css","file","id"])null!=this[t]&&(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}},c=h;h.default=h,n&&n.registerInput&&n.registerInput(h);let{SourceMapConsumer:he,SourceMapGenerator:ue}=i,{dirname:ce,relative:de,resolve:fe,sep:ve}=i,pe=i["pathToFileURL"],me=c,ge=Boolean(he&&ue),be=Boolean(ce&&fe&&de&&ve);n=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t,e=(t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map","\n");this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var i=this.toUrl(this.path(e.file)),s=e.root||ce(e.file);let t;!1===this.mapOpts.sourcesContent?(t=new he(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){var e;if(!1!==this.mapOpts.annotation)if(this.root)for(let t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),be&&ge&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){var t;return this.root?this.generateString():1===this.previous().length?((t=this.previous()[0].consumer()).file=this.outputFile(),this.map=ue.fromSourceMap(t,{ignoreInvalidMapping:!0})):(this.map=new ue({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>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new ue({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,r=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(t,e,i)=>{this.css+=t,e&&"end"!==i&&(o.generated.line=s,o.generated.column=r-1,e.source&&e.source.start?(o.source=this.sourcePath(e),o.original.line=e.source.start.line,o.original.column=e.source.start.column-1):(o.source=n,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=t.match(/\n/g))?(s+=a.length,l=t.lastIndexOf("\n"),r=t.length-l):r+=t.length,e&&"start"!==i&&(t=e.parent||{raws:{}},"decl"!==e.type&&("atrule"!==e.type||e.nodes)||e!==t.last||t.raws.semicolon)&&(e.source&&e.source.end?(o.source=this.sourcePath(e),o.original.line=e.source.end.line,o.original.column=e.source.end.column-1,o.generated.line=s,o.generated.column=r-2):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=r-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){var t;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(t=this.mapOpts.annotation)||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?ce(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=ce(fe(i,this.mapOpts.annotation)));e=de(i,t);return this.memoizedPaths.set(t,e),e}previous(){var t;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(t=>{t.source&&t.source.input.map&&(t=t.source.input.map,this.previousMaps.includes(t)||this.previousMaps.push(t))}):(t=new me(this.originalCSS,this.opts)).map&&this.previousMaps.push(t.map)),this.previousMaps}setSourcesContent(){let i={};var t;this.root?this.root.walk(t=>{var e;t.source&&(e=t.source.input.from)&&!i[e]&&(i[e]=!0,e=this.usesFileUrls?this.toFileUrl(e):this.toUrl(this.path(e)),this.map.setSourceContent(e,t.source.input.css))}):this.css&&(t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(t,this.css))}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(pe)return e=pe(t).toString(),this.memoizedFileURLs.set(t,e),e;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===ve&&(t=t.replace(/\\/g,"/"));e=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,e),e}},h=class extends o{constructor(t){super(t),this.type="comment"}},i=h;h.default=h;let{isClean:ye,my:we}=t,Se=l,Ie=i,Ce,ke,_e,Oe;let Ae=class Wo extends o{append(...t){for(var e of t){var i;for(i of this.normalize(e,this.last))this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(i){if(this.proxyOf.nodes){var s=this.getIterator();let t,e;for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(e=i(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],e}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(e,s){return"proxyOf"===s?e:e[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...t)=>e[s](...t.map(i=>"function"==typeof i?(t,e)=>i(t.toProxy(),e):i)):"every"===s||"some"===s?i=>e[s]((t,...e)=>i(t.toProxy(),...e)):"root"===s?()=>e.root().toProxy():"nodes"===s?e.nodes.map(t=>t.toProxy()):"first"===s||"last"===s?e[s].toProxy():e[s])},set(t,e,i){return t[e]!==i&&(t[e]=i,"name"===e||"params"===e||"selector"===e)&&t.markDirty(),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n]).reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n+1,0,i);for(r in this.indexes)n<(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}insertBefore(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n,0,i);for(r in this.indexes)n<=(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}normalize(t,e){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(Ce(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var s of t=t.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Se(t)]}else if(t.selector)t=[new ke(t)];else if(t.name)t=[new _e(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Ie(t)]}return t.map(t=>(t[we]||Wo.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[ye]&&function t(e){if(e[ye]=!1,e.proxyOf.nodes)for(var i of e.proxyOf.nodes)t(i)}(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...t){for(var e of t=t.reverse()){var i,s,r=this.normalize(e,this.first,"prepend").reverse();for(i of r)this.proxyOf.nodes.unshift(i);for(s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(t){return(t.parent=this).proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e,i;for(i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t<=(e=this.indexes[i])&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(e,i,s){return s||(s=i,i={}),this.walkDecls(t=>{i.props&&!i.props.includes(t.prop)||i.fast&&!t.value.includes(i.fast)||(t.value=t.value.replace(e,s))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(s){return this.each((e,t)=>{let i;try{i=s(e,t)}catch(t){throw e.addToError(t)}return i=!1!==i&&e.walk?e.walk(s):i})}walkAtRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("atrule"===t.type&&i.test(t.name))return s(t,e)}):this.walk((t,e)=>{if("atrule"===t.type&&t.name===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("atrule"===t.type)return s(t,e)}))}walkComments(i){return this.walk((t,e)=>{if("comment"===t.type)return i(t,e)})}walkDecls(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("decl"===t.type&&i.test(t.prop))return s(t,e)}):this.walk((t,e)=>{if("decl"===t.type&&t.prop===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("decl"===t.type)return s(t,e)}))}walkRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("rule"===t.type&&i.test(t.selector))return s(t,e)}):this.walk((t,e)=>{if("rule"===t.type&&t.selector===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("rule"===t.type)return s(t,e)}))}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]}};Ae.registerParse=t=>{Ce=t},Ae.registerRule=t=>{ke=t},Ae.registerAtRule=t=>{_e=t},Ae.registerRoot=t=>{Oe=t};var h=Ae,d=((Ae.default=Ae).rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,_e.prototype):"rule"===t.type?Object.setPrototypeOf(t,ke.prototype):"decl"===t.type?Object.setPrototypeOf(t,Se.prototype):"comment"===t.type?Object.setPrototypeOf(t,Ie.prototype):"root"===t.type&&Object.setPrototypeOf(t,Oe.prototype),t[we]=!0,t.nodes&&t.nodes.forEach(t=>{Ae.rebuild(t)})},h);let Me,je;var d=class extends d{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Me(new je,this,t).stringify()}},f=(d.registerLazyResult=t=>{Me=t},d.registerProcessor=t=>{je=t},d);d.default=d;var d=class{constructor(t,e={}){for(var i in this.type="warning",this.text=t,e.node&&e.node.source&&(t=e.node.rangeBy(e),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),e)this[i]=e[i]}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}},v=d;d.default=d;let Re=v;var d=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);t=new Re(t,e);return this.messages.push(t),t}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},p=d;d.default=d;const xe="'".charCodeAt(0),Ee='"'.charCodeAt(0),Te="\\".charCodeAt(0),Ne="/".charCodeAt(0),De="\n".charCodeAt(0),Fe=" ".charCodeAt(0),Le="\f".charCodeAt(0),Be="\t".charCodeAt(0),Ue="\r".charCodeAt(0),Pe="[".charCodeAt(0),Ge="]".charCodeAt(0),We="(".charCodeAt(0),Ve=")".charCodeAt(0),ze="{".charCodeAt(0),Ze="}".charCodeAt(0),Ye=";".charCodeAt(0),Ke="*".charCodeAt(0),Je=":".charCodeAt(0),Xe="@".charCodeAt(0),$e=/[\t\n\f\r "#'()/;[\\\]{}]/g,He=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,qe=/.[\r\n"'(/\\]/,Qe=/[\da-f]/i;var d=class extends h{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},m=d,d=(h.registerAtRule(d.default=d),h);let ti,ei;var g=class extends d{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){t=super.normalize(t);if(e)if("prepend"===i)1<this.nodes.length?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var s of t)s.raws.before=e.raws.before;return t}removeChild(t,e){var i=this.index(t);return!e&&0===i&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new ti(new ei,this,t).stringify()}},b=(g.registerLazyResult=t=>{ti=t},g.registerProcessor=t=>{ei=t},g);d.registerRoot(g.default=g);let ii={comma(t){return ii.split(t,[","],!0)},space(t){return ii.split(t,[" ","\n","\t"])},split(t,e,i){var s,r=[];let n="",o=!1,a=0,l=!1,h="",u=!1;for(s of t)u?u=!1:"\\"===s?u=!0:l?s===h&&(l=!1):'"'===s||"'"===s?(l=!0,h=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&e.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return!i&&""===n||r.push(n.trim()),r}};d=ii;ii.default=ii;let si=d;var g=class extends h{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return si.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,e=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(e)}},y=g;h.registerRule(g.default=g);let ri=l,ni=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,h,u,c,d,f,v,p=s.length,m=0,g=[],b=[];function y(t){throw e.error("Unclosed "+t,m)}return{back:function(t){b.push(t)},endOfFile:function(){return 0===b.length&&m>=p},nextToken:function(t){if(b.length)return b.pop();if(!(m>=p)){var e=!!t&&t.ignoreUnclosed;switch(n=s.charCodeAt(m)){case De:case Fe:case Be:case Ue:case Le:for(o=m;o+=1,(n=s.charCodeAt(o))===Fe||n===De||n===Be||n===Ue||n===Le;);v=["space",s.slice(m,o)],m=o-1;break;case Pe:case Ge:case ze:case Ze:case Je:case Ye:case Ve:var i=String.fromCharCode(n);v=[i,i,m];break;case We:if(d=g.length?g.pop()[1]:"",f=s.charCodeAt(m+1),"url"===d&&f!==xe&&f!==Ee&&f!==Fe&&f!==De&&f!==Be&&f!==Le&&f!==Ue){o=m;do{if(u=!1,-1===(o=s.indexOf(")",o+1))){if(r||e){o=m;break}y("bracket")}for(c=o;s.charCodeAt(c-1)===Te;)--c,u=!u}while(u);v=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||qe.test(l)?v=["(","(",m]:(v=["brackets",l,m,o],m=o);break;case xe:case Ee:a=n===xe?"'":'"',o=m;do{if(u=!1,-1===(o=s.indexOf(a,o+1))){if(r||e){o=m+1;break}y("string")}for(c=o;s.charCodeAt(c-1)===Te;)--c,u=!u}while(u);v=["string",s.slice(m,o+1),m,o],m=o;break;case Xe:$e.lastIndex=m+1,$e.test(s),o=0===$e.lastIndex?s.length-1:$e.lastIndex-2,v=["at-word",s.slice(m,o+1),m,o],m=o;break;case Te:for(o=m,h=!0;s.charCodeAt(o+1)===Te;)o+=1,h=!h;if(n=s.charCodeAt(o+1),h&&n!==Ne&&n!==Fe&&n!==De&&n!==Be&&n!==Ue&&n!==Le&&(o+=1,Qe.test(s.charAt(o)))){for(;Qe.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Fe&&(o+=1)}v=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(n===Ne&&s.charCodeAt(m+1)===Ke?(0===(o=s.indexOf("*/",m+2)+1)&&(r||e?o=s.length:y("comment")),v=["comment",s.slice(m,o+1),m,o]):(He.lastIndex=m+1,He.test(s),o=0===He.lastIndex?s.length-1:He.lastIndex-2,v=["word",s.slice(m,o+1),m,o],g.push(v)),o)}return m++,v}},position:function(){return m}}},oi=i,ai=m,li=b,hi=y;const ui={empty:!0,space:!0};let ci=class{constructor(t){this.input=t,this.root=new li,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i=new ai;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let s,r,n=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?l.push("("===e?")":"]"):"{"===e&&0<l.length?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(0<a.length){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(t);break}}if(a.push(t),this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(s){var r=this.colon(s);if(!1!==r){let e=0,i;for(let t=r-1;0<=t&&("space"===(i=s[t])[0]||2!==(e+=1));t--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){let e=0,i,s,r;for(var[n,o]of t.entries()){if("("===(s=(i=o)[0])&&(e+=1),")"===s&&--e,0===e&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return n}this.doubleColon(i)}r=i}return!1}comment(t){var e=new oi,t=(this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,t[1].slice(2,-2));/^\s*$/.test(t)?(e.text="",e.raws.left=t,e.raws.right=""):(t=t.match(/^(\s*)([^]*\S)(\s*)$/),e.text=t[2],e.raws.left=t[1],e.raws.right=t[3])}createTokenizer(){this.tokenizer=ni(this.input)}decl(t,e){var i,s=new ri,r=(this.init(s,t[0][2]),t[t.length-1]);for(";"===r[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;0<=t;t--){var i=e[t],i=i[3]||i[2];if(i)return i}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){var n=t[0][0];if(":"===n||"space"===n||"comment"===n)break;s.prop+=t.shift()[1]}s.raws.between="";let o;for(;t.length;){if(":"===(o=t.shift())[0]){s.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let i=t.length-1;0<=i;i--){if("!important"===(o=t[i])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(t,i);" !important"!==(l=this.spacesFromEnd(t)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var h=t.slice(0);let e="";for(let t=i;0<t;t--){var u=h[t][0];if(0===e.trim().indexOf("!")&&"space"!==u)break;e=h.pop()[1]+e}0===e.trim().indexOf("!")&&(s.important=!0,s.raws.important=e,t=h)}if("space"!==o[0]&&"comment"!==o[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(s.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new hi;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){this.spaces+=t[1],this.current.nodes&&(t=this.current.nodes[this.current.nodes.length-1])&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1;var i;let s=!1,r=null;var n=[],o=t[1].startsWith("--"),a=[];let l=t;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)r=r||l,n.push("("===i?")":"]");else if(o&&s&&"{"===i)r=r||l,n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length)&&(r=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),0<n.length&&this.unclosedBracket(r),e&&s){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){var r,n,o,a,l=i.length;let h="",u=!0;for(let t=0;t<l;t+=1)"space"===(o=(r=i[t])[0])&&t===l-1&&!s||"comment"===o&&(o=i[t-1]?i[t-1][0]:"empty",n=i[t+1]?i[t+1][0]:"empty",ui[o]||ui[n]||","===h.slice(-1))?u=!1:h+=r[1];u||(a=i.reduce((t,e)=>t+e[1],""),t.raws[e]={raw:a,value:h}),t[e]=h}rule(t){t.pop();var e=new hi;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){var e;let i="";for(;t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){var e;let i="";for(;t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e="";for(;t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(e,i){let s="";for(let t=i;t<e.length;t++)s+=e[t][1];return e.splice(i,e.length-i),s}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},di=c;function fi(t,e){t=new di(t,e),e=new ci(t);try{e.parse()}catch(t){throw t}return e.root}g=fi;h.registerParse(fi.default=fi);let{isClean:vi,my:pi}=t,mi=n,gi=r,bi=h;t=f;let yi=p,wi=g;var w=b;const Si={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ii={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},Ci={Once:!0,postcssPlugin:!0,prepare:!0},ki=0;function _i(t){return"object"==typeof t&&"function"==typeof t.then}function Oi(t){let e=!1;var i=Si[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,ki,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,ki,i+"Exit"]:[i,i+"Exit"]}function Ai(t){let e;return{eventIndex:0,events:e="document"===t.type?["Document",ki,"DocumentExit"]:"root"===t.type?["Root",ki,"RootExit"]:Oi(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function Mi(t){return t[vi]=!1,t.nodes&&t.nodes.forEach(t=>Mi(t)),t}let ji={};var S=class Vo{constructor(t,e,i){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof e||null===e||"root"!==e.type&&"document"!==e.type)if(e instanceof Vo||e instanceof yi)s=Mi(e.root),e.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=e.map);else{let t=wi;i.syntax&&(t=i.syntax.parse),(t=i.parser?i.parser:t).parse&&(t=t.parse);try{s=t(e,i)}catch(t){this.processed=!0,this.error=t}s&&!s[pi]&&bi.rebuild(s)}else s=Mi(e);this.result=new yi(t,s,i),this.helpers={...ji,postcss:ji,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{e&&e.addToError(t),"CssSyntaxError"!==(this.error=t).name||t.plugin?i.postcssVersion:(t.plugin=i.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t,e=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(t of this.plugins)if("object"==typeof t)for(var i in t){if(!Ii[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ci[i])if("object"==typeof t[i])for(var s in t[i])"*"===s?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let t=this.plugin=0;t<this.plugins.length;t++){var e=this.plugins[t],e=this.runOnRoot(e);if(_i(e))try{await e}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){for(var i,s=this.result.root;!s[vi];){s[vi]=!0;for(var r=[Ai(s)];0<r.length;){var n=this.visitTick(r);if(_i(n))try{await n}catch(t){n=r[r.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[t,e]of this.listeners.OnceExit){this.result.lastPlugin=t;try{"document"===s.type?(i=s.nodes.map(t=>e(t,this.helpers)),await Promise.all(i)):await e(s,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{var t;return"object"==typeof e&&e.Once?"document"===this.result.root.type?_i((t=this.result.root.nodes.map(t=>e.Once(t,this.helpers)))[0])?Promise.all(t):t:e.Once(this.result.root,this.helpers):"function"==typeof e?e(this.result.root,this.result):void 0}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var e=this.result.opts;let t=gi;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);e=new mi(t,this.result.root,this.result.opts).generate();this.result.css=e[0],this.result.map=e[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(_i(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[vi];)e[vi]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,s]of t){this.result.lastPlugin=i;let t;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(_i(t))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:s}=e;if("root"===i.type||"document"===i.type||i.parent){if(0<s.length&&e.visitorIndex<s.length){var[r,n]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=r;try{return n(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[vi])return o[vi]=!0,void t.push(Ai(o));e.iterator=0,delete i.indexes[a]}for(var l=e.events;e.eventIndex<l.length;){var h=l[e.eventIndex];if(e.eventIndex+=1,h===ki)return void(i.nodes&&i.nodes.length&&(i[vi]=!0,e.iterator=i.getIterator()));if(this.listeners[h])return void(e.visitors=this.listeners[h])}}t.pop()}walkSync(t){var e;t[vi]=!0;for(e of Oi(t))if(e===ki)t.nodes&&t.each(t=>{t[vi]||this.walkSync(t)});else{var i=this.listeners[e];if(i&&this.visitSync(i,t.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"}},Ri=(S.registerPostcss=t=>{ji=t},S);w.registerLazyResult(S.default=S),t.registerLazyResult(S);let xi=n,Ei=r;let Ti=g;const Ni=p;w=class{constructor(t,e,i){e=e.toString(),this.stringified=!1,this.Ss=t,this.Cs=e,this.Is=i,this.ks=void 0;t=Ei;this.result=new Ni(this.Ss,void 0,this.Is),this.result.css=e;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});i=new xi(t,void 0,this.Is,e);i.isMap()?([t,e]=i.generate(),t&&(this.result.css=t),e&&(this.result.map=e)):(i.clearAnnotation(),this.result.css=i.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.Cs}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.Os)return this.Os;let t;var e=Ti;try{t=e(this.Cs,this.Is)}catch(t){this.error=t}if(this.error)throw this.error;return this.Os=t}get[Symbol.toStringTag](){return"NoWorkResult"}},t=w;w.default=w;let Di=t,Fi=Ri;S=f,n=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return e}process(t,e={}){return new(this.plugins.length||e.parser||e.stringifier||e.syntax?Fi:Di)(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},w=n;b.registerProcessor(n.default=n),S.registerProcessor(n);let Li=l,Bi=u,Ui=i,Pi=m,Gi=c,Wi=b,Vi=y;function zi(t,i){if(Array.isArray(t))return t.map(t=>zi(t));let{inputs:e,...s}=t;if(e){i=[];for(var r of e){r={...r,__proto__:Gi.prototype};r.map&&(r.map={...r.map,__proto__:Bi.prototype}),i.push(r)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>zi(t,i))),s.source){let{inputId:t,...e}=s.source;s.source=e,null!=t&&(s.source.input=i[t])}if("root"===s.type)return new Wi(s);if("decl"===s.type)return new Li(s);if("rule"===s.type)return new Vi(s);if("comment"===s.type)return new Ui(s);if("atrule"===s.type)return new Pi(s);throw new Error("Unknown node type: "+t.type)}t=zi,zi.default=zi,S=s;let Zi=l;n=Ri,u=h;let Yi=w;s=r,l=t;let Ki=f;Ri=v;let Ji=i,Xi=m;h=p,w=c,r=g,t=d;let $i=y,Hi=b;f=o;function I(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Yi(t)}I.plugin=function(e,i){let s=!1;function r(...t){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");t=i(...t);return t.postcssPlugin=e,t.postcssVersion=(new Yi).version,t}let t;return Object.defineProperty(r,"postcss",{get(){return t=t||r()}}),r.process=function(t,e,i){return I([r(i)]).process(t,e)},r},I.stringify=s,I.parse=r,I.fromJSON=l,I.list=t,I.comment=t=>new Ji(t),I.atRule=t=>new Xi(t),I.decl=t=>new Zi(t),I.rule=t=>new $i(t),I.root=t=>new Hi(t),I.document=t=>new Ki(t),I.CssSyntaxError=S,I.Declaration=Zi,I.Container=u,I.Processor=Yi,I.Document=Ki,I.Comment=Ji,I.Warning=Ri,I.AtRule=Xi,I.Result=h,I.Input=w,I.Rule=$i,I.Root=Hi,I.Node=f,n.registerPostcss(I);v=I,I.default=I,i=Tt(v);i.stringify,i.fromJSON,i.plugin,i.parse,i.list,i.document,i.comment,i.atRule,i.rule,i.decl,i.root,i.CssSyntaxError,i.Declaration,i.Container,i.Processor,i.Document,i.Comment,i.Warning,i.AtRule,i.Result,i.Input,i.Rule,i.Root,i.Node,Object.defineProperty;function qi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Qi(i){var e,s;return i.__esModule?i:("function"==typeof(e=i.default)?(s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:s={},Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(i).forEach(function(t){var e=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(s,t,e.get?e:{enumerable:!0,get:function(){return i[t]}})}),s)}function ts(){return{isColorSupported:!1,reset:C,bold:C,dim:C,italic:C,underline:C,inverse:C,hidden:C,strikethrough:C,black:C,red:C,green:C,yellow:C,blue:C,magenta:C,cyan:C,white:C,gray:C,bgBlack:C,bgRed:C,bgGreen:C,bgYellow:C,bgBlue:C,bgMagenta:C,bgCyan:C,bgWhite:C}}var m={exports:{}},C=String,p=(m.exports=ts(),m.exports.createColors=ts,m.exports),c=Qi(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let es=p,is=c;g=class zo extends Error{constructor(t,e,i,s,r,n){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),s&&(this.source=s),n&&(this.plugin=n),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,zo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=es.isColorSupported);var i=(e=is&&t?is(e):e).split(/\r?\n/);let s=Math.max(this.line-3,0);var r=Math.min(this.line+2,i.length);let n=String(r).length,o,a;if(t){let{bold:e,gray:i,red:s}=es.createColors(!0);o=t=>e(s(t)),a=t=>i(t)}else o=a=t=>t;return i.slice(s,r).map((t,e)=>{var e=s+1+e,i=" "+(" "+e).slice(-n)+" | ";return e===this.line?(e=a(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(i)+t+"\n "+e+o("^")):" "+a(i)+t}).join("\n")}toString(){let t=this.showSourceCode();return t=t&&"\n\n"+t+"\n",this.name+": "+this.message+t}},d=g,g.default=g,y={};y.isClean=Symbol("isClean"),y.my=Symbol("my");const ss={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};b=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name;var s=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes?this.block(t,i+s):(e=(t.raws.between||"")+(e?";":""),this.builder(i+s+e,t))}beforeAfter(t,e){let i,s=(i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose"),t.parent),r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){var n=this.raw(t,null,"indent");if(n.length)for(let t=0;t<r;t++)i+=n}return i}block(t,e){var i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start");let s;(s=t.nodes&&t.nodes.length?(this.body(t),this.raw(t,"after")):this.raw(t,"after","emptyBody"))&&this.builder(s),this.builder("}",t,"end")}body(e){let i=e.nodes.length-1;for(;0<i&&"comment"===e.nodes[i].type;)--i;var s=this.raw(e,"semicolon");for(let t=0;t<e.nodes.length;t++){var r=e.nodes[t],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,i!==t||s)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon");let s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i=i||e,!e||void 0===(s=t.raws[e])){var r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return ss[i];r=t.root();if(r.rawCache||(r.rawCache={}),void 0!==r.rawCache[i])return r.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var n="raw"+((n=i)[0].toUpperCase()+n.slice(1));this[n]?s=this[n](r,t):r.walk(t=>{if(void 0!==(s=t.raws[e]))return!1}),void 0===s&&(s=ss[i]),r.rawCache[i]=s}return s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&0<t.nodes.length&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e=e&&e.replace(/\S/g,"")}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeDecl"):i&&i.replace(/\S/g,"")}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeRule"):i&&i.replace(/\S/g,"")}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(e){let i;return e.walk(t=>{if(t.nodes&&(t.parent!==e||e.first!==t)&&void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=i&&i.replace(/\S/g,"")}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(t=>{var e=t.parent;if(e&&e!==i&&e.parent&&e.parent===i&&void 0!==t.raws.before)return e=t.raws.before.split("\n"),s=(s=e[e.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],t=t.raws[e];return t&&t.value===i?t.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},o=b;b.default=b;let rs=o;function ns(t,e){new rs(e).stringify(t)}s=ns;ns.default=ns;let{isClean:os,my:as}=y,ls=d,hs=o,us=s;function cs(e,i){let s=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){let t=e[r];var n=typeof t;"parent"===r&&"object"==n?i&&(s[r]=i):"source"===r?s[r]=t:Array.isArray(t)?s[r]=t.map(t=>cs(t,s)):("object"==n&&null!==t&&(t=cs(t)),s[r]=t)}return s}r=class{constructor(t={}){for(var e in this.raws={},this[os]=!1,this[as]=!0,t)if("nodes"===e){this.nodes=[];for(var i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){var e;return t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)&&(e=this.source,t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)),t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(var e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){var e,i=cs(this);for(e in t)i[e]=t[e];return i}cloneAfter(t={}){t=this.clone(t);return this.parent.insertAfter(this,t),t}cloneBefore(t={}){t=this.clone(t);return this.parent.insertBefore(this,t),t}error(t,e={}){var i,s;return this.source?({end:i,start:s}=this.rangeBy(e),this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)):new ls(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]!==i&&(t[e]=i,"prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0}}}markDirty(){if(this[os]){this[os]=!1;let t=this;for(;t=t.parent;)t[os]=!1}}next(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;return t.index?i=this.positionInside(t.index,e):t.word&&-1!==(t=(e=this.toString()).indexOf(t.word))&&(i=this.positionInside(t,e)),i}positionInside(e,t){var i=t||this.toString();let s=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===i[t]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};var s,r;return t.word?-1!==(r=(s=this.toString()).indexOf(t.word))&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s)):(t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1))),{end:i=i.line<e.line||i.line===e.line&&i.column<=e.column?{column:e.column+1,line:e.line}:i,start:e}}raw(t,e){return(new hs).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...i){if(this.parent){let t=this,e=!1;for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i,s={},r=null==e;e=e||new Map;let n=0;for(i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var o=this[i];if(Array.isArray(o))s[i]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)s[i]=o.toJSON(null,e);else if("source"===i){let t=e.get(o.input);null==t&&(t=n,e.set(o.input,n),n++),s[i]={end:o.end,inputId:t,start:o.start}}else s[i]=o}return r&&(s.inputs=[...e.keys()].map(t=>t.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=us){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var s,r={node:this};for(s in i)r[s]=i[s];return t.warn(e,r)}get proxyOf(){return this}},l=r,r.default=r,t=l,S=class extends t{constructor(t){super(t=t&&void 0!==t.value&&"string"!=typeof t.value?{...t,value:String(t.value)}:t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},u=S;S.default=S;Ri={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(s,r=21)=>(t=r)=>{let e="",i=t;for(;i--;)e+=s[Math.random()*s.length|0];return e}};let{SourceMapConsumer:ds,SourceMapGenerator:fs}=c,{existsSync:vs,readFileSync:ps}=c,{dirname:ms,join:gs}=c;var h=class{constructor(t,e){!1!==e.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=e.map?e.map.prev:void 0,t=this.loadMap(e.from,t),!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=ms(this.mapFile)),t)&&(this.text=t)}consumer(){return this.consumerCache||(this.consumerCache=new ds(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+e)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e,i=t.match(/\/\*\s*# sourceMappingURL=/gm);i&&(i=t.lastIndexOf(i.pop()),e=t.indexOf("*/",i),-1<i)&&-1<e&&(this.annotation=this.getAnnotationURL(t.substring(i,e)))}loadFile(t){if(this.root=ms(t),vs(t))return this.mapFile=t,ps(t,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ds)return fs.fromSourceMap(t).toString();if(t instanceof fs)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}t=t(e);if(t){var i=this.loadFile(t);if(i)return i;throw new Error("Unable to load previous source map: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=gs(ms(e),t)),this.loadFile(t)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},w=h,{SourceMapConsumer:f,SourceMapGenerator:n}=(h.default=h,c);let{fileURLToPath:bs,pathToFileURL:ys}=c,{isAbsolute:ws,resolve:Ss}=c,Is=Ri["nanoid"];v=c;let Cs=d,ks=w,_s=Symbol("fromOffsetCache"),Os=Boolean(f&&n),As=Boolean(Ss&&ws);i=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!As||/^\w+:\/\//.test(e.from)||ws(e.from)?this.file=e.from:this.file=Ss(e.from)),As&&Os&&(t=new ks(this.css,e)).text&&(e=(this.map=t).consumer().file,!this.file)&&e&&(this.file=this.mapResolve(e)),this.file||(this.id="<input css "+Is(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;e&&"object"==typeof e?(a=i,i="number"==typeof(l=e).offset?(e=(h=this.fromOffset(l.offset)).line,h.col):(e=l.line,l.column),o="number"==typeof a.offset?(h=this.fromOffset(a.offset),n=h.line,h.col):(n=a.line,a.column)):i||(e=(l=this.fromOffset(e)).line,i=l.col);var a,l,h=this.origin(e,i,n,o);return(r=h?new Cs(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new Cs(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin)).input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(ys&&(r.input.url=ys(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let s;if(this[_s])s=this[_s];else{var r=this.css.split("\n");s=new Array(r.length);let i=0;for(let t=0,e=r.length;t<e;t++)s[t]=i,i+=r[t].length+1;this[_s]=s}let i=0;if(s[s.length-1]<=e)i=s.length-1;else{let t=s.length-2;for(var n;i<t;)if(n=i+(t-i>>1),e<s[n])t=n-1;else{if(!(e>=s[n+1])){i=n;break}i=n+1}}return{col:e-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ss(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;var r=this.map.consumer(),e=r.originalPositionFor({column:e,line:t});if(!e.source)return!1;let n;"number"==typeof i&&(n=r.originalPositionFor({column:s,line:i}));let o;o=ws(e.source)?ys(e.source):new URL(e.source,this.map.consumer().sourceRoot||ys(this.map.mapFile));t={column:e.column,endColumn:n&&n.column,endLine:n&&n.line,line:e.line,url:o.toString()};if("file:"===o.protocol){if(!bs)throw new Error("file: protocol is not available in this PostCSS build");t.file=bs(o)}s=r.sourceContentFor(e.source);return s&&(t.source=s),t}toJSON(){var t,e={};for(t of["hasBOM","css","file","id"])null!=this[t]&&(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}},m=i;i.default=i,v&&v.registerInput&&v.registerInput(i);let{SourceMapConsumer:Ms,SourceMapGenerator:js}=c,{dirname:Rs,relative:xs,resolve:Es,sep:Ts}=c,Ns=c["pathToFileURL"],Ds=m,Fs=Boolean(Ms&&js),Ls=Boolean(Rs&&Es&&xs&&Ts);p=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t,e=(t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map","\n");this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var i=this.toUrl(this.path(e.file)),s=e.root||Rs(e.file);let t;!1===this.mapOpts.sourcesContent?(t=new Ms(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){var e;if(!1!==this.mapOpts.annotation)if(this.root)for(let t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ls&&Fs&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){var t;return this.root?this.generateString():1===this.previous().length?((t=this.previous()[0].consumer()).file=this.outputFile(),this.map=js.fromSourceMap(t,{ignoreInvalidMapping:!0})):(this.map=new js({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>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new js({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,r=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(t,e,i)=>{this.css+=t,e&&"end"!==i&&(o.generated.line=s,o.generated.column=r-1,e.source&&e.source.start?(o.source=this.sourcePath(e),o.original.line=e.source.start.line,o.original.column=e.source.start.column-1):(o.source=n,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=t.match(/\n/g))?(s+=a.length,l=t.lastIndexOf("\n"),r=t.length-l):r+=t.length,e&&"start"!==i&&(t=e.parent||{raws:{}},"decl"!==e.type&&("atrule"!==e.type||e.nodes)||e!==t.last||t.raws.semicolon)&&(e.source&&e.source.end?(o.source=this.sourcePath(e),o.original.line=e.source.end.line,o.original.column=e.source.end.column-1,o.generated.line=s,o.generated.column=r-2):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=r-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){var t;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(t=this.mapOpts.annotation)||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?Rs(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=Rs(Es(i,this.mapOpts.annotation)));e=xs(i,t);return this.memoizedPaths.set(t,e),e}previous(){var t;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(t=>{t.source&&t.source.input.map&&(t=t.source.input.map,this.previousMaps.includes(t)||this.previousMaps.push(t))}):(t=new Ds(this.originalCSS,this.opts)).map&&this.previousMaps.push(t.map)),this.previousMaps}setSourcesContent(){let i={};var t;this.root?this.root.walk(t=>{var e;t.source&&(e=t.source.input.from)&&!i[e]&&(i[e]=!0,e=this.usesFileUrls?this.toFileUrl(e):this.toUrl(this.path(e)),this.map.setSourceContent(e,t.source.input.css))}):this.css&&(t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(t,this.css))}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(Ns)return e=Ns(t).toString(),this.memoizedFileURLs.set(t,e),e;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===Ts&&(t=t.replace(/\\/g,"/"));e=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,e),e}},g=class extends l{constructor(t){super(t),this.type="comment"}},b=g;g.default=g;let{isClean:Bs,my:Us}=y,Ps=u,Gs=b,Ws,Vs,zs,Zs;let Ys=class Zo extends l{append(...t){for(var e of t){var i;for(i of this.normalize(e,this.last))this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(i){if(this.proxyOf.nodes){var s=this.getIterator();let t,e;for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(e=i(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],e}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(e,s){return"proxyOf"===s?e:e[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...t)=>e[s](...t.map(i=>"function"==typeof i?(t,e)=>i(t.toProxy(),e):i)):"every"===s||"some"===s?i=>e[s]((t,...e)=>i(t.toProxy(),...e)):"root"===s?()=>e.root().toProxy():"nodes"===s?e.nodes.map(t=>t.toProxy()):"first"===s||"last"===s?e[s].toProxy():e[s])},set(t,e,i){return t[e]!==i&&(t[e]=i,"name"===e||"params"===e||"selector"===e)&&t.markDirty(),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n]).reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n+1,0,i);for(r in this.indexes)n<(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}insertBefore(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n,0,i);for(r in this.indexes)n<=(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}normalize(t,e){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(Ws(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var s of t=t.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Ps(t)]}else if(t.selector)t=[new Vs(t)];else if(t.name)t=[new zs(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Gs(t)]}return t.map(t=>(t[Us]||Zo.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Bs]&&function t(e){if(e[Bs]=!1,e.proxyOf.nodes)for(var i of e.proxyOf.nodes)t(i)}(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...t){for(var e of t=t.reverse()){var i,s,r=this.normalize(e,this.first,"prepend").reverse();for(i of r)this.proxyOf.nodes.unshift(i);for(s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(t){return(t.parent=this).proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e,i;for(i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t<=(e=this.indexes[i])&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(e,i,s){return s||(s=i,i={}),this.walkDecls(t=>{i.props&&!i.props.includes(t.prop)||i.fast&&!t.value.includes(i.fast)||(t.value=t.value.replace(e,s))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(s){return this.each((e,t)=>{let i;try{i=s(e,t)}catch(t){throw e.addToError(t)}return i=!1!==i&&e.walk?e.walk(s):i})}walkAtRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("atrule"===t.type&&i.test(t.name))return s(t,e)}):this.walk((t,e)=>{if("atrule"===t.type&&t.name===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("atrule"===t.type)return s(t,e)}))}walkComments(i){return this.walk((t,e)=>{if("comment"===t.type)return i(t,e)})}walkDecls(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("decl"===t.type&&i.test(t.prop))return s(t,e)}):this.walk((t,e)=>{if("decl"===t.type&&t.prop===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("decl"===t.type)return s(t,e)}))}walkRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("rule"===t.type&&i.test(t.selector))return s(t,e)}):this.walk((t,e)=>{if("rule"===t.type&&t.selector===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("rule"===t.type)return s(t,e)}))}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]}};Ys.registerParse=t=>{Ws=t},Ys.registerRule=t=>{Vs=t},Ys.registerAtRule=t=>{zs=t},Ys.registerRoot=t=>{Zs=t};o=Ys,(Ys.default=Ys).rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,zs.prototype):"rule"===t.type?Object.setPrototypeOf(t,Vs.prototype):"decl"===t.type?Object.setPrototypeOf(t,Ps.prototype):"comment"===t.type?Object.setPrototypeOf(t,Gs.prototype):"root"===t.type&&Object.setPrototypeOf(t,Zs.prototype),t[Us]=!0,t.nodes&&t.nodes.forEach(t=>{Ys.rebuild(t)})},r=o;let Ks,Js;t=class extends r{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Ks(new Js,this,t).stringify()}},t.registerLazyResult=t=>{Ks=t},t.registerProcessor=t=>{Js=t},S=t;t.default=t;h=class{constructor(t,e={}){for(var i in this.type="warning",this.text=t,e.node&&e.node.source&&(t=e.node.rangeBy(e),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),e)this[i]=e[i]}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}},Ri=h;h.default=h;let Xs=Ri;f=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);t=new Xs(t,e);return this.messages.push(t),t}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},n=f;f.default=f;const $s="'".charCodeAt(0),Hs='"'.charCodeAt(0),qs="\\".charCodeAt(0),Qs="/".charCodeAt(0),tr="\n".charCodeAt(0),er=" ".charCodeAt(0),ir="\f".charCodeAt(0),sr="\t".charCodeAt(0),rr="\r".charCodeAt(0),nr="[".charCodeAt(0),or="]".charCodeAt(0),ar="(".charCodeAt(0),lr=")".charCodeAt(0),hr="{".charCodeAt(0),ur="}".charCodeAt(0),cr=";".charCodeAt(0),dr="*".charCodeAt(0),fr=":".charCodeAt(0),vr="@".charCodeAt(0),pr=/[\t\n\f\r "#'()/;[\\\]{}]/g,mr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,gr=/.[\r\n"'(/\\]/,br=/[\da-f]/i;v=class extends o{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},i=v,o.registerAtRule(v.default=v),c=o;let yr,wr;g=class extends c{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){t=super.normalize(t);if(e)if("prepend"===i)1<this.nodes.length?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var s of t)s.raws.before=e.raws.before;return t}removeChild(t,e){var i=this.index(t);return!e&&0===i&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new yr(new wr,this,t).stringify()}},g.registerLazyResult=t=>{yr=t},g.registerProcessor=t=>{wr=t},r=g;c.registerRoot(g.default=g);let Sr={comma(t){return Sr.split(t,[","],!0)},space(t){return Sr.split(t,[" ","\n","\t"])},split(t,e,i){var s,r=[];let n="",o=!1,a=0,l=!1,h="",u=!1;for(s of t)u?u=!1:"\\"===s?u=!0:l?s===h&&(l=!1):'"'===s||"'"===s?(l=!0,h=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&e.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return!i&&""===n||r.push(n.trim()),r}};t=Sr;Sr.default=Sr;let Ir=t;h=class extends o{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ir.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,e=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(e)}},f=h;o.registerRule(h.default=h);let Cr=u,kr=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,h,u,c,d,f,v,p=s.length,m=0,g=[],b=[];function y(t){throw e.error("Unclosed "+t,m)}return{back:function(t){b.push(t)},endOfFile:function(){return 0===b.length&&m>=p},nextToken:function(t){if(b.length)return b.pop();if(!(m>=p)){var e=!!t&&t.ignoreUnclosed;switch(n=s.charCodeAt(m)){case tr:case er:case sr:case rr:case ir:for(o=m;o+=1,(n=s.charCodeAt(o))===er||n===tr||n===sr||n===rr||n===ir;);v=["space",s.slice(m,o)],m=o-1;break;case nr:case or:case hr:case ur:case fr:case cr:case lr:var i=String.fromCharCode(n);v=[i,i,m];break;case ar:if(d=g.length?g.pop()[1]:"",f=s.charCodeAt(m+1),"url"===d&&f!==$s&&f!==Hs&&f!==er&&f!==tr&&f!==sr&&f!==ir&&f!==rr){o=m;do{if(u=!1,-1===(o=s.indexOf(")",o+1))){if(r||e){o=m;break}y("bracket")}for(c=o;s.charCodeAt(c-1)===qs;)--c,u=!u}while(u);v=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||gr.test(l)?v=["(","(",m]:(v=["brackets",l,m,o],m=o);break;case $s:case Hs:a=n===$s?"'":'"',o=m;do{if(u=!1,-1===(o=s.indexOf(a,o+1))){if(r||e){o=m+1;break}y("string")}for(c=o;s.charCodeAt(c-1)===qs;)--c,u=!u}while(u);v=["string",s.slice(m,o+1),m,o],m=o;break;case vr:pr.lastIndex=m+1,pr.test(s),o=0===pr.lastIndex?s.length-1:pr.lastIndex-2,v=["at-word",s.slice(m,o+1),m,o],m=o;break;case qs:for(o=m,h=!0;s.charCodeAt(o+1)===qs;)o+=1,h=!h;if(n=s.charCodeAt(o+1),h&&n!==Qs&&n!==er&&n!==tr&&n!==sr&&n!==rr&&n!==ir&&(o+=1,br.test(s.charAt(o)))){for(;br.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===er&&(o+=1)}v=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(n===Qs&&s.charCodeAt(m+1)===dr?(0===(o=s.indexOf("*/",m+2)+1)&&(r||e?o=s.length:y("comment")),v=["comment",s.slice(m,o+1),m,o]):(mr.lastIndex=m+1,mr.test(s),o=0===mr.lastIndex?s.length-1:mr.lastIndex-2,v=["word",s.slice(m,o+1),m,o],g.push(v)),o)}return m++,v}},position:function(){return m}}},_r=b,Or=i,Ar=r,Mr=f;const jr={empty:!0,space:!0};let Rr=class{constructor(t){this.input=t,this.root=new Ar,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i=new Or;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let s,r,n=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?l.push("("===e?")":"]"):"{"===e&&0<l.length?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(0<a.length){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(t);break}}if(a.push(t),this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(s){var r=this.colon(s);if(!1!==r){let e=0,i;for(let t=r-1;0<=t&&("space"===(i=s[t])[0]||2!==(e+=1));t--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){let e=0,i,s,r;for(var[n,o]of t.entries()){if("("===(s=(i=o)[0])&&(e+=1),")"===s&&--e,0===e&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return n}this.doubleColon(i)}r=i}return!1}comment(t){var e=new _r,t=(this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,t[1].slice(2,-2));/^\s*$/.test(t)?(e.text="",e.raws.left=t,e.raws.right=""):(t=t.match(/^(\s*)([^]*\S)(\s*)$/),e.text=t[2],e.raws.left=t[1],e.raws.right=t[3])}createTokenizer(){this.tokenizer=kr(this.input)}decl(t,e){var i,s=new Cr,r=(this.init(s,t[0][2]),t[t.length-1]);for(";"===r[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;0<=t;t--){var i=e[t],i=i[3]||i[2];if(i)return i}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){var n=t[0][0];if(":"===n||"space"===n||"comment"===n)break;s.prop+=t.shift()[1]}s.raws.between="";let o;for(;t.length;){if(":"===(o=t.shift())[0]){s.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let i=t.length-1;0<=i;i--){if("!important"===(o=t[i])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(t,i);" !important"!==(l=this.spacesFromEnd(t)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var h=t.slice(0);let e="";for(let t=i;0<t;t--){var u=h[t][0];if(0===e.trim().indexOf("!")&&"space"!==u)break;e=h.pop()[1]+e}0===e.trim().indexOf("!")&&(s.important=!0,s.raws.important=e,t=h)}if("space"!==o[0]&&"comment"!==o[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(s.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new Mr;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){this.spaces+=t[1],this.current.nodes&&(t=this.current.nodes[this.current.nodes.length-1])&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1;var i;let s=!1,r=null;var n=[],o=t[1].startsWith("--"),a=[];let l=t;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)r=r||l,n.push("("===i?")":"]");else if(o&&s&&"{"===i)r=r||l,n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length)&&(r=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),0<n.length&&this.unclosedBracket(r),e&&s){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){var r,n,o,a,l=i.length;let h="",u=!0;for(let t=0;t<l;t+=1)"space"===(o=(r=i[t])[0])&&t===l-1&&!s||"comment"===o&&(o=i[t-1]?i[t-1][0]:"empty",n=i[t+1]?i[t+1][0]:"empty",jr[o]||jr[n]||","===h.slice(-1))?u=!1:h+=r[1];u||(a=i.reduce((t,e)=>t+e[1],""),t.raws[e]={raw:a,value:h}),t[e]=h}rule(t){t.pop();var e=new Mr;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){var e;let i="";for(;t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){var e;let i="";for(;t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e="";for(;t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(e,i){let s="";for(let t=i;t<e.length;t++)s+=e[t][1];return e.splice(i,e.length-i),s}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},xr=m;function Er(t,e){t=new xr(t,e),e=new Rr(t);try{e.parse()}catch(t){throw t}return e.root}v=Er;o.registerParse(Er.default=Er);let{isClean:Tr,my:Nr}=y,Dr=p,Fr=s,Lr=o;c=S;let Br=n,Ur=v;g=r;const Pr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Gr={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},Wr={Once:!0,postcssPlugin:!0,prepare:!0},Vr=0;function zr(t){return"object"==typeof t&&"function"==typeof t.then}function Zr(t){let e=!1;var i=Pr[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,Vr,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,Vr,i+"Exit"]:[i,i+"Exit"]}function Yr(t){let e;return{eventIndex:0,events:e="document"===t.type?["Document",Vr,"DocumentExit"]:"root"===t.type?["Root",Vr,"RootExit"]:Zr(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function Kr(t){return t[Tr]=!1,t.nodes&&t.nodes.forEach(t=>Kr(t)),t}let Jr={};h=class Yo{constructor(t,e,i){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof e||null===e||"root"!==e.type&&"document"!==e.type)if(e instanceof Yo||e instanceof Br)s=Kr(e.root),e.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=e.map);else{let t=Ur;i.syntax&&(t=i.syntax.parse),(t=i.parser?i.parser:t).parse&&(t=t.parse);try{s=t(e,i)}catch(t){this.processed=!0,this.error=t}s&&!s[Nr]&&Lr.rebuild(s)}else s=Kr(e);this.result=new Br(t,s,i),this.helpers={...Jr,postcss:Jr,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{e&&e.addToError(t),"CssSyntaxError"!==(this.error=t).name||t.plugin?i.postcssVersion:(t.plugin=i.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t,e=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(t of this.plugins)if("object"==typeof t)for(var i in t){if(!Gr[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wr[i])if("object"==typeof t[i])for(var s in t[i])"*"===s?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let t=this.plugin=0;t<this.plugins.length;t++){var e=this.plugins[t],e=this.runOnRoot(e);if(zr(e))try{await e}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){for(var i,s=this.result.root;!s[Tr];){s[Tr]=!0;for(var r=[Yr(s)];0<r.length;){var n=this.visitTick(r);if(zr(n))try{await n}catch(t){n=r[r.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[t,e]of this.listeners.OnceExit){this.result.lastPlugin=t;try{"document"===s.type?(i=s.nodes.map(t=>e(t,this.helpers)),await Promise.all(i)):await e(s,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{var t;return"object"==typeof e&&e.Once?"document"===this.result.root.type?zr((t=this.result.root.nodes.map(t=>e.Once(t,this.helpers)))[0])?Promise.all(t):t:e.Once(this.result.root,this.helpers):"function"==typeof e?e(this.result.root,this.result):void 0}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var e=this.result.opts;let t=Fr;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);e=new Dr(t,this.result.root,this.result.opts).generate();this.result.css=e[0],this.result.map=e[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(zr(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[Tr];)e[Tr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,s]of t){this.result.lastPlugin=i;let t;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(zr(t))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:s}=e;if("root"===i.type||"document"===i.type||i.parent){if(0<s.length&&e.visitorIndex<s.length){var[r,n]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=r;try{return n(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[Tr])return o[Tr]=!0,void t.push(Yr(o));e.iterator=0,delete i.indexes[a]}for(var l=e.events;e.eventIndex<l.length;){var h=l[e.eventIndex];if(e.eventIndex+=1,h===Vr)return void(i.nodes&&i.nodes.length&&(i[Tr]=!0,e.iterator=i.getIterator()));if(this.listeners[h])return void(e.visitors=this.listeners[h])}}t.pop()}walkSync(t){var e;t[Tr]=!0;for(e of Zr(t))if(e===Vr)t.nodes&&t.each(t=>{t[Tr]||this.walkSync(t)});else{var i=this.listeners[e];if(i&&this.visitSync(i,t.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"}},h.registerPostcss=t=>{Jr=t},y=h;g.registerLazyResult(h.default=h),c.registerLazyResult(h);let Xr=p,$r=s;let Hr=v;const qr=n;g=class{constructor(t,e,i){e=e.toString(),this.stringified=!1,this.Ss=t,this.Cs=e,this.Is=i,this.ks=void 0;t=$r;this.result=new qr(this.Ss,void 0,this.Is),this.result.css=e;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});i=new Xr(t,void 0,this.Is,e);i.isMap()?([t,e]=i.generate(),t&&(this.result.css=t),e&&(this.result.map=e)):(i.clearAnnotation(),this.result.css=i.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.Cs}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.Os)return this.Os;let t;var e=Hr;try{t=e(this.Cs,this.Is)}catch(t){this.error=t}if(this.error)throw this.error;return this.Os=t}get[Symbol.toStringTag](){return"NoWorkResult"}},c=g;g.default=g;let Qr=c,tn=y;h=S,p=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return e}process(t,e={}){return new(this.plugins.length||e.parser||e.stringifier||e.syntax?tn:Qr)(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},g=p;r.registerProcessor(p.default=p),h.registerProcessor(p);let en=u,sn=w,rn=b,nn=i,on=m,an=r,ln=f;function hn(t,i){if(Array.isArray(t))return t.map(t=>hn(t));let{inputs:e,...s}=t;if(e){i=[];for(var r of e){r={...r,__proto__:on.prototype};r.map&&(r.map={...r.map,__proto__:sn.prototype}),i.push(r)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>hn(t,i))),s.source){let{inputId:t,...e}=s.source;s.source=e,null!=t&&(s.source.input=i[t])}if("root"===s.type)return new an(s);if("decl"===s.type)return new en(s);if("rule"===s.type)return new ln(s);if("comment"===s.type)return new rn(s);if("atrule"===s.type)return new nn(s);throw new Error("Unknown node type: "+t.type)}c=hn,hn.default=hn,h=d;let un=u;p=y,w=o;let cn=g;d=s,u=c;let dn=S;y=Ri;let fn=b,vn=i;o=n,g=m,s=v,c=t;let pn=f,mn=r;S=l;function k(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new cn(t)}k.plugin=function(e,i){let s=!1;function r(...t){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");t=i(...t);return t.postcssPlugin=e,t.postcssVersion=(new cn).version,t}let t;return Object.defineProperty(r,"postcss",{get(){return t=t||r()}}),r.process=function(t,e,i){return k([r(i)]).process(t,e)},r},k.stringify=d,k.parse=s,k.fromJSON=u,k.list=c,k.comment=t=>new fn(t),k.atRule=t=>new vn(t),k.decl=t=>new un(t),k.rule=t=>new pn(t),k.root=t=>new mn(t),k.document=t=>new dn(t),k.CssSyntaxError=h,k.Declaration=un,k.Container=w,k.Processor=cn,k.Document=dn,k.Comment=fn,k.Warning=y,k.AtRule=vn,k.Result=o,k.Input=g,k.Rule=pn,k.Root=mn,k.Node=S,p.registerPostcss(k);Ri=k,k.default=k,b=qi(Ri);b.stringify,b.fromJSON,b.plugin,b.parse,b.list,b.document,b.comment,b.atRule,b.rule,b.decl,b.root,b.CssSyntaxError,b.Declaration,b.Container,b.Processor,b.Document,b.Comment,b.Warning,b.AtRule,b.Result,b.Input,b.Rule,b.Root,b.Node;const gn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},bn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yn={},wn=()=>!!globalThis.Zone;function Sn(t){if(yn[t])return yn[t];var e=globalThis[t];const i=e.prototype;var s=t in gn?gn[t]:void 0,s=Boolean(s&&s.every(t=>{return Boolean(null==(t=null==(t=Object.getOwnPropertyDescriptor(i,t))?void 0:t.get)?void 0:t.toString().includes("[native code]"))})),r=t in bn?bn[t]:void 0,r=Boolean(r&&r.every(t=>{return"function"==typeof i[t]&&(null==(t=i[t])?void 0:t.toString().includes("[native code]"))}));if(s&&r&&!wn())return yn[t]=e.prototype,e.prototype;try{var n,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(n=a[t].prototype,document.body.removeChild(o),n?yn[t]=n:i):e.prototype}catch{return i}}const In={};function Cn(t,e,i){var s=t+"."+String(i);return In[s]?In[s].call(e):(t=Sn(t),(t=null==(t=Object.getOwnPropertyDescriptor(t,i))?void 0:t.get)?(In[s]=t).call(e):e[i])}const kn={};function _n(t,e,i){var s=t+"."+String(i);return kn[s]?kn[s].bind(e):"function"!=typeof(t=Sn(t)[i])?e[i]:(kn[s]=t).bind(e)}function On(){return Sn("MutationObserver").constructor}const H={childNodes:function(t){return Cn("Node",t,"childNodes")},parentNode:function(t){return Cn("Node",t,"parentNode")},parentElement:function(t){return Cn("Node",t,"parentElement")},textContent:function(t){return Cn("Node",t,"textContent")},contains:function(t,e){return _n("Node",t,"contains")(e)},getRootNode:function(t){return _n("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?Cn("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?Cn("Element",t,"shadowRoot"):null},querySelector:function(t,e){return Cn("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return Cn("Element",t,"querySelectorAll")(e)},mutationObserver:On};function q(t,e,i=document){const s={capture:!0,passive:!0};return i.addEventListener(t,e,s),()=>i.removeEventListener(t,e,s)}const An="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";i={map:{},getId(){return console.error(An),-1},getNode(){return console.error(An),null},removeNodeFromMap(){console.error(An)},has(){return console.error(An),!1},reset(){console.error(An)}};function Mn(r,n,o={}){let a=null,l=0;return function(...t){var e=Date.now(),i=(l||!1!==o.leading||(l=e),n-(e-l));const s=this;i<=0||n<i?(a&&(clearTimeout(a),a=null),l=e,r.apply(s,t)):a||!1===o.trailing||(a=setTimeout(()=>{l=!1===o.leading?0:Date.now(),a=null,r.apply(s,t)},i))}}function jn(t,e,i,s,r=window){const n=r.Object.getOwnPropertyDescriptor(t,e);return r.Object.defineProperty(t,e,s?i:{set(t){setTimeout(()=>{i.set.call(this,t)},0),n&&n.set&&n.set.call(this,t)}}),()=>jn(t,e,n||{},!0)}function Rn(t,e,i){try{if(!(e in t))return()=>{};const r=t[e];var s=i(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(i,{get(t,e,i){return"map"===e&&console.error(An),Reflect.get(t,e,i)}});let xn=Date.now;function En(t){var e,i=t.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(e=H.parentElement(i.body))?void 0:e.scrollLeft)||(null==(e=null==i?void 0:i.body)?void 0:e.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(e=H.parentElement(i.body))?void 0:e.scrollTop)||(null==(t=null==i?void 0:i.body)?void 0:t.scrollTop)||0}}function Tn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Nn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Dn(t){return t?t.nodeType===t.ELEMENT_NODE?t:H.parentElement(t):null}function N(t,e,i,s){if(t){t=Dn(t);if(t){try{if("string"==typeof e){if(t.classList.contains(e))return!0;if(s&&null!==t.closest("."+e))return!0}else if(jt(t,e,s))return!0}catch(t){}if(i){if(t.matches(i))return!0;if(s&&null!==t.closest(i))return!0}}}return!1}function Fn(t,e,i){return"TITLE"===t.tagName&&i.headTitleMutations||e.getId(t)===gt}function Ln(t){return Boolean(t.changedTouches)}function Bn(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Un(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Pn(t){return t&&(!1&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(H.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(xn=()=>(new Date).getTime());class Gn{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let i;return i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Wn(t){var e;let i=null;return i="getRootNode"in t&&(null==(e=H.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(t))?H.host(H.getRootNode(t)):i}function Vn(t){var e=t.ownerDocument;return!!e&&(t=function(t){let e=t;for(var i;i=Wn(e);)e=i;return e}(t),H.contains(e,t))}function zn(t){var e=t.ownerDocument;return e&&(H.contains(e,t)||Vn(t))}var Q=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))({}),tt=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(tt||{}),_=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(_||{}),Zn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Zn||{}),Yn=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))({}),Kn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Kn||{}),Jn=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))({});function Xn(t){return"__ln"in t}class $n{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let i=this.head;for(let t=0;t<e;t++)i=(null==i?void 0:i.next)||null;return i}addNode(t){var e,i={value:t,previous:null,next:null};t.__ln=i,t.previousSibling&&Xn(t.previousSibling)?(e=t.previousSibling.__ln.next,i.next=e,i.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=i,e&&(e.previous=i)):t.nextSibling&&Xn(t.nextSibling)&&t.nextSibling.__ln.previous?(e=t.nextSibling.__ln.previous,i.previous=e,i.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=i,e&&(e.next=i)):(this.head&&(this.head.previous=i),i.next=this.head,this.head=i),null===i.next&&(this.tail=i),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}class Hn{constructor(){a(this,"frozen",!1),a(this,"locked",!1),a(this,"texts",[]),a(this,"attributes",[]),a(this,"attributeMap",new WeakMap),a(this,"removes",[]),a(this,"mapRemoves",[]),a(this,"movedMap",{}),a(this,"addedSet",new Set),a(this,"movedSet",new Set),a(this,"droppedSet",new Set),a(this,"removesSubTreeCache",new Set),a(this,"mutationCb"),a(this,"blockClass"),a(this,"blockSelector"),a(this,"maskTextClass"),a(this,"maskTextSelector"),a(this,"inlineStylesheet"),a(this,"maskInputOptions"),a(this,"maskTextFn"),a(this,"maskInputFn"),a(this,"keepIframeSrcFn"),a(this,"recordCanvas"),a(this,"inlineImages"),a(this,"slimDOMOptions"),a(this,"dataURLOptions"),a(this,"doc"),a(this,"mirror"),a(this,"iframeManager"),a(this,"stylesheetManager"),a(this,"shadowDomManager"),a(this,"canvasManager"),a(this,"processedNodeManager"),a(this,"unattachedDoc"),a(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),a(this,"emit",()=>{if(!this.frozen&&!this.locked){const l=[],h=new Set,u=new $n,c=t=>{let e=t,i=gt;for(;i===gt;)e=e&&e.nextSibling,i=e&&this.mirror.getId(e);return i};for(var i,s,r=e=>{var i=H.parentNode(e);if(i&&zn(e)){let t=!1;if(e.nodeType===Node.TEXT_NODE){var s=i.tagName;if("TEXTAREA"===s)return;"STYLE"===s&&this.addedSet.has(i)&&(t=!0)}s=z(i)?this.mirror.getId(Wn(e)):this.mirror.getId(i),i=c(e);if(-1===s||-1===i)return u.addNode(e);var r=Et(e,{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:t=>{Bn(t,this.mirror)&&this.iframeManager.addIframe(t),Un(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Pn(e)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(e),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},cssCaptured:t});r&&(l.push({parentId:s,nextId:i,node:r}),h.add(r.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)Qn(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(H.parentNode(d))||r(d);for(const f of this.addedSet)!to(this.droppedSet,f)&&!Qn(this.removesSubTreeCache,f,this.mirror)||to(this.movedSet,f)?r(f):this.droppedSet.add(f);let t=null;for(;u.length;){let e=null;if(!(e=t&&(i=this.mirror.getId(H.parentNode(t.value)),s=c(t.value),-1!==i)&&-1!==s?t:e)){let t=u.tail;for(;t;){var n=t;if(t=t.previous,n){var o=this.mirror.getId(H.parentNode(n.value)),a=c(n.value);if(-1!==a){if(-1!==o){e=n;break}a=n.value,o=H.parentNode(a);if(o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){a=H.host(o);if(-1!==this.mirror.getId(a)){e=n;break}}}}}}if(!e){for(;u.head;)u.removeNode(u.head.value);break}t=e.previous,u.removeNode(e.value),r(e.value)}var e={texts:this.texts.map(t=>{var e=t.node,i=H.parentNode(e);return i&&"TEXTAREA"===i.tagName&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!h.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{var e,i,s=t["attributes"];return"string"==typeof s.style&&(e=JSON.stringify(t.styleDiff),i=JSON.stringify(t.Es),e.length<s.style.length)&&(e+i).split("var(").length===s.style.split("var(").length&&(s.style=t.styleDiff),{id:this.mirror.getId(t.node),attributes:s}}).filter(t=>!h.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:l};(e.texts.length||e.attributes.length||e.removes.length||e.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(e))}}),a(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},Es:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(H.childNodes(t),t=>H.textContent(t)||"").join("")}),a(this,"processMutation",o=>{if(!Fn(o.target,this.mirror,this.slimDOMOptions))switch(o.type){case"characterData":var s=H.textContent(o.target);N(o.target,this.blockClass,this.blockSelector,!1)||s===o.oldValue||this.texts.push({value:Rt(o.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,Dn(o.target)):s.replace(/[\S]/g,"*"):s,node:o.target});break;case"attributes":{var r=o.target;let t=o.attributeName,e=o.target.getAttribute(t);if("value"===t&&(s=lt(r),e=nt({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:e,maskInputFn:this.maskInputFn})),N(o.target,this.blockClass,this.blockSelector,!1)||e===o.oldValue)return;let i=this.attributeMap.get(o.target);if("IFRAME"===r.tagName&&"src"===t&&!this.keepIframeSrcFn(e)){if(r.contentDocument)return;t="rr_src"}if(i||(i={node:o.target,attributes:{},styleDiff:{},Es:{}},this.attributes.push(i),this.attributeMap.set(o.target,i)),"type"===t&&"INPUT"===r.tagName&&"password"===(o.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Mt(r.tagName,t))if(i.attributes[t]=At(this.doc,ot(r.tagName),ot(t),e),"style"===t){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var n=this.unattachedDoc.createElement("span");o.oldValue&&n.setAttribute("style",o.oldValue);for(const h of Array.from(r.style)){var a=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);a!==n.style.getPropertyValue(h)||l!==n.style.getPropertyPriority(h)?i.styleDiff[h]=""===l?a:[a,l]:i.Es[h]=[a,l]}for(const u of Array.from(n.style))""===r.style.getPropertyValue(u)&&(i.styleDiff[u]=!1)}else"open"===t&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":N(o.target,this.blockClass,this.blockSelector,!0)||("TEXTAREA"!==o.target.tagName?(o.addedNodes.forEach(t=>this.genAdds(t,o.target)),o.removedNodes.forEach(t=>{var e=this.mirror.getId(t),i=z(o.target)?this.mirror.getId(H.host(o.target)):this.mirror.getId(o.target);if(!N(o.target,this.blockClass,this.blockSelector,!1)&&!Fn(t,this.mirror,this.slimDOMOptions)&&-1!==this.mirror.getId(t)){if(this.addedSet.has(t))qn(this.addedSet,t),this.droppedSet.add(t);else if(!(this.addedSet.has(o.target)&&-1===e||function t(e,i){var s;return!z(e)&&(s=i.getId(e),!i.has(s)||(!(s=H.parentNode(e))||s.nodeType!==e.DOCUMENT_NODE)&&(!s||t(s,i)))}(o.target,this.mirror)))if(this.movedSet.has(t)&&this.movedMap[e+"@"+i])qn(this.movedSet,t);else{this.removes.push({parentId:i,id:e,isShadow:!(!z(o.target)||!Z(o.target))||void 0});{i=t;var s=this.removesSubTreeCache;const n=[i];for(;n.length;){var r=n.pop();s.has(r)||(s.add(r),H.childNodes(r).forEach(t=>n.push(t)))}}}this.mapRemoves.push(t)}})):this.genTextAreaValueMutation(o.target))}}),a(this,"genAdds",(e,i)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Fn(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let t=null;(t=i&&this.mirror.hasNode(i)?this.mirror.getId(i):t)&&-1!==t&&(this.movedMap[this.mirror.getId(e)+"@"+t]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);N(e,this.blockClass,this.blockSelector,!1)||(H.childNodes(e).forEach(t=>this.genAdds(t)),Pn(e)&&H.childNodes(H.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,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 qn(e,t){e.delete(t),H.childNodes(t).forEach(t=>qn(e,t))}function Qn(t,e){if(0!==t.size)return t=t,e=e,(e=H.parentNode(e))&&t.has(e)}function to(t,e){return 0!==t.size&&function t(e,i){const s=H.parentNode(i);if(!s)return!1;if(e.has(s))return!0;return t(e,s)}(t,e)}let eo;const et=e=>{return eo?(...t)=>{try{return e(...t)}catch(t){if(!eo||!0!==eo(t))throw t}}:e},io=[];function so(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function ro(t,e){var i=new Hn,t=(io.push(i),i.init(t),new(On())(et(i.processMutations.bind(i))));return t.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function no({mouseInteractionCb:o,doc:s,mirror:a,blockClass:l,blockSelector:h,sampling:t}){if(!1===t.mouseInteraction)return()=>{};const e=!0===t.mouseInteraction||void 0===t.mouseInteraction?{}:t.mouseInteraction,r=[];let u=null;return Object.keys(_).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==e[t]).forEach(t=>{let e=ot(t);n=t;var n,i=i=>{var s=so(i);if(!N(s,l,h,!0)){let t=null,e=n;if("pointerType"in i){switch(i.pointerType){case"mouse":t=Zn.Mouse;break;case"touch":t=Zn.Touch;break;case"pen":t=Zn.Pen}t===Zn.Touch?_[n]===_.MouseDown?e="TouchStart":_[n]===_.MouseUp&&(e="TouchEnd"):(t,Zn.Pen)}else Ln(i)&&(t=Zn.Touch);null!==t?(u=t,(e.startsWith("Touch")&&t===Zn.Touch||e.startsWith("Mouse")&&t===Zn.Mouse)&&(t=null)):_[n]===_.Click&&(t=u,u=null);var r,i=Ln(i)?i.changedTouches[0]:i;i&&(s=a.getId(s),{clientX:i,clientY:r}=i,et(o)({type:_[e],id:s,x:i,y:r,...null!==t&&{pointerType:t}}))}};if(window.PointerEvent)switch(_[t]){case _.MouseDown:case _.MouseUp:e=e.replace("mouse","pointer");break;case _.TouchStart:case _.TouchEnd:return}r.push(q(e,i,s))}),et(()=>{r.forEach(t=>t())})}function oo({scrollCb:s,doc:r,mirror:n,blockClass:o,blockSelector:a,sampling:t}){return q("scroll",et(Mn(et(t=>{var e,i,t=so(t);t&&!N(t,o,a,!0)&&(e=n.getId(t),t===r&&r.defaultView?(i=En(r.defaultView),s({id:e,x:i.left,y:i.top})):s({id:e,x:t.scrollLeft,y:t.scrollTop}))}),t.scroll||100)),r)}const ao=["INPUT","TEXTAREA","SELECT"],lo=new WeakMap;function ho(t){var e,i;return t=t,e=[],vo("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||vo("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||vo("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||vo("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule?(i=Array.from(t.parentRule.cssRules).indexOf(t),e.unshift(i)):t.parentStyleSheet&&(i=Array.from(t.parentStyleSheet.cssRules).indexOf(t),e.unshift(i)),e}function uo(t,e,i){let s,r;return t?(t.ownerNode?s=e.getId(t.ownerNode):r=i.getId(t),{styleId:r,id:s}):{}}function co({mirror:t,stylesheetManager:i},e){let s=null;s="#document"===e.nodeName?t.getId(e):t.getId(H.host(e));t="#document"===e.nodeName?null==(t=e.defaultView)?void 0:t.Document:null==(t=null==(t=e.ownerDocument)?void 0:t.defaultView)?void 0:t.ShadowRoot;const r=null!=t&&t.prototype?Object.getOwnPropertyDescriptor(null==t?void 0:t.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&t&&r?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:r.configurable,enumerable:r.enumerable,get(){var t;return null==(t=r.get)?void 0:t.call(this)},set(t){var e=null==(e=r.set)?void 0:e.call(this,t);if(null!==s&&-1!==s)try{i.adoptStyleSheets(t,s)}catch(t){}return e}}),et(()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:r.configurable,enumerable:r.enumerable,get:r.get,set:r.set})})):()=>{}}function fo(t,e={}){var r,i=t.doc.defaultView;if(!i)return()=>{};{var s=t,n=e;const{mutationCb:w,mousemoveCb:S,mouseInteractionCb:I,scrollCb:C,viewportResizeCb:k,inputCb:_,mediaInteractionCb:O,styleSheetRuleCb:A,styleDeclarationCb:M,canvasMutationCb:j,fontCb:R,selectionCb:x,customElementCb:E}=s;s.mutationCb=(...t)=>{n.mutation&&n.mutation(...t),w(...t)},s.mousemoveCb=(...t)=>{n.mousemove&&n.mousemove(...t),S(...t)},s.mouseInteractionCb=(...t)=>{n.mouseInteraction&&n.mouseInteraction(...t),I(...t)},s.scrollCb=(...t)=>{n.scroll&&n.scroll(...t),C(...t)},s.viewportResizeCb=(...t)=>{n.viewportResize&&n.viewportResize(...t),k(...t)},s.inputCb=(...t)=>{n.input&&n.input(...t),_(...t)},s.mediaInteractionCb=(...t)=>{n.mediaInteaction&&n.mediaInteaction(...t),O(...t)},s.styleSheetRuleCb=(...t)=>{n.styleSheetRule&&n.styleSheetRule(...t),A(...t)},s.styleDeclarationCb=(...t)=>{n.styleDeclaration&&n.styleDeclaration(...t),M(...t)},s.canvasMutationCb=(...t)=>{n.canvasMutation&&n.canvasMutation(...t),j(...t)},s.fontCb=(...t)=>{n.font&&n.font(...t),R(...t)},s.selectionCb=(...t)=>{n.selection&&n.selection(...t),x(...t)},s.customElementCb=(...t)=>{n.customElement&&n.customElement(...t),E(...t)}}let o;t.recordDOM&&(o=ro(t,t.doc));const a=function({mousemoveCb:i,sampling:t,doc:e,mirror:r}){if(!1===t.mousemove)return()=>{};var s="number"==typeof t.mousemove?t.mousemove:50,t="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let n=[],o;const a=Mn(et(t=>{const e=Date.now()-o;i(n.map(t=>(t.timeOffset-=e,t)),t),n=[],o=null}),t),l=[q("mousemove",t=et(Mn(et(t=>{var e=so(t),{clientX:i,clientY:s}=Ln(t)?t.changedTouches[0]:t;o=o||xn(),n.push({x:i,y:s,id:r.getId(e),timeOffset:xn()-o}),a("undefined"!=typeof DragEvent&&t instanceof DragEvent?tt.Drag:t instanceof MouseEvent?tt.MouseMove:tt.TouchMove)}),s,{trailing:!1})),e),q("touchmove",t,e),q("drag",t,e)];return et(()=>{l.forEach(t=>t())})}(t),l=no(t),h=oo(t),u=function({viewportResizeCb:i},{win:t}){let s=-1,r=-1;return q("resize",et(Mn(et(()=>{var t=Tn(),e=Nn();s===t&&r===e||(i({width:Number(e),height:Number(t)}),s=t,r=e)}),200)),t)}(t,{win:i}),c=function({inputCb:s,doc:o,mirror:r,blockClass:t,blockSelector:i,ignoreClass:a,ignoreSelector:l,maskInputOptions:h,maskInputFn:u,sampling:e,userTriggeredOnInput:c}){function n(e){let s=so(e);var e=e.isTrusted,r=s&&s.tagName;if((s=s&&"OPTION"===r?H.parentElement(s):s)&&r&&!(ao.indexOf(r)<0)&&!N(s,t,i,!0)&&!(s.classList.contains(a)||l&&s.matches(l))){let t=s.value,i=!1;var n=lt(s)||"",r=("radio"===n||"checkbox"===n?i=s.checked:(h[r.toLowerCase()]||h[n])&&(t=nt({element:s,maskInputOptions:h,tagName:r,type:n,value:t,maskInputFn:u})),d(s,c?{text:t,isChecked:i,userTriggered:e}:{text:t,isChecked:i}),s.name);"radio"===n&&r&&i&&o.querySelectorAll(`input[type="radio"][name="${r}"]`).forEach(t=>{var e;t!==s&&(e=t.value,d(t,c?{text:e,isChecked:!i,userTriggered:!1}:{text:e,isChecked:!i}))})}}function d(t,e){var i=lo.get(t);i&&i.text===e.text&&i.isChecked===e.isChecked||(lo.set(t,e),i=r.getId(t),et(s)({...e,id:i}))}var f;const v=("last"===e.input?["change"]:["input","change"]).map(t=>q(t,et(n),o)),p=o.defaultView;return p?(e=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),f=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]],e&&e.set&&v.push(...f.map(t=>jn(t[0],t[1],{set(){et(n)({target:this,isTrusted:!1})}},!1,p))),et(()=>{v.forEach(t=>t())})):()=>{v.forEach(t=>t())}}(t),d=function({mediaInteractionCb:a,blockClass:l,blockSelector:h,mirror:u,sampling:t,doc:e}){var i=et(o=>Mn(et(t=>{var e,i,s,r,n,t=so(t);t&&!N(t,l,h,!0)&&({currentTime:e,volume:i,muted:s,playbackRate:r,loop:n}=t,a({type:o,id:u.getId(t),currentTime:e,volume:i,muted:s,playbackRate:r,loop:n}))}),t.media||500));const s=[q("play",i(Kn.Play),e),q("pause",i(Kn.Pause),e),q("seeked",i(Kn.Seeked),e),q("volumechange",i(Kn.VolumeChange),e),q("ratechange",i(Kn.RateChange),e)];return et(()=>{s.forEach(t=>t())})}(t);let f=()=>{},v=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(f=function({styleSheetRuleCb:a,mirror:l,stylesheetManager:h},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const t=s.CSSStyleSheet.prototype.insertRule,e=(s.CSSStyleSheet.prototype.insertRule=new Proxy(t,{apply:et((t,e,i)=>{var[s,r]=i,{id:n,styleId:o}=uo(e,l,h.styleMirror);return(n&&-1!==n||o&&-1!==o)&&a({id:n,styleId:o,adds:[{rule:s,index:r}]}),t.apply(e,i)})}),s.CSSStyleSheet.prototype.addRule=function(t,e,i=this.cssRules.length){return s.CSSStyleSheet.prototype.insertRule.apply(this,[t+` { ${e} }`,i])},s.CSSStyleSheet.prototype.deleteRule);s.CSSStyleSheet.prototype.deleteRule=new Proxy(e,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,removes:[{index:s}]}),t.apply(e,i)})}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])};let i;s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,replace:s}),t.apply(e,i)})}));let r;s.CSSStyleSheet.prototype.replaceSync&&(r=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(r,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,replaceSync:s}),t.apply(e,i)})}));const n={},o=(po("CSSGroupingRule")?n.CSSGroupingRule=s.CSSGroupingRule:(po("CSSMediaRule")&&(n.CSSMediaRule=s.CSSMediaRule),po("CSSConditionRule")&&(n.CSSConditionRule=s.CSSConditionRule),po("CSSSupportsRule")&&(n.CSSSupportsRule=s.CSSSupportsRule)),{});return Object.entries(n).forEach(([t,e])=>{o[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(o[t].insertRule,{apply:et((t,e,i)=>{var[s,r]=i,{id:n,styleId:o}=uo(e.parentStyleSheet,l,h.styleMirror);return(n&&-1!==n||o&&-1!==o)&&a({id:n,styleId:o,adds:[{rule:s,index:[...ho(e),r||0]}]}),t.apply(e,i)})}),e.prototype.deleteRule=new Proxy(o[t].deleteRule,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e.parentStyleSheet,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,removes:[{index:[...ho(e),s]}]}),t.apply(e,i)})})}),et(()=>{s.CSSStyleSheet.prototype.insertRule=t,s.CSSStyleSheet.prototype.deleteRule=e,i&&(s.CSSStyleSheet.prototype.replace=i),r&&(s.CSSStyleSheet.prototype.replaceSync=r),Object.entries(n).forEach(([t,e])=>{e.prototype.insertRule=o[t].insertRule,e.prototype.deleteRule=o[t].deleteRule})})}(t,{win:i}),v=co(t,t.doc),p=function({styleDeclarationCb:l,mirror:h,ignoreCSSAttributes:u,stylesheetManager:c},{win:t}){const d=t.CSSStyleDeclaration.prototype.setProperty,o=(t.CSSStyleDeclaration.prototype.setProperty=new Proxy(d,{apply:et((t,e,i)=>{var s,r,[n,o,a]=i;return u.has(n)?d.apply(e,[n,o,a]):({id:s,styleId:r}=uo(null==(s=e.parentRule)?void 0:s.parentStyleSheet,h,c.styleMirror),(s&&-1!==s||r&&-1!==r)&&l({id:s,styleId:r,set:{property:n,value:o,priority:a},index:ho(e.parentRule)}),t.apply(e,i))})}),t.CSSStyleDeclaration.prototype.removeProperty);return t.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:et((t,e,i)=>{var s,r,[n]=i;return u.has(n)?o.apply(e,[n]):({id:s,styleId:r}=uo(null==(s=e.parentRule)?void 0:s.parentStyleSheet,h,c.styleMirror),(s&&-1!==s||r&&-1!==r)&&l({id:s,styleId:r,remove:{property:n},index:ho(e.parentRule)}),t.apply(e,i))})}),et(()=>{t.CSSStyleDeclaration.prototype.setProperty=d,t.CSSStyleDeclaration.prototype.removeProperty=o})}(t,{win:i}),t.collectFonts)&&(m=function({fontCb:i,doc:t}){const e=t.defaultView;if(!e)return()=>{};const s=[],r=new WeakMap,n=e.FontFace;return e.FontFace=function(t,e,i){var s=new n(t,e,i);return r.set(s,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),s},t=Rn(t.fonts,"add",function(t){return function(e){return setTimeout(et(()=>{var t=r.get(e);t&&(i(t),r.delete(e))}),0),t.apply(this,[e])}}),s.push(()=>{e.FontFace=n}),s.push(t),et(()=>{s.forEach(t=>t())})}(t));const g=function(t){const{doc:l,mirror:h,blockClass:u,blockSelector:c,selectionCb:d}=t;let f=!0;return(t=et(()=>{var e=l.getSelection();if(!(!e||f&&null!=e&&e.isCollapsed)){f=e.isCollapsed||!1;var i=[],s=e.rangeCount||0;for(let t=0;t<s;t++){var{startContainer:r,startOffset:n,endContainer:o,endOffset:a}=e.getRangeAt(t);N(r,u,c,!0)||N(o,u,c,!0)||i.push({start:h.getId(r),startOffset:n,end:h.getId(o),endOffset:a})}d({ranges:i})}}))(),q("selectionchange",t)}(t),b=({doc:e,customElementCb:r}=[t][0],(e=e.defaultView)&&e.customElements?Rn(e.customElements,"define",function(s){return function(e,t,i){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return s.apply(this,[e,t,i])}}):()=>{}),y=[];for(const T of t.plugins)y.push(T.observer(T.callback,i,T.options));return et(()=>{io.forEach(t=>t.reset()),null!=o&&o.disconnect(),a(),l(),h(),u(),c(),d(),f(),v(),p(),m(),g(),b(),y.forEach(t=>t())})}function vo(t){return void 0!==window[t]}function po(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class mo{constructor(t){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,s){i=i||this.getIdToRemoteIdMap(t),s=s||this.getRemoteIdToIdMap(t);let r=i.get(e);return r||(r=this.generateIdFn(),i.set(e,r),s.set(r,e)),r}getIds(e,t){const i=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,i,s))}getRemoteId(t,e,i){i=i||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(e,t){const i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,i))}reset(t){t?(this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class go{constructor(t){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new mo(bt)),a(this,"crossOriginIframeStyleMirror"),a(this,"crossOriginIframeRootIdMap",new WeakMap),a(this,"mirror"),a(this,"mutationCb"),a(this,"wrappedEmit"),a(this,"loadListener"),a(this,"stylesheetManager"),a(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new mo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(e=t.contentWindow)&&e.addEventListener("message",this.handleMessage.bind(this)),null!=(e=this.loadListener)&&e.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&0<t.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;"rrweb"===e.data.type&&e.origin===e.data.origin&&t.source&&(t=(t=this.crossOriginIframeMap.get(t.source))&&this.transformCrossOriginEvent(t,e.data.event))&&this.wrappedEmit(t,e.data.isCheckout)}transformCrossOriginEvent(i,t){var e;switch(t.type){case Q.FullSnapshot:this.crossOriginIframeMirror.reset(i),this.crossOriginIframeStyleMirror.reset(i),this.replaceIdOnNode(t.data.node,i);var s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(i,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:Q.IncrementalSnapshot,data:{source:tt.Mutation,adds:[{parentId:this.mirror.getId(i),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return t;case Q.Custom:return this.replaceIds(t.data.payload,i,["id","parentId","previousId","nextId"]),t;case Q.IncrementalSnapshot:switch(t.data.source){case tt.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,i,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,i);var e=this.crossOriginIframeRootIdMap.get(i);e&&this.patchRootIdOnNode(t.node,e)}),t.data.removes.forEach(t=>{this.replaceIds(t,i,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,i,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case tt.Drag:case tt.TouchMove:case tt.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case tt.ViewportResize:return!1;case tt.MediaInteraction:case tt.MouseInteraction:case tt.Scroll:case tt.CanvasMutation:case tt.Input:return this.replaceIds(t.data,i,["id"]),t;case tt.StyleSheetRule:case tt.StyleDeclaration:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleId"]),t;case tt.Font:return t;case tt.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,i,["start","end"])}),t;case tt.AdoptedStyleSheet:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleIds"]),null!=(e=t.data.styles)&&e.forEach(t=>{this.replaceStyleIds(t,i,["styleId"])}),t}}return!1}replace(t,e,i,s){for(const r of s)!Array.isArray(e[r])&&"number"!=typeof e[r]||(Array.isArray(e[r])?e[r]=t.getIds(i,e[r]):e[r]=t.getId(i,e[r]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Jn.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class bo{constructor(t){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(Z(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);const i=ro({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(oo({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&0<t.adoptedStyleSheets.length&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(H.host(t))),this.restoreHandlers.push(co({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const r=this;this.restoreHandlers.push(Rn(t.prototype,"attachShadow",function(i){return function(t){var t=i.call(this,t),e=H.shadowRoot(this);return e&&zn(this)&&r.addShadowRoot(e,s),t}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var yo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),So=0;So<yo.length;So++)wo[yo.charCodeAt(So)]=So;function Io(t){for(var e=new Uint8Array(t),i=e.length,s="",r=0;r<i;r+=3)s=(s=(s=(s+=yo[e[r]>>2])+yo[(3&e[r])<<4|e[r+1]>>4])+yo[(15&e[r+1])<<2|e[r+2]>>6])+yo[63&e[r+2]];return i%3==2?s=s.substring(0,s.length-1)+"=":i%3==1&&(s=s.substring(0,s.length-2)+"=="),s}const Co=new Map;const ko=(e,i,s)=>{if(e&&(Oo(e,i)||"object"==typeof e)){i=function(t,e){let i=Co.get(t);return i||(i=new Map,Co.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(s,e.constructor.name);let t=i.indexOf(e);return-1===t&&(t=i.length,i.push(e)),t}};const _o=(t,e,i)=>t.map(t=>function e(t,i,s){var r;return t instanceof Array?t.map(t=>e(t,i,s)):null===t?t:t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:Io(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[e(t.buffer,i,s),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?(r=t.src,{rr_type:t.constructor.name,src:r}):t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[e(t.data,i,s),t.width,t.height]}:Oo(t,i)||"object"==typeof t?{rr_type:t.constructor.name,index:ko(t,i,s)}:t}(t,e,i)),Oo=(e,i)=>{var t=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof i[t]);return Boolean(t.find(t=>e instanceof i[t]))};function Ao(t,r,n,o){const e=[];try{var i=Rn(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(t,...e){var i;return N(this,r,n,!0)||(i="experimental-webgl"===(i=t)?"webgl":i,"__context"in this||(this.__context=i),o&&["webgl","webgl2"].includes(i)&&(e[0]&&"object"==typeof e[0]?(i=e[0]).preserveDrawingBuffer||(i.preserveDrawingBuffer=!0):e.splice(0,1,{preserveDrawingBuffer:!0}))),s.apply(this,[t,...e])}});e.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{e.forEach(t=>t())}}function Mo(t,s,r,n,o,a){var e,i=[];for(const h of Object.getOwnPropertyNames(t))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{"function"==typeof t[h]&&(e=Rn(t,h,function(i){return function(...t){var e=i.apply(this,t);return ko(e,a,this),"tagName"in this.canvas&&!N(this.canvas,n,o,!0)&&(t=_o(t,a,this),t={type:s,property:h,args:t},r(this.canvas,t)),e}}),i.push(e))}catch{var l=jn(t,h,{set(t){r(this.canvas,{type:s,property:h,args:[t],setter:!0})}});i.push(l)}return i}const jo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=";var Ro;const xo="undefined"!=typeof window&&window.Blob&&new Blob([(n=jo,Uint8Array.from(atob(n),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function Eo(e){let t;try{var i;if(t=xo&&(window.URL||window.webkitURL).createObjectURL(xo))return(i=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),i;throw""}catch(t){return new Worker("data:text/javascript;base64,"+jo,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class To{constructor(t){a(this,"pendingCanvasMutations",new Map),a(this,"rafStamps",{latestId:0,invokeId:null}),a(this,"mirror"),a(this,"mutationCb"),a(this,"resetObservers"),a(this,"frozen",!1),a(this,"locked",!1),a(this,"processMutation",(t,e)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});var{sampling:e="all",win:i,blockClass:s,blockSelector:r,recordCanvas:n,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,n&&"all"===e&&this.initCanvasMutationObserver(i,s,r),n&&"number"==typeof e&&this.initCanvasFPSObserver(e,i,s,r,{dataURLOptions:o})}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(t,i,s,r,n){const e=Ao(i,s,r,!0),o=new Map,a=new Eo,l=(a.onmessage=t=>{var e,i,s,r=t.data["id"];o.set(r,!1),"base64"in t.data&&({base64:t,type:e,width:i,height:s}=t.data,this.mutationCb({id:r,type:Yn["2D"],commands:[{property:"clearRect",args:[0,0,i,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e}]},0,0]}]}))},1e3/t);let h=0,u;const c=()=>{const e=[];return i.document.querySelectorAll("canvas").forEach(t=>{N(t,s,r,!0)||e.push(t)}),e},d=t=>{u=(h&&t-h<l||(h=t,c().forEach(async t=>{var e,i,s=this.mirror.getId(t);o.get(s)||0!==t.width&&0!==t.height&&(o.set(s,!0),["webgl","webgl2"].includes(t.__context)&&!1===(null==(i=null==(e=t.getContext(t.__context))?void 0:e.getContextAttributes())?void 0:i.preserveDrawingBuffer)&&e.clear(e.COLOR_BUFFER_BIT),i=await createImageBitmap(t),a.postMessage({id:s,bitmap:i,width:t.width,height:t.height,dataURLOptions:n.dataURLOptions},[i]))})),requestAnimationFrame(d))};u=requestAnimationFrame(d),this.resetObservers=()=>{e(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,e,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Ao(t,e,i,!1),r=function(i,s,r,n){const t=[];var e;for(const a of Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype))try{"function"==typeof s.CanvasRenderingContext2D.prototype[a]&&(e=Rn(s.CanvasRenderingContext2D.prototype,a,function(t){return function(...e){return N(this.canvas,r,n,!0)||setTimeout(()=>{var t=_o(e,s,this);i(this.canvas,{type:Yn["2D"],property:a,args:t})},0),t.apply(this,e)}}),t.push(e))}catch{var o=jn(s.CanvasRenderingContext2D.prototype,a,{set(t){i(this.canvas,{type:Yn["2D"],property:a,args:[t],setter:!0})}});t.push(o)}return()=>{t.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i),n=function(t,e,i,s){const r=[];return r.push(...Mo(e.WebGLRenderingContext.prototype,Yn.WebGL,t,i,s,e)),void 0!==e.WebGL2RenderingContext&&r.push(...Mo(e.WebGL2RenderingContext.prototype,Yn.WebGL2,t,i,s,e)),()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i);this.resetObservers=()=>{s(),r(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{var i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){var i,s;this.frozen||this.locked||(s=this.pendingCanvasMutations.get(t))&&-1!==e&&(i=s.map(t=>{const{type:e,...i}=t;return i}),s=s[0]["type"],this.mutationCb({id:e,type:s,commands:i}),this.pendingCanvasMutations.delete(t))}}class No{constructor(t){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Gn),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"ws"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0!==t.length){var i={id:e,styleIds:[]},s=[];for(const r of t){let t;this.styleMirror.has(r)?t=this.styleMirror.getId(r):(t=this.styleMirror.add(r),s.push({styleId:t,rules:Array.from(r.rules||CSSRule,(t,e)=>({rule:Y(t,r.href),index:e}))})),i.styleIds.push(t)}0<s.length&&(i.styles=s),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Do{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(t,e){t=this.nodeMap.get(t);return t&&Array.from(t).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}let it,Fo,Lo,Bo=!1;try{2!==Array.from([1],t=>2*t)[0]&&(Ro=document.createElement("iframe"),document.body.appendChild(Ro),Array.from=(null==(M=Ro.contentWindow)?void 0:M.Array.from)||Array.from,document.body.removeChild(Ro))}catch(t){console.debug("Unable to override Array.from",t)}const Uo=new rt;function Po(t={}){const{emit:s,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:F="rr-ignore",ignoreSelector:L=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:h=!0,maskAllInputs:B,maskInputOptions:e,slimDOMOptions:u,maskInputFn:c,maskTextFn:d,hooks:U,packFn:f,sampling:v={},dataURLOptions:p={},mousemoveWait:m,recordDOM:g=!0,recordCanvas:b=!1,recordCrossOriginIframes:P=!1,recordAfter:G="DOMContentLoaded"===t.recordAfter?t.recordAfter:"load",userTriggeredOnInput:W=!1,collectFonts:V=!1,inlineImages:y=!1,plugins:w,keepIframeSrcFn:S=()=>!1,ignoreCSSAttributes:z=new Set([]),errorHandler:Z}=t;t=Z,eo=t;const I=!P||window.parent===window;let C=!1;if(!I)try{window.parent.document&&(C=!1)}catch(t){C=!0}if(I&&!s)throw new Error("emit function is required");if(!I&&!C)return()=>{};void 0!==m&&void 0===v.mousemove&&(v.mousemove=m),Uo.reset();const k=!0===B?{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}:void 0!==e?e:{password:!0},_=!0===u||"all"===u?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===u,headMetaDescKeywords:"all"===u,headTitleMutations:"all"===u}:u||{};"NodeList"in(t=window)&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach);let Y,O=0;const K=t=>{for(const e of w||[])e.eventProcessor&&(t=e.eventProcessor(t));return t=f&&!C?f(t):t},A=(it=(t,e)=>{var i;t.timestamp=xn(),null==(i=io[0])||!i.isFrozen()||t.type===Q.FullSnapshot||t.type===Q.IncrementalSnapshot&&t.data.source===tt.Mutation||io.forEach(t=>t.unfreeze()),I?null!=s&&s(K(t),e):C&&(i={type:"rrweb",event:K(t),origin:window.location.origin,isCheckout:e},window.parent.postMessage(i,"*")),t.type===Q.FullSnapshot?(Y=t,O=0):t.type!==Q.IncrementalSnapshot||t.data.source===tt.Mutation&&t.data.isAttachIframe||(O++,e=n&&O>=n,i=r&&t.timestamp-Y.timestamp>r,(e||i)&&Fo(!0))},t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.Mutation,...t}})}),J=t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Scroll,...t}}),X=t=>it({type:Q.IncrementalSnapshot,data:{source:tt.CanvasMutation,...t}});const M=new No({mutationCb:A,adoptedStyleSheetCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.AdoptedStyleSheet,...t}})}),j=new go({mirror:Uo,mutationCb:A,stylesheetManager:M,recordCrossOriginIframes:P,wrappedEmit:it});for(const E of w||[])E.getMirror&&E.getMirror({nodeMirror:Uo,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});const R=new Do,x=(Lo=new To({recordCanvas:b,mutationCb:X,win:window,blockClass:i,blockSelector:o,mirror:Uo,sampling:v.canvas,dataURLOptions:p}),new bo({mutationCb:A,scrollCb:J,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:h,maskInputOptions:k,dataURLOptions:p,maskTextFn:d,maskInputFn:c,recordCanvas:b,inlineImages:y,sampling:v,slimDOMOptions:_,iframeManager:j,stylesheetManager:M,canvasManager:Lo,keepIframeSrcFn:S,processedNodeManager:R},mirror:Uo}));Fo=(t=!1)=>{if(g){it({type:Q.Meta,data:{href:window.location.href,width:Nn(),height:Tn()}},t),M.reset(),x.init(),io.forEach(t=>t.lock());var e=function(t,e){var{mirror:e=new rt,blockClass:i="rr-block",blockSelector:s=null,maskTextClass:r="rr-mask",maskTextSelector:n=null,inlineStylesheet:o=!0,inlineImages:a=!1,recordCanvas:l=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:c,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:v,onSerialize:p,onIframeLoad:m,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:y,keepIframeSrcFn:w=()=>!1}=e||{};return Et(t,{doc:t,mirror:e,blockClass:i,blockSelector:s,maskTextClass:r,maskTextSelector:n,skipChild:!1,inlineStylesheet:o,maskInputOptions:!0===h?{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}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:c,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:a,recordCanvas:l,preserveWhiteSpace:v,onSerialize:p,onIframeLoad:m,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:y,keepIframeSrcFn:w,newlyAddedElement:!1})}(document,{mirror:Uo,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:h,maskAllInputs:k,maskTextFn:d,maskInputFn:c,slimDOM:_,dataURLOptions:p,recordCanvas:b,inlineImages:y,onSerialize:t=>{Bn(t,Uo)&&j.addIframe(t),Un(t,Uo)&&M.trackLinkElement(t),Pn(t)&&x.addShadowRoot(H.shadowRoot(t),document)},onIframeLoad:(t,e)=>{j.attachIframe(t,e),x.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{M.attachLinkElement(t,e)},keepIframeSrcFn:S});if(!e)return console.warn("Failed to snapshot the document");it({type:Q.FullSnapshot,data:{node:e,initialOffset:En(window)}},t),io.forEach(t=>t.unlock()),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&M.adoptStyleSheets(document.adoptedStyleSheets,Uo.getId(document))}};try{const T=[],N=t=>{return et(fo)({mutationCb:A,mousemoveCb:(t,e)=>it({type:Q.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.MouseInteraction,...t}}),scrollCb:J,viewportResizeCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.ViewportResize,...t}}),inputCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Input,...t}}),mediaInteractionCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.MediaInteraction,...t}}),styleSheetRuleCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.StyleSheetRule,...t}}),styleDeclarationCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.StyleDeclaration,...t}}),canvasMutationCb:X,fontCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Font,...t}}),selectionCb:t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.Selection,...t}})},customElementCb:t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.CustomElement,...t}})},blockClass:i,ignoreClass:F,ignoreSelector:L,maskTextClass:a,maskTextSelector:l,maskInputOptions:k,inlineStylesheet:h,sampling:v,recordDOM:g,recordCanvas:b,inlineImages:y,userTriggeredOnInput:W,collectFonts:V,doc:t,maskInputFn:c,maskTextFn:d,keepIframeSrcFn:S,blockSelector:o,slimDOMOptions:_,dataURLOptions:p,mirror:Uo,iframeManager:j,stylesheetManager:M,shadowDomManager:x,processedNodeManager:R,canvasManager:Lo,ignoreCSSAttributes:z,plugins:(null==(t=null==w?void 0:w.filter(t=>t.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>it({type:Q.Plugin,data:{plugin:e.name,payload:t}})})))||[]},U)},D=(j.addLoadListener(t=>{try{T.push(N(t.contentDocument))}catch(t){console.warn(t)}}),()=>{Fo(),T.push(N(document)),Bo=!0});return"interactive"===document.readyState||"complete"===document.readyState?D():(T.push(q("DOMContentLoaded",()=>{it({type:Q.DomContentLoaded,data:{}}),"DOMContentLoaded"===G&&D()})),T.push(q("load",()=>{it({type:Q.Load,data:{}}),"load"===G&&D()},window))),()=>{T.forEach(t=>t()),R.destroy(),Bo=!1,eo=void 0}}catch(t){console.warn(t)}}Po.addCustomEvent=(t,e)=>{if(!Bo)throw new Error("please add custom event after start recording");it({type:Q.Custom,data:{tag:t,payload:e}})},Po.freezePage=()=>{io.forEach(t=>t.freeze())},Po.takeFullSnapshot=t=>{if(!Bo)throw new Error("please take full snapshot after start recording");Fo(t)},Po.mirror=Uo,A.record=Po},8572:function(t,e){!function(t){"use strict";let r=-1;const l=e=>{addEventListener("pageshow",t=>{t.persisted&&(r=t.timeStamp,e(t))},!0)},h=(e,i,s,r)=>{let n,o;return t=>{i.value>=0&&(t||r)&&(o=i.value-(n??0),(o||void 0===n)&&(n=i.value,i.delta=o,i.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(i.value,s),e(i)))}},u=t=>{requestAnimationFrame(()=>requestAnimationFrame(()=>t()))},n=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},c=()=>{const t=n();return t?.activationStart??0},d=(t,e=-1)=>{const i=n();let s="navigate";r>=0?s="back-forward-cache":i&&(document.prerendering||c()>0?s="prerender":document.wasDiscarded?s="restore":i.type&&(s=i.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:s}},i=new WeakMap;function f(t,e){return i.get(t)||i.set(t,new e),i.get(t)}class a{t;i=0;o=[];h(t){if(t.hadRecentInput)return;const e=this.o[0],i=this.o.at(-1);this.i&&e&&i&&t.startTime-i.startTime<1e3&&t.startTime-e.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),this.t?.(t)}}const v=(t,e,i={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const s=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return s.observe({type:t,buffered:!0,...i}),s}}catch{}},p=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let s=-1;const o=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,e=t=>{"hidden"===document.visibilityState&&s>-1&&(s="visibilitychange"===t.type?t.timeStamp:0,g())},m=()=>{addEventListener("visibilitychange",e,!0),addEventListener("prerenderingchange",e,!0)},g=()=>{removeEventListener("visibilitychange",e,!0),removeEventListener("prerenderingchange",e,!0)},b=()=>{if(s<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;s=t??o(),m(),l(()=>{setTimeout(()=>{s=o(),m()})})}return{get firstHiddenTime(){return s}}},y=t=>{document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},w=[1800,3e3],S=(e,o={})=>{y(()=>{const i=b();let s,r=d("FCP");const n=v("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(n.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-c(),0),r.entries.push(e),s(!0)))});n&&(s=h(e,r,w,o.reportAllChanges),l(t=>{r=d("FCP"),s=h(e,r,w,o.reportAllChanges),u(()=>{r.value=performance.now()-t.timeStamp,s(!0)})}))})},I=[.1,.25];let C=0,k=1/0,_=0;const O=t=>{for(const e of t)e.interactionId&&(k=Math.min(k,e.interactionId),_=Math.max(_,e.interactionId),C=_?(_-k)/7+1:0)};let A;const M=()=>A?C:performance.interactionCount??0,j=()=>{"interactionCount"in performance||A||(A=v("event",O,{type:"event",buffered:!0,durationThreshold:0}))};let R=0;class F{u=[];l=new Map;m;p;v(){R=M(),this.u.length=0,this.l.clear()}T(){const t=Math.min(this.u.length-1,Math.floor((M()-R)/50));return this.u[t]}h(t){if(this.m?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.u.at(-1);let i=this.l.get(t.interactionId);if(i||this.u.length<10||t.duration>e.P){if(i?t.duration>i.P?(i.entries=[t],i.P=t.duration):t.duration===i.P&&t.startTime===i.entries[0].startTime&&i.entries.push(t):(i={id:t.interactionId,entries:[t],P:t.duration},this.l.set(i.id,i),this.u.push(i)),this.u.sort((t,e)=>e.P-t.P),this.u.length>10){const t=this.u.splice(10);for(const e of t)this.l.delete(e.id)}this.p?.(i)}}}const x=t=>{const e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=p(t),document.addEventListener("visibilitychange",t,{once:!0}),e(()=>{t(),document.removeEventListener("visibilitychange",t)}))},E=[200,500];class L{m;h(t){this.m?.(t)}}const T=[2500,4e3],N=[800,1800],D=t=>{document.prerendering?y(()=>D(t)):"complete"!==document.readyState?addEventListener("load",()=>D(t),!0):setTimeout(t)};t.CLSThresholds=I,t.FCPThresholds=w,t.INPThresholds=E,t.LCPThresholds=T,t.TTFBThresholds=N,t.onCLS=(n,o={})=>{S(p(()=>{let i,s=d("CLS",0);const r=f(o,a),t=t=>{for(const e of t)r.h(e);r.i>s.value&&(s.value=r.i,s.entries=r.o,i())},e=v("layout-shift",t);e&&(i=h(n,s,I,o.reportAllChanges),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(t(e.takeRecords()),i(!0))}),l(()=>{r.i=0,s=d("CLS",0),i=h(n,s,I,o.reportAllChanges),u(()=>i())}),setTimeout(i))}))},t.onFCP=S,t.onINP=(n,o={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&y(()=>{j();let i,s=d("INP");const r=f(o,F),t=e=>{x(()=>{for(const t of e)r.h(t);const t=r.T();t&&t.P!==s.value&&(s.value=t.P,s.entries=t.entries,i())})},e=v("event",t,{durationThreshold:o.durationThreshold??40});i=h(n,s,E,o.reportAllChanges),e&&(e.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(t(e.takeRecords()),i(!0))}),l(()=>{r.v(),s=d("INP"),i=h(n,s,E,o.reportAllChanges)}))})},t.onLCP=(o,a={})=>{y(()=>{const e=b();let i,s=d("LCP");const r=f(a,L),t=t=>{a.reportAllChanges||(t=t.slice(-1));for(const a of t)r.h(a),a.startTime<e.firstHiddenTime&&(s.value=Math.max(a.startTime-c(),0),s.entries=[a],i())},n=v("largest-contentful-paint",t);if(n){i=h(o,s,T,a.reportAllChanges);const e=p(()=>{t(n.takeRecords()),n.disconnect(),i(!0)});for(const o of["keydown","click","visibilitychange"])addEventListener(o,()=>x(e),{capture:!0,once:!0});l(t=>{s=d("LCP"),i=h(o,s,T,a.reportAllChanges),u(()=>{s.value=performance.now()-t.timeStamp,i(!0)})})}})},t.onTTFB=(e,i={})=>{let s=d("TTFB"),r=h(e,s,N,i.reportAllChanges);D(()=>{const t=n();t&&(s.value=Math.max(t.responseStart-c(),0),s.entries=[t],r(!0),l(()=>{s=d("TTFB",0),r=h(e,s,N,i.reportAllChanges),r(!0)}))})}}(e)}},s={},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o={},(()=>{"use strict";var t=o,e=n(6914);const i=n(3447),s=n(1964);var r=n(2016),e=(0,e.l)();t.default=e,r.AutoInit.attempt(({client:t})=>{new i.SessionReplay(t),new s.AutoCapture(t)})})(),o.default;function n(t){var e=s[t];return void 0!==e||(e=s[t]={exports:{}},i[t].call(e.exports,e,e.exports,n)),e.exports}var i,s,o});