@obsrviq/tracker 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +513 -100
- package/dist/index.js.map +1 -1
- package/dist/obsrviq.global.js +42 -42
- package/dist/obsrviq.global.js.map +1 -1
- package/package.json +2 -2
- package/src/context.ts +4 -0
- package/src/index.ts +7 -1
- package/src/network.ts +111 -16
- package/src/ratelimit.ts +24 -0
- package/src/recorder.ts +20 -1
- package/src/serialize.ts +63 -7
- package/src/trace.ts +100 -0
- package/src/transport.ts +340 -68
- package/src/util.ts +15 -1
- package/src/websocket.ts +37 -12
package/dist/obsrviq.global.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
var ObsrviqSDK=(function(exports){'use strict';var be=Uint8Array,de=Uint16Array,tr=Int32Array,rr=new be([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),nr=new be([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Jn=new be([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ei=function(e,t){for(var r=new de(31),i=0;i<31;++i)r[i]=t+=1<<e[i-1];for(var n=new tr(r[30]),i=1;i<30;++i)for(var a=r[i];a<r[i+1];++a)n[a]=a-r[i]<<5|i;return {b:r,r:n}},ti=ei(rr,2),ma=ti.b,Kt=ti.r;ma[28]=258,Kt[258]=28;var ri=ei(nr,0),Kn=ri.r,Zt=new de(32768);for(W=0;W<32768;++W)Re=(W&43690)>>1|(W&21845)<<1,Re=(Re&52428)>>2|(Re&13107)<<2,Re=(Re&61680)>>4|(Re&3855)<<4,Zt[W]=((Re&65280)>>8|(Re&255)<<8)>>1;var Re,W,Je=(function(e,t,r){for(var i=e.length,n=0,a=new de(t);n<i;++n)e[n]&&++a[e[n]-1];var c=new de(t);for(n=1;n<t;++n)c[n]=c[n-1]+a[n-1]<<1;var p;for(p=new de(i),n=0;n<i;++n)e[n]&&(p[n]=Zt[c[e[n]-1]++]>>15-e[n]);return p}),De=new be(288);for(W=0;W<144;++W)De[W]=8;var W;for(W=144;W<256;++W)De[W]=9;var W;for(W=256;W<280;++W)De[W]=7;var W;for(W=280;W<288;++W)De[W]=8;var W,ut=new be(32);for(W=0;W<32;++W)ut[W]=5;var W,ga=Je(De,9);var ya=Je(ut,5);var ni=function(e){return (e+7)/8|0},va=function(e,t,r){return (r==null||r>e.length)&&(r=e.length),new be(e.subarray(t,r))};var Me=function(e,t,r){r<<=t&7;var i=t/8|0;e[i]|=r,e[i+1]|=r>>8;},Ye=function(e,t,r){r<<=t&7;var i=t/8|0;e[i]|=r,e[i+1]|=r>>8,e[i+2]|=r>>16;},Jt=function(e,t){for(var r=[],i=0;i<e.length;++i)e[i]&&r.push({s:i,f:e[i]});var n=r.length,a=r.slice();if(!n)return {t:si,l:0};if(n==1){var c=new be(r[0].s+1);return c[r[0].s]=1,{t:c,l:1}}r.sort(function(v,y){return v.f-y.f}),r.push({s:-1,f:25001});var p=r[0],o=r[1],h=0,s=1,f=2;for(r[0]={s:-1,f:p.f+o.f,l:p,r:o};s!=n-1;)p=r[r[h].f<r[f].f?h++:f++],o=r[h!=s&&r[h].f<r[f].f?h++:f++],r[s++]={s:-1,f:p.f+o.f,l:p,r:o};for(var u=a[0].s,i=1;i<n;++i)a[i].s>u&&(u=a[i].s);var l=new de(u+1),m=Qt(r[s-1],l,0);if(m>t){var i=0,d=0,g=m-t,S=1<<g;for(a.sort(function(y,C){return l[C.s]-l[y.s]||y.f-C.f});i<n;++i){var w=a[i].s;if(l[w]>t)d+=S-(1<<m-l[w]),l[w]=t;else break}for(d>>=g;d>0;){var b=a[i].s;l[b]<t?d-=1<<t-l[b]++-1:++i;}for(;i>=0&&d;--i){var E=a[i].s;l[E]==t&&(--l[E],++d);}m=t;}return {t:new be(l),l:m}},Qt=function(e,t,r){return e.s==-1?Math.max(Qt(e.l,t,r+1),Qt(e.r,t,r+1)):t[e.s]=r},Zn=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new de(++t),i=0,n=e[0],a=1,c=function(o){r[i++]=o;},p=1;p<=t;++p)if(e[p]==n&&p!=t)++a;else {if(!n&&a>2){for(;a>138;a-=138)c(32754);a>2&&(c(a>10?a-11<<5|28690:a-3<<5|12305),a=0);}else if(a>3){for(c(n),--a;a>6;a-=6)c(8304);a>2&&(c(a-3<<5|8208),a=0);}for(;a--;)c(n);a=1,n=e[p];}return {c:r.subarray(0,i),n:t}},Xe=function(e,t){for(var r=0,i=0;i<t.length;++i)r+=e[i]*t[i];return r},ii=function(e,t,r){var i=r.length,n=ni(t+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var a=0;a<i;++a)e[n+a+4]=r[a];return (n+4+i)*8},Qn=function(e,t,r,i,n,a,c,p,o,h,s){Me(t,s++,r),++n[256];for(var f=Jt(n,15),u=f.t,l=f.l,m=Jt(a,15),d=m.t,g=m.l,S=Zn(u),w=S.c,b=S.n,E=Zn(d),v=E.c,y=E.n,C=new de(19),R=0;R<w.length;++R)++C[w[R]&31];for(var R=0;R<v.length;++R)++C[v[R]&31];for(var I=Jt(C,7),M=I.t,k=I.l,A=19;A>4&&!M[Jn[A-1]];--A);var x=h+5<<3,Q=Xe(n,De)+Xe(a,ut)+c,Y=Xe(n,u)+Xe(a,d)+c+14+3*A+Xe(C,M)+2*C[16]+3*C[17]+7*C[18];if(o>=0&&x<=Q&&x<=Y)return ii(t,s,e.subarray(o,o+h));var P,O,B,X;if(Me(t,s,1+(Y<Q)),s+=2,Y<Q){P=Je(u,l),O=u,B=Je(d,g),X=d;var J=Je(M,k);Me(t,s,b-257),Me(t,s+5,y-1),Me(t,s+10,A-4),s+=14;for(var R=0;R<A;++R)Me(t,s+3*R,M[Jn[R]]);s+=3*A;for(var L=[w,v],ce=0;ce<2;++ce)for(var N=L[ce],R=0;R<N.length;++R){var re=N[R]&31;Me(t,s,J[re]),s+=M[re],re>15&&(Me(t,s,N[R]>>5&127),s+=N[R]>>12);}}else P=ga,O=De,B=ya,X=ut;for(var R=0;R<p;++R){var H=i[R];if(H>255){var re=H>>18&31;Ye(t,s,P[re+257]),s+=O[re+257],re>7&&(Me(t,s,H>>23&31),s+=rr[re]);var me=H&31;Ye(t,s,B[me]),s+=X[me],me>3&&(Ye(t,s,H>>5&8191),s+=nr[me]);}else Ye(t,s,P[H]),s+=O[H];}return Ye(t,s,P[256]),s+O[256]},wa=new tr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),si=new be(0),ba=function(e,t,r,i,n,a){var c=a.z||e.length,p=new be(i+c+5*(1+Math.ceil(c/7e3))+n),o=p.subarray(i,p.length-n),h=a.l,s=(a.r||0)&7;if(t){s&&(o[0]=a.r>>3);for(var f=wa[t-1],u=f>>13,l=f&8191,m=(1<<r)-1,d=a.p||new de(32768),g=a.h||new de(m+1),S=Math.ceil(r/3),w=2*S,b=function(V){return (e[V]^e[V+1]<<S^e[V+2]<<w)&m},E=new tr(25e3),v=new de(288),y=new de(32),C=0,R=0,I=a.i||0,M=0,k=a.w||0,A=0;I+2<c;++I){var x=b(I),Q=I&32767,Y=g[x];if(d[Q]=Y,g[x]=Q,k<=I){var P=c-I;if((C>7e3||M>24576)&&(P>423||!h)){s=Qn(e,o,0,E,v,y,R,M,A,I-A,s),M=C=R=0,A=I;for(var O=0;O<286;++O)v[O]=0;for(var O=0;O<30;++O)y[O]=0;}var B=2,X=0,J=l,L=Q-Y&32767;if(P>2&&x==b(I-L))for(var ce=Math.min(u,P)-1,N=Math.min(32767,I),re=Math.min(258,P);L<=N&&--J&&Q!=Y;){if(e[I+B]==e[I+B-L]){for(var H=0;H<re&&e[I+H]==e[I+H-L];++H);if(H>B){if(B=H,X=L,H>ce)break;for(var me=Math.min(L,H-2),ie=0,O=0;O<me;++O){var oe=I-L+O&32767,xe=d[oe],we=oe-xe&32767;we>ie&&(ie=we,Y=oe);}}}Q=Y,Y=d[Q],L+=Q-Y&32767;}if(X){E[M++]=268435456|Kt[B]<<18|Kn[X];var D=Kt[B]&31,ee=Kn[X]&31;R+=rr[D]+nr[ee],++v[257+D],++y[ee],k=I+B,++C;}else E[M++]=e[I],++v[e[I]];}}for(I=Math.max(I,k);I<c;++I)E[M++]=e[I],++v[e[I]];s=Qn(e,o,h,E,v,y,R,M,A,I-A,s),h||(a.r=s&7|o[s/8|0]<<3,s-=7,a.h=g,a.p=d,a.i=I,a.w=k);}else {for(var I=a.w||0;I<c+h;I+=65535){var q=I+65535;q>=c&&(o[s/8|0]=h,q=c),s=ii(o,s+1,e.subarray(I,q));}a.i=c;}return va(p,0,i+ni(s)+n)},Sa=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,i=9;--i;)r=(r&1&&-306674912)^r>>>1;e[t]=r;}return e})(),Ca=function(){var e=-1;return {p:function(t){for(var r=e,i=0;i<t.length;++i)r=Sa[r&255^t[i]]^r>>>8;e=r;},d:function(){return ~e}}};var Ea=function(e,t,r,i,n){if(!n&&(n={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),c=new be(a.length+e.length);c.set(a),c.set(e,a.length),e=c,n.w=a.length;}return ba(e,t.level==null?6:t.level,t.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,i,n)};var er=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8;},xa=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&er(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var i=0;i<=r.length;++i)e[i+10]=r.charCodeAt(i);}};var Ra=function(e){return 10+(e.filename?e.filename.length+1:0)};function oi(e,t){t||(t={});var r=Ca(),i=e.length;r.p(e);var n=Ea(e,t,Ra(t),8),a=n.length;return xa(n,t),er(n,a-8,r.d()),er(n,a-4,i),n}var Ma=typeof TextDecoder<"u"&&new TextDecoder,Ia=0;try{Ma.decode(si,{stream:!0}),Ia=1;}catch{}var Na=/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}/gi,Ta=/\b(?:\d[ -]*?){13,19}\b/g,Aa=/\b\d{3}-\d{2}-\d{4}\b/g,Oa=/\b\d{9,}\b/g,ka=/(password|passwd|passphrase|secret|token|authoriz|apikey|api[_-]key|creditcard|cardnumber|cardholder|cookie|cvv|cvc)/i,Da=new Set(["pass","pwd","auth","card","pin","otp","ssn","cvv","cvc"]);function Pa(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).filter(Boolean).map(t=>t.toLowerCase())}function ge(e){return e.replace(Na,"\xABemail\xBB").replace(Ta,t=>La(t)?"\xABcard\xBB":t).replace(Aa,"\xABssn\xBB").replace(Oa,"\xABnumber\xBB")}function La(e){let t=e.replace(/\D/g,"");return t.length>=13&&t.length<=19}var ai=new Set;function ir(e){ai=new Set(e.map(t=>String(t).trim().toLowerCase()).filter(Boolean));}var li=false;function sr(){li=true;}function ui(){return !li}function _a(e){return ai.has(e.toLowerCase())}function ft(e){return _a(e)||ka.test(e)?true:Pa(e).some(t=>Da.has(t))}function ht(e,t=0){if(t>24||e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(i=>ht(i,t+1));let r={};for(let[i,n]of Object.entries(e))r[i]=ft(i)?"\xABredacted\xBB":ht(n,t+1);return r}function Fa(e){let t=e.replace(/"([A-Za-z0-9_.\-]+)"\s*:\s*("(?:[^"\\]|\\.)*"|[^,}\]\s]+)/g,(r,i)=>ft(i)?'"'+i+'": "\xABredacted\xBB"':r);return t=t.replace(/(^|[?&])([A-Za-z0-9_.\-[\]]+)=([^&\s]*)/g,(r,i,n)=>ft(n)?i+n+"=\xABredacted\xBB":r),t}function ct(e){if(!e)return e;let t=e.trim();if(t[0]==="{"||t[0]==="[")try{return JSON.stringify(ht(JSON.parse(t)))}catch{}return Fa(e)}function ci(e){for(let t of e)if(t.type==="network"||t.type==="ws"){let r=t;r.requestBody?.preview&&(r.requestBody.preview=ct(r.requestBody.preview)),r.responseBody?.preview&&(r.responseBody.preview=ct(r.responseBody.preview)),r.body?.preview&&(r.body.preview=ct(r.body.preview));}else if(t.type==="custom"){let r=t;r.props&&(r.props=ht(r.props));}else if(t.type==="console"){let r=t.args;if(r)for(let i of r)i.kind==="object"&&i.json&&(i.json=ct(i.json));}}function dt(e,t=0){if(t>6)return "\xABdepth\xBB";if(typeof e=="string")return ge(e);if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(i=>dt(i,t+1));let r={};for(let[i,n]of Object.entries(e))r[i]=ft(i)?"\xABredacted\xBB":dt(n,t+1);return r}var or=5e3,pt=class{constructor(t){this.opts=t;this.buffer=[];this.sending=false;this.retryDelay=1e3;this.stopped=false;this.onVisibility=()=>{document.visibilityState==="hidden"&&this.flush("hidden");};this.onPageHide=()=>{this.flush("pagehide");};this.seq=t.startSeq??0;}start(){this.timer=setInterval(()=>{this.flush("timer");},this.opts.flushIntervalMs),document.addEventListener("visibilitychange",this.onVisibility,{capture:true}),window.addEventListener("pagehide",this.onPageHide,{capture:true});}enqueue(t){this.stopped||(this.buffer.push(t),this.buffer.length>=or&&(this.flush("backpressure"),this.buffer.length>=or&&(this.buffer=this.buffer.filter((r,i)=>r.type!=="dom"||i%2===0))));}async flush(t){if(this.sending||this.buffer.length===0)return true;if(!(t==="pagehide"||t==="hidden")&&ui())return this.stopped||setTimeout(()=>{this.flush("timer");},200),true;this.sending=true;let i=this.buffer;this.buffer=[],ci(i);let n={siteKey:this.opts.siteKey,sessionId:this.opts.sessionId,seq:this.seq,meta:this.opts.getMeta(),events:i};if(this.opts.beforeSend)try{n=this.opts.beforeSend(n);}catch{n=null;}if(!n)return this.sending=false,true;this.opts.onSeqDispatch?.(this.seq+1);let a=JSON.stringify(n),c=oi(new TextEncoder().encode(a)),p=await this.send(c,t==="pagehide"||t==="hidden");if(this.opts.onFlush?.({bytes:c.byteLength,events:i.length,ok:p}),p)return this.seq++,this.retryDelay=1e3,this.sending=false,true;if(this.buffer=i.slice(-or).concat(this.buffer),this.sending=false,!this.stopped){let o=this.retryDelay*(.5+Math.random());this.retryDelay=Math.min(this.retryDelay*2,3e4),setTimeout(()=>{this.flush("timer");},o);}return false}async send(t,r){let i=`${this.opts.endpoint.replace(/\/$/,"")}/v1/batch`,n={"content-type":"application/octet-stream","x-obsrviq-key":this.opts.siteKey},a=t;if(r){let o=new Blob([t],{type:"application/octet-stream"});if(typeof navigator.sendBeacon=="function")try{if(navigator.sendBeacon(i,o))return !0}catch{}try{return fetch(i,{method:"POST",body:a,headers:n,keepalive:!0,credentials:"omit",mode:"cors"}).catch(()=>{}),!0}catch{return false}}let c=new AbortController,p=setTimeout(()=>c.abort(),15e3);try{return (await fetch(i,{method:"POST",body:a,headers:n,credentials:"omit",mode:"cors",signal:c.signal})).ok}catch{return false}finally{clearTimeout(p);}}stop(){this.stopped=true,this.timer&&clearInterval(this.timer),document.removeEventListener("visibilitychange",this.onVisibility,{capture:true}),window.removeEventListener("pagehide",this.onPageHide,{capture:true}),this.flush("manual");}};var Ua=Object.defineProperty,Ba=(e,t,r)=>t in e?Ua(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,T=(e,t,r)=>Ba(e,typeof t!="symbol"?t+"":t,r),fi,za=Object.defineProperty,qa=(e,t,r)=>t in e?za(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,hi=(e,t,r)=>qa(e,typeof t!="symbol"?t+"":t,r),ne=(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",e))(ne||{}),di={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mt={},Ls={},$a=()=>!!globalThis.Zone;function In(e){if(mt[e])return mt[e];let t=globalThis[e],r=t.prototype,i=e in di?di[e]:void 0,n=!!(i&&i.every(p=>{var o,h;return !!((h=(o=Object.getOwnPropertyDescriptor(r,p))==null?void 0:o.get)!=null&&h.toString().includes("[native code]"))})),a=e in pi?pi[e]:void 0,c=!!(a&&a.every(p=>{var o;return typeof r[p]=="function"&&((o=r[p])==null?void 0:o.toString().includes("[native code]"))}));if(n&&c&&!$a())return mt[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let o=p.contentWindow;if(!o)return t.prototype;let h=o[e].prototype;if(!h)return p.remove(),r;let s=navigator.userAgent;return s.includes("Safari")&&!s.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),Ls[e]=()=>p.remove()):p.remove(),mt[e]=h}catch{return r}}var ar={};function Ne(e,t,r){var i;let n=`${e}.${String(r)}`;if(ar[n])return ar[n].call(t);let a=In(e),c=(i=Object.getOwnPropertyDescriptor(a,r))==null?void 0:i.get;return c?(ar[n]=c,c.call(t)):t[r]}var lr={};function _s(e,t,r){let i=`${e}.${String(r)}`;if(lr[i])return lr[i].bind(t);let a=In(e)[r];return typeof a!="function"?t[r]:(lr[i]=a,a.bind(t))}function Wa(e){return Ne("Node",e,"ownerDocument")}function Ha(e){return Ne("Node",e,"childNodes")}function ja(e){return Ne("Node",e,"parentNode")}function Va(e){return Ne("Node",e,"parentElement")}function Ga(e){return Ne("Node",e,"textContent")}function Ya(e,t){return _s("Node",e,"contains")(t)}function Xa(e){return _s("Node",e,"getRootNode")()}function Ja(e){return !e||!("host"in e)?null:Ne("ShadowRoot",e,"host")}function Ka(e){return e.styleSheets}function Za(e){return !e||!("shadowRoot"in e)?null:Ne("Element",e,"shadowRoot")}function Qa(e,t){return Ne("Element",e,"querySelector")(t)}function el(e,t){return Ne("Element",e,"querySelectorAll")(t)}function tl(){return [In("MutationObserver").constructor,Ls.MutationObserver??(()=>{})]}var Fs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Fs=()=>new Date().getTime());function rl(e,t,r){try{if(!(t in e))return ()=>{};let i=e[t],n=r(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i;}}catch{return ()=>{}}}var se={ownerDocument:Wa,childNodes:Ha,parentNode:ja,parentElement:Va,textContent:Ga,contains:Ya,getRootNode:Xa,host:Ja,styleSheets:Ka,shadowRoot:Za,querySelector:Qa,querySelectorAll:el,nowTimestamp:Fs,mutationObserverCtor:tl,patch:rl};function Us(e){return e.nodeType===e.ELEMENT_NODE}function Ze(e){let t=e&&"host"in e&&"mode"in e&&se.host(e)||null;return !!(t&&"shadowRoot"in t&&se.shadowRoot(t)===e)}function Qe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function nl(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 il(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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 pn(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let i=Array.from(t,n=>Bs(n,r)).join("");return nl(i)}catch{return null}}function Bs(e,t){if(ol(e)){let r;try{r=pn(e.styleSheet)||il(e);}catch{r=e.cssText;}return e.styleSheet.href?Tt(r,e.styleSheet.href):r}else {let r=e.cssText;return al(e)&&e.selectorText.includes(":")&&(r=sl(r)),t?Tt(r,t):r}}function sl(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ol(e){return "styleSheet"in e}function al(e){return "selectorText"in e}var Mt=class{constructor(){hi(this,"idNodeMap",new Map),hi(this,"nodeMetaMap",new WeakMap);}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.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){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i));}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r);}replace(t,r){let i=this.getNode(t);if(i){let n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(r,n);}this.idNodeMap.set(t,r);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function ll(){return new Mt}function It({element:e,maskInputOptions:t,tagName:r,type:i,value:n,maskInputFn:a}){let c=n||"",p=i&&Le(i);return (t[r.toLowerCase()]||p&&t[p])&&(a?c=a(c,e):c="*".repeat(c.length)),c}function Le(e){return e.toLowerCase()}var mi="__rrweb_original__";function ul(e){let t=e.getContext("2d");if(!t)return true;let r=50;for(let i=0;i<e.width;i+=r)for(let n=0;n<e.height;n+=r){let a=t.getImageData,c=mi in a?a[mi]:a;if(new Uint32Array(c.call(t,i,n,Math.min(r,e.width-i),Math.min(r,e.height-n)).data.buffer).some(o=>o!==0))return false}return true}function Nt(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Le(t):null}function zs(e,t){let r;try{r=new URL(e,t??window.location.href);}catch{return null}let i=/\.([0-9a-z]+)(?:$)/i,n=r.pathname.match(i);return n?.[1]??null}function cl(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var fl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,hl=/^(?:[a-z+]+:)?\/\//i,dl=/^www\..*/i,pl=/^(data:)([^,]*),(.*)/i;function Tt(e,t){return (e||"").replace(fl,(r,i,n,a,c,p)=>{let o=n||c||p,h=i||a||"";if(!o)return r;if(hl.test(o)||dl.test(o))return `url(${h}${o}${h})`;if(pl.test(o))return `url(${h}${o}${h})`;if(o[0]==="/")return `url(${h}${cl(t)+o}${h})`;let s=t.split("/"),f=o.split("/");s.pop();for(let u of f)u!=="."&&(u===".."?s.pop():s.push(u));return `url(${h}${s.join("/")}${h})`})}function gt(e,t=false){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function ml(e,t,r=false){let i=Array.from(t.childNodes),n=[],a=0;if(i.length>1&&e&&typeof e=="string"){let c=gt(e,r),p=c.length/e.length;for(let o=1;o<i.length;o++)if(i[o].textContent&&typeof i[o].textContent=="string"){let h=gt(i[o].textContent,r),s=100,f=3;for(;f<h.length&&(h[f].match(/[a-zA-Z0-9]/)||h.indexOf(h.substring(0,f),1)!==-1);f++);for(;f<h.length;f++){let u=h.substring(0,f),l=c.split(u),m=-1;if(l.length===2)m=l[0].length;else if(l.length>2&&l[0]===""&&i[o-1].textContent!=="")m=c.indexOf(u,1);else if(l.length===1){if(u=u.substring(0,u.length-1),l=c.split(u),l.length<=1)return n.push(e),n;f=s+1;}else f===h.length-1&&(m=c.indexOf(u));if(l.length>=2&&f>s){let d=i[o-1].textContent;if(d&&typeof d=="string"){let g=gt(d).length;m=c.indexOf(u,g);}m===-1&&(m=l[0].length);}if(m!==-1){let d=Math.floor(m/p);for(;d>0&&d<e.length;){if(a+=1,a>50*i.length)return n.push(e),n;let g=gt(e.substring(0,d),r);if(g.length===m){n.push(e.substring(0,d)),e=e.substring(d),c=c.substring(m);break}else g.length<m?d+=Math.max(1,Math.floor((m-g.length)/p)):d-=Math.max(1,Math.floor((g.length-m)*p));}break}}}}return n.push(e),n}function gl(e,t){return ml(e,t).join("/* rr_split */")}var yl=1,vl=new RegExp("[^a-z0-9-_:]"),tt=-2;function qs(){return yl++}function wl(e){if(e instanceof HTMLFormElement)return "form";let t=Le(e.tagName);return vl.test(t)?"div":t}var qe,gi,bl=/^[^ \t\n\r\u000c]+/,Sl=/^[, \t\n\r\u000c]+/;function Cl(e,t){if(t.trim()==="")return t;let r=0;function i(a){let c,p=a.exec(t.substring(r));return p?(c=p[0],r+=c.length,c):""}let n=[];for(;i(Sl),!(r>=t.length);){let a=i(bl);if(a.slice(-1)===",")a=He(e,a.substring(0,a.length-1)),n.push(a);else {let c="";a=He(e,a);let p=false;for(;;){let o=t.charAt(r);if(o===""){n.push((a+c).trim());break}else if(p)o===")"&&(p=false);else if(o===","){r+=1,n.push((a+c).trim());break}else o==="("&&(p=true);c+=o,r+=1;}}}return n.join(", ")}var yi=new WeakMap;function He(e,t){return !t||t.trim()===""?t:Nn(e,t)}function El(e){return !!(e.tagName==="svg"||e.ownerSVGElement)}function Nn(e,t){let r=yi.get(e);if(r||(r=e.createElement("a"),yi.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function $s(e,t,r,i){return i&&(r==="src"||r==="href"&&!(t==="use"&&i[0]==="#")||r==="xlink:href"&&i[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?He(e,i):r==="srcset"?Cl(e,i):r==="style"?Tt(i,Nn(e)):t==="object"&&r==="data"?He(e,i):i)}function Ws(e,t,r){return ["video","audio"].includes(e)&&t==="autoplay"}function xl(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return !0}else for(let i=e.classList.length;i--;){let n=e.classList[i];if(t.test(n))return !0}if(r)return e.matches(r)}catch{}return false}function At(e,t,r){if(!e)return false;if(e.nodeType!==e.ELEMENT_NODE)return r?At(se.parentNode(e),t,r):false;for(let i=e.classList.length;i--;){let n=e.classList[i];if(t.test(n))return true}return r?At(se.parentNode(e),t,r):false}function Hs(e,t,r,i){let n;if(Us(e)){if(n=e,!se.childNodes(n).length)return false}else {if(se.parentElement(e)===null)return false;n=se.parentElement(e);}try{if(typeof t=="string"){if(i){if(n.closest(`.${t}`))return !0}else if(n.classList.contains(t))return !0}else if(At(n,t,i))return !0;if(r){if(i){if(n.closest(r))return !0}else if(n.matches(r))return !0}}catch{}return false}function Rl(e,t,r){let i=e.contentWindow;if(!i)return;let n=false,a;try{a=i.document.readyState;}catch{return}if(a!=="complete"){let p=setTimeout(()=>{n||(t(),n=true);},r);e.addEventListener("load",()=>{clearTimeout(p),n=true,t();});return}let c="about:blank";if(i.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t);}function Ml(e,t,r){let i=false,n;try{n=e.sheet;}catch{return}if(n)return;let a=setTimeout(()=>{i||(t(),i=true);},r);e.addEventListener("load",()=>{clearTimeout(a),i=true,t();});}function Il(e,t){let{doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:c,inlineStylesheet:p,maskInputOptions:o={},maskTextFn:h,maskInputFn:s,dataURLOptions:f={},inlineImages:u,recordCanvas:l,keepIframeSrcFn:m,newlyAddedElement:d=false,cssCaptured:g=false}=t,S=Nl(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ne.Document,childNodes:[],compatMode:e.compatMode}:{type:ne.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return {type:ne.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return Al(e,{doc:r,blockClass:n,blockSelector:a,inlineStylesheet:p,maskInputOptions:o,maskInputFn:s,dataURLOptions:f,inlineImages:u,recordCanvas:l,keepIframeSrcFn:m,newlyAddedElement:d,rootId:S});case e.TEXT_NODE:return Tl(e,{doc:r,needsMask:c,maskTextFn:h,rootId:S,cssCaptured:g});case e.CDATA_SECTION_NODE:return {type:ne.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return {type:ne.Comment,textContent:se.textContent(e)||"",rootId:S};default:return false}}function Nl(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function Tl(e,t){let{needsMask:r,maskTextFn:i,rootId:n,cssCaptured:a}=t,c=se.parentNode(e),p=c&&c.tagName,o="",h=p==="STYLE"?true:void 0,s=p==="SCRIPT"?true:void 0;return s?o="SCRIPT_PLACEHOLDER":a||(o=se.textContent(e),h&&o&&(o=Tt(o,Nn(t.doc)))),!h&&!s&&o&&r&&(o=i?i(o,se.parentElement(e)):o.replace(/[\S]/g,"*")),{type:ne.Text,textContent:o||"",rootId:n}}function Al(e,t){let{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:a,maskInputOptions:c={},maskInputFn:p,dataURLOptions:o={},inlineImages:h,recordCanvas:s,keepIframeSrcFn:f,newlyAddedElement:u=false,rootId:l}=t,m=xl(e,i,n),d=wl(e),g={},S=e.attributes.length;for(let b=0;b<S;b++){let E=e.attributes[b];Ws(d,E.name,E.value)||(g[E.name]=$s(r,d,Le(E.name),E.value));}if(d==="link"&&a){let b=Array.from(r.styleSheets).find(v=>v.href===e.href),E=null;b&&(E=pn(b)),E&&(delete g.rel,delete g.href,g._cssText=E);}if(d==="style"&&e.sheet){let b=pn(e.sheet);b&&(e.childNodes.length>1&&(b=gl(b,e)),g._cssText=b);}if(["input","textarea","select"].includes(d)){let b=e.value,E=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=It({element:e,type:Nt(e),tagName:d,value:b,maskInputOptions:c,maskInputFn:p}):E&&(g.checked=E);}if(d==="option"&&(e.selected&&!c.select?g.selected=true:delete g.selected),d==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&s){if(e.__context==="2d")ul(e)||(g.rr_dataURL=e.toDataURL(o.type,o.quality));else if(!("__context"in e)){let b=e.toDataURL(o.type,o.quality),E=r.createElement("canvas");E.width=e.width,E.height=e.height;let v=E.toDataURL(o.type,o.quality);b!==v&&(g.rr_dataURL=b);}}if(d==="img"&&h){qe||(qe=r.createElement("canvas"),gi=qe.getContext("2d"));let b=e,E=b.currentSrc||b.getAttribute("src")||"<unknown-src>",v=b.crossOrigin,y=()=>{b.removeEventListener("load",y);try{qe.width=b.naturalWidth,qe.height=b.naturalHeight,gi.drawImage(b,0,0),g.rr_dataURL=qe.toDataURL(o.type,o.quality);}catch(C){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?y():b.addEventListener("load",y);return}else console.warn(`Cannot inline img src=${E}! Error: ${C}`);}b.crossOrigin==="anonymous"&&(v?g.crossOrigin=v:b.removeAttribute("crossorigin"));};b.complete&&b.naturalWidth!==0?y():b.addEventListener("load",y);}if(["audio","video"].includes(d)){let b=g;b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime,b.rr_mediaPlaybackRate=e.playbackRate,b.rr_mediaMuted=e.muted,b.rr_mediaLoop=e.loop,b.rr_mediaVolume=e.volume;}if(u||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){let{width:b,height:E}=e.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${E}px`};}d==="iframe"&&!f(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(d)&&(w=!0);}catch{}return {type:ne.Element,tagName:d,attributes:g,childNodes:[],isSVG:El(e)||void 0,needBlock:m,rootId:l,isCustom:w}}function G(e){return e==null?"":e.toLowerCase()}function js(e){return e===true||e==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function Ol(e,t){if(t.comment&&e.type===ne.Comment)return true;if(e.type===ne.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&zs(e.attributes.href)==="js"))return true;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(G(e.attributes.name).match(/^msapplication-tile(image|color)$/)||G(e.attributes.name)==="application-name"||G(e.attributes.rel)==="icon"||G(e.attributes.rel)==="apple-touch-icon"||G(e.attributes.rel)==="shortcut icon")))return true;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&G(e.attributes.name).match(/^description|keywords$/))return true;if(t.headMetaSocial&&(G(e.attributes.property).match(/^(og|twitter|fb):/)||G(e.attributes.name).match(/^(og|twitter):/)||G(e.attributes.name)==="pinterest"))return true;if(t.headMetaRobots&&(G(e.attributes.name)==="robots"||G(e.attributes.name)==="googlebot"||G(e.attributes.name)==="bingbot"))return true;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return true;if(t.headMetaAuthorship&&(G(e.attributes.name)==="author"||G(e.attributes.name)==="generator"||G(e.attributes.name)==="framework"||G(e.attributes.name)==="publisher"||G(e.attributes.name)==="progid"||G(e.attributes.property).match(/^article:/)||G(e.attributes.property).match(/^product:/)))return true;if(t.headMetaVerification&&(G(e.attributes.name)==="google-site-verification"||G(e.attributes.name)==="yandex-verification"||G(e.attributes.name)==="csrf-token"||G(e.attributes.name)==="p:domain_verify"||G(e.attributes.name)==="verify-v1"||G(e.attributes.name)==="verification"||G(e.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function je(e,t){let{doc:r,mirror:i,blockClass:n,blockSelector:a,maskTextClass:c,maskTextSelector:p,skipChild:o=false,inlineStylesheet:h=true,maskInputOptions:s={},maskTextFn:f,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m={},inlineImages:d=false,recordCanvas:g=false,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:y=()=>false,newlyAddedElement:C=false,cssCaptured:R=false}=t,{needsMask:I}=t,{preserveWhiteSpace:M=true}=t;I||(I=Hs(e,c,p,I===void 0));let k=Il(e,{doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:I,inlineStylesheet:h,maskInputOptions:s,maskTextFn:f,maskInputFn:u,dataURLOptions:m,inlineImages:d,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:C,cssCaptured:R});if(!k)return console.warn(e,"not serialized"),null;let A;i.hasNode(e)?A=i.getId(e):Ol(k,l)||!M&&k.type===ne.Text&&!k.textContent.replace(/^\s+|\s+$/gm,"").length?A=tt:A=qs();let x=Object.assign(k,{id:A});if(i.add(e,x),A===tt)return null;S&&S(e);let Q=!o;if(x.type===ne.Element){Q=Q&&!x.needBlock,delete x.needBlock;let P=se.shadowRoot(e);P&&Qe(P)&&(x.isShadowHost=true);}if((x.type===ne.Document||x.type===ne.Element)&&Q){l.headWhitespace&&x.type===ne.Element&&x.tagName==="head"&&(M=false);let P={doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:I,maskTextClass:c,maskTextSelector:p,skipChild:o,inlineStylesheet:h,maskInputOptions:s,maskTextFn:f,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m,inlineImages:d,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:v,keepIframeSrcFn:y,cssCaptured:false};if(!(x.type===ne.Element&&x.tagName==="textarea"&&x.attributes.value!==void 0)){x.type===ne.Element&&x.attributes._cssText!==void 0&&typeof x.attributes._cssText=="string"&&(P.cssCaptured=true);for(let B of Array.from(se.childNodes(e))){let X=je(B,P);X&&x.childNodes.push(X);}}let O=null;if(Us(e)&&(O=se.shadowRoot(e)))for(let B of Array.from(se.childNodes(O))){let X=je(B,P);X&&(Qe(O)&&(X.isShadow=true),x.childNodes.push(X));}}let Y=se.parentNode(e);return Y&&Ze(Y)&&Qe(Y)&&(x.isShadow=true),x.type===ne.Element&&x.tagName==="iframe"&&Rl(e,()=>{let P=e.contentDocument;if(P&&w){let O=je(P,{doc:P,mirror:i,blockClass:n,blockSelector:a,needsMask:I,maskTextClass:c,maskTextSelector:p,skipChild:false,inlineStylesheet:h,maskInputOptions:s,maskTextFn:f,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m,inlineImages:d,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:v,keepIframeSrcFn:y});O&&w(e,O);}},b),x.type===ne.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&zs(x.attributes.href)==="css")&&Ml(e,()=>{if(E){let P=je(e,{doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:I,maskTextClass:c,maskTextSelector:p,skipChild:false,inlineStylesheet:h,maskInputOptions:s,maskTextFn:f,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m,inlineImages:d,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:v,keepIframeSrcFn:y});P&&E(e,P);}},v),x}function kl(e,t){let{mirror:r=new Mt,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:p=true,inlineImages:o=false,recordCanvas:h=false,maskAllInputs:s=false,maskTextFn:f,maskInputFn:u,slimDOM:l=false,dataURLOptions:m,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:E,keepIframeSrcFn:v=()=>false}=t,y=s===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:s===false?{password:true}:s,C=js(l);return je(e,{doc:e,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:c,skipChild:false,inlineStylesheet:p,maskInputOptions:y,maskTextFn:f,maskInputFn:u,slimDOMOptions:C,dataURLOptions:m,inlineImages:o,recordCanvas:h,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:E,keepIframeSrcFn:v,newlyAddedElement:false})}function Pl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ll(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:true}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:true,get:function(){return e[i]}});}),r}var yt={exports:{}},vi;function _l(){if(vi)return yt.exports;vi=1;var e=String,t=function(){return {isColorSupported:false,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}};return yt.exports=t(),yt.exports.createColors=t,yt.exports}var Fl={},Ul=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),Ce=Ll(Ul),ur,wi;function Tn(){if(wi)return ur;wi=1;let e=_l(),t=Ce;class r extends Error{constructor(n,a,c,p,o,h){super(n),this.name="CssSyntaxError",this.reason=n,o&&(this.file=o),p&&(this.source=p),h&&(this.plugin=h),typeof a<"u"&&typeof c<"u"&&(typeof a=="number"?(this.line=a,this.column=c):(this.line=a.line,this.column=a.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(n){if(!this.source)return "";let a=this.source;n==null&&(n=e.isColorSupported),t&&n&&(a=t(a));let c=a.split(/\r?\n/),p=Math.max(this.line-3,0),o=Math.min(this.line+2,c.length),h=String(o).length,s,f;if(n){let{bold:u,gray:l,red:m}=e.createColors(true);s=d=>u(m(d)),f=d=>l(d);}else s=f=u=>u;return c.slice(p,o).map((u,l)=>{let m=p+1+l,d=" "+(" "+m).slice(-h)+" | ";if(m===this.line){let g=f(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+f(d)+u+`
|
|
2
|
-
`+g+s("^")}return " "+f(d)+
|
|
1
|
+
var ObsrviqSDK=(function(exports){'use strict';var be=Uint8Array,de=Uint16Array,sr=Int32Array,or=new be([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ar=new be([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ii=new be([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),li=function(e,t){for(var r=new de(31),i=0;i<31;++i)r[i]=t+=1<<e[i-1];for(var n=new sr(r[30]),i=1;i<30;++i)for(var o=r[i];o<r[i+1];++o)n[o]=o-r[i]<<5|i;return {b:r,r:n}},ui=li(or,2),Ea=ui.b,tr=ui.r;Ea[28]=258,tr[258]=28;var ci=li(ar,0),si=ci.r,rr=new de(32768);for(W=0;W<32768;++W)Me=(W&43690)>>1|(W&21845)<<1,Me=(Me&52428)>>2|(Me&13107)<<2,Me=(Me&61680)>>4|(Me&3855)<<4,rr[W]=((Me&65280)>>8|(Me&255)<<8)>>1;var Me,W,Ke=(function(e,t,r){for(var i=e.length,n=0,o=new de(t);n<i;++n)e[n]&&++o[e[n]-1];var l=new de(t);for(n=1;n<t;++n)l[n]=l[n-1]+o[n-1]<<1;var p;for(p=new de(i),n=0;n<i;++n)e[n]&&(p[n]=rr[l[e[n]-1]++]>>15-e[n]);return p}),De=new be(288);for(W=0;W<144;++W)De[W]=8;var W;for(W=144;W<256;++W)De[W]=9;var W;for(W=256;W<280;++W)De[W]=7;var W;for(W=280;W<288;++W)De[W]=8;var W,dt=new be(32);for(W=0;W<32;++W)dt[W]=5;var W,xa=Ke(De,9);var Ra=Ke(dt,5);var fi=function(e){return (e+7)/8|0},Ma=function(e,t,r){return (r==null||r>e.length)&&(r=e.length),new be(e.subarray(t,r))};var Ie=function(e,t,r){r<<=t&7;var i=t/8|0;e[i]|=r,e[i+1]|=r>>8;},Xe=function(e,t,r){r<<=t&7;var i=t/8|0;e[i]|=r,e[i+1]|=r>>8,e[i+2]|=r>>16;},er=function(e,t){for(var r=[],i=0;i<e.length;++i)e[i]&&r.push({s:i,f:e[i]});var n=r.length,o=r.slice();if(!n)return {t:di,l:0};if(n==1){var l=new be(r[0].s+1);return l[r[0].s]=1,{t:l,l:1}}r.sort(function(w,v){return w.f-v.f}),r.push({s:-1,f:25001});var p=r[0],a=r[1],h=0,s=1,f=2;for(r[0]={s:-1,f:p.f+a.f,l:p,r:a};s!=n-1;)p=r[r[h].f<r[f].f?h++:f++],a=r[h!=s&&r[h].f<r[f].f?h++:f++],r[s++]={s:-1,f:p.f+a.f,l:p,r:a};for(var c=o[0].s,i=1;i<n;++i)o[i].s>c&&(c=o[i].s);var u=new de(c+1),m=nr(r[s-1],u,0);if(m>t){var i=0,d=0,g=m-t,S=1<<g;for(o.sort(function(v,C){return u[C.s]-u[v.s]||v.f-C.f});i<n;++i){var y=o[i].s;if(u[y]>t)d+=S-(1<<m-u[y]),u[y]=t;else break}for(d>>=g;d>0;){var b=o[i].s;u[b]<t?d-=1<<t-u[b]++-1:++i;}for(;i>=0&&d;--i){var E=o[i].s;u[E]==t&&(--u[E],++d);}m=t;}return {t:new be(u),l:m}},nr=function(e,t,r){return e.s==-1?Math.max(nr(e.l,t,r+1),nr(e.r,t,r+1)):t[e.s]=r},oi=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new de(++t),i=0,n=e[0],o=1,l=function(a){r[i++]=a;},p=1;p<=t;++p)if(e[p]==n&&p!=t)++o;else {if(!n&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0);}else if(o>3){for(l(n),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0);}for(;o--;)l(n);o=1,n=e[p];}return {c:r.subarray(0,i),n:t}},Je=function(e,t){for(var r=0,i=0;i<t.length;++i)r+=e[i]*t[i];return r},hi=function(e,t,r){var i=r.length,n=fi(t+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var o=0;o<i;++o)e[n+o+4]=r[o];return (n+4+i)*8},ai=function(e,t,r,i,n,o,l,p,a,h,s){Ie(t,s++,r),++n[256];for(var f=er(n,15),c=f.t,u=f.l,m=er(o,15),d=m.t,g=m.l,S=oi(c),y=S.c,b=S.n,E=oi(d),w=E.c,v=E.n,C=new de(19),R=0;R<y.length;++R)++C[y[R]&31];for(var R=0;R<w.length;++R)++C[w[R]&31];for(var I=er(C,7),M=I.t,O=I.l,k=19;k>4&&!M[ii[k-1]];--k);var x=h+5<<3,Q=Je(n,De)+Je(o,dt)+l,Y=Je(n,c)+Je(o,d)+l+14+3*k+Je(C,M)+2*C[16]+3*C[17]+7*C[18];if(a>=0&&x<=Q&&x<=Y)return hi(t,s,e.subarray(a,a+h));var L,A,B,X;if(Ie(t,s,1+(Y<Q)),s+=2,Y<Q){L=Ke(c,u),A=c,B=Ke(d,g),X=d;var J=Ke(M,O);Ie(t,s,b-257),Ie(t,s+5,v-1),Ie(t,s+10,k-4),s+=14;for(var R=0;R<k;++R)Ie(t,s+3*R,M[ii[R]]);s+=3*k;for(var P=[y,w],ce=0;ce<2;++ce)for(var N=P[ce],R=0;R<N.length;++R){var re=N[R]&31;Ie(t,s,J[re]),s+=M[re],re>15&&(Ie(t,s,N[R]>>5&127),s+=N[R]>>12);}}else L=xa,A=De,B=Ra,X=dt;for(var R=0;R<p;++R){var H=i[R];if(H>255){var re=H>>18&31;Xe(t,s,L[re+257]),s+=A[re+257],re>7&&(Ie(t,s,H>>23&31),s+=or[re]);var me=H&31;Xe(t,s,B[me]),s+=X[me],me>3&&(Xe(t,s,H>>5&8191),s+=ar[me]);}else Xe(t,s,L[H]),s+=A[H];}return Xe(t,s,L[256]),s+A[256]},Ia=new sr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),di=new be(0),Na=function(e,t,r,i,n,o){var l=o.z||e.length,p=new be(i+l+5*(1+Math.ceil(l/7e3))+n),a=p.subarray(i,p.length-n),h=o.l,s=(o.r||0)&7;if(t){s&&(a[0]=o.r>>3);for(var f=Ia[t-1],c=f>>13,u=f&8191,m=(1<<r)-1,d=o.p||new de(32768),g=o.h||new de(m+1),S=Math.ceil(r/3),y=2*S,b=function(V){return (e[V]^e[V+1]<<S^e[V+2]<<y)&m},E=new sr(25e3),w=new de(288),v=new de(32),C=0,R=0,I=o.i||0,M=0,O=o.w||0,k=0;I+2<l;++I){var x=b(I),Q=I&32767,Y=g[x];if(d[Q]=Y,g[x]=Q,O<=I){var L=l-I;if((C>7e3||M>24576)&&(L>423||!h)){s=ai(e,a,0,E,w,v,R,M,k,I-k,s),M=C=R=0,k=I;for(var A=0;A<286;++A)w[A]=0;for(var A=0;A<30;++A)v[A]=0;}var B=2,X=0,J=u,P=Q-Y&32767;if(L>2&&x==b(I-P))for(var ce=Math.min(c,L)-1,N=Math.min(32767,I),re=Math.min(258,L);P<=N&&--J&&Q!=Y;){if(e[I+B]==e[I+B-P]){for(var H=0;H<re&&e[I+H]==e[I+H-P];++H);if(H>B){if(B=H,X=P,H>ce)break;for(var me=Math.min(P,H-2),ie=0,A=0;A<me;++A){var oe=I-P+A&32767,Re=d[oe],we=oe-Re&32767;we>ie&&(ie=we,Y=oe);}}}Q=Y,Y=d[Q],P+=Q-Y&32767;}if(X){E[M++]=268435456|tr[B]<<18|si[X];var D=tr[B]&31,ee=si[X]&31;R+=or[D]+ar[ee],++w[257+D],++v[ee],O=I+B,++C;}else E[M++]=e[I],++w[e[I]];}}for(I=Math.max(I,O);I<l;++I)E[M++]=e[I],++w[e[I]];s=ai(e,a,h,E,w,v,R,M,k,I-k,s),h||(o.r=s&7|a[s/8|0]<<3,s-=7,o.h=g,o.p=d,o.i=I,o.w=O);}else {for(var I=o.w||0;I<l+h;I+=65535){var z=I+65535;z>=l&&(a[s/8|0]=h,z=l),s=hi(a,s+1,e.subarray(I,z));}o.i=l;}return Ma(p,0,i+fi(s)+n)},Ta=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,i=9;--i;)r=(r&1&&-306674912)^r>>>1;e[t]=r;}return e})(),ka=function(){var e=-1;return {p:function(t){for(var r=e,i=0;i<t.length;++i)r=Ta[r&255^t[i]]^r>>>8;e=r;},d:function(){return ~e}}};var Aa=function(e,t,r,i,n){if(!n&&(n={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),l=new be(o.length+e.length);l.set(o),l.set(e,o.length),e=l,n.w=o.length;}return Na(e,t.level==null?6:t.level,t.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,i,n)};var ir=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8;},Oa=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&ir(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var i=0;i<=r.length;++i)e[i+10]=r.charCodeAt(i);}};var Da=function(e){return 10+(e.filename?e.filename.length+1:0)};function lr(e,t){t||(t={});var r=ka(),i=e.length;r.p(e);var n=Aa(e,t,Da(t),8),o=n.length;return Oa(n,t),ir(n,o-8,r.d()),ir(n,o-4,i),n}var La=typeof TextDecoder<"u"&&new TextDecoder,Pa=0;try{La.decode(di,{stream:!0}),Pa=1;}catch{}var _a=/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}/gi,Fa=/\b(?:\d[ -]*?){13,19}\b/g,Ua=/\b\d{3}-\d{2}-\d{4}\b/g,Ba=/\b\d{9,}\b/g,qa=/(password|passwd|passphrase|secret|token|authoriz|apikey|api[_-]key|creditcard|cardnumber|cardholder|cookie|cvv|cvc)/i,za=new Set(["pass","pwd","auth","card","pin","otp","ssn","cvv","cvc"]);function $a(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).filter(Boolean).map(t=>t.toLowerCase())}function ge(e){return e.replace(_a,"\xABemail\xBB").replace(Fa,t=>Wa(t)?"\xABcard\xBB":t).replace(Ua,"\xABssn\xBB").replace(Ba,"\xABnumber\xBB")}function Wa(e){let t=e.replace(/\D/g,"");return t.length>=13&&t.length<=19}var pi=new Set;function ur(e){pi=new Set(e.map(t=>String(t).trim().toLowerCase()).filter(Boolean));}var mi=false;function cr(){mi=true;}function gi(){return !mi}function Ha(e){return pi.has(e.toLowerCase())}function Ze(e){return Ha(e)||qa.test(e)?true:$a(e).some(t=>za.has(t))}function mt(e,t=0){if(t>24||e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(i=>mt(i,t+1));let r={};for(let[i,n]of Object.entries(e))r[i]=Ze(i)?"\xABredacted\xBB":mt(n,t+1);return r}function ja(e){let t=e.replace(/"([A-Za-z0-9_.\-]+)"\s*:\s*("(?:[^"\\]|\\.)*"|[^,}\]\s]+)/g,(r,i)=>Ze(i)?'"'+i+'": "\xABredacted\xBB"':r);return t=t.replace(/(^|[?&])([A-Za-z0-9_.\-[\]]+)=([^&\s]*)/g,(r,i,n)=>Ze(n)?i+n+"=\xABredacted\xBB":r),t}function pt(e){if(!e)return e;let t=e.trim();if(t[0]==="{"||t[0]==="[")try{return JSON.stringify(mt(JSON.parse(t)))}catch{}return ja(e)}function fr(e){for(let t of e)if(t.type==="network"||t.type==="ws"){let r=t;r.requestBody?.preview&&(r.requestBody.preview=pt(r.requestBody.preview)),r.responseBody?.preview&&(r.responseBody.preview=pt(r.responseBody.preview)),r.body?.preview&&(r.body.preview=pt(r.body.preview));}else if(t.type==="custom"){let r=t;r.props&&(r.props=mt(r.props));}else if(t.type==="console"){let r=t.args;if(r)for(let i of r)i.kind==="object"&&i.json&&(i.json=pt(i.json));}}var ze=5e3,Va=4*1024*1024,yi=56*1024,Qe="obsrviq.spill",Ga=15e5,Ya=1440*60*1e3,Xa=2,Ja=4,gt=class{constructor(t){this.opts=t;this.buffer=[];this.seqFloor=0;this.sending=false;this.retryDelay=1e3;this.stopped=false;this.onVisibility=()=>{document.visibilityState==="hidden"&&this.flush("hidden");};this.onPageHide=()=>{this.flush("pagehide");};this.seq=t.startSeq??0;}start(){this.timer=setInterval(()=>{this.flush("timer");},this.opts.flushIntervalMs),document.addEventListener("visibilitychange",this.onVisibility,{capture:true}),window.addEventListener("pagehide",this.onPageHide,{capture:true}),this.resendSpill();}enqueue(t){this.stopped||(this.buffer.push(t),this.buffer.length>=ze&&(this.flush("backpressure"),this.buffer.length>=ze&&this.shedDomBacklog()));}shedDomBacklog(){let t=-1;for(let r=this.buffer.length-1;r>=0;r--){let i=this.buffer[r];if(i?.type==="dom"&&i.data?.type===Xa){t=r;break}}if(t>0){let r=t,i=this.buffer[t-1];i?.type==="dom"&&i.data?.type===Ja&&(r=t-1);let n=this.buffer.filter((o,l)=>o.type!=="dom"||l>=r);if(n.length<this.buffer.length&&(this.buffer=n,this.buffer.length<ze))return}this.buffer=this.buffer.filter(r=>r.type!=="dom"),this.buffer.length>=ze&&(this.buffer=this.buffer.slice(-Math.floor(ze/2))),this.opts.onDomDrop?.();}async flush(t){if(t==="pagehide"||t==="hidden")return this.flushUnload();if(this.sending||this.buffer.length===0)return true;if(gi()&&!this.stopped)return setTimeout(()=>{this.flush("timer");},200),true;this.sending=true;let r=this.buffer;this.buffer=[],fr(r);let i;try{i=await this.sendEvents(r);}finally{this.sending=false;}return i&&this.stopped&&this.buffer.length>0&&this.flush("manual"),i}async sendEvents(t){let r=[t];for(;r.length>0;){let i=r[0],n=await this.dispatch(i);if(n==="ok"){r.shift();continue}if(n==="too_large"&&i.length>1){let o=Math.ceil(i.length/2);r.splice(0,1,i.slice(0,o),i.slice(o));continue}if(n==="fatal"||n==="too_large"){r.shift();continue}if(this.buffer=[].concat(...r,this.buffer),this.buffer.length>=ze&&this.shedDomBacklog(),!this.stopped){let o=this.retryDelay*(.5+Math.random());this.retryDelay=Math.min(this.retryDelay*2,3e4),setTimeout(()=>{this.flush("timer");},o);}return false}return this.retryDelay=1e3,true}async dispatch(t){this.seqFloor>this.seq&&(this.seq=this.seqFloor);let r={siteKey:this.opts.siteKey,sessionId:this.opts.sessionId,seq:this.seq,meta:this.opts.getMeta(),events:t};if(this.opts.beforeSend)try{r=this.opts.beforeSend(r);}catch{r=null;}if(!r)return "ok";let i=JSON.stringify(r);if(i.length>Va&&t.length>1)return "too_large";this.opts.onSeqDispatch?.(this.seq+1);let n=await Ka(new TextEncoder().encode(i)),o=await this.send(n);return this.opts.onFlush?.({bytes:n.byteLength,events:t.length,ok:o==="ok"}),o==="ok"&&(this.seq=Math.max(this.seq+1,this.seqFloor)),o}async send(t){let r=`${this.opts.endpoint.replace(/\/$/,"")}/v1/batch`,i=new AbortController,n=setTimeout(()=>i.abort(),15e3);try{let o=await fetch(r,{method:"POST",body:t,headers:{"content-type":"application/octet-stream","x-obsrviq-key":this.opts.siteKey},credentials:"omit",mode:"cors",signal:i.signal});return o.ok?"ok":o.status===413?"too_large":o.status>=400&&o.status<500&&o.status!==408&&o.status!==429?"fatal":"retry"}catch{return "retry"}finally{clearTimeout(n);}}flushUnload(){if(this.buffer.length===0)return true;let t=this.buffer;this.buffer=[],fr(t);let r=Math.max(this.sending?this.seq+1:this.seq,this.seqFloor),i=[],n=[t];for(;n.length>0;){let o=n.shift(),l={siteKey:this.opts.siteKey,sessionId:this.opts.sessionId,seq:r,meta:this.opts.getMeta(),events:o};if(this.opts.beforeSend)try{l=this.opts.beforeSend(l);}catch{l=null;}if(!l)continue;let p=lr(new TextEncoder().encode(JSON.stringify(l)));if(p.byteLength>yi&&o.length>1){let a=Math.ceil(o.length/2);n.unshift(o.slice(0,a),o.slice(a));continue}i.push({gz:p,count:o.length}),r++;}this.seqFloor=r,this.opts.onSeqDispatch?.(r);for(let{gz:o,count:l}of i){let p=o.byteLength<=yi&&this.sendUnload(o);p||this.spill(o),this.opts.onFlush?.({bytes:o.byteLength,events:l,ok:p});}return true}sendUnload(t){let r=`${this.opts.endpoint.replace(/\/$/,"")}/v1/batch`,i=new Blob([t],{type:"application/octet-stream"});if(typeof navigator.sendBeacon=="function")try{if(navigator.sendBeacon(r,i))return !0}catch{}try{return fetch(r,{method:"POST",body:t,headers:{"content-type":"application/octet-stream","x-obsrviq-key":this.opts.siteKey},keepalive:!0,credentials:"omit",mode:"cors"}).catch(()=>{}),!0}catch{return false}}spill(t){try{let r=window.localStorage.getItem(Qe),i=r?JSON.parse(r):[];i.push({k:this.opts.siteKey,b:Za(t),ts:Date.now()});let n=i.reduce((o,l)=>o+l.b.length,0);for(;i.length>0&&n>Ga;)n-=i[0].b.length,i.shift();window.localStorage.setItem(Qe,JSON.stringify(i));}catch{}}resendSpill(){let t=[];try{let r=window.localStorage.getItem(Qe);if(!r)return;let i=JSON.parse(r),n=Date.now(),o=i.filter(p=>p&&typeof p.b=="string"&&n-p.ts<Ya);t=o.filter(p=>p.k===this.opts.siteKey);let l=o.filter(p=>p.k!==this.opts.siteKey);l.length>0?window.localStorage.setItem(Qe,JSON.stringify(l)):window.localStorage.removeItem(Qe);}catch{return}t.length!==0&&(async()=>{for(let r of t)try{await this.send(vi(r.b))==="retry"&&this.spill(vi(r.b));}catch{}})();}stop(){this.stopped=true,this.timer&&clearInterval(this.timer),document.removeEventListener("visibilitychange",this.onVisibility,{capture:true}),window.removeEventListener("pagehide",this.onPageHide,{capture:true}),this.flush("manual");}};async function Ka(e){if(typeof CompressionStream<"u")try{let t=new Blob([e]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(t).arrayBuffer())}catch{}return lr(e)}function Za(e){let t="";for(let r=0;r<e.length;r+=32768)t+=String.fromCharCode(...e.subarray(r,r+32768));return btoa(t)}function vi(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}var Qa=Object.defineProperty,el=(e,t,r)=>t in e?Qa(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,T=(e,t,r)=>el(e,typeof t!="symbol"?t+"":t,r),wi,tl=Object.defineProperty,rl=(e,t,r)=>t in e?tl(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,bi=(e,t,r)=>rl(e,typeof t!="symbol"?t+"":t,r),ne=(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",e))(ne||{}),Si={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ci={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={},Ws={},nl=()=>!!globalThis.Zone;function On(e){if(yt[e])return yt[e];let t=globalThis[e],r=t.prototype,i=e in Si?Si[e]:void 0,n=!!(i&&i.every(p=>{var a,h;return !!((h=(a=Object.getOwnPropertyDescriptor(r,p))==null?void 0:a.get)!=null&&h.toString().includes("[native code]"))})),o=e in Ci?Ci[e]:void 0,l=!!(o&&o.every(p=>{var a;return typeof r[p]=="function"&&((a=r[p])==null?void 0:a.toString().includes("[native code]"))}));if(n&&l&&!nl())return yt[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let a=p.contentWindow;if(!a)return t.prototype;let h=a[e].prototype;if(!h)return p.remove(),r;let s=navigator.userAgent;return s.includes("Safari")&&!s.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),Ws[e]=()=>p.remove()):p.remove(),yt[e]=h}catch{return r}}var hr={};function Te(e,t,r){var i;let n=`${e}.${String(r)}`;if(hr[n])return hr[n].call(t);let o=On(e),l=(i=Object.getOwnPropertyDescriptor(o,r))==null?void 0:i.get;return l?(hr[n]=l,l.call(t)):t[r]}var dr={};function Hs(e,t,r){let i=`${e}.${String(r)}`;if(dr[i])return dr[i].bind(t);let o=On(e)[r];return typeof o!="function"?t[r]:(dr[i]=o,o.bind(t))}function il(e){return Te("Node",e,"ownerDocument")}function sl(e){return Te("Node",e,"childNodes")}function ol(e){return Te("Node",e,"parentNode")}function al(e){return Te("Node",e,"parentElement")}function ll(e){return Te("Node",e,"textContent")}function ul(e,t){return Hs("Node",e,"contains")(t)}function cl(e){return Hs("Node",e,"getRootNode")()}function fl(e){return !e||!("host"in e)?null:Te("ShadowRoot",e,"host")}function hl(e){return e.styleSheets}function dl(e){return !e||!("shadowRoot"in e)?null:Te("Element",e,"shadowRoot")}function pl(e,t){return Te("Element",e,"querySelector")(t)}function ml(e,t){return Te("Element",e,"querySelectorAll")(t)}function gl(){return [On("MutationObserver").constructor,Ws.MutationObserver??(()=>{})]}var js=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(js=()=>new Date().getTime());function yl(e,t,r){try{if(!(t in e))return ()=>{};let i=e[t],n=r(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i;}}catch{return ()=>{}}}var se={ownerDocument:il,childNodes:sl,parentNode:ol,parentElement:al,textContent:ll,contains:ul,getRootNode:cl,host:fl,styleSheets:hl,shadowRoot:dl,querySelector:pl,querySelectorAll:ml,nowTimestamp:js,mutationObserverCtor:gl,patch:yl};function Vs(e){return e.nodeType===e.ELEMENT_NODE}function tt(e){let t=e&&"host"in e&&"mode"in e&&se.host(e)||null;return !!(t&&"shadowRoot"in t&&se.shadowRoot(t)===e)}function rt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function vl(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 wl(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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 wn(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let i=Array.from(t,n=>Gs(n,r)).join("");return vl(i)}catch{return null}}function Gs(e,t){if(Sl(e)){let r;try{r=wn(e.styleSheet)||wl(e);}catch{r=e.cssText;}return e.styleSheet.href?At(r,e.styleSheet.href):r}else {let r=e.cssText;return Cl(e)&&e.selectorText.includes(":")&&(r=bl(r)),t?At(r,t):r}}function bl(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Sl(e){return "styleSheet"in e}function Cl(e){return "selectorText"in e}var Nt=class{constructor(){bi(this,"idNodeMap",new Map),bi(this,"nodeMetaMap",new WeakMap);}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.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){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i));}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r);}replace(t,r){let i=this.getNode(t);if(i){let n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(r,n);}this.idNodeMap.set(t,r);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function El(){return new Nt}function Tt({element:e,maskInputOptions:t,tagName:r,type:i,value:n,maskInputFn:o}){let l=n||"",p=i&&Pe(i);return (t[r.toLowerCase()]||p&&t[p])&&(o?l=o(l,e):l="*".repeat(l.length)),l}function Pe(e){return e.toLowerCase()}var Ei="__rrweb_original__";function xl(e){let t=e.getContext("2d");if(!t)return true;let r=50;for(let i=0;i<e.width;i+=r)for(let n=0;n<e.height;n+=r){let o=t.getImageData,l=Ei in o?o[Ei]:o;if(new Uint32Array(l.call(t,i,n,Math.min(r,e.width-i),Math.min(r,e.height-n)).data.buffer).some(a=>a!==0))return false}return true}function kt(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Pe(t):null}function Ys(e,t){let r;try{r=new URL(e,t??window.location.href);}catch{return null}let i=/\.([0-9a-z]+)(?:$)/i,n=r.pathname.match(i);return n?.[1]??null}function Rl(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Ml=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Il=/^(?:[a-z+]+:)?\/\//i,Nl=/^www\..*/i,Tl=/^(data:)([^,]*),(.*)/i;function At(e,t){return (e||"").replace(Ml,(r,i,n,o,l,p)=>{let a=n||l||p,h=i||o||"";if(!a)return r;if(Il.test(a)||Nl.test(a))return `url(${h}${a}${h})`;if(Tl.test(a))return `url(${h}${a}${h})`;if(a[0]==="/")return `url(${h}${Rl(t)+a}${h})`;let s=t.split("/"),f=a.split("/");s.pop();for(let c of f)c!=="."&&(c===".."?s.pop():s.push(c));return `url(${h}${s.join("/")}${h})`})}function vt(e,t=false){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function kl(e,t,r=false){let i=Array.from(t.childNodes),n=[],o=0;if(i.length>1&&e&&typeof e=="string"){let l=vt(e,r),p=l.length/e.length;for(let a=1;a<i.length;a++)if(i[a].textContent&&typeof i[a].textContent=="string"){let h=vt(i[a].textContent,r),s=100,f=3;for(;f<h.length&&(h[f].match(/[a-zA-Z0-9]/)||h.indexOf(h.substring(0,f),1)!==-1);f++);for(;f<h.length;f++){let c=h.substring(0,f),u=l.split(c),m=-1;if(u.length===2)m=u[0].length;else if(u.length>2&&u[0]===""&&i[a-1].textContent!=="")m=l.indexOf(c,1);else if(u.length===1){if(c=c.substring(0,c.length-1),u=l.split(c),u.length<=1)return n.push(e),n;f=s+1;}else f===h.length-1&&(m=l.indexOf(c));if(u.length>=2&&f>s){let d=i[a-1].textContent;if(d&&typeof d=="string"){let g=vt(d).length;m=l.indexOf(c,g);}m===-1&&(m=u[0].length);}if(m!==-1){let d=Math.floor(m/p);for(;d>0&&d<e.length;){if(o+=1,o>50*i.length)return n.push(e),n;let g=vt(e.substring(0,d),r);if(g.length===m){n.push(e.substring(0,d)),e=e.substring(d),l=l.substring(m);break}else g.length<m?d+=Math.max(1,Math.floor((m-g.length)/p)):d-=Math.max(1,Math.floor((g.length-m)*p));}break}}}}return n.push(e),n}function Al(e,t){return kl(e,t).join("/* rr_split */")}var Ol=1,Dl=new RegExp("[^a-z0-9-_:]"),it=-2;function Xs(){return Ol++}function Ll(e){if(e instanceof HTMLFormElement)return "form";let t=Pe(e.tagName);return Dl.test(t)?"div":t}var $e,xi,Pl=/^[^ \t\n\r\u000c]+/,_l=/^[, \t\n\r\u000c]+/;function Fl(e,t){if(t.trim()==="")return t;let r=0;function i(o){let l,p=o.exec(t.substring(r));return p?(l=p[0],r+=l.length,l):""}let n=[];for(;i(_l),!(r>=t.length);){let o=i(Pl);if(o.slice(-1)===",")o=je(e,o.substring(0,o.length-1)),n.push(o);else {let l="";o=je(e,o);let p=false;for(;;){let a=t.charAt(r);if(a===""){n.push((o+l).trim());break}else if(p)a===")"&&(p=false);else if(a===","){r+=1,n.push((o+l).trim());break}else a==="("&&(p=true);l+=a,r+=1;}}}return n.join(", ")}var Ri=new WeakMap;function je(e,t){return !t||t.trim()===""?t:Dn(e,t)}function Ul(e){return !!(e.tagName==="svg"||e.ownerSVGElement)}function Dn(e,t){let r=Ri.get(e);if(r||(r=e.createElement("a"),Ri.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Js(e,t,r,i){return i&&(r==="src"||r==="href"&&!(t==="use"&&i[0]==="#")||r==="xlink:href"&&i[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?je(e,i):r==="srcset"?Fl(e,i):r==="style"?At(i,Dn(e)):t==="object"&&r==="data"?je(e,i):i)}function Ks(e,t,r){return ["video","audio"].includes(e)&&t==="autoplay"}function Bl(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return !0}else for(let i=e.classList.length;i--;){let n=e.classList[i];if(t.test(n))return !0}if(r)return e.matches(r)}catch{}return false}function Ot(e,t,r){if(!e)return false;if(e.nodeType!==e.ELEMENT_NODE)return r?Ot(se.parentNode(e),t,r):false;for(let i=e.classList.length;i--;){let n=e.classList[i];if(t.test(n))return true}return r?Ot(se.parentNode(e),t,r):false}function Zs(e,t,r,i){let n;if(Vs(e)){if(n=e,!se.childNodes(n).length)return false}else {if(se.parentElement(e)===null)return false;n=se.parentElement(e);}try{if(typeof t=="string"){if(i){if(n.closest(`.${t}`))return !0}else if(n.classList.contains(t))return !0}else if(Ot(n,t,i))return !0;if(r){if(i){if(n.closest(r))return !0}else if(n.matches(r))return !0}}catch{}return false}function ql(e,t,r){let i=e.contentWindow;if(!i)return;let n=false,o;try{o=i.document.readyState;}catch{return}if(o!=="complete"){let p=setTimeout(()=>{n||(t(),n=true);},r);e.addEventListener("load",()=>{clearTimeout(p),n=true,t();});return}let l="about:blank";if(i.location.href!==l||e.src===l||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t);}function zl(e,t,r){let i=false,n;try{n=e.sheet;}catch{return}if(n)return;let o=setTimeout(()=>{i||(t(),i=true);},r);e.addEventListener("load",()=>{clearTimeout(o),i=true,t();});}function $l(e,t){let{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:l,inlineStylesheet:p,maskInputOptions:a={},maskTextFn:h,maskInputFn:s,dataURLOptions:f={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:m,newlyAddedElement:d=false,cssCaptured:g=false}=t,S=Wl(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ne.Document,childNodes:[],compatMode:e.compatMode}:{type:ne.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return {type:ne.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return jl(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:p,maskInputOptions:a,maskInputFn:s,dataURLOptions:f,inlineImages:c,recordCanvas:u,keepIframeSrcFn:m,newlyAddedElement:d,rootId:S});case e.TEXT_NODE:return Hl(e,{doc:r,needsMask:l,maskTextFn:h,rootId:S,cssCaptured:g});case e.CDATA_SECTION_NODE:return {type:ne.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return {type:ne.Comment,textContent:se.textContent(e)||"",rootId:S};default:return false}}function Wl(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function Hl(e,t){let{needsMask:r,maskTextFn:i,rootId:n,cssCaptured:o}=t,l=se.parentNode(e),p=l&&l.tagName,a="",h=p==="STYLE"?true:void 0,s=p==="SCRIPT"?true:void 0;return s?a="SCRIPT_PLACEHOLDER":o||(a=se.textContent(e),h&&a&&(a=At(a,Dn(t.doc)))),!h&&!s&&a&&r&&(a=i?i(a,se.parentElement(e)):a.replace(/[\S]/g,"*")),{type:ne.Text,textContent:a||"",rootId:n}}function jl(e,t){let{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:p,dataURLOptions:a={},inlineImages:h,recordCanvas:s,keepIframeSrcFn:f,newlyAddedElement:c=false,rootId:u}=t,m=Bl(e,i,n),d=Ll(e),g={},S=e.attributes.length;for(let b=0;b<S;b++){let E=e.attributes[b];Ks(d,E.name,E.value)||(g[E.name]=Js(r,d,Pe(E.name),E.value));}if(d==="link"&&o){let b=Array.from(r.styleSheets).find(w=>w.href===e.href),E=null;b&&(E=wn(b)),E&&(delete g.rel,delete g.href,g._cssText=E);}if(d==="style"&&e.sheet){let b=wn(e.sheet);b&&(e.childNodes.length>1&&(b=Al(b,e)),g._cssText=b);}if(["input","textarea","select"].includes(d)){let b=e.value,E=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=Tt({element:e,type:kt(e),tagName:d,value:b,maskInputOptions:l,maskInputFn:p}):E&&(g.checked=E);}if(d==="option"&&(e.selected&&!l.select?g.selected=true:delete g.selected),d==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&s){if(e.__context==="2d")xl(e)||(g.rr_dataURL=e.toDataURL(a.type,a.quality));else if(!("__context"in e)){let b=e.toDataURL(a.type,a.quality),E=r.createElement("canvas");E.width=e.width,E.height=e.height;let w=E.toDataURL(a.type,a.quality);b!==w&&(g.rr_dataURL=b);}}if(d==="img"&&h){$e||($e=r.createElement("canvas"),xi=$e.getContext("2d"));let b=e,E=b.currentSrc||b.getAttribute("src")||"<unknown-src>",w=b.crossOrigin,v=()=>{b.removeEventListener("load",v);try{$e.width=b.naturalWidth,$e.height=b.naturalHeight,xi.drawImage(b,0,0),g.rr_dataURL=$e.toDataURL(a.type,a.quality);}catch(C){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?v():b.addEventListener("load",v);return}else console.warn(`Cannot inline img src=${E}! Error: ${C}`);}b.crossOrigin==="anonymous"&&(w?g.crossOrigin=w:b.removeAttribute("crossorigin"));};b.complete&&b.naturalWidth!==0?v():b.addEventListener("load",v);}if(["audio","video"].includes(d)){let b=g;b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime,b.rr_mediaPlaybackRate=e.playbackRate,b.rr_mediaMuted=e.muted,b.rr_mediaLoop=e.loop,b.rr_mediaVolume=e.volume;}if(c||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){let{width:b,height:E}=e.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${E}px`};}d==="iframe"&&!f(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(d)&&(y=!0);}catch{}return {type:ne.Element,tagName:d,attributes:g,childNodes:[],isSVG:Ul(e)||void 0,needBlock:m,rootId:u,isCustom:y}}function G(e){return e==null?"":e.toLowerCase()}function Qs(e){return e===true||e==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function Vl(e,t){if(t.comment&&e.type===ne.Comment)return true;if(e.type===ne.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Ys(e.attributes.href)==="js"))return true;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(G(e.attributes.name).match(/^msapplication-tile(image|color)$/)||G(e.attributes.name)==="application-name"||G(e.attributes.rel)==="icon"||G(e.attributes.rel)==="apple-touch-icon"||G(e.attributes.rel)==="shortcut icon")))return true;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&G(e.attributes.name).match(/^description|keywords$/))return true;if(t.headMetaSocial&&(G(e.attributes.property).match(/^(og|twitter|fb):/)||G(e.attributes.name).match(/^(og|twitter):/)||G(e.attributes.name)==="pinterest"))return true;if(t.headMetaRobots&&(G(e.attributes.name)==="robots"||G(e.attributes.name)==="googlebot"||G(e.attributes.name)==="bingbot"))return true;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return true;if(t.headMetaAuthorship&&(G(e.attributes.name)==="author"||G(e.attributes.name)==="generator"||G(e.attributes.name)==="framework"||G(e.attributes.name)==="publisher"||G(e.attributes.name)==="progid"||G(e.attributes.property).match(/^article:/)||G(e.attributes.property).match(/^product:/)))return true;if(t.headMetaVerification&&(G(e.attributes.name)==="google-site-verification"||G(e.attributes.name)==="yandex-verification"||G(e.attributes.name)==="csrf-token"||G(e.attributes.name)==="p:domain_verify"||G(e.attributes.name)==="verify-v1"||G(e.attributes.name)==="verification"||G(e.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function Ve(e,t){let{doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:p,skipChild:a=false,inlineStylesheet:h=true,maskInputOptions:s={},maskTextFn:f,maskInputFn:c,slimDOMOptions:u,dataURLOptions:m={},inlineImages:d=false,recordCanvas:g=false,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:v=()=>false,newlyAddedElement:C=false,cssCaptured:R=false}=t,{needsMask:I}=t,{preserveWhiteSpace:M=true}=t;I||(I=Zs(e,l,p,I===void 0));let O=$l(e,{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:I,inlineStylesheet:h,maskInputOptions:s,maskTextFn:f,maskInputFn:c,dataURLOptions:m,inlineImages:d,recordCanvas:g,keepIframeSrcFn:v,newlyAddedElement:C,cssCaptured:R});if(!O)return console.warn(e,"not serialized"),null;let k;i.hasNode(e)?k=i.getId(e):Vl(O,u)||!M&&O.type===ne.Text&&!O.textContent.replace(/^\s+|\s+$/gm,"").length?k=it:k=Xs();let x=Object.assign(O,{id:k});if(i.add(e,x),k===it)return null;S&&S(e);let Q=!a;if(x.type===ne.Element){Q=Q&&!x.needBlock,delete x.needBlock;let L=se.shadowRoot(e);L&&rt(L)&&(x.isShadowHost=true);}if((x.type===ne.Document||x.type===ne.Element)&&Q){u.headWhitespace&&x.type===ne.Element&&x.tagName==="head"&&(M=false);let L={doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:I,maskTextClass:l,maskTextSelector:p,skipChild:a,inlineStylesheet:h,maskInputOptions:s,maskTextFn:f,maskInputFn:c,slimDOMOptions:u,dataURLOptions:m,inlineImages:d,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:v,cssCaptured:false};if(!(x.type===ne.Element&&x.tagName==="textarea"&&x.attributes.value!==void 0)){x.type===ne.Element&&x.attributes._cssText!==void 0&&typeof x.attributes._cssText=="string"&&(L.cssCaptured=true);for(let B of Array.from(se.childNodes(e))){let X=Ve(B,L);X&&x.childNodes.push(X);}}let A=null;if(Vs(e)&&(A=se.shadowRoot(e)))for(let B of Array.from(se.childNodes(A))){let X=Ve(B,L);X&&(rt(A)&&(X.isShadow=true),x.childNodes.push(X));}}let Y=se.parentNode(e);return Y&&tt(Y)&&rt(Y)&&(x.isShadow=true),x.type===ne.Element&&x.tagName==="iframe"&&ql(e,()=>{let L=e.contentDocument;if(L&&y){let A=Ve(L,{doc:L,mirror:i,blockClass:n,blockSelector:o,needsMask:I,maskTextClass:l,maskTextSelector:p,skipChild:false,inlineStylesheet:h,maskInputOptions:s,maskTextFn:f,maskInputFn:c,slimDOMOptions:u,dataURLOptions:m,inlineImages:d,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:v});A&&y(e,A);}},b),x.type===ne.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&Ys(x.attributes.href)==="css")&&zl(e,()=>{if(E){let L=Ve(e,{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:I,maskTextClass:l,maskTextSelector:p,skipChild:false,inlineStylesheet:h,maskInputOptions:s,maskTextFn:f,maskInputFn:c,slimDOMOptions:u,dataURLOptions:m,inlineImages:d,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:v});L&&E(e,L);}},w),x}function Gl(e,t){let{mirror:r=new Nt,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:l=null,inlineStylesheet:p=true,inlineImages:a=false,recordCanvas:h=false,maskAllInputs:s=false,maskTextFn:f,maskInputFn:c,slimDOM:u=false,dataURLOptions:m,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:E,keepIframeSrcFn:w=()=>false}=t,v=s===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:s===false?{password:true}:s,C=Qs(u);return Ve(e,{doc:e,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:p,maskInputOptions:v,maskTextFn:f,maskInputFn:c,slimDOMOptions:C,dataURLOptions:m,inlineImages:a,recordCanvas:h,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:E,keepIframeSrcFn:w,newlyAddedElement:false})}function Xl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Jl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:true}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:true,get:function(){return e[i]}});}),r}var wt={exports:{}},Mi;function Kl(){if(Mi)return wt.exports;Mi=1;var e=String,t=function(){return {isColorSupported:false,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}};return wt.exports=t(),wt.exports.createColors=t,wt.exports}var Zl={},Ql=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"})),Ce=Jl(Ql),pr,Ii;function Ln(){if(Ii)return pr;Ii=1;let e=Kl(),t=Ce;class r extends Error{constructor(n,o,l,p,a,h){super(n),this.name="CssSyntaxError",this.reason=n,a&&(this.file=a),p&&(this.source=p),h&&(this.plugin=h),typeof o<"u"&&typeof l<"u"&&(typeof o=="number"?(this.line=o,this.column=l):(this.line=o.line,this.column=o.column,this.endLine=l.line,this.endColumn=l.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(n){if(!this.source)return "";let o=this.source;n==null&&(n=e.isColorSupported),t&&n&&(o=t(o));let l=o.split(/\r?\n/),p=Math.max(this.line-3,0),a=Math.min(this.line+2,l.length),h=String(a).length,s,f;if(n){let{bold:c,gray:u,red:m}=e.createColors(true);s=d=>c(m(d)),f=d=>u(d);}else s=f=c=>c;return l.slice(p,a).map((c,u)=>{let m=p+1+u,d=" "+(" "+m).slice(-h)+" | ";if(m===this.line){let g=f(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+f(d)+c+`
|
|
2
|
+
`+g+s("^")}return " "+f(d)+c}).join(`
|
|
3
3
|
`)}toString(){let n=this.showSourceCode();return n&&(n=`
|
|
4
4
|
|
|
5
5
|
`+n+`
|
|
6
|
-
`),this.name+": "+this.message+n}}return
|
|
6
|
+
`),this.name+": "+this.message+n}}return pr=r,r.default=r,pr}var bt={},Ni;function Pn(){return Ni||(Ni=1,bt.isClean=Symbol("isClean"),bt.my=Symbol("my")),bt}var mr,Ti;function eo(){if(Ti)return mr;Ti=1;let e={after:`
|
|
7
7
|
`,beforeClose:`
|
|
8
8
|
`,beforeComment:`
|
|
9
9
|
`,beforeDecl:`
|
|
10
10
|
`,beforeOpen:" ",beforeRule:`
|
|
11
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function t(i){return i[0].toUpperCase()+i.slice(1)}class r{constructor(n){this.builder=n;}atrule(n,
|
|
12
|
-
`)){let h=this.raw(n,null,"indent");if(h.length)for(let s=0;s<
|
|
13
|
-
`)&&(
|
|
14
|
-
`)&&(
|
|
15
|
-
`)&&(
|
|
16
|
-
`)&&(
|
|
17
|
-
`);return a
|
|
18
|
-
`?(f=1,
|
|
19
|
-
`);S=new Array(b.length);let E=0;for(let
|
|
11
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function t(i){return i[0].toUpperCase()+i.slice(1)}class r{constructor(n){this.builder=n;}atrule(n,o){let l="@"+n.name,p=n.params?this.rawValue(n,"params"):"";if(typeof n.raws.afterName<"u"?l+=n.raws.afterName:p&&(l+=" "),n.nodes)this.block(n,l+p);else {let a=(n.raws.between||"")+(o?";":"");this.builder(l+p+a,n);}}beforeAfter(n,o){let l;n.type==="decl"?l=this.raw(n,null,"beforeDecl"):n.type==="comment"?l=this.raw(n,null,"beforeComment"):o==="before"?l=this.raw(n,null,"beforeRule"):l=this.raw(n,null,"beforeClose");let p=n.parent,a=0;for(;p&&p.type!=="root";)a+=1,p=p.parent;if(l.includes(`
|
|
12
|
+
`)){let h=this.raw(n,null,"indent");if(h.length)for(let s=0;s<a;s++)l+=h;}return l}block(n,o){let l=this.raw(n,"between","beforeOpen");this.builder(o+l+"{",n,"start");let p;n.nodes&&n.nodes.length?(this.body(n),p=this.raw(n,"after")):p=this.raw(n,"after","emptyBody"),p&&this.builder(p),this.builder("}",n,"end");}body(n){let o=n.nodes.length-1;for(;o>0&&n.nodes[o].type==="comment";)o-=1;let l=this.raw(n,"semicolon");for(let p=0;p<n.nodes.length;p++){let a=n.nodes[p],h=this.raw(a,"before");h&&this.builder(h),this.stringify(a,o!==p||l);}}comment(n){let o=this.raw(n,"left","commentLeft"),l=this.raw(n,"right","commentRight");this.builder("/*"+o+n.text+l+"*/",n);}decl(n,o){let l=this.raw(n,"between","colon"),p=n.prop+l+this.rawValue(n,"value");n.important&&(p+=n.raws.important||" !important"),o&&(p+=";"),this.builder(p,n);}document(n){this.body(n);}raw(n,o,l){let p;if(l||(l=o),o&&(p=n.raws[o],typeof p<"u"))return p;let a=n.parent;if(l==="before"&&(!a||a.type==="root"&&a.first===n||a&&a.type==="document"))return "";if(!a)return e[l];let h=n.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[l]<"u")return h.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(n,l);{let s="raw"+t(l);this[s]?p=this[s](h,n):h.walk(f=>{if(p=f.raws[o],typeof p<"u")return false});}return typeof p>"u"&&(p=e[l]),h.rawCache[l]=p,p}rawBeforeClose(n){let o;return n.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after<"u")return o=l.raws.after,o.includes(`
|
|
13
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),false}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(n,o){let l;return n.walkComments(p=>{if(typeof p.raws.before<"u")return l=p.raws.before,l.includes(`
|
|
14
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(o,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(n,o){let l;return n.walkDecls(p=>{if(typeof p.raws.before<"u")return l=p.raws.before,l.includes(`
|
|
15
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(o,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(n){let o;return n.walk(l=>{if(l.type!=="decl"&&(o=l.raws.between,typeof o<"u"))return false}),o}rawBeforeRule(n){let o;return n.walk(l=>{if(l.nodes&&(l.parent!==n||n.first!==l)&&typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
16
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),false}),o&&(o=o.replace(/\S/g,"")),o}rawColon(n){let o;return n.walkDecls(l=>{if(typeof l.raws.between<"u")return o=l.raws.between.replace(/[^\s:]/g,""),false}),o}rawEmptyBody(n){let o;return n.walk(l=>{if(l.nodes&&l.nodes.length===0&&(o=l.raws.after,typeof o<"u"))return false}),o}rawIndent(n){if(n.raws.indent)return n.raws.indent;let o;return n.walk(l=>{let p=l.parent;if(p&&p!==n&&p.parent&&p.parent===n&&typeof l.raws.before<"u"){let a=l.raws.before.split(`
|
|
17
|
+
`);return o=a[a.length-1],o=o.replace(/\S/g,""),false}}),o}rawSemicolon(n){let o;return n.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(o=l.raws.semicolon,typeof o<"u"))return false}),o}rawValue(n,o){let l=n[o],p=n.raws[o];return p&&p.value===l?p.raw:l}root(n){this.body(n),n.raws.after&&this.builder(n.raws.after);}rule(n){this.block(n,this.rawValue(n,"selector")),n.raws.ownSemicolon&&this.builder(n.raws.ownSemicolon,n,"end");}stringify(n,o){if(!this[n.type])throw new Error("Unknown AST node type "+n.type+". Maybe you need to change PostCSS stringifier.");this[n.type](n,o);}}return mr=r,r.default=r,mr}var gr,ki;function _t(){if(ki)return gr;ki=1;let e=eo();function t(r,i){new e(i).stringify(r);}return gr=t,t.default=t,gr}var yr,Ai;function Ft(){if(Ai)return yr;Ai=1;let{isClean:e,my:t}=Pn(),r=Ln(),i=eo(),n=_t();function o(p,a){let h=new p.constructor;for(let s in p){if(!Object.prototype.hasOwnProperty.call(p,s)||s==="proxyCache")continue;let f=p[s],c=typeof f;s==="parent"&&c==="object"?a&&(h[s]=a):s==="source"?h[s]=f:Array.isArray(f)?h[s]=f.map(u=>o(u,h)):(c==="object"&&f!==null&&(f=o(f)),h[s]=f);}return h}class l{constructor(a={}){this.raws={},this[e]=false,this[t]=true;for(let h in a)if(h==="nodes"){this.nodes=[];for(let s of a[h])typeof s.clone=="function"?this.append(s.clone()):this.append(s);}else this[h]=a[h];}addToError(a){if(a.postcssNode=this,a.stack&&this.source&&/\n\s{4}at /.test(a.stack)){let h=this.source;a.stack=a.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`);}return a}after(a){return this.parent.insertAfter(this,a),this}assign(a={}){for(let h in a)this[h]=a[h];return this}before(a){return this.parent.insertBefore(this,a),this}cleanRaws(a){delete this.raws.before,delete this.raws.after,a||delete this.raws.between;}clone(a={}){let h=o(this);for(let s in a)h[s]=a[s];return h}cloneAfter(a={}){let h=this.clone(a);return this.parent.insertAfter(this,h),h}cloneBefore(a={}){let h=this.clone(a);return this.parent.insertBefore(this,h),h}error(a,h={}){if(this.source){let{end:s,start:f}=this.rangeBy(h);return this.source.input.error(a,{column:f.column,line:f.line},{column:s.column,line:s.line},h)}return new r(a)}getProxyProcessor(){return {get(a,h){return h==="proxyOf"?a:h==="root"?()=>a.root().toProxy():a[h]},set(a,h,s){return a[h]===s||(a[h]=s,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&a.markDirty()),true}}}markDirty(){if(this[e]){this[e]=false;let a=this;for(;a=a.parent;)a[e]=false;}}next(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a+1]}positionBy(a,h){let s=this.source.start;if(a.index)s=this.positionInside(a.index,h);else if(a.word){h=this.toString();let f=h.indexOf(a.word);f!==-1&&(s=this.positionInside(f,h));}return s}positionInside(a,h){let s=h||this.toString(),f=this.source.start.column,c=this.source.start.line;for(let u=0;u<a;u++)s[u]===`
|
|
18
|
+
`?(f=1,c+=1):f+=1;return {column:f,line:c}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a){let h={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:h.column+1,line:h.line};if(a.word){let f=this.toString(),c=f.indexOf(a.word);c!==-1&&(h=this.positionInside(c,f),s=this.positionInside(c+a.word.length,f));}else a.start?h={column:a.start.column,line:a.start.line}:a.index&&(h=this.positionInside(a.index)),a.end?s={column:a.end.column,line:a.end.line}:typeof a.endIndex=="number"?s=this.positionInside(a.endIndex):a.index&&(s=this.positionInside(a.index+1));return (s.line<h.line||s.line===h.line&&s.column<=h.column)&&(s={column:h.column+1,line:h.line}),{end:s,start:h}}raw(a,h){return new i().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,s=false;for(let f of a)f===this?s=true:s?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);s||this.remove();}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let s={},f=h==null;h=h||new Map;let c=0;for(let u in this){if(!Object.prototype.hasOwnProperty.call(this,u)||u==="parent"||u==="proxyCache")continue;let m=this[u];if(Array.isArray(m))s[u]=m.map(d=>typeof d=="object"&&d.toJSON?d.toJSON(null,h):d);else if(typeof m=="object"&&m.toJSON)s[u]=m.toJSON(null,h);else if(u==="source"){let d=h.get(m.input);d==null&&(d=c,h.set(m.input,c),c++),s[u]={end:m.end,inputId:d,start:m.start};}else s[u]=m;}return f&&(s.inputs=[...h.keys()].map(u=>u.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=n){a.stringify&&(a=a.stringify);let h="";return a(this,s=>{h+=s;}),h}warn(a,h,s){let f={node:this};for(let c in s)f[c]=s[c];return a.warn(h,f)}get proxyOf(){return this}}return yr=l,l.default=l,yr}var vr,Oi;function Ut(){if(Oi)return vr;Oi=1;let e=Ft();class t extends e{constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i={...i,value:String(i.value)}),super(i),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return vr=t,t.default=t,vr}var wr,Di;function eu(){if(Di)return wr;Di=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return wr={nanoid:(i=21)=>{let n="",o=i;for(;o--;)n+=e[Math.random()*64|0];return n},customAlphabet:(i,n=21)=>(o=n)=>{let l="",p=o;for(;p--;)l+=i[Math.random()*i.length|0];return l}},wr}var br,Li;function to(){if(Li)return br;Li=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ce,{existsSync:r,readFileSync:i}=Ce,{dirname:n,join:o}=Ce;function l(a){return Buffer?Buffer.from(a,"base64").toString():window.atob(a)}class p{constructor(h,s){if(s.map===false)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let f=s.map?s.map.prev:void 0,c=this.loadMap(s.from,f);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=n(this.mapFile)),c&&(this.text=c);}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(h){let s=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,u=/^data:application\/json,/;if(c.test(h)||u.test(h))return decodeURIComponent(h.substr(RegExp.lastMatch.length));if(s.test(h)||f.test(h))return l(h.substr(RegExp.lastMatch.length));let m=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?false:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let s=h.match(/\/\*\s*# sourceMappingURL=/gm);if(!s)return;let f=h.lastIndexOf(s.pop()),c=h.indexOf("*/",f);f>-1&&c>-1&&(this.annotation=this.getAnnotationURL(h.substring(f,c)));}loadFile(h){if(this.root=n(h),r(h))return this.mapFile=h,i(h,"utf-8").toString().trim()}loadMap(h,s){if(s===false)return false;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let f=s(h);if(f){let c=this.loadFile(f);if(!c)throw new Error("Unable to load previous source map: "+f.toString());return c}}else {if(s instanceof e)return t.fromSourceMap(s).toString();if(s instanceof t)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return h&&(f=o(n(h),f)),this.loadFile(f)}}}startWith(h,s){return h?h.substr(0,s.length)===s:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return br=p,p.default=p,br}var Sr,Pi;function Bt(){if(Pi)return Sr;Pi=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ce,{fileURLToPath:r,pathToFileURL:i}=Ce,{isAbsolute:n,resolve:o}=Ce,{nanoid:l}=eu(),p=Ce,a=Ln(),h=to(),s=Symbol("fromOffsetCache"),f=!!(e&&t),c=!!(o&&n);class u{constructor(d,g={}){if(d===null||typeof d>"u"||typeof d=="object"&&!d.toString)throw new Error(`PostCSS received ${d} instead of CSS string`);if(this.css=d.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,g.from&&(!c||/^\w+:\/\//.test(g.from)||n(g.from)?this.file=g.from:this.file=o(g.from)),c&&f){let S=new h(this.css,g);if(S.text){this.map=S;let y=S.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y));}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from);}error(d,g,S,y={}){let b,E,w;if(g&&typeof g=="object"){let C=g,R=S;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,S=I.col;}else g=C.line,S=C.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);E=I.line,w=I.col;}else E=R.line,w=R.column;}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col;}let v=this.origin(g,S,E,w);return v?b=new a(d,v.endLine===void 0?v.line:{column:v.column,line:v.line},v.endLine===void 0?v.column:{column:v.endColumn,line:v.endLine},v.source,v.file,y.plugin):b=new a(d,E===void 0?g:{column:S,line:g},E===void 0?S:{column:w,line:E},this.css,this.file,y.plugin),b.input={column:S,endColumn:w,endLine:E,line:g,source:this.css},this.file&&(i&&(b.input.url=i(this.file).toString()),b.input.file=this.file),b}fromOffset(d){let g,S;if(this[s])S=this[s];else {let b=this.css.split(`
|
|
19
|
+
`);S=new Array(b.length);let E=0;for(let w=0,v=b.length;w<v;w++)S[w]=E,E+=b[w].length+1;this[s]=S;}g=S[S.length-1];let y=0;if(d>=g)y=S.length-1;else {let b=S.length-2,E;for(;y<b;)if(E=y+(b-y>>1),d<S[E])b=E-1;else if(d>=S[E+1])y=E+1;else {y=E;break}}return {col:d-S[y]+1,line:y+1}}mapResolve(d){return /^\w+:\/\//.test(d)?d:o(this.map.consumer().sourceRoot||this.map.root||".",d)}origin(d,g,S,y){if(!this.map)return false;let b=this.map.consumer(),E=b.originalPositionFor({column:g,line:d});if(!E.source)return false;let w;typeof S=="number"&&(w=b.originalPositionFor({column:y,line:S}));let v;n(E.source)?v=i(E.source):v=new URL(E.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let C={column:E.column,endColumn:w&&w.column,endLine:w&&w.line,line:E.line,url:v.toString()};if(v.protocol==="file:")if(r)C.file=r(v);else throw new Error("file: protocol is not available in this PostCSS build");let R=b.sourceContentFor(E.source);return R&&(C.source=R),C}toJSON(){let d={};for(let g of ["hasBOM","css","file","id"])this[g]!=null&&(d[g]=this[g]);return this.map&&(d.map={...this.map},d.map.consumerCache&&(d.map.consumerCache=void 0)),d}get from(){return this.file||this.id}}return Sr=u,u.default=u,p&&p.registerInput&&p.registerInput(u),Sr}var Cr,_i;function ro(){if(_i)return Cr;_i=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ce,{dirname:r,relative:i,resolve:n,sep:o}=Ce,{pathToFileURL:l}=Ce,p=Bt(),a=!!(e&&t),h=!!(r&&n&&i&&o);class s{constructor(c,u,m,d){this.stringify=c,this.mapOpts=m.map||{},this.root=u,this.opts=m,this.css=d,this.originalCSS=d,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let u=`
|
|
20
20
|
`;this.css.includes(`\r
|
|
21
|
-
`)&&(
|
|
22
|
-
`),this.css+=
|
|
23
|
-
`),l=w.length-S):l+=w.length,b&&E!=="start"){let v=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==v.last||v.raws.semicolon)&&(b.source&&b.source.end?(d.source=this.sourcePath(b),d.original.line=b.source.end.line,d.original.column=b.source.end.column-1,d.generated.line=u,d.generated.column=l-2,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,d.generated.line=u,d.generated.column=l-1,this.map.addMapping(d)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(u=>u.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let u=this.mapOpts.annotation;return typeof u<"u"&&u!==true?false:this.previous().length?this.previous().some(l=>l.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(u=>u.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(u){if(this.mapOpts.absolute||u.charCodeAt(0)===60||/^\w+:\/\//.test(u))return u;let l=this.memoizedPaths.get(u);if(l)return l;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(n(m,this.mapOpts.annotation)));let d=i(m,u);return this.memoizedPaths.set(u,d),d}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(u=>{if(u.source&&u.source.input.map){let l=u.source.input.map;this.previousMaps.includes(l)||this.previousMaps.push(l);}});else {let u=new p(this.originalCSS,this.opts);u.map&&this.previousMaps.push(u.map);}return this.previousMaps}setSourcesContent(){let u={};if(this.root)this.root.walk(l=>{if(l.source){let m=l.source.input.from;if(m&&!u[m]){u[m]=true;let d=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(d,l.source.input.css);}}});else if(this.css){let l=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(l,this.css);}}sourcePath(u){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(u.source.input.from):this.toUrl(this.path(u.source.input.from))}toBase64(u){return Buffer?Buffer.from(u).toString("base64"):window.btoa(unescape(encodeURIComponent(u)))}toFileUrl(u){let l=this.memoizedFileURLs.get(u);if(l)return l;if(c){let m=c(u).toString();return this.memoizedFileURLs.set(u,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(u){let l=this.memoizedURLs.get(u);if(l)return l;a==="\\"&&(u=u.replace(/\\/g,"/"));let m=encodeURI(u).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(u,m),m}}return yr=s,yr}var vr,Ti;function Ut(){if(Ti)return vr;Ti=1;let e=Lt();class t extends e{constructor(i){super(i),this.type="comment";}}return vr=t,t.default=t,vr}var wr,Ai;function _e(){if(Ai)return wr;Ai=1;let{isClean:e,my:t}=An(),r=_t(),i=Ut(),n=Lt(),a,c,p,o;function h(u){return u.map(l=>(l.nodes&&(l.nodes=h(l.nodes)),delete l.source,l))}function s(u){if(u[e]=false,u.proxyOf.nodes)for(let l of u.proxyOf.nodes)s(l);}class f extends n{append(...l){for(let m of l){let d=this.normalize(m,this.last);for(let g of d)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(l){if(super.cleanRaws(l),this.nodes)for(let m of this.nodes)m.cleanRaws(l);}each(l){if(!this.proxyOf.nodes)return;let m=this.getIterator(),d,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(d=this.indexes[m],g=l(this.proxyOf.nodes[d],d),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(l){return this.nodes.every(l)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let l=this.lastEach;return this.indexes[l]=0,l}getProxyProcessor(){return {get(l,m){return m==="proxyOf"?l:l[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...d)=>l[m](...d.map(g=>typeof g=="function"?(S,w)=>g(S.toProxy(),w):g)):m==="every"||m==="some"?d=>l[m]((g,...S)=>d(g.toProxy(),...S)):m==="root"?()=>l.root().toProxy():m==="nodes"?l.nodes.map(d=>d.toProxy()):m==="first"||m==="last"?l[m].toProxy():l[m]:l[m]},set(l,m,d){return l[m]===d||(l[m]=d,(m==="name"||m==="params"||m==="selector")&&l.markDirty()),true}}}index(l){return typeof l=="number"?l:(l.proxyOf&&(l=l.proxyOf),this.proxyOf.nodes.indexOf(l))}insertAfter(l,m){let d=this.index(l),g=this.normalize(m,this.proxyOf.nodes[d]).reverse();d=this.index(l);for(let w of g)this.proxyOf.nodes.splice(d+1,0,w);let S;for(let w in this.indexes)S=this.indexes[w],d<S&&(this.indexes[w]=S+g.length);return this.markDirty(),this}insertBefore(l,m){let d=this.index(l),g=d===0?"prepend":false,S=this.normalize(m,this.proxyOf.nodes[d],g).reverse();d=this.index(l);for(let b of S)this.proxyOf.nodes.splice(d,0,b);let w;for(let b in this.indexes)w=this.indexes[b],d<=w&&(this.indexes[b]=w+S.length);return this.markDirty(),this}normalize(l,m){if(typeof l=="string")l=h(a(l).nodes);else if(typeof l>"u")l=[];else if(Array.isArray(l)){l=l.slice(0);for(let g of l)g.parent&&g.parent.removeChild(g,"ignore");}else if(l.type==="root"&&this.type!=="document"){l=l.nodes.slice(0);for(let g of l)g.parent&&g.parent.removeChild(g,"ignore");}else if(l.type)l=[l];else if(l.prop){if(typeof l.value>"u")throw new Error("Value field is missed in node creation");typeof l.value!="string"&&(l.value=String(l.value)),l=[new r(l)];}else if(l.selector)l=[new c(l)];else if(l.name)l=[new p(l)];else if(l.text)l=[new i(l)];else throw new Error("Unknown node type in node creation");return l.map(g=>(g[t]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&s(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...l){l=l.reverse();for(let m of l){let d=this.normalize(m,this.first,"prepend").reverse();for(let g of d)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+d.length;}return this.markDirty(),this}push(l){return l.parent=this,this.proxyOf.nodes.push(l),this}removeAll(){for(let l of this.proxyOf.nodes)l.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(l){l=this.index(l),this.proxyOf.nodes[l].parent=void 0,this.proxyOf.nodes.splice(l,1);let m;for(let d in this.indexes)m=this.indexes[d],m>=l&&(this.indexes[d]=m-1);return this.markDirty(),this}replaceValues(l,m,d){return d||(d=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(l,d));}),this.markDirty(),this}some(l){return this.nodes.some(l)}walk(l){return this.each((m,d)=>{let g;try{g=l(m,d);}catch(S){throw m.addToError(S)}return g!==false&&m.walk&&(g=m.walk(l)),g})}walkAtRules(l,m){return m?l instanceof RegExp?this.walk((d,g)=>{if(d.type==="atrule"&&l.test(d.name))return m(d,g)}):this.walk((d,g)=>{if(d.type==="atrule"&&d.name===l)return m(d,g)}):(m=l,this.walk((d,g)=>{if(d.type==="atrule")return m(d,g)}))}walkComments(l){return this.walk((m,d)=>{if(m.type==="comment")return l(m,d)})}walkDecls(l,m){return m?l instanceof RegExp?this.walk((d,g)=>{if(d.type==="decl"&&l.test(d.prop))return m(d,g)}):this.walk((d,g)=>{if(d.type==="decl"&&d.prop===l)return m(d,g)}):(m=l,this.walk((d,g)=>{if(d.type==="decl")return m(d,g)}))}walkRules(l,m){return m?l instanceof RegExp?this.walk((d,g)=>{if(d.type==="rule"&&l.test(d.selector))return m(d,g)}):this.walk((d,g)=>{if(d.type==="rule"&&d.selector===l)return m(d,g)}):(m=l,this.walk((d,g)=>{if(d.type==="rule")return m(d,g)}))}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]}}return f.registerParse=u=>{a=u;},f.registerRule=u=>{c=u;},f.registerAtRule=u=>{p=u;},f.registerRoot=u=>{o=u;},wr=f,f.default=f,f.rebuild=u=>{u.type==="atrule"?Object.setPrototypeOf(u,p.prototype):u.type==="rule"?Object.setPrototypeOf(u,c.prototype):u.type==="decl"?Object.setPrototypeOf(u,r.prototype):u.type==="comment"?Object.setPrototypeOf(u,i.prototype):u.type==="root"&&Object.setPrototypeOf(u,o.prototype),u[t]=true,u.nodes&&u.nodes.forEach(l=>{f.rebuild(l);});},wr}var br,Oi;function On(){if(Oi)return br;Oi=1;let e=_e(),t,r;class i extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[]);}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=n=>{t=n;},i.registerProcessor=n=>{r=n;},br=i,i.default=i,br}var Cr,Di;function Js(){if(Di)return Cr;Di=1;class e{constructor(r,i={}){if(this.type="warning",this.text=r,i.node&&i.node.source){let n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in i)this[n]=i[n];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Cr=e,e.default=e,Cr}var Er,Pi;function kn(){if(Pi)return Er;Pi=1;let e=Js();class t{constructor(i,n,a){this.processor=i,this.messages=[],this.root=n,this.opts=a,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(i,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let a=new e(i,n);return this.messages.push(a),a}warnings(){return this.messages.filter(i=>i.type==="warning")}get content(){return this.css}}return Er=t,t.default=t,Er}var xr,Li;function zl(){if(Li)return xr;Li=1;let e=39,t=34,r=92,i=47,n=10,a=32,c=12,p=9,o=13,h=91,s=93,f=40,u=41,l=123,m=125,d=59,g=42,S=58,w=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,y=/[\da-f]/i;return xr=function(R,I={}){let M=R.css.valueOf(),k=I.ignoreErrors,A,x,Q,Y,P,O,B,X,J,L,ce=M.length,N=0,re=[],H=[];function me(){return N}function ie(D){throw R.error("Unclosed "+D,N)}function oe(){return H.length===0&&N>=ce}function xe(D){if(H.length)return H.pop();if(N>=ce)return;let ee=D?D.ignoreUnclosed:false;switch(A=M.charCodeAt(N),A){case n:case a:case p:case o:case c:{x=N;do x+=1,A=M.charCodeAt(x);while(A===a||A===n||A===p||A===o||A===c);L=["space",M.slice(N,x)],N=x-1;break}case h:case s:case l:case m:case S:case d:case u:{let q=String.fromCharCode(A);L=[q,q,N];break}case f:{if(X=re.length?re.pop()[1]:"",J=M.charCodeAt(N+1),X==="url"&&J!==e&&J!==t&&J!==a&&J!==n&&J!==p&&J!==c&&J!==o){x=N;do{if(O=false,x=M.indexOf(")",x+1),x===-1)if(k||ee){x=N;break}else ie("bracket");for(B=x;M.charCodeAt(B-1)===r;)B-=1,O=!O;}while(O);L=["brackets",M.slice(N,x+1),N,x],N=x;}else x=M.indexOf(")",N+1),Y=M.slice(N,x+1),x===-1||v.test(Y)?L=["(","(",N]:(L=["brackets",Y,N,x],N=x);break}case e:case t:{Q=A===e?"'":'"',x=N;do{if(O=false,x=M.indexOf(Q,x+1),x===-1)if(k||ee){x=N+1;break}else ie("string");for(B=x;M.charCodeAt(B-1)===r;)B-=1,O=!O;}while(O);L=["string",M.slice(N,x+1),N,x],N=x;break}case w:{b.lastIndex=N+1,b.test(M),b.lastIndex===0?x=M.length-1:x=b.lastIndex-2,L=["at-word",M.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,P=true;M.charCodeAt(x+1)===r;)x+=1,P=!P;if(A=M.charCodeAt(x+1),P&&A!==i&&A!==a&&A!==n&&A!==p&&A!==o&&A!==c&&(x+=1,y.test(M.charAt(x)))){for(;y.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===a&&(x+=1);}L=["word",M.slice(N,x+1),N,x],N=x;break}default:{A===i&&M.charCodeAt(N+1)===g?(x=M.indexOf("*/",N+2)+1,x===0&&(k||ee?x=M.length:ie("comment")),L=["comment",M.slice(N,x+1),N,x],N=x):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,L=["word",M.slice(N,x+1),N,x],re.push(L),N=x);break}}return N++,L}function we(D){H.push(D);}return {back:we,endOfFile:oe,nextToken:xe,position:me}},xr}var Rr,_i;function Dn(){if(_i)return Rr;_i=1;let e=_e();class t extends e{constructor(i){super(i),this.type="atrule";}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return Rr=t,t.default=t,e.registerAtRule(t),Rr}var Mr,Fi;function it(){if(Fi)return Mr;Fi=1;let e=_e(),t,r;class i extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[]);}normalize(a,c,p){let o=super.normalize(a);if(c){if(p==="prepend")this.nodes.length>1?c.raws.before=this.nodes[1].raws.before:delete c.raws.before;else if(this.first!==c)for(let h of o)h.raws.before=c.raws.before;}return o}removeChild(a,c){let p=this.index(a);return !c&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=n=>{t=n;},i.registerProcessor=n=>{r=n;},Mr=i,i.default=i,e.registerRoot(i),Mr}var Ir,Ui;function Ks(){if(Ui)return Ir;Ui=1;let e={comma(t){return e.split(t,[","],true)},space(t){let r=[" ",`
|
|
24
|
-
`," "];return e.split(t,r)},split(t,r,i){let n=[],a="",c=false,p=0,o=false,h="",s=false;for(let f of t)s?s=false:f==="\\"?s=true:o?f===h&&(o=false):f==='"'||f==="'"?(o=true,h=f):f==="("?p+=1:f===")"?p>0&&(p-=1):p===0&&r.includes(f)&&(c=true),c?(a!==""&&n.push(a.trim()),a="",c=false):a+=f;return (i||a!=="")&&n.push(a.trim()),n}};return Ir=e,e.default=e,Ir}var Nr,Bi;function Pn(){if(Bi)return Nr;Bi=1;let e=_e(),t=Ks();class r extends e{constructor(n){super(n),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return t.comma(this.selector)}set selectors(n){let a=this.selector?this.selector.match(/,\s*/):null,c=a?a[0]:","+this.raw("between","beforeOpen");this.selector=n.join(c);}}return Nr=r,r.default=r,e.registerRule(r),Nr}var Tr,zi;function ql(){if(zi)return Tr;zi=1;let e=_t(),t=zl(),r=Ut(),i=Dn(),n=it(),a=Pn(),c={empty:true,space:true};function p(h){for(let s=h.length-1;s>=0;s--){let f=h[s],u=f[3]||f[2];if(u)return u}}class o{constructor(s){this.input=s,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}};}atrule(s){let f=new i;f.name=s[1].slice(1),f.name===""&&this.unnamedAtrule(f,s),this.init(f,s[2]);let u,l,m,d=false,g=false,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),u=s[0],u==="("||u==="["?w.push(u==="("?")":"]"):u==="{"&&w.length>0?w.push("}"):u===w[w.length-1]&&w.pop(),w.length===0)if(u===";"){f.source.end=this.getPosition(s[2]),f.source.end.offset++,this.semicolon=true;break}else if(u==="{"){g=true;break}else if(u==="}"){if(S.length>0){for(m=S.length-1,l=S[m];l&&l[0]==="space";)l=S[--m];l&&(f.source.end=this.getPosition(l[3]||l[2]),f.source.end.offset++);}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){d=true;break}}f.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(f.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(f,"params",S),d&&(s=S[S.length-1],f.source.end=this.getPosition(s[3]||s[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f);}checkMissedSemicolon(s){let f=this.colon(s);if(f===false)return;let u=0,l;for(let m=f-1;m>=0&&(l=s[m],!(l[0]!=="space"&&(u+=1,u===2)));m--);throw this.input.error("Missed semicolon",l[0]==="word"?l[3]+1:l[2])}colon(s){let f=0,u,l,m;for(let[d,g]of s.entries()){if(u=g,l=u[0],l==="("&&(f+=1),l===")"&&(f-=1),f===0&&l===":")if(!m)this.doubleColon(u);else {if(m[0]==="word"&&m[1]==="progid")continue;return d}m=u;}return false}comment(s){let f=new r;this.init(f,s[2]),f.source.end=this.getPosition(s[3]||s[2]),f.source.end.offset++;let u=s[1].slice(2,-2);if(/^\s*$/.test(u))f.text="",f.raws.left=u,f.raws.right="";else {let l=u.match(/^(\s*)([^]*\S)(\s*)$/);f.text=l[2],f.raws.left=l[1],f.raws.right=l[3];}}createTokenizer(){this.tokenizer=t(this.input);}decl(s,f){let u=new e;this.init(u,s[0][2]);let l=s[s.length-1];for(l[0]===";"&&(this.semicolon=true,s.pop()),u.source.end=this.getPosition(l[3]||l[2]||p(s)),u.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),u.raws.before+=s.shift()[1];for(u.source.start=this.getPosition(s[0][2]),u.prop="";s.length;){let w=s[0][0];if(w===":"||w==="space"||w==="comment")break;u.prop+=s.shift()[1];}u.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){u.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),u.raws.between+=m[1];(u.prop[0]==="_"||u.prop[0]==="*")&&(u.raws.before+=u.prop[0],u.prop=u.prop.slice(1));let d=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)d.push(s.shift());this.precheckMissedSemicolon(s);for(let w=s.length-1;w>=0;w--){if(m=s[w],m[1].toLowerCase()==="!important"){u.important=true;let b=this.stringFrom(s,w);b=this.spacesFromEnd(s)+b,b!==" !important"&&(u.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=s.slice(0),E="";for(let v=w;v>0;v--){let y=b[v][0];if(E.trim().indexOf("!")===0&&y!=="space")break;E=b.pop()[1]+E;}E.trim().indexOf("!")===0&&(u.important=true,u.raws.important=E,s=b);}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(u.raws.between+=d.map(w=>w[1]).join(""),d=[]),this.raw(u,"value",d.concat(s),f),u.value.includes(":")&&!f&&this.checkMissedSemicolon(s);}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let f=new a;this.init(f,s[2]),f.selector="",f.raws.between="",this.current=f;}end(s){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s);}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(s){if(this.spaces+=s[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(s){let f=this.input.fromOffset(s);return {column:f.col,line:f.line,offset:s}}init(s,f){this.current.push(s),s.source={input:this.input,start:this.getPosition(f)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=false);}other(s){let f=false,u=null,l=false,m=null,d=[],g=s[1].startsWith("--"),S=[],w=s;for(;w;){if(u=w[0],S.push(w),u==="("||u==="[")m||(m=w),d.push(u==="("?")":"]");else if(g&&l&&u==="{")m||(m=w),d.push("}");else if(d.length===0)if(u===";")if(l){this.decl(S,g);return}else break;else if(u==="{"){this.rule(S);return}else if(u==="}"){this.tokenizer.back(S.pop()),f=true;break}else u===":"&&(l=true);else u===d[d.length-1]&&(d.pop(),d.length===0&&(m=null));w=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(f=true),d.length>0&&this.unclosedBracket(m),f&&l){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g);}else this.unknownWord(S);}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case "space":this.spaces+=s[1];break;case ";":this.freeSemicolon(s);break;case "}":this.end(s);break;case "comment":this.comment(s);break;case "at-word":this.atrule(s);break;case "{":this.emptyRule(s);break;default:this.other(s);break}this.endFile();}precheckMissedSemicolon(){}raw(s,f,u,l){let m,d,g=u.length,S="",w=true,b,E;for(let v=0;v<g;v+=1)m=u[v],d=m[0],d==="space"&&v===g-1&&!l?w=false:d==="comment"?(E=u[v-1]?u[v-1][0]:"empty",b=u[v+1]?u[v+1][0]:"empty",!c[E]&&!c[b]?S.slice(-1)===","?w=false:S+=m[1]:w=false):S+=m[1];if(!w){let v=u.reduce((y,C)=>y+C[1],"");s.raws[f]={raw:v,value:S};}s[f]=S;}rule(s){s.pop();let f=new a;this.init(f,s[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(f,"selector",s),this.current=f;}spacesAndCommentsFromEnd(s){let f,u="";for(;s.length&&(f=s[s.length-1][0],!(f!=="space"&&f!=="comment"));)u=s.pop()[1]+u;return u}spacesAndCommentsFromStart(s){let f,u="";for(;s.length&&(f=s[0][0],!(f!=="space"&&f!=="comment"));)u+=s.shift()[1];return u}spacesFromEnd(s){let f,u="";for(;s.length&&(f=s[s.length-1][0],f==="space");)u=s.pop()[1]+u;return u}stringFrom(s,f){let u="";for(let l=f;l<s.length;l++)u+=s[l][1];return s.splice(f,s.length-f),u}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return Tr=o,Tr}var Ar,qi;function Ln(){if(qi)return Ar;qi=1;let e=_e(),t=ql(),r=Ft();function i(n,a){let c=new r(n,a),p=new t(c);try{p.parse();}catch(o){throw o}return p.root}return Ar=i,i.default=i,e.registerParse(i),Ar}var Or,$i;function Zs(){if($i)return Or;$i=1;let {isClean:e,my:t}=An(),r=Ys(),i=Pt(),n=_e(),a=On(),p=kn(),o=Ln(),h=it(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},u={Once:true,postcssPlugin:true,prepare:true},l=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function d(E){let v=false,y=s[E.type];return E.type==="decl"?v=E.prop.toLowerCase():E.type==="atrule"&&(v=E.name.toLowerCase()),v&&E.append?[y,y+"-"+v,l,y+"Exit",y+"Exit-"+v]:v?[y,y+"-"+v,y+"Exit",y+"Exit-"+v]:E.append?[y,l,y+"Exit"]:[y,y+"Exit"]}function g(E){let v;return E.type==="document"?v=["Document",l,"DocumentExit"]:E.type==="root"?v=["Root",l,"RootExit"]:v=d(E),{eventIndex:0,events:v,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[e]=false,E.nodes&&E.nodes.forEach(v=>S(v)),E}let w={};class b{constructor(v,y,C){this.stringified=false,this.processed=false;let R;if(typeof y=="object"&&y!==null&&(y.type==="root"||y.type==="document"))R=S(y);else if(y instanceof b||y instanceof p)R=S(y.root),y.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=false),C.map.prev=y.map);else {let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(y,C);}catch(M){this.processed=true,this.error=M;}R&&!R[t]&&n.rebuild(R);}this.result=new p(v,R,C),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...I,...I.prepare(this.result)}:I);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,y){let C=this.result.lastPlugin;try{y&&y.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=C.postcssPlugin,v.setMessage()):C.postcssVersion;}catch(R){console&&console.error&&console.error(R);}return v}prepareVisitors(){this.listeners={};let v=(y,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([y,R]);};for(let y of this.plugins)if(typeof y=="object")for(let C in y){if(!f[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${y.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!u[C])if(typeof y[C]=="object")for(let R in y[C])R==="*"?v(y,C,y[C][R]):v(y,C+"-"+R.toLowerCase(),y[C][R]);else typeof y[C]=="function"&&v(y,C,y[C]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let y=this.plugins[v],C=this.runOnRoot(y);if(m(C))try{await C;}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[e];){v[e]=true;let y=[g(v)];for(;y.length>0;){let C=this.visitTick(y);if(m(C))try{await C;}catch(R){let I=y[y.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[y,C]of this.listeners.OnceExit){this.result.lastPlugin=y;try{if(v.type==="document"){let R=v.nodes.map(I=>C(I,this.helpers));await Promise.all(R);}else await C(v,this.helpers);}catch(R){throw this.handleError(R)}}}return this.processed=true,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let y=this.result.root.nodes.map(C=>v.Once(C,this.helpers));return m(y[0])?Promise.all(y):y}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(y){throw this.handleError(y)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let v=this.result.opts,y=i;v.syntax&&(y=v.syntax.stringify),v.stringifier&&(y=v.stringifier),y.stringify&&(y=y.stringify);let R=new r(y,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let v of this.plugins){let y=this.runOnRoot(v);if(m(y))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[e];)v[e]=true,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let y of v.nodes)this.visitSync(this.listeners.OnceExit,y);else this.visitSync(this.listeners.OnceExit,v);}return this.result}then(v,y){return this.async().then(v,y)}toString(){return this.css}visitSync(v,y){for(let[C,R]of v){this.result.lastPlugin=C;let I;try{I=R(y,this.helpers);}catch(M){throw this.handleError(M,y.proxyOf)}if(y.type!=="root"&&y.type!=="document"&&!y.parent)return true;if(m(I))throw this.getAsyncError()}}visitTick(v){let y=v[v.length-1],{node:C,visitors:R}=y;if(C.type!=="root"&&C.type!=="document"&&!C.parent){v.pop();return}if(R.length>0&&y.visitorIndex<R.length){let[M,k]=R[y.visitorIndex];y.visitorIndex+=1,y.visitorIndex===R.length&&(y.visitors=[],y.visitorIndex=0),this.result.lastPlugin=M;try{return k(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(y.iterator!==0){let M=y.iterator,k;for(;k=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!k[e]){k[e]=true,v.push(g(k));return}y.iterator=0,delete C.indexes[M];}let I=y.events;for(;y.eventIndex<I.length;){let M=I[y.eventIndex];if(y.eventIndex+=1,M===l){C.nodes&&C.nodes.length&&(C[e]=true,y.iterator=C.getIterator());return}else if(this.listeners[M]){y.visitors=this.listeners[M];return}}v.pop();}walkSync(v){v[e]=true;let y=d(v);for(let C of y)if(C===l)v.nodes&&v.each(R=>{R[e]||this.walkSync(R);});else {let R=this.listeners[C];if(R&&this.visitSync(R,v.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"}}return b.registerPostcss=E=>{w=E;},Or=b,b.default=b,h.registerLazyResult(b),a.registerLazyResult(b),Or}var kr,Wi;function $l(){if(Wi)return kr;Wi=1;let e=Ys(),t=Pt(),i=Ln(),n=kn();class a{constructor(p,o,h){o=o.toString(),this.stringified=false,this._processor=p,this._css=o,this._opts=h,this._map=void 0;let s,f=t;this.result=new n(this._processor,s,this._opts),this.result.css=o;let u=this;Object.defineProperty(this.result,"root",{get(){return u.root}});let l=new e(f,s,this._opts,o);if(l.isMap()){let[m,d]=l.generate();m&&(this.result.css=m),d&&(this.result.map=d);}else l.clearAnnotation(),this.result.css=l.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,o){return this.async().then(p,o)}toString(){return this._css}warnings(){return []}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return []}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let p,o=i;try{p=o(this._css,this._opts);}catch(h){this.error=h;}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return "NoWorkResult"}}return kr=a,a.default=a,kr}var Dr,Hi;function Wl(){if(Hi)return Dr;Hi=1;let e=$l(),t=Zs(),r=On(),i=it();class n{constructor(c=[]){this.version="8.4.38",this.plugins=this.normalize(c);}normalize(c){let p=[];for(let o of c)if(o.postcss===true?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))p=p.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)p.push(o);else if(typeof o=="function")p.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return p}process(c,p={}){return !this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new e(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Dr=n,n.default=n,i.registerProcessor(n),r.registerProcessor(n),Dr}var Pr,ji;function Hl(){if(ji)return Pr;ji=1;let e=_t(),t=Gs(),r=Ut(),i=Dn(),n=Ft(),a=it(),c=Pn();function p(o,h){if(Array.isArray(o))return o.map(u=>p(u));let{inputs:s,...f}=o;if(s){h=[];for(let u of s){let l={...u,__proto__:n.prototype};l.map&&(l.map={...l.map,__proto__:t.prototype}),h.push(l);}}if(f.nodes&&(f.nodes=o.nodes.map(u=>p(u,h))),f.source){let{inputId:u,...l}=f.source;f.source=l,u!=null&&(f.source.input=h[u]);}if(f.type==="root")return new a(f);if(f.type==="decl")return new e(f);if(f.type==="rule")return new c(f);if(f.type==="comment")return new r(f);if(f.type==="atrule")return new i(f);throw new Error("Unknown node type: "+o.type)}return Pr=p,p.default=p,Pr}var Lr,Vi;function jl(){if(Vi)return Lr;Vi=1;let e=Tn(),t=_t(),r=Zs(),i=_e(),n=Wl(),a=Pt(),c=Hl(),p=On(),o=Js(),h=Ut(),s=Dn(),f=kn(),u=Ft(),l=Ln(),m=Ks(),d=Pn(),g=it(),S=Lt();function w(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new n(b)}return w.plugin=function(E,v){let y=false;function C(...I){console&&console.warn&&!y&&(y=true,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
21
|
+
`)&&(u=`\r
|
|
22
|
+
`),this.css+=u+"/*# sourceMappingURL="+c+" */";}applyPrevMaps(){for(let c of this.previous()){let u=this.toUrl(this.path(c.file)),m=c.root||r(c.file),d;this.mapOpts.sourcesContent===false?(d=new e(c.text),d.sourcesContent&&(d.sourcesContent=null)):d=c.consumer(),this.map.applySourceMap(d,u,this.toUrl(this.path(m)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let c;for(let u=this.root.nodes.length-1;u>=0;u--)c=this.root.nodes[u],c.type==="comment"&&c.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(u);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),h&&a&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,u=>{c+=u;}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=t.fromSourceMap(c,{ignoreInvalidMapping:true});}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:true});let c=1,u=1,m="<no source>",d={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(y,b,E)=>{if(this.css+=y,b&&E!=="end"&&(d.generated.line=c,d.generated.column=u-1,b.source&&b.source.start?(d.source=this.sourcePath(b),d.original.line=b.source.start.line,d.original.column=b.source.start.column-1,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,this.map.addMapping(d))),g=y.match(/\n/g),g?(c+=g.length,S=y.lastIndexOf(`
|
|
23
|
+
`),u=y.length-S):u+=y.length,b&&E!=="start"){let w=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==w.last||w.raws.semicolon)&&(b.source&&b.source.end?(d.source=this.sourcePath(b),d.original.line=b.source.end.line,d.original.column=b.source.end.column-1,d.generated.line=c,d.generated.column=u-2,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,d.generated.line=c,d.generated.column=u-1,this.map.addMapping(d)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c<"u"&&c!==true?false:this.previous().length?this.previous().some(u=>u.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(c=>c.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let u=this.memoizedPaths.get(c);if(u)return u;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(n(m,this.mapOpts.annotation)));let d=i(m,c);return this.memoizedPaths.set(c,d),d}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let u=c.source.input.map;this.previousMaps.includes(u)||this.previousMaps.push(u);}});else {let c=new p(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map);}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(u=>{if(u.source){let m=u.source.input.from;if(m&&!c[m]){c[m]=true;let d=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(d,u.source.input.css);}}});else if(this.css){let u=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(u,this.css);}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let u=this.memoizedFileURLs.get(c);if(u)return u;if(l){let m=l(c).toString();return this.memoizedFileURLs.set(c,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let u=this.memoizedURLs.get(c);if(u)return u;o==="\\"&&(c=c.replace(/\\/g,"/"));let m=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,m),m}}return Cr=s,Cr}var Er,Fi;function qt(){if(Fi)return Er;Fi=1;let e=Ft();class t extends e{constructor(i){super(i),this.type="comment";}}return Er=t,t.default=t,Er}var xr,Ui;function _e(){if(Ui)return xr;Ui=1;let{isClean:e,my:t}=Pn(),r=Ut(),i=qt(),n=Ft(),o,l,p,a;function h(c){return c.map(u=>(u.nodes&&(u.nodes=h(u.nodes)),delete u.source,u))}function s(c){if(c[e]=false,c.proxyOf.nodes)for(let u of c.proxyOf.nodes)s(u);}class f extends n{append(...u){for(let m of u){let d=this.normalize(m,this.last);for(let g of d)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(u){if(super.cleanRaws(u),this.nodes)for(let m of this.nodes)m.cleanRaws(u);}each(u){if(!this.proxyOf.nodes)return;let m=this.getIterator(),d,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(d=this.indexes[m],g=u(this.proxyOf.nodes[d],d),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(u){return this.nodes.every(u)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let u=this.lastEach;return this.indexes[u]=0,u}getProxyProcessor(){return {get(u,m){return m==="proxyOf"?u:u[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...d)=>u[m](...d.map(g=>typeof g=="function"?(S,y)=>g(S.toProxy(),y):g)):m==="every"||m==="some"?d=>u[m]((g,...S)=>d(g.toProxy(),...S)):m==="root"?()=>u.root().toProxy():m==="nodes"?u.nodes.map(d=>d.toProxy()):m==="first"||m==="last"?u[m].toProxy():u[m]:u[m]},set(u,m,d){return u[m]===d||(u[m]=d,(m==="name"||m==="params"||m==="selector")&&u.markDirty()),true}}}index(u){return typeof u=="number"?u:(u.proxyOf&&(u=u.proxyOf),this.proxyOf.nodes.indexOf(u))}insertAfter(u,m){let d=this.index(u),g=this.normalize(m,this.proxyOf.nodes[d]).reverse();d=this.index(u);for(let y of g)this.proxyOf.nodes.splice(d+1,0,y);let S;for(let y in this.indexes)S=this.indexes[y],d<S&&(this.indexes[y]=S+g.length);return this.markDirty(),this}insertBefore(u,m){let d=this.index(u),g=d===0?"prepend":false,S=this.normalize(m,this.proxyOf.nodes[d],g).reverse();d=this.index(u);for(let b of S)this.proxyOf.nodes.splice(d,0,b);let y;for(let b in this.indexes)y=this.indexes[b],d<=y&&(this.indexes[b]=y+S.length);return this.markDirty(),this}normalize(u,m){if(typeof u=="string")u=h(o(u).nodes);else if(typeof u>"u")u=[];else if(Array.isArray(u)){u=u.slice(0);for(let g of u)g.parent&&g.parent.removeChild(g,"ignore");}else if(u.type==="root"&&this.type!=="document"){u=u.nodes.slice(0);for(let g of u)g.parent&&g.parent.removeChild(g,"ignore");}else if(u.type)u=[u];else if(u.prop){if(typeof u.value>"u")throw new Error("Value field is missed in node creation");typeof u.value!="string"&&(u.value=String(u.value)),u=[new r(u)];}else if(u.selector)u=[new l(u)];else if(u.name)u=[new p(u)];else if(u.text)u=[new i(u)];else throw new Error("Unknown node type in node creation");return u.map(g=>(g[t]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&s(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...u){u=u.reverse();for(let m of u){let d=this.normalize(m,this.first,"prepend").reverse();for(let g of d)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+d.length;}return this.markDirty(),this}push(u){return u.parent=this,this.proxyOf.nodes.push(u),this}removeAll(){for(let u of this.proxyOf.nodes)u.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(u){u=this.index(u),this.proxyOf.nodes[u].parent=void 0,this.proxyOf.nodes.splice(u,1);let m;for(let d in this.indexes)m=this.indexes[d],m>=u&&(this.indexes[d]=m-1);return this.markDirty(),this}replaceValues(u,m,d){return d||(d=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(u,d));}),this.markDirty(),this}some(u){return this.nodes.some(u)}walk(u){return this.each((m,d)=>{let g;try{g=u(m,d);}catch(S){throw m.addToError(S)}return g!==false&&m.walk&&(g=m.walk(u)),g})}walkAtRules(u,m){return m?u instanceof RegExp?this.walk((d,g)=>{if(d.type==="atrule"&&u.test(d.name))return m(d,g)}):this.walk((d,g)=>{if(d.type==="atrule"&&d.name===u)return m(d,g)}):(m=u,this.walk((d,g)=>{if(d.type==="atrule")return m(d,g)}))}walkComments(u){return this.walk((m,d)=>{if(m.type==="comment")return u(m,d)})}walkDecls(u,m){return m?u instanceof RegExp?this.walk((d,g)=>{if(d.type==="decl"&&u.test(d.prop))return m(d,g)}):this.walk((d,g)=>{if(d.type==="decl"&&d.prop===u)return m(d,g)}):(m=u,this.walk((d,g)=>{if(d.type==="decl")return m(d,g)}))}walkRules(u,m){return m?u instanceof RegExp?this.walk((d,g)=>{if(d.type==="rule"&&u.test(d.selector))return m(d,g)}):this.walk((d,g)=>{if(d.type==="rule"&&d.selector===u)return m(d,g)}):(m=u,this.walk((d,g)=>{if(d.type==="rule")return m(d,g)}))}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]}}return f.registerParse=c=>{o=c;},f.registerRule=c=>{l=c;},f.registerAtRule=c=>{p=c;},f.registerRoot=c=>{a=c;},xr=f,f.default=f,f.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,p.prototype):c.type==="rule"?Object.setPrototypeOf(c,l.prototype):c.type==="decl"?Object.setPrototypeOf(c,r.prototype):c.type==="comment"?Object.setPrototypeOf(c,i.prototype):c.type==="root"&&Object.setPrototypeOf(c,a.prototype),c[t]=true,c.nodes&&c.nodes.forEach(u=>{f.rebuild(u);});},xr}var Rr,Bi;function _n(){if(Bi)return Rr;Bi=1;let e=_e(),t,r;class i extends e{constructor(o){super({type:"document",...o}),this.nodes||(this.nodes=[]);}toResult(o={}){return new t(new r,this,o).stringify()}}return i.registerLazyResult=n=>{t=n;},i.registerProcessor=n=>{r=n;},Rr=i,i.default=i,Rr}var Ir,zi;function io(){if(zi)return Ir;zi=1;class e{constructor(r,i={}){if(this.type="warning",this.text=r,i.node&&i.node.source){let n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in i)this[n]=i[n];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ir=e,e.default=e,Ir}var Nr,$i;function Fn(){if($i)return Nr;$i=1;let e=io();class t{constructor(i,n,o){this.processor=i,this.messages=[],this.root=n,this.opts=o,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(i,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let o=new e(i,n);return this.messages.push(o),o}warnings(){return this.messages.filter(i=>i.type==="warning")}get content(){return this.css}}return Nr=t,t.default=t,Nr}var Tr,Wi;function tu(){if(Wi)return Tr;Wi=1;let e=39,t=34,r=92,i=47,n=10,o=32,l=12,p=9,a=13,h=91,s=93,f=40,c=41,u=123,m=125,d=59,g=42,S=58,y=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return Tr=function(R,I={}){let M=R.css.valueOf(),O=I.ignoreErrors,k,x,Q,Y,L,A,B,X,J,P,ce=M.length,N=0,re=[],H=[];function me(){return N}function ie(D){throw R.error("Unclosed "+D,N)}function oe(){return H.length===0&&N>=ce}function Re(D){if(H.length)return H.pop();if(N>=ce)return;let ee=D?D.ignoreUnclosed:false;switch(k=M.charCodeAt(N),k){case n:case o:case p:case a:case l:{x=N;do x+=1,k=M.charCodeAt(x);while(k===o||k===n||k===p||k===a||k===l);P=["space",M.slice(N,x)],N=x-1;break}case h:case s:case u:case m:case S:case d:case c:{let z=String.fromCharCode(k);P=[z,z,N];break}case f:{if(X=re.length?re.pop()[1]:"",J=M.charCodeAt(N+1),X==="url"&&J!==e&&J!==t&&J!==o&&J!==n&&J!==p&&J!==l&&J!==a){x=N;do{if(A=false,x=M.indexOf(")",x+1),x===-1)if(O||ee){x=N;break}else ie("bracket");for(B=x;M.charCodeAt(B-1)===r;)B-=1,A=!A;}while(A);P=["brackets",M.slice(N,x+1),N,x],N=x;}else x=M.indexOf(")",N+1),Y=M.slice(N,x+1),x===-1||w.test(Y)?P=["(","(",N]:(P=["brackets",Y,N,x],N=x);break}case e:case t:{Q=k===e?"'":'"',x=N;do{if(A=false,x=M.indexOf(Q,x+1),x===-1)if(O||ee){x=N+1;break}else ie("string");for(B=x;M.charCodeAt(B-1)===r;)B-=1,A=!A;}while(A);P=["string",M.slice(N,x+1),N,x],N=x;break}case y:{b.lastIndex=N+1,b.test(M),b.lastIndex===0?x=M.length-1:x=b.lastIndex-2,P=["at-word",M.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,L=true;M.charCodeAt(x+1)===r;)x+=1,L=!L;if(k=M.charCodeAt(x+1),L&&k!==i&&k!==o&&k!==n&&k!==p&&k!==a&&k!==l&&(x+=1,v.test(M.charAt(x)))){for(;v.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===o&&(x+=1);}P=["word",M.slice(N,x+1),N,x],N=x;break}default:{k===i&&M.charCodeAt(N+1)===g?(x=M.indexOf("*/",N+2)+1,x===0&&(O||ee?x=M.length:ie("comment")),P=["comment",M.slice(N,x+1),N,x],N=x):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,P=["word",M.slice(N,x+1),N,x],re.push(P),N=x);break}}return N++,P}function we(D){H.push(D);}return {back:we,endOfFile:oe,nextToken:Re,position:me}},Tr}var kr,Hi;function Un(){if(Hi)return kr;Hi=1;let e=_e();class t extends e{constructor(i){super(i),this.type="atrule";}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return kr=t,t.default=t,e.registerAtRule(t),kr}var Ar,ji;function at(){if(ji)return Ar;ji=1;let e=_e(),t,r;class i extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[]);}normalize(o,l,p){let a=super.normalize(o);if(l){if(p==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let h of a)h.raws.before=l.raws.before;}return a}removeChild(o,l){let p=this.index(o);return !l&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return i.registerLazyResult=n=>{t=n;},i.registerProcessor=n=>{r=n;},Ar=i,i.default=i,e.registerRoot(i),Ar}var Or,Vi;function so(){if(Vi)return Or;Vi=1;let e={comma(t){return e.split(t,[","],true)},space(t){let r=[" ",`
|
|
24
|
+
`," "];return e.split(t,r)},split(t,r,i){let n=[],o="",l=false,p=0,a=false,h="",s=false;for(let f of t)s?s=false:f==="\\"?s=true:a?f===h&&(a=false):f==='"'||f==="'"?(a=true,h=f):f==="("?p+=1:f===")"?p>0&&(p-=1):p===0&&r.includes(f)&&(l=true),l?(o!==""&&n.push(o.trim()),o="",l=false):o+=f;return (i||o!=="")&&n.push(o.trim()),n}};return Or=e,e.default=e,Or}var Dr,Gi;function Bn(){if(Gi)return Dr;Gi=1;let e=_e(),t=so();class r extends e{constructor(n){super(n),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return t.comma(this.selector)}set selectors(n){let o=this.selector?this.selector.match(/,\s*/):null,l=o?o[0]:","+this.raw("between","beforeOpen");this.selector=n.join(l);}}return Dr=r,r.default=r,e.registerRule(r),Dr}var Lr,Yi;function ru(){if(Yi)return Lr;Yi=1;let e=Ut(),t=tu(),r=qt(),i=Un(),n=at(),o=Bn(),l={empty:true,space:true};function p(h){for(let s=h.length-1;s>=0;s--){let f=h[s],c=f[3]||f[2];if(c)return c}}class a{constructor(s){this.input=s,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}};}atrule(s){let f=new i;f.name=s[1].slice(1),f.name===""&&this.unnamedAtrule(f,s),this.init(f,s[2]);let c,u,m,d=false,g=false,S=[],y=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),c=s[0],c==="("||c==="["?y.push(c==="("?")":"]"):c==="{"&&y.length>0?y.push("}"):c===y[y.length-1]&&y.pop(),y.length===0)if(c===";"){f.source.end=this.getPosition(s[2]),f.source.end.offset++,this.semicolon=true;break}else if(c==="{"){g=true;break}else if(c==="}"){if(S.length>0){for(m=S.length-1,u=S[m];u&&u[0]==="space";)u=S[--m];u&&(f.source.end=this.getPosition(u[3]||u[2]),f.source.end.offset++);}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){d=true;break}}f.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(f.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(f,"params",S),d&&(s=S[S.length-1],f.source.end=this.getPosition(s[3]||s[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f);}checkMissedSemicolon(s){let f=this.colon(s);if(f===false)return;let c=0,u;for(let m=f-1;m>=0&&(u=s[m],!(u[0]!=="space"&&(c+=1,c===2)));m--);throw this.input.error("Missed semicolon",u[0]==="word"?u[3]+1:u[2])}colon(s){let f=0,c,u,m;for(let[d,g]of s.entries()){if(c=g,u=c[0],u==="("&&(f+=1),u===")"&&(f-=1),f===0&&u===":")if(!m)this.doubleColon(c);else {if(m[0]==="word"&&m[1]==="progid")continue;return d}m=c;}return false}comment(s){let f=new r;this.init(f,s[2]),f.source.end=this.getPosition(s[3]||s[2]),f.source.end.offset++;let c=s[1].slice(2,-2);if(/^\s*$/.test(c))f.text="",f.raws.left=c,f.raws.right="";else {let u=c.match(/^(\s*)([^]*\S)(\s*)$/);f.text=u[2],f.raws.left=u[1],f.raws.right=u[3];}}createTokenizer(){this.tokenizer=t(this.input);}decl(s,f){let c=new e;this.init(c,s[0][2]);let u=s[s.length-1];for(u[0]===";"&&(this.semicolon=true,s.pop()),c.source.end=this.getPosition(u[3]||u[2]||p(s)),c.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),c.raws.before+=s.shift()[1];for(c.source.start=this.getPosition(s[0][2]),c.prop="";s.length;){let y=s[0][0];if(y===":"||y==="space"||y==="comment")break;c.prop+=s.shift()[1];}c.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){c.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),c.raws.between+=m[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let d=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)d.push(s.shift());this.precheckMissedSemicolon(s);for(let y=s.length-1;y>=0;y--){if(m=s[y],m[1].toLowerCase()==="!important"){c.important=true;let b=this.stringFrom(s,y);b=this.spacesFromEnd(s)+b,b!==" !important"&&(c.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=s.slice(0),E="";for(let w=y;w>0;w--){let v=b[w][0];if(E.trim().indexOf("!")===0&&v!=="space")break;E=b.pop()[1]+E;}E.trim().indexOf("!")===0&&(c.important=true,c.raws.important=E,s=b);}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(c.raws.between+=d.map(y=>y[1]).join(""),d=[]),this.raw(c,"value",d.concat(s),f),c.value.includes(":")&&!f&&this.checkMissedSemicolon(s);}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let f=new o;this.init(f,s[2]),f.selector="",f.raws.between="",this.current=f;}end(s){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s);}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(s){if(this.spaces+=s[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(s){let f=this.input.fromOffset(s);return {column:f.col,line:f.line,offset:s}}init(s,f){this.current.push(s),s.source={input:this.input,start:this.getPosition(f)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=false);}other(s){let f=false,c=null,u=false,m=null,d=[],g=s[1].startsWith("--"),S=[],y=s;for(;y;){if(c=y[0],S.push(y),c==="("||c==="[")m||(m=y),d.push(c==="("?")":"]");else if(g&&u&&c==="{")m||(m=y),d.push("}");else if(d.length===0)if(c===";")if(u){this.decl(S,g);return}else break;else if(c==="{"){this.rule(S);return}else if(c==="}"){this.tokenizer.back(S.pop()),f=true;break}else c===":"&&(u=true);else c===d[d.length-1]&&(d.pop(),d.length===0&&(m=null));y=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(f=true),d.length>0&&this.unclosedBracket(m),f&&u){if(!g)for(;S.length&&(y=S[S.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g);}else this.unknownWord(S);}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case "space":this.spaces+=s[1];break;case ";":this.freeSemicolon(s);break;case "}":this.end(s);break;case "comment":this.comment(s);break;case "at-word":this.atrule(s);break;case "{":this.emptyRule(s);break;default:this.other(s);break}this.endFile();}precheckMissedSemicolon(){}raw(s,f,c,u){let m,d,g=c.length,S="",y=true,b,E;for(let w=0;w<g;w+=1)m=c[w],d=m[0],d==="space"&&w===g-1&&!u?y=false:d==="comment"?(E=c[w-1]?c[w-1][0]:"empty",b=c[w+1]?c[w+1][0]:"empty",!l[E]&&!l[b]?S.slice(-1)===","?y=false:S+=m[1]:y=false):S+=m[1];if(!y){let w=c.reduce((v,C)=>v+C[1],"");s.raws[f]={raw:w,value:S};}s[f]=S;}rule(s){s.pop();let f=new o;this.init(f,s[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(f,"selector",s),this.current=f;}spacesAndCommentsFromEnd(s){let f,c="";for(;s.length&&(f=s[s.length-1][0],!(f!=="space"&&f!=="comment"));)c=s.pop()[1]+c;return c}spacesAndCommentsFromStart(s){let f,c="";for(;s.length&&(f=s[0][0],!(f!=="space"&&f!=="comment"));)c+=s.shift()[1];return c}spacesFromEnd(s){let f,c="";for(;s.length&&(f=s[s.length-1][0],f==="space");)c=s.pop()[1]+c;return c}stringFrom(s,f){let c="";for(let u=f;u<s.length;u++)c+=s[u][1];return s.splice(f,s.length-f),c}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return Lr=a,Lr}var Pr,Xi;function qn(){if(Xi)return Pr;Xi=1;let e=_e(),t=ru(),r=Bt();function i(n,o){let l=new r(n,o),p=new t(l);try{p.parse();}catch(a){throw a}return p.root}return Pr=i,i.default=i,e.registerParse(i),Pr}var _r,Ji;function oo(){if(Ji)return _r;Ji=1;let {isClean:e,my:t}=Pn(),r=ro(),i=_t(),n=_e(),o=_n(),p=Fn(),a=qn(),h=at(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},c={Once:true,postcssPlugin:true,prepare:true},u=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function d(E){let w=false,v=s[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[v,v+"-"+w,u,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:E.append?[v,u,v+"Exit"]:[v,v+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",u,"DocumentExit"]:E.type==="root"?w=["Root",u,"RootExit"]:w=d(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[e]=false,E.nodes&&E.nodes.forEach(w=>S(w)),E}let y={};class b{constructor(w,v,C){this.stringified=false,this.processed=false;let R;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))R=S(v);else if(v instanceof b||v instanceof p)R=S(v.root),v.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=false),C.map.prev=v.map);else {let I=a;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(v,C);}catch(M){this.processed=true,this.error=M;}R&&!R[t]&&n.rebuild(R);}this.result=new p(w,R,C),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...I,...I.prepare(this.result)}:I);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion;}catch(R){console&&console.error&&console.error(R);}return w}prepareVisitors(){this.listeners={};let w=(v,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,R]);};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!f[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[C])if(typeof v[C]=="object")for(let R in v[C])R==="*"?w(v,C,v[C][R]):w(v,C+"-"+R.toLowerCase(),v[C][R]);else typeof v[C]=="function"&&w(v,C,v[C]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(m(C))try{await C;}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];){w[e]=true;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(m(C))try{await C;}catch(R){let I=v[v.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let R=w.nodes.map(I=>C(I,this.helpers));await Promise.all(R);}else await C(w,this.helpers);}catch(R){throw this.handleError(R)}}}return this.processed=true,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return m(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let w=this.result.opts,v=i;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let R=new r(v,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let w of this.plugins){let v=this.runOnRoot(w);if(m(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];)w[e]=true,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w);}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,R]of w){this.result.lastPlugin=C;let I;try{I=R(v,this.helpers);}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return true;if(m(I))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:R}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(R.length>0&&v.visitorIndex<R.length){let[M,O]=R[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===R.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return O(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,O;for(;O=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!O[e]){O[e]=true,w.push(g(O));return}v.iterator=0,delete C.indexes[M];}let I=v.events;for(;v.eventIndex<I.length;){let M=I[v.eventIndex];if(v.eventIndex+=1,M===u){C.nodes&&C.nodes.length&&(C[e]=true,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}w.pop();}walkSync(w){w[e]=true;let v=d(w);for(let C of v)if(C===u)w.nodes&&w.each(R=>{R[e]||this.walkSync(R);});else {let R=this.listeners[C];if(R&&this.visitSync(R,w.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"}}return b.registerPostcss=E=>{y=E;},_r=b,b.default=b,h.registerLazyResult(b),o.registerLazyResult(b),_r}var Fr,Ki;function nu(){if(Ki)return Fr;Ki=1;let e=ro(),t=_t(),i=qn(),n=Fn();class o{constructor(p,a,h){a=a.toString(),this.stringified=false,this._processor=p,this._css=a,this._opts=h,this._map=void 0;let s,f=t;this.result=new n(this._processor,s,this._opts),this.result.css=a;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let u=new e(f,s,this._opts,a);if(u.isMap()){let[m,d]=u.generate();m&&(this.result.css=m),d&&(this.result.map=d);}else u.clearAnnotation(),this.result.css=u.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,a){return this.async().then(p,a)}toString(){return this._css}warnings(){return []}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return []}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let p,a=i;try{p=a(this._css,this._opts);}catch(h){this.error=h;}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return "NoWorkResult"}}return Fr=o,o.default=o,Fr}var Ur,Zi;function iu(){if(Zi)return Ur;Zi=1;let e=nu(),t=oo(),r=_n(),i=at();class n{constructor(l=[]){this.version="8.4.38",this.plugins=this.normalize(l);}normalize(l){let p=[];for(let a of l)if(a.postcss===true?a=a():a.postcss&&(a=a.postcss),typeof a=="object"&&Array.isArray(a.plugins))p=p.concat(a.plugins);else if(typeof a=="object"&&a.postcssPlugin)p.push(a);else if(typeof a=="function")p.push(a);else if(!(typeof a=="object"&&(a.parse||a.stringify)))throw new Error(a+" is not a PostCSS plugin");return p}process(l,p={}){return !this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new e(this,l,p):new t(this,l,p)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return Ur=n,n.default=n,i.registerProcessor(n),r.registerProcessor(n),Ur}var Br,Qi;function su(){if(Qi)return Br;Qi=1;let e=Ut(),t=to(),r=qt(),i=Un(),n=Bt(),o=at(),l=Bn();function p(a,h){if(Array.isArray(a))return a.map(c=>p(c));let{inputs:s,...f}=a;if(s){h=[];for(let c of s){let u={...c,__proto__:n.prototype};u.map&&(u.map={...u.map,__proto__:t.prototype}),h.push(u);}}if(f.nodes&&(f.nodes=a.nodes.map(c=>p(c,h))),f.source){let{inputId:c,...u}=f.source;f.source=u,c!=null&&(f.source.input=h[c]);}if(f.type==="root")return new o(f);if(f.type==="decl")return new e(f);if(f.type==="rule")return new l(f);if(f.type==="comment")return new r(f);if(f.type==="atrule")return new i(f);throw new Error("Unknown node type: "+a.type)}return Br=p,p.default=p,Br}var qr,es;function ou(){if(es)return qr;es=1;let e=Ln(),t=Ut(),r=oo(),i=_e(),n=iu(),o=_t(),l=su(),p=_n(),a=io(),h=qt(),s=Un(),f=Fn(),c=Bt(),u=qn(),m=so(),d=Bn(),g=at(),S=Ft();function y(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new n(b)}return y.plugin=function(E,w){let v=false;function C(...I){console&&console.warn&&!v&&(v=true,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
25
25
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
26
|
-
https://www.w3ctech.com/topic/2226`));let M=
|
|
27
|
-
`+g+s("^")}return " "+f(d)+
|
|
26
|
+
https://www.w3ctech.com/topic/2226`));let M=w(...I);return M.postcssPlugin=E,M.postcssVersion=new n().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(I,M,O){return y([C(O)]).process(I,M)},C},y.stringify=o,y.parse=u,y.fromJSON=l,y.list=m,y.comment=b=>new h(b),y.atRule=b=>new s(b),y.decl=b=>new t(b),y.rule=b=>new d(b),y.root=b=>new g(b),y.document=b=>new p(b),y.CssSyntaxError=e,y.Declaration=t,y.Container=i,y.Processor=n,y.Document=p,y.Comment=h,y.Warning=a,y.AtRule=s,y.Result=f,y.Input=c,y.Rule=d,y.Root=g,y.Node=S,r.registerPostcss(y),qr=y,y.default=y,qr}var au=ou(),K=Xl(au);K.stringify;K.fromJSON;K.plugin;K.parse;K.list;K.document;K.comment;K.atRule;K.rule;K.decl;K.root;K.CssSyntaxError;K.Declaration;K.Container;K.Processor;K.Document;K.Comment;K.Warning;K.AtRule;K.Result;K.Input;K.Rule;K.Root;K.Node;var lu=Object.defineProperty,uu=(e,t,r)=>t in e?lu(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,ye=(e,t,r)=>uu(e,typeof t!="symbol"?t+"":t,r);Date.now().toString();function cu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fu(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:true}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:true,get:function(){return e[i]}});}),r}var St={exports:{}},ts;function hu(){if(ts)return St.exports;ts=1;var e=String,t=function(){return {isColorSupported:false,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}};return St.exports=t(),St.exports.createColors=t,St.exports}var du={},pu=Object.freeze(Object.defineProperty({__proto__:null,default:du},Symbol.toStringTag,{value:"Module"})),Ee=fu(pu),zr,rs;function zn(){if(rs)return zr;rs=1;let e=hu(),t=Ee;class r extends Error{constructor(n,o,l,p,a,h){super(n),this.name="CssSyntaxError",this.reason=n,a&&(this.file=a),p&&(this.source=p),h&&(this.plugin=h),typeof o<"u"&&typeof l<"u"&&(typeof o=="number"?(this.line=o,this.column=l):(this.line=o.line,this.column=o.column,this.endLine=l.line,this.endColumn=l.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(n){if(!this.source)return "";let o=this.source;n==null&&(n=e.isColorSupported),t&&n&&(o=t(o));let l=o.split(/\r?\n/),p=Math.max(this.line-3,0),a=Math.min(this.line+2,l.length),h=String(a).length,s,f;if(n){let{bold:c,gray:u,red:m}=e.createColors(true);s=d=>c(m(d)),f=d=>u(d);}else s=f=c=>c;return l.slice(p,a).map((c,u)=>{let m=p+1+u,d=" "+(" "+m).slice(-h)+" | ";if(m===this.line){let g=f(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+f(d)+c+`
|
|
27
|
+
`+g+s("^")}return " "+f(d)+c}).join(`
|
|
28
28
|
`)}toString(){let n=this.showSourceCode();return n&&(n=`
|
|
29
29
|
|
|
30
30
|
`+n+`
|
|
31
|
-
`),this.name+": "+this.message+n}}return
|
|
31
|
+
`),this.name+": "+this.message+n}}return zr=r,r.default=r,zr}var Ct={},ns;function $n(){return ns||(ns=1,Ct.isClean=Symbol("isClean"),Ct.my=Symbol("my")),Ct}var $r,is;function ao(){if(is)return $r;is=1;let e={after:`
|
|
32
32
|
`,beforeClose:`
|
|
33
33
|
`,beforeComment:`
|
|
34
34
|
`,beforeDecl:`
|
|
35
35
|
`,beforeOpen:" ",beforeRule:`
|
|
36
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function t(i){return i[0].toUpperCase()+i.slice(1)}class r{constructor(n){this.builder=n;}atrule(n,
|
|
37
|
-
`)){let h=this.raw(n,null,"indent");if(h.length)for(let s=0;s<
|
|
38
|
-
`)&&(
|
|
39
|
-
`)&&(
|
|
40
|
-
`)&&(
|
|
41
|
-
`)&&(
|
|
42
|
-
`);return a
|
|
43
|
-
`?(f=1,
|
|
44
|
-
`);S=new Array(b.length);let E=0;for(let
|
|
36
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function t(i){return i[0].toUpperCase()+i.slice(1)}class r{constructor(n){this.builder=n;}atrule(n,o){let l="@"+n.name,p=n.params?this.rawValue(n,"params"):"";if(typeof n.raws.afterName<"u"?l+=n.raws.afterName:p&&(l+=" "),n.nodes)this.block(n,l+p);else {let a=(n.raws.between||"")+(o?";":"");this.builder(l+p+a,n);}}beforeAfter(n,o){let l;n.type==="decl"?l=this.raw(n,null,"beforeDecl"):n.type==="comment"?l=this.raw(n,null,"beforeComment"):o==="before"?l=this.raw(n,null,"beforeRule"):l=this.raw(n,null,"beforeClose");let p=n.parent,a=0;for(;p&&p.type!=="root";)a+=1,p=p.parent;if(l.includes(`
|
|
37
|
+
`)){let h=this.raw(n,null,"indent");if(h.length)for(let s=0;s<a;s++)l+=h;}return l}block(n,o){let l=this.raw(n,"between","beforeOpen");this.builder(o+l+"{",n,"start");let p;n.nodes&&n.nodes.length?(this.body(n),p=this.raw(n,"after")):p=this.raw(n,"after","emptyBody"),p&&this.builder(p),this.builder("}",n,"end");}body(n){let o=n.nodes.length-1;for(;o>0&&n.nodes[o].type==="comment";)o-=1;let l=this.raw(n,"semicolon");for(let p=0;p<n.nodes.length;p++){let a=n.nodes[p],h=this.raw(a,"before");h&&this.builder(h),this.stringify(a,o!==p||l);}}comment(n){let o=this.raw(n,"left","commentLeft"),l=this.raw(n,"right","commentRight");this.builder("/*"+o+n.text+l+"*/",n);}decl(n,o){let l=this.raw(n,"between","colon"),p=n.prop+l+this.rawValue(n,"value");n.important&&(p+=n.raws.important||" !important"),o&&(p+=";"),this.builder(p,n);}document(n){this.body(n);}raw(n,o,l){let p;if(l||(l=o),o&&(p=n.raws[o],typeof p<"u"))return p;let a=n.parent;if(l==="before"&&(!a||a.type==="root"&&a.first===n||a&&a.type==="document"))return "";if(!a)return e[l];let h=n.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[l]<"u")return h.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(n,l);{let s="raw"+t(l);this[s]?p=this[s](h,n):h.walk(f=>{if(p=f.raws[o],typeof p<"u")return false});}return typeof p>"u"&&(p=e[l]),h.rawCache[l]=p,p}rawBeforeClose(n){let o;return n.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after<"u")return o=l.raws.after,o.includes(`
|
|
38
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),false}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(n,o){let l;return n.walkComments(p=>{if(typeof p.raws.before<"u")return l=p.raws.before,l.includes(`
|
|
39
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(o,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(n,o){let l;return n.walkDecls(p=>{if(typeof p.raws.before<"u")return l=p.raws.before,l.includes(`
|
|
40
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),false}),typeof l>"u"?l=this.raw(o,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(n){let o;return n.walk(l=>{if(l.type!=="decl"&&(o=l.raws.between,typeof o<"u"))return false}),o}rawBeforeRule(n){let o;return n.walk(l=>{if(l.nodes&&(l.parent!==n||n.first!==l)&&typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
41
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),false}),o&&(o=o.replace(/\S/g,"")),o}rawColon(n){let o;return n.walkDecls(l=>{if(typeof l.raws.between<"u")return o=l.raws.between.replace(/[^\s:]/g,""),false}),o}rawEmptyBody(n){let o;return n.walk(l=>{if(l.nodes&&l.nodes.length===0&&(o=l.raws.after,typeof o<"u"))return false}),o}rawIndent(n){if(n.raws.indent)return n.raws.indent;let o;return n.walk(l=>{let p=l.parent;if(p&&p!==n&&p.parent&&p.parent===n&&typeof l.raws.before<"u"){let a=l.raws.before.split(`
|
|
42
|
+
`);return o=a[a.length-1],o=o.replace(/\S/g,""),false}}),o}rawSemicolon(n){let o;return n.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(o=l.raws.semicolon,typeof o<"u"))return false}),o}rawValue(n,o){let l=n[o],p=n.raws[o];return p&&p.value===l?p.raw:l}root(n){this.body(n),n.raws.after&&this.builder(n.raws.after);}rule(n){this.block(n,this.rawValue(n,"selector")),n.raws.ownSemicolon&&this.builder(n.raws.ownSemicolon,n,"end");}stringify(n,o){if(!this[n.type])throw new Error("Unknown AST node type "+n.type+". Maybe you need to change PostCSS stringifier.");this[n.type](n,o);}}return $r=r,r.default=r,$r}var Wr,ss;function zt(){if(ss)return Wr;ss=1;let e=ao();function t(r,i){new e(i).stringify(r);}return Wr=t,t.default=t,Wr}var Hr,os;function $t(){if(os)return Hr;os=1;let{isClean:e,my:t}=$n(),r=zn(),i=ao(),n=zt();function o(p,a){let h=new p.constructor;for(let s in p){if(!Object.prototype.hasOwnProperty.call(p,s)||s==="proxyCache")continue;let f=p[s],c=typeof f;s==="parent"&&c==="object"?a&&(h[s]=a):s==="source"?h[s]=f:Array.isArray(f)?h[s]=f.map(u=>o(u,h)):(c==="object"&&f!==null&&(f=o(f)),h[s]=f);}return h}class l{constructor(a={}){this.raws={},this[e]=false,this[t]=true;for(let h in a)if(h==="nodes"){this.nodes=[];for(let s of a[h])typeof s.clone=="function"?this.append(s.clone()):this.append(s);}else this[h]=a[h];}addToError(a){if(a.postcssNode=this,a.stack&&this.source&&/\n\s{4}at /.test(a.stack)){let h=this.source;a.stack=a.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`);}return a}after(a){return this.parent.insertAfter(this,a),this}assign(a={}){for(let h in a)this[h]=a[h];return this}before(a){return this.parent.insertBefore(this,a),this}cleanRaws(a){delete this.raws.before,delete this.raws.after,a||delete this.raws.between;}clone(a={}){let h=o(this);for(let s in a)h[s]=a[s];return h}cloneAfter(a={}){let h=this.clone(a);return this.parent.insertAfter(this,h),h}cloneBefore(a={}){let h=this.clone(a);return this.parent.insertBefore(this,h),h}error(a,h={}){if(this.source){let{end:s,start:f}=this.rangeBy(h);return this.source.input.error(a,{column:f.column,line:f.line},{column:s.column,line:s.line},h)}return new r(a)}getProxyProcessor(){return {get(a,h){return h==="proxyOf"?a:h==="root"?()=>a.root().toProxy():a[h]},set(a,h,s){return a[h]===s||(a[h]=s,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&a.markDirty()),true}}}markDirty(){if(this[e]){this[e]=false;let a=this;for(;a=a.parent;)a[e]=false;}}next(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a+1]}positionBy(a,h){let s=this.source.start;if(a.index)s=this.positionInside(a.index,h);else if(a.word){h=this.toString();let f=h.indexOf(a.word);f!==-1&&(s=this.positionInside(f,h));}return s}positionInside(a,h){let s=h||this.toString(),f=this.source.start.column,c=this.source.start.line;for(let u=0;u<a;u++)s[u]===`
|
|
43
|
+
`?(f=1,c+=1):f+=1;return {column:f,line:c}}prev(){if(!this.parent)return;let a=this.parent.index(this);return this.parent.nodes[a-1]}rangeBy(a){let h={column:this.source.start.column,line:this.source.start.line},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:h.column+1,line:h.line};if(a.word){let f=this.toString(),c=f.indexOf(a.word);c!==-1&&(h=this.positionInside(c,f),s=this.positionInside(c+a.word.length,f));}else a.start?h={column:a.start.column,line:a.start.line}:a.index&&(h=this.positionInside(a.index)),a.end?s={column:a.end.column,line:a.end.line}:typeof a.endIndex=="number"?s=this.positionInside(a.endIndex):a.index&&(s=this.positionInside(a.index+1));return (s.line<h.line||s.line===h.line&&s.column<=h.column)&&(s={column:h.column+1,line:h.line}),{end:s,start:h}}raw(a,h){return new i().raw(this,a,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...a){if(this.parent){let h=this,s=false;for(let f of a)f===this?s=true:s?(this.parent.insertAfter(h,f),h=f):this.parent.insertBefore(h,f);s||this.remove();}return this}root(){let a=this;for(;a.parent&&a.parent.type!=="document";)a=a.parent;return a}toJSON(a,h){let s={},f=h==null;h=h||new Map;let c=0;for(let u in this){if(!Object.prototype.hasOwnProperty.call(this,u)||u==="parent"||u==="proxyCache")continue;let m=this[u];if(Array.isArray(m))s[u]=m.map(d=>typeof d=="object"&&d.toJSON?d.toJSON(null,h):d);else if(typeof m=="object"&&m.toJSON)s[u]=m.toJSON(null,h);else if(u==="source"){let d=h.get(m.input);d==null&&(d=c,h.set(m.input,c),c++),s[u]={end:m.end,inputId:d,start:m.start};}else s[u]=m;}return f&&(s.inputs=[...h.keys()].map(u=>u.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(a=n){a.stringify&&(a=a.stringify);let h="";return a(this,s=>{h+=s;}),h}warn(a,h,s){let f={node:this};for(let c in s)f[c]=s[c];return a.warn(h,f)}get proxyOf(){return this}}return Hr=l,l.default=l,Hr}var jr,as;function Wt(){if(as)return jr;as=1;let e=$t();class t extends e{constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i={...i,value:String(i.value)}),super(i),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return jr=t,t.default=t,jr}var Vr,ls;function mu(){if(ls)return Vr;ls=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Vr={nanoid:(i=21)=>{let n="",o=i;for(;o--;)n+=e[Math.random()*64|0];return n},customAlphabet:(i,n=21)=>(o=n)=>{let l="",p=o;for(;p--;)l+=i[Math.random()*i.length|0];return l}},Vr}var Gr,us;function lo(){if(us)return Gr;us=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ee,{existsSync:r,readFileSync:i}=Ee,{dirname:n,join:o}=Ee;function l(a){return Buffer?Buffer.from(a,"base64").toString():window.atob(a)}class p{constructor(h,s){if(s.map===false)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let f=s.map?s.map.prev:void 0,c=this.loadMap(s.from,f);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=n(this.mapFile)),c&&(this.text=c);}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(h){let s=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,u=/^data:application\/json,/;if(c.test(h)||u.test(h))return decodeURIComponent(h.substr(RegExp.lastMatch.length));if(s.test(h)||f.test(h))return l(h.substr(RegExp.lastMatch.length));let m=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?false:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let s=h.match(/\/\*\s*# sourceMappingURL=/gm);if(!s)return;let f=h.lastIndexOf(s.pop()),c=h.indexOf("*/",f);f>-1&&c>-1&&(this.annotation=this.getAnnotationURL(h.substring(f,c)));}loadFile(h){if(this.root=n(h),r(h))return this.mapFile=h,i(h,"utf-8").toString().trim()}loadMap(h,s){if(s===false)return false;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let f=s(h);if(f){let c=this.loadFile(f);if(!c)throw new Error("Unable to load previous source map: "+f.toString());return c}}else {if(s instanceof e)return t.fromSourceMap(s).toString();if(s instanceof t)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return h&&(f=o(n(h),f)),this.loadFile(f)}}}startWith(h,s){return h?h.substr(0,s.length)===s:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Gr=p,p.default=p,Gr}var Yr,cs;function Ht(){if(cs)return Yr;cs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ee,{fileURLToPath:r,pathToFileURL:i}=Ee,{isAbsolute:n,resolve:o}=Ee,{nanoid:l}=mu(),p=Ee,a=zn(),h=lo(),s=Symbol("fromOffsetCache"),f=!!(e&&t),c=!!(o&&n);class u{constructor(d,g={}){if(d===null||typeof d>"u"||typeof d=="object"&&!d.toString)throw new Error(`PostCSS received ${d} instead of CSS string`);if(this.css=d.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,g.from&&(!c||/^\w+:\/\//.test(g.from)||n(g.from)?this.file=g.from:this.file=o(g.from)),c&&f){let S=new h(this.css,g);if(S.text){this.map=S;let y=S.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y));}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from);}error(d,g,S,y={}){let b,E,w;if(g&&typeof g=="object"){let C=g,R=S;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,S=I.col;}else g=C.line,S=C.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);E=I.line,w=I.col;}else E=R.line,w=R.column;}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col;}let v=this.origin(g,S,E,w);return v?b=new a(d,v.endLine===void 0?v.line:{column:v.column,line:v.line},v.endLine===void 0?v.column:{column:v.endColumn,line:v.endLine},v.source,v.file,y.plugin):b=new a(d,E===void 0?g:{column:S,line:g},E===void 0?S:{column:w,line:E},this.css,this.file,y.plugin),b.input={column:S,endColumn:w,endLine:E,line:g,source:this.css},this.file&&(i&&(b.input.url=i(this.file).toString()),b.input.file=this.file),b}fromOffset(d){let g,S;if(this[s])S=this[s];else {let b=this.css.split(`
|
|
44
|
+
`);S=new Array(b.length);let E=0;for(let w=0,v=b.length;w<v;w++)S[w]=E,E+=b[w].length+1;this[s]=S;}g=S[S.length-1];let y=0;if(d>=g)y=S.length-1;else {let b=S.length-2,E;for(;y<b;)if(E=y+(b-y>>1),d<S[E])b=E-1;else if(d>=S[E+1])y=E+1;else {y=E;break}}return {col:d-S[y]+1,line:y+1}}mapResolve(d){return /^\w+:\/\//.test(d)?d:o(this.map.consumer().sourceRoot||this.map.root||".",d)}origin(d,g,S,y){if(!this.map)return false;let b=this.map.consumer(),E=b.originalPositionFor({column:g,line:d});if(!E.source)return false;let w;typeof S=="number"&&(w=b.originalPositionFor({column:y,line:S}));let v;n(E.source)?v=i(E.source):v=new URL(E.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let C={column:E.column,endColumn:w&&w.column,endLine:w&&w.line,line:E.line,url:v.toString()};if(v.protocol==="file:")if(r)C.file=r(v);else throw new Error("file: protocol is not available in this PostCSS build");let R=b.sourceContentFor(E.source);return R&&(C.source=R),C}toJSON(){let d={};for(let g of ["hasBOM","css","file","id"])this[g]!=null&&(d[g]=this[g]);return this.map&&(d.map={...this.map},d.map.consumerCache&&(d.map.consumerCache=void 0)),d}get from(){return this.file||this.id}}return Yr=u,u.default=u,p&&p.registerInput&&p.registerInput(u),Yr}var Xr,fs;function uo(){if(fs)return Xr;fs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ee,{dirname:r,relative:i,resolve:n,sep:o}=Ee,{pathToFileURL:l}=Ee,p=Ht(),a=!!(e&&t),h=!!(r&&n&&i&&o);class s{constructor(c,u,m,d){this.stringify=c,this.mapOpts=m.map||{},this.root=u,this.opts=m,this.css=d,this.originalCSS=d,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let u=`
|
|
45
45
|
`;this.css.includes(`\r
|
|
46
|
-
`)&&(
|
|
47
|
-
`),this.css+=
|
|
48
|
-
`),l=w.length-S):l+=w.length,b&&E!=="start"){let v=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==v.last||v.raws.semicolon)&&(b.source&&b.source.end?(d.source=this.sourcePath(b),d.original.line=b.source.end.line,d.original.column=b.source.end.column-1,d.generated.line=u,d.generated.column=l-2,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,d.generated.line=u,d.generated.column=l-1,this.map.addMapping(d)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(u=>u.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let u=this.mapOpts.annotation;return typeof u<"u"&&u!==true?false:this.previous().length?this.previous().some(l=>l.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(u=>u.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(u){if(this.mapOpts.absolute||u.charCodeAt(0)===60||/^\w+:\/\//.test(u))return u;let l=this.memoizedPaths.get(u);if(l)return l;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(n(m,this.mapOpts.annotation)));let d=i(m,u);return this.memoizedPaths.set(u,d),d}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(u=>{if(u.source&&u.source.input.map){let l=u.source.input.map;this.previousMaps.includes(l)||this.previousMaps.push(l);}});else {let u=new p(this.originalCSS,this.opts);u.map&&this.previousMaps.push(u.map);}return this.previousMaps}setSourcesContent(){let u={};if(this.root)this.root.walk(l=>{if(l.source){let m=l.source.input.from;if(m&&!u[m]){u[m]=true;let d=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(d,l.source.input.css);}}});else if(this.css){let l=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(l,this.css);}}sourcePath(u){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(u.source.input.from):this.toUrl(this.path(u.source.input.from))}toBase64(u){return Buffer?Buffer.from(u).toString("base64"):window.btoa(unescape(encodeURIComponent(u)))}toFileUrl(u){let l=this.memoizedFileURLs.get(u);if(l)return l;if(c){let m=c(u).toString();return this.memoizedFileURLs.set(u,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(u){let l=this.memoizedURLs.get(u);if(l)return l;a==="\\"&&(u=u.replace(/\\/g,"/"));let m=encodeURI(u).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(u,m),m}}return Hr=s,Hr}var jr,is;function Wt(){if(is)return jr;is=1;let e=zt();class t extends e{constructor(i){super(i),this.type="comment";}}return jr=t,t.default=t,jr}var Vr,ss;function Fe(){if(ss)return Vr;ss=1;let{isClean:e,my:t}=Fn(),r=qt(),i=Wt(),n=zt(),a,c,p,o;function h(u){return u.map(l=>(l.nodes&&(l.nodes=h(l.nodes)),delete l.source,l))}function s(u){if(u[e]=false,u.proxyOf.nodes)for(let l of u.proxyOf.nodes)s(l);}class f extends n{append(...l){for(let m of l){let d=this.normalize(m,this.last);for(let g of d)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(l){if(super.cleanRaws(l),this.nodes)for(let m of this.nodes)m.cleanRaws(l);}each(l){if(!this.proxyOf.nodes)return;let m=this.getIterator(),d,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(d=this.indexes[m],g=l(this.proxyOf.nodes[d],d),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(l){return this.nodes.every(l)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let l=this.lastEach;return this.indexes[l]=0,l}getProxyProcessor(){return {get(l,m){return m==="proxyOf"?l:l[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...d)=>l[m](...d.map(g=>typeof g=="function"?(S,w)=>g(S.toProxy(),w):g)):m==="every"||m==="some"?d=>l[m]((g,...S)=>d(g.toProxy(),...S)):m==="root"?()=>l.root().toProxy():m==="nodes"?l.nodes.map(d=>d.toProxy()):m==="first"||m==="last"?l[m].toProxy():l[m]:l[m]},set(l,m,d){return l[m]===d||(l[m]=d,(m==="name"||m==="params"||m==="selector")&&l.markDirty()),true}}}index(l){return typeof l=="number"?l:(l.proxyOf&&(l=l.proxyOf),this.proxyOf.nodes.indexOf(l))}insertAfter(l,m){let d=this.index(l),g=this.normalize(m,this.proxyOf.nodes[d]).reverse();d=this.index(l);for(let w of g)this.proxyOf.nodes.splice(d+1,0,w);let S;for(let w in this.indexes)S=this.indexes[w],d<S&&(this.indexes[w]=S+g.length);return this.markDirty(),this}insertBefore(l,m){let d=this.index(l),g=d===0?"prepend":false,S=this.normalize(m,this.proxyOf.nodes[d],g).reverse();d=this.index(l);for(let b of S)this.proxyOf.nodes.splice(d,0,b);let w;for(let b in this.indexes)w=this.indexes[b],d<=w&&(this.indexes[b]=w+S.length);return this.markDirty(),this}normalize(l,m){if(typeof l=="string")l=h(a(l).nodes);else if(typeof l>"u")l=[];else if(Array.isArray(l)){l=l.slice(0);for(let g of l)g.parent&&g.parent.removeChild(g,"ignore");}else if(l.type==="root"&&this.type!=="document"){l=l.nodes.slice(0);for(let g of l)g.parent&&g.parent.removeChild(g,"ignore");}else if(l.type)l=[l];else if(l.prop){if(typeof l.value>"u")throw new Error("Value field is missed in node creation");typeof l.value!="string"&&(l.value=String(l.value)),l=[new r(l)];}else if(l.selector)l=[new c(l)];else if(l.name)l=[new p(l)];else if(l.text)l=[new i(l)];else throw new Error("Unknown node type in node creation");return l.map(g=>(g[t]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&s(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...l){l=l.reverse();for(let m of l){let d=this.normalize(m,this.first,"prepend").reverse();for(let g of d)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+d.length;}return this.markDirty(),this}push(l){return l.parent=this,this.proxyOf.nodes.push(l),this}removeAll(){for(let l of this.proxyOf.nodes)l.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(l){l=this.index(l),this.proxyOf.nodes[l].parent=void 0,this.proxyOf.nodes.splice(l,1);let m;for(let d in this.indexes)m=this.indexes[d],m>=l&&(this.indexes[d]=m-1);return this.markDirty(),this}replaceValues(l,m,d){return d||(d=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(l,d));}),this.markDirty(),this}some(l){return this.nodes.some(l)}walk(l){return this.each((m,d)=>{let g;try{g=l(m,d);}catch(S){throw m.addToError(S)}return g!==false&&m.walk&&(g=m.walk(l)),g})}walkAtRules(l,m){return m?l instanceof RegExp?this.walk((d,g)=>{if(d.type==="atrule"&&l.test(d.name))return m(d,g)}):this.walk((d,g)=>{if(d.type==="atrule"&&d.name===l)return m(d,g)}):(m=l,this.walk((d,g)=>{if(d.type==="atrule")return m(d,g)}))}walkComments(l){return this.walk((m,d)=>{if(m.type==="comment")return l(m,d)})}walkDecls(l,m){return m?l instanceof RegExp?this.walk((d,g)=>{if(d.type==="decl"&&l.test(d.prop))return m(d,g)}):this.walk((d,g)=>{if(d.type==="decl"&&d.prop===l)return m(d,g)}):(m=l,this.walk((d,g)=>{if(d.type==="decl")return m(d,g)}))}walkRules(l,m){return m?l instanceof RegExp?this.walk((d,g)=>{if(d.type==="rule"&&l.test(d.selector))return m(d,g)}):this.walk((d,g)=>{if(d.type==="rule"&&d.selector===l)return m(d,g)}):(m=l,this.walk((d,g)=>{if(d.type==="rule")return m(d,g)}))}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]}}return f.registerParse=u=>{a=u;},f.registerRule=u=>{c=u;},f.registerAtRule=u=>{p=u;},f.registerRoot=u=>{o=u;},Vr=f,f.default=f,f.rebuild=u=>{u.type==="atrule"?Object.setPrototypeOf(u,p.prototype):u.type==="rule"?Object.setPrototypeOf(u,c.prototype):u.type==="decl"?Object.setPrototypeOf(u,r.prototype):u.type==="comment"?Object.setPrototypeOf(u,i.prototype):u.type==="root"&&Object.setPrototypeOf(u,o.prototype),u[t]=true,u.nodes&&u.nodes.forEach(l=>{f.rebuild(l);});},Vr}var Gr,os;function Un(){if(os)return Gr;os=1;let e=Fe(),t,r;class i extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[]);}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=n=>{t=n;},i.registerProcessor=n=>{r=n;},Gr=i,i.default=i,Gr}var Xr,ls;function no(){if(ls)return Xr;ls=1;class e{constructor(r,i={}){if(this.type="warning",this.text=r,i.node&&i.node.source){let n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in i)this[n]=i[n];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Xr=e,e.default=e,Xr}var Jr,us;function Bn(){if(us)return Jr;us=1;let e=no();class t{constructor(i,n,a){this.processor=i,this.messages=[],this.root=n,this.opts=a,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(i,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let a=new e(i,n);return this.messages.push(a),a}warnings(){return this.messages.filter(i=>i.type==="warning")}get content(){return this.css}}return Jr=t,t.default=t,Jr}var Kr,cs;function tu(){if(cs)return Kr;cs=1;let e=39,t=34,r=92,i=47,n=10,a=32,c=12,p=9,o=13,h=91,s=93,f=40,u=41,l=123,m=125,d=59,g=42,S=58,w=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,y=/[\da-f]/i;return Kr=function(R,I={}){let M=R.css.valueOf(),k=I.ignoreErrors,A,x,Q,Y,P,O,B,X,J,L,ce=M.length,N=0,re=[],H=[];function me(){return N}function ie(D){throw R.error("Unclosed "+D,N)}function oe(){return H.length===0&&N>=ce}function xe(D){if(H.length)return H.pop();if(N>=ce)return;let ee=D?D.ignoreUnclosed:false;switch(A=M.charCodeAt(N),A){case n:case a:case p:case o:case c:{x=N;do x+=1,A=M.charCodeAt(x);while(A===a||A===n||A===p||A===o||A===c);L=["space",M.slice(N,x)],N=x-1;break}case h:case s:case l:case m:case S:case d:case u:{let q=String.fromCharCode(A);L=[q,q,N];break}case f:{if(X=re.length?re.pop()[1]:"",J=M.charCodeAt(N+1),X==="url"&&J!==e&&J!==t&&J!==a&&J!==n&&J!==p&&J!==c&&J!==o){x=N;do{if(O=false,x=M.indexOf(")",x+1),x===-1)if(k||ee){x=N;break}else ie("bracket");for(B=x;M.charCodeAt(B-1)===r;)B-=1,O=!O;}while(O);L=["brackets",M.slice(N,x+1),N,x],N=x;}else x=M.indexOf(")",N+1),Y=M.slice(N,x+1),x===-1||v.test(Y)?L=["(","(",N]:(L=["brackets",Y,N,x],N=x);break}case e:case t:{Q=A===e?"'":'"',x=N;do{if(O=false,x=M.indexOf(Q,x+1),x===-1)if(k||ee){x=N+1;break}else ie("string");for(B=x;M.charCodeAt(B-1)===r;)B-=1,O=!O;}while(O);L=["string",M.slice(N,x+1),N,x],N=x;break}case w:{b.lastIndex=N+1,b.test(M),b.lastIndex===0?x=M.length-1:x=b.lastIndex-2,L=["at-word",M.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,P=true;M.charCodeAt(x+1)===r;)x+=1,P=!P;if(A=M.charCodeAt(x+1),P&&A!==i&&A!==a&&A!==n&&A!==p&&A!==o&&A!==c&&(x+=1,y.test(M.charAt(x)))){for(;y.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===a&&(x+=1);}L=["word",M.slice(N,x+1),N,x],N=x;break}default:{A===i&&M.charCodeAt(N+1)===g?(x=M.indexOf("*/",N+2)+1,x===0&&(k||ee?x=M.length:ie("comment")),L=["comment",M.slice(N,x+1),N,x],N=x):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,L=["word",M.slice(N,x+1),N,x],re.push(L),N=x);break}}return N++,L}function we(D){H.push(D);}return {back:we,endOfFile:oe,nextToken:xe,position:me}},Kr}var Zr,fs;function zn(){if(fs)return Zr;fs=1;let e=Fe();class t extends e{constructor(i){super(i),this.type="atrule";}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return Zr=t,t.default=t,e.registerAtRule(t),Zr}var Qr,hs;function st(){if(hs)return Qr;hs=1;let e=Fe(),t,r;class i extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[]);}normalize(a,c,p){let o=super.normalize(a);if(c){if(p==="prepend")this.nodes.length>1?c.raws.before=this.nodes[1].raws.before:delete c.raws.before;else if(this.first!==c)for(let h of o)h.raws.before=c.raws.before;}return o}removeChild(a,c){let p=this.index(a);return !c&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=n=>{t=n;},i.registerProcessor=n=>{r=n;},Qr=i,i.default=i,e.registerRoot(i),Qr}var en,ds;function io(){if(ds)return en;ds=1;let e={comma(t){return e.split(t,[","],true)},space(t){let r=[" ",`
|
|
49
|
-
`," "];return e.split(t,r)},split(t,r,i){let n=[],a="",c=false,p=0,o=false,h="",s=false;for(let f of t)s?s=false:f==="\\"?s=true:o?f===h&&(o=false):f==='"'||f==="'"?(o=true,h=f):f==="("?p+=1:f===")"?p>0&&(p-=1):p===0&&r.includes(f)&&(c=true),c?(a!==""&&n.push(a.trim()),a="",c=false):a+=f;return (i||a!=="")&&n.push(a.trim()),n}};return en=e,e.default=e,en}var tn,ps;function qn(){if(ps)return tn;ps=1;let e=Fe(),t=io();class r extends e{constructor(n){super(n),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return t.comma(this.selector)}set selectors(n){let a=this.selector?this.selector.match(/,\s*/):null,c=a?a[0]:","+this.raw("between","beforeOpen");this.selector=n.join(c);}}return tn=r,r.default=r,e.registerRule(r),tn}var rn,ms;function ru(){if(ms)return rn;ms=1;let e=qt(),t=tu(),r=Wt(),i=zn(),n=st(),a=qn(),c={empty:true,space:true};function p(h){for(let s=h.length-1;s>=0;s--){let f=h[s],u=f[3]||f[2];if(u)return u}}class o{constructor(s){this.input=s,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}};}atrule(s){let f=new i;f.name=s[1].slice(1),f.name===""&&this.unnamedAtrule(f,s),this.init(f,s[2]);let u,l,m,d=false,g=false,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),u=s[0],u==="("||u==="["?w.push(u==="("?")":"]"):u==="{"&&w.length>0?w.push("}"):u===w[w.length-1]&&w.pop(),w.length===0)if(u===";"){f.source.end=this.getPosition(s[2]),f.source.end.offset++,this.semicolon=true;break}else if(u==="{"){g=true;break}else if(u==="}"){if(S.length>0){for(m=S.length-1,l=S[m];l&&l[0]==="space";)l=S[--m];l&&(f.source.end=this.getPosition(l[3]||l[2]),f.source.end.offset++);}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){d=true;break}}f.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(f.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(f,"params",S),d&&(s=S[S.length-1],f.source.end=this.getPosition(s[3]||s[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f);}checkMissedSemicolon(s){let f=this.colon(s);if(f===false)return;let u=0,l;for(let m=f-1;m>=0&&(l=s[m],!(l[0]!=="space"&&(u+=1,u===2)));m--);throw this.input.error("Missed semicolon",l[0]==="word"?l[3]+1:l[2])}colon(s){let f=0,u,l,m;for(let[d,g]of s.entries()){if(u=g,l=u[0],l==="("&&(f+=1),l===")"&&(f-=1),f===0&&l===":")if(!m)this.doubleColon(u);else {if(m[0]==="word"&&m[1]==="progid")continue;return d}m=u;}return false}comment(s){let f=new r;this.init(f,s[2]),f.source.end=this.getPosition(s[3]||s[2]),f.source.end.offset++;let u=s[1].slice(2,-2);if(/^\s*$/.test(u))f.text="",f.raws.left=u,f.raws.right="";else {let l=u.match(/^(\s*)([^]*\S)(\s*)$/);f.text=l[2],f.raws.left=l[1],f.raws.right=l[3];}}createTokenizer(){this.tokenizer=t(this.input);}decl(s,f){let u=new e;this.init(u,s[0][2]);let l=s[s.length-1];for(l[0]===";"&&(this.semicolon=true,s.pop()),u.source.end=this.getPosition(l[3]||l[2]||p(s)),u.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),u.raws.before+=s.shift()[1];for(u.source.start=this.getPosition(s[0][2]),u.prop="";s.length;){let w=s[0][0];if(w===":"||w==="space"||w==="comment")break;u.prop+=s.shift()[1];}u.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){u.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),u.raws.between+=m[1];(u.prop[0]==="_"||u.prop[0]==="*")&&(u.raws.before+=u.prop[0],u.prop=u.prop.slice(1));let d=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)d.push(s.shift());this.precheckMissedSemicolon(s);for(let w=s.length-1;w>=0;w--){if(m=s[w],m[1].toLowerCase()==="!important"){u.important=true;let b=this.stringFrom(s,w);b=this.spacesFromEnd(s)+b,b!==" !important"&&(u.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=s.slice(0),E="";for(let v=w;v>0;v--){let y=b[v][0];if(E.trim().indexOf("!")===0&&y!=="space")break;E=b.pop()[1]+E;}E.trim().indexOf("!")===0&&(u.important=true,u.raws.important=E,s=b);}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(u.raws.between+=d.map(w=>w[1]).join(""),d=[]),this.raw(u,"value",d.concat(s),f),u.value.includes(":")&&!f&&this.checkMissedSemicolon(s);}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let f=new a;this.init(f,s[2]),f.selector="",f.raws.between="",this.current=f;}end(s){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s);}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(s){if(this.spaces+=s[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(s){let f=this.input.fromOffset(s);return {column:f.col,line:f.line,offset:s}}init(s,f){this.current.push(s),s.source={input:this.input,start:this.getPosition(f)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=false);}other(s){let f=false,u=null,l=false,m=null,d=[],g=s[1].startsWith("--"),S=[],w=s;for(;w;){if(u=w[0],S.push(w),u==="("||u==="[")m||(m=w),d.push(u==="("?")":"]");else if(g&&l&&u==="{")m||(m=w),d.push("}");else if(d.length===0)if(u===";")if(l){this.decl(S,g);return}else break;else if(u==="{"){this.rule(S);return}else if(u==="}"){this.tokenizer.back(S.pop()),f=true;break}else u===":"&&(l=true);else u===d[d.length-1]&&(d.pop(),d.length===0&&(m=null));w=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(f=true),d.length>0&&this.unclosedBracket(m),f&&l){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g);}else this.unknownWord(S);}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case "space":this.spaces+=s[1];break;case ";":this.freeSemicolon(s);break;case "}":this.end(s);break;case "comment":this.comment(s);break;case "at-word":this.atrule(s);break;case "{":this.emptyRule(s);break;default:this.other(s);break}this.endFile();}precheckMissedSemicolon(){}raw(s,f,u,l){let m,d,g=u.length,S="",w=true,b,E;for(let v=0;v<g;v+=1)m=u[v],d=m[0],d==="space"&&v===g-1&&!l?w=false:d==="comment"?(E=u[v-1]?u[v-1][0]:"empty",b=u[v+1]?u[v+1][0]:"empty",!c[E]&&!c[b]?S.slice(-1)===","?w=false:S+=m[1]:w=false):S+=m[1];if(!w){let v=u.reduce((y,C)=>y+C[1],"");s.raws[f]={raw:v,value:S};}s[f]=S;}rule(s){s.pop();let f=new a;this.init(f,s[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(f,"selector",s),this.current=f;}spacesAndCommentsFromEnd(s){let f,u="";for(;s.length&&(f=s[s.length-1][0],!(f!=="space"&&f!=="comment"));)u=s.pop()[1]+u;return u}spacesAndCommentsFromStart(s){let f,u="";for(;s.length&&(f=s[0][0],!(f!=="space"&&f!=="comment"));)u+=s.shift()[1];return u}spacesFromEnd(s){let f,u="";for(;s.length&&(f=s[s.length-1][0],f==="space");)u=s.pop()[1]+u;return u}stringFrom(s,f){let u="";for(let l=f;l<s.length;l++)u+=s[l][1];return s.splice(f,s.length-f),u}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return rn=o,rn}var nn,gs;function $n(){if(gs)return nn;gs=1;let e=Fe(),t=ru(),r=$t();function i(n,a){let c=new r(n,a),p=new t(c);try{p.parse();}catch(o){throw o}return p.root}return nn=i,i.default=i,e.registerParse(i),nn}var sn,ys;function so(){if(ys)return sn;ys=1;let {isClean:e,my:t}=Fn(),r=to(),i=Bt(),n=Fe(),a=Un(),p=Bn(),o=$n(),h=st(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},u={Once:true,postcssPlugin:true,prepare:true},l=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function d(E){let v=false,y=s[E.type];return E.type==="decl"?v=E.prop.toLowerCase():E.type==="atrule"&&(v=E.name.toLowerCase()),v&&E.append?[y,y+"-"+v,l,y+"Exit",y+"Exit-"+v]:v?[y,y+"-"+v,y+"Exit",y+"Exit-"+v]:E.append?[y,l,y+"Exit"]:[y,y+"Exit"]}function g(E){let v;return E.type==="document"?v=["Document",l,"DocumentExit"]:E.type==="root"?v=["Root",l,"RootExit"]:v=d(E),{eventIndex:0,events:v,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[e]=false,E.nodes&&E.nodes.forEach(v=>S(v)),E}let w={};class b{constructor(v,y,C){this.stringified=false,this.processed=false;let R;if(typeof y=="object"&&y!==null&&(y.type==="root"||y.type==="document"))R=S(y);else if(y instanceof b||y instanceof p)R=S(y.root),y.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=false),C.map.prev=y.map);else {let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(y,C);}catch(M){this.processed=true,this.error=M;}R&&!R[t]&&n.rebuild(R);}this.result=new p(v,R,C),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...I,...I.prepare(this.result)}:I);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,y){let C=this.result.lastPlugin;try{y&&y.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=C.postcssPlugin,v.setMessage()):C.postcssVersion;}catch(R){console&&console.error&&console.error(R);}return v}prepareVisitors(){this.listeners={};let v=(y,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([y,R]);};for(let y of this.plugins)if(typeof y=="object")for(let C in y){if(!f[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${y.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!u[C])if(typeof y[C]=="object")for(let R in y[C])R==="*"?v(y,C,y[C][R]):v(y,C+"-"+R.toLowerCase(),y[C][R]);else typeof y[C]=="function"&&v(y,C,y[C]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let y=this.plugins[v],C=this.runOnRoot(y);if(m(C))try{await C;}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[e];){v[e]=true;let y=[g(v)];for(;y.length>0;){let C=this.visitTick(y);if(m(C))try{await C;}catch(R){let I=y[y.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[y,C]of this.listeners.OnceExit){this.result.lastPlugin=y;try{if(v.type==="document"){let R=v.nodes.map(I=>C(I,this.helpers));await Promise.all(R);}else await C(v,this.helpers);}catch(R){throw this.handleError(R)}}}return this.processed=true,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let y=this.result.root.nodes.map(C=>v.Once(C,this.helpers));return m(y[0])?Promise.all(y):y}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(y){throw this.handleError(y)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let v=this.result.opts,y=i;v.syntax&&(y=v.syntax.stringify),v.stringifier&&(y=v.stringifier),y.stringify&&(y=y.stringify);let R=new r(y,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let v of this.plugins){let y=this.runOnRoot(v);if(m(y))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[e];)v[e]=true,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let y of v.nodes)this.visitSync(this.listeners.OnceExit,y);else this.visitSync(this.listeners.OnceExit,v);}return this.result}then(v,y){return this.async().then(v,y)}toString(){return this.css}visitSync(v,y){for(let[C,R]of v){this.result.lastPlugin=C;let I;try{I=R(y,this.helpers);}catch(M){throw this.handleError(M,y.proxyOf)}if(y.type!=="root"&&y.type!=="document"&&!y.parent)return true;if(m(I))throw this.getAsyncError()}}visitTick(v){let y=v[v.length-1],{node:C,visitors:R}=y;if(C.type!=="root"&&C.type!=="document"&&!C.parent){v.pop();return}if(R.length>0&&y.visitorIndex<R.length){let[M,k]=R[y.visitorIndex];y.visitorIndex+=1,y.visitorIndex===R.length&&(y.visitors=[],y.visitorIndex=0),this.result.lastPlugin=M;try{return k(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(y.iterator!==0){let M=y.iterator,k;for(;k=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!k[e]){k[e]=true,v.push(g(k));return}y.iterator=0,delete C.indexes[M];}let I=y.events;for(;y.eventIndex<I.length;){let M=I[y.eventIndex];if(y.eventIndex+=1,M===l){C.nodes&&C.nodes.length&&(C[e]=true,y.iterator=C.getIterator());return}else if(this.listeners[M]){y.visitors=this.listeners[M];return}}v.pop();}walkSync(v){v[e]=true;let y=d(v);for(let C of y)if(C===l)v.nodes&&v.each(R=>{R[e]||this.walkSync(R);});else {let R=this.listeners[C];if(R&&this.visitSync(R,v.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"}}return b.registerPostcss=E=>{w=E;},sn=b,b.default=b,h.registerLazyResult(b),a.registerLazyResult(b),sn}var on,vs;function nu(){if(vs)return on;vs=1;let e=to(),t=Bt(),i=$n(),n=Bn();class a{constructor(p,o,h){o=o.toString(),this.stringified=false,this._processor=p,this._css=o,this._opts=h,this._map=void 0;let s,f=t;this.result=new n(this._processor,s,this._opts),this.result.css=o;let u=this;Object.defineProperty(this.result,"root",{get(){return u.root}});let l=new e(f,s,this._opts,o);if(l.isMap()){let[m,d]=l.generate();m&&(this.result.css=m),d&&(this.result.map=d);}else l.clearAnnotation(),this.result.css=l.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,o){return this.async().then(p,o)}toString(){return this._css}warnings(){return []}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return []}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let p,o=i;try{p=o(this._css,this._opts);}catch(h){this.error=h;}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return "NoWorkResult"}}return on=a,a.default=a,on}var an,ws;function iu(){if(ws)return an;ws=1;let e=nu(),t=so(),r=Un(),i=st();class n{constructor(c=[]){this.version="8.4.38",this.plugins=this.normalize(c);}normalize(c){let p=[];for(let o of c)if(o.postcss===true?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))p=p.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)p.push(o);else if(typeof o=="function")p.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return p}process(c,p={}){return !this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new e(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return an=n,n.default=n,i.registerProcessor(n),r.registerProcessor(n),an}var ln,bs;function su(){if(bs)return ln;bs=1;let e=qt(),t=eo(),r=Wt(),i=zn(),n=$t(),a=st(),c=qn();function p(o,h){if(Array.isArray(o))return o.map(u=>p(u));let{inputs:s,...f}=o;if(s){h=[];for(let u of s){let l={...u,__proto__:n.prototype};l.map&&(l.map={...l.map,__proto__:t.prototype}),h.push(l);}}if(f.nodes&&(f.nodes=o.nodes.map(u=>p(u,h))),f.source){let{inputId:u,...l}=f.source;f.source=l,u!=null&&(f.source.input=h[u]);}if(f.type==="root")return new a(f);if(f.type==="decl")return new e(f);if(f.type==="rule")return new c(f);if(f.type==="comment")return new r(f);if(f.type==="atrule")return new i(f);throw new Error("Unknown node type: "+o.type)}return ln=p,p.default=p,ln}var un,Ss;function ou(){if(Ss)return un;Ss=1;let e=_n(),t=qt(),r=so(),i=Fe(),n=iu(),a=Bt(),c=su(),p=Un(),o=no(),h=Wt(),s=zn(),f=Bn(),u=$t(),l=$n(),m=io(),d=qn(),g=st(),S=zt();function w(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new n(b)}return w.plugin=function(E,v){let y=false;function C(...I){console&&console.warn&&!y&&(y=true,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
46
|
+
`)&&(u=`\r
|
|
47
|
+
`),this.css+=u+"/*# sourceMappingURL="+c+" */";}applyPrevMaps(){for(let c of this.previous()){let u=this.toUrl(this.path(c.file)),m=c.root||r(c.file),d;this.mapOpts.sourcesContent===false?(d=new e(c.text),d.sourcesContent&&(d.sourcesContent=null)):d=c.consumer(),this.map.applySourceMap(d,u,this.toUrl(this.path(m)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let c;for(let u=this.root.nodes.length-1;u>=0;u--)c=this.root.nodes[u],c.type==="comment"&&c.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(u);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),h&&a&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,u=>{c+=u;}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=t.fromSourceMap(c,{ignoreInvalidMapping:true});}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:true});let c=1,u=1,m="<no source>",d={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(y,b,E)=>{if(this.css+=y,b&&E!=="end"&&(d.generated.line=c,d.generated.column=u-1,b.source&&b.source.start?(d.source=this.sourcePath(b),d.original.line=b.source.start.line,d.original.column=b.source.start.column-1,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,this.map.addMapping(d))),g=y.match(/\n/g),g?(c+=g.length,S=y.lastIndexOf(`
|
|
48
|
+
`),u=y.length-S):u+=y.length,b&&E!=="start"){let w=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==w.last||w.raws.semicolon)&&(b.source&&b.source.end?(d.source=this.sourcePath(b),d.original.line=b.source.end.line,d.original.column=b.source.end.column-1,d.generated.line=c,d.generated.column=u-2,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,d.generated.line=c,d.generated.column=u-1,this.map.addMapping(d)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c<"u"&&c!==true?false:this.previous().length?this.previous().some(u=>u.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(c=>c.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let u=this.memoizedPaths.get(c);if(u)return u;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(n(m,this.mapOpts.annotation)));let d=i(m,c);return this.memoizedPaths.set(c,d),d}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let u=c.source.input.map;this.previousMaps.includes(u)||this.previousMaps.push(u);}});else {let c=new p(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map);}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(u=>{if(u.source){let m=u.source.input.from;if(m&&!c[m]){c[m]=true;let d=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(d,u.source.input.css);}}});else if(this.css){let u=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(u,this.css);}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let u=this.memoizedFileURLs.get(c);if(u)return u;if(l){let m=l(c).toString();return this.memoizedFileURLs.set(c,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let u=this.memoizedURLs.get(c);if(u)return u;o==="\\"&&(c=c.replace(/\\/g,"/"));let m=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,m),m}}return Xr=s,Xr}var Jr,hs;function jt(){if(hs)return Jr;hs=1;let e=$t();class t extends e{constructor(i){super(i),this.type="comment";}}return Jr=t,t.default=t,Jr}var Kr,ds;function Fe(){if(ds)return Kr;ds=1;let{isClean:e,my:t}=$n(),r=Wt(),i=jt(),n=$t(),o,l,p,a;function h(c){return c.map(u=>(u.nodes&&(u.nodes=h(u.nodes)),delete u.source,u))}function s(c){if(c[e]=false,c.proxyOf.nodes)for(let u of c.proxyOf.nodes)s(u);}class f extends n{append(...u){for(let m of u){let d=this.normalize(m,this.last);for(let g of d)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(u){if(super.cleanRaws(u),this.nodes)for(let m of this.nodes)m.cleanRaws(u);}each(u){if(!this.proxyOf.nodes)return;let m=this.getIterator(),d,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(d=this.indexes[m],g=u(this.proxyOf.nodes[d],d),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(u){return this.nodes.every(u)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let u=this.lastEach;return this.indexes[u]=0,u}getProxyProcessor(){return {get(u,m){return m==="proxyOf"?u:u[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...d)=>u[m](...d.map(g=>typeof g=="function"?(S,y)=>g(S.toProxy(),y):g)):m==="every"||m==="some"?d=>u[m]((g,...S)=>d(g.toProxy(),...S)):m==="root"?()=>u.root().toProxy():m==="nodes"?u.nodes.map(d=>d.toProxy()):m==="first"||m==="last"?u[m].toProxy():u[m]:u[m]},set(u,m,d){return u[m]===d||(u[m]=d,(m==="name"||m==="params"||m==="selector")&&u.markDirty()),true}}}index(u){return typeof u=="number"?u:(u.proxyOf&&(u=u.proxyOf),this.proxyOf.nodes.indexOf(u))}insertAfter(u,m){let d=this.index(u),g=this.normalize(m,this.proxyOf.nodes[d]).reverse();d=this.index(u);for(let y of g)this.proxyOf.nodes.splice(d+1,0,y);let S;for(let y in this.indexes)S=this.indexes[y],d<S&&(this.indexes[y]=S+g.length);return this.markDirty(),this}insertBefore(u,m){let d=this.index(u),g=d===0?"prepend":false,S=this.normalize(m,this.proxyOf.nodes[d],g).reverse();d=this.index(u);for(let b of S)this.proxyOf.nodes.splice(d,0,b);let y;for(let b in this.indexes)y=this.indexes[b],d<=y&&(this.indexes[b]=y+S.length);return this.markDirty(),this}normalize(u,m){if(typeof u=="string")u=h(o(u).nodes);else if(typeof u>"u")u=[];else if(Array.isArray(u)){u=u.slice(0);for(let g of u)g.parent&&g.parent.removeChild(g,"ignore");}else if(u.type==="root"&&this.type!=="document"){u=u.nodes.slice(0);for(let g of u)g.parent&&g.parent.removeChild(g,"ignore");}else if(u.type)u=[u];else if(u.prop){if(typeof u.value>"u")throw new Error("Value field is missed in node creation");typeof u.value!="string"&&(u.value=String(u.value)),u=[new r(u)];}else if(u.selector)u=[new l(u)];else if(u.name)u=[new p(u)];else if(u.text)u=[new i(u)];else throw new Error("Unknown node type in node creation");return u.map(g=>(g[t]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&s(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...u){u=u.reverse();for(let m of u){let d=this.normalize(m,this.first,"prepend").reverse();for(let g of d)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+d.length;}return this.markDirty(),this}push(u){return u.parent=this,this.proxyOf.nodes.push(u),this}removeAll(){for(let u of this.proxyOf.nodes)u.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(u){u=this.index(u),this.proxyOf.nodes[u].parent=void 0,this.proxyOf.nodes.splice(u,1);let m;for(let d in this.indexes)m=this.indexes[d],m>=u&&(this.indexes[d]=m-1);return this.markDirty(),this}replaceValues(u,m,d){return d||(d=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(u,d));}),this.markDirty(),this}some(u){return this.nodes.some(u)}walk(u){return this.each((m,d)=>{let g;try{g=u(m,d);}catch(S){throw m.addToError(S)}return g!==false&&m.walk&&(g=m.walk(u)),g})}walkAtRules(u,m){return m?u instanceof RegExp?this.walk((d,g)=>{if(d.type==="atrule"&&u.test(d.name))return m(d,g)}):this.walk((d,g)=>{if(d.type==="atrule"&&d.name===u)return m(d,g)}):(m=u,this.walk((d,g)=>{if(d.type==="atrule")return m(d,g)}))}walkComments(u){return this.walk((m,d)=>{if(m.type==="comment")return u(m,d)})}walkDecls(u,m){return m?u instanceof RegExp?this.walk((d,g)=>{if(d.type==="decl"&&u.test(d.prop))return m(d,g)}):this.walk((d,g)=>{if(d.type==="decl"&&d.prop===u)return m(d,g)}):(m=u,this.walk((d,g)=>{if(d.type==="decl")return m(d,g)}))}walkRules(u,m){return m?u instanceof RegExp?this.walk((d,g)=>{if(d.type==="rule"&&u.test(d.selector))return m(d,g)}):this.walk((d,g)=>{if(d.type==="rule"&&d.selector===u)return m(d,g)}):(m=u,this.walk((d,g)=>{if(d.type==="rule")return m(d,g)}))}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]}}return f.registerParse=c=>{o=c;},f.registerRule=c=>{l=c;},f.registerAtRule=c=>{p=c;},f.registerRoot=c=>{a=c;},Kr=f,f.default=f,f.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,p.prototype):c.type==="rule"?Object.setPrototypeOf(c,l.prototype):c.type==="decl"?Object.setPrototypeOf(c,r.prototype):c.type==="comment"?Object.setPrototypeOf(c,i.prototype):c.type==="root"&&Object.setPrototypeOf(c,a.prototype),c[t]=true,c.nodes&&c.nodes.forEach(u=>{f.rebuild(u);});},Kr}var Zr,ps;function Wn(){if(ps)return Zr;ps=1;let e=Fe(),t,r;class i extends e{constructor(o){super({type:"document",...o}),this.nodes||(this.nodes=[]);}toResult(o={}){return new t(new r,this,o).stringify()}}return i.registerLazyResult=n=>{t=n;},i.registerProcessor=n=>{r=n;},Zr=i,i.default=i,Zr}var en,gs;function fo(){if(gs)return en;gs=1;class e{constructor(r,i={}){if(this.type="warning",this.text=r,i.node&&i.node.source){let n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in i)this[n]=i[n];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return en=e,e.default=e,en}var tn,ys;function Hn(){if(ys)return tn;ys=1;let e=fo();class t{constructor(i,n,o){this.processor=i,this.messages=[],this.root=n,this.opts=o,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(i,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let o=new e(i,n);return this.messages.push(o),o}warnings(){return this.messages.filter(i=>i.type==="warning")}get content(){return this.css}}return tn=t,t.default=t,tn}var rn,vs;function gu(){if(vs)return rn;vs=1;let e=39,t=34,r=92,i=47,n=10,o=32,l=12,p=9,a=13,h=91,s=93,f=40,c=41,u=123,m=125,d=59,g=42,S=58,y=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return rn=function(R,I={}){let M=R.css.valueOf(),O=I.ignoreErrors,k,x,Q,Y,L,A,B,X,J,P,ce=M.length,N=0,re=[],H=[];function me(){return N}function ie(D){throw R.error("Unclosed "+D,N)}function oe(){return H.length===0&&N>=ce}function Re(D){if(H.length)return H.pop();if(N>=ce)return;let ee=D?D.ignoreUnclosed:false;switch(k=M.charCodeAt(N),k){case n:case o:case p:case a:case l:{x=N;do x+=1,k=M.charCodeAt(x);while(k===o||k===n||k===p||k===a||k===l);P=["space",M.slice(N,x)],N=x-1;break}case h:case s:case u:case m:case S:case d:case c:{let z=String.fromCharCode(k);P=[z,z,N];break}case f:{if(X=re.length?re.pop()[1]:"",J=M.charCodeAt(N+1),X==="url"&&J!==e&&J!==t&&J!==o&&J!==n&&J!==p&&J!==l&&J!==a){x=N;do{if(A=false,x=M.indexOf(")",x+1),x===-1)if(O||ee){x=N;break}else ie("bracket");for(B=x;M.charCodeAt(B-1)===r;)B-=1,A=!A;}while(A);P=["brackets",M.slice(N,x+1),N,x],N=x;}else x=M.indexOf(")",N+1),Y=M.slice(N,x+1),x===-1||w.test(Y)?P=["(","(",N]:(P=["brackets",Y,N,x],N=x);break}case e:case t:{Q=k===e?"'":'"',x=N;do{if(A=false,x=M.indexOf(Q,x+1),x===-1)if(O||ee){x=N+1;break}else ie("string");for(B=x;M.charCodeAt(B-1)===r;)B-=1,A=!A;}while(A);P=["string",M.slice(N,x+1),N,x],N=x;break}case y:{b.lastIndex=N+1,b.test(M),b.lastIndex===0?x=M.length-1:x=b.lastIndex-2,P=["at-word",M.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,L=true;M.charCodeAt(x+1)===r;)x+=1,L=!L;if(k=M.charCodeAt(x+1),L&&k!==i&&k!==o&&k!==n&&k!==p&&k!==a&&k!==l&&(x+=1,v.test(M.charAt(x)))){for(;v.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===o&&(x+=1);}P=["word",M.slice(N,x+1),N,x],N=x;break}default:{k===i&&M.charCodeAt(N+1)===g?(x=M.indexOf("*/",N+2)+1,x===0&&(O||ee?x=M.length:ie("comment")),P=["comment",M.slice(N,x+1),N,x],N=x):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,P=["word",M.slice(N,x+1),N,x],re.push(P),N=x);break}}return N++,P}function we(D){H.push(D);}return {back:we,endOfFile:oe,nextToken:Re,position:me}},rn}var nn,ws;function jn(){if(ws)return nn;ws=1;let e=Fe();class t extends e{constructor(i){super(i),this.type="atrule";}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return nn=t,t.default=t,e.registerAtRule(t),nn}var sn,bs;function lt(){if(bs)return sn;bs=1;let e=Fe(),t,r;class i extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[]);}normalize(o,l,p){let a=super.normalize(o);if(l){if(p==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let h of a)h.raws.before=l.raws.before;}return a}removeChild(o,l){let p=this.index(o);return !l&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return i.registerLazyResult=n=>{t=n;},i.registerProcessor=n=>{r=n;},sn=i,i.default=i,e.registerRoot(i),sn}var on,Ss;function ho(){if(Ss)return on;Ss=1;let e={comma(t){return e.split(t,[","],true)},space(t){let r=[" ",`
|
|
49
|
+
`," "];return e.split(t,r)},split(t,r,i){let n=[],o="",l=false,p=0,a=false,h="",s=false;for(let f of t)s?s=false:f==="\\"?s=true:a?f===h&&(a=false):f==='"'||f==="'"?(a=true,h=f):f==="("?p+=1:f===")"?p>0&&(p-=1):p===0&&r.includes(f)&&(l=true),l?(o!==""&&n.push(o.trim()),o="",l=false):o+=f;return (i||o!=="")&&n.push(o.trim()),n}};return on=e,e.default=e,on}var an,Cs;function Vn(){if(Cs)return an;Cs=1;let e=Fe(),t=ho();class r extends e{constructor(n){super(n),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return t.comma(this.selector)}set selectors(n){let o=this.selector?this.selector.match(/,\s*/):null,l=o?o[0]:","+this.raw("between","beforeOpen");this.selector=n.join(l);}}return an=r,r.default=r,e.registerRule(r),an}var ln,Es;function yu(){if(Es)return ln;Es=1;let e=Wt(),t=gu(),r=jt(),i=jn(),n=lt(),o=Vn(),l={empty:true,space:true};function p(h){for(let s=h.length-1;s>=0;s--){let f=h[s],c=f[3]||f[2];if(c)return c}}class a{constructor(s){this.input=s,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}};}atrule(s){let f=new i;f.name=s[1].slice(1),f.name===""&&this.unnamedAtrule(f,s),this.init(f,s[2]);let c,u,m,d=false,g=false,S=[],y=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),c=s[0],c==="("||c==="["?y.push(c==="("?")":"]"):c==="{"&&y.length>0?y.push("}"):c===y[y.length-1]&&y.pop(),y.length===0)if(c===";"){f.source.end=this.getPosition(s[2]),f.source.end.offset++,this.semicolon=true;break}else if(c==="{"){g=true;break}else if(c==="}"){if(S.length>0){for(m=S.length-1,u=S[m];u&&u[0]==="space";)u=S[--m];u&&(f.source.end=this.getPosition(u[3]||u[2]),f.source.end.offset++);}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){d=true;break}}f.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(f.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(f,"params",S),d&&(s=S[S.length-1],f.source.end=this.getPosition(s[3]||s[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f);}checkMissedSemicolon(s){let f=this.colon(s);if(f===false)return;let c=0,u;for(let m=f-1;m>=0&&(u=s[m],!(u[0]!=="space"&&(c+=1,c===2)));m--);throw this.input.error("Missed semicolon",u[0]==="word"?u[3]+1:u[2])}colon(s){let f=0,c,u,m;for(let[d,g]of s.entries()){if(c=g,u=c[0],u==="("&&(f+=1),u===")"&&(f-=1),f===0&&u===":")if(!m)this.doubleColon(c);else {if(m[0]==="word"&&m[1]==="progid")continue;return d}m=c;}return false}comment(s){let f=new r;this.init(f,s[2]),f.source.end=this.getPosition(s[3]||s[2]),f.source.end.offset++;let c=s[1].slice(2,-2);if(/^\s*$/.test(c))f.text="",f.raws.left=c,f.raws.right="";else {let u=c.match(/^(\s*)([^]*\S)(\s*)$/);f.text=u[2],f.raws.left=u[1],f.raws.right=u[3];}}createTokenizer(){this.tokenizer=t(this.input);}decl(s,f){let c=new e;this.init(c,s[0][2]);let u=s[s.length-1];for(u[0]===";"&&(this.semicolon=true,s.pop()),c.source.end=this.getPosition(u[3]||u[2]||p(s)),c.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),c.raws.before+=s.shift()[1];for(c.source.start=this.getPosition(s[0][2]),c.prop="";s.length;){let y=s[0][0];if(y===":"||y==="space"||y==="comment")break;c.prop+=s.shift()[1];}c.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){c.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),c.raws.between+=m[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let d=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)d.push(s.shift());this.precheckMissedSemicolon(s);for(let y=s.length-1;y>=0;y--){if(m=s[y],m[1].toLowerCase()==="!important"){c.important=true;let b=this.stringFrom(s,y);b=this.spacesFromEnd(s)+b,b!==" !important"&&(c.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=s.slice(0),E="";for(let w=y;w>0;w--){let v=b[w][0];if(E.trim().indexOf("!")===0&&v!=="space")break;E=b.pop()[1]+E;}E.trim().indexOf("!")===0&&(c.important=true,c.raws.important=E,s=b);}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(c.raws.between+=d.map(y=>y[1]).join(""),d=[]),this.raw(c,"value",d.concat(s),f),c.value.includes(":")&&!f&&this.checkMissedSemicolon(s);}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let f=new o;this.init(f,s[2]),f.selector="",f.raws.between="",this.current=f;}end(s){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s);}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(s){if(this.spaces+=s[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(s){let f=this.input.fromOffset(s);return {column:f.col,line:f.line,offset:s}}init(s,f){this.current.push(s),s.source={input:this.input,start:this.getPosition(f)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=false);}other(s){let f=false,c=null,u=false,m=null,d=[],g=s[1].startsWith("--"),S=[],y=s;for(;y;){if(c=y[0],S.push(y),c==="("||c==="[")m||(m=y),d.push(c==="("?")":"]");else if(g&&u&&c==="{")m||(m=y),d.push("}");else if(d.length===0)if(c===";")if(u){this.decl(S,g);return}else break;else if(c==="{"){this.rule(S);return}else if(c==="}"){this.tokenizer.back(S.pop()),f=true;break}else c===":"&&(u=true);else c===d[d.length-1]&&(d.pop(),d.length===0&&(m=null));y=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(f=true),d.length>0&&this.unclosedBracket(m),f&&u){if(!g)for(;S.length&&(y=S[S.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g);}else this.unknownWord(S);}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case "space":this.spaces+=s[1];break;case ";":this.freeSemicolon(s);break;case "}":this.end(s);break;case "comment":this.comment(s);break;case "at-word":this.atrule(s);break;case "{":this.emptyRule(s);break;default:this.other(s);break}this.endFile();}precheckMissedSemicolon(){}raw(s,f,c,u){let m,d,g=c.length,S="",y=true,b,E;for(let w=0;w<g;w+=1)m=c[w],d=m[0],d==="space"&&w===g-1&&!u?y=false:d==="comment"?(E=c[w-1]?c[w-1][0]:"empty",b=c[w+1]?c[w+1][0]:"empty",!l[E]&&!l[b]?S.slice(-1)===","?y=false:S+=m[1]:y=false):S+=m[1];if(!y){let w=c.reduce((v,C)=>v+C[1],"");s.raws[f]={raw:w,value:S};}s[f]=S;}rule(s){s.pop();let f=new o;this.init(f,s[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(f,"selector",s),this.current=f;}spacesAndCommentsFromEnd(s){let f,c="";for(;s.length&&(f=s[s.length-1][0],!(f!=="space"&&f!=="comment"));)c=s.pop()[1]+c;return c}spacesAndCommentsFromStart(s){let f,c="";for(;s.length&&(f=s[0][0],!(f!=="space"&&f!=="comment"));)c+=s.shift()[1];return c}spacesFromEnd(s){let f,c="";for(;s.length&&(f=s[s.length-1][0],f==="space");)c=s.pop()[1]+c;return c}stringFrom(s,f){let c="";for(let u=f;u<s.length;u++)c+=s[u][1];return s.splice(f,s.length-f),c}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return ln=a,ln}var un,xs;function Gn(){if(xs)return un;xs=1;let e=Fe(),t=yu(),r=Ht();function i(n,o){let l=new r(n,o),p=new t(l);try{p.parse();}catch(a){throw a}return p.root}return un=i,i.default=i,e.registerParse(i),un}var cn,Rs;function po(){if(Rs)return cn;Rs=1;let {isClean:e,my:t}=$n(),r=uo(),i=zt(),n=Fe(),o=Wn(),p=Hn(),a=Gn(),h=lt(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},c={Once:true,postcssPlugin:true,prepare:true},u=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function d(E){let w=false,v=s[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[v,v+"-"+w,u,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:E.append?[v,u,v+"Exit"]:[v,v+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",u,"DocumentExit"]:E.type==="root"?w=["Root",u,"RootExit"]:w=d(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[e]=false,E.nodes&&E.nodes.forEach(w=>S(w)),E}let y={};class b{constructor(w,v,C){this.stringified=false,this.processed=false;let R;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))R=S(v);else if(v instanceof b||v instanceof p)R=S(v.root),v.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=false),C.map.prev=v.map);else {let I=a;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(v,C);}catch(M){this.processed=true,this.error=M;}R&&!R[t]&&n.rebuild(R);}this.result=new p(w,R,C),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...I,...I.prepare(this.result)}:I);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion;}catch(R){console&&console.error&&console.error(R);}return w}prepareVisitors(){this.listeners={};let w=(v,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,R]);};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!f[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[C])if(typeof v[C]=="object")for(let R in v[C])R==="*"?w(v,C,v[C][R]):w(v,C+"-"+R.toLowerCase(),v[C][R]);else typeof v[C]=="function"&&w(v,C,v[C]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(m(C))try{await C;}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];){w[e]=true;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(m(C))try{await C;}catch(R){let I=v[v.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let R=w.nodes.map(I=>C(I,this.helpers));await Promise.all(R);}else await C(w,this.helpers);}catch(R){throw this.handleError(R)}}}return this.processed=true,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return m(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let w=this.result.opts,v=i;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let R=new r(v,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let w of this.plugins){let v=this.runOnRoot(w);if(m(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];)w[e]=true,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w);}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,R]of w){this.result.lastPlugin=C;let I;try{I=R(v,this.helpers);}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return true;if(m(I))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:R}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(R.length>0&&v.visitorIndex<R.length){let[M,O]=R[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===R.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return O(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,O;for(;O=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!O[e]){O[e]=true,w.push(g(O));return}v.iterator=0,delete C.indexes[M];}let I=v.events;for(;v.eventIndex<I.length;){let M=I[v.eventIndex];if(v.eventIndex+=1,M===u){C.nodes&&C.nodes.length&&(C[e]=true,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}w.pop();}walkSync(w){w[e]=true;let v=d(w);for(let C of v)if(C===u)w.nodes&&w.each(R=>{R[e]||this.walkSync(R);});else {let R=this.listeners[C];if(R&&this.visitSync(R,w.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"}}return b.registerPostcss=E=>{y=E;},cn=b,b.default=b,h.registerLazyResult(b),o.registerLazyResult(b),cn}var fn,Ms;function vu(){if(Ms)return fn;Ms=1;let e=uo(),t=zt(),i=Gn(),n=Hn();class o{constructor(p,a,h){a=a.toString(),this.stringified=false,this._processor=p,this._css=a,this._opts=h,this._map=void 0;let s,f=t;this.result=new n(this._processor,s,this._opts),this.result.css=a;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let u=new e(f,s,this._opts,a);if(u.isMap()){let[m,d]=u.generate();m&&(this.result.css=m),d&&(this.result.map=d);}else u.clearAnnotation(),this.result.css=u.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,a){return this.async().then(p,a)}toString(){return this._css}warnings(){return []}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return []}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let p,a=i;try{p=a(this._css,this._opts);}catch(h){this.error=h;}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return "NoWorkResult"}}return fn=o,o.default=o,fn}var hn,Is;function wu(){if(Is)return hn;Is=1;let e=vu(),t=po(),r=Wn(),i=lt();class n{constructor(l=[]){this.version="8.4.38",this.plugins=this.normalize(l);}normalize(l){let p=[];for(let a of l)if(a.postcss===true?a=a():a.postcss&&(a=a.postcss),typeof a=="object"&&Array.isArray(a.plugins))p=p.concat(a.plugins);else if(typeof a=="object"&&a.postcssPlugin)p.push(a);else if(typeof a=="function")p.push(a);else if(!(typeof a=="object"&&(a.parse||a.stringify)))throw new Error(a+" is not a PostCSS plugin");return p}process(l,p={}){return !this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new e(this,l,p):new t(this,l,p)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return hn=n,n.default=n,i.registerProcessor(n),r.registerProcessor(n),hn}var dn,Ns;function bu(){if(Ns)return dn;Ns=1;let e=Wt(),t=lo(),r=jt(),i=jn(),n=Ht(),o=lt(),l=Vn();function p(a,h){if(Array.isArray(a))return a.map(c=>p(c));let{inputs:s,...f}=a;if(s){h=[];for(let c of s){let u={...c,__proto__:n.prototype};u.map&&(u.map={...u.map,__proto__:t.prototype}),h.push(u);}}if(f.nodes&&(f.nodes=a.nodes.map(c=>p(c,h))),f.source){let{inputId:c,...u}=f.source;f.source=u,c!=null&&(f.source.input=h[c]);}if(f.type==="root")return new o(f);if(f.type==="decl")return new e(f);if(f.type==="rule")return new l(f);if(f.type==="comment")return new r(f);if(f.type==="atrule")return new i(f);throw new Error("Unknown node type: "+a.type)}return dn=p,p.default=p,dn}var pn,Ts;function Su(){if(Ts)return pn;Ts=1;let e=zn(),t=Wt(),r=po(),i=Fe(),n=wu(),o=zt(),l=bu(),p=Wn(),a=fo(),h=jt(),s=jn(),f=Hn(),c=Ht(),u=Gn(),m=ho(),d=Vn(),g=lt(),S=$t();function y(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new n(b)}return y.plugin=function(E,w){let v=false;function C(...I){console&&console.warn&&!v&&(v=true,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
50
50
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
51
|
-
https://www.w3ctech.com/topic/2226`));let M=
|
|
51
|
+
https://www.w3ctech.com/topic/2226`));let M=w(...I);return M.postcssPlugin=E,M.postcssVersion=new n().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(I,M,O){return y([C(O)]).process(I,M)},C},y.stringify=o,y.parse=u,y.fromJSON=l,y.list=m,y.comment=b=>new h(b),y.atRule=b=>new s(b),y.decl=b=>new t(b),y.rule=b=>new d(b),y.root=b=>new g(b),y.document=b=>new p(b),y.CssSyntaxError=e,y.Declaration=t,y.Container=i,y.Processor=n,y.Document=p,y.Comment=h,y.Warning=a,y.AtRule=s,y.Result=f,y.Input=c,y.Rule=d,y.Root=g,y.Node=S,r.registerPostcss(y),pn=y,y.default=y,pn}var Cu=Su(),Z=cu(Cu);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;var bn=class e{constructor(...t){ye(this,"parentElement",null),ye(this,"parentNode",null),ye(this,"ownerDocument"),ye(this,"firstChild",null),ye(this,"lastChild",null),ye(this,"previousSibling",null),ye(this,"nextSibling",null),ye(this,"ELEMENT_NODE",1),ye(this,"TEXT_NODE",3),ye(this,"nodeType"),ye(this,"nodeName"),ye(this,"RRNodeType");}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return false;if(t===this)return true}else return false;for(;t.parentNode;){if(t.parentNode===this)return true;t=t.parentNode;}return false}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return "RRNode"}};var ks={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},As={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Et={},mo={},Eu=()=>!!globalThis.Zone;function Yn(e){if(Et[e])return Et[e];let t=globalThis[e],r=t.prototype,i=e in ks?ks[e]:void 0,n=!!(i&&i.every(p=>{var a,h;return !!((h=(a=Object.getOwnPropertyDescriptor(r,p))==null?void 0:a.get)!=null&&h.toString().includes("[native code]"))})),o=e in As?As[e]:void 0,l=!!(o&&o.every(p=>{var a;return typeof r[p]=="function"&&((a=r[p])==null?void 0:a.toString().includes("[native code]"))}));if(n&&l&&!Eu())return Et[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let a=p.contentWindow;if(!a)return t.prototype;let h=a[e].prototype;if(!h)return p.remove(),r;let s=navigator.userAgent;return s.includes("Safari")&&!s.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),mo[e]=()=>p.remove()):p.remove(),Et[e]=h}catch{return r}}var mn={};function ke(e,t,r){var i;let n=`${e}.${String(r)}`;if(mn[n])return mn[n].call(t);let o=Yn(e),l=(i=Object.getOwnPropertyDescriptor(o,r))==null?void 0:i.get;return l?(mn[n]=l,l.call(t)):t[r]}var gn={};function go(e,t,r){let i=`${e}.${String(r)}`;if(gn[i])return gn[i].bind(t);let o=Yn(e)[r];return typeof o!="function"?t[r]:(gn[i]=o,o.bind(t))}function xu(e){return ke("Node",e,"ownerDocument")}function Ru(e){return ke("Node",e,"childNodes")}function Mu(e){return ke("Node",e,"parentNode")}function Iu(e){return ke("Node",e,"parentElement")}function Nu(e){return ke("Node",e,"textContent")}function Tu(e,t){return go("Node",e,"contains")(t)}function ku(e){return go("Node",e,"getRootNode")()}function Au(e){return !e||!("host"in e)?null:ke("ShadowRoot",e,"host")}function Ou(e){return e.styleSheets}function Du(e){return !e||!("shadowRoot"in e)?null:ke("Element",e,"shadowRoot")}function Lu(e,t){return ke("Element",e,"querySelector")(t)}function Pu(e,t){return ke("Element",e,"querySelectorAll")(t)}function yo(){return [Yn("MutationObserver").constructor,mo.MutationObserver??(()=>{})]}var st=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(st=()=>new Date().getTime());function Ue(e,t,r){try{if(!(t in e))return ()=>{};let i=e[t],n=r(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i;}}catch{return ()=>{}}}var _={ownerDocument:xu,childNodes:Ru,parentNode:Mu,parentElement:Iu,textContent:Nu,contains:Tu,getRootNode:ku,host:Au,styleSheets:Ou,shadowRoot:Du,querySelector:Lu,querySelectorAll:Pu,nowTimestamp:st,mutationObserverCtor:yo,patch:Ue};function ae(e,t,r=document){let i={capture:true,passive:true};return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}var We=`Please stop import mirror directly. Instead of that,\r
|
|
52
52
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
53
|
-
or you can use record.mirror to access the mirror instance during recording.`,xs={map:{},getId(){return console.error($e),-1},getNode(){return console.error($e),null},removeNodeFromMap(){console.error($e);},has(){return console.error($e),false},reset(){console.error($e);}};typeof window<"u"&&window.Proxy&&window.Reflect&&(xs=new Proxy(xs,{get(e,t,r){return t==="map"&&console.error($e),Reflect.get(e,t,r)}}));function nt(e,t,r={}){let i=null,n=0;return function(...a){let c=Date.now();!n&&r.leading===false&&(n=c);let p=t-(c-n),o=this;p<=0||p>t?(i&&(clearTimeout(i),i=null),n=c,e.apply(o,a)):!i&&r.trailing!==false&&(i=setTimeout(()=>{n=r.leading===false?0:Date.now(),i=null,e.apply(o,a);},p));}}function Ht(e,t,r,i,n=window){let a=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?r:{set(c){setTimeout(()=>{r.set.call(this,c);},0),a&&a.set&&a.set.call(this,c);}}),()=>Ht(e,t,a||{},true)}function uo(e){var t,r,i,n;let a=e.document;return {left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||a?.body&&((t=_.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:a?.documentElement.scrollTop||a?.body&&((i=_.parentElement(a.body))==null?void 0:i.scrollTop)||((n=a?.body)==null?void 0:n.scrollTop)||0}}function co(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function fo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ho(e){return e?e.nodeType===e.ELEMENT_NODE?e:_.parentElement(e):null}function le(e,t,r,i){if(!e)return false;let n=ho(e);if(!n)return false;try{if(typeof t=="string"){if(n.classList.contains(t)||i&&n.closest("."+t)!==null)return !0}else if(At(n,t,i))return !0}catch{}return !!(r&&(n.matches(r)||i&&n.closest(r)!==null))}function Su(e,t){return t.getId(e)!==-1}function hn(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?true:t.getId(e)===tt}function po(e,t){if(Ze(e))return false;let r=t.getId(e);if(!t.has(r))return true;let i=_.parentNode(e);return i&&i.nodeType===e.DOCUMENT_NODE?false:i?po(i,t):true}function gn(e){return !!e.changedTouches}function Cu(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);}function mo(e,t){return !!(e.nodeName==="IFRAME"&&t.getMeta(e))}function go(e,t){return !!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function yn(e){return e?e instanceof mn&&"shadowRoot"in e?!!e.shadowRoot:!!_.shadowRoot(e):false}var vn=class{constructor(){T(this,"id",1),T(this,"styleIDMap",new WeakMap),T(this,"idStyleMap",new Map);}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let i;return r===void 0?i=this.id++:i=r,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 yo(e){var t;let r=null;return "getRootNode"in e&&((t=_.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(e))&&(r=_.host(_.getRootNode(e))),r}function Eu(e){let t=e,r;for(;r=yo(t);)t=r;return t}function xu(e){let t=_.ownerDocument(e);if(!t)return false;let r=Eu(e);return _.contains(t,r)}function vo(e){let t=_.ownerDocument(e);return t?_.contains(t,e)||xu(e):false}var z=(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[e.Asset=7]="Asset",e))(z||{}),F=(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))(F||{}),fe=(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))(fe||{}),Ie=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ie||{}),Ge=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ge||{}),We=(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))(We||{});var wo=(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",e))(wo||{});function Rs(e){return "__ln"in e}var wn=class{constructor(){T(this,"length",0),T(this,"head",null),T(this,"tail",null);}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let i=0;i<t;i++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Rs(t.previousSibling)){let i=t.previousSibling.__ln.next;r.next=i,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,i&&(i.previous=r);}else if(t.nextSibling&&Rs(t.nextSibling)&&t.nextSibling.__ln.previous){let i=t.nextSibling.__ln.previous;r.previous=i,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,i&&(i.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){let 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--);}},Ms=(e,t)=>`${e}@${t}`,bn=class{constructor(){T(this,"frozen",false),T(this,"locked",false),T(this,"texts",[]),T(this,"attributes",[]),T(this,"attributeMap",new WeakMap),T(this,"removes",[]),T(this,"mapRemoves",[]),T(this,"movedMap",{}),T(this,"addedSet",new Set),T(this,"movedSet",new Set),T(this,"droppedSet",new Set),T(this,"removesSubTreeCache",new Set),T(this,"mutationCb"),T(this,"blockClass"),T(this,"blockSelector"),T(this,"maskTextClass"),T(this,"maskTextSelector"),T(this,"inlineStylesheet"),T(this,"maskInputOptions"),T(this,"maskTextFn"),T(this,"maskInputFn"),T(this,"keepIframeSrcFn"),T(this,"recordCanvas"),T(this,"inlineImages"),T(this,"slimDOMOptions"),T(this,"dataURLOptions"),T(this,"doc"),T(this,"mirror"),T(this,"iframeManager"),T(this,"stylesheetManager"),T(this,"shadowDomManager"),T(this,"canvasManager"),T(this,"processedNodeManager"),T(this,"unattachedDoc"),T(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit();}),T(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,i=new wn,n=o=>{let h=o,s=tt;for(;s===tt;)h=h&&h.nextSibling,s=h&&this.mirror.getId(h);return s},a=o=>{let h=_.parentNode(o);if(!h||!vo(o))return;let s=false;if(o.nodeType===Node.TEXT_NODE){let m=h.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(h)&&(s=true);}let f=Ze(h)?this.mirror.getId(yo(o)):this.mirror.getId(h),u=n(o);if(f===-1||u===-1)return i.addNode(o);let l=je(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,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:m=>{mo(m,this.mirror)&&this.iframeManager.addIframe(m),go(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),yn(o)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(o),this.doc);},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d);},cssCaptured:s});l&&(t.push({parentId:f,nextId:u,node:l}),r.add(l.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let o of this.movedSet)Is(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(_.parentNode(o))||a(o);for(let o of this.addedSet)!Ns(this.droppedSet,o)&&!Is(this.removesSubTreeCache,o,this.mirror)||Ns(this.movedSet,o)?a(o):this.droppedSet.add(o);let c=null;for(;i.length;){let o=null;if(c){let h=this.mirror.getId(_.parentNode(c.value)),s=n(c.value);h!==-1&&s!==-1&&(o=c);}if(!o){let h=i.tail;for(;h;){let s=h;if(h=h.previous,s){let f=this.mirror.getId(_.parentNode(s.value));if(n(s.value)===-1)continue;if(f!==-1){o=s;break}else {let l=s.value,m=_.parentNode(l);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=_.host(m);if(this.mirror.getId(d)!==-1){o=s;break}}}}}}if(!o){for(;i.head;)i.removeNode(i.head.value);break}c=o.previous,i.removeNode(o.value),a(o.value);}let p={texts:this.texts.map(o=>{let h=o.node,s=_.parentNode(h);return s&&s.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(s),{id:this.mirror.getId(h),value:o.value}}).filter(o=>!r.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{let{attributes:h}=o;if(typeof h.style=="string"){let s=JSON.stringify(o.styleDiff),f=JSON.stringify(o._unchangedStyles);s.length<h.style.length&&(s+f).split("var(").length===h.style.split("var(").length&&(h.style=o.styleDiff);}return {id:this.mirror.getId(o.node),attributes:h}}).filter(o=>!r.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:t};!p.texts.length&&!p.attributes.length&&!p.removes.length&&!p.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(p));}),T(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));let i=Array.from(_.childNodes(t),n=>_.textContent(n)||"").join("");r.attributes.value=It({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Nt(t),value:i,maskInputFn:this.maskInputFn});}),T(this,"processMutation",t=>{if(!hn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case "characterData":{let r=_.textContent(t.target);!le(t.target,this.blockClass,this.blockSelector,false)&&r!==t.oldValue&&this.texts.push({value:Hs(t.target,this.maskTextClass,this.maskTextSelector,true)&&r?this.maskTextFn?this.maskTextFn(r,ho(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case "attributes":{let r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if(i==="value"){let c=Nt(r);n=It({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:c,value:n,maskInputFn:this.maskInputFn});}if(le(t.target,this.blockClass,this.blockSelector,false)||n===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&i==="src"&&!this.keepIframeSrcFn(n))if(!r.contentDocument)i="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),i==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Ws(r.tagName,i))if(a.attributes[i]=$s(this.doc,Le(r.tagName),Le(i),n),i==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch{this.unattachedDoc=this.doc;}let c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(let p of Array.from(r.style)){let o=r.style.getPropertyValue(p),h=r.style.getPropertyPriority(p);o!==c.style.getPropertyValue(p)||h!==c.style.getPropertyPriority(p)?h===""?a.styleDiff[p]=o:a.styleDiff[p]=[o,h]:a._unchangedStyles[p]=[o,h];}for(let p of Array.from(c.style))r.style.getPropertyValue(p)===""&&(a.styleDiff[p]=false);}else i==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case "childList":{if(le(t.target,this.blockClass,this.blockSelector,true))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let i=this.mirror.getId(r),n=Ze(t.target)?this.mirror.getId(_.host(t.target)):this.mirror.getId(t.target);le(t.target,this.blockClass,this.blockSelector,false)||hn(r,this.mirror,this.slimDOMOptions)||!Su(r,this.mirror)||(this.addedSet.has(r)?(Sn(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&i===-1||po(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ms(i,n)]?Sn(this.movedSet,r):(this.removes.push({parentId:n,id:i,isShadow:Ze(t.target)&&Qe(t.target)?true:void 0}),Ru(r,this.removesSubTreeCache))),this.mapRemoves.push(r));});break}}}),T(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(hn(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;r&&this.mirror.hasNode(r)&&(i=this.mirror.getId(r)),i&&i!==-1&&(this.movedMap[Ms(this.mirror.getId(t),i)]=true);}else this.addedSet.add(t),this.droppedSet.delete(t);le(t,this.blockClass,this.blockSelector,false)||(_.childNodes(t).forEach(i=>this.genAdds(i)),yn(t)&&_.childNodes(_.shadowRoot(t)).forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,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=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function Sn(e,t){e.delete(t),_.childNodes(t).forEach(r=>Sn(e,r));}function Ru(e,t){let r=[e];for(;r.length;){let i=r.pop();t.has(i)||(t.add(i),_.childNodes(i).forEach(n=>r.push(n)));}}function Is(e,t,r){return e.size===0?false:Mu(e,t)}function Mu(e,t,r){let i=_.parentNode(t);return i?e.has(i):false}function Ns(e,t){return e.size===0?false:bo(e,t)}function bo(e,t){let r=_.parentNode(t);return r?e.has(r)?true:bo(e,r):false}var et;function Iu(e){et=e;}function Nu(){et=void 0;}var U=e=>et?(...r)=>{try{return e(...r)}catch(i){if(et&&et(i)===true)return;throw i}}:e,Pe=[];function ot(e){try{if("composedPath"in e){let 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 So(e,t){let r=new bn;Pe.push(r),r.init(e);let[i,n]=lo(),a=new i(U(r.processMutations.bind(r)));return a.observe(t,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),[a,n]}function Tu({mousemoveCb:e,sampling:t,doc:r,mirror:i}){if(t.mousemove===false)return ()=>{};let n=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,c=[],p,o=nt(U(f=>{let u=Date.now()-p;e(c.map(l=>(l.timeOffset-=u,l)),f),c=[],p=null;}),a),h=U(nt(U(f=>{let u=ot(f),{clientX:l,clientY:m}=gn(f)?f.changedTouches[0]:f;p||(p=rt()),c.push({x:l,y:m,id:i.getId(u),timeOffset:rt()-p}),o(typeof DragEvent<"u"&&f instanceof DragEvent?F.Drag:f instanceof MouseEvent?F.MouseMove:F.TouchMove);}),n,{trailing:!1})),s=[ae("mousemove",h,r),ae("touchmove",h,r),ae("drag",h,r)];return U(()=>{s.forEach(f=>f());})}function Au({mouseInteractionCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,sampling:a}){if(a.mouseInteraction===false)return ()=>{};let c=a.mouseInteraction===true||a.mouseInteraction===void 0?{}:a.mouseInteraction,p=[],o=null,h=s=>f=>{let u=ot(f);if(le(u,i,n,true))return;let l=null,m=s;if("pointerType"in f){switch(f.pointerType){case "mouse":l=Ie.Mouse;break;case "touch":l=Ie.Touch;break;case "pen":l=Ie.Pen;break}l===Ie.Touch?fe[s]===fe.MouseDown?m="TouchStart":fe[s]===fe.MouseUp&&(m="TouchEnd"):Ie.Pen;}else gn(f)&&(l=Ie.Touch);l!==null?(o=l,(m.startsWith("Touch")&&l===Ie.Touch||m.startsWith("Mouse")&&l===Ie.Mouse)&&(l=null)):fe[s]===fe.Click&&(l=o,o=null);let d=gn(f)?f.changedTouches[0]:f;if(!d)return;let g=r.getId(u),{clientX:S,clientY:w}=d;U(e)({type:fe[m],id:g,x:S,y:w,...l!==null&&{pointerType:l}});};return Object.keys(fe).filter(s=>Number.isNaN(Number(s))&&!s.endsWith("_Departed")&&c[s]!==false).forEach(s=>{let f=Le(s),u=h(s);if(window.PointerEvent)switch(fe[s]){case fe.MouseDown:case fe.MouseUp:f=f.replace("mouse","pointer");break;case fe.TouchStart:case fe.TouchEnd:return}p.push(ae(f,u,t));}),U(()=>{p.forEach(s=>s());})}function Co({scrollCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,sampling:a}){let c=U(nt(U(p=>{let o=ot(p);if(!o||le(o,i,n,!0))return;let h=r.getId(o);if(o===t&&t.defaultView){let s=uo(t.defaultView);e({id:h,x:s.left,y:s.top});}else e({id:h,x:o.scrollLeft,y:o.scrollTop});}),a.scroll||100));return ae("scroll",c,t)}function Ou({viewportResizeCb:e},{win:t}){let r=-1,i=-1,n=U(nt(U(()=>{let a=co(),c=fo();(r!==a||i!==c)&&(e({width:Number(c),height:Number(a)}),r=a,i=c);}),200));return ae("resize",n,t)}var ku=["INPUT","TEXTAREA","SELECT"],Ts=new WeakMap;function Du({inputCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,ignoreClass:a,ignoreSelector:c,maskInputOptions:p,maskInputFn:o,sampling:h,userTriggeredOnInput:s}){function f(w){let b=ot(w),E=w.isTrusted,v=b&&b.tagName;if(b&&v==="OPTION"&&(b=_.parentElement(b)),!b||!v||ku.indexOf(v)<0||le(b,i,n,true)||b.classList.contains(a)||c&&b.matches(c))return;let y=b.value,C=false,R=Nt(b)||"";R==="radio"||R==="checkbox"?C=b.checked:(p[v.toLowerCase()]||p[R])&&(y=It({element:b,maskInputOptions:p,tagName:v,type:R,value:y,maskInputFn:o})),u(b,s?{text:y,isChecked:C,userTriggered:E}:{text:y,isChecked:C});let I=b.name;R==="radio"&&I&&C&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(M=>{if(M!==b){let k=M.value;u(M,s?{text:k,isChecked:!C,userTriggered:false}:{text:k,isChecked:!C});}});}function u(w,b){let E=Ts.get(w);if(!E||E.text!==b.text||E.isChecked!==b.isChecked){Ts.set(w,b);let v=r.getId(w);U(e)({...b,id:v});}}let m=(h.input==="last"?["change"]:["input","change"]).map(w=>ae(w,U(f),t)),d=t.defaultView;if(!d)return ()=>{m.forEach(w=>w());};let g=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),S=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...S.map(w=>Ht(w[0],w[1],{set(){U(f)({target:this,isTrusted:false});}},false,d))),U(()=>{m.forEach(w=>w());})}function Ot(e){let t=[];function r(i,n){if(Ct("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||Ct("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||Ct("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||Ct("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){let c=Array.from(i.parentRule.cssRules).indexOf(i);return n.unshift(c),r(i.parentRule,n)}else if(i.parentStyleSheet){let c=Array.from(i.parentStyleSheet.cssRules).indexOf(i);n.unshift(c);}return n}return r(e,t)}function ke(e,t,r){let i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:i}):{}}function Pu({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return ()=>{};let n=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:U((s,f,u)=>{let[l,m]=u,{id:d,styleId:g}=ke(f,t,r.styleMirror);return (d&&d!==-1||g&&g!==-1)&&e({id:d,styleId:g,adds:[{rule:l,index:m}]}),s.apply(f,u)})}),i.CSSStyleSheet.prototype.addRule=function(s,f,u=this.cssRules.length){let l=`${s} { ${f} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[l,u])};let a=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:U((s,f,u)=>{let[l]=u,{id:m,styleId:d}=ke(f,t,r.styleMirror);return (m&&m!==-1||d&&d!==-1)&&e({id:m,styleId:d,removes:[{index:l}]}),s.apply(f,u)})}),i.CSSStyleSheet.prototype.removeRule=function(s){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[s])};let c;i.CSSStyleSheet.prototype.replace&&(c=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:U((s,f,u)=>{let[l]=u,{id:m,styleId:d}=ke(f,t,r.styleMirror);return (m&&m!==-1||d&&d!==-1)&&e({id:m,styleId:d,replace:l}),s.apply(f,u)})}));let p;i.CSSStyleSheet.prototype.replaceSync&&(p=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(p,{apply:U((s,f,u)=>{let[l]=u,{id:m,styleId:d}=ke(f,t,r.styleMirror);return (m&&m!==-1||d&&d!==-1)&&e({id:m,styleId:d,replaceSync:l}),s.apply(f,u)})}));let o={};Et("CSSGroupingRule")?o.CSSGroupingRule=i.CSSGroupingRule:(Et("CSSMediaRule")&&(o.CSSMediaRule=i.CSSMediaRule),Et("CSSConditionRule")&&(o.CSSConditionRule=i.CSSConditionRule),Et("CSSSupportsRule")&&(o.CSSSupportsRule=i.CSSSupportsRule));let h={};return Object.entries(o).forEach(([s,f])=>{h[s]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(h[s].insertRule,{apply:U((u,l,m)=>{let[d,g]=m,{id:S,styleId:w}=ke(l.parentStyleSheet,t,r.styleMirror);return (S&&S!==-1||w&&w!==-1)&&e({id:S,styleId:w,adds:[{rule:d,index:[...Ot(l),g||0]}]}),u.apply(l,m)})}),f.prototype.deleteRule=new Proxy(h[s].deleteRule,{apply:U((u,l,m)=>{let[d]=m,{id:g,styleId:S}=ke(l.parentStyleSheet,t,r.styleMirror);return (g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...Ot(l),d]}]}),u.apply(l,m)})});}),U(()=>{i.CSSStyleSheet.prototype.insertRule=n,i.CSSStyleSheet.prototype.deleteRule=a,c&&(i.CSSStyleSheet.prototype.replace=c),p&&(i.CSSStyleSheet.prototype.replaceSync=p),Object.entries(o).forEach(([s,f])=>{f.prototype.insertRule=h[s].insertRule,f.prototype.deleteRule=h[s].deleteRule;});})}function Eo({mirror:e,stylesheetManager:t},r){var i,n,a;let c=null;r.nodeName==="#document"?c=e.getId(r):c=e.getId(_.host(r));let p=r.nodeName==="#document"?(i=r.defaultView)==null?void 0:i.Document:(a=(n=r.ownerDocument)==null?void 0:n.defaultView)==null?void 0:a.ShadowRoot,o=p?.prototype?Object.getOwnPropertyDescriptor(p?.prototype,"adoptedStyleSheets"):void 0;return c===null||c===-1||!p||!o?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var h;return (h=o.get)==null?void 0:h.call(this)},set(h){var s;let f=(s=o.set)==null?void 0:s.call(this,h);if(c!==null&&c!==-1)try{t.adoptStyleSheets(h,c);}catch{}return f}}),U(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set});}))}function Lu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:i},{win:n}){let a=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:U((p,o,h)=>{var s;let[f,u,l]=h;if(r.has(f))return a.apply(o,[f,u,l]);let{id:m,styleId:d}=ke((s=o.parentRule)==null?void 0:s.parentStyleSheet,t,i.styleMirror);return (m&&m!==-1||d&&d!==-1)&&e({id:m,styleId:d,set:{property:f,value:u,priority:l},index:Ot(o.parentRule)}),p.apply(o,h)})});let c=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:U((p,o,h)=>{var s;let[f]=h;if(r.has(f))return c.apply(o,[f]);let{id:u,styleId:l}=ke((s=o.parentRule)==null?void 0:s.parentStyleSheet,t,i.styleMirror);return (u&&u!==-1||l&&l!==-1)&&e({id:u,styleId:l,remove:{property:f},index:Ot(o.parentRule)}),p.apply(o,h)})}),U(()=>{n.CSSStyleDeclaration.prototype.setProperty=a,n.CSSStyleDeclaration.prototype.removeProperty=c;})}function _u({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:i,sampling:n,doc:a}){let c=U(o=>nt(U(h=>{let s=ot(h);if(!s||le(s,t,r,!0))return;let{currentTime:f,volume:u,muted:l,playbackRate:m,loop:d}=s;e({type:o,id:i.getId(s),currentTime:f,volume:u,muted:l,playbackRate:m,loop:d});}),n.media||500)),p=[ae("play",c(We.Play),a),ae("pause",c(We.Pause),a),ae("seeked",c(We.Seeked),a),ae("volumechange",c(We.VolumeChange),a),ae("ratechange",c(We.RateChange),a)];return U(()=>{p.forEach(o=>o());})}function Fu({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return ()=>{};let i=[],n=new WeakMap,a=r.FontFace;r.FontFace=function(o,h,s){let f=new a(o,h,s);return n.set(f,{family:o,buffer:typeof h!="string",descriptors:s,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),f};let c=Ue(t.fonts,"add",function(p){return function(o){return setTimeout(U(()=>{let h=n.get(o);h&&(e(h),n.delete(o));}),0),p.apply(this,[o])}});return i.push(()=>{r.FontFace=a;}),i.push(c),U(()=>{i.forEach(p=>p());})}function Uu(e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,selectionCb:a}=e,c=true,p=U(()=>{let o=t.getSelection();if(!o||c&&o?.isCollapsed)return;c=o.isCollapsed||!1;let h=[],s=o.rangeCount||0;for(let f=0;f<s;f++){let u=o.getRangeAt(f),{startContainer:l,startOffset:m,endContainer:d,endOffset:g}=u;le(l,i,n,!0)||le(d,i,n,!0)||h.push({start:r.getId(l),startOffset:m,end:r.getId(d),endOffset:g});}a({ranges:h});});return p(),ae("selectionchange",p)}function Bu({doc:e,customElementCb:t}){let r=e.defaultView;return !r||!r.customElements?()=>{}:Ue(r.customElements,"define",function(n){return function(a,c,p){try{t({define:{name:a}});}catch{console.warn(`Custom element callback failed for ${a}`);}return n.apply(this,[a,c,p])}})}function zu(e,t){let{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:a,viewportResizeCb:c,inputCb:p,mediaInteractionCb:o,styleSheetRuleCb:h,styleDeclarationCb:s,canvasMutationCb:f,fontCb:u,selectionCb:l,customElementCb:m}=e;e.mutationCb=(...d)=>{t.mutation&&t.mutation(...d),r(...d);},e.mousemoveCb=(...d)=>{t.mousemove&&t.mousemove(...d),i(...d);},e.mouseInteractionCb=(...d)=>{t.mouseInteraction&&t.mouseInteraction(...d),n(...d);},e.scrollCb=(...d)=>{t.scroll&&t.scroll(...d),a(...d);},e.viewportResizeCb=(...d)=>{t.viewportResize&&t.viewportResize(...d),c(...d);},e.inputCb=(...d)=>{t.input&&t.input(...d),p(...d);},e.mediaInteractionCb=(...d)=>{t.mediaInteaction&&t.mediaInteaction(...d),o(...d);},e.styleSheetRuleCb=(...d)=>{t.styleSheetRule&&t.styleSheetRule(...d),h(...d);},e.styleDeclarationCb=(...d)=>{t.styleDeclaration&&t.styleDeclaration(...d),s(...d);},e.canvasMutationCb=(...d)=>{t.canvasMutation&&t.canvasMutation(...d),f(...d);},e.fontCb=(...d)=>{t.font&&t.font(...d),u(...d);},e.selectionCb=(...d)=>{t.selection&&t.selection(...d),l(...d);},e.customElementCb=(...d)=>{t.customElement&&t.customElement(...d),m(...d);};}function qu(e,t={}){let r=e.doc.defaultView;if(!r)return ()=>{};zu(e,t);let i,n=()=>{};e.recordDOM&&([i,n]=So(e,e.doc));let a=Tu(e),c=Au(e),p=Co(e),o=Ou(e,{win:r}),h=Du(e),s=_u(e),f=()=>{},u=()=>{},l=()=>{},m=()=>{};e.recordDOM&&(f=Pu(e,{win:r}),u=Eo(e,e.doc),l=Lu(e,{win:r}),e.collectFonts&&(m=Fu(e)));let d=Uu(e),g=Bu(e),S=[];for(let w of e.plugins)S.push(w.observer(w.callback,r,w.options));return U(()=>{Pe.forEach(w=>w.reset()),i?.disconnect(),n(),a(),c(),p(),o(),h(),s(),f(),u(),l(),m(),d(),g(),S.forEach(w=>w());})}function Ct(e){return typeof window[e]<"u"}function Et(e){return !!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var kt=class{constructor(t){T(this,"iframeIdToRemoteIdMap",new WeakMap),T(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t;}getId(t,r,i,n){let a=i||this.getIdToRemoteIdMap(t),c=n||this.getRemoteIdToIdMap(t),p=a.get(r);return p||(p=this.generateIdFn(),a.set(r,p),c.set(p,r)),p}getIds(t,r){let i=this.getIdToRemoteIdMap(t),n=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,i,n))}getRemoteId(t,r,i){let n=i||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let a=n.get(r);return a||-1}getRemoteIds(t,r){let i=this.getRemoteIdToIdMap(t);return r.map(n=>this.getRemoteId(t,n,i))}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}},Cn=class{constructor(t){T(this,"iframes",new WeakMap),T(this,"crossOriginIframeMap",new WeakMap),T(this,"crossOriginIframeMirror",new kt(qs)),T(this,"crossOriginIframeStyleMirror"),T(this,"crossOriginIframeRootIdMap",new WeakMap),T(this,"mirror"),T(this,"mutationCb"),T(this,"wrappedEmit"),T(this,"loadListener"),T(this,"stylesheetManager"),T(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new kt(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,true),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t);}addLoadListener(t){this.loadListener=t;}attachIframe(t,r){var i,n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((i=t.contentWindow)==null||i.addEventListener("message",this.handleMessage.bind(this))),(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){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let n=this.crossOriginIframeMap.get(t.source);if(!n)return;let a=this.transformCrossOriginEvent(n,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout);}transformCrossOriginEvent(t,r){var i;switch(r.type){case z.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let n=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(r.data.node,n),{timestamp:r.timestamp,type:z.IncrementalSnapshot,data:{source:F.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case z.Meta:case z.Load:case z.DomContentLoaded:return false;case z.Plugin:return r;case z.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case z.IncrementalSnapshot:switch(r.data.source){case F.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);let a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(n.node,a);}),r.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"]);}),r.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"]);}),r.data.texts.forEach(n=>{this.replaceIds(n,t,["id"]);}),r;case F.Drag:case F.TouchMove:case F.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,t,["id"]);}),r;case F.ViewportResize:return false;case F.MediaInteraction:case F.MouseInteraction:case F.Scroll:case F.CanvasMutation:case F.Input:return this.replaceIds(r.data,t,["id"]),r;case F.StyleSheetRule:case F.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case F.Font:return r;case F.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"]);}),r;case F.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(i=r.data.styles)==null||i.forEach(n=>{this.replaceStyleIds(n,t,["styleId"]);}),r}}return false}replace(t,r,i,n){for(let a of n)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(i,r[a]):r[a]=t.getId(i,r[a]));return r}replaceIds(t,r,i){return this.replace(this.crossOriginIframeMirror,t,r,i)}replaceStyleIds(t,r,i){return this.replace(this.crossOriginIframeStyleMirror,t,r,i)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,r);});}patchRootIdOnNode(t,r){t.type!==wo.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,r);});}},En=class{constructor(t){T(this,"shadowDoms",new WeakSet),T(this,"mutationCb"),T(this,"scrollCb"),T(this,"bypassOptions"),T(this,"mirror"),T(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(!Qe(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let[i]=So({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(Co({...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(_.host(t))),this.restoreHandlers.push(Eo({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){let i=this;this.restoreHandlers.push(Ue(t.prototype,"attachShadow",function(n){return function(a){let c=n.call(this,a),p=_.shadowRoot(this);return p&&vo(this)&&i.addShadowRoot(p,r),c}}));}reset(){this.restoreHandlers.forEach(t=>{try{t();}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},Ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$u=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ke=0;Ke<Ve.length;Ke++)$u[Ve.charCodeAt(Ke)]=Ke;var Ke,Wu=function(e){var t=new Uint8Array(e),r,i=t.length,n="";for(r=0;r<i;r+=3)n+=Ve[t[r]>>2],n+=Ve[(t[r]&3)<<4|t[r+1]>>4],n+=Ve[(t[r+1]&15)<<2|t[r+2]>>6],n+=Ve[t[r+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n};var As=new Map;function Hu(e,t){let r=As.get(e);return r||(r=new Map,As.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var xo=(e,t,r)=>{if(!e||!(Mo(e,t)||typeof e=="object"))return;let i=e.constructor.name,n=Hu(r,i),a=n.indexOf(e);return a===-1&&(a=n.length,n.push(e)),a};function xt(e,t,r){if(e instanceof Array)return e.map(i=>xt(i,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){let i=e.constructor.name,n=Wu(e);return {rr_type:i,base64:n}}else {if(e instanceof DataView)return {rr_type:e.constructor.name,args:[xt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let i=e.constructor.name,{src:n}=e;return {rr_type:i,src:n}}else if(e instanceof HTMLCanvasElement){let i="HTMLImageElement",n=e.toDataURL();return {rr_type:i,src:n}}else {if(e instanceof ImageData)return {rr_type:e.constructor.name,args:[xt(e.data,t,r),e.width,e.height]};if(Mo(e,t)||typeof e=="object"){let i=e.constructor.name,n=xo(e,t,r);return {rr_type:i,index:n}}}}return e}var Ro=(e,t,r)=>e.map(i=>xt(i,t,r)),Mo=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof t[n]=="function").find(n=>e instanceof t[n]);function ju(e,t,r,i){let n=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let c of a)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;let p=Ue(t.CanvasRenderingContext2D.prototype,c,function(o){return function(...h){return le(this.canvas,r,i,!0)||setTimeout(()=>{let s=Ro(h,t,this);e(this.canvas,{type:Ge["2D"],property:c,args:s});},0),o.apply(this,h)}});n.push(p);}catch{let p=Ht(t.CanvasRenderingContext2D.prototype,c,{set(o){e(this.canvas,{type:Ge["2D"],property:c,args:[o],setter:true});}});n.push(p);}return ()=>{n.forEach(c=>c());}}function Vu(e){return e==="experimental-webgl"?"webgl":e}function Os(e,t,r,i){let n=[];try{let a=Ue(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(p,...o){if(!le(this,t,r,!0)){let h=Vu(p);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(o[0]&&typeof o[0]=="object"){let s=o[0];s.preserveDrawingBuffer||(s.preserveDrawingBuffer=!0);}else o.splice(0,1,{preserveDrawingBuffer:!0});}return c.apply(this,[p,...o])}});n.push(a);}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{n.forEach(a=>a());}}function ks(e,t,r,i,n,a){let c=[],p=Object.getOwnPropertyNames(e);for(let o of p)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof e[o]!="function")continue;let h=Ue(e,o,function(s){return function(...f){let u=s.apply(this,f);if(xo(u,a,this),"tagName"in this.canvas&&!le(this.canvas,i,n,!0)){let l=Ro(f,a,this),m={type:t,property:o,args:l};r(this.canvas,m);}return u}});c.push(h);}catch{let h=Ht(e,o,{set(s){r(this.canvas,{type:t,property:o,args:[s],setter:true});}});c.push(h);}return c}function Gu(e,t,r,i){let n=[];return typeof t.WebGLRenderingContext<"u"&&n.push(...ks(t.WebGLRenderingContext.prototype,Ge.WebGL,e,r,i,t)),typeof t.WebGL2RenderingContext<"u"&&n.push(...ks(t.WebGL2RenderingContext.prototype,Ge.WebGL2,e,r,i,t)),()=>{n.forEach(a=>a());}}var Io=`(function() {
|
|
53
|
+
or you can use record.mirror to access the mirror instance during recording.`,Os={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We);},has(){return console.error(We),false},reset(){console.error(We);}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Os=new Proxy(Os,{get(e,t,r){return t==="map"&&console.error(We),Reflect.get(e,t,r)}}));function ot(e,t,r={}){let i=null,n=0;return function(...o){let l=Date.now();!n&&r.leading===false&&(n=l);let p=t-(l-n),a=this;p<=0||p>t?(i&&(clearTimeout(i),i=null),n=l,e.apply(a,o)):!i&&r.trailing!==false&&(i=setTimeout(()=>{n=r.leading===false?0:Date.now(),i=null,e.apply(a,o);},p));}}function Vt(e,t,r,i,n=window){let o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?r:{set(l){setTimeout(()=>{r.set.call(this,l);},0),o&&o.set&&o.set.call(this,l);}}),()=>Vt(e,t,o||{},true)}function vo(e){var t,r,i,n;let o=e.document;return {left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||o?.body&&((t=_.parentElement(o.body))==null?void 0:t.scrollLeft)||((r=o?.body)==null?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:o?.documentElement.scrollTop||o?.body&&((i=_.parentElement(o.body))==null?void 0:i.scrollTop)||((n=o?.body)==null?void 0:n.scrollTop)||0}}function wo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function bo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function So(e){return e?e.nodeType===e.ELEMENT_NODE?e:_.parentElement(e):null}function le(e,t,r,i){if(!e)return false;let n=So(e);if(!n)return false;try{if(typeof t=="string"){if(n.classList.contains(t)||i&&n.closest("."+t)!==null)return !0}else if(Ot(n,t,i))return !0}catch{}return !!(r&&(n.matches(r)||i&&n.closest(r)!==null))}function _u(e,t){return t.getId(e)!==-1}function yn(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?true:t.getId(e)===it}function Co(e,t){if(tt(e))return false;let r=t.getId(e);if(!t.has(r))return true;let i=_.parentNode(e);return i&&i.nodeType===e.DOCUMENT_NODE?false:i?Co(i,t):true}function Sn(e){return !!e.changedTouches}function Fu(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);}function Eo(e,t){return !!(e.nodeName==="IFRAME"&&t.getMeta(e))}function xo(e,t){return !!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Cn(e){return e?e instanceof bn&&"shadowRoot"in e?!!e.shadowRoot:!!_.shadowRoot(e):false}var En=class{constructor(){T(this,"id",1),T(this,"styleIDMap",new WeakMap),T(this,"idStyleMap",new Map);}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let i;return r===void 0?i=this.id++:i=r,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 Ro(e){var t;let r=null;return "getRootNode"in e&&((t=_.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(e))&&(r=_.host(_.getRootNode(e))),r}function Uu(e){let t=e,r;for(;r=Ro(t);)t=r;return t}function Bu(e){let t=_.ownerDocument(e);if(!t)return false;let r=Uu(e);return _.contains(t,r)}function Mo(e){let t=_.ownerDocument(e);return t?_.contains(t,e)||Bu(e):false}var q=(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[e.Asset=7]="Asset",e))(q||{}),F=(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))(F||{}),fe=(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))(fe||{}),Ne=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ne||{}),Ye=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ye||{}),He=(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))(He||{});var Io=(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",e))(Io||{});function Ds(e){return "__ln"in e}var xn=class{constructor(){T(this,"length",0),T(this,"head",null),T(this,"tail",null);}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let i=0;i<t;i++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Ds(t.previousSibling)){let i=t.previousSibling.__ln.next;r.next=i,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,i&&(i.previous=r);}else if(t.nextSibling&&Ds(t.nextSibling)&&t.nextSibling.__ln.previous){let i=t.nextSibling.__ln.previous;r.previous=i,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,i&&(i.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){let 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--);}},Ls=(e,t)=>`${e}@${t}`,Rn=class{constructor(){T(this,"frozen",false),T(this,"locked",false),T(this,"texts",[]),T(this,"attributes",[]),T(this,"attributeMap",new WeakMap),T(this,"removes",[]),T(this,"mapRemoves",[]),T(this,"movedMap",{}),T(this,"addedSet",new Set),T(this,"movedSet",new Set),T(this,"droppedSet",new Set),T(this,"removesSubTreeCache",new Set),T(this,"mutationCb"),T(this,"blockClass"),T(this,"blockSelector"),T(this,"maskTextClass"),T(this,"maskTextSelector"),T(this,"inlineStylesheet"),T(this,"maskInputOptions"),T(this,"maskTextFn"),T(this,"maskInputFn"),T(this,"keepIframeSrcFn"),T(this,"recordCanvas"),T(this,"inlineImages"),T(this,"slimDOMOptions"),T(this,"dataURLOptions"),T(this,"doc"),T(this,"mirror"),T(this,"iframeManager"),T(this,"stylesheetManager"),T(this,"shadowDomManager"),T(this,"canvasManager"),T(this,"processedNodeManager"),T(this,"unattachedDoc"),T(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit();}),T(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,i=new xn,n=a=>{let h=a,s=it;for(;s===it;)h=h&&h.nextSibling,s=h&&this.mirror.getId(h);return s},o=a=>{let h=_.parentNode(a);if(!h||!Mo(a))return;let s=false;if(a.nodeType===Node.TEXT_NODE){let m=h.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(h)&&(s=true);}let f=tt(h)?this.mirror.getId(Ro(a)):this.mirror.getId(h),c=n(a);if(f===-1||c===-1)return i.addNode(a);let u=Ve(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,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:m=>{Eo(m,this.mirror)&&this.iframeManager.addIframe(m),xo(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Cn(a)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(a),this.doc);},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d);},cssCaptured:s});u&&(t.push({parentId:f,nextId:c,node:u}),r.add(u.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)Ps(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(_.parentNode(a))||o(a);for(let a of this.addedSet)!_s(this.droppedSet,a)&&!Ps(this.removesSubTreeCache,a,this.mirror)||_s(this.movedSet,a)?o(a):this.droppedSet.add(a);let l=null;for(;i.length;){let a=null;if(l){let h=this.mirror.getId(_.parentNode(l.value)),s=n(l.value);h!==-1&&s!==-1&&(a=l);}if(!a){let h=i.tail;for(;h;){let s=h;if(h=h.previous,s){let f=this.mirror.getId(_.parentNode(s.value));if(n(s.value)===-1)continue;if(f!==-1){a=s;break}else {let u=s.value,m=_.parentNode(u);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=_.host(m);if(this.mirror.getId(d)!==-1){a=s;break}}}}}}if(!a){for(;i.head;)i.removeNode(i.head.value);break}l=a.previous,i.removeNode(a.value),o(a.value);}let p={texts:this.texts.map(a=>{let h=a.node,s=_.parentNode(h);return s&&s.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(s),{id:this.mirror.getId(h),value:a.value}}).filter(a=>!r.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:h}=a;if(typeof h.style=="string"){let s=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);s.length<h.style.length&&(s+f).split("var(").length===h.style.split("var(").length&&(h.style=a.styleDiff);}return {id:this.mirror.getId(a.node),attributes:h}}).filter(a=>!r.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!p.texts.length&&!p.attributes.length&&!p.removes.length&&!p.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(p));}),T(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));let i=Array.from(_.childNodes(t),n=>_.textContent(n)||"").join("");r.attributes.value=Tt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:kt(t),value:i,maskInputFn:this.maskInputFn});}),T(this,"processMutation",t=>{if(!yn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case "characterData":{let r=_.textContent(t.target);!le(t.target,this.blockClass,this.blockSelector,false)&&r!==t.oldValue&&this.texts.push({value:Zs(t.target,this.maskTextClass,this.maskTextSelector,true)&&r?this.maskTextFn?this.maskTextFn(r,So(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case "attributes":{let r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if(i==="value"){let l=kt(r);n=Tt({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:l,value:n,maskInputFn:this.maskInputFn});}if(le(t.target,this.blockClass,this.blockSelector,false)||n===t.oldValue)return;let o=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&i==="src"&&!this.keepIframeSrcFn(n))if(!r.contentDocument)i="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),i==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Ks(r.tagName,i))if(o.attributes[i]=Js(this.doc,Pe(r.tagName),Pe(i),n),i==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch{this.unattachedDoc=this.doc;}let l=this.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(let p of Array.from(r.style)){let a=r.style.getPropertyValue(p),h=r.style.getPropertyPriority(p);a!==l.style.getPropertyValue(p)||h!==l.style.getPropertyPriority(p)?h===""?o.styleDiff[p]=a:o.styleDiff[p]=[a,h]:o._unchangedStyles[p]=[a,h];}for(let p of Array.from(l.style))r.style.getPropertyValue(p)===""&&(o.styleDiff[p]=false);}else i==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case "childList":{if(le(t.target,this.blockClass,this.blockSelector,true))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let i=this.mirror.getId(r),n=tt(t.target)?this.mirror.getId(_.host(t.target)):this.mirror.getId(t.target);le(t.target,this.blockClass,this.blockSelector,false)||yn(r,this.mirror,this.slimDOMOptions)||!_u(r,this.mirror)||(this.addedSet.has(r)?(Mn(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&i===-1||Co(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ls(i,n)]?Mn(this.movedSet,r):(this.removes.push({parentId:n,id:i,isShadow:tt(t.target)&&rt(t.target)?true:void 0}),qu(r,this.removesSubTreeCache))),this.mapRemoves.push(r));});break}}}),T(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(yn(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;r&&this.mirror.hasNode(r)&&(i=this.mirror.getId(r)),i&&i!==-1&&(this.movedMap[Ls(this.mirror.getId(t),i)]=true);}else this.addedSet.add(t),this.droppedSet.delete(t);le(t,this.blockClass,this.blockSelector,false)||(_.childNodes(t).forEach(i=>this.genAdds(i)),Cn(t)&&_.childNodes(_.shadowRoot(t)).forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,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=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function Mn(e,t){e.delete(t),_.childNodes(t).forEach(r=>Mn(e,r));}function qu(e,t){let r=[e];for(;r.length;){let i=r.pop();t.has(i)||(t.add(i),_.childNodes(i).forEach(n=>r.push(n)));}}function Ps(e,t,r){return e.size===0?false:zu(e,t)}function zu(e,t,r){let i=_.parentNode(t);return i?e.has(i):false}function _s(e,t){return e.size===0?false:No(e,t)}function No(e,t){let r=_.parentNode(t);return r?e.has(r)?true:No(e,r):false}var nt;function $u(e){nt=e;}function Wu(){nt=void 0;}var U=e=>nt?(...r)=>{try{return e(...r)}catch(i){if(nt&&nt(i)===true)return;throw i}}:e,Le=[];function ut(e){try{if("composedPath"in e){let 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 To(e,t){let r=new Rn;Le.push(r),r.init(e);let[i,n]=yo(),o=new i(U(r.processMutations.bind(r)));return o.observe(t,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),[o,n]}function Hu({mousemoveCb:e,sampling:t,doc:r,mirror:i}){if(t.mousemove===false)return ()=>{};let n=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,l=[],p,a=ot(U(f=>{let c=Date.now()-p;e(l.map(u=>(u.timeOffset-=c,u)),f),l=[],p=null;}),o),h=U(ot(U(f=>{let c=ut(f),{clientX:u,clientY:m}=Sn(f)?f.changedTouches[0]:f;p||(p=st()),l.push({x:u,y:m,id:i.getId(c),timeOffset:st()-p}),a(typeof DragEvent<"u"&&f instanceof DragEvent?F.Drag:f instanceof MouseEvent?F.MouseMove:F.TouchMove);}),n,{trailing:!1})),s=[ae("mousemove",h,r),ae("touchmove",h,r),ae("drag",h,r)];return U(()=>{s.forEach(f=>f());})}function ju({mouseInteractionCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,sampling:o}){if(o.mouseInteraction===false)return ()=>{};let l=o.mouseInteraction===true||o.mouseInteraction===void 0?{}:o.mouseInteraction,p=[],a=null,h=s=>f=>{let c=ut(f);if(le(c,i,n,true))return;let u=null,m=s;if("pointerType"in f){switch(f.pointerType){case "mouse":u=Ne.Mouse;break;case "touch":u=Ne.Touch;break;case "pen":u=Ne.Pen;break}u===Ne.Touch?fe[s]===fe.MouseDown?m="TouchStart":fe[s]===fe.MouseUp&&(m="TouchEnd"):Ne.Pen;}else Sn(f)&&(u=Ne.Touch);u!==null?(a=u,(m.startsWith("Touch")&&u===Ne.Touch||m.startsWith("Mouse")&&u===Ne.Mouse)&&(u=null)):fe[s]===fe.Click&&(u=a,a=null);let d=Sn(f)?f.changedTouches[0]:f;if(!d)return;let g=r.getId(c),{clientX:S,clientY:y}=d;U(e)({type:fe[m],id:g,x:S,y,...u!==null&&{pointerType:u}});};return Object.keys(fe).filter(s=>Number.isNaN(Number(s))&&!s.endsWith("_Departed")&&l[s]!==false).forEach(s=>{let f=Pe(s),c=h(s);if(window.PointerEvent)switch(fe[s]){case fe.MouseDown:case fe.MouseUp:f=f.replace("mouse","pointer");break;case fe.TouchStart:case fe.TouchEnd:return}p.push(ae(f,c,t));}),U(()=>{p.forEach(s=>s());})}function ko({scrollCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,sampling:o}){let l=U(ot(U(p=>{let a=ut(p);if(!a||le(a,i,n,!0))return;let h=r.getId(a);if(a===t&&t.defaultView){let s=vo(t.defaultView);e({id:h,x:s.left,y:s.top});}else e({id:h,x:a.scrollLeft,y:a.scrollTop});}),o.scroll||100));return ae("scroll",l,t)}function Vu({viewportResizeCb:e},{win:t}){let r=-1,i=-1,n=U(ot(U(()=>{let o=wo(),l=bo();(r!==o||i!==l)&&(e({width:Number(l),height:Number(o)}),r=o,i=l);}),200));return ae("resize",n,t)}var Gu=["INPUT","TEXTAREA","SELECT"],Fs=new WeakMap;function Yu({inputCb:e,doc:t,mirror:r,blockClass:i,blockSelector:n,ignoreClass:o,ignoreSelector:l,maskInputOptions:p,maskInputFn:a,sampling:h,userTriggeredOnInput:s}){function f(y){let b=ut(y),E=y.isTrusted,w=b&&b.tagName;if(b&&w==="OPTION"&&(b=_.parentElement(b)),!b||!w||Gu.indexOf(w)<0||le(b,i,n,true)||b.classList.contains(o)||l&&b.matches(l))return;let v=b.value,C=false,R=kt(b)||"";R==="radio"||R==="checkbox"?C=b.checked:(p[w.toLowerCase()]||p[R])&&(v=Tt({element:b,maskInputOptions:p,tagName:w,type:R,value:v,maskInputFn:a})),c(b,s?{text:v,isChecked:C,userTriggered:E}:{text:v,isChecked:C});let I=b.name;R==="radio"&&I&&C&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(M=>{if(M!==b){let O=M.value;c(M,s?{text:O,isChecked:!C,userTriggered:false}:{text:O,isChecked:!C});}});}function c(y,b){let E=Fs.get(y);if(!E||E.text!==b.text||E.isChecked!==b.isChecked){Fs.set(y,b);let w=r.getId(y);U(e)({...b,id:w});}}let m=(h.input==="last"?["change"]:["input","change"]).map(y=>ae(y,U(f),t)),d=t.defaultView;if(!d)return ()=>{m.forEach(y=>y());};let g=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),S=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...S.map(y=>Vt(y[0],y[1],{set(){U(f)({target:this,isTrusted:false});}},false,d))),U(()=>{m.forEach(y=>y());})}function Dt(e){let t=[];function r(i,n){if(xt("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||xt("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||xt("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||xt("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){let l=Array.from(i.parentRule.cssRules).indexOf(i);return n.unshift(l),r(i.parentRule,n)}else if(i.parentStyleSheet){let l=Array.from(i.parentStyleSheet.cssRules).indexOf(i);n.unshift(l);}return n}return r(e,t)}function Oe(e,t,r){let i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:i}):{}}function Xu({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return ()=>{};let n=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:U((s,f,c)=>{let[u,m]=c,{id:d,styleId:g}=Oe(f,t,r.styleMirror);return (d&&d!==-1||g&&g!==-1)&&e({id:d,styleId:g,adds:[{rule:u,index:m}]}),s.apply(f,c)})}),i.CSSStyleSheet.prototype.addRule=function(s,f,c=this.cssRules.length){let u=`${s} { ${f} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[u,c])};let o=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:U((s,f,c)=>{let[u]=c,{id:m,styleId:d}=Oe(f,t,r.styleMirror);return (m&&m!==-1||d&&d!==-1)&&e({id:m,styleId:d,removes:[{index:u}]}),s.apply(f,c)})}),i.CSSStyleSheet.prototype.removeRule=function(s){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[s])};let l;i.CSSStyleSheet.prototype.replace&&(l=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:U((s,f,c)=>{let[u]=c,{id:m,styleId:d}=Oe(f,t,r.styleMirror);return (m&&m!==-1||d&&d!==-1)&&e({id:m,styleId:d,replace:u}),s.apply(f,c)})}));let p;i.CSSStyleSheet.prototype.replaceSync&&(p=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(p,{apply:U((s,f,c)=>{let[u]=c,{id:m,styleId:d}=Oe(f,t,r.styleMirror);return (m&&m!==-1||d&&d!==-1)&&e({id:m,styleId:d,replaceSync:u}),s.apply(f,c)})}));let a={};Rt("CSSGroupingRule")?a.CSSGroupingRule=i.CSSGroupingRule:(Rt("CSSMediaRule")&&(a.CSSMediaRule=i.CSSMediaRule),Rt("CSSConditionRule")&&(a.CSSConditionRule=i.CSSConditionRule),Rt("CSSSupportsRule")&&(a.CSSSupportsRule=i.CSSSupportsRule));let h={};return Object.entries(a).forEach(([s,f])=>{h[s]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(h[s].insertRule,{apply:U((c,u,m)=>{let[d,g]=m,{id:S,styleId:y}=Oe(u.parentStyleSheet,t,r.styleMirror);return (S&&S!==-1||y&&y!==-1)&&e({id:S,styleId:y,adds:[{rule:d,index:[...Dt(u),g||0]}]}),c.apply(u,m)})}),f.prototype.deleteRule=new Proxy(h[s].deleteRule,{apply:U((c,u,m)=>{let[d]=m,{id:g,styleId:S}=Oe(u.parentStyleSheet,t,r.styleMirror);return (g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...Dt(u),d]}]}),c.apply(u,m)})});}),U(()=>{i.CSSStyleSheet.prototype.insertRule=n,i.CSSStyleSheet.prototype.deleteRule=o,l&&(i.CSSStyleSheet.prototype.replace=l),p&&(i.CSSStyleSheet.prototype.replaceSync=p),Object.entries(a).forEach(([s,f])=>{f.prototype.insertRule=h[s].insertRule,f.prototype.deleteRule=h[s].deleteRule;});})}function Ao({mirror:e,stylesheetManager:t},r){var i,n,o;let l=null;r.nodeName==="#document"?l=e.getId(r):l=e.getId(_.host(r));let p=r.nodeName==="#document"?(i=r.defaultView)==null?void 0:i.Document:(o=(n=r.ownerDocument)==null?void 0:n.defaultView)==null?void 0:o.ShadowRoot,a=p?.prototype?Object.getOwnPropertyDescriptor(p?.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!p||!a?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var h;return (h=a.get)==null?void 0:h.call(this)},set(h){var s;let f=(s=a.set)==null?void 0:s.call(this,h);if(l!==null&&l!==-1)try{t.adoptStyleSheets(h,l);}catch{}return f}}),U(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set});}))}function Ju({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:i},{win:n}){let o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:U((p,a,h)=>{var s;let[f,c,u]=h;if(r.has(f))return o.apply(a,[f,c,u]);let{id:m,styleId:d}=Oe((s=a.parentRule)==null?void 0:s.parentStyleSheet,t,i.styleMirror);return (m&&m!==-1||d&&d!==-1)&&e({id:m,styleId:d,set:{property:f,value:c,priority:u},index:Dt(a.parentRule)}),p.apply(a,h)})});let l=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:U((p,a,h)=>{var s;let[f]=h;if(r.has(f))return l.apply(a,[f]);let{id:c,styleId:u}=Oe((s=a.parentRule)==null?void 0:s.parentStyleSheet,t,i.styleMirror);return (c&&c!==-1||u&&u!==-1)&&e({id:c,styleId:u,remove:{property:f},index:Dt(a.parentRule)}),p.apply(a,h)})}),U(()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=l;})}function Ku({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:i,sampling:n,doc:o}){let l=U(a=>ot(U(h=>{let s=ut(h);if(!s||le(s,t,r,!0))return;let{currentTime:f,volume:c,muted:u,playbackRate:m,loop:d}=s;e({type:a,id:i.getId(s),currentTime:f,volume:c,muted:u,playbackRate:m,loop:d});}),n.media||500)),p=[ae("play",l(He.Play),o),ae("pause",l(He.Pause),o),ae("seeked",l(He.Seeked),o),ae("volumechange",l(He.VolumeChange),o),ae("ratechange",l(He.RateChange),o)];return U(()=>{p.forEach(a=>a());})}function Zu({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return ()=>{};let i=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(a,h,s){let f=new o(a,h,s);return n.set(f,{family:a,buffer:typeof h!="string",descriptors:s,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),f};let l=Ue(t.fonts,"add",function(p){return function(a){return setTimeout(U(()=>{let h=n.get(a);h&&(e(h),n.delete(a));}),0),p.apply(this,[a])}});return i.push(()=>{r.FontFace=o;}),i.push(l),U(()=>{i.forEach(p=>p());})}function Qu(e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,selectionCb:o}=e,l=true,p=U(()=>{let a=t.getSelection();if(!a||l&&a?.isCollapsed)return;l=a.isCollapsed||!1;let h=[],s=a.rangeCount||0;for(let f=0;f<s;f++){let c=a.getRangeAt(f),{startContainer:u,startOffset:m,endContainer:d,endOffset:g}=c;le(u,i,n,!0)||le(d,i,n,!0)||h.push({start:r.getId(u),startOffset:m,end:r.getId(d),endOffset:g});}o({ranges:h});});return p(),ae("selectionchange",p)}function ec({doc:e,customElementCb:t}){let r=e.defaultView;return !r||!r.customElements?()=>{}:Ue(r.customElements,"define",function(n){return function(o,l,p){try{t({define:{name:o}});}catch{console.warn(`Custom element callback failed for ${o}`);}return n.apply(this,[o,l,p])}})}function tc(e,t){let{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:l,inputCb:p,mediaInteractionCb:a,styleSheetRuleCb:h,styleDeclarationCb:s,canvasMutationCb:f,fontCb:c,selectionCb:u,customElementCb:m}=e;e.mutationCb=(...d)=>{t.mutation&&t.mutation(...d),r(...d);},e.mousemoveCb=(...d)=>{t.mousemove&&t.mousemove(...d),i(...d);},e.mouseInteractionCb=(...d)=>{t.mouseInteraction&&t.mouseInteraction(...d),n(...d);},e.scrollCb=(...d)=>{t.scroll&&t.scroll(...d),o(...d);},e.viewportResizeCb=(...d)=>{t.viewportResize&&t.viewportResize(...d),l(...d);},e.inputCb=(...d)=>{t.input&&t.input(...d),p(...d);},e.mediaInteractionCb=(...d)=>{t.mediaInteaction&&t.mediaInteaction(...d),a(...d);},e.styleSheetRuleCb=(...d)=>{t.styleSheetRule&&t.styleSheetRule(...d),h(...d);},e.styleDeclarationCb=(...d)=>{t.styleDeclaration&&t.styleDeclaration(...d),s(...d);},e.canvasMutationCb=(...d)=>{t.canvasMutation&&t.canvasMutation(...d),f(...d);},e.fontCb=(...d)=>{t.font&&t.font(...d),c(...d);},e.selectionCb=(...d)=>{t.selection&&t.selection(...d),u(...d);},e.customElementCb=(...d)=>{t.customElement&&t.customElement(...d),m(...d);};}function rc(e,t={}){let r=e.doc.defaultView;if(!r)return ()=>{};tc(e,t);let i,n=()=>{};e.recordDOM&&([i,n]=To(e,e.doc));let o=Hu(e),l=ju(e),p=ko(e),a=Vu(e,{win:r}),h=Yu(e),s=Ku(e),f=()=>{},c=()=>{},u=()=>{},m=()=>{};e.recordDOM&&(f=Xu(e,{win:r}),c=Ao(e,e.doc),u=Ju(e,{win:r}),e.collectFonts&&(m=Zu(e)));let d=Qu(e),g=ec(e),S=[];for(let y of e.plugins)S.push(y.observer(y.callback,r,y.options));return U(()=>{Le.forEach(y=>y.reset()),i?.disconnect(),n(),o(),l(),p(),a(),h(),s(),f(),c(),u(),m(),d(),g(),S.forEach(y=>y());})}function xt(e){return typeof window[e]<"u"}function Rt(e){return !!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Lt=class{constructor(t){T(this,"iframeIdToRemoteIdMap",new WeakMap),T(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t;}getId(t,r,i,n){let o=i||this.getIdToRemoteIdMap(t),l=n||this.getRemoteIdToIdMap(t),p=o.get(r);return p||(p=this.generateIdFn(),o.set(r,p),l.set(p,r)),p}getIds(t,r){let i=this.getIdToRemoteIdMap(t),n=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,i,n))}getRemoteId(t,r,i){let n=i||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let o=n.get(r);return o||-1}getRemoteIds(t,r){let i=this.getRemoteIdToIdMap(t);return r.map(n=>this.getRemoteId(t,n,i))}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}},In=class{constructor(t){T(this,"iframes",new WeakMap),T(this,"crossOriginIframeMap",new WeakMap),T(this,"crossOriginIframeMirror",new Lt(Xs)),T(this,"crossOriginIframeStyleMirror"),T(this,"crossOriginIframeRootIdMap",new WeakMap),T(this,"mirror"),T(this,"mutationCb"),T(this,"wrappedEmit"),T(this,"loadListener"),T(this,"stylesheetManager"),T(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Lt(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,true),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t);}addLoadListener(t){this.loadListener=t;}attachIframe(t,r){var i,n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((i=t.contentWindow)==null||i.addEventListener("message",this.handleMessage.bind(this))),(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){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let n=this.crossOriginIframeMap.get(t.source);if(!n)return;let o=this.transformCrossOriginEvent(n,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout);}transformCrossOriginEvent(t,r){var i;switch(r.type){case q.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let n=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(r.data.node,n),{timestamp:r.timestamp,type:q.IncrementalSnapshot,data:{source:F.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case q.Meta:case q.Load:case q.DomContentLoaded:return false;case q.Plugin:return r;case q.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case q.IncrementalSnapshot:switch(r.data.source){case F.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(n.node,o);}),r.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"]);}),r.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"]);}),r.data.texts.forEach(n=>{this.replaceIds(n,t,["id"]);}),r;case F.Drag:case F.TouchMove:case F.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,t,["id"]);}),r;case F.ViewportResize:return false;case F.MediaInteraction:case F.MouseInteraction:case F.Scroll:case F.CanvasMutation:case F.Input:return this.replaceIds(r.data,t,["id"]),r;case F.StyleSheetRule:case F.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case F.Font:return r;case F.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"]);}),r;case F.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(i=r.data.styles)==null||i.forEach(n=>{this.replaceStyleIds(n,t,["styleId"]);}),r}}return false}replace(t,r,i,n){for(let o of n)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(i,r[o]):r[o]=t.getId(i,r[o]));return r}replaceIds(t,r,i){return this.replace(this.crossOriginIframeMirror,t,r,i)}replaceStyleIds(t,r,i){return this.replace(this.crossOriginIframeStyleMirror,t,r,i)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,r);});}patchRootIdOnNode(t,r){t.type!==Io.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,r);});}},Nn=class{constructor(t){T(this,"shadowDoms",new WeakSet),T(this,"mutationCb"),T(this,"scrollCb"),T(this,"bypassOptions"),T(this,"mirror"),T(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(!rt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let[i]=To({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(ko({...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(_.host(t))),this.restoreHandlers.push(Ao({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){let i=this;this.restoreHandlers.push(Ue(t.prototype,"attachShadow",function(n){return function(o){let l=n.call(this,o),p=_.shadowRoot(this);return p&&Mo(this)&&i.addShadowRoot(p,r),l}}));}reset(){this.restoreHandlers.forEach(t=>{try{t();}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(et=0;et<Ge.length;et++)nc[Ge.charCodeAt(et)]=et;var et,ic=function(e){var t=new Uint8Array(e),r,i=t.length,n="";for(r=0;r<i;r+=3)n+=Ge[t[r]>>2],n+=Ge[(t[r]&3)<<4|t[r+1]>>4],n+=Ge[(t[r+1]&15)<<2|t[r+2]>>6],n+=Ge[t[r+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n};var Us=new Map;function sc(e,t){let r=Us.get(e);return r||(r=new Map,Us.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var Oo=(e,t,r)=>{if(!e||!(Lo(e,t)||typeof e=="object"))return;let i=e.constructor.name,n=sc(r,i),o=n.indexOf(e);return o===-1&&(o=n.length,n.push(e)),o};function Mt(e,t,r){if(e instanceof Array)return e.map(i=>Mt(i,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){let i=e.constructor.name,n=ic(e);return {rr_type:i,base64:n}}else {if(e instanceof DataView)return {rr_type:e.constructor.name,args:[Mt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let i=e.constructor.name,{src:n}=e;return {rr_type:i,src:n}}else if(e instanceof HTMLCanvasElement){let i="HTMLImageElement",n=e.toDataURL();return {rr_type:i,src:n}}else {if(e instanceof ImageData)return {rr_type:e.constructor.name,args:[Mt(e.data,t,r),e.width,e.height]};if(Lo(e,t)||typeof e=="object"){let i=e.constructor.name,n=Oo(e,t,r);return {rr_type:i,index:n}}}}return e}var Do=(e,t,r)=>e.map(i=>Mt(i,t,r)),Lo=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof t[n]=="function").find(n=>e instanceof t[n]);function oc(e,t,r,i){let n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let l of o)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;let p=Ue(t.CanvasRenderingContext2D.prototype,l,function(a){return function(...h){return le(this.canvas,r,i,!0)||setTimeout(()=>{let s=Do(h,t,this);e(this.canvas,{type:Ye["2D"],property:l,args:s});},0),a.apply(this,h)}});n.push(p);}catch{let p=Vt(t.CanvasRenderingContext2D.prototype,l,{set(a){e(this.canvas,{type:Ye["2D"],property:l,args:[a],setter:true});}});n.push(p);}return ()=>{n.forEach(l=>l());}}function ac(e){return e==="experimental-webgl"?"webgl":e}function Bs(e,t,r,i){let n=[];try{let o=Ue(e.HTMLCanvasElement.prototype,"getContext",function(l){return function(p,...a){if(!le(this,t,r,!0)){let h=ac(p);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(a[0]&&typeof a[0]=="object"){let s=a[0];s.preserveDrawingBuffer||(s.preserveDrawingBuffer=!0);}else a.splice(0,1,{preserveDrawingBuffer:!0});}return l.apply(this,[p,...a])}});n.push(o);}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{n.forEach(o=>o());}}function qs(e,t,r,i,n,o){let l=[],p=Object.getOwnPropertyNames(e);for(let a of p)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof e[a]!="function")continue;let h=Ue(e,a,function(s){return function(...f){let c=s.apply(this,f);if(Oo(c,o,this),"tagName"in this.canvas&&!le(this.canvas,i,n,!0)){let u=Do(f,o,this),m={type:t,property:a,args:u};r(this.canvas,m);}return c}});l.push(h);}catch{let h=Vt(e,a,{set(s){r(this.canvas,{type:t,property:a,args:[s],setter:true});}});l.push(h);}return l}function lc(e,t,r,i){let n=[];return typeof t.WebGLRenderingContext<"u"&&n.push(...qs(t.WebGLRenderingContext.prototype,Ye.WebGL,e,r,i,t)),typeof t.WebGL2RenderingContext<"u"&&n.push(...qs(t.WebGL2RenderingContext.prototype,Ye.WebGL2,e,r,i,t)),()=>{n.forEach(o=>o());}}var Po=`(function() {
|
|
54
54
|
"use strict";
|
|
55
55
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
56
56
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -125,8 +125,8 @@ or you can use record.mirror to access the mirror instance during recording.`,xs
|
|
|
125
125
|
};
|
|
126
126
|
})();
|
|
127
127
|
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
128
|
-
`,Ds=typeof self<"u"&&self.Blob&&new Blob([Io],{type:"text/javascript;charset=utf-8"});function Yu(e){let t;try{if(t=Ds&&(self.URL||self.webkitURL).createObjectURL(Ds),!t)throw "";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t);}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Io),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t);}}var xn=class{constructor(t){T(this,"pendingCanvasMutations",new Map),T(this,"rafStamps",{latestId:0,invokeId:null}),T(this,"mirror"),T(this,"mutationCb"),T(this,"resetObservers"),T(this,"frozen",false),T(this,"locked",false),T(this,"processMutation",(o,h)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(h);});let{sampling:r="all",win:i,blockClass:n,blockSelector:a,recordCanvas:c,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&r==="all"&&this.initCanvasMutationObserver(i,n,a),c&&typeof r=="number"&&this.initCanvasFPSObserver(r,i,n,a,{dataURLOptions:p});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(t,r,i,n,a){let c=Os(r,i,n,true),p=new Map,o=new Yu;o.onmessage=m=>{let{id:d}=m.data;if(p.set(d,false),!("base64"in m.data))return;let{base64:g,type:S,width:w,height:b}=m.data;this.mutationCb({id:d,type:Ge["2D"],commands:[{property:"clearRect",args:[0,0,w,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]});};let h=1e3/t,s=0,f,u=()=>{let m=[];return r.document.querySelectorAll("canvas").forEach(d=>{le(d,i,n,true)||m.push(d);}),m},l=m=>{if(s&&m-s<h){f=requestAnimationFrame(l);return}s=m,u().forEach(async d=>{var g;let S=this.mirror.getId(d);if(p.get(S)||d.width===0||d.height===0)return;if(p.set(S,true),["webgl","webgl2"].includes(d.__context)){let b=d.getContext(d.__context);((g=b?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===false&&b.clear(b.COLOR_BUFFER_BIT);}let w=await createImageBitmap(d);o.postMessage({id:S,bitmap:w,width:d.width,height:d.height,dataURLOptions:a.dataURLOptions},[w]);}),f=requestAnimationFrame(l);};f=requestAnimationFrame(l),this.resetObservers=()=>{c(),cancelAnimationFrame(f);};}initCanvasMutationObserver(t,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=Os(t,r,i,false),a=ju(this.processMutation.bind(this),t,r,i),c=Gu(this.processMutation.bind(this),t,r,i);this.resetObservers=()=>{n(),a(),c();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t);};requestAnimationFrame(t);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let i=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,i);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let i=this.pendingCanvasMutations.get(t);if(!i||r===-1)return;let n=i.map(c=>{let{type:p,...o}=c;return o}),{type:a}=i[0];this.mutationCb({id:r,type:a,commands:n}),this.pendingCanvasMutations.delete(t);}},Rn=class{constructor(t){T(this,"trackedLinkElements",new WeakSet),T(this,"mutationCb"),T(this,"adoptedStyleSheetCb"),T(this,"styleMirror",new vn),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;let i={id:r,styleIds:[]},n=[];for(let a of t){let c;this.styleMirror.has(a)?c=this.styleMirror.getId(a):(c=this.styleMirror.add(a),n.push({styleId:c,rules:Array.from(a.rules||CSSRule,(p,o)=>({rule:Bs(p,a.href),index:o}))})),i.styleIds.push(c);}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(t){}},Mn=class{constructor(){T(this,"nodeMap",new WeakMap),T(this,"active",false);}inOtherBuffer(t,r){let i=this.nodeMap.get(t);return i&&Array.from(i).some(n=>n!==r)}add(t,r){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r));}destroy(){}},te,Rt,dn,Dt=false;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((fi=e.contentWindow)==null?void 0:fi.Array.from)||Array.from,document.body.removeChild(e);}}catch(e){console.debug("Unable to override Array.from",e);}var Se=ll();function Ae(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:n="rr-block",blockSelector:a=null,ignoreClass:c="rr-ignore",ignoreSelector:p=null,maskTextClass:o="rr-mask",maskTextSelector:h=null,inlineStylesheet:s=true,maskAllInputs:f,maskInputOptions:u,slimDOMOptions:l,maskInputFn:m,maskTextFn:d,hooks:g,packFn:S,sampling:w={},dataURLOptions:b={},mousemoveWait:E,recordDOM:v=true,recordCanvas:y=false,recordCrossOriginIframes:C=false,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=false,collectFonts:M=false,inlineImages:k=false,plugins:A,keepIframeSrcFn:x=()=>false,ignoreCSSAttributes:Q=new Set([]),errorHandler:Y}=e;Iu(Y);let P=C?window.parent===window:true,O=false;if(!P)try{window.parent.document&&(O=!1);}catch{O=true;}if(P&&!t)throw new Error("emit function is required");if(!P&&!O)return ()=>{};E!==void 0&&w.mousemove===void 0&&(w.mousemove=E),Se.reset();let B=f===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:u!==void 0?u:{password:true},X=js(l);Cu();let J,L=0,ce=D=>{for(let ee of A||[])ee.eventProcessor&&(D=ee.eventProcessor(D));return S&&!O&&(D=S(D)),D};te=(D,ee)=>{var q;let V=D;if(V.timestamp=rt(),(q=Pe[0])!=null&&q.isFrozen()&&V.type!==z.FullSnapshot&&!(V.type===z.IncrementalSnapshot&&V.data.source===F.Mutation)&&Pe.forEach(he=>he.unfreeze()),P)t?.(ce(V),ee);else if(O){let he={type:"rrweb",event:ce(V),origin:window.location.origin,isCheckout:ee};window.parent.postMessage(he,"*");}if(V.type===z.FullSnapshot)J=V,L=0;else if(V.type===z.IncrementalSnapshot){if(V.data.source===F.Mutation&&V.data.isAttachIframe)return;L++;let he=i&&L>=i,j=r&&V.timestamp-J.timestamp>r;(he||j)&&Rt(true);}};let N=D=>{te({type:z.IncrementalSnapshot,data:{source:F.Mutation,...D}});},re=D=>te({type:z.IncrementalSnapshot,data:{source:F.Scroll,...D}}),H=D=>te({type:z.IncrementalSnapshot,data:{source:F.CanvasMutation,...D}}),me=D=>te({type:z.IncrementalSnapshot,data:{source:F.AdoptedStyleSheet,...D}}),ie=new Rn({mutationCb:N,adoptedStyleSheetCb:me}),oe=new Cn({mirror:Se,mutationCb:N,stylesheetManager:ie,recordCrossOriginIframes:C,wrappedEmit:te});for(let D of A||[])D.getMirror&&D.getMirror({nodeMirror:Se,crossOriginIframeMirror:oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:oe.crossOriginIframeStyleMirror});let xe=new Mn;dn=new xn({recordCanvas:y,mutationCb:H,win:window,blockClass:n,blockSelector:a,mirror:Se,sampling:w.canvas,dataURLOptions:b});let we=new En({mutationCb:N,scrollCb:re,bypassOptions:{blockClass:n,blockSelector:a,maskTextClass:o,maskTextSelector:h,inlineStylesheet:s,maskInputOptions:B,dataURLOptions:b,maskTextFn:d,maskInputFn:m,recordCanvas:y,inlineImages:k,sampling:w,slimDOMOptions:X,iframeManager:oe,stylesheetManager:ie,canvasManager:dn,keepIframeSrcFn:x,processedNodeManager:xe},mirror:Se});Rt=(D=false)=>{if(!v)return;te({type:z.Meta,data:{href:window.location.href,width:fo(),height:co()}},D),ie.reset(),we.init(),Pe.forEach(q=>q.lock());let ee=kl(document,{mirror:Se,blockClass:n,blockSelector:a,maskTextClass:o,maskTextSelector:h,inlineStylesheet:s,maskAllInputs:B,maskTextFn:d,maskInputFn:m,slimDOM:X,dataURLOptions:b,recordCanvas:y,inlineImages:k,onSerialize:q=>{mo(q,Se)&&oe.addIframe(q),go(q,Se)&&ie.trackLinkElement(q),yn(q)&&we.addShadowRoot(_.shadowRoot(q),document);},onIframeLoad:(q,V)=>{oe.attachIframe(q,V),we.observeAttachShadow(q);},onStylesheetLoad:(q,V)=>{ie.attachLinkElement(q,V);},keepIframeSrcFn:x});if(!ee)return console.warn("Failed to snapshot the document");te({type:z.FullSnapshot,data:{node:ee,initialOffset:uo(window)}},D),Pe.forEach(q=>q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ie.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document));};try{let D=[],ee=V=>{var he;return U(qu)({mutationCb:N,mousemoveCb:(j,Xt)=>te({type:z.IncrementalSnapshot,data:{source:Xt,positions:j}}),mouseInteractionCb:j=>te({type:z.IncrementalSnapshot,data:{source:F.MouseInteraction,...j}}),scrollCb:re,viewportResizeCb:j=>te({type:z.IncrementalSnapshot,data:{source:F.ViewportResize,...j}}),inputCb:j=>te({type:z.IncrementalSnapshot,data:{source:F.Input,...j}}),mediaInteractionCb:j=>te({type:z.IncrementalSnapshot,data:{source:F.MediaInteraction,...j}}),styleSheetRuleCb:j=>te({type:z.IncrementalSnapshot,data:{source:F.StyleSheetRule,...j}}),styleDeclarationCb:j=>te({type:z.IncrementalSnapshot,data:{source:F.StyleDeclaration,...j}}),canvasMutationCb:H,fontCb:j=>te({type:z.IncrementalSnapshot,data:{source:F.Font,...j}}),selectionCb:j=>{te({type:z.IncrementalSnapshot,data:{source:F.Selection,...j}});},customElementCb:j=>{te({type:z.IncrementalSnapshot,data:{source:F.CustomElement,...j}});},blockClass:n,ignoreClass:c,ignoreSelector:p,maskTextClass:o,maskTextSelector:h,maskInputOptions:B,inlineStylesheet:s,sampling:w,recordDOM:v,recordCanvas:y,inlineImages:k,userTriggeredOnInput:I,collectFonts:M,doc:V,maskInputFn:m,maskTextFn:d,keepIframeSrcFn:x,blockSelector:a,slimDOMOptions:X,dataURLOptions:b,mirror:Se,iframeManager:oe,stylesheetManager:ie,shadowDomManager:we,processedNodeManager:xe,canvasManager:dn,ignoreCSSAttributes:Q,plugins:((he=A?.filter(j=>j.observer))==null?void 0:he.map(j=>({observer:j.observer,options:j.options,callback:Xt=>te({type:z.Plugin,data:{plugin:j.name,payload:Xt}})})))||[]},g)};oe.addLoadListener(V=>{try{D.push(ee(V.contentDocument));}catch(he){console.warn(he);}});let q=()=>{Rt(),D.push(ee(document)),Dt=!0;};return ["interactive","complete"].includes(document.readyState)?q():(D.push(ae("DOMContentLoaded",()=>{te({type:z.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&q();})),D.push(ae("load",()=>{te({type:z.Load,data:{}}),R==="load"&&q();},window))),()=>{D.forEach(V=>{try{V();}catch(he){String(he).toLowerCase().includes("cross-origin")||console.warn(he);}}),xe.destroy(),Dt=!1,Nu();}}catch(D){console.warn(D);}}Ae.addCustomEvent=(e,t)=>{if(!Dt)throw new Error("please add custom event after start recording");te({type:z.Custom,data:{tag:e,payload:t}});};Ae.freezePage=()=>{Pe.forEach(e=>e.freeze());};Ae.takeFullSnapshot=e=>{if(!Dt)throw new Error("please take full snapshot after start recording");Rt(e);};Ae.mirror=Se;var Ps;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped";})(Ps||(Ps={}));function $(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return (e==="x"?t:t&3|8).toString(16)})}var at=class{constructor(t,r){let i=Date.now();this.startedAt=t??i,this.perfStart=typeof performance<"u"?performance.now():0,this.baseT=Math.max(0,i-this.startedAt,r??0);}now(){let t=typeof performance<"u"?performance.now():Date.now()-this.startedAt;return Math.max(0,this.baseT+Math.round(t-this.perfStart))}wall(){return Date.now()}fromPerf(t){return Math.max(0,this.baseT+Math.round(t-this.perfStart))}};async function No(e){if(typeof crypto<"u"&&crypto.subtle){let r=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(e));return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}let t=0;for(let r=0;r<e.length;r++)t=Math.imul(31,t)+e.charCodeAt(r)|0;return (t>>>0).toString(16)}function To(){let e=navigator.userAgent,t={w:window.innerWidth,h:window.innerHeight},r="desktop";/iPad|Tablet/i.test(e)?r="tablet":/Mobi|Android|iPhone/i.test(e)&&(r="mobile");let i;/Windows/i.test(e)?i="Windows":/Mac OS X|Macintosh/i.test(e)?i="macOS":/Android/i.test(e)?i="Android":/iPhone|iPad|iOS/i.test(e)?i="iOS":/Linux/i.test(e)&&(i="Linux");let n;return /Edg\//.test(e)?n="Edge":/Chrome\//.test(e)?n="Chrome":/Firefox\//.test(e)?n="Firefox":/Safari\//.test(e)&&(n="Safari"),{type:r,os:i,browser:n,viewport:t}}function Hn(){let e=navigator;return e.globalPrivacyControl===true||e.doNotTrack==="1"||window.doNotTrack==="1"}var Xu=3;function Ao(e){let t=Ae({emit(r){let i={id:$(),sessionId:e.sessionId,type:"dom",t:e.clock.fromPerf(Ju()),ts:e.clock.wall(),data:r};e.emit(i),r.type===Xu&&e.markActivity();},maskAllInputs:e.config.maskAllInputs,maskInputOptions:{password:true},maskTextSelector:e.config.maskTextSelector,blockSelector:e.config.blockSelector,recordCanvas:e.config.recordCanvas,checkoutEveryNms:3e4,sampling:{mousemove:50,scroll:150,input:"last"}});return ()=>{try{t?.();}catch{}}}function Ju(){return typeof performance<"u"?performance.now():Date.now()}var Ku=8*1024;function Zu(e){return new Blob([e]).size}function Oo(e,t){if(Zu(e)<=t)return {value:e,truncated:false};let r=Math.max(16,Math.floor(t*.95));return {value:e.slice(0,r),truncated:true}}function ko(e,t=Ku){if(e===null)return {kind:"primitive",value:null};let r=typeof e;if(r==="number"||r==="boolean")return {kind:"primitive",value:e};if(r==="string"){let i=ge(e),{value:n,truncated:a}=Oo(i,t);return {kind:"string",value:n,truncated:a}}if(e instanceof Error)return {kind:"error",name:e.name,message:ge(e.message),stack:e.stack?ge(e.stack):void 0};if(e instanceof Element)return {kind:"dom",selector:Be(e)};if(r==="object"||r==="function"||r==="symbol"||r==="bigint"){let i=dt(e),n,a=false;try{let c=JSON.stringify(i,Qu()),p=Oo(c??"undefined",t);n=p.value,a=p.truncated;}catch{n=void 0;}return {kind:"object",preview:ec(i),json:n,truncated:a}}return {kind:"primitive",value:String(e)}}function Qu(){let e=new WeakSet;return (t,r)=>{if(typeof r=="bigint")return `${r.toString()}n`;if(typeof r=="function")return `\u0192 ${r.name||"anonymous"}`;if(typeof r=="object"&&r!==null){if(e.has(r))return "\xABcircular\xBB";e.add(r);}return r}}function ec(e){if(Array.isArray(e))return `Array(${e.length})`;if(e&&typeof e=="object"){let t=Object.keys(e);return `{ ${t.slice(0,4).join(", ")}${t.length>4?", \u2026":""} }`}return String(e)}function Be(e){let t=[],r=e,i=0;for(;r&&r.nodeType===1&&i<5;){let n=r.tagName.toLowerCase();if(r.id){n+=`#${r.id}`,t.unshift(n);break}let a=(r.getAttribute("class")||"").trim().split(/\s+/).filter(Boolean)[0];a&&(n+=`.${a}`),t.unshift(n),r=r.parentElement,i++;}return t.join(" > ")}function jt(e){if(!e)return;let t=e.split(`
|
|
129
|
-
`).map(r=>r.trim());for(let r of t){let i=r.match(/\((https?:\/\/[^)]+):(\d+):(\d+)\)/)||r.match(/at (https?:\/\/\S+):(\d+):(\d+)/)||r.match(/(https?:\/\/\S+):(\d+):(\d+)/);if(i)return {url:i[1],line:Number(i[2]),col:Number(i[3])}}}var Do=["log","info","warn","error","debug"],tc=100;function Po(e){let t={},r=e.clock.now(),i=0,n=0;function a(){let p=e.clock.now();return p-r>=1e3&&(n>0&&(c("warn",[{kind:"string",value:`Obsrviq: suppressed ${n} console messages (flood cap)`}]),n=0),r=p,i=0),i>=tc?(n++,true):(i++,false)}function c(p,o,h){let s=jt(h),f={id:$(),sessionId:e.sessionId,type:"console",t:e.clock.now(),ts:e.clock.wall(),level:p,args:o,stack:p==="error"?h:void 0,source:s};e.emit(f);}for(let p of Do){let o=console[p];t[p]=o,console[p]=(...h)=>{try{o.apply(console,h);}catch{}try{if(a())return;let s=h.map(u=>ko(u,e.config.maxArgBytes)),f;p==="error"&&(f=h.find(l=>l instanceof Error)?.stack??new Error().stack),c(p,s,f);}catch{}};}return ()=>{for(let p of Do)t[p]&&(console[p]=t[p]);}}function Lo(e,t){return {id:$(),sessionId:e.sessionId,type:"console",t:t.t,ts:t.ts,level:"error",args:[{kind:"error",name:t.name,message:t.message,stack:t.stack}],stack:t.stack,source:t.source}}var _o=4*1024,Uo=new Set(["content-type","content-length","accept","accept-encoding","cache-control","etag","last-modified","content-encoding","x-request-id","x-correlation-id","server","vary"]);function Gt(e){try{let t=new URL(e,location.href);return t.search&&(t.search="?\u2026"),t.toString()}catch{return e.split("?")[0]??e}}function Bo(e){if(e===0)return "network";if(e>=500)return "http_5xx";if(e>=400)return "http_4xx"}function jn(e,t){let r={},i=new Set(e.map(n=>n.toLowerCase()));for(let[n,a]of t){let c=n.toLowerCase();i.has(c)?r[c]="redacted":Uo.has(c)&&(r[c]=a);}return r}function Vt(e,t){if(e==null)return;let r=ge(e),i=r.length>_o;return {contentType:t,preview:i?r.slice(0,_o):r,truncated:i,redacted:r!==e}}function zo(){return typeof performance<"u"?performance.now():0}function rc(e){try{return new URL(e,typeof location<"u"?location.href:void 0).href}catch{return e}}function Fo(e,t){let r={...t},i=n=>Math.round(n);return e.domainLookupStart>0&&e.domainLookupEnd>e.domainLookupStart&&(r.dns=i(e.domainLookupEnd-e.domainLookupStart)),e.connectStart>0&&e.connectEnd>e.connectStart&&(r.tcp=i(e.connectEnd-e.connectStart)),e.secureConnectionStart>0&&e.connectEnd>e.secureConnectionStart&&(r.tls=i(e.connectEnd-e.secureConnectionStart)),e.requestStart>0&&e.responseStart>e.requestStart&&(r.ttfb=i(e.responseStart-e.requestStart)),e.responseStart>0&&e.responseEnd>e.responseStart&&(r.download=i(e.responseEnd-e.responseStart)),r}function nc(e,t,r){let i,n=1/0;for(let a of r){if(a.name!==e||a.startTime<t-4)continue;let c=a.startTime-t;c<n&&(n=c,i=a);}return i}var ic=300;function sc(){let e=[],t,r=()=>{if(t){try{t.disconnect();}catch{}t=void 0;}},i=(c,p)=>{let o=e.indexOf(c);o!==-1&&(e.splice(o,1),clearTimeout(c.timer),c.resolve(p),e.length===0&&r());},n=c=>{for(let p of c){let o,h=1/0;for(let s of e){if(p.name!==s.name||p.startTime<s.perfStart-4)continue;let f=p.startTime-s.perfStart;f<h&&(h=f,o=s);}o&&i(o,Fo(p,o.base));}},a=()=>{if(!(t||typeof PerformanceObserver>"u"))try{t=new PerformanceObserver(c=>n(c.getEntries())),t.observe({type:"resource",buffered:!1});}catch{t=void 0;}};return {resolve(c,p,o){if(typeof performance>"u")return Promise.resolve(o);let h=rc(c);try{let s=performance.getEntriesByType("resource"),f=nc(h,p,s);if(f)return Promise.resolve(Fo(f,o))}catch{}return typeof PerformanceObserver>"u"?Promise.resolve(o):new Promise(s=>{let f={name:h,perfStart:p,base:o,resolve:s,timer:setTimeout(()=>i(f,o),ic)};e.push(f),a();})},flushPending(){for(let c of [...e])i(c,c.base);},teardown(){this.flushPending(),r();}}}function qo(e){let t=sc(),r=()=>t.flushPending(),i=()=>{typeof document<"u"&&document.visibilityState==="hidden"&&t.flushPending();};typeof window<"u"&&window.addEventListener("pagehide",r),typeof document<"u"&&document.addEventListener("visibilitychange",i);let n=[];return n.push(oc(e,t)),n.push(lc(e,t)),n.push(fc(e)),n.push(dc(e)),n.push(()=>{typeof window<"u"&&window.removeEventListener("pagehide",r),typeof document<"u"&&document.removeEventListener("visibilitychange",i),t.teardown();}),()=>n.forEach(a=>a())}function oc(e,t){let r=window.fetch;return r?(window.fetch=async function(i,n){let a=i instanceof Request?i.url:String(i);if(a.includes("/v1/batch")||a.includes("/v1/config"))return r.call(window,i,n);let c=e.clock.now(),p=zo(),o=(n?.method||(i instanceof Request?i.method:"GET")).toUpperCase(),h=Gt(a),s=jn(e.config.redactHeaders,pc(n?.headers??(i instanceof Request?i.headers:void 0))),f=u=>{let l=e.clock.now(),m={startT:c,endT:l,duration:l-c};e.markActivity(),t.resolve(a,p,m).then(d=>{let g={id:$(),sessionId:e.sessionId,type:"network",t:c,ts:e.clock.wall(),initiator:"fetch",method:o,url:h,status:0,ok:false,resourceType:"fetch",requestHeaders:s,timing:d,...u};e.emit(g);});};try{let u=await r.call(window,i,n),l=u.status,m=jn(e.config.redactHeaders,u.headers.entries()),d=u.headers.get("content-length"),g;if(e.config.captureNetworkBodies&&$o(u.headers.get("content-type")))try{let S=await u.clone().text();g=Vt(S,u.headers.get("content-type")||void 0);}catch{}return f({status:l,ok:u.ok,responseSize:d?Number(d):void 0,responseHeaders:m,requestBody:e.config.captureNetworkBodies?Vt(Wo(n?.body),void 0):void 0,responseBody:g,error:Bo(l)}),u}catch(u){throw f({status:0,ok:false,error:ac(u)}),u}},()=>{window.fetch=r;}):()=>{}}function ac(e){if(e?.name==="AbortError")return "aborted";let r=String(e?.message||"").toLowerCase();return r.includes("cors")?"cors":r.includes("timeout")?"timeout":"network"}function lc(e,t){let r=XMLHttpRequest.prototype,i=r.open,n=r.send,a=r.setRequestHeader,c=new WeakMap;return r.open=function(p,o,...h){let s=String(o);return c.set(this,{method:String(p).toUpperCase(),rawUrl:s,url:Gt(s),startT:0,perfStart:0,reqHeaders:{}}),i.apply(this,[p,o,...h])},r.setRequestHeader=function(p,o){let h=c.get(this);if(h){let s=p.toLowerCase();e.config.redactHeaders.map(f=>f.toLowerCase()).includes(s)?h.reqHeaders[s]="redacted":Uo.has(s)&&(h.reqHeaders[s]=o);}return a.apply(this,[p,o])},r.send=function(p){let o=c.get(this);if(o){o.startT=e.clock.now(),o.perfStart=zo(),e.config.captureNetworkBodies&&(o.body=Wo(p));let h=s=>{let f=e.clock.now(),u={startT:o.startT,endT:f,duration:f-o.startT},l=this.status,m=cc(e,this.getAllResponseHeaders()),d;if(e.config.captureNetworkBodies&&$o(this.getResponseHeader("content-type")))try{(this.responseType===""||this.responseType==="text")&&(d=Vt(this.responseText,this.getResponseHeader("content-type")||void 0));}catch{}let g=uc(this);e.markActivity(),t.resolve(o.rawUrl,o.perfStart,u).then(S=>{let w={id:$(),sessionId:e.sessionId,type:"network",t:o.startT,ts:e.clock.wall(),initiator:"xhr",method:o.method,url:o.url,status:l,ok:l>=200&&l<400,resourceType:"xhr",requestHeaders:o.reqHeaders,responseHeaders:m,responseSize:g,requestBody:e.config.captureNetworkBodies?Vt(o.body,void 0):void 0,responseBody:d,timing:S,error:s||Bo(l)};e.emit(w);});};this.addEventListener("loadend",()=>h()),this.addEventListener("error",()=>h("network")),this.addEventListener("timeout",()=>h("timeout")),this.addEventListener("abort",()=>h("aborted"));}return n.apply(this,[p])},()=>{r.open=i,r.send=n,r.setRequestHeader=a;}}function uc(e){try{if(e.responseType===""||e.responseType==="text")return new Blob([e.responseText]).size}catch{}let t=e.getResponseHeader("content-length");return t?Number(t):void 0}function cc(e,t){let r=[];for(let i of t.trim().split(/[\r\n]+/)){let n=i.indexOf(":");n>0&&r.push([i.slice(0,n).trim(),i.slice(n+1).trim()]);}return jn(e.config.redactHeaders,r)}function fc(e){let t=navigator.sendBeacon;return t?(navigator.sendBeacon=function(r,i){let n=e.clock.now(),a=false;try{a=t.call(navigator,r,i);}finally{let c=String(r);if(!c.includes("/v1/batch")){let p={id:$(),sessionId:e.sessionId,type:"network",t:n,ts:e.clock.wall(),initiator:"beacon",method:"POST",url:Gt(c),status:a?202:0,ok:a,resourceType:"other",timing:{startT:n,endT:e.clock.now(),duration:0},error:a?void 0:"network"};e.emit(p);}}return a},()=>{navigator.sendBeacon=t;}):()=>{}}var hc={script:"script",link:"stylesheet",css:"stylesheet",img:"image",image:"image",font:"font",audio:"media",video:"media",track:"media"};function dc(e){if(typeof PerformanceObserver>"u")return ()=>{};let t;try{t=new PerformanceObserver(r=>{for(let i of r.getEntries()){let n=i.initiatorType;if(n==="fetch"||n==="xmlhttprequest"||n==="beacon")continue;let a=hc[n]||"other",c=e.clock.fromPerf(i.startTime),p=e.clock.fromPerf(i.responseEnd||i.startTime),o={startT:c,endT:p,duration:Math.max(0,p-c),dns:lt(i.domainLookupEnd-i.domainLookupStart),tcp:lt(i.connectEnd-i.connectStart),tls:i.secureConnectionStart?lt(i.connectEnd-i.secureConnectionStart):void 0,ttfb:lt(i.responseStart-i.requestStart),download:lt(i.responseEnd-i.responseStart)},h={id:$(),sessionId:e.sessionId,type:"network",t:c,ts:e.clock.wall(),initiator:"resource",method:"GET",url:Gt(i.name),status:i.responseStatus||200,ok:!i.responseStatus||i.responseStatus<400,resourceType:a,responseSize:i.transferSize||i.encodedBodySize||void 0,timing:o};e.emit(h);}}),t.observe({type:"resource",buffered:!0});}catch{return ()=>{}}return ()=>t?.disconnect()}function lt(e){return Number.isFinite(e)&&e>0?Math.round(e):void 0}function $o(e){return e?/json|text|xml|x-www-form-urlencoded/i.test(e):false}function Wo(e){if(e!=null){if(typeof e=="string")return e;if(e instanceof URLSearchParams)return e.toString();if(e instanceof FormData){let t={};return e.forEach((r,i)=>t[i]=typeof r=="string"?r:"\xABfile\xBB"),JSON.stringify(t)}try{return JSON.stringify(e)}catch{return}}}function pc(e){return e?e instanceof Headers?e.entries():Array.isArray(e)?e:Object.entries(e):[]}var Ho=4*1024;function mc(e){try{let t=new URL(e,location.href);return t.search&&(t.search="?\u2026"),t.toString()}catch{return e.split("?")[0]??e}}function gc(e){try{return new TextEncoder().encode(e).length}catch{return e.length}}function jo(e,t){if(typeof e=="string"){let i={encoding:"text",size:gc(e)};if(t){let n=ge(e),a=n.length>Ho;i.body={preview:a?n.slice(0,Ho):n,truncated:a,redacted:n!==e};}return i}let r=0;return typeof Blob<"u"&&e instanceof Blob?r=e.size:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(r=e.byteLength),{encoding:"binary",size:r}}function Vo(e){let t=typeof window<"u"?window.WebSocket:void 0;if(!t)return ()=>{};let r=n=>{try{let a={id:$(),sessionId:e.sessionId,type:"ws",t:e.clock.now(),ts:e.clock.wall(),...n};e.emit(a);}catch{}};class i extends t{constructor(a,c){super(a,c);try{let p=$(),o=mc(String(a)),h=c?Array.isArray(c)?c:[c]:void 0,s=e.config.captureNetworkBodies;this.addEventListener("open",()=>r({connId:p,url:o,kind:"open",protocols:h})),this.addEventListener("close",u=>r({connId:p,url:o,kind:"close",code:u.code,reason:u.reason||void 0,wasClean:u.wasClean})),this.addEventListener("error",()=>r({connId:p,url:o,kind:"error"})),this.addEventListener("message",u=>{let l=jo(u.data,s);r({connId:p,url:o,kind:"message",dir:"recv",...l}),e.markActivity();});let f=super.send.bind(this);this.send=u=>{f(u);try{let l=jo(u,s);r({connId:p,url:o,kind:"message",dir:"send",...l}),e.markActivity();}catch{}};}catch{}}}return window.WebSocket=i,()=>{window.WebSocket=t;}}function Go(e){function t(n){let a={id:$(),sessionId:e.sessionId,type:"error",t:e.clock.now(),ts:e.clock.wall(),name:n.name,message:ge(n.message),stack:n.stack?ge(n.stack):void 0,source:n.source,handled:n.handled};e.emit(a),e.emit(Lo(e,a));}let r=n=>{let a=n.error;t({name:a?.name||"Error",message:a?.message||n.message||"Unknown error",stack:a?.stack,source:{url:n.filename,line:n.lineno,col:n.colno},handled:false});},i=n=>{let a=n.reason;a instanceof Error?t({name:a.name,message:a.message,stack:a.stack,source:jt(a.stack),handled:false}):t({name:"UnhandledRejection",message:typeof a=="string"?a:yc(a),handled:false});};return window.addEventListener("error",r,true),window.addEventListener("unhandledrejection",i,true),()=>{window.removeEventListener("error",r,true),window.removeEventListener("unhandledrejection",i,true);}}function yc(e){try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function vc(e,t){let i={LCP:[2500,4e3],INP:[200,500],CLS:[.1,.25],FCP:[1800,3e3],TTFB:[800,1800]}[e];if(i)return t<=i[0]?"good":t<=i[1]?"needs-improvement":"poor"}function Yo(e){if(typeof PerformanceObserver>"u")return ()=>{};let t=[],r=(h,s,f)=>{let u={id:$(),sessionId:e.sessionId,type:"perf",t:e.clock.now(),ts:e.clock.wall(),metric:h,value:Math.round(s*1e3)/1e3,rating:vc(h,s),detail:f};e.emit(u);},i=(h,s,f)=>{try{let u=new PerformanceObserver(l=>s(l.getEntries()));u.observe({type:h,buffered:!0,...f}),t.push(u);}catch{}};i("paint",h=>{for(let s of h)s.name==="first-contentful-paint"&&r("FCP",s.startTime);});let n=0;i("largest-contentful-paint",h=>{let s=h[h.length-1];s&&(n=s.startTime);});let a=0;i("layout-shift",h=>{for(let s of h)s.hadRecentInput||(a+=s.value);});let c=0;i("event",h=>{for(let s of h)s.duration>c&&(c=s.duration);},{durationThreshold:40}),i("navigation",h=>{let s=h[0];s&&(r("TTFB",s.responseStart),r("navigation",s.duration,{domInteractive:Math.round(s.domInteractive),domComplete:Math.round(s.domComplete),loadEvent:Math.round(s.loadEventEnd)}));});let p=()=>{n&&r("LCP",n),r("CLS",a),c&&r("INP",c);},o=()=>{document.visibilityState==="hidden"&&p();};return document.addEventListener("visibilitychange",o,true),()=>{t.forEach(h=>h.disconnect()),document.removeEventListener("visibilitychange",o,true);}}var Xo=1e3,wc=3,bc=3e3;function Sc(e){if(!e)return false;let t=e;for(let r=0;r<4&&t;r++){let i=t.tagName.toLowerCase();if(["a","button","input","select","textarea","label","summary"].includes(i)||t.getAttribute("role")==="button"||t.hasAttribute("onclick")||t.getAttribute("contenteditable")==="true")return true;t=t.parentElement;}return false}function Jo(e){let t=[],r=-1/0,i=(a,c,p)=>{let o={id:$(),sessionId:e.sessionId,type:"custom",t:p,ts:e.clock.wall(),name:a,props:c};e.emit(o);},n=a=>{let c=a.target;if(!c||!(c instanceof Element))return;let p=e.clock.now(),o=Be(c);{let s=c.getBoundingClientRect(),f=s.width>0?Math.min(1,Math.max(0,(a.clientX-s.left)/s.width)):.5,u=s.height>0?Math.min(1,Math.max(0,(a.clientY-s.top)/s.height)):.5,l=(c.textContent||"").replace(/\s+/g," ").trim().slice(0,40);i("_click",{selector:o,path:location.pathname,vw:window.innerWidth,vh:window.innerHeight,rx:Math.round(f*1e3)/1e3,ry:Math.round(u*1e3)/1e3,tag:c.tagName.toLowerCase(),label:l},p);}t=t.filter(s=>p-s.t<=Xo),t.push({el:c,t:p});let h=t.filter(s=>s.el===c);if(h.length>=wc&&p-r>Xo&&(r=p,i("rage_click",{selector:o,count:h.length},p)),!Sc(c)){let s=e.lastActivityT();window.setTimeout(()=>{e.lastActivityT()<=Math.max(s,p)&&i("dead_click",{selector:o},p);},bc);}};return window.addEventListener("click",n,true),()=>window.removeEventListener("click",n,true)}var Qo=new Set(["INPUT","TEXTAREA","SELECT"]),Cc=new Set(["hidden","submit","button","reset","image","file"]),Ko=80,Vn=60,Ec=3e5,xc=100;function Rc(e){return !(!(e instanceof HTMLElement)||!Qo.has(e.tagName)||e instanceof HTMLInputElement&&Cc.has(e.type))}function Mc(e){return e instanceof HTMLTextAreaElement?"textarea":e instanceof HTMLSelectElement?"select":e.type||"text"}function Ic(e){return e instanceof HTMLInputElement?e.type==="checkbox"||e.type==="radio"?e.checked:e.value.trim().length>0:e instanceof HTMLSelectElement?e.value!=="":e.value.trim().length>0}function ue(e){let t=e.trim().replace(/\s+/g," ");return t.length>Ko?t.slice(0,Ko):t}function Nc(e){let t=e.getAttribute("name");if(t)return ue(t);if(e.id)return ue(e.id);let r=e.getAttribute("aria-label");if(r)return ue(r);let i=e.getAttribute("aria-labelledby");if(i){let a=i.split(/\s+/).map(c=>e.ownerDocument.getElementById(c)?.textContent||"").join(" ").trim();if(a)return ue(a)}if(e.labels&&e.labels.length){let a=e.labels[0].textContent?.trim();if(a)return ue(a)}let n=e.getAttribute("placeholder");return ue(n||Be(e))}function Oe(e){if(!e)return;let t=e.trim().replace(/\s+/g," ");if(t)return t.length>Vn?t.slice(0,Vn):t}function Tc(e){if(e.labels&&e.labels.length){let n=Oe(e.labels[0].textContent);if(n)return n}let t=Oe(e.getAttribute("aria-label"));if(t)return t;let r=e.previousElementSibling;for(let n=0;r&&n<3;n++,r=r.previousElementSibling){if(Qo.has(r.tagName)||/^(BUTTON|SCRIPT|STYLE|SVG)$/.test(r.tagName))continue;let a=Oe(r.textContent);if(a)return a}let i=e.parentElement;if(i){let n=Oe(Array.from(i.childNodes).filter(c=>c.nodeType===3).map(c=>c.textContent||"").join(" "));if(n)return n;let a=Oe(i.querySelector("label,legend")?.textContent);if(a)return a}return Oe(e.getAttribute("placeholder"))}function Ac(e){let t=e.closest('form,fieldset,section,[role="form"],[role="group"]');if(t){let r=Oe(t.querySelector('legend,h1,h2,h3,h4,[role="heading"]')?.textContent);if(r)return r;let i=Oe(t.getAttribute("aria-label"));if(i)return i}return Oe(typeof document<"u"?document.title:void 0)}function Oc(e){let t={},r=(e.getAttribute("autocomplete")||"").trim().toLowerCase();r&&r!=="off"&&r!=="on"&&(t.autocomplete=r.slice(0,Vn));let i=Tc(e);i&&(t.near=i);let n=Ac(e);return n&&(t.formTitle=n),t}function Zo(e){let t=e.form;if(t){if(t.getAttribute("name"))return ue(t.getAttribute("name"));if(t.id)return ue(t.id);let r=t.getAttribute("aria-label");if(r)return ue(r);let i=t.getAttribute("action");if(i)try{return ue(new URL(i,location.href).pathname)}catch{return ue(i)}return ue(Be(t))}return ue(`page:${location.pathname}`)}function ea(e){let t=e.config.blockSelector,r=null,i=(s,f)=>{let u={id:$(),sessionId:e.sessionId,type:"custom",t:e.clock.now(),ts:e.clock.wall(),name:s,props:f};e.emit(u);},n=s=>{try{return !!t&&!!s.closest(t)}catch{return false}},a=()=>{if(!r)return;let{el:s,start:f,changed:u}=r;r=null;let l=Math.min(Ec,Math.max(0,e.clock.now()-f));l<xc&&!u||i("form_field",{form:Zo(s),field:Nc(s),type:Mc(s),ms:l,changed:u,filled:Ic(s),...Oc(s)});},c=s=>{let f=s.target;!Rc(f)||n(f)||(r&&r.el!==f&&a(),r={el:f,start:e.clock.now(),changed:false});},p=s=>{r&&s.target===r.el&&(r.changed=true);},o=s=>{r&&s.target===r.el&&a();},h=s=>{let f=s.target;if(!(f instanceof HTMLFormElement)||n(f))return;a();let u=f.querySelector("input,textarea,select"),l=u&&!n(u)?Zo(u):ue(f.getAttribute("name")||f.id||Be(f));i("form_submit",{form:l});};return document.addEventListener("focusin",c,true),document.addEventListener("focusout",o,true),document.addEventListener("input",p,true),document.addEventListener("submit",h,true),window.addEventListener("pagehide",a,true),()=>{a(),document.removeEventListener("focusin",c,true),document.removeEventListener("focusout",o,true),document.removeEventListener("input",p,true),document.removeEventListener("submit",h,true),window.removeEventListener("pagehide",a,true);}}function ta(e){let t=location.pathname,r=0,i=false,n=(o,h,s)=>{let f={id:$(),sessionId:e.sessionId,type:"custom",t:e.clock.now(),ts:e.clock.wall(),name:"_scroll",props:{path:t,depth:o,h,vh:s}};e.emit(f);},a=()=>{let o=document.documentElement,h=document.body;return Math.max(o.scrollHeight,h?h.scrollHeight:0,o.clientHeight)||1},c=()=>{i=false,location.pathname!==t&&(t=location.pathname,r=0);let o=window.innerHeight||document.documentElement.clientHeight||1,h=a(),s=Math.min(1,(window.scrollY+o)/h),f=Math.min(100,Math.round(s*10)*10);f>r&&(r=f,n(f,h,o));},p=()=>{i||(i=true,requestAnimationFrame(c));};return window.addEventListener("scroll",p,{passive:true,capture:true}),c(),()=>{window.removeEventListener("scroll",p,true);}}function ra(e){let t=null,r=()=>{let p=location.hash;return location.pathname+(p.startsWith("#/")?p:"")},i=()=>{let p=r();if(p===t)return;let o=t??"";t=p;let h={id:$(),sessionId:e.sessionId,type:"pageview",t:e.clock.now(),ts:e.clock.wall(),url:location.href,path:p,title:document.title||void 0,referrer:o||void 0};e.emit(h),e.markActivity();},n=history.pushState,a=history.replaceState,c=p=>function(h,s,f){let u=p.call(this,h,s,f);return queueMicrotask(i),u};return history.pushState=c(n),history.replaceState=c(a),window.addEventListener("popstate",i),window.addEventListener("hashchange",i),i(),()=>{history.pushState=n,history.replaceState=a,window.removeEventListener("popstate",i),window.removeEventListener("hashchange",i);}}function kc(e){let t=/\.([A-Za-z0-9_-]+)/.exec(e||"");return ["obsrviq-block",t&&t[1]?t[1]:""].filter(Boolean).join(" ")}function na(e){let t=document.createElement("div");t.className=kc(e),t.setAttribute("data-obsrviq-ui",""),t.style.cssText="all:initial";let r=t.attachShadow({mode:"open"});return {host:t,root:r}}function ia(e,t){try{let r=new CSSStyleSheet;r.replaceSync(t),e.adoptedStyleSheets=[r];}catch{let r=document.createElement("style");r.textContent=t,e.appendChild(r);}}function sa(e){(document.body||document.documentElement).appendChild(e);}var Gn="#6e76f1",Dc=`
|
|
128
|
+
`,zs=typeof self<"u"&&self.Blob&&new Blob([Po],{type:"text/javascript;charset=utf-8"});function uc(e){let t;try{if(t=zs&&(self.URL||self.webkitURL).createObjectURL(zs),!t)throw "";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t);}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Po),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t);}}var Tn=class{constructor(t){T(this,"pendingCanvasMutations",new Map),T(this,"rafStamps",{latestId:0,invokeId:null}),T(this,"mirror"),T(this,"mutationCb"),T(this,"resetObservers"),T(this,"frozen",false),T(this,"locked",false),T(this,"processMutation",(a,h)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(h);});let{sampling:r="all",win:i,blockClass:n,blockSelector:o,recordCanvas:l,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,l&&r==="all"&&this.initCanvasMutationObserver(i,n,o),l&&typeof r=="number"&&this.initCanvasFPSObserver(r,i,n,o,{dataURLOptions:p});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(t,r,i,n,o){let l=Bs(r,i,n,true),p=new Map,a=new uc;a.onmessage=m=>{let{id:d}=m.data;if(p.set(d,false),!("base64"in m.data))return;let{base64:g,type:S,width:y,height:b}=m.data;this.mutationCb({id:d,type:Ye["2D"],commands:[{property:"clearRect",args:[0,0,y,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]});};let h=1e3/t,s=0,f,c=()=>{let m=[];return r.document.querySelectorAll("canvas").forEach(d=>{le(d,i,n,true)||m.push(d);}),m},u=m=>{if(s&&m-s<h){f=requestAnimationFrame(u);return}s=m,c().forEach(async d=>{var g;let S=this.mirror.getId(d);if(p.get(S)||d.width===0||d.height===0)return;if(p.set(S,true),["webgl","webgl2"].includes(d.__context)){let b=d.getContext(d.__context);((g=b?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===false&&b.clear(b.COLOR_BUFFER_BIT);}let y=await createImageBitmap(d);a.postMessage({id:S,bitmap:y,width:d.width,height:d.height,dataURLOptions:o.dataURLOptions},[y]);}),f=requestAnimationFrame(u);};f=requestAnimationFrame(u),this.resetObservers=()=>{l(),cancelAnimationFrame(f);};}initCanvasMutationObserver(t,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=Bs(t,r,i,false),o=oc(this.processMutation.bind(this),t,r,i),l=lc(this.processMutation.bind(this),t,r,i);this.resetObservers=()=>{n(),o(),l();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t);};requestAnimationFrame(t);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let i=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,i);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let i=this.pendingCanvasMutations.get(t);if(!i||r===-1)return;let n=i.map(l=>{let{type:p,...a}=l;return a}),{type:o}=i[0];this.mutationCb({id:r,type:o,commands:n}),this.pendingCanvasMutations.delete(t);}},kn=class{constructor(t){T(this,"trackedLinkElements",new WeakSet),T(this,"mutationCb"),T(this,"adoptedStyleSheetCb"),T(this,"styleMirror",new En),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;let i={id:r,styleIds:[]},n=[];for(let o of t){let l;this.styleMirror.has(o)?l=this.styleMirror.getId(o):(l=this.styleMirror.add(o),n.push({styleId:l,rules:Array.from(o.rules||CSSRule,(p,a)=>({rule:Gs(p,o.href),index:a}))})),i.styleIds.push(l);}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(t){}},An=class{constructor(){T(this,"nodeMap",new WeakMap),T(this,"active",false);}inOtherBuffer(t,r){let i=this.nodeMap.get(t);return i&&Array.from(i).some(n=>n!==r)}add(t,r){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r));}destroy(){}},te,It,vn,Pt=false;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((wi=e.contentWindow)==null?void 0:wi.Array.from)||Array.from,document.body.removeChild(e);}}catch(e){console.debug("Unable to override Array.from",e);}var Se=El();function xe(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:l="rr-ignore",ignoreSelector:p=null,maskTextClass:a="rr-mask",maskTextSelector:h=null,inlineStylesheet:s=true,maskAllInputs:f,maskInputOptions:c,slimDOMOptions:u,maskInputFn:m,maskTextFn:d,hooks:g,packFn:S,sampling:y={},dataURLOptions:b={},mousemoveWait:E,recordDOM:w=true,recordCanvas:v=false,recordCrossOriginIframes:C=false,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=false,collectFonts:M=false,inlineImages:O=false,plugins:k,keepIframeSrcFn:x=()=>false,ignoreCSSAttributes:Q=new Set([]),errorHandler:Y}=e;$u(Y);let L=C?window.parent===window:true,A=false;if(!L)try{window.parent.document&&(A=!1);}catch{A=true;}if(L&&!t)throw new Error("emit function is required");if(!L&&!A)return ()=>{};E!==void 0&&y.mousemove===void 0&&(y.mousemove=E),Se.reset();let B=f===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:c!==void 0?c:{password:true},X=Qs(u);Fu();let J,P=0,ce=D=>{for(let ee of k||[])ee.eventProcessor&&(D=ee.eventProcessor(D));return S&&!A&&(D=S(D)),D};te=(D,ee)=>{var z;let V=D;if(V.timestamp=st(),(z=Le[0])!=null&&z.isFrozen()&&V.type!==q.FullSnapshot&&!(V.type===q.IncrementalSnapshot&&V.data.source===F.Mutation)&&Le.forEach(he=>he.unfreeze()),L)t?.(ce(V),ee);else if(A){let he={type:"rrweb",event:ce(V),origin:window.location.origin,isCheckout:ee};window.parent.postMessage(he,"*");}if(V.type===q.FullSnapshot)J=V,P=0;else if(V.type===q.IncrementalSnapshot){if(V.data.source===F.Mutation&&V.data.isAttachIframe)return;P++;let he=i&&P>=i,j=r&&V.timestamp-J.timestamp>r;(he||j)&&It(true);}};let N=D=>{te({type:q.IncrementalSnapshot,data:{source:F.Mutation,...D}});},re=D=>te({type:q.IncrementalSnapshot,data:{source:F.Scroll,...D}}),H=D=>te({type:q.IncrementalSnapshot,data:{source:F.CanvasMutation,...D}}),me=D=>te({type:q.IncrementalSnapshot,data:{source:F.AdoptedStyleSheet,...D}}),ie=new kn({mutationCb:N,adoptedStyleSheetCb:me}),oe=new In({mirror:Se,mutationCb:N,stylesheetManager:ie,recordCrossOriginIframes:C,wrappedEmit:te});for(let D of k||[])D.getMirror&&D.getMirror({nodeMirror:Se,crossOriginIframeMirror:oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:oe.crossOriginIframeStyleMirror});let Re=new An;vn=new Tn({recordCanvas:v,mutationCb:H,win:window,blockClass:n,blockSelector:o,mirror:Se,sampling:y.canvas,dataURLOptions:b});let we=new Nn({mutationCb:N,scrollCb:re,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:s,maskInputOptions:B,dataURLOptions:b,maskTextFn:d,maskInputFn:m,recordCanvas:v,inlineImages:O,sampling:y,slimDOMOptions:X,iframeManager:oe,stylesheetManager:ie,canvasManager:vn,keepIframeSrcFn:x,processedNodeManager:Re},mirror:Se});It=(D=false)=>{if(!w)return;te({type:q.Meta,data:{href:window.location.href,width:bo(),height:wo()}},D),ie.reset(),we.init(),Le.forEach(z=>z.lock());let ee=Gl(document,{mirror:Se,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:h,inlineStylesheet:s,maskAllInputs:B,maskTextFn:d,maskInputFn:m,slimDOM:X,dataURLOptions:b,recordCanvas:v,inlineImages:O,onSerialize:z=>{Eo(z,Se)&&oe.addIframe(z),xo(z,Se)&&ie.trackLinkElement(z),Cn(z)&&we.addShadowRoot(_.shadowRoot(z),document);},onIframeLoad:(z,V)=>{oe.attachIframe(z,V),we.observeAttachShadow(z);},onStylesheetLoad:(z,V)=>{ie.attachLinkElement(z,V);},keepIframeSrcFn:x});if(!ee)return console.warn("Failed to snapshot the document");te({type:q.FullSnapshot,data:{node:ee,initialOffset:vo(window)}},D),Le.forEach(z=>z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ie.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document));};try{let D=[],ee=V=>{var he;return U(rc)({mutationCb:N,mousemoveCb:(j,Qt)=>te({type:q.IncrementalSnapshot,data:{source:Qt,positions:j}}),mouseInteractionCb:j=>te({type:q.IncrementalSnapshot,data:{source:F.MouseInteraction,...j}}),scrollCb:re,viewportResizeCb:j=>te({type:q.IncrementalSnapshot,data:{source:F.ViewportResize,...j}}),inputCb:j=>te({type:q.IncrementalSnapshot,data:{source:F.Input,...j}}),mediaInteractionCb:j=>te({type:q.IncrementalSnapshot,data:{source:F.MediaInteraction,...j}}),styleSheetRuleCb:j=>te({type:q.IncrementalSnapshot,data:{source:F.StyleSheetRule,...j}}),styleDeclarationCb:j=>te({type:q.IncrementalSnapshot,data:{source:F.StyleDeclaration,...j}}),canvasMutationCb:H,fontCb:j=>te({type:q.IncrementalSnapshot,data:{source:F.Font,...j}}),selectionCb:j=>{te({type:q.IncrementalSnapshot,data:{source:F.Selection,...j}});},customElementCb:j=>{te({type:q.IncrementalSnapshot,data:{source:F.CustomElement,...j}});},blockClass:n,ignoreClass:l,ignoreSelector:p,maskTextClass:a,maskTextSelector:h,maskInputOptions:B,inlineStylesheet:s,sampling:y,recordDOM:w,recordCanvas:v,inlineImages:O,userTriggeredOnInput:I,collectFonts:M,doc:V,maskInputFn:m,maskTextFn:d,keepIframeSrcFn:x,blockSelector:o,slimDOMOptions:X,dataURLOptions:b,mirror:Se,iframeManager:oe,stylesheetManager:ie,shadowDomManager:we,processedNodeManager:Re,canvasManager:vn,ignoreCSSAttributes:Q,plugins:((he=k?.filter(j=>j.observer))==null?void 0:he.map(j=>({observer:j.observer,options:j.options,callback:Qt=>te({type:q.Plugin,data:{plugin:j.name,payload:Qt}})})))||[]},g)};oe.addLoadListener(V=>{try{D.push(ee(V.contentDocument));}catch(he){console.warn(he);}});let z=()=>{It(),D.push(ee(document)),Pt=!0;};return ["interactive","complete"].includes(document.readyState)?z():(D.push(ae("DOMContentLoaded",()=>{te({type:q.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&z();})),D.push(ae("load",()=>{te({type:q.Load,data:{}}),R==="load"&&z();},window))),()=>{D.forEach(V=>{try{V();}catch(he){String(he).toLowerCase().includes("cross-origin")||console.warn(he);}}),Re.destroy(),Pt=!1,Wu();}}catch(D){console.warn(D);}}xe.addCustomEvent=(e,t)=>{if(!Pt)throw new Error("please add custom event after start recording");te({type:q.Custom,data:{tag:e,payload:t}});};xe.freezePage=()=>{Le.forEach(e=>e.freeze());};xe.takeFullSnapshot=e=>{if(!Pt)throw new Error("please take full snapshot after start recording");It(e);};xe.mirror=Se;var $s;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped";})($s||($s={}));var{addCustomEvent:mf}=xe,{freezePage:gf}=xe,{takeFullSnapshot:yf}=xe;function $(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return (e==="x"?t:t&3|8).toString(16)})}var ct=class{constructor(t,r){let i=Date.now();this.startedAt=t??i,this.perfStart=typeof performance<"u"?performance.now():0,this.baseT=Math.max(0,i-this.startedAt,r??0);}now(){let t=typeof performance<"u"?performance.now():Date.now()-this.startedAt;return Math.max(0,this.baseT+Math.round(t-this.perfStart))}wall(){return Date.now()}fromPerf(t){return Math.max(0,this.baseT+Math.round(t-this.perfStart))}};async function _o(e){if(typeof crypto<"u"&&crypto.subtle){let r=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(e));return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}let t=0;for(let r=0;r<e.length;r++)t=Math.imul(31,t)+e.charCodeAt(r)|0;return (t>>>0).toString(16)}function Fo(){let e=navigator.userAgent,t={w:window.innerWidth,h:window.innerHeight},r,i;try{r=Intl.DateTimeFormat().resolvedOptions().timeZone||void 0,i=-new Date().getTimezoneOffset();}catch{}let n="desktop";/iPad|Tablet/i.test(e)?n="tablet":/Mobi|Android|iPhone/i.test(e)&&(n="mobile");let o;/Windows/i.test(e)?o="Windows":/Mac OS X|Macintosh/i.test(e)?o="macOS":/Android/i.test(e)?o="Android":/iPhone|iPad|iOS/i.test(e)?o="iOS":/Linux/i.test(e)&&(o="Linux");let l;return /Edg\//.test(e)?l="Edge":/Chrome\//.test(e)?l="Chrome":/Firefox\//.test(e)?l="Firefox":/Safari\//.test(e)&&(l="Safari"),{type:n,os:o,browser:l,viewport:t,tz:r,tzOffset:i}}function Xn(){let e=navigator;return e.globalPrivacyControl===true||e.doNotTrack==="1"||window.doNotTrack==="1"}var cc=3;function Uo(e){let t=xe({emit(r){let i=e.clock.fromPerf(fc());r.timestamp=e.clock.startedAt+i;let n={id:$(),sessionId:e.sessionId,type:"dom",t:i,ts:e.clock.wall(),data:r};e.emit(n),r.type===cc&&e.markActivity();},maskAllInputs:e.config.maskAllInputs,maskInputOptions:{password:true},maskTextSelector:e.config.maskTextSelector,blockSelector:e.config.blockSelector,recordCanvas:e.config.recordCanvas,checkoutEveryNms:3e4,sampling:{mousemove:50,scroll:150,input:"last"}});return ()=>{try{t?.();}catch{}}}function Bo(){try{xe.takeFullSnapshot(!0);}catch{}}function fc(){return typeof performance<"u"?performance.now():Date.now()}var hc=8*1024,dc=2e3;function pc(e){return new Blob([e]).size}function qo(e,t){if(pc(e)<=t)return {value:e,truncated:false};let r=Math.max(16,Math.floor(t*.95));return {value:e.slice(0,r),truncated:true}}function zo(e,t=hc){if(e===null)return {kind:"primitive",value:null};let r=typeof e;if(r==="number"||r==="boolean")return {kind:"primitive",value:e};if(r==="string"){let i=e,n=i.length>t*2?i.slice(0,t*2):i,o=ge(n),{value:l,truncated:p}=qo(o,t);return {kind:"string",value:l,truncated:p||n!==i}}if(e instanceof Error)return {kind:"error",name:e.name,message:ge(e.message),stack:e.stack?ge(e.stack):void 0};if(e instanceof Element)return {kind:"dom",selector:Be(e)};if(r==="object"||r==="function"||r==="symbol"||r==="bigint"){let i={nodes:dc,bytes:t*2,exhausted:false},n=Jn(e,i),o,l=i.exhausted;try{let p=JSON.stringify(n,mc()),a=qo(p??"undefined",t);o=a.value,l=l||a.truncated;}catch{o=void 0;}return {kind:"object",preview:gc(e),json:o,truncated:l}}return {kind:"primitive",value:String(e)}}function Jn(e,t,r=0){if(t.exhausted)return "\xABtruncated\xBB";if(r>6)return "\xABdepth\xBB";if(--t.nodes<=0&&(t.exhausted=true),typeof e=="string"){let n=e.length>t.bytes?e.slice(0,Math.max(0,t.bytes)):e;n!==e&&(t.exhausted=true);let o=ge(n);return (t.bytes-=o.length+2)<=0&&(t.exhausted=true),o}if(e===null||typeof e!="object")return e;if(Array.isArray(e)){let n=[];for(let o of e){if(t.exhausted){n.push("\xABtruncated\xBB");break}n.push(Jn(o,t,r+1));}return n}let i={};for(let n of Object.keys(e)){if(t.exhausted){i["\u2026"]="\xABtruncated\xBB";break}(t.bytes-=n.length+4)<=0&&(t.exhausted=true),i[n]=Ze(n)?"\xABredacted\xBB":Jn(e[n],t,r+1);}return i}function mc(){let e=new WeakSet;return (t,r)=>{if(typeof r=="bigint")return `${r.toString()}n`;if(typeof r=="function")return `\u0192 ${r.name||"anonymous"}`;if(typeof r=="object"&&r!==null){if(e.has(r))return "\xABcircular\xBB";e.add(r);}return r}}function gc(e){if(Array.isArray(e))return `Array(${e.length})`;if(e&&typeof e=="object"){let t=Object.keys(e);return `{ ${t.slice(0,4).join(", ")}${t.length>4?", \u2026":""} }`}return String(e)}function Be(e){let t=[],r=e,i=0;for(;r&&r.nodeType===1&&i<5;){let n=r.tagName.toLowerCase();if(r.id){n+=`#${r.id}`,t.unshift(n);break}let o=(r.getAttribute("class")||"").trim().split(/\s+/).filter(Boolean)[0];o&&(n+=`.${o}`),t.unshift(n),r=r.parentElement,i++;}return t.join(" > ")}function Gt(e){if(!e)return;let t=e.split(`
|
|
129
|
+
`).map(r=>r.trim());for(let r of t){let i=r.match(/\((https?:\/\/[^)]+):(\d+):(\d+)\)/)||r.match(/at (https?:\/\/\S+):(\d+):(\d+)/)||r.match(/(https?:\/\/\S+):(\d+):(\d+)/);if(i)return {url:i[1],line:Number(i[2]),col:Number(i[3])}}}var $o=["log","info","warn","error","debug"],yc=100;function Wo(e){let t={},r=e.clock.now(),i=0,n=0;function o(){let p=e.clock.now();return p-r>=1e3&&(n>0&&(l("warn",[{kind:"string",value:`Obsrviq: suppressed ${n} console messages (flood cap)`}]),n=0),r=p,i=0),i>=yc?(n++,true):(i++,false)}function l(p,a,h){let s=Gt(h),f={id:$(),sessionId:e.sessionId,type:"console",t:e.clock.now(),ts:e.clock.wall(),level:p,args:a,stack:p==="error"?h:void 0,source:s};e.emit(f);}for(let p of $o){let a=console[p];t[p]=a,console[p]=(...h)=>{try{a.apply(console,h);}catch{}try{if(o())return;let s=h.map(c=>zo(c,e.config.maxArgBytes)),f;p==="error"&&(f=h.find(u=>u instanceof Error)?.stack??new Error().stack),l(p,s,f);}catch{}};}return ()=>{for(let p of $o)t[p]&&(console[p]=t[p]);}}function Ho(e,t){return {id:$(),sessionId:e.sessionId,type:"console",t:t.t,ts:t.ts,level:"error",args:[{kind:"error",name:t.name,message:t.message,stack:t.stack}],stack:t.stack,source:t.source}}function Yt(e,t){let r=t,i=Date.now();return {take(){let n=Date.now();return r=Math.min(t,r+(n-i)/1e3*e),i=n,r<1?false:(r-=1,true)}}}function jo(e){let t=new Uint8Array(e);if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")crypto.getRandomValues(t);else for(let i=0;i<e;i++)t[i]=Math.random()*256|0;let r="";for(let i=0;i<e;i++)r+=t[i].toString(16).padStart(2,"0");return r}function Kn(){let e=jo(16),t=jo(8);return {traceId:e,spanId:t,header:`00-${e}-${t}-01`}}function Zn(e,t){if(!t.tracePropagation)return false;let r;try{r=new URL(e,typeof location<"u"?location.href:void 0);}catch{return false}return r.protocol!=="http:"&&r.protocol!=="https:"?false:typeof location<"u"&&r.origin===location.origin?true:vc(r.hostname,t.traceHosts)}function vc(e,t){let r=e.toLowerCase();for(let i of t){let n=String(i).trim().toLowerCase();if(n){if(n.includes("://"))try{n=new URL(n).hostname;}catch{}if(n=n.replace(/^\*?\./,""),r===n||r.endsWith("."+n))return true}}return false}function Vo(e,t,r){let i=!!t&&"headers"in t&&t.headers!=null;if(e instanceof Request&&!i){let o=new Headers(e.headers);return o.has("traceparent")||o.set("traceparent",r),{input:new Request(e,{headers:o}),init:t}}let n=new Headers(t?.headers??void 0);return n.has("traceparent")||n.set("traceparent",r),{input:e,init:{...t||{},headers:n}}}var ht=4*1024,wc=50,bc=100,Yo=new Set(["content-type","content-length","accept","accept-encoding","cache-control","etag","last-modified","content-encoding","x-request-id","x-correlation-id","traceparent","server","vary"]);function Jt(e){try{let t=new URL(e,location.href);return t.search&&(t.search="?\u2026"),t.toString()}catch{return e.split("?")[0]??e}}function Xo(e){if(e===0)return "network";if(e>=500)return "http_5xx";if(e>=400)return "http_4xx"}function Qn(e,t){let r={},i=new Set(e.map(n=>n.toLowerCase()));for(let[n,o]of t){let l=n.toLowerCase();i.has(l)?r[l]="redacted":Yo.has(l)&&(r[l]=o);}return r}function Xt(e,t){if(e==null)return;let r=e.length>ht*2?e.slice(0,ht*2):e,i=ge(r),n=r!==e||i.length>ht;return {contentType:t,preview:n?i.slice(0,ht):i,truncated:n,redacted:i!==r}}async function Sc(e,t){let r=e.body;if(!r||typeof r.getReader!="function")return {text:await e.text(),overflow:false};let i=r.getReader(),n=new TextDecoder,o="",l=0,p=false;try{for(;;){let{done:a,value:h}=await i.read();if(a||!h){o+=n.decode();break}let s=t+1-l;if(h.byteLength>=s){o+=n.decode(h.subarray(0,s),{stream:!0}),p=!0;break}o+=n.decode(h,{stream:!0}),l+=h.byteLength;}}finally{i.cancel().catch(()=>{});}return {text:o,overflow:p}}function Jo(){return typeof performance<"u"?performance.now():0}function Cc(e){try{return new URL(e,typeof location<"u"?location.href:void 0).href}catch{return e}}function Go(e,t){let r={...t},i=n=>Math.round(n);return e.domainLookupStart>0&&e.domainLookupEnd>e.domainLookupStart&&(r.dns=i(e.domainLookupEnd-e.domainLookupStart)),e.connectStart>0&&e.connectEnd>e.connectStart&&(r.tcp=i(e.connectEnd-e.connectStart)),e.secureConnectionStart>0&&e.connectEnd>e.secureConnectionStart&&(r.tls=i(e.connectEnd-e.secureConnectionStart)),e.requestStart>0&&e.responseStart>e.requestStart&&(r.ttfb=i(e.responseStart-e.requestStart)),e.responseStart>0&&e.responseEnd>e.responseStart&&(r.download=i(e.responseEnd-e.responseStart)),r}function Ec(e,t,r){let i,n=1/0;for(let o of r){if(o.name!==e||o.startTime<t-4)continue;let l=o.startTime-t;l<n&&(n=l,i=o);}return i}var xc=300;function Rc(){let e=[],t,r=()=>{if(t){try{t.disconnect();}catch{}t=void 0;}},i=(l,p)=>{let a=e.indexOf(l);a!==-1&&(e.splice(a,1),clearTimeout(l.timer),l.resolve(p),e.length===0&&r());},n=l=>{for(let p of l){let a,h=1/0;for(let s of e){if(p.name!==s.name||p.startTime<s.perfStart-4)continue;let f=p.startTime-s.perfStart;f<h&&(h=f,a=s);}a&&i(a,Go(p,a.base));}},o=()=>{if(!(t||typeof PerformanceObserver>"u"))try{t=new PerformanceObserver(l=>n(l.getEntries())),t.observe({type:"resource",buffered:!1});}catch{t=void 0;}};return {resolve(l,p,a){if(typeof performance>"u")return Promise.resolve(a);let h=Cc(l);try{let s=performance.getEntriesByType("resource"),f=Ec(h,p,s);if(f)return Promise.resolve(Go(f,a))}catch{}return typeof PerformanceObserver>"u"?Promise.resolve(a):new Promise(s=>{let f={name:h,perfStart:p,base:a,resolve:s,timer:setTimeout(()=>i(f,a),xc)};e.push(f),o();})},flushPending(){for(let l of [...e])i(l,l.base);},teardown(){this.flushPending(),r();}}}function Ko(e){let t=Rc(),r=Yt(wc,bc),i=0,n=a=>{if(!r.take()){i++;return}i>0&&(a.droppedEvents=i,i=0),e.emit(a);},o=()=>t.flushPending(),l=()=>{typeof document<"u"&&document.visibilityState==="hidden"&&t.flushPending();};typeof window<"u"&&window.addEventListener("pagehide",o),typeof document<"u"&&document.addEventListener("visibilitychange",l);let p=[];return p.push(Mc(e,t,n)),p.push(Nc(e,t,n)),p.push(Ac(e,n)),p.push(Dc(e,n)),p.push(()=>{typeof window<"u"&&window.removeEventListener("pagehide",o),typeof document<"u"&&document.removeEventListener("visibilitychange",l),t.teardown();}),()=>p.forEach(a=>a())}function Mc(e,t,r){let i=window.fetch;return i?(window.fetch=async function(n,o){let l=n instanceof Request?n.url:String(n);if(l.includes("/v1/batch")||l.includes("/v1/config"))return i.call(window,n,o);let p=e.clock.now(),a=Jo(),h=(o?.method||(n instanceof Request?n.method:"GET")).toUpperCase(),s=Jt(l),f;if(Zn(l,e.config))try{let m=Kn(),d=Vo(n,o,m.header);n=d.input,o=d.init,f=m.traceId;}catch{}let c=Qn(e.config.redactHeaders,Lc(o?.headers??(n instanceof Request?n.headers:void 0))),u=m=>{let d=e.clock.now(),g={startT:p,endT:d,duration:d-p};e.markActivity(),t.resolve(l,a,g).then(S=>{let y={id:$(),sessionId:e.sessionId,type:"network",t:p,ts:e.clock.wall(),initiator:"fetch",method:h,url:s,status:0,ok:false,resourceType:"fetch",requestHeaders:c,traceId:f,timing:S,...m};r(y);});};try{let m=await i.call(window,n,o),d=m.status,g=Qn(e.config.redactHeaders,m.headers.entries()),S=m.headers.get("content-length"),y;if(e.config.captureNetworkBodies&&Zo(m.headers.get("content-type")))try{let{text:b,overflow:E}=await Sc(m.clone(),ht);y=Xt(b,m.headers.get("content-type")||void 0),y&&E&&(y.truncated=!0);}catch{}return u({status:d,ok:m.ok,responseSize:S?Number(S):void 0,responseHeaders:g,requestBody:e.config.captureNetworkBodies?Xt(Qo(o?.body),void 0):void 0,responseBody:y,error:Xo(d)}),m}catch(m){throw u({status:0,ok:false,error:Ic(m)}),m}},()=>{window.fetch=i;}):()=>{}}function Ic(e){if(e?.name==="AbortError")return "aborted";let r=String(e?.message||"").toLowerCase();return r.includes("cors")?"cors":r.includes("timeout")?"timeout":"network"}function Nc(e,t,r){let i=XMLHttpRequest.prototype,n=i.open,o=i.send,l=i.setRequestHeader,p=new WeakMap;return i.open=function(a,h,...s){let f=String(h);return p.set(this,{method:String(a).toUpperCase(),rawUrl:f,url:Jt(f),startT:0,perfStart:0,reqHeaders:{}}),n.apply(this,[a,h,...s])},i.setRequestHeader=function(a,h){let s=p.get(this);if(s){let f=a.toLowerCase();e.config.redactHeaders.map(c=>c.toLowerCase()).includes(f)?s.reqHeaders[f]="redacted":Yo.has(f)&&(s.reqHeaders[f]=h);}return l.apply(this,[a,h])},i.send=function(a){let h=p.get(this);if(h){if(h.startT=e.clock.now(),h.perfStart=Jo(),e.config.captureNetworkBodies&&(h.body=Qo(a)),Zn(h.rawUrl,e.config))try{let f=Kn();this.setRequestHeader("traceparent",f.header),h.traceId=f.traceId;}catch{}let s=f=>{let c=e.clock.now(),u={startT:h.startT,endT:c,duration:c-h.startT},m=this.status,d=kc(e,this.getAllResponseHeaders()),g;if(e.config.captureNetworkBodies&&Zo(this.getResponseHeader("content-type")))try{(this.responseType===""||this.responseType==="text")&&(g=Xt(this.responseText,this.getResponseHeader("content-type")||void 0));}catch{}let S=Tc(this);e.markActivity(),t.resolve(h.rawUrl,h.perfStart,u).then(y=>{let b={id:$(),sessionId:e.sessionId,type:"network",t:h.startT,ts:e.clock.wall(),initiator:"xhr",method:h.method,url:h.url,status:m,ok:m>=200&&m<400,resourceType:"xhr",requestHeaders:h.reqHeaders,traceId:h.traceId,responseHeaders:d,responseSize:S,requestBody:e.config.captureNetworkBodies?Xt(h.body,void 0):void 0,responseBody:g,timing:y,error:f||Xo(m)};r(b);});};this.addEventListener("loadend",()=>s()),this.addEventListener("error",()=>s("network")),this.addEventListener("timeout",()=>s("timeout")),this.addEventListener("abort",()=>s("aborted"));}return o.apply(this,[a])},()=>{i.open=n,i.send=o,i.setRequestHeader=l;}}function Tc(e){try{if(e.responseType===""||e.responseType==="text")return new Blob([e.responseText]).size}catch{}let t=e.getResponseHeader("content-length");return t?Number(t):void 0}function kc(e,t){let r=[];for(let i of t.trim().split(/[\r\n]+/)){let n=i.indexOf(":");n>0&&r.push([i.slice(0,n).trim(),i.slice(n+1).trim()]);}return Qn(e.config.redactHeaders,r)}function Ac(e,t){let r=navigator.sendBeacon;return r?(navigator.sendBeacon=function(i,n){let o=e.clock.now(),l=false;try{l=r.call(navigator,i,n);}finally{let p=String(i);if(!p.includes("/v1/batch")){let a={id:$(),sessionId:e.sessionId,type:"network",t:o,ts:e.clock.wall(),initiator:"beacon",method:"POST",url:Jt(p),status:l?202:0,ok:l,resourceType:"other",timing:{startT:o,endT:e.clock.now(),duration:0},error:l?void 0:"network"};t(a);}}return l},()=>{navigator.sendBeacon=r;}):()=>{}}var Oc={script:"script",link:"stylesheet",css:"stylesheet",img:"image",image:"image",font:"font",audio:"media",video:"media",track:"media"};function Dc(e,t){if(typeof PerformanceObserver>"u")return ()=>{};let r;try{r=new PerformanceObserver(i=>{for(let n of i.getEntries()){let o=n.initiatorType;if(o==="fetch"||o==="xmlhttprequest"||o==="beacon")continue;let l=Oc[o]||"other",p=e.clock.fromPerf(n.startTime),a=e.clock.fromPerf(n.responseEnd||n.startTime),h={startT:p,endT:a,duration:Math.max(0,a-p),dns:ft(n.domainLookupEnd-n.domainLookupStart),tcp:ft(n.connectEnd-n.connectStart),tls:n.secureConnectionStart?ft(n.connectEnd-n.secureConnectionStart):void 0,ttfb:ft(n.responseStart-n.requestStart),download:ft(n.responseEnd-n.responseStart)},s={id:$(),sessionId:e.sessionId,type:"network",t:p,ts:e.clock.wall(),initiator:"resource",method:"GET",url:Jt(n.name),status:n.responseStatus||200,ok:!n.responseStatus||n.responseStatus<400,resourceType:l,responseSize:n.transferSize||n.encodedBodySize||void 0,timing:h};t(s);}}),r.observe({type:"resource",buffered:!0});}catch{return ()=>{}}return ()=>r?.disconnect()}function ft(e){return Number.isFinite(e)&&e>0?Math.round(e):void 0}function Zo(e){return e?/json|text|xml|x-www-form-urlencoded/i.test(e):false}function Qo(e){if(e!=null){if(typeof e=="string")return e;if(e instanceof URLSearchParams)return e.toString();if(e instanceof FormData){let t={};return e.forEach((r,i)=>t[i]=typeof r=="string"?r:"\xABfile\xBB"),JSON.stringify(t)}try{return JSON.stringify(e)}catch{return}}}function Lc(e){return e?e instanceof Headers?e.entries():Array.isArray(e)?e:Object.entries(e):[]}var Kt=4*1024,Pc=20,_c=40;function Fc(e){try{let t=new URL(e,location.href);return t.search&&(t.search="?\u2026"),t.toString()}catch{return e.split("?")[0]??e}}function Uc(e){try{return new TextEncoder().encode(e).length}catch{return e.length}}function Bc(e,t){if(typeof e=="string"){let i={encoding:"text",size:Uc(e)};if(t){let n=e.length>Kt*2?e.slice(0,Kt*2):e,o=ge(n),l=n!==e||o.length>Kt;i.body={preview:l?o.slice(0,Kt):o,truncated:l,redacted:o!==n};}return i}let r=0;return typeof Blob<"u"&&e instanceof Blob?r=e.size:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(r=e.byteLength),{encoding:"binary",size:r}}function ea(e){let t=typeof window<"u"?window.WebSocket:void 0;if(!t)return ()=>{};let r=n=>{try{let o={id:$(),sessionId:e.sessionId,type:"ws",t:e.clock.now(),ts:e.clock.wall(),...n};e.emit(o);}catch{}};class i extends t{constructor(o,l){super(o,l);try{let p=$(),a=Fc(String(o)),h=l?Array.isArray(l)?l:[l]:void 0,s=e.config.captureNetworkBodies,f=Yt(Pc,_c),c=0,u=(d,g)=>{if(e.markActivity(),!f.take()){c++;return}let S=Bc(g,s),y=c;c=0,r({connId:p,url:a,kind:"message",dir:d,...S,droppedFrames:y||void 0});};this.addEventListener("open",()=>r({connId:p,url:a,kind:"open",protocols:h})),this.addEventListener("close",d=>r({connId:p,url:a,kind:"close",code:d.code,reason:d.reason||void 0,wasClean:d.wasClean,droppedFrames:c||void 0})),this.addEventListener("error",()=>r({connId:p,url:a,kind:"error"})),this.addEventListener("message",d=>u("recv",d.data));let m=super.send.bind(this);this.send=d=>{m(d);try{u("send",d);}catch{}};}catch{}}}return window.WebSocket=i,()=>{window.WebSocket=t;}}function ta(e){function t(n){let o={id:$(),sessionId:e.sessionId,type:"error",t:e.clock.now(),ts:e.clock.wall(),name:n.name,message:ge(n.message),stack:n.stack?ge(n.stack):void 0,source:n.source,handled:n.handled};e.emit(o),e.emit(Ho(e,o));}let r=n=>{let o=n.error;t({name:o?.name||"Error",message:o?.message||n.message||"Unknown error",stack:o?.stack,source:{url:n.filename,line:n.lineno,col:n.colno},handled:false});},i=n=>{let o=n.reason;o instanceof Error?t({name:o.name,message:o.message,stack:o.stack,source:Gt(o.stack),handled:false}):t({name:"UnhandledRejection",message:typeof o=="string"?o:qc(o),handled:false});};return window.addEventListener("error",r,true),window.addEventListener("unhandledrejection",i,true),()=>{window.removeEventListener("error",r,true),window.removeEventListener("unhandledrejection",i,true);}}function qc(e){try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function zc(e,t){let i={LCP:[2500,4e3],INP:[200,500],CLS:[.1,.25],FCP:[1800,3e3],TTFB:[800,1800]}[e];if(i)return t<=i[0]?"good":t<=i[1]?"needs-improvement":"poor"}function ra(e){if(typeof PerformanceObserver>"u")return ()=>{};let t=[],r=(h,s,f)=>{let c={id:$(),sessionId:e.sessionId,type:"perf",t:e.clock.now(),ts:e.clock.wall(),metric:h,value:Math.round(s*1e3)/1e3,rating:zc(h,s),detail:f};e.emit(c);},i=(h,s,f)=>{try{let c=new PerformanceObserver(u=>s(u.getEntries()));c.observe({type:h,buffered:!0,...f}),t.push(c);}catch{}};i("paint",h=>{for(let s of h)s.name==="first-contentful-paint"&&r("FCP",s.startTime);});let n=0;i("largest-contentful-paint",h=>{let s=h[h.length-1];s&&(n=s.startTime);});let o=0;i("layout-shift",h=>{for(let s of h)s.hadRecentInput||(o+=s.value);});let l=0;i("event",h=>{for(let s of h)s.duration>l&&(l=s.duration);},{durationThreshold:40}),i("navigation",h=>{let s=h[0];s&&(r("TTFB",s.responseStart),r("navigation",s.duration,{domInteractive:Math.round(s.domInteractive),domComplete:Math.round(s.domComplete),loadEvent:Math.round(s.loadEventEnd)}));});let p=()=>{n&&r("LCP",n),r("CLS",o),l&&r("INP",l);},a=()=>{document.visibilityState==="hidden"&&p();};return document.addEventListener("visibilitychange",a,true),()=>{t.forEach(h=>h.disconnect()),document.removeEventListener("visibilitychange",a,true);}}var na=1e3,$c=3,Wc=3e3;function Hc(e){if(!e)return false;let t=e;for(let r=0;r<4&&t;r++){let i=t.tagName.toLowerCase();if(["a","button","input","select","textarea","label","summary"].includes(i)||t.getAttribute("role")==="button"||t.hasAttribute("onclick")||t.getAttribute("contenteditable")==="true")return true;t=t.parentElement;}return false}function ia(e){let t=[],r=-1/0,i=(o,l,p)=>{let a={id:$(),sessionId:e.sessionId,type:"custom",t:p,ts:e.clock.wall(),name:o,props:l};e.emit(a);},n=o=>{let l=o.target;if(!l||!(l instanceof Element))return;let p=e.clock.now(),a=Be(l);{let s=l.getBoundingClientRect(),f=s.width>0?Math.min(1,Math.max(0,(o.clientX-s.left)/s.width)):.5,c=s.height>0?Math.min(1,Math.max(0,(o.clientY-s.top)/s.height)):.5,u=(l.textContent||"").replace(/\s+/g," ").trim().slice(0,40);i("_click",{selector:a,path:location.pathname,vw:window.innerWidth,vh:window.innerHeight,rx:Math.round(f*1e3)/1e3,ry:Math.round(c*1e3)/1e3,tag:l.tagName.toLowerCase(),label:u},p);}t=t.filter(s=>p-s.t<=na),t.push({el:l,t:p});let h=t.filter(s=>s.el===l);if(h.length>=$c&&p-r>na&&(r=p,i("rage_click",{selector:a,count:h.length},p)),!Hc(l)){let s=e.lastActivityT();window.setTimeout(()=>{e.lastActivityT()<=Math.max(s,p)&&i("dead_click",{selector:a},p);},Wc);}};return window.addEventListener("click",n,true),()=>window.removeEventListener("click",n,true)}var aa=new Set(["INPUT","TEXTAREA","SELECT"]),jc=new Set(["hidden","submit","button","reset","image","file"]),sa=80,ei=60,Vc=3e5,Gc=100;function Yc(e){return !(!(e instanceof HTMLElement)||!aa.has(e.tagName)||e instanceof HTMLInputElement&&jc.has(e.type))}function Xc(e){return e instanceof HTMLTextAreaElement?"textarea":e instanceof HTMLSelectElement?"select":e.type||"text"}function Jc(e){return e instanceof HTMLInputElement?e.type==="checkbox"||e.type==="radio"?e.checked:e.value.trim().length>0:e instanceof HTMLSelectElement?e.value!=="":e.value.trim().length>0}function ue(e){let t=e.trim().replace(/\s+/g," ");return t.length>sa?t.slice(0,sa):t}function Kc(e){let t=e.getAttribute("name");if(t)return ue(t);if(e.id)return ue(e.id);let r=e.getAttribute("aria-label");if(r)return ue(r);let i=e.getAttribute("aria-labelledby");if(i){let o=i.split(/\s+/).map(l=>e.ownerDocument.getElementById(l)?.textContent||"").join(" ").trim();if(o)return ue(o)}if(e.labels&&e.labels.length){let o=e.labels[0].textContent?.trim();if(o)return ue(o)}let n=e.getAttribute("placeholder");return ue(n||Be(e))}function Ae(e){if(!e)return;let t=e.trim().replace(/\s+/g," ");if(t)return t.length>ei?t.slice(0,ei):t}function Zc(e){if(e.labels&&e.labels.length){let n=Ae(e.labels[0].textContent);if(n)return n}let t=Ae(e.getAttribute("aria-label"));if(t)return t;let r=e.previousElementSibling;for(let n=0;r&&n<3;n++,r=r.previousElementSibling){if(aa.has(r.tagName)||/^(BUTTON|SCRIPT|STYLE|SVG)$/.test(r.tagName))continue;let o=Ae(r.textContent);if(o)return o}let i=e.parentElement;if(i){let n=Ae(Array.from(i.childNodes).filter(l=>l.nodeType===3).map(l=>l.textContent||"").join(" "));if(n)return n;let o=Ae(i.querySelector("label,legend")?.textContent);if(o)return o}return Ae(e.getAttribute("placeholder"))}function Qc(e){let t=e.closest('form,fieldset,section,[role="form"],[role="group"]');if(t){let r=Ae(t.querySelector('legend,h1,h2,h3,h4,[role="heading"]')?.textContent);if(r)return r;let i=Ae(t.getAttribute("aria-label"));if(i)return i}return Ae(typeof document<"u"?document.title:void 0)}function ef(e){let t={},r=(e.getAttribute("autocomplete")||"").trim().toLowerCase();r&&r!=="off"&&r!=="on"&&(t.autocomplete=r.slice(0,ei));let i=Zc(e);i&&(t.near=i);let n=Qc(e);return n&&(t.formTitle=n),t}function oa(e){let t=e.form;if(t){if(t.getAttribute("name"))return ue(t.getAttribute("name"));if(t.id)return ue(t.id);let r=t.getAttribute("aria-label");if(r)return ue(r);let i=t.getAttribute("action");if(i)try{return ue(new URL(i,location.href).pathname)}catch{return ue(i)}return ue(Be(t))}return ue(`page:${location.pathname}`)}function la(e){let t=e.config.blockSelector,r=null,i=(s,f)=>{let c={id:$(),sessionId:e.sessionId,type:"custom",t:e.clock.now(),ts:e.clock.wall(),name:s,props:f};e.emit(c);},n=s=>{try{return !!t&&!!s.closest(t)}catch{return false}},o=()=>{if(!r)return;let{el:s,start:f,changed:c}=r;r=null;let u=Math.min(Vc,Math.max(0,e.clock.now()-f));u<Gc&&!c||i("form_field",{form:oa(s),field:Kc(s),type:Xc(s),ms:u,changed:c,filled:Jc(s),...ef(s)});},l=s=>{let f=s.target;!Yc(f)||n(f)||(r&&r.el!==f&&o(),r={el:f,start:e.clock.now(),changed:false});},p=s=>{r&&s.target===r.el&&(r.changed=true);},a=s=>{r&&s.target===r.el&&o();},h=s=>{let f=s.target;if(!(f instanceof HTMLFormElement)||n(f))return;o();let c=f.querySelector("input,textarea,select"),u=c&&!n(c)?oa(c):ue(f.getAttribute("name")||f.id||Be(f));i("form_submit",{form:u});};return document.addEventListener("focusin",l,true),document.addEventListener("focusout",a,true),document.addEventListener("input",p,true),document.addEventListener("submit",h,true),window.addEventListener("pagehide",o,true),()=>{o(),document.removeEventListener("focusin",l,true),document.removeEventListener("focusout",a,true),document.removeEventListener("input",p,true),document.removeEventListener("submit",h,true),window.removeEventListener("pagehide",o,true);}}function ua(e){let t=location.pathname,r=0,i=false,n=(a,h,s)=>{let f={id:$(),sessionId:e.sessionId,type:"custom",t:e.clock.now(),ts:e.clock.wall(),name:"_scroll",props:{path:t,depth:a,h,vh:s}};e.emit(f);},o=()=>{let a=document.documentElement,h=document.body;return Math.max(a.scrollHeight,h?h.scrollHeight:0,a.clientHeight)||1},l=()=>{i=false,location.pathname!==t&&(t=location.pathname,r=0);let a=window.innerHeight||document.documentElement.clientHeight||1,h=o(),s=Math.min(1,(window.scrollY+a)/h),f=Math.min(100,Math.round(s*10)*10);f>r&&(r=f,n(f,h,a));},p=()=>{i||(i=true,requestAnimationFrame(l));};return window.addEventListener("scroll",p,{passive:true,capture:true}),l(),()=>{window.removeEventListener("scroll",p,true);}}function ca(e){let t=null,r=()=>{let p=location.hash;return location.pathname+(p.startsWith("#/")?p:"")},i=()=>{let p=r();if(p===t)return;let a=t??"";t=p;let h={id:$(),sessionId:e.sessionId,type:"pageview",t:e.clock.now(),ts:e.clock.wall(),url:location.href,path:p,title:document.title||void 0,referrer:a||void 0};e.emit(h),e.markActivity();},n=history.pushState,o=history.replaceState,l=p=>function(h,s,f){let c=p.call(this,h,s,f);return queueMicrotask(i),c};return history.pushState=l(n),history.replaceState=l(o),window.addEventListener("popstate",i),window.addEventListener("hashchange",i),i(),()=>{history.pushState=n,history.replaceState=o,window.removeEventListener("popstate",i),window.removeEventListener("hashchange",i);}}function tf(e){let t=/\.([A-Za-z0-9_-]+)/.exec(e||"");return ["obsrviq-block",t&&t[1]?t[1]:""].filter(Boolean).join(" ")}function fa(e){let t=document.createElement("div");t.className=tf(e),t.setAttribute("data-obsrviq-ui",""),t.style.cssText="all:initial";let r=t.attachShadow({mode:"open"});return {host:t,root:r}}function ha(e,t){try{let r=new CSSStyleSheet;r.replaceSync(t),e.adoptedStyleSheets=[r];}catch{let r=document.createElement("style");r.textContent=t,e.appendChild(r);}}function da(e){(document.body||document.documentElement).appendChild(e);}var ti="#6e76f1",rf=`
|
|
130
130
|
:host { all: initial; }
|
|
131
131
|
.card {
|
|
132
132
|
position: fixed; bottom: 20px; right: 20px; z-index: 2147483647;
|
|
@@ -140,7 +140,7 @@ or you can use record.mirror to access the mirror instance during recording.`,xs
|
|
|
140
140
|
}
|
|
141
141
|
.card.in { opacity: 1; transform: none; }
|
|
142
142
|
.dot { grid-area: dot; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%;
|
|
143
|
-
background: ${
|
|
143
|
+
background: ${ti}; box-shadow: 0 0 0 4px rgba(110,118,241,.18); }
|
|
144
144
|
.txt { grid-area: txt; min-width: 0; }
|
|
145
145
|
.title { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
|
|
146
146
|
.body { margin-top: 3px; font-size: 12px; line-height: 1.45; color: #a9adbe; }
|
|
@@ -149,12 +149,12 @@ button { font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 15px;
|
|
|
149
149
|
cursor: pointer; border: 1px solid transparent; transition: background .15s ease, color .15s ease; }
|
|
150
150
|
.deny { background: transparent; color: #a9adbe; border-color: rgba(255,255,255,.14); }
|
|
151
151
|
.deny:hover { color: #f4f5fb; background: rgba(255,255,255,.05); }
|
|
152
|
-
.allow { background: ${
|
|
152
|
+
.allow { background: ${ti}; color: #fff; }
|
|
153
153
|
.allow:hover { background: #5a62e0; }
|
|
154
|
-
button:focus-visible { outline: 2px solid ${
|
|
154
|
+
button:focus-visible { outline: 2px solid ${ti}; outline-offset: 2px; }
|
|
155
155
|
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
|
|
156
156
|
@media (max-width: 480px) { .card { left: 16px; right: 16px; bottom: 16px; max-width: none; } }
|
|
157
|
-
`,
|
|
157
|
+
`,nf=`
|
|
158
158
|
:host { all: initial; }
|
|
159
159
|
.recdot {
|
|
160
160
|
position: fixed; bottom: 16px; right: 16px; z-index: 2147483647;
|
|
@@ -168,7 +168,7 @@ button:focus-visible { outline: 2px solid ${Gn}; outline-offset: 2px; }
|
|
|
168
168
|
100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
|
|
169
169
|
}
|
|
170
170
|
@media (prefers-reduced-motion: reduce) { .recdot { animation: none; } }
|
|
171
|
-
`;function oa(e,t,r,i){let{host:n,root:a}=na(e);ia(a,Dc);let c=t??{},p=document.createElement("div");p.className="card",p.setAttribute("role","dialog"),p.setAttribute("aria-label",c.title||"Session recording consent");let o=document.createElement("div");o.className="dot",o.setAttribute("aria-hidden","true");let h=document.createElement("div");h.className="txt";let s=document.createElement("div");s.className="title",s.textContent=c.title||"We record this session to improve the experience.";let f=document.createElement("div");f.className="body",f.textContent=c.body||"No passwords or typed input are captured.",h.append(s,f);let u=document.createElement("div");u.className="actions";let l=document.createElement("button");l.type="button",l.className="deny",l.textContent=c.deny||"Decline";let m=document.createElement("button");m.type="button",m.className="allow",m.textContent=c.allow||"Allow",u.append(l,m),p.append(o,h,u),a.appendChild(p),sa(n),requestAnimationFrame(()=>p.classList.add("in"));let d=false,g=()=>{n.parentNode&&n.parentNode.removeChild(n);},S=w=>()=>{d||(d=true,g(),w());};return m.addEventListener("click",S(r)),l.addEventListener("click",S(i)),g}function aa(e){let{host:t,root:r}=na(e);ia(r,Pc);let i=document.createElement("div");return i.className="recdot",i.setAttribute("role","status"),i.setAttribute("aria-label","Session recording in progress"),r.appendChild(i),sa(t),()=>{t.parentNode&&t.parentNode.removeChild(t);}}var la="obsrviq.visitor",Yn="obsrviq.session";function ua(){let e=ha(Yn);if(!e)return null;try{let t=JSON.parse(e);if(t&&typeof t.id=="string"&&t.id&&typeof t.startedAt=="number")return {id:t.id,startedAt:t.startedAt,lastActivity:typeof t.lastActivity=="number"?t.lastActivity:t.startedAt,seq:typeof t.seq=="number"&&t.seq>=0?t.seq:0,lastT:typeof t.lastT=="number"&&t.lastT>=0?t.lastT:void 0,userId:typeof t.userId=="string"?t.userId:void 0}}catch{}return null}function ca(e){da(Yn,JSON.stringify(e));}function fa(){if(!(typeof window>"u"))try{window.localStorage.removeItem(Yn);}catch{}}function ha(e){if(typeof window>"u")return null;try{return window.localStorage.getItem(e)}catch{return null}}function da(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,t);}catch{}}function pa(e){let t=null,r=ha(la);if(r)try{let n=JSON.parse(r);n&&typeof n.id=="string"&&n.id&&(t={id:n.id,firstSeenAt:typeof n.firstSeenAt=="number"?n.firstSeenAt:e,lastSeenAt:typeof n.lastSeenAt=="number"?n.lastSeenAt:e,visits:typeof n.visits=="number"&&n.visits>0?n.visits:1});}catch{}let i=t?{...t,visits:t.visits+1,lastSeenAt:e}:{id:$(),firstSeenAt:e,lastSeenAt:e,visits:1};return da(la,JSON.stringify(i)),i}var Lc={maskAllInputs:true,blockSelector:".obsrviq-block",noPrivacy:false,captureNetworkBodies:false,redactHeaders:["authorization","cookie","set-cookie"],sampleRate:1,recordCanvas:false,endpoint:"https://in.lumera.app",flushIntervalMs:5e3,continueSession:false,sessionTimeoutMs:1800*1e3,requireConsent:false,askPermission:false,showRecording:false,autoStart:true,maxArgBytes:8*1024},Xn=class{constructor(){this.config=null;this.clock=null;this.transport=null;this.teardowns=[];this.meta=null;this.recording=false;this.consent=null;this.sampledIn=true;this.manualStartRequested=false;this.lastActivity=0;this.nextSeq=0;this.openTasks=new Map;this.consentUnmount=null;this.recDotUnmount=null;this.diag={recording:false,sessionId:null,flushes:0,bytesSent:0,eventsSent:0,eventsQueued:0};}get sessionId(){return this.diag.sessionId}init(t){if(this.config)return;if(!t.siteKey){console.warn("[obsrviq] init() called without siteKey \u2014 recording disabled.");return}this.config={...Lc,..._c(t)},this.config.noPrivacy&&t.maskAllInputs===void 0&&(this.config.maskAllInputs=false),this.config.askPermission&&(this.config.requireConsent=true);let r=Array.isArray(t.maskKeys)?t.maskKeys:[];if(ir(r),this.loadRemoteMaskKeys(r),this.startSession(),t.userId!=null&&this.applyUserId(t.userId),t.metadata&&this.meta&&(this.meta.metadata={...t.metadata}),Hn()){this.consent=false;return}this.config.requireConsent?this.config.askPermission&&(this.consentUnmount=oa(this.config.blockSelector,this.config.consentText,()=>this.setConsent(true),()=>this.setConsent(false))):this.maybeStart();}async loadRemoteMaskKeys(t){let r=this.config;if(!r||typeof fetch>"u"){sr();return}try{let i=new AbortController,n=setTimeout(()=>i.abort(),2e3);try{let a=`${r.endpoint.replace(/\/$/,"")}/v1/config?key=${encodeURIComponent(r.siteKey)}`,c=await fetch(a,{credentials:"omit",mode:"cors",signal:i.signal});if(c.ok){let p=await c.json(),o=Array.isArray(p.maskKeys)?p.maskKeys.filter(h=>typeof h=="string"):[];ir([...t,...o]);}}finally{clearTimeout(n);}}catch{}finally{sr();}}startSession(t=true){let r=this.config,i=Date.now(),n=null;if(r.continueSession){let c=ua();c&&i-c.lastActivity<r.sessionTimeoutMs&&!(r.userId!=null&&c.userId!=null&&c.userId!==String(r.userId))&&(n=c);}let a=n?n.id:$();this.clock=n?new at(n.startedAt,n.lastT):new at,this.currentUserId=n?.userId??(t&&r.userId!=null?String(r.userId):void 0),this.nextSeq=n?n.seq:0,this.diag.sessionId=a,this.meta={startedAt:this.clock.startedAt,entryUrl:location.href,device:To()},this.sampledIn=n?true:Math.random()<(r.sampleRate??1),this.transport=new pt({endpoint:r.endpoint,siteKey:r.siteKey,sessionId:a,getMeta:()=>this.meta??void 0,beforeSend:r.beforeSend,flushIntervalMs:r.flushIntervalMs,startSeq:this.nextSeq,onSeqDispatch:c=>{this.nextSeq=c,this.persistSession();},onFlush:({bytes:c,events:p,ok:o})=>{o&&(this.diag.flushes++,this.diag.bytesSent+=c,this.diag.eventsSent+=p);}}),this.recording=false,this.diag.recording=false;}persistSession(){!this.config?.continueSession||!this.recording||!this.clock||!this.diag.sessionId||ca({id:this.diag.sessionId,startedAt:this.clock.startedAt,lastActivity:Date.now(),seq:this.nextSeq,lastT:this.clock.now(),userId:this.currentUserId});}maybeStart(){if(this.recording||!this.config||!this.clock||!this.transport||this.config.autoStart===false&&!this.manualStartRequested||this.config.requireConsent&&this.consent!==true||this.consent===false||!this.sampledIn)return;if(this.meta&&this.meta.visitorId==null){let r=pa(Date.now());this.meta.visitorId=r.id,this.meta.visitCount=r.visits,this.meta.firstSeenAt=r.firstSeenAt;}let t={clock:this.clock,sessionId:this.diag.sessionId,config:this.config,emit:r=>{this.transport.enqueue(r),this.diag.eventsQueued++;},markActivity:()=>{this.lastActivity=this.clock.now();},lastActivityT:()=>this.lastActivity};this.transport.start(),this.teardowns.push(Po(t)),this.teardowns.push(qo(t)),this.teardowns.push(Vo(t)),this.teardowns.push(Go(t)),this.teardowns.push(Yo(t)),this.teardowns.push(Jo(t)),this.teardowns.push(ea(t)),this.teardowns.push(ta(t)),this.teardowns.push(ra(t)),this.teardowns.push(Ao(t)),this.recording=true,this.diag.recording=true,this.persistSession(),this.config.showRecording&&!this.recDotUnmount&&(this.recDotUnmount=aa(this.config.blockSelector));}identify(t,r){if(!this.meta)return;let i=String(t);this.config?.continueSession&&this.currentUserId!=null&&this.currentUserId!==i&&this.reset(),this.currentUserId=i,this.applyUserId(i),r&&this.mergeMetadata(r),this.track("identify",{hasTraits:!!r}),this.flush(),this.persistSession();}setMetadata(t){this.meta&&(this.mergeMetadata(t),this.track("metadata",{keys:Object.keys(t)}),this.flush());}reset(){if(!this.config)return;let t=this.recording;this.recording&&this.teardown(),fa(),this.currentUserId=void 0,this.startSession(false),t&&this.consent!==false&&!Hn()&&this.maybeStart();}applyUserId(t){let r=String(t);this.meta&&(this.meta.userId=r),No(r).then(i=>{this.meta&&this.meta.userId===r&&(this.meta.identityHash=i);});}mergeMetadata(t){this.meta&&(this.meta.metadata={...this.meta.metadata??{},...t});}track(t,r){!this.recording||!this.clock||!this.transport||(this.transport.enqueue({id:$(),sessionId:this.diag.sessionId,type:"custom",t:this.clock.now(),ts:this.clock.wall(),name:t,props:r}),this.diag.eventsQueued++);}conversion(t,r){let i=String(t).trim();i&&this.track(i,{...r,conversion:true});}tag(...t){let r=t.map(i=>String(i).trim()).filter(Boolean);r.length&&(this.track("_tag",{tags:r}),this.flush());}startTask(t,r){let i=String(t).trim(),n=$(),a=this.clock?this.clock.now():0;return i&&(this.openTasks.set(i,{spanId:n,startT:a}),this.track(`${i}:started`,{...r,spanId:n,task:i})),{end:c=>this.endTask(i,c)}}endTask(t,r){let i=String(t).trim();if(!i)return;let n=this.openTasks.get(i);this.openTasks.delete(i);let a=n?.spanId??$();this.track(`${i}:ended`,{...r,spanId:a,task:i,...n?{startT:n.startT}:{}});}setConsent(t){this.consent=t,this.consentUnmount?.(),this.consentUnmount=null,t?this.maybeStart():this.recording&&this.teardown();}startRecording(){this.manualStartRequested=true,this.maybeStart();}stopRecording(){this.manualStartRequested=false,this.recording&&this.teardown();}stop(){this.teardown();}flush(){return this.transport?this.transport.flush("manual"):Promise.resolve(true)}getDiagnostics(){return {...this.diag}}teardown(){for(let t of this.teardowns.splice(0))try{t();}catch{}this.recDotUnmount?.(),this.recDotUnmount=null,this.transport?.stop(),this.recording=false,this.diag.recording=false;}};function _c(e){let t={};for(let[r,i]of Object.entries(e))i!==void 0&&(t[r]=i);return t}var Yt=new Xn;var pe=document.currentScript;function ze(e,t){return e==null?t:e==="true"||e==="1"}function ve(e,t){return e.getAttribute(`data-obsrviq-${t}`)??e.getAttribute(`data-lumera-${t}`)}if(pe){let e=ve(pe,"key");if(e){let t={siteKey:e,endpoint:ve(pe,"endpoint")||void 0,maskAllInputs:ze(ve(pe,"mask-inputs"),true),captureNetworkBodies:ze(ve(pe,"capture-bodies"),false),requireConsent:ze(ve(pe,"require-consent"),false),askPermission:ze(ve(pe,"ask-permission"),false),showRecording:ze(ve(pe,"show-recording"),false),recordCanvas:ze(ve(pe,"record-canvas"),false),autoStart:ze(ve(pe,"auto-start"),true)},r=ve(pe,"sample-rate");r&&(t.sampleRate=Number(r));let i=ve(pe,"user-id");i&&(t.userId=i);let n=ve(pe,"metadata");if(n)try{t.metadata=JSON.parse(n);}catch{console.warn("[obsrviq] data-obsrviq-metadata is not valid JSON \u2014 ignored.");}Yt.init(t);}}window.Obsrviq=Yt;window.Lumera=Yt;/*! Bundled license information:
|
|
171
|
+
`;function pa(e,t,r,i){let{host:n,root:o}=fa(e);ha(o,rf);let l=t??{},p=document.createElement("div");p.className="card",p.setAttribute("role","dialog"),p.setAttribute("aria-label",l.title||"Session recording consent");let a=document.createElement("div");a.className="dot",a.setAttribute("aria-hidden","true");let h=document.createElement("div");h.className="txt";let s=document.createElement("div");s.className="title",s.textContent=l.title||"We record this session to improve the experience.";let f=document.createElement("div");f.className="body",f.textContent=l.body||"No passwords or typed input are captured.",h.append(s,f);let c=document.createElement("div");c.className="actions";let u=document.createElement("button");u.type="button",u.className="deny",u.textContent=l.deny||"Decline";let m=document.createElement("button");m.type="button",m.className="allow",m.textContent=l.allow||"Allow",c.append(u,m),p.append(a,h,c),o.appendChild(p),da(n),requestAnimationFrame(()=>p.classList.add("in"));let d=false,g=()=>{n.parentNode&&n.parentNode.removeChild(n);},S=y=>()=>{d||(d=true,g(),y());};return m.addEventListener("click",S(r)),u.addEventListener("click",S(i)),g}function ma(e){let{host:t,root:r}=fa(e);ha(r,nf);let i=document.createElement("div");return i.className="recdot",i.setAttribute("role","status"),i.setAttribute("aria-label","Session recording in progress"),r.appendChild(i),da(t),()=>{t.parentNode&&t.parentNode.removeChild(t);}}var ga="obsrviq.visitor",ri="obsrviq.session";function ya(){let e=ba(ri);if(!e)return null;try{let t=JSON.parse(e);if(t&&typeof t.id=="string"&&t.id&&typeof t.startedAt=="number")return {id:t.id,startedAt:t.startedAt,lastActivity:typeof t.lastActivity=="number"?t.lastActivity:t.startedAt,seq:typeof t.seq=="number"&&t.seq>=0?t.seq:0,lastT:typeof t.lastT=="number"&&t.lastT>=0?t.lastT:void 0,userId:typeof t.userId=="string"?t.userId:void 0}}catch{}return null}function va(e){Sa(ri,JSON.stringify(e));}function wa(){if(!(typeof window>"u"))try{window.localStorage.removeItem(ri);}catch{}}function ba(e){if(typeof window>"u")return null;try{return window.localStorage.getItem(e)}catch{return null}}function Sa(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,t);}catch{}}function Ca(e){let t=null,r=ba(ga);if(r)try{let n=JSON.parse(r);n&&typeof n.id=="string"&&n.id&&(t={id:n.id,firstSeenAt:typeof n.firstSeenAt=="number"?n.firstSeenAt:e,lastSeenAt:typeof n.lastSeenAt=="number"?n.lastSeenAt:e,visits:typeof n.visits=="number"&&n.visits>0?n.visits:1});}catch{}let i=t?{...t,visits:t.visits+1,lastSeenAt:e}:{id:$(),firstSeenAt:e,lastSeenAt:e,visits:1};return Sa(ga,JSON.stringify(i)),i}var sf={maskAllInputs:true,blockSelector:".obsrviq-block",noPrivacy:false,captureNetworkBodies:false,redactHeaders:["authorization","cookie","set-cookie"],tracePropagation:false,traceHosts:[],sampleRate:1,recordCanvas:false,endpoint:"https://in.lumera.app",flushIntervalMs:5e3,continueSession:false,sessionTimeoutMs:1800*1e3,requireConsent:false,askPermission:false,showRecording:false,autoStart:true,maxArgBytes:8*1024},ni=class{constructor(){this.config=null;this.clock=null;this.transport=null;this.teardowns=[];this.meta=null;this.recording=false;this.consent=null;this.sampledIn=true;this.manualStartRequested=false;this.lastActivity=0;this.nextSeq=0;this.openTasks=new Map;this.consentUnmount=null;this.recDotUnmount=null;this.diag={recording:false,sessionId:null,flushes:0,bytesSent:0,eventsSent:0,eventsQueued:0};}get sessionId(){return this.diag.sessionId}init(t){if(this.config)return;if(!t.siteKey){console.warn("[obsrviq] init() called without siteKey \u2014 recording disabled.");return}this.config={...sf,...of(t)},this.config.noPrivacy&&t.maskAllInputs===void 0&&(this.config.maskAllInputs=false),this.config.askPermission&&(this.config.requireConsent=true);let r=Array.isArray(t.maskKeys)?t.maskKeys:[];if(ur(r),this.loadRemoteMaskKeys(r),this.startSession(),t.userId!=null&&this.applyUserId(t.userId),t.metadata&&this.meta&&(this.meta.metadata={...t.metadata}),Xn()){this.consent=false;return}this.config.requireConsent?this.config.askPermission&&(this.consentUnmount=pa(this.config.blockSelector,this.config.consentText,()=>this.setConsent(true),()=>this.setConsent(false))):this.maybeStart();}async loadRemoteMaskKeys(t){let r=this.config;if(!r||typeof fetch>"u"){cr();return}try{let i=new AbortController,n=setTimeout(()=>i.abort(),2e3);try{let o=`${r.endpoint.replace(/\/$/,"")}/v1/config?key=${encodeURIComponent(r.siteKey)}`,l=await fetch(o,{credentials:"omit",mode:"cors",signal:i.signal});if(l.ok){let p=await l.json(),a=Array.isArray(p.maskKeys)?p.maskKeys.filter(h=>typeof h=="string"):[];ur([...t,...a]);}}finally{clearTimeout(n);}}catch{}finally{cr();}}startSession(t=true){let r=this.config,i=Date.now(),n=null;if(r.continueSession){let l=ya();l&&i-l.lastActivity<r.sessionTimeoutMs&&!(r.userId!=null&&l.userId!=null&&l.userId!==String(r.userId))&&(n=l);}let o=n?n.id:$();this.clock=n?new ct(n.startedAt,n.lastT):new ct,this.currentUserId=n?.userId??(t&&r.userId!=null?String(r.userId):void 0),this.nextSeq=n?n.seq:0,this.diag.sessionId=o,this.meta={startedAt:this.clock.startedAt,entryUrl:location.href,device:Fo()},this.sampledIn=n?true:Math.random()<(r.sampleRate??1),this.transport=new gt({endpoint:r.endpoint,siteKey:r.siteKey,sessionId:o,getMeta:()=>this.meta??void 0,beforeSend:r.beforeSend,flushIntervalMs:r.flushIntervalMs,startSeq:this.nextSeq,onSeqDispatch:l=>{this.nextSeq=l,this.persistSession();},onDomDrop:()=>Bo(),onFlush:({bytes:l,events:p,ok:a})=>{a&&(this.diag.flushes++,this.diag.bytesSent+=l,this.diag.eventsSent+=p);}}),this.recording=false,this.diag.recording=false;}persistSession(){!this.config?.continueSession||!this.recording||!this.clock||!this.diag.sessionId||va({id:this.diag.sessionId,startedAt:this.clock.startedAt,lastActivity:Date.now(),seq:this.nextSeq,lastT:this.clock.now(),userId:this.currentUserId});}maybeStart(){if(this.recording||!this.config||!this.clock||!this.transport||this.config.autoStart===false&&!this.manualStartRequested||this.config.requireConsent&&this.consent!==true||this.consent===false||!this.sampledIn)return;if(this.meta&&this.meta.visitorId==null){let r=Ca(Date.now());this.meta.visitorId=r.id,this.meta.visitCount=r.visits,this.meta.firstSeenAt=r.firstSeenAt;}let t={clock:this.clock,sessionId:this.diag.sessionId,config:this.config,emit:r=>{this.transport.enqueue(r),this.diag.eventsQueued++;},markActivity:()=>{this.lastActivity=this.clock.now();},lastActivityT:()=>this.lastActivity};this.transport.start(),this.teardowns.push(Wo(t)),this.teardowns.push(Ko(t)),this.teardowns.push(ea(t)),this.teardowns.push(ta(t)),this.teardowns.push(ra(t)),this.teardowns.push(ia(t)),this.teardowns.push(la(t)),this.teardowns.push(ua(t)),this.teardowns.push(ca(t)),this.teardowns.push(Uo(t)),this.recording=true,this.diag.recording=true,this.persistSession(),this.config.showRecording&&!this.recDotUnmount&&(this.recDotUnmount=ma(this.config.blockSelector));}identify(t,r){if(!this.meta)return;let i=String(t);this.config?.continueSession&&this.currentUserId!=null&&this.currentUserId!==i&&this.reset(),this.currentUserId=i,this.applyUserId(i),r&&this.mergeMetadata(r),this.track("identify",{hasTraits:!!r}),this.flush(),this.persistSession();}setMetadata(t){this.meta&&(this.mergeMetadata(t),this.track("metadata",{keys:Object.keys(t)}),this.flush());}reset(){if(!this.config)return;let t=this.recording;this.recording&&this.teardown(),wa(),this.currentUserId=void 0,this.startSession(false),t&&this.consent!==false&&!Xn()&&this.maybeStart();}applyUserId(t){let r=String(t);this.meta&&(this.meta.userId=r),_o(r).then(i=>{this.meta&&this.meta.userId===r&&(this.meta.identityHash=i);});}mergeMetadata(t){this.meta&&(this.meta.metadata={...this.meta.metadata??{},...t});}track(t,r){!this.recording||!this.clock||!this.transport||(this.transport.enqueue({id:$(),sessionId:this.diag.sessionId,type:"custom",t:this.clock.now(),ts:this.clock.wall(),name:t,props:r}),this.diag.eventsQueued++);}conversion(t,r){let i=String(t).trim();i&&this.track(i,{...r,conversion:true});}tag(...t){let r=t.map(i=>String(i).trim()).filter(Boolean);r.length&&(this.track("_tag",{tags:r}),this.flush());}startTask(t,r){let i=String(t).trim(),n=$(),o=this.clock?this.clock.now():0;return i&&(this.openTasks.set(i,{spanId:n,startT:o}),this.track(`${i}:started`,{...r,spanId:n,task:i})),{end:l=>this.endTask(i,l)}}endTask(t,r){let i=String(t).trim();if(!i)return;let n=this.openTasks.get(i);this.openTasks.delete(i);let o=n?.spanId??$();this.track(`${i}:ended`,{...r,spanId:o,task:i,...n?{startT:n.startT}:{}});}setConsent(t){this.consent=t,this.consentUnmount?.(),this.consentUnmount=null,t?this.maybeStart():this.recording&&this.teardown();}startRecording(){this.manualStartRequested=true,this.maybeStart();}stopRecording(){this.manualStartRequested=false,this.recording&&this.teardown();}stop(){this.teardown();}flush(){return this.transport?this.transport.flush("manual"):Promise.resolve(true)}getDiagnostics(){return {...this.diag}}teardown(){for(let t of this.teardowns.splice(0))try{t();}catch{}this.recDotUnmount?.(),this.recDotUnmount=null,this.transport?.stop(),this.recording=false,this.diag.recording=false;}};function of(e){let t={};for(let[r,i]of Object.entries(e))i!==void 0&&(t[r]=i);return t}var Zt=new ni;var pe=document.currentScript;function qe(e,t){return e==null?t:e==="true"||e==="1"}function ve(e,t){return e.getAttribute(`data-obsrviq-${t}`)??e.getAttribute(`data-lumera-${t}`)}if(pe){let e=ve(pe,"key");if(e){let t={siteKey:e,endpoint:ve(pe,"endpoint")||void 0,maskAllInputs:qe(ve(pe,"mask-inputs"),true),captureNetworkBodies:qe(ve(pe,"capture-bodies"),false),requireConsent:qe(ve(pe,"require-consent"),false),askPermission:qe(ve(pe,"ask-permission"),false),showRecording:qe(ve(pe,"show-recording"),false),recordCanvas:qe(ve(pe,"record-canvas"),false),autoStart:qe(ve(pe,"auto-start"),true)},r=ve(pe,"sample-rate");r&&(t.sampleRate=Number(r));let i=ve(pe,"user-id");i&&(t.userId=i);let n=ve(pe,"metadata");if(n)try{t.metadata=JSON.parse(n);}catch{console.warn("[obsrviq] data-obsrviq-metadata is not valid JSON \u2014 ignored.");}Zt.init(t);}}window.Obsrviq=Zt;window.Lumera=Zt;/*! Bundled license information:
|
|
172
172
|
|
|
173
173
|
rrweb/dist/rrweb.js:
|
|
174
174
|
(*! *****************************************************************************
|
|
@@ -185,5 +185,5 @@ rrweb/dist/rrweb.js:
|
|
|
185
185
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
186
186
|
PERFORMANCE OF THIS SOFTWARE.
|
|
187
187
|
***************************************************************************** *)
|
|
188
|
-
*/exports.Obsrviq=
|
|
188
|
+
*/exports.Obsrviq=Zt;return exports;})({});//# sourceMappingURL=obsrviq.global.js.map
|
|
189
189
|
//# sourceMappingURL=obsrviq.global.js.map
|