blocfeed 0.20.0 → 0.22.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/CHANGELOG.md +75 -0
- package/dist/{chunk-X4ON6DOW.cjs → chunk-WAMNK7BQ.cjs} +3 -3
- package/dist/{chunk-VWILLYYY.js → chunk-XF3APCYE.js} +3 -3
- package/dist/{controller-DrQ--KwA.d.cts → controller-BPGXlZKD.d.cts} +1 -1
- package/dist/{controller-DrQ--KwA.d.ts → controller-BPGXlZKD.d.ts} +1 -1
- package/dist/engine.cjs +1 -1
- package/dist/engine.d.cts +2 -2
- package/dist/engine.d.ts +2 -2
- package/dist/engine.js +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.d.cts +10 -3
- package/dist/main.d.ts +10 -3
- package/dist/main.js +1 -1
- package/dist/passive.cjs +1 -0
- package/dist/passive.d.cts +62 -0
- package/dist/passive.d.ts +62 -0
- package/dist/passive.js +1 -0
- package/dist/script.js +71 -0
- package/package.json +9 -1
package/dist/script.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var BlocFeedScript=(function(exports){'use strict';var Ul=Object.defineProperty;var de=(r,e)=>()=>(r&&(e=r(r=0)),e);var Wl=(r,e)=>{for(var t in e)Ul(r,t,{get:e[t],enumerable:true});};function al(r,e){if(r.match(/^[a-z]+:\/\//i))return r;if(r.match(/^\/\//))return window.location.protocol+r;if(r.match(/^[a-z]+:/i))return r;let t=document.implementation.createHTMLDocument(),n=t.createElement("base"),s=t.createElement("a");return t.head.appendChild(n),t.body.appendChild(s),e&&(n.href=e),s.href=r,s.href}function fe(r){let e=[];for(let t=0,n=r.length;t<n;t++)e.push(r[t]);return e}function Yr(r={}){return Ke||(r.includeStyleProperties?(Ke=r.includeStyleProperties,Ke):(Ke=fe(window.getComputedStyle(document.documentElement)),Ke))}function jr(r,e){let n=(r.ownerDocument.defaultView||window).getComputedStyle(r).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function Vp(r){let e=jr(r,"border-left-width"),t=jr(r,"border-right-width");return r.clientWidth+e+t}function Gp(r){let e=jr(r,"border-top-width"),t=jr(r,"border-bottom-width");return r.clientHeight+e+t}function Xr(r,e={}){let t=e.width||Vp(r),n=e.height||Gp(r);return {width:t,height:n}}function cl(){let r,e;try{e=process;}catch(n){}let t=e&&e.env?e.env.devicePixelRatio:null;return t&&(r=parseInt(t,10),Number.isNaN(r)&&(r=1)),r||window.devicePixelRatio||1}function ul(r){(r.width>ne||r.height>ne)&&(r.width>ne&&r.height>ne?r.width>r.height?(r.height*=ne/r.width,r.width=ne):(r.width*=ne/r.height,r.height=ne):r.width>ne?(r.height*=ne/r.width,r.width=ne):(r.width*=ne/r.height,r.height=ne));}function fl(r,e={}){return r.toBlob?new Promise(t=>{r.toBlob(t,e.type?e.type:"image/png",e.quality?e.quality:1);}):new Promise(t=>{let n=window.atob(r.toDataURL(e.type?e.type:void 0,e.quality?e.quality:void 0).split(",")[1]),s=n.length,i=new Uint8Array(s);for(let o=0;o<s;o+=1)i[o]=n.charCodeAt(o);t(new Blob([i],{type:e.type?e.type:"image/png"}));})}function qe(r){return new Promise((e,t)=>{let n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>e(n));});},n.onerror=t,n.crossOrigin="anonymous",n.decoding="async",n.src=r;})}async function jp(r){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(r)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function hl(r,e,t){let n="http://www.w3.org/2000/svg",s=document.createElementNS(n,"svg"),i=document.createElementNS(n,"foreignObject");return s.setAttribute("width",`${e}`),s.setAttribute("height",`${t}`),s.setAttribute("viewBox",`0 0 ${e} ${t}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),s.appendChild(i),i.appendChild(r),jp(s)}var ll,Ke,ne,J,ke=de(()=>{ll=(()=>{let r=0,e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return ()=>(r+=1,`u${e()}${r}`)})();Ke=null;ne=16384;J=(r,e)=>{if(r instanceof e)return true;let t=Object.getPrototypeOf(r);return t===null?false:t.constructor.name===e.name||J(t,e)};});function Yp(r){let e=r.getPropertyValue("content");return `${r.cssText} content: '${e.replace(/'|"/g,"")}';`}function Xp(r,e){return Yr(e).map(t=>{let n=r.getPropertyValue(t),s=r.getPropertyPriority(t);return `${t}: ${n}${s?" !important":""};`}).join(" ")}function Zp(r,e,t,n){let s=`.${r}:${e}`,i=t.cssText?Yp(t):Xp(t,n);return document.createTextNode(`${s}{${i}}`)}function dl(r,e,t,n){let s=window.getComputedStyle(r,t),i=s.getPropertyValue("content");if(i===""||i==="none")return;let o=ll();try{e.className=`${e.className} ${o}`;}catch(a){return}let l=document.createElement("style");l.appendChild(Zp(o,t,s,n)),e.appendChild(l);}function pl(r,e,t){dl(r,e,":before",t),dl(r,e,":after",t);}var ml=de(()=>{ke();});function Kp(r){let e=/\.([^./]*?)$/g.exec(r);return e?e[1]:""}function Qe(r){let e=Kp(r).toLowerCase();return Jp[e]||""}var gl,yl,Jp,Zr=de(()=>{gl="application/font-woff",yl="image/jpeg",Jp={woff:gl,woff2:gl,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:yl,jpeg:yl,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};});function qp(r){return r.split(/,/)[1]}function Rt(r){return r.search(/^(data:)/)!==-1}function Ls(r,e){return `data:${e};base64,${r}`}async function Ps(r,e,t){let n=await fetch(r,e);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);let s=await n.blob();return new Promise((i,o)=>{let l=new FileReader;l.onerror=o,l.onloadend=()=>{try{i(t({res:n,result:l.result}));}catch(a){o(a);}},l.readAsDataURL(s);})}function Qp(r,e,t){let n=r.replace(/\?.*/,"");return t&&(n=r),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),e?`[${e}]${n}`:n}async function et(r,e,t){let n=Qp(r,e,t.includeQueryParams);if(Ds[n]!=null)return Ds[n];t.cacheBust&&(r+=(/\?/.test(r)?"&":"?")+new Date().getTime());let s;try{let i=await Ps(r,t.fetchRequestInit,({res:o,result:l})=>(e||(e=o.headers.get("Content-Type")||""),qp(l)));s=Ls(i,e);}catch(i){s=t.imagePlaceholder||"";let o=`Failed to fetch resource: ${r}`;i&&(o=typeof i=="string"?i:i.message),o&&console.warn(o);}return Ds[n]=s,s}var Ds,Mt=de(()=>{Ds={};});async function em(r){let e=r.toDataURL();return e==="data:,"?r.cloneNode(false):qe(e)}async function tm(r,e){if(r.currentSrc){let i=document.createElement("canvas"),o=i.getContext("2d");i.width=r.clientWidth,i.height=r.clientHeight,o==null||o.drawImage(r,0,0,i.width,i.height);let l=i.toDataURL();return qe(l)}let t=r.poster,n=Qe(t),s=await et(t,n,e);return qe(s)}async function rm(r,e){var t;try{if(!((t=r==null?void 0:r.contentDocument)===null||t===void 0)&&t.body)return await At(r.contentDocument.body,e,!0)}catch(n){}return r.cloneNode(false)}async function nm(r,e){return J(r,HTMLCanvasElement)?em(r):J(r,HTMLVideoElement)?tm(r,e):J(r,HTMLIFrameElement)?rm(r,e):r.cloneNode(bl(r))}async function im(r,e,t){var n,s;if(bl(e))return e;let i=[];return sm(r)&&r.assignedNodes?i=fe(r.assignedNodes()):J(r,HTMLIFrameElement)&&(!((n=r.contentDocument)===null||n===void 0)&&n.body)?i=fe(r.contentDocument.body.childNodes):i=fe(((s=r.shadowRoot)!==null&&s!==void 0?s:r).childNodes),i.length===0||J(r,HTMLVideoElement)||await i.reduce((o,l)=>o.then(()=>At(l,t)).then(a=>{a&&e.appendChild(a);}),Promise.resolve()),e}function om(r,e,t){let n=e.style;if(!n)return;let s=window.getComputedStyle(r);s.cssText?(n.cssText=s.cssText,n.transformOrigin=s.transformOrigin):Yr(t).forEach(i=>{let o=s.getPropertyValue(i);i==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),J(r,HTMLIFrameElement)&&i==="display"&&o==="inline"&&(o="block"),i==="d"&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(i,o,s.getPropertyPriority(i));});}function am(r,e){J(r,HTMLTextAreaElement)&&(e.innerHTML=r.value),J(r,HTMLInputElement)&&e.setAttribute("value",r.value);}function lm(r,e){if(J(r,HTMLSelectElement)){let n=Array.from(e.children).find(s=>r.value===s.getAttribute("value"));n&&n.setAttribute("selected","");}}function cm(r,e,t){return J(e,Element)&&(om(r,e,t),pl(r,e,t),am(r,e),lm(r,e)),e}async function um(r,e){let t=r.querySelectorAll?r.querySelectorAll("use"):[];if(t.length===0)return r;let n={};for(let i=0;i<t.length;i++){let l=t[i].getAttribute("xlink:href");if(l){let a=r.querySelector(l),c=document.querySelector(l);!a&&c&&!n[l]&&(n[l]=await At(c,e,true));}}let s=Object.values(n);if(s.length){let i="http://www.w3.org/1999/xhtml",o=document.createElementNS(i,"svg");o.setAttribute("xmlns",i),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";let l=document.createElementNS(i,"defs");o.appendChild(l);for(let a=0;a<s.length;a++)l.appendChild(s[a]);r.appendChild(o);}return r}async function At(r,e,t){return !t&&e.filter&&!e.filter(r)?null:Promise.resolve(r).then(n=>nm(n,e)).then(n=>im(r,n,e)).then(n=>cm(r,n,e)).then(n=>um(n,e))}var sm,bl,wl=de(()=>{ml();ke();Zr();Mt();sm=r=>r.tagName!=null&&r.tagName.toUpperCase()==="SLOT",bl=r=>r.tagName!=null&&r.tagName.toUpperCase()==="SVG";});function dm(r){let e=r.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function pm(r){let e=[];return r.replace(vl,(t,n,s)=>(e.push(s),t)),e.filter(t=>!Rt(t))}async function mm(r,e,t,n,s){try{let i=t?al(e,t):e,o=Qe(e),l;if(s);else l=await et(i,o,n);return r.replace(dm(e),`$1${l}$3`)}catch(i){}return r}function gm(r,{preferredFontFormat:e}){return e?r.replace(hm,t=>{for(;;){let[n,,s]=fm.exec(t)||[];if(!s)return "";if(s===e)return `src: ${n};`}}):r}function $s(r){return r.search(vl)!==-1}async function Jr(r,e,t){if(!$s(r))return r;let n=gm(r,t);return pm(n).reduce((i,o)=>i.then(l=>mm(l,o,e,t)),Promise.resolve(n))}var vl,fm,hm,Fs=de(()=>{ke();Zr();Mt();vl=/url\((['"]?)([^'"]+?)\1\)/g,fm=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,hm=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;});async function tt(r,e,t){var n;let s=(n=e.style)===null||n===void 0?void 0:n.getPropertyValue(r);if(s){let i=await Jr(s,null,t);return e.style.setProperty(r,i,e.style.getPropertyPriority(r)),true}return false}async function ym(r,e){await tt("background",r,e)||await tt("background-image",r,e),await tt("mask",r,e)||await tt("-webkit-mask",r,e)||await tt("mask-image",r,e)||await tt("-webkit-mask-image",r,e);}async function bm(r,e){let t=J(r,HTMLImageElement);if(!(t&&!Rt(r.src))&&!(J(r,SVGImageElement)&&!Rt(r.href.baseVal)))return;let n=t?r.src:r.href.baseVal,s=await et(n,Qe(n),e);await new Promise((i,o)=>{r.onload=i,r.onerror=e.onImageErrorHandler?(...a)=>{try{i(e.onImageErrorHandler(...a));}catch(c){o(c);}}:o;let l=r;l.decode&&(l.decode=i),l.loading==="lazy"&&(l.loading="eager"),t?(r.srcset="",r.src=s):r.href.baseVal=s;});}async function wm(r,e){let n=fe(r.childNodes).map(s=>Bs(s,e));await Promise.all(n).then(()=>r);}async function Bs(r,e){J(r,Element)&&(await ym(r,e),await bm(r,e),await wm(r,e));}var Sl=de(()=>{Fs();ke();Mt();Zr();});function Cl(r,e){let{style:t}=r;e.backgroundColor&&(t.backgroundColor=e.backgroundColor),e.width&&(t.width=`${e.width}px`),e.height&&(t.height=`${e.height}px`);let n=e.style;return n!=null&&Object.keys(n).forEach(s=>{t[s]=n[s];}),r}var El=de(()=>{});async function xl(r){let e=Il[r];if(e!=null)return e;let n=await(await fetch(r)).text();return e={url:r,cssText:n},Il[r]=e,e}async function Rl(r,e){let t=r.cssText,n=/url\(["']?([^"')]+)["']?\)/g,i=(t.match(/url\([^)]+\)/g)||[]).map(async o=>{let l=o.replace(n,"$1");return l.startsWith("https://")||(l=new URL(l,r.url).href),Ps(l,e.fetchRequestInit,({result:a})=>(t=t.replace(o,`url(${a})`),[o,a]))});return Promise.all(i).then(()=>t)}function Ml(r){if(r==null)return [];let e=[],t=/(\/\*[\s\S]*?\*\/)/gi,n=r.replace(t,""),s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let a=s.exec(n);if(a===null)break;e.push(a[0]);}n=n.replace(s,"");let i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(o,"gi");for(;;){let a=i.exec(n);if(a===null){if(a=l.exec(n),a===null)break;i.lastIndex=l.lastIndex;}else l.lastIndex=i.lastIndex;e.push(a[0]);}return e}async function vm(r,e){let t=[],n=[];return r.forEach(s=>{if("cssRules"in s)try{fe(s.cssRules||[]).forEach((i,o)=>{if(i.type===CSSRule.IMPORT_RULE){let l=o+1,a=i.href,c=xl(a).then(u=>Rl(u,e)).then(u=>Ml(u).forEach(f=>{try{s.insertRule(f,f.startsWith("@import")?l+=1:s.cssRules.length);}catch(h){console.error("Error inserting rule from remote css",{rule:f,error:h});}})).catch(u=>{console.error("Error loading remote css",u.toString());});n.push(c);}});}catch(i){let o=r.find(l=>l.href==null)||document.styleSheets[0];s.href!=null&&n.push(xl(s.href).then(l=>Rl(l,e)).then(l=>Ml(l).forEach(a=>{o.insertRule(a,o.cssRules.length);})).catch(l=>{console.error("Error loading remote stylesheet",l);})),console.error("Error inlining remote css file",i);}}),Promise.all(n).then(()=>(r.forEach(s=>{if("cssRules"in s)try{fe(s.cssRules||[]).forEach(i=>{t.push(i);});}catch(i){console.error(`Error while reading CSS rules from ${s.href}`,i);}}),t))}function Sm(r){return r.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>$s(e.style.getPropertyValue("src")))}async function Cm(r,e){if(r.ownerDocument==null)throw new Error("Provided element is not within a Document");let t=fe(r.ownerDocument.styleSheets),n=await vm(t,e);return Sm(n)}function Al(r){return r.trim().replace(/["']/g,"")}function Em(r){let e=new Set;function t(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(i=>{e.add(Al(i));}),Array.from(n.children).forEach(i=>{i instanceof HTMLElement&&t(i);});}return t(r),e}async function Us(r,e){let t=await Cm(r,e),n=Em(r);return (await Promise.all(t.filter(i=>n.has(Al(i.style.fontFamily))).map(i=>{let o=i.parentStyleSheet?i.parentStyleSheet.href:null;return Jr(i.cssText,o,e)}))).join(`
|
|
2
|
+
`)}async function Tl(r,e){let t=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await Us(r,e);if(t){let n=document.createElement("style"),s=document.createTextNode(t);n.appendChild(s),r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n);}}var Il,Nl=de(()=>{ke();Mt();Fs();Il={};});var Ol={};Wl(Ol,{getFontEmbedCSS:()=>Am,toBlob:()=>Mm,toCanvas:()=>Tt,toJpeg:()=>Rm,toPixelData:()=>Im,toPng:()=>xm,toSvg:()=>_l});async function _l(r,e={}){let{width:t,height:n}=Xr(r,e),s=await At(r,e,true);return await Tl(s,e),await Bs(s,e),Cl(s,e),await hl(s,t,n)}async function Tt(r,e={}){let{width:t,height:n}=Xr(r,e),s=await _l(r,e),i=await qe(s),o=document.createElement("canvas"),l=o.getContext("2d"),a=e.pixelRatio||cl(),c=e.canvasWidth||t,u=e.canvasHeight||n;return o.width=c*a,o.height=u*a,e.skipAutoScale||ul(o),o.style.width=`${c}`,o.style.height=`${u}`,e.backgroundColor&&(l.fillStyle=e.backgroundColor,l.fillRect(0,0,o.width,o.height)),l.drawImage(i,0,0,o.width,o.height),o}async function Im(r,e={}){let{width:t,height:n}=Xr(r,e);return (await Tt(r,e)).getContext("2d").getImageData(0,0,t,n).data}async function xm(r,e={}){return (await Tt(r,e)).toDataURL()}async function Rm(r,e={}){return (await Tt(r,e)).toDataURL("image/jpeg",e.quality||1)}async function Mm(r,e={}){let t=await Tt(r,e);return await fl(t)}async function Am(r,e={}){return Us(r,e)}var kl=de(()=>{wl();Sl();El();Nl();ke();});var Hl={enabled:true,sampling:1,ignoreSelectors:["[data-blocfeed-ui]","[data-blocfeed-ignore]"],rageClick:{enabled:true,threshold:3,windowMs:1e3,streakIdleMs:1500},httpFail:{enabled:true,statusCodes:[400,401,403,404,408,409,422,429,500,502,503,504],ignoreUrls:["/api/behavioral-events","/api/feedback"],treatJsonErrorAsFail:false},redirectLoop:{enabled:true,threshold:3,windowMs:2e3},formDataLoss:{enabled:true},deadClick:{enabled:true,observationWindowMs:300,rateLimitPerSelector:5}};function js(r){var t,n,s,i,o,l,a,c;let e=Hl;return {enabled:(t=r==null?void 0:r.enabled)!=null?t:e.enabled,sampling:(n=r==null?void 0:r.sampling)!=null?n:e.sampling,ignoreSelectors:(s=r==null?void 0:r.ignoreSelectors)!=null?s:e.ignoreSelectors,rageClick:{...e.rageClick,...(i=r==null?void 0:r.rageClick)!=null?i:{}},httpFail:{...e.httpFail,...(o=r==null?void 0:r.httpFail)!=null?o:{}},redirectLoop:{...e.redirectLoop,...(l=r==null?void 0:r.redirectLoop)!=null?l:{}},formDataLoss:{...e.formDataLoss,...(a=r==null?void 0:r.formDataLoss)!=null?a:{}},deadClick:{...e.deadClick,...(c=r==null?void 0:r.deadClick)!=null?c:{}}}}function Ys(r){let e=[];async function t(){if(e.length===0)return;let s=e.splice(0,50);try{await fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-blocfeed-id":r.blocfeedId},body:JSON.stringify({events:s}),keepalive:!0});}catch(i){}}function n(){if(e.length===0)return;if(typeof navigator=="undefined"||typeof navigator.sendBeacon!="function"){t();return}let s=e.splice(0,50),i=new Blob([JSON.stringify({events:s})],{type:"application/json"}),o=`${r.endpoint}?_bfid=${encodeURIComponent(r.blocfeedId)}`;try{navigator.sendBeacon(o,i);}catch(l){}}return {enqueue(s){e.push(s);},flush:t,flushBeacon:n,size(){return e.length}}}function Xs(r){let e=globalThis.CSS;return typeof(e==null?void 0:e.escape)=="function"?e.escape(r):r.replace(/[^a-zA-Z0-9_-]/g,t=>{let n=t.codePointAt(0);return n===void 0?"":`\\${n.toString(16)} `})}function zl(r){return r.replace(/\s+/g," ").trim()}function De(r,e=140){let t=r.textContent;if(!t)return;let n=zl(t);if(n)return n.length<=e?n:`${n.slice(0,e-1)}\u2026`}function Vl(r){let e=1;for(let t=r.previousElementSibling;t;t=t.previousElementSibling)t.tagName===r.tagName&&(e+=1);return e}var Zs=["data-testid","data-test-id","data-test","data-qa","data-cy"],rn="data-blocfeed-component";function rt(r){let e=r.closest(`[${rn}]`);if(!e)return;let t=e.getAttribute(rn),n=t==null?void 0:t.trim();return n||void 0}function Le(r,e=5){let t=[],n=r,s=0;for(;n&&s<e*4;){let i=rt(n);if(i&&t[t.length-1]!==i&&(t.push(i),t.length>=e))break;n=n.parentElement,s++;}return t}function Pe(r,e=4){let t=r,n=0;for(;t&&n<e;){let s=t.getAttribute(rn),i=s==null?void 0:s.trim();if(i)return `bf:component:${i}`;for(let a of Zs){let c=t.getAttribute(a),u=c==null?void 0:c.trim();if(u)return `bf:testid:${u}`}let o=t.getAttribute("id"),l=o==null?void 0:o.trim();if(l&&!/^\d/.test(l))return `bf:id:${l}`;t=t.parentElement,n+=1;}return null}function Gl(r){let e=r.tagName.toLowerCase(),t=r.getAttribute("id");if(t)return `#${Xs(t)}`;for(let n of Zs){let s=r.getAttribute(n);if(s)return `${e}[${n}="${Xs(s)}"]`}return `${e}:nth-of-type(${Vl(r)})`}function $e(r,e=10){let t=[],n=r;for(;n&&t.length<e;){let s=Gl(n);if(t.unshift(s),s.startsWith("#"))break;n=n.parentElement;}return t.join(" > ")}var jl=new Set(["button","link","tab","menuitem"]);function Js(r){var t;if(r.tagName==="BUTTON")return r.disabled?null:"button";if(r.tagName==="A"||r.tagName==="a"){let n=(t=r.getAttribute("href"))==null?void 0:t.trim();return !n||n==="#"||n.toLowerCase().startsWith("javascript:")?null:"link"}let e=r.getAttribute("role");if(e&&jl.has(e))return "role";try{if(window.getComputedStyle(r).cursor==="pointer")return "cursor_pointer"}catch(n){}return null}function Ot(r,e){if(e.length===0)return false;for(let t of e)try{if(r.matches(t)||r.closest(t))return !0}catch(n){}return false}var Ks="bf_behavioral_session",kt=null;function Y(){try{let r=sessionStorage.getItem(Ks);if(r)return r;let e=qs();return sessionStorage.setItem(Ks,e),e}catch(r){return kt||(kt=qs(),kt)}}function qs(){let r=Math.random().toString(36).slice(2,10).padEnd(8,"0");return `bf_${Date.now()}_${r}`}function Dt(r){let e=0;for(let t=0;t<r.length;t++)e=e*31+r.charCodeAt(t)|0;return Math.abs(e)}function Qs(r,e){if(!r.rageClick.enabled)return ()=>{};let{threshold:t,windowMs:n,streakIdleMs:s}=r.rageClick,i=new Map;function o(f){var b,S;let h=f.target,g=h?Yl(h):false,m=h&&(b=De(h,200))!=null?b:null,p=h?h.tagName.toLowerCase():"",d=h&&h.id||null,y=h&&(S=rt(h))!=null?S:null,v=h?Le(h,5):[];return {session_id:Y(),event_type:"rage_click",page_url:typeof window=="undefined"?"":window.location.href,selector:f.selector,element_text:m,event_data:{click_count:f.timestamps.length,window_ms:n,final:true,...g?{disabled:true}:{},tag_name:p,...d?{element_id:d}:{},...y?{component_name:y}:{},...v.length>0?{parent_components:v}:{}},created_at:new Date().toISOString(),stable_key:f.stableKey}}function l(f){let h=i.get(f);h&&(h.idleTimer&&(clearTimeout(h.idleTimer),h.idleTimer=null),h.reached&&e(o(h)),i.delete(f));}function a(f){let h=i.get(f);h&&(h.idleTimer&&clearTimeout(h.idleTimer),h.idleTimer=setTimeout(()=>{l(f);},s));}function c(f){try{let h=f.target;if(!h||!(h instanceof Element)||Ot(h,r.ignoreSelectors))return;let g=$e(h,4);if(!g)return;let m=Pe(h),p=m!=null?m:g,d=Date.now(),y=i.get(p);y?(y.target=h,y.selector=g):(y={selector:g,stableKey:m,timestamps:[],reached:!1,idleTimer:null,target:h},i.set(p,y)),y.reached||(y.timestamps=y.timestamps.filter(v=>d-v<=n)),y.timestamps.push(d),a(p),!y.reached&&y.timestamps.length>=t&&(y.reached=!0);}catch(h){}}function u(){for(let f of Array.from(i.keys()))l(f);}return document.addEventListener("click",c,{capture:true,passive:true}),typeof window!="undefined"&&window.addEventListener("pagehide",u),()=>{document.removeEventListener("click",c,{capture:true}),typeof window!="undefined"&&window.removeEventListener("pagehide",u);for(let f of i.values())f.idleTimer&&clearTimeout(f.idleTimer);i.clear();}}function Yl(r){if(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true")return true;try{if(window.getComputedStyle(r).pointerEvents==="none")return !0}catch(e){}return false}var ei=0,ti=null,Pt=null,$t=[],Xl=1500;function Zl(){function r(e){var t;try{let n=e.target;if(!n)return;let s=n.closest('button[type="submit"], input[type="submit"], [data-blocfeed-submit]');if(!s)return;ei=Date.now();let i=s.closest("form");ti=(i?$e(i,3):"")||null,Pt=(t=De(s,100))!=null?t:null,$t=Le(s,5);}catch(n){}}return document.addEventListener("click",r,{capture:true,passive:true}),()=>document.removeEventListener("click",r,{capture:true})}function ri(r,e){if(!r.httpFail.enabled)return ()=>{};let{statusCodes:t,ignoreUrls:n,treatJsonErrorAsFail:s}=r.httpFail,i=new Set(t),o=Zl(),l=globalThis.fetch,a=async(h,g)=>{var y,v,b;let m=typeof h=="string"?h:h instanceof URL?h.toString():h.url,p=((v=(y=g==null?void 0:g.method)!=null?y:h.method)!=null?v:"GET").toUpperCase(),d;try{d=await l.call(globalThis,h,g);}catch(S){try{if(!Lt(m,n)){let E=S&&typeof S=="object"&&S.name==="AbortError"?"abort":"network";e(f(0,m,p,E));}}catch(E){}throw S}try{if(!Lt(m,n)&&i.has(d.status))e(f(d.status,m,p));else if(s&&!Lt(m,n)&&d.status>=200&&d.status<300){let S=(b=d.headers.get("content-type"))!=null?b:"";(S.includes("application/json")||S.includes("+json"))&&d.clone().json().then(E=>{if(Jl(E))try{e(f(d.status,m,p,"json_error"));}catch(I){}}).catch(()=>{});}}catch(S){}return d};globalThis.fetch=a;let c=XMLHttpRequest.prototype.open,u=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.open=function(h,g,...m){return this.__bf_url=g,this.__bf_method=h.toUpperCase(),c.call(this,h,g,...m)},XMLHttpRequest.prototype.send=function(h){let g=()=>{var m,p;try{let d=(m=this.__bf_url)!=null?m:"",y=(p=this.__bf_method)!=null?p:"GET";!Lt(d,n)&&i.has(this.status)&&e(f(this.status,d,y));}catch(d){}};return this.__bf_handler=g,this.addEventListener("loadend",g),u.call(this,h!=null?h:null)},()=>{globalThis.fetch=l,XMLHttpRequest.prototype.open=c,XMLHttpRequest.prototype.send=u,o(),Pt=null,$t=[];};function f(h,g,m,p){let y=Date.now()-ei<Xl;return {session_id:Y(),event_type:"error",page_url:typeof window=="undefined"?"":window.location.href,selector:null,element_text:null,event_data:{http_status:h,request_url:g,method:m,...p?{error_kind:p}:{},form_selector:y?ti:null,...y&&Pt?{button_text:Pt}:{},...y&&$t.length>0?{parent_components:$t}:{}},created_at:new Date().toISOString(),stable_key:null}}}function Jl(r){if(!r||typeof r!="object")return false;let e=r;return e.ok===false||e.success===false||"error"in e&&e.error!=null&&e.error!==false}function Lt(r,e){if(e.length===0)return false;for(let t of e)if(r.includes(t))return true;return false}var Kl=3e4;function ni(r,e){if(!r.redirectLoop.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{threshold:t,windowMs:n}=r.redirectLoop,s=new Map,i=new Map,o=history.pushState,l=history.replaceState;function a(u){var f,h;try{let g=Date.now(),m=(f=i.get(u))!=null?f:0;if(g<m)return;let d=((h=s.get(u))!=null?h:[]).filter(y=>g-y<=n);if(d.push(g),s.set(u,d),d.length>=t){let y={session_id:Y(),event_type:"thrashing",page_url:window.location.href,selector:null,element_text:null,event_data:{count:d.length,url:u,window_ms:n},created_at:new Date().toISOString(),stable_key:null};e(y),i.set(u,g+Kl),s.set(u,[]);}}catch(g){}}function c(){let u=window.location.pathname+window.location.search;a(u);}return history.pushState=function(...u){let f=o.apply(this,u);return c(),f},history.replaceState=function(...u){let f=l.apply(this,u);return c(),f},window.addEventListener("popstate",c),()=>{history.pushState=o,history.replaceState=l,window.removeEventListener("popstate",c);}}var ql=6e4;function si(r,e){if(!r.formDataLoss.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let t=new Set,n=new Map,s=new Map,i=new Map;function o(p){let d=p.closest("form");return d?d.id?`#${d.id}`:"form":null}function l(){let p=0;for(let d of n.values())p+=d;return p}function a(p){t.delete(p),n.delete(p),i.delete(p);}function c(p){var d;try{let y=p.target;if(!y||!(y instanceof HTMLInputElement||y instanceof HTMLTextAreaElement||y instanceof HTMLSelectElement))return;let v=o(y);if(!v)return;t.add(v),n.set(v,((d=n.get(v))!=null?d:0)+1);let b=y.closest("form");b&&i.set(v,b);}catch(y){}}function u(p){try{let d=p.target;if(!d||!(d instanceof HTMLFormElement))return;let y=d.id?`#${d.id}`:"form";s.set(y,Date.now()),a(y);}catch(d){}}function f(p){try{let d=p.target;if(!d||!(d instanceof HTMLFormElement))return;let y=d.id?`#${d.id}`:"form";a(y);}catch(d){}}function h(p){var E,I;if(t.size===0)return;let d=Array.from(t),y=(E=d[0])!=null?E:null,v=y&&(I=i.get(y))!=null?I:null,b=v?Pe(v):null,S={session_id:Y(),event_type:"form_abandonment",page_url:window.location.href,selector:y,element_text:null,event_data:{cause:p,field_count:l(),forms:d},created_at:new Date().toISOString(),stable_key:b};e(S);}function g(p){if(!p.persisted||t.size===0)return;let d=Date.now();for(let[,y]of s)if(d-y<ql)return;h("bfcache_restore");}function m(){h("beforeunload_after_edit");}return document.addEventListener("input",c,{capture:true,passive:true}),document.addEventListener("submit",u,{capture:true}),document.addEventListener("reset",f,{capture:true}),window.addEventListener("pageshow",g),window.addEventListener("beforeunload",m),()=>{document.removeEventListener("input",c,{capture:true}),document.removeEventListener("submit",u,{capture:true}),document.removeEventListener("reset",f,{capture:true}),window.removeEventListener("pageshow",g),window.removeEventListener("beforeunload",m);}}function Ql(){let r={urlChangeCount:0,networkCount:0,filePickerCount:0,uninstall:()=>{}},e=history.pushState,t=history.replaceState;history.pushState=function(...l){return r.urlChangeCount+=1,e.apply(this,l)},history.replaceState=function(...l){return r.urlChangeCount+=1,t.apply(this,l)};let n=()=>{r.urlChangeCount+=1;};window.addEventListener("popstate",n);let s=globalThis.fetch;if(s){let l=(a,c)=>(r.networkCount+=1,s.call(globalThis,a,c));globalThis.fetch=l;}let i=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(l,a,...c){return r.networkCount+=1,i.call(this,l,a,...c)};let o=HTMLInputElement.prototype.click;return HTMLInputElement.prototype.click=function(){return this.type==="file"&&(r.filePickerCount+=1),o.call(this)},r.uninstall=()=>{history.pushState=e,history.replaceState=t,window.removeEventListener("popstate",n),s&&(globalThis.fetch=s),XMLHttpRequest.prototype.open=i,HTMLInputElement.prototype.click=o;},r}function ii(r,e){if(!r.deadClick.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{observationWindowMs:t,rateLimitPerSelector:n}=r.deadClick,s=new Map,i=Ql();function o(l){var a,c;try{let u=l.target;if(!u||!(u instanceof Element)||l.button!==0||l.metaKey||l.ctrlKey||l.altKey||l.shiftKey||Ot(u,r.ignoreSelectors)||u.closest("label"))return;if(u instanceof HTMLInputElement){let D=u.type;if(D==="checkbox"||D==="radio"||D==="file")return}if(u instanceof HTMLSelectElement||u.closest("a[target='_blank'], a[download]")||u.closest('[contenteditable="true"]'))return;try{let D=window.getSelection();if(D&&D.toString().length>0)return}catch(D){}let f=Js(u);if(!f)return;let h=$e(u,4);if(!h)return;let g=Pe(u),m=g!=null?g:h,p=i.urlChangeCount,d=i.networkCount,y=i.filePickerCount,v=new Date().toISOString(),b=(a=De(u,200))!=null?a:null,S=u.tagName.toLowerCase(),E=u.id||null,I=(c=rt(u))!=null?c:null,P=Le(u,5),T=ec(u),$=0,F=null;if(T){F=new MutationObserver(()=>{$+=1;});try{F.observe(T,{childList:!0,attributes:!0,characterData:!0,subtree:!0});}catch(D){F=null;}}setTimeout(()=>{var C;if(F)try{F.disconnect();}catch(te){}if($>0||i.urlChangeCount!==p||i.networkCount!==d||i.filePickerCount!==y)return;let D=(C=s.get(m))!=null?C:0;if(D>=n)return;s.set(m,D+1);let K={session_id:Y(),event_type:"dead_click",page_url:typeof window=="undefined"?"":window.location.href,selector:h,element_text:b,event_data:{tag_name:S,...E?{element_id:E}:{},...I?{component_name:I}:{},...P.length>0?{parent_components:P}:{},clickable_reason:f},created_at:v,stable_key:g};e(K);},t);}catch(u){}}return document.addEventListener("click",o,{capture:true,passive:true}),()=>{document.removeEventListener("click",o,{capture:true}),i.uninstall();}}function ec(r){let e=r.closest('button, a, form, [role="button"]');return e||r.parentElement}var tc=Object.defineProperty,rc=(r,e,t)=>e in r?tc(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t,w=(r,e,t)=>rc(r,typeof e!="symbol"?e+"":e,t),oi,nc=Object.defineProperty,sc=(r,e,t)=>e in r?nc(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t,ai=(r,e,t)=>sc(r,typeof e!="symbol"?e+"":e,t),X=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(X||{}),li={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ci={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ft={},ic=()=>!!globalThis.Zone;function as(r){if(Ft[r])return Ft[r];let e=globalThis[r],t=e.prototype,n=r in li?li[r]:void 0,s=!!(n&&n.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),i=r in ci?ci[r]:void 0,o=!!(i&&i.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!ic())return Ft[r]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[r].prototype;return document.body.removeChild(l),c?Ft[r]=c:t}catch(l){return t}}var nn={};function ve(r,e,t){var n;let s=`${r}.${String(t)}`;if(nn[s])return nn[s].call(e);let i=as(r),o=(n=Object.getOwnPropertyDescriptor(i,t))==null?void 0:n.get;return o?(nn[s]=o,o.call(e)):e[t]}var sn={};function so(r,e,t){let n=`${r}.${String(t)}`;if(sn[n])return sn[n].bind(e);let i=as(r)[t];return typeof i!="function"?e[t]:(sn[n]=i,i.bind(e))}function oc(r){return ve("Node",r,"ownerDocument")}function ac(r){return ve("Node",r,"childNodes")}function lc(r){return ve("Node",r,"parentNode")}function cc(r){return ve("Node",r,"parentElement")}function uc(r){return ve("Node",r,"textContent")}function fc(r,e){return so("Node",r,"contains")(e)}function hc(r){return so("Node",r,"getRootNode")()}function dc(r){return !r||!("host"in r)?null:ve("ShadowRoot",r,"host")}function pc(r){return r.styleSheets}function mc(r){return !r||!("shadowRoot"in r)?null:ve("Element",r,"shadowRoot")}function gc(r,e){return ve("Element",r,"querySelector")(e)}function yc(r,e){return ve("Element",r,"querySelectorAll")(e)}function bc(){return as("MutationObserver").constructor}function wc(r,e,t){try{if(!(e in r))return ()=>{};let n=r[e],s=t(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=s,()=>{r[e]=n;}}catch(n){return ()=>{}}}var Z={ownerDocument:oc,childNodes:ac,parentNode:lc,parentElement:cc,textContent:uc,contains:fc,getRootNode:hc,host:dc,styleSheets:pc,shadowRoot:mc,querySelector:gc,querySelectorAll:yc,mutationObserver:bc,patch:wc};function io(r){return r.nodeType===r.ELEMENT_NODE}function lt(r){let e=r&&"host"in r&&"mode"in r&&Z.host(r)||null;return !!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===r)}function ct(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}function vc(r){return r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}function Sc(r){let{cssText:e}=r;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(r.href)})`];return r.layerName===""?t.push("layer"):r.layerName&&t.push(`layer(${r.layerName})`),r.supportsText&&t.push(`supports(${r.supportsText})`),r.media.length&&t.push(r.media.mediaText),t.join(" ")+";"}function bn(r){try{let e=r.rules||r.cssRules;if(!e)return null;let t=r.href;!t&&r.ownerNode&&(t=r.ownerNode.baseURI);let n=Array.from(e,s=>oo(s,t)).join("");return vc(n)}catch(e){return null}}function oo(r,e){if(Ec(r)){let t;try{t=bn(r.styleSheet)||Sc(r);}catch(n){t=r.cssText;}return r.styleSheet.href?gr(t,r.styleSheet.href):t}else {let t=r.cssText;return Ic(r)&&r.selectorText.includes(":")&&(t=Cc(t)),e?gr(t,e):t}}function Cc(r){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}function Ec(r){return "styleSheet"in r}function Ic(r){return "selectorText"in r}var dr=class{constructor(){ai(this,"idNodeMap",new Map),ai(this,"nodeMetaMap",new WeakMap);}getId(e){var t;if(!e)return -1;let n=(t=this.getMeta(e))==null?void 0:t.id;return n!=null?n:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n));}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t);}replace(e,t){let n=this.getNode(e);if(n){let s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(t,s);}this.idNodeMap.set(e,t);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function xc(){return new dr}function pr({element:r,maskInputOptions:e,tagName:t,type:n,value:s,maskInputFn:i}){let o=s||"",l=n&&Te(n);return (e[t.toLowerCase()]||l&&e[l])&&(i?o=i(o,r):o="*".repeat(o.length)),o}function Te(r){return r.toLowerCase()}var ui="__rrweb_original__";function Rc(r){let e=r.getContext("2d");if(!e)return true;let t=50;for(let n=0;n<r.width;n+=t)for(let s=0;s<r.height;s+=t){let i=e.getImageData,o=ui in i?i[ui]:i;if(new Uint32Array(o.call(e,n,s,Math.min(t,r.width-n),Math.min(t,r.height-s)).data.buffer).some(a=>a!==0))return false}return true}function mr(r){let e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?Te(e):null}function ao(r,e){var i;let t;try{t=new URL(r,e!=null?e:window.location.href);}catch(o){return null}let n=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(n);return (i=s==null?void 0:s[1])!=null?i:null}function Mc(r){let e="";return r.indexOf("//")>-1?e=r.split("/").slice(0,3).join("/"):e=r.split("/")[0],e=e.split("?")[0],e}var Ac=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Tc=/^(?:[a-z+]+:)?\/\//i,Nc=/^www\..*/i,_c=/^(data:)([^,]*),(.*)/i;function gr(r,e){return (r||"").replace(Ac,(t,n,s,i,o,l)=>{let a=s||o||l,c=n||i||"";if(!a)return t;if(Tc.test(a)||Nc.test(a))return `url(${c}${a}${c})`;if(_c.test(a))return `url(${c}${a}${c})`;if(a[0]==="/")return `url(${c}${Mc(e)+a}${c})`;let u=e.split("/"),f=a.split("/");u.pop();for(let h of f)h!=="."&&(h===".."?u.pop():u.push(h));return `url(${c}${u.join("/")}${c})`})}function Bt(r,e=false){return e?r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Oc(r,e,t=false){let n=Array.from(e.childNodes),s=[],i=0;if(n.length>1&&r&&typeof r=="string"){let o=Bt(r,t),l=o.length/r.length;for(let a=1;a<n.length;a++)if(n[a].textContent&&typeof n[a].textContent=="string"){let c=Bt(n[a].textContent,t),u=100,f=3;for(;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,f),1)!==-1);f++);for(;f<c.length;f++){let h=c.substring(0,f),g=o.split(h),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&n[a-1].textContent!=="")m=o.indexOf(h,1);else if(g.length===1){if(h=h.substring(0,h.length-1),g=o.split(h),g.length<=1)return s.push(r),s;f=u+1;}else f===c.length-1&&(m=o.indexOf(h));if(g.length>=2&&f>u){let p=n[a-1].textContent;if(p&&typeof p=="string"){let d=Bt(p).length;m=o.indexOf(h,d);}m===-1&&(m=g[0].length);}if(m!==-1){let p=Math.floor(m/l);for(;p>0&&p<r.length;){if(i+=1,i>50*n.length)return s.push(r),s;let d=Bt(r.substring(0,p),t);if(d.length===m){s.push(r.substring(0,p)),r=r.substring(p),o=o.substring(m);break}else d.length<m?p+=Math.max(1,Math.floor((m-d.length)/l)):p-=Math.max(1,Math.floor((d.length-m)*l));}break}}}}return s.push(r),s}function kc(r,e){return Oc(r,e).join("/* rr_split */")}var Dc=1,Lc=new RegExp("[^a-z0-9-_:]"),ft=-2;function lo(){return Dc++}function Pc(r){if(r instanceof HTMLFormElement)return "form";let e=Te(r.tagName);return Lc.test(e)?"div":e}var Fe,fi,$c=/^[^ \t\n\r\u000c]+/,Fc=/^[, \t\n\r\u000c]+/;function Bc(r,e){if(e.trim()==="")return e;let t=0;function n(i){let o,l=i.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let s=[];for(;n(Fc),!(t>=e.length);){let i=n($c);if(i.slice(-1)===",")i=We(r,i.substring(0,i.length-1)),s.push(i);else {let o="";i=We(r,i);let l=false;for(;;){let a=e.charAt(t);if(a===""){s.push((i+o).trim());break}else if(l)a===")"&&(l=false);else if(a===","){t+=1,s.push((i+o).trim());break}else a==="("&&(l=true);o+=a,t+=1;}}}return s.join(", ")}var hi=new WeakMap;function We(r,e){return !e||e.trim()===""?e:ls(r,e)}function Uc(r){return !!(r.tagName==="svg"||r.ownerSVGElement)}function ls(r,e){let t=hi.get(r);if(t||(t=r.createElement("a"),hi.set(r,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function co(r,e,t,n){return n&&(t==="src"||t==="href"&&!(e==="use"&&n[0]==="#")||t==="xlink:href"&&n[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?We(r,n):t==="srcset"?Bc(r,n):t==="style"?gr(n,ls(r)):e==="object"&&t==="data"?We(r,n):n)}function uo(r,e,t){return ["video","audio"].includes(r)&&e==="autoplay"}function Wc(r,e,t){try{if(typeof e=="string"){if(r.classList.contains(e))return !0}else for(let n=r.classList.length;n--;){let s=r.classList[n];if(e.test(s))return !0}if(t)return r.matches(t)}catch(n){}return false}function yr(r,e,t){if(!r)return false;if(r.nodeType!==r.ELEMENT_NODE)return t?yr(Z.parentNode(r),e,t):false;for(let n=r.classList.length;n--;){let s=r.classList[n];if(e.test(s))return true}return t?yr(Z.parentNode(r),e,t):false}function fo(r,e,t,n){let s;if(io(r)){if(s=r,!Z.childNodes(s).length)return false}else {if(Z.parentElement(r)===null)return false;s=Z.parentElement(r);}try{if(typeof e=="string"){if(n){if(s.closest(`.${e}`))return !0}else if(s.classList.contains(e))return !0}else if(yr(s,e,n))return !0;if(t){if(n){if(s.closest(t))return !0}else if(s.matches(t))return !0}}catch(i){}return false}function Hc(r,e,t){let n=r.contentWindow;if(!n)return;let s=false,i;try{i=n.document.readyState;}catch(l){return}if(i!=="complete"){let l=setTimeout(()=>{s||(e(),s=true);},t);r.addEventListener("load",()=>{clearTimeout(l),s=true,e();});return}let o="about:blank";if(n.location.href!==o||r.src===o||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e);}function zc(r,e,t){let n=false,s;try{s=r.sheet;}catch(o){return}if(s)return;let i=setTimeout(()=>{n||(e(),n=true);},t);r.addEventListener("load",()=>{clearTimeout(i),n=true,e();});}function Vc(r,e){let{doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:f={},inlineImages:h,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p=false,cssCaptured:d=false}=e,y=Gc(t,n);switch(r.nodeType){case r.DOCUMENT_NODE:return r.compatMode!=="CSS1Compat"?{type:X.Document,childNodes:[],compatMode:r.compatMode}:{type:X.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return {type:X.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:y};case r.ELEMENT_NODE:return Yc(r,{doc:t,blockClass:s,blockSelector:i,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:f,inlineImages:h,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p,rootId:y});case r.TEXT_NODE:return jc(r,{doc:t,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:d});case r.CDATA_SECTION_NODE:return {type:X.CDATA,textContent:"",rootId:y};case r.COMMENT_NODE:return {type:X.Comment,textContent:Z.textContent(r)||"",rootId:y};default:return false}}function Gc(r,e){if(!e.hasNode(r))return;let t=e.getId(r);return t===1?void 0:t}function jc(r,e){let{needsMask:t,maskTextFn:n,rootId:s,cssCaptured:i}=e,o=Z.parentNode(r),l=o&&o.tagName,a="",c=l==="STYLE"?true:void 0,u=l==="SCRIPT"?true:void 0;return u?a="SCRIPT_PLACEHOLDER":i||(a=Z.textContent(r),c&&a&&(a=gr(a,ls(e.doc)))),!c&&!u&&a&&t&&(a=n?n(a,Z.parentElement(r)):a.replace(/[\S]/g,"*")),{type:X.Text,textContent:a||"",rootId:s}}function Yc(r,e){let{doc:t,blockClass:n,blockSelector:s,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:f,newlyAddedElement:h=false,rootId:g}=e,m=Wc(r,n,s),p=Pc(r),d={},y=r.attributes.length;for(let b=0;b<y;b++){let S=r.attributes[b];uo(p,S.name,S.value)||(d[S.name]=co(t,p,Te(S.name),S.value));}if(p==="link"&&i){let b=Array.from(t.styleSheets).find(E=>E.href===r.href),S=null;b&&(S=bn(b)),S&&(delete d.rel,delete d.href,d._cssText=S);}if(p==="style"&&r.sheet){let b=bn(r.sheet);b&&(r.childNodes.length>1&&(b=kc(b,r)),d._cssText=b);}if(["input","textarea","select"].includes(p)){let b=r.value,S=r.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&b?d.value=pr({element:r,type:mr(r),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):S&&(d.checked=S);}if(p==="option"&&(r.selected&&!o.select?d.selected=true:delete d.selected),p==="dialog"&&r.open&&(d.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&u){if(r.__context==="2d")Rc(r)||(d.rr_dataURL=r.toDataURL(a.type,a.quality));else if(!("__context"in r)){let b=r.toDataURL(a.type,a.quality),S=t.createElement("canvas");S.width=r.width,S.height=r.height;let E=S.toDataURL(a.type,a.quality);b!==E&&(d.rr_dataURL=b);}}if(p==="img"&&c){Fe||(Fe=t.createElement("canvas"),fi=Fe.getContext("2d"));let b=r,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",E=b.crossOrigin,I=()=>{b.removeEventListener("load",I);try{Fe.width=b.naturalWidth,Fe.height=b.naturalHeight,fi.drawImage(b,0,0),d.rr_dataURL=Fe.toDataURL(a.type,a.quality);}catch(P){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?I():b.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${S}! Error: ${P}`);}b.crossOrigin==="anonymous"&&(E?d.crossOrigin=E:b.removeAttribute("crossorigin"));};b.complete&&b.naturalWidth!==0?I():b.addEventListener("load",I);}if(["audio","video"].includes(p)){let b=d;b.rr_mediaState=r.paused?"paused":"played",b.rr_mediaCurrentTime=r.currentTime,b.rr_mediaPlaybackRate=r.playbackRate,b.rr_mediaMuted=r.muted,b.rr_mediaLoop=r.loop,b.rr_mediaVolume=r.volume;}if(h||(r.scrollLeft&&(d.rr_scrollLeft=r.scrollLeft),r.scrollTop&&(d.rr_scrollTop=r.scrollTop)),m){let{width:b,height:S}=r.getBoundingClientRect();d={class:d.class,rr_width:`${b}px`,rr_height:`${S}px`};}p==="iframe"&&!f(d.src)&&(r.contentDocument||(d.rr_src=d.src),delete d.src);let v;try{customElements.get(p)&&(v=!0);}catch(b){}return {type:X.Element,tagName:p,attributes:d,childNodes:[],isSVG:Uc(r)||void 0,needBlock:m,rootId:g,isCustom:v}}function L(r){return r==null?"":r.toLowerCase()}function ho(r){return r===true||r==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:r==="all",headMetaDescKeywords:r==="all",headTitleMutations:r==="all"}:r||{}}function Xc(r,e){if(e.comment&&r.type===X.Comment)return true;if(r.type===X.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&ao(r.attributes.href)==="js"))return true;if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&(L(r.attributes.name).match(/^msapplication-tile(image|color)$/)||L(r.attributes.name)==="application-name"||L(r.attributes.rel)==="icon"||L(r.attributes.rel)==="apple-touch-icon"||L(r.attributes.rel)==="shortcut icon")))return true;if(r.tagName==="meta"){if(e.headMetaDescKeywords&&L(r.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(L(r.attributes.property).match(/^(og|twitter|fb):/)||L(r.attributes.name).match(/^(og|twitter):/)||L(r.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(L(r.attributes.name)==="robots"||L(r.attributes.name)==="googlebot"||L(r.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(L(r.attributes.name)==="author"||L(r.attributes.name)==="generator"||L(r.attributes.name)==="framework"||L(r.attributes.name)==="publisher"||L(r.attributes.name)==="progid"||L(r.attributes.property).match(/^article:/)||L(r.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(L(r.attributes.name)==="google-site-verification"||L(r.attributes.name)==="yandex-verification"||L(r.attributes.name)==="csrf-token"||L(r.attributes.name)==="p:domain_verify"||L(r.attributes.name)==="verify-v1"||L(r.attributes.name)==="verification"||L(r.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function He(r,e){let{doc:t,mirror:n,blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:a=false,inlineStylesheet:c=true,maskInputOptions:u={},maskTextFn:f,maskInputFn:h,slimDOMOptions:g,dataURLOptions:m={},inlineImages:p=false,recordCanvas:d=false,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:I=()=>false,newlyAddedElement:P=false,cssCaptured:T=false}=e,{needsMask:$}=e,{preserveWhiteSpace:F=true}=e;$||($=fo(r,o,l,$===void 0));let D=Vc(r,{doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:$,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:h,dataURLOptions:m,inlineImages:p,recordCanvas:d,keepIframeSrcFn:I,newlyAddedElement:P,cssCaptured:T});if(!D)return console.warn(r,"not serialized"),null;let K;n.hasNode(r)?K=n.getId(r):Xc(D,g)||!F&&D.type===X.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?K=ft:K=lo();let C=Object.assign(D,{id:K});if(n.add(r,C),K===ft)return null;y&&y(r);let te=!a;if(C.type===X.Element){te=te&&!C.needBlock,delete C.needBlock;let j=Z.shadowRoot(r);j&&ct(j)&&(C.isShadowHost=true);}if((C.type===X.Document||C.type===X.Element)&&te){g.headWhitespace&&C.type===X.Element&&C.tagName==="head"&&(F=false);let j={doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:h,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I,cssCaptured:false};if(!(C.type===X.Element&&C.tagName==="textarea"&&C.attributes.value!==void 0)){C.type===X.Element&&C.attributes._cssText!==void 0&&typeof C.attributes._cssText=="string"&&(j.cssCaptured=true);for(let xe of Array.from(Z.childNodes(r))){let he=He(xe,j);he&&C.childNodes.push(he);}}let se=null;if(io(r)&&(se=Z.shadowRoot(r)))for(let xe of Array.from(Z.childNodes(se))){let he=He(xe,j);he&&(ct(se)&&(he.isShadow=true),C.childNodes.push(he));}}let Ie=Z.parentNode(r);return Ie&<(Ie)&&ct(Ie)&&(C.isShadow=true),C.type===X.Element&&C.tagName==="iframe"&&Hc(r,()=>{let j=r.contentDocument;if(j&&v){let se=He(j,{doc:j,mirror:n,blockClass:s,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:h,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});se&&v(r,se);}},b),C.type===X.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&ao(C.attributes.href)==="css")&&zc(r,()=>{if(S){let j=He(r,{doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:h,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});j&&S(r,j);}},E),C}function Zc(r,e){let{mirror:t=new dr,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=true,inlineImages:a=false,recordCanvas:c=false,maskAllInputs:u=false,maskTextFn:f,maskInputFn:h,slimDOM:g=false,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:E=()=>false}=e||{},I=u===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===false?{password:true}:u,P=ho(g);return He(r,{doc:r,mirror:t,blockClass:n,blockSelector:s,maskTextClass:i,maskTextSelector:o,skipChild:false,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:h,slimDOMOptions:P,dataURLOptions:m,inlineImages:a,recordCanvas:c,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:E,newlyAddedElement:false})}function Kc(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function qc(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype;}else t={};return Object.defineProperty(t,"__esModule",{value:true}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:true,get:function(){return r[n]}});}),t}var cs={exports:{}},B=String,po=function(){return {isColorSupported:false,reset:B,bold:B,dim:B,italic:B,underline:B,inverse:B,hidden:B,strikethrough:B,black:B,red:B,green:B,yellow:B,blue:B,magenta:B,cyan:B,white:B,gray:B,bgBlack:B,bgRed:B,bgGreen:B,bgYellow:B,bgBlue:B,bgMagenta:B,bgCyan:B,bgWhite:B}};cs.exports=po();cs.exports.createColors=po;var Qc=cs.exports,eu={},tu=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"})),ce=qc(tu),di=Qc,pi=ce,wn=class mo extends Error{constructor(e,t,n,s,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),typeof t!="undefined"&&typeof n!="undefined"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,mo);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(e){if(!this.source)return "";let t=this.source;e==null&&(e=di.isColorSupported),pi&&e&&(t=pi(t));let n=t.split(/\r?\n/),s=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),o=String(i).length,l,a;if(e){let{bold:c,gray:u,red:f}=di.createColors(true);l=h=>c(f(h)),a=h=>u(h);}else l=a=c=>c;return n.slice(s,i).map((c,u)=>{let f=s+1+u,h=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(h.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(h)+c+`
|
|
3
|
+
`+g+l("^")}return " "+a(h)+c}).join(`
|
|
4
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
5
|
+
|
|
6
|
+
`+e+`
|
|
7
|
+
`),this.name+": "+this.message+e}},us=wn;wn.default=wn;var St={};St.isClean=Symbol("isClean");St.my=Symbol("my");var mi={after:`
|
|
8
|
+
`,beforeClose:`
|
|
9
|
+
`,beforeComment:`
|
|
10
|
+
`,beforeDecl:`
|
|
11
|
+
`,beforeOpen:" ",beforeRule:`
|
|
12
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function ru(r){return r[0].toUpperCase()+r.slice(1)}var vn=class{constructor(e){this.builder=e;}atrule(e,t){let n="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?n+=e.raws.afterName:s&&(n+=" "),e.nodes)this.block(e,n+s);else {let i=(e.raws.between||"")+(t?";":"");this.builder(n+s+i,e);}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&s.type!=="root";)i+=1,s=s.parent;if(n.includes(`
|
|
13
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)n+=o;}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end");}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let i=e.nodes[s],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==s||n);}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e);}decl(e,t){let n=this.raw(e,"between","colon"),s=e.prop+n+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e);}document(e){this.body(e);}raw(e,t,n){let s;if(n||(n=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let i=e.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return "";if(!i)return mi[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]!="undefined")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let l="raw"+ru(n);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s!="undefined")return false});}return typeof s=="undefined"&&(s=mi[n]),o.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after!="undefined")return t=n.raws.after,t.includes(`
|
|
14
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
|
|
15
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
|
|
16
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before!="undefined")return t=n.raws.before,t.includes(`
|
|
17
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between!="undefined")return t=n.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let s=n.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof n.raws.before!="undefined"){let i=n.raws.before.split(`
|
|
18
|
+
`);return t=i[i.length-1],t=t.replace(/\S/g,""),false}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t!="undefined"))return false}),t}rawValue(e,t){let n=e[t],s=e.raws[t];return s&&s.value===n?s.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after);}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end");}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t);}},go=vn;vn.default=vn;var nu=go;function Sn(r,e){new nu(e).stringify(r);}var Nr=Sn;Sn.default=Sn;var{isClean:Ut,my:su}=St,iu=us,ou=go,au=Nr;function Cn(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let s=r[n],i=typeof s;n==="parent"&&i==="object"?e&&(t[n]=e):n==="source"?t[n]=s:Array.isArray(s)?t[n]=s.map(o=>Cn(o,t)):(i==="object"&&s!==null&&(s=Cn(s)),t[n]=s);}return t}var En=class{constructor(e={}){this.raws={},this[Ut]=false,this[su]=true;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n);}else this[t]=e[t];}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`);}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between;}clone(e={}){let t=Cn(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},t)}return new iu(e)}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),true}}}markDirty(){if(this[Ut]){this[Ut]=false;let e=this;for(;e=e.parent;)e[Ut]=false;}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(n=this.positionInside(s,t));}return n}positionInside(e,t){let n=t||this.toString(),s=this.source.start.column,i=this.source.start.line;for(let o=0;o<e;o++)n[o]===`
|
|
19
|
+
`?(s=1,i+=1):s+=1;return {column:s,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),i=s.indexOf(e.word);i!==-1&&(t=this.positionInside(i,s),n=this.positionInside(i+e.word.length,s));}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return (n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new ou().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=false;for(let s of e)s===this?n=true:n?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);n||this.remove();}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},s=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))n[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)n[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=i,t.set(l.input,i),i++),n[o]={end:l.end,inputId:a,start:l.start};}else n[o]=l;}return s&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=au){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n;}),t}warn(e,t,n){let s={node:this};for(let i in n)s[i]=n[i];return e.warn(t,s)}get proxyOf(){return this}},_r=En;En.default=En;var lu=_r,In=class extends lu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Or=In;In.default=In;var cu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",fu=(r=21)=>{let e="",t=r;for(;t--;)e+=cu[Math.random()*64|0];return e},hu={nanoid:fu},{SourceMapConsumer:gi,SourceMapGenerator:yi}=ce,{existsSync:du,readFileSync:pu}=ce,{dirname:on,join:mu}=ce;function gu(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}var xn=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,s=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=on(this.mapFile)),s&&(this.text=s);}consumer(){return this.consumerCache||(this.consumerCache=new gi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(s.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return gu(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),s=e.indexOf("*/",n);n>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,s)));}loadFile(e){if(this.root=on(e),du(e))return this.mapFile=e,pu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let s=this.loadFile(n);if(!s)throw new Error("Unable to load previous source map: "+n.toString());return s}}else {if(t instanceof gi)return yi.fromSourceMap(t).toString();if(t instanceof yi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=mu(on(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},yo=xn;xn.default=xn;var{SourceMapConsumer:yu,SourceMapGenerator:bu}=ce,{fileURLToPath:bi,pathToFileURL:Wt}=ce,{isAbsolute:Rn,resolve:Mn}=ce,{nanoid:wu}=hu,an=ce,wi=us,vu=yo,ln=Symbol("fromOffsetCache"),Su=!!(yu&&bu),vi=!!(Mn&&Rn),br=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!vi||/^\w+:\/\//.test(t.from)||Rn(t.from)?this.file=t.from:this.file=Mn(t.from)),vi&&Su){let n=new vu(this.css,t);if(n.text){this.map=n;let s=n.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s));}}this.file||(this.id="<input css "+wu(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,n,s={}){let i,o,l;if(t&&typeof t=="object"){let c=t,u=n;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,n=f.col;}else t=c.line,n=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col;}else o=u.line,l=u.column;}else if(!n){let c=this.fromOffset(t);t=c.line,n=c.col;}let a=this.origin(t,n,o,l);return a?i=new wi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):i=new wi(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:l,line:o},this.css,this.file,s.plugin),i.input={column:n,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Wt&&(i.input.url=Wt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,n;if(this[ln])n=this[ln];else {let i=this.css.split(`
|
|
20
|
+
`);n=new Array(i.length);let o=0;for(let l=0,a=i.length;l<a;l++)n[l]=o,o+=i[l].length+1;this[ln]=n;}t=n[n.length-1];let s=0;if(e>=t)s=n.length-1;else {let i=n.length-2,o;for(;s<i;)if(o=s+(i-s>>1),e<n[o])i=o-1;else if(e>=n[o+1])s=o+1;else {s=o;break}}return {col:e-n[s]+1,line:s+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:Mn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,s){if(!this.map)return false;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof n=="number"&&(l=i.originalPositionFor({column:s,line:n}));let a;Rn(o.source)?a=Wt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Wt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(bi)c.file=bi(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=i.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of ["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},kr=br;br.default=br;an&&an.registerInput&&an.registerInput(br);var{SourceMapConsumer:bo,SourceMapGenerator:ar}=ce,{dirname:lr,relative:wo,resolve:vo,sep:So}=ce,{pathToFileURL:Si}=ce,Cu=kr,Eu=!!(bo&&ar),Iu=!!(lr&&vo&&wo&&So),xu=class{constructor(e,t,n,s){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
21
|
+
`;this.css.includes(`\r
|
|
22
|
+
`)&&(t=`\r
|
|
23
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||lr(e.file),s;this.mapOpts.sourcesContent===false?(s=new bo(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(n)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),Iu&&Eu&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t;}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=ar.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new ar({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 ar({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),i=l.match(/\n/g),i?(e+=i.length,o=l.lastIndexOf(`
|
|
24
|
+
`),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?lr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=lr(vo(n,this.mapOpts.annotation)));let s=wo(n,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t);}});else {let e=new Cu(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map);}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=true;let s=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(s,t.source.input.css);}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css);}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Si){let n=Si(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;So==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},Co=xu,Ru=_r,An=class extends Ru{constructor(e){super(e),this.type="comment";}},Dr=An;An.default=An;var{isClean:Eo,my:Io}=St,xo=Or,Ro=Dr,Mu=_r,Mo,fs,hs,Ao;function To(r){return r.map(e=>(e.nodes&&(e.nodes=To(e.nodes)),delete e.source,e))}function No(r){if(r[Eo]=false,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)No(e);}var be=class _o extends Mu{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let s of n)this.proxyOf.nodes.push(s);}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e);}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],s=e(this.proxyOf.nodes[n],n),s!==false);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(s=>typeof s=="function"?(i,o)=>s(i.toProxy(),o):s)):t==="every"||t==="some"?n=>e[t]((s,...i)=>n(s.toProxy(),...i)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),true}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of s)this.proxyOf.nodes.splice(n+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],n<i&&(this.indexes[o]=i+s.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),s=n===0?"prepend":false,i=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let l of i)this.proxyOf.nodes.splice(n,0,l);let o;for(let l in this.indexes)o=this.indexes[l],n<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=To(Mo(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore");}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new xo(e)];}else if(e.selector)e=[new fs(e)];else if(e.name)e=[new hs(e)];else if(e.text)e=[new Ro(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Io]||_o.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Eo]&&No(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let s of n)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+n.length;}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,n));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let s;try{s=e(t,n);}catch(i){throw t.addToError(i)}return s!==false&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,s)}):this.walk((n,s)=>{if(n.type==="atrule"&&n.name===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="atrule")return t(n,s)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,s)}):this.walk((n,s)=>{if(n.type==="decl"&&n.prop===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="decl")return t(n,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,s)}):this.walk((n,s)=>{if(n.type==="rule"&&n.selector===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="rule")return t(n,s)}))}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]}};be.registerParse=r=>{Mo=r;};be.registerRule=r=>{fs=r;};be.registerAtRule=r=>{hs=r;};be.registerRoot=r=>{Ao=r;};var Ne=be;be.default=be;be.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,hs.prototype):r.type==="rule"?Object.setPrototypeOf(r,fs.prototype):r.type==="decl"?Object.setPrototypeOf(r,xo.prototype):r.type==="comment"?Object.setPrototypeOf(r,Ro.prototype):r.type==="root"&&Object.setPrototypeOf(r,Ao.prototype),r[Io]=true,r.nodes&&r.nodes.forEach(e=>{be.rebuild(e);});};var Au=Ne,Oo,ko,ht=class extends Au{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new Oo(new ko,this,e).stringify()}};ht.registerLazyResult=r=>{Oo=r;};ht.registerProcessor=r=>{ko=r;};var ds=ht;ht.default=ht;var Tn=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in t)this[n]=t[n];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Do=Tn;Tn.default=Tn;var Tu=Do,Nn=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new Tu(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ps=Nn;Nn.default=Nn;var cn=39,Ci=34,Ht=92,Ei=47,zt=10,nt=32,Vt=12,Gt=9,jt=13,Nu=91,_u=93,Ou=40,ku=41,Du=123,Lu=125,Pu=59,$u=42,Fu=58,Bu=64,Yt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Xt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Uu=/.[\r\n"'(/\\]/,Ii=/[\da-f]/i,Wu=function(e,t={}){let n=e.css.valueOf(),s=t.ignoreErrors,i,o,l,a,c,u,f,h,g,m,p=n.length,d=0,y=[],v=[];function b(){return d}function S(T){throw e.error("Unclosed "+T,d)}function E(){return v.length===0&&d>=p}function I(T){if(v.length)return v.pop();if(d>=p)return;let $=T?T.ignoreUnclosed:false;switch(i=n.charCodeAt(d),i){case zt:case nt:case Gt:case jt:case Vt:{o=d;do o+=1,i=n.charCodeAt(o);while(i===nt||i===zt||i===Gt||i===jt||i===Vt);m=["space",n.slice(d,o)],d=o-1;break}case Nu:case _u:case Du:case Lu:case Fu:case Pu:case ku:{let F=String.fromCharCode(i);m=[F,F,d];break}case Ou:{if(h=y.length?y.pop()[1]:"",g=n.charCodeAt(d+1),h==="url"&&g!==cn&&g!==Ci&&g!==nt&&g!==zt&&g!==Gt&&g!==Vt&&g!==jt){o=d;do{if(u=false,o=n.indexOf(")",o+1),o===-1)if(s||$){o=d;break}else S("bracket");for(f=o;n.charCodeAt(f-1)===Ht;)f-=1,u=!u;}while(u);m=["brackets",n.slice(d,o+1),d,o],d=o;}else o=n.indexOf(")",d+1),a=n.slice(d,o+1),o===-1||Uu.test(a)?m=["(","(",d]:(m=["brackets",a,d,o],d=o);break}case cn:case Ci:{l=i===cn?"'":'"',o=d;do{if(u=false,o=n.indexOf(l,o+1),o===-1)if(s||$){o=d+1;break}else S("string");for(f=o;n.charCodeAt(f-1)===Ht;)f-=1,u=!u;}while(u);m=["string",n.slice(d,o+1),d,o],d=o;break}case Bu:{Yt.lastIndex=d+1,Yt.test(n),Yt.lastIndex===0?o=n.length-1:o=Yt.lastIndex-2,m=["at-word",n.slice(d,o+1),d,o],d=o;break}case Ht:{for(o=d,c=true;n.charCodeAt(o+1)===Ht;)o+=1,c=!c;if(i=n.charCodeAt(o+1),c&&i!==Ei&&i!==nt&&i!==zt&&i!==Gt&&i!==jt&&i!==Vt&&(o+=1,Ii.test(n.charAt(o)))){for(;Ii.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===nt&&(o+=1);}m=["word",n.slice(d,o+1),d,o],d=o;break}default:{i===Ei&&n.charCodeAt(d+1)===$u?(o=n.indexOf("*/",d+2)+1,o===0&&(s||$?o=n.length:S("comment")),m=["comment",n.slice(d,o+1),d,o],d=o):(Xt.lastIndex=d+1,Xt.test(n),Xt.lastIndex===0?o=n.length-1:o=Xt.lastIndex-2,m=["word",n.slice(d,o+1),d,o],y.push(m),d=o);break}}return d++,m}function P(T){v.push(T);}return {back:P,endOfFile:E,nextToken:I,position:b}},Lo=Ne,wr=class extends Lo{constructor(e){super(e),this.type="atrule";}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},ms=wr;wr.default=wr;Lo.registerAtRule(wr);var Po=Ne,$o,Fo,Ve=class extends Po{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,n){let s=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of s)i.raws.before=t.raws.before;}return s}removeChild(e,t){let n=this.index(e);return !t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new $o(new Fo,this,e).stringify()}};Ve.registerLazyResult=r=>{$o=r;};Ve.registerProcessor=r=>{Fo=r;};var Ct=Ve;Ve.default=Ve;Po.registerRoot(Ve);var dt={comma(r){return dt.split(r,[","],true)},space(r){let e=[" ",`
|
|
25
|
+
`," "];return dt.split(r,e)},split(r,e,t){let n=[],s="",i=false,o=0,l=false,a="",c=false;for(let u of r)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(i=true),i?(s!==""&&n.push(s.trim()),s="",i=false):s+=u;return (t||s!=="")&&n.push(s.trim()),n}},Bo=dt;dt.default=dt;var Uo=Ne,Hu=Bo,vr=class extends Uo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Hu.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n);}},gs=vr;vr.default=vr;Uo.registerRule(vr);var zu=Or,Vu=Wu,Gu=Dr,ju=ms,Yu=Ct,xi=gs,Ri={empty:true,space:true};function Xu(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}var Zu=class{constructor(e){this.input=e,this.root=new Yu,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new ju;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,s,i,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(n==="{"){l=true;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,s=a[i];s&&s[0]==="space";)s=a[--i];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++);}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let n=0,s;for(let i=t-1;i>=0&&(s=e[i],!(s[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,n,s,i;for(let[o,l]of e.entries()){if(n=l,s=n[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!i)this.doubleColon(n);else {if(i[0]==="word"&&i[1]==="progid")continue;return o}i=n;}return false}comment(e){let t=new Gu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else {let s=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3];}}createTokenizer(){this.tokenizer=Vu(this.input);}decl(e,t){let n=new zu;this.init(n,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=true,e.pop()),n.source.end=this.getPosition(s[3]||s[2]||Xu(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;n.prop+=e.shift()[1];}n.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){n.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(n.raws.important=u);break}else if(i[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let h=c;h>0;h--){let g=u[h][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f;}f.trim().indexOf("!")===0&&(n.important=true,n.raws.important=f,e=u);}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(n.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e);}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new xi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t;}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e);}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position());}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(e){let t=this.input.fromOffset(e);return {column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=false);}other(e){let t=false,n=null,s=false,i=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(l&&s&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(s){this.decl(a,l);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=true;break}else n===":"&&(s=true);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(i),t&&s){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case "space":this.spaces+=e[1];break;case ";":this.freeSemicolon(e);break;case "}":this.end(e);break;case "comment":this.comment(e);break;case "at-word":this.atrule(e);break;case "{":this.emptyRule(e);break;default:this.other(e);break}this.endFile();}precheckMissedSemicolon(){}raw(e,t,n,s){let i,o,l=n.length,a="",c=true,u,f;for(let h=0;h<l;h+=1)i=n[h],o=i[0],o==="space"&&h===l-1&&!s?c=false:o==="comment"?(f=n[h-1]?n[h-1][0]:"empty",u=n[h+1]?n[h+1][0]:"empty",!Ri[f]&&!Ri[u]?a.slice(-1)===","?c=false:a+=i[1]:c=false):a+=i[1];if(!c){let h=n.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:h,value:a};}e[t]=a;}rule(e){e.pop();let t=new xi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t;}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let s=t;s<e.length;s++)n+=e[s][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Ju=Zu,Ku=Ne,qu=Ju,Qu=kr;function Sr(r,e){let t=new Qu(r,e),n=new qu(t);try{n.parse();}catch(s){throw s}return n.root}var ys=Sr;Sr.default=Sr;Ku.registerParse(Sr);var{isClean:pe,my:ef}=St,tf=Co,rf=Nr,nf=Ne,sf=ds;var Mi=ps,of=ys,af=Ct,lf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},cf={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},uf={Once:true,postcssPlugin:true,prepare:true},Ge=0;function st(r){return typeof r=="object"&&typeof r.then=="function"}function Wo(r){let e=false,t=lf[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Ge,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Ge,t+"Exit"]:[t,t+"Exit"]}function Ai(r){let e;return r.type==="document"?e=["Document",Ge,"DocumentExit"]:r.type==="root"?e=["Root",Ge,"RootExit"]:e=Wo(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function _n(r){return r[pe]=false,r.nodes&&r.nodes.forEach(e=>_n(e)),r}var On={},je=class Ho{constructor(e,t,n){this.stringified=false,this.processed=false;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=_n(t);else if(t instanceof Ho||t instanceof Mi)s=_n(t.root),t.map&&(typeof n.map=="undefined"&&(n.map={}),n.map.inline||(n.map.inline=false),n.map.prev=t.map);else {let i=of;n.syntax&&(i=n.syntax.parse),n.parser&&(i=n.parser),i.parse&&(i=i.parse);try{s=i(t,n);}catch(o){this.processed=true,this.error=o;}s&&!s[ef]&&nf.rebuild(s);}this.result=new Mi(e,s,n),this.helpers={...On,postcss:On,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(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion;}catch(s){console&&console.error&&console.error(s);}return e}prepareVisitors(){this.listeners={};let e=(t,n,s)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,s]);};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!cf[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uf[n])if(typeof t[n]=="object")for(let s in t[n])s==="*"?e(t,n,t[n][s]):e(t,n+"-"+s.toLowerCase(),t[n][s]);else typeof t[n]=="function"&&e(t,n,t[n]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(st(n))try{await n;}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pe];){e[pe]=true;let t=[Ai(e)];for(;t.length>0;){let n=this.visitTick(t);if(st(n))try{await n;}catch(s){let i=t[t.length-1].node;throw this.handleError(s,i)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(i=>n(i,this.helpers));await Promise.all(s);}else await n(e,this.helpers);}catch(s){throw this.handleError(s)}}}return this.processed=true,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return st(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let e=this.result.opts,t=rf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new tf(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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 e of this.plugins){let t=this.runOnRoot(e);if(st(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pe];)e[pe]=true,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e);}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){this.result.lastPlugin=n;let i;try{i=s(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(st(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:s}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(n.toProxy(),this.helpers)}catch(a){throw this.handleError(a,n)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!l[pe]){l[pe]=true,e.push(Ai(l));return}t.iterator=0,delete n.indexes[o];}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===Ge){n.nodes&&n.nodes.length&&(n[pe]=true,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[pe]=true;let t=Wo(e);for(let n of t)if(n===Ge)e.nodes&&e.each(s=>{s[pe]||this.walkSync(s);});else {let s=this.listeners[n];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}};je.registerPostcss=r=>{On=r;};var zo=je;je.default=je;af.registerLazyResult(je);sf.registerLazyResult(je);var ff=Co,hf=Nr;var df=ys,pf=ps,kn=class{constructor(e,t,n){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s,i=hf;this.result=new pf(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new ff(i,s,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return []}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return []}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=df;try{e=t(this._css,this._opts);}catch(n){this.error=n;}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return "NoWorkResult"}},mf=kn;kn.default=kn;var gf=mf,yf=zo,bf=ds,wf=Ct,pt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e);}normalize(e){let t=[];for(let n of e)if(n.postcss===true?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return !this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new gf(this,e,t):new yf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},vf=pt;pt.default=pt;wf.registerProcessor(pt);bf.registerProcessor(pt);var Sf=Or,Cf=yo,Ef=Dr,If=ms,xf=kr,Rf=Ct,Mf=gs;function mt(r,e){if(Array.isArray(r))return r.map(s=>mt(s));let{inputs:t,...n}=r;if(t){e=[];for(let s of t){let i={...s,__proto__:xf.prototype};i.map&&(i.map={...i.map,__proto__:Cf.prototype}),e.push(i);}}if(n.nodes&&(n.nodes=r.nodes.map(s=>mt(s,e))),n.source){let{inputId:s,...i}=n.source;n.source=i,s!=null&&(n.source.input=e[s]);}if(n.type==="root")return new Rf(n);if(n.type==="decl")return new Sf(n);if(n.type==="rule")return new Mf(n);if(n.type==="comment")return new Ef(n);if(n.type==="atrule")return new If(n);throw new Error("Unknown node type: "+r.type)}var Af=mt;mt.default=mt;var Tf=us,Vo=Or,Nf=zo,_f=Ne,bs=vf,Of=Nr,kf=Af,Go=ds,Df=Do,jo=Dr,Yo=ms,Lf=ps,Pf=kr,$f=ys,Ff=Bo,Xo=gs,Zo=Ct,Bf=_r;function _(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new bs(r)}_.plugin=function(e,t){let n=false;function s(...o){console&&console.warn&&!n&&(n=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
26
|
+
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:
|
|
27
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new bs().version,l}let i;return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(o,l,a){return _([s(a)]).process(o,l)},s};_.stringify=Of;_.parse=$f;_.fromJSON=kf;_.list=Ff;_.comment=r=>new jo(r);_.atRule=r=>new Yo(r);_.decl=r=>new Vo(r);_.rule=r=>new Xo(r);_.root=r=>new Zo(r);_.document=r=>new Go(r);_.CssSyntaxError=Tf;_.Declaration=Vo;_.Container=_f;_.Processor=bs;_.Document=Go;_.Comment=jo;_.Warning=Df;_.AtRule=Yo;_.Result=Lf;_.Input=Pf;_.Rule=Xo;_.Root=Zo;_.Node=Bf;Nf.registerPostcss(_);var Uf=_;_.default=_;var W=Kc(Uf);W.stringify;W.fromJSON;W.plugin;W.parse;W.list;W.document;W.comment;W.atRule;W.rule;W.decl;W.root;W.CssSyntaxError;W.Declaration;W.Container;W.Processor;W.Document;W.Comment;W.Warning;W.AtRule;W.Result;W.Input;W.Rule;W.Root;W.Node;var Wf=Object.defineProperty,Hf=(r,e,t)=>e in r?Wf(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t,ie=(r,e,t)=>Hf(r,typeof e!="symbol"?e+"":e,t);function zf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Vf(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype;}else t={};return Object.defineProperty(t,"__esModule",{value:true}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:true,get:function(){return r[n]}});}),t}var ws={exports:{}},U=String,Jo=function(){return {isColorSupported:false,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};ws.exports=Jo();ws.exports.createColors=Jo;var Gf=ws.exports,jf={},Yf=Object.freeze(Object.defineProperty({__proto__:null,default:jf},Symbol.toStringTag,{value:"Module"})),ue=Vf(Yf),Ti=Gf,Ni=ue,Dn=class Ko extends Error{constructor(e,t,n,s,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),typeof t!="undefined"&&typeof n!="undefined"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ko);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(e){if(!this.source)return "";let t=this.source;e==null&&(e=Ti.isColorSupported),Ni&&e&&(t=Ni(t));let n=t.split(/\r?\n/),s=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),o=String(i).length,l,a;if(e){let{bold:c,gray:u,red:f}=Ti.createColors(true);l=h=>c(f(h)),a=h=>u(h);}else l=a=c=>c;return n.slice(s,i).map((c,u)=>{let f=s+1+u,h=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(h.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(h)+c+`
|
|
28
|
+
`+g+l("^")}return " "+a(h)+c}).join(`
|
|
29
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
30
|
+
|
|
31
|
+
`+e+`
|
|
32
|
+
`),this.name+": "+this.message+e}},vs=Dn;Dn.default=Dn;var Et={};Et.isClean=Symbol("isClean");Et.my=Symbol("my");var _i={after:`
|
|
33
|
+
`,beforeClose:`
|
|
34
|
+
`,beforeComment:`
|
|
35
|
+
`,beforeDecl:`
|
|
36
|
+
`,beforeOpen:" ",beforeRule:`
|
|
37
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function Xf(r){return r[0].toUpperCase()+r.slice(1)}var Ln=class{constructor(e){this.builder=e;}atrule(e,t){let n="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?n+=e.raws.afterName:s&&(n+=" "),e.nodes)this.block(e,n+s);else {let i=(e.raws.between||"")+(t?";":"");this.builder(n+s+i,e);}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&s.type!=="root";)i+=1,s=s.parent;if(n.includes(`
|
|
38
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)n+=o;}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end");}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let i=e.nodes[s],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==s||n);}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e);}decl(e,t){let n=this.raw(e,"between","colon"),s=e.prop+n+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e);}document(e){this.body(e);}raw(e,t,n){let s;if(n||(n=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let i=e.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return "";if(!i)return _i[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]!="undefined")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let l="raw"+Xf(n);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s!="undefined")return false});}return typeof s=="undefined"&&(s=_i[n]),o.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after!="undefined")return t=n.raws.after,t.includes(`
|
|
39
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
|
|
40
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
|
|
41
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before!="undefined")return t=n.raws.before,t.includes(`
|
|
42
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between!="undefined")return t=n.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let s=n.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof n.raws.before!="undefined"){let i=n.raws.before.split(`
|
|
43
|
+
`);return t=i[i.length-1],t=t.replace(/\S/g,""),false}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t!="undefined"))return false}),t}rawValue(e,t){let n=e[t],s=e.raws[t];return s&&s.value===n?s.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after);}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end");}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t);}},qo=Ln;Ln.default=Ln;var Zf=qo;function Pn(r,e){new Zf(e).stringify(r);}var Lr=Pn;Pn.default=Pn;var{isClean:Zt,my:Jf}=Et,Kf=vs,qf=qo,Qf=Lr;function $n(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let s=r[n],i=typeof s;n==="parent"&&i==="object"?e&&(t[n]=e):n==="source"?t[n]=s:Array.isArray(s)?t[n]=s.map(o=>$n(o,t)):(i==="object"&&s!==null&&(s=$n(s)),t[n]=s);}return t}var Fn=class{constructor(e={}){this.raws={},this[Zt]=false,this[Jf]=true;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n);}else this[t]=e[t];}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`);}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between;}clone(e={}){let t=$n(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},t)}return new Kf(e)}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),true}}}markDirty(){if(this[Zt]){this[Zt]=false;let e=this;for(;e=e.parent;)e[Zt]=false;}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(n=this.positionInside(s,t));}return n}positionInside(e,t){let n=t||this.toString(),s=this.source.start.column,i=this.source.start.line;for(let o=0;o<e;o++)n[o]===`
|
|
44
|
+
`?(s=1,i+=1):s+=1;return {column:s,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),i=s.indexOf(e.word);i!==-1&&(t=this.positionInside(i,s),n=this.positionInside(i+e.word.length,s));}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return (n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new qf().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=false;for(let s of e)s===this?n=true:n?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);n||this.remove();}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},s=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))n[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)n[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=i,t.set(l.input,i),i++),n[o]={end:l.end,inputId:a,start:l.start};}else n[o]=l;}return s&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Qf){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n;}),t}warn(e,t,n){let s={node:this};for(let i in n)s[i]=n[i];return e.warn(t,s)}get proxyOf(){return this}},Pr=Fn;Fn.default=Fn;var eh=Pr,Bn=class extends eh{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},$r=Bn;Bn.default=Bn;var th="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nh=(r=21)=>{let e="",t=r;for(;t--;)e+=th[Math.random()*64|0];return e},sh={nanoid:nh},{SourceMapConsumer:Oi,SourceMapGenerator:ki}=ue,{existsSync:ih,readFileSync:oh}=ue,{dirname:un,join:ah}=ue;function lh(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}var Un=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,s=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=un(this.mapFile)),s&&(this.text=s);}consumer(){return this.consumerCache||(this.consumerCache=new Oi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(s.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return lh(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),s=e.indexOf("*/",n);n>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,s)));}loadFile(e){if(this.root=un(e),ih(e))return this.mapFile=e,oh(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let s=this.loadFile(n);if(!s)throw new Error("Unable to load previous source map: "+n.toString());return s}}else {if(t instanceof Oi)return ki.fromSourceMap(t).toString();if(t instanceof ki)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=ah(un(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Qo=Un;Un.default=Un;var{SourceMapConsumer:ch,SourceMapGenerator:uh}=ue,{fileURLToPath:Di,pathToFileURL:Jt}=ue,{isAbsolute:Wn,resolve:Hn}=ue,{nanoid:fh}=sh,fn=ue,Li=vs,hh=Qo,hn=Symbol("fromOffsetCache"),dh=!!(ch&&uh),Pi=!!(Hn&&Wn),Cr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!Pi||/^\w+:\/\//.test(t.from)||Wn(t.from)?this.file=t.from:this.file=Hn(t.from)),Pi&&dh){let n=new hh(this.css,t);if(n.text){this.map=n;let s=n.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s));}}this.file||(this.id="<input css "+fh(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,n,s={}){let i,o,l;if(t&&typeof t=="object"){let c=t,u=n;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,n=f.col;}else t=c.line,n=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col;}else o=u.line,l=u.column;}else if(!n){let c=this.fromOffset(t);t=c.line,n=c.col;}let a=this.origin(t,n,o,l);return a?i=new Li(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):i=new Li(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:l,line:o},this.css,this.file,s.plugin),i.input={column:n,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Jt&&(i.input.url=Jt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,n;if(this[hn])n=this[hn];else {let i=this.css.split(`
|
|
45
|
+
`);n=new Array(i.length);let o=0;for(let l=0,a=i.length;l<a;l++)n[l]=o,o+=i[l].length+1;this[hn]=n;}t=n[n.length-1];let s=0;if(e>=t)s=n.length-1;else {let i=n.length-2,o;for(;s<i;)if(o=s+(i-s>>1),e<n[o])i=o-1;else if(e>=n[o+1])s=o+1;else {s=o;break}}return {col:e-n[s]+1,line:s+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:Hn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,s){if(!this.map)return false;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof n=="number"&&(l=i.originalPositionFor({column:s,line:n}));let a;Wn(o.source)?a=Jt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Jt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Di)c.file=Di(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=i.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of ["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Fr=Cr;Cr.default=Cr;fn&&fn.registerInput&&fn.registerInput(Cr);var{SourceMapConsumer:ea,SourceMapGenerator:cr}=ue,{dirname:ur,relative:ta,resolve:ra,sep:na}=ue,{pathToFileURL:$i}=ue,ph=Fr,mh=!!(ea&&cr),gh=!!(ur&&ra&&ta&&na),yh=class{constructor(e,t,n,s){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
46
|
+
`;this.css.includes(`\r
|
|
47
|
+
`)&&(t=`\r
|
|
48
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||ur(e.file),s;this.mapOpts.sourcesContent===false?(s=new ea(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(n)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),gh&&mh&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t;}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=cr.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new cr({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 cr({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),i=l.match(/\n/g),i?(e+=i.length,o=l.lastIndexOf(`
|
|
49
|
+
`),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?ur(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=ur(ra(n,this.mapOpts.annotation)));let s=ta(n,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t);}});else {let e=new ph(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map);}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=true;let s=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(s,t.source.input.css);}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css);}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if($i){let n=$i(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;na==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},sa=yh,bh=Pr,zn=class extends bh{constructor(e){super(e),this.type="comment";}},Br=zn;zn.default=zn;var{isClean:ia,my:oa}=Et,aa=$r,la=Br,wh=Pr,ca,Ss,Cs,ua;function fa(r){return r.map(e=>(e.nodes&&(e.nodes=fa(e.nodes)),delete e.source,e))}function ha(r){if(r[ia]=false,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)ha(e);}var we=class da extends wh{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let s of n)this.proxyOf.nodes.push(s);}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e);}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],s=e(this.proxyOf.nodes[n],n),s!==false);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(s=>typeof s=="function"?(i,o)=>s(i.toProxy(),o):s)):t==="every"||t==="some"?n=>e[t]((s,...i)=>n(s.toProxy(),...i)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),true}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of s)this.proxyOf.nodes.splice(n+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],n<i&&(this.indexes[o]=i+s.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),s=n===0?"prepend":false,i=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let l of i)this.proxyOf.nodes.splice(n,0,l);let o;for(let l in this.indexes)o=this.indexes[l],n<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=fa(ca(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore");}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new aa(e)];}else if(e.selector)e=[new Ss(e)];else if(e.name)e=[new Cs(e)];else if(e.text)e=[new la(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[oa]||da.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[ia]&&ha(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let s of n)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+n.length;}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,n));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let s;try{s=e(t,n);}catch(i){throw t.addToError(i)}return s!==false&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,s)}):this.walk((n,s)=>{if(n.type==="atrule"&&n.name===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="atrule")return t(n,s)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,s)}):this.walk((n,s)=>{if(n.type==="decl"&&n.prop===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="decl")return t(n,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,s)}):this.walk((n,s)=>{if(n.type==="rule"&&n.selector===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="rule")return t(n,s)}))}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]}};we.registerParse=r=>{ca=r;};we.registerRule=r=>{Ss=r;};we.registerAtRule=r=>{Cs=r;};we.registerRoot=r=>{ua=r;};var _e=we;we.default=we;we.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,Cs.prototype):r.type==="rule"?Object.setPrototypeOf(r,Ss.prototype):r.type==="decl"?Object.setPrototypeOf(r,aa.prototype):r.type==="comment"?Object.setPrototypeOf(r,la.prototype):r.type==="root"&&Object.setPrototypeOf(r,ua.prototype),r[oa]=true,r.nodes&&r.nodes.forEach(e=>{we.rebuild(e);});};var vh=_e,pa,ma,gt=class extends vh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new pa(new ma,this,e).stringify()}};gt.registerLazyResult=r=>{pa=r;};gt.registerProcessor=r=>{ma=r;};var Es=gt;gt.default=gt;var Vn=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in t)this[n]=t[n];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},ga=Vn;Vn.default=Vn;var Sh=ga,Gn=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new Sh(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Is=Gn;Gn.default=Gn;var dn=39,Fi=34,Kt=92,Bi=47,qt=10,it=32,Qt=12,er=9,tr=13,Ch=91,Eh=93,Ih=40,xh=41,Rh=123,Mh=125,Ah=59,Th=42,Nh=58,_h=64,rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,nr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Oh=/.[\r\n"'(/\\]/,Ui=/[\da-f]/i,kh=function(e,t={}){let n=e.css.valueOf(),s=t.ignoreErrors,i,o,l,a,c,u,f,h,g,m,p=n.length,d=0,y=[],v=[];function b(){return d}function S(T){throw e.error("Unclosed "+T,d)}function E(){return v.length===0&&d>=p}function I(T){if(v.length)return v.pop();if(d>=p)return;let $=T?T.ignoreUnclosed:false;switch(i=n.charCodeAt(d),i){case qt:case it:case er:case tr:case Qt:{o=d;do o+=1,i=n.charCodeAt(o);while(i===it||i===qt||i===er||i===tr||i===Qt);m=["space",n.slice(d,o)],d=o-1;break}case Ch:case Eh:case Rh:case Mh:case Nh:case Ah:case xh:{let F=String.fromCharCode(i);m=[F,F,d];break}case Ih:{if(h=y.length?y.pop()[1]:"",g=n.charCodeAt(d+1),h==="url"&&g!==dn&&g!==Fi&&g!==it&&g!==qt&&g!==er&&g!==Qt&&g!==tr){o=d;do{if(u=false,o=n.indexOf(")",o+1),o===-1)if(s||$){o=d;break}else S("bracket");for(f=o;n.charCodeAt(f-1)===Kt;)f-=1,u=!u;}while(u);m=["brackets",n.slice(d,o+1),d,o],d=o;}else o=n.indexOf(")",d+1),a=n.slice(d,o+1),o===-1||Oh.test(a)?m=["(","(",d]:(m=["brackets",a,d,o],d=o);break}case dn:case Fi:{l=i===dn?"'":'"',o=d;do{if(u=false,o=n.indexOf(l,o+1),o===-1)if(s||$){o=d+1;break}else S("string");for(f=o;n.charCodeAt(f-1)===Kt;)f-=1,u=!u;}while(u);m=["string",n.slice(d,o+1),d,o],d=o;break}case _h:{rr.lastIndex=d+1,rr.test(n),rr.lastIndex===0?o=n.length-1:o=rr.lastIndex-2,m=["at-word",n.slice(d,o+1),d,o],d=o;break}case Kt:{for(o=d,c=true;n.charCodeAt(o+1)===Kt;)o+=1,c=!c;if(i=n.charCodeAt(o+1),c&&i!==Bi&&i!==it&&i!==qt&&i!==er&&i!==tr&&i!==Qt&&(o+=1,Ui.test(n.charAt(o)))){for(;Ui.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===it&&(o+=1);}m=["word",n.slice(d,o+1),d,o],d=o;break}default:{i===Bi&&n.charCodeAt(d+1)===Th?(o=n.indexOf("*/",d+2)+1,o===0&&(s||$?o=n.length:S("comment")),m=["comment",n.slice(d,o+1),d,o],d=o):(nr.lastIndex=d+1,nr.test(n),nr.lastIndex===0?o=n.length-1:o=nr.lastIndex-2,m=["word",n.slice(d,o+1),d,o],y.push(m),d=o);break}}return d++,m}function P(T){v.push(T);}return {back:P,endOfFile:E,nextToken:I,position:b}},ya=_e,Er=class extends ya{constructor(e){super(e),this.type="atrule";}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},xs=Er;Er.default=Er;ya.registerAtRule(Er);var ba=_e,wa,va,Ye=class extends ba{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,n){let s=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of s)i.raws.before=t.raws.before;}return s}removeChild(e,t){let n=this.index(e);return !t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new wa(new va,this,e).stringify()}};Ye.registerLazyResult=r=>{wa=r;};Ye.registerProcessor=r=>{va=r;};var It=Ye;Ye.default=Ye;ba.registerRoot(Ye);var yt={comma(r){return yt.split(r,[","],true)},space(r){let e=[" ",`
|
|
50
|
+
`," "];return yt.split(r,e)},split(r,e,t){let n=[],s="",i=false,o=0,l=false,a="",c=false;for(let u of r)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(i=true),i?(s!==""&&n.push(s.trim()),s="",i=false):s+=u;return (t||s!=="")&&n.push(s.trim()),n}},Sa=yt;yt.default=yt;var Ca=_e,Dh=Sa,Ir=class extends Ca{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Dh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n);}},Rs=Ir;Ir.default=Ir;Ca.registerRule(Ir);var Lh=$r,Ph=kh,$h=Br,Fh=xs,Bh=It,Wi=Rs,Hi={empty:true,space:true};function Uh(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}var Wh=class{constructor(e){this.input=e,this.root=new Bh,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new Fh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,s,i,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(n==="{"){l=true;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,s=a[i];s&&s[0]==="space";)s=a[--i];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++);}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let n=0,s;for(let i=t-1;i>=0&&(s=e[i],!(s[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,n,s,i;for(let[o,l]of e.entries()){if(n=l,s=n[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!i)this.doubleColon(n);else {if(i[0]==="word"&&i[1]==="progid")continue;return o}i=n;}return false}comment(e){let t=new $h;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else {let s=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3];}}createTokenizer(){this.tokenizer=Ph(this.input);}decl(e,t){let n=new Lh;this.init(n,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=true,e.pop()),n.source.end=this.getPosition(s[3]||s[2]||Uh(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;n.prop+=e.shift()[1];}n.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){n.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(n.raws.important=u);break}else if(i[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let h=c;h>0;h--){let g=u[h][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f;}f.trim().indexOf("!")===0&&(n.important=true,n.raws.important=f,e=u);}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(n.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e);}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Wi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t;}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e);}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position());}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(e){let t=this.input.fromOffset(e);return {column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=false);}other(e){let t=false,n=null,s=false,i=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(l&&s&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(s){this.decl(a,l);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=true;break}else n===":"&&(s=true);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(i),t&&s){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case "space":this.spaces+=e[1];break;case ";":this.freeSemicolon(e);break;case "}":this.end(e);break;case "comment":this.comment(e);break;case "at-word":this.atrule(e);break;case "{":this.emptyRule(e);break;default:this.other(e);break}this.endFile();}precheckMissedSemicolon(){}raw(e,t,n,s){let i,o,l=n.length,a="",c=true,u,f;for(let h=0;h<l;h+=1)i=n[h],o=i[0],o==="space"&&h===l-1&&!s?c=false:o==="comment"?(f=n[h-1]?n[h-1][0]:"empty",u=n[h+1]?n[h+1][0]:"empty",!Hi[f]&&!Hi[u]?a.slice(-1)===","?c=false:a+=i[1]:c=false):a+=i[1];if(!c){let h=n.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:h,value:a};}e[t]=a;}rule(e){e.pop();let t=new Wi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t;}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let s=t;s<e.length;s++)n+=e[s][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Hh=Wh,zh=_e,Vh=Hh,Gh=Fr;function xr(r,e){let t=new Gh(r,e),n=new Vh(t);try{n.parse();}catch(s){throw s}return n.root}var Ms=xr;xr.default=xr;zh.registerParse(xr);var{isClean:me,my:jh}=Et,Yh=sa,Xh=Lr,Zh=_e,Jh=Es;var zi=Is,Kh=Ms,qh=It,Qh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ed={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},td={Once:true,postcssPlugin:true,prepare:true},Xe=0;function ot(r){return typeof r=="object"&&typeof r.then=="function"}function Ea(r){let e=false,t=Qh[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Xe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Xe,t+"Exit"]:[t,t+"Exit"]}function Vi(r){let e;return r.type==="document"?e=["Document",Xe,"DocumentExit"]:r.type==="root"?e=["Root",Xe,"RootExit"]:e=Ea(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function jn(r){return r[me]=false,r.nodes&&r.nodes.forEach(e=>jn(e)),r}var Yn={},Ze=class Ia{constructor(e,t,n){this.stringified=false,this.processed=false;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=jn(t);else if(t instanceof Ia||t instanceof zi)s=jn(t.root),t.map&&(typeof n.map=="undefined"&&(n.map={}),n.map.inline||(n.map.inline=false),n.map.prev=t.map);else {let i=Kh;n.syntax&&(i=n.syntax.parse),n.parser&&(i=n.parser),i.parse&&(i=i.parse);try{s=i(t,n);}catch(o){this.processed=true,this.error=o;}s&&!s[jh]&&Zh.rebuild(s);}this.result=new zi(e,s,n),this.helpers={...Yn,postcss:Yn,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(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion;}catch(s){console&&console.error&&console.error(s);}return e}prepareVisitors(){this.listeners={};let e=(t,n,s)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,s]);};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!ed[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!td[n])if(typeof t[n]=="object")for(let s in t[n])s==="*"?e(t,n,t[n][s]):e(t,n+"-"+s.toLowerCase(),t[n][s]);else typeof t[n]=="function"&&e(t,n,t[n]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(ot(n))try{await n;}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=true;let t=[Vi(e)];for(;t.length>0;){let n=this.visitTick(t);if(ot(n))try{await n;}catch(s){let i=t[t.length-1].node;throw this.handleError(s,i)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(i=>n(i,this.helpers));await Promise.all(s);}else await n(e,this.helpers);}catch(s){throw this.handleError(s)}}}return this.processed=true,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return ot(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let e=this.result.opts,t=Xh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Yh(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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 e of this.plugins){let t=this.runOnRoot(e);if(ot(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=true,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e);}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){this.result.lastPlugin=n;let i;try{i=s(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(ot(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:s}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(n.toProxy(),this.helpers)}catch(a){throw this.handleError(a,n)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!l[me]){l[me]=true,e.push(Vi(l));return}t.iterator=0,delete n.indexes[o];}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===Xe){n.nodes&&n.nodes.length&&(n[me]=true,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[me]=true;let t=Ea(e);for(let n of t)if(n===Xe)e.nodes&&e.each(s=>{s[me]||this.walkSync(s);});else {let s=this.listeners[n];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}};Ze.registerPostcss=r=>{Yn=r;};var xa=Ze;Ze.default=Ze;qh.registerLazyResult(Ze);Jh.registerLazyResult(Ze);var rd=sa,nd=Lr;var sd=Ms,id=Is,Xn=class{constructor(e,t,n){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s,i=nd;this.result=new id(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new rd(i,s,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return []}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return []}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=sd;try{e=t(this._css,this._opts);}catch(n){this.error=n;}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return "NoWorkResult"}},od=Xn;Xn.default=Xn;var ad=od,ld=xa,cd=Es,ud=It,bt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e);}normalize(e){let t=[];for(let n of e)if(n.postcss===true?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return !this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ad(this,e,t):new ld(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},fd=bt;bt.default=bt;ud.registerProcessor(bt);cd.registerProcessor(bt);var hd=$r,dd=Qo,pd=Br,md=xs,gd=Fr,yd=It,bd=Rs;function wt(r,e){if(Array.isArray(r))return r.map(s=>wt(s));let{inputs:t,...n}=r;if(t){e=[];for(let s of t){let i={...s,__proto__:gd.prototype};i.map&&(i.map={...i.map,__proto__:dd.prototype}),e.push(i);}}if(n.nodes&&(n.nodes=r.nodes.map(s=>wt(s,e))),n.source){let{inputId:s,...i}=n.source;n.source=i,s!=null&&(n.source.input=e[s]);}if(n.type==="root")return new yd(n);if(n.type==="decl")return new hd(n);if(n.type==="rule")return new bd(n);if(n.type==="comment")return new pd(n);if(n.type==="atrule")return new md(n);throw new Error("Unknown node type: "+r.type)}var wd=wt;wt.default=wt;var vd=vs,Ra=$r,Sd=xa,Cd=_e,As=fd,Ed=Lr,Id=wd,Ma=Es,xd=ga,Aa=Br,Ta=xs,Rd=Is,Md=Fr,Ad=Ms,Td=Sa,Na=Rs,_a=It,Nd=Pr;function O(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new As(r)}O.plugin=function(e,t){let n=false;function s(...o){console&&console.warn&&!n&&(n=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
51
|
+
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:
|
|
52
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new As().version,l}let i;return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(o,l,a){return O([s(a)]).process(o,l)},s};O.stringify=Ed;O.parse=Ad;O.fromJSON=Id;O.list=Td;O.comment=r=>new Aa(r);O.atRule=r=>new Ta(r);O.decl=r=>new Ra(r);O.rule=r=>new Na(r);O.root=r=>new _a(r);O.document=r=>new Ma(r);O.CssSyntaxError=vd;O.Declaration=Ra;O.Container=Cd;O.Processor=As;O.Document=Ma;O.Comment=Aa;O.Warning=xd;O.AtRule=Ta;O.Result=Rd;O.Input=Md;O.Rule=Na;O.Root=_a;O.Node=Nd;Sd.registerPostcss(O);var _d=O;O.default=O;var H=zf(_d);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;var Zn=class r{constructor(...e){ie(this,"parentElement",null),ie(this,"parentNode",null),ie(this,"ownerDocument"),ie(this,"firstChild",null),ie(this,"lastChild",null),ie(this,"previousSibling",null),ie(this,"nextSibling",null),ie(this,"ELEMENT_NODE",1),ie(this,"TEXT_NODE",3),ie(this,"nodeType"),ie(this,"nodeName"),ie(this,"RRNodeType");}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof r){if(e.ownerDocument!==this.ownerDocument)return false;if(e===this)return true}else return false;for(;e.parentNode;){if(e.parentNode===this)return true;e=e.parentNode;}return false}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return "RRNode"}};var Gi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ji={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},sr={},Od=()=>!!globalThis.Zone;function Ts(r){if(sr[r])return sr[r];let e=globalThis[r],t=e.prototype,n=r in Gi?Gi[r]:void 0,s=!!(n&&n.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),i=r in ji?ji[r]:void 0,o=!!(i&&i.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!Od())return sr[r]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[r].prototype;return document.body.removeChild(l),c?sr[r]=c:t}catch(l){return t}}var pn={};function Se(r,e,t){var n;let s=`${r}.${String(t)}`;if(pn[s])return pn[s].call(e);let i=Ts(r),o=(n=Object.getOwnPropertyDescriptor(i,t))==null?void 0:n.get;return o?(pn[s]=o,o.call(e)):e[t]}var mn={};function Oa(r,e,t){let n=`${r}.${String(t)}`;if(mn[n])return mn[n].bind(e);let i=Ts(r)[t];return typeof i!="function"?e[t]:(mn[n]=i,i.bind(e))}function kd(r){return Se("Node",r,"ownerDocument")}function Dd(r){return Se("Node",r,"childNodes")}function Ld(r){return Se("Node",r,"parentNode")}function Pd(r){return Se("Node",r,"parentElement")}function $d(r){return Se("Node",r,"textContent")}function Fd(r,e){return Oa("Node",r,"contains")(e)}function Bd(r){return Oa("Node",r,"getRootNode")()}function Ud(r){return !r||!("host"in r)?null:Se("ShadowRoot",r,"host")}function Wd(r){return r.styleSheets}function Hd(r){return !r||!("shadowRoot"in r)?null:Se("Element",r,"shadowRoot")}function zd(r,e){return Se("Element",r,"querySelector")(e)}function Vd(r,e){return Se("Element",r,"querySelectorAll")(e)}function ka(){return Ts("MutationObserver").constructor}function Oe(r,e,t){try{if(!(e in r))return ()=>{};let n=r[e],s=t(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=s,()=>{r[e]=n;}}catch(n){return ()=>{}}}var x={ownerDocument:kd,childNodes:Dd,parentNode:Ld,parentElement:Pd,textContent:$d,contains:Fd,getRootNode:Bd,host:Ud,styleSheets:Wd,shadowRoot:Hd,querySelector:zd,querySelectorAll:Vd,mutationObserver:ka,patch:Oe};function q(r,e,t=document){let n={capture:true,passive:true};return t.addEventListener(r,e,n),()=>t.removeEventListener(r,e,n)}var Be=`Please stop import mirror directly. Instead of that,\r
|
|
53
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
54
|
+
or you can use record.mirror to access the mirror instance during recording.`,Yi={map:{},getId(){return console.error(Be),-1},getNode(){return console.error(Be),null},removeNodeFromMap(){console.error(Be);},has(){return console.error(Be),false},reset(){console.error(Be);}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Yi=new Proxy(Yi,{get(r,e,t){return e==="map"&&console.error(Be),Reflect.get(r,e,t)}}));function vt(r,e,t={}){let n=null,s=0;return function(...i){let o=Date.now();!s&&t.leading===false&&(s=o);let l=e-(o-s),a=this;l<=0||l>e?(n&&(clearTimeout(n),n=null),s=o,r.apply(a,i)):!n&&t.trailing!==false&&(n=setTimeout(()=>{s=t.leading===false?0:Date.now(),n=null,r.apply(a,i);},l));}}function Ur(r,e,t,n,s=window){let i=s.Object.getOwnPropertyDescriptor(r,e);return s.Object.defineProperty(r,e,n?t:{set(o){setTimeout(()=>{t.set.call(this,o);},0),i&&i.set&&i.set.call(this,o);}}),()=>Ur(r,e,i||{},true)}var Rr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Rr=()=>new Date().getTime());function Da(r){var e,t,n,s;let i=r.document;return {left:i.scrollingElement?i.scrollingElement.scrollLeft:r.pageXOffset!==void 0?r.pageXOffset:i.documentElement.scrollLeft||(i==null?void 0:i.body)&&((e=x.parentElement(i.body))==null?void 0:e.scrollLeft)||((t=i==null?void 0:i.body)==null?void 0:t.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:r.pageYOffset!==void 0?r.pageYOffset:(i==null?void 0:i.documentElement.scrollTop)||(i==null?void 0:i.body)&&((n=x.parentElement(i.body))==null?void 0:n.scrollTop)||((s=i==null?void 0:i.body)==null?void 0:s.scrollTop)||0}}function La(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Pa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function $a(r){return r?r.nodeType===r.ELEMENT_NODE?r:x.parentElement(r):null}function Q(r,e,t,n){if(!r)return false;let s=$a(r);if(!s)return false;try{if(typeof e=="string"){if(s.classList.contains(e)||n&&s.closest("."+e)!==null)return !0}else if(yr(s,e,n))return !0}catch(i){}return !!(t&&(s.matches(t)||n&&s.closest(t)!==null))}function Gd(r,e){return e.getId(r)!==-1}function gn(r,e,t){return r.tagName==="TITLE"&&t.headTitleMutations?true:e.getId(r)===ft}function Fa(r,e){if(lt(r))return false;let t=e.getId(r);if(!e.has(t))return true;let n=x.parentNode(r);return n&&n.nodeType===r.DOCUMENT_NODE?false:n?Fa(n,e):true}function Jn(r){return !!r.changedTouches}function jd(r=window){"NodeList"in r&&!r.NodeList.prototype.forEach&&(r.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in r&&!r.DOMTokenList.prototype.forEach&&(r.DOMTokenList.prototype.forEach=Array.prototype.forEach);}function Ba(r,e){return !!(r.nodeName==="IFRAME"&&e.getMeta(r))}function Ua(r,e){return !!(r.nodeName==="LINK"&&r.nodeType===r.ELEMENT_NODE&&r.getAttribute&&r.getAttribute("rel")==="stylesheet"&&e.getMeta(r))}function Kn(r){return r?r instanceof Zn&&"shadowRoot"in r?!!r.shadowRoot:!!x.shadowRoot(r):false}var qn=class{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map);}getId(e){var t;return (t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return t===void 0?n=this.id++:n=t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1;}generateId(){return this.id++}};function Wa(r){var e;let t=null;return "getRootNode"in r&&((e=x.getRootNode(r))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(r))&&(t=x.host(x.getRootNode(r))),t}function Yd(r){let e=r,t;for(;t=Wa(e);)e=t;return e}function Xd(r){let e=x.ownerDocument(r);if(!e)return false;let t=Yd(r);return x.contains(e,t)}function Ha(r){let e=x.ownerDocument(r);return e?x.contains(e,r)||Xd(r):false}var A=(r=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(A||{}),R=(r=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",r))(R||{}),ee=(r=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(ee||{}),ye=(r=>(r[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r))(ye||{}),Je=(r=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))(Je||{}),Ue=(r=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r[r.RateChange=4]="RateChange",r))(Ue||{});var za=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(za||{});function Xi(r){return "__ln"in r}var Qn=class{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null);}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(t==null?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Xi(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t);}else if(e.nextSibling&&Xi(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t);}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++;}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--);}},Zi=(r,e)=>`${r}@${e}`,es=class{constructor(){w(this,"frozen",false),w(this,"locked",false),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit();}),w(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new Qn,s=a=>{let c=a,u=ft;for(;u===ft;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},i=a=>{let c=x.parentNode(a);if(!c||!Ha(a))return;let u=false;if(a.nodeType===Node.TEXT_NODE){let m=c.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(c)&&(u=true);}let f=lt(c)?this.mirror.getId(Wa(a)):this.mirror.getId(c),h=s(a);if(f===-1||h===-1)return n.addNode(a);let g=He(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=>{Ba(m,this.mirror)&&this.iframeManager.addIframe(m),Ua(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Kn(a)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(a),this.doc);},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p);},cssCaptured:u});g&&(e.push({parentId:f,nextId:h,node:g}),t.add(g.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)Ji(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(x.parentNode(a))||i(a);for(let a of this.addedSet)!Ki(this.droppedSet,a)&&!Ji(this.removesSubTreeCache,a,this.mirror)||Ki(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;n.length;){let a=null;if(o){let c=this.mirror.getId(x.parentNode(o.value)),u=s(o.value);c!==-1&&u!==-1&&(a=o);}if(!a){let c=n.tail;for(;c;){let u=c;if(c=c.previous,u){let f=this.mirror.getId(x.parentNode(u.value));if(s(u.value)===-1)continue;if(f!==-1){a=u;break}else {let g=u.value,m=x.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=x.host(m);if(this.mirror.getId(p)!==-1){a=u;break}}}}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}o=a.previous,n.removeNode(a.value),i(a.value);}let l={texts:this.texts.map(a=>{let c=a.node,u=x.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:c}=a;if(typeof c.style=="string"){let u=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+f).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff);}return {id:this.mirror.getId(a.node),attributes:c}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.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(l));}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let n=Array.from(x.childNodes(e),s=>x.textContent(s)||"").join("");t.attributes.value=pr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:mr(e),value:n,maskInputFn:this.maskInputFn});}),w(this,"processMutation",e=>{if(!gn(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case "characterData":{let t=x.textContent(e.target);!Q(e.target,this.blockClass,this.blockSelector,false)&&t!==e.oldValue&&this.texts.push({value:fo(e.target,this.maskTextClass,this.maskTextSelector,true)&&t?this.maskTextFn?this.maskTextFn(t,$a(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case "attributes":{let t=e.target,n=e.attributeName,s=e.target.getAttribute(n);if(n==="value"){let o=mr(t);s=pr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:s,maskInputFn:this.maskInputFn});}if(Q(e.target,this.blockClass,this.blockSelector,false)||s===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(s))if(!t.contentDocument)n="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!uo(t.tagName,n))if(i.attributes[n]=co(this.doc,Te(t.tagName),Te(n),s),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch(l){this.unattachedDoc=this.doc;}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?i.styleDiff[l]=a:i.styleDiff[l]=[a,c]:i._unchangedStyles[l]=[a,c];}for(let l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(i.styleDiff[l]=false);}else n==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case "childList":{if(Q(e.target,this.blockClass,this.blockSelector,true))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),s=lt(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);Q(e.target,this.blockClass,this.blockSelector,false)||gn(t,this.mirror,this.slimDOMOptions)||!Gd(t,this.mirror)||(this.addedSet.has(t)?(ts(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||Fa(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Zi(n,s)]?ts(this.movedSet,t):(this.removes.push({parentId:s,id:n,isShadow:lt(e.target)&&ct(e.target)?true:void 0}),Zd(t,this.removesSubTreeCache))),this.mapRemoves.push(t));});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(gn(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[Zi(this.mirror.getId(e),n)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);Q(e,this.blockClass,this.blockSelector,false)||(x.childNodes(e).forEach(n=>this.genAdds(n)),Kn(e)&&x.childNodes(x.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e);}));}});}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t];});}freeze(){this.frozen=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 ts(r,e){r.delete(e),x.childNodes(e).forEach(t=>ts(r,t));}function Zd(r,e){let t=[r];for(;t.length;){let n=t.pop();e.has(n)||(e.add(n),x.childNodes(n).forEach(s=>t.push(s)));}}function Ji(r,e,t){return r.size===0?false:Jd(r,e)}function Jd(r,e,t){let n=x.parentNode(e);return n?r.has(n):false}function Ki(r,e){return r.size===0?false:Va(r,e)}function Va(r,e){let t=x.parentNode(e);return t?r.has(t)?true:Va(r,t):false}var ut;function Kd(r){ut=r;}function qd(){ut=void 0;}var M=r=>ut?(...t)=>{try{return r(...t)}catch(n){if(ut&&ut(n)===true)return;throw n}}:r,Ae=[];function xt(r){try{if("composedPath"in r){let e=r.composedPath();if(e.length)return e[0]}else if("path"in r&&r.path.length)return r.path[0]}catch(e){}return r&&r.target}function Ga(r,e){let t=new es;Ae.push(t),t.init(r);let n=new(ka())(M(t.processMutations.bind(t)));return n.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),n}function Qd({mousemoveCb:r,sampling:e,doc:t,mirror:n}){if(e.mousemove===false)return ()=>{};let s=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=vt(M(f=>{let h=Date.now()-l;r(o.map(g=>(g.timeOffset-=h,g)),f),o=[],l=null;}),i),c=M(vt(M(f=>{let h=xt(f),{clientX:g,clientY:m}=Jn(f)?f.changedTouches[0]:f;l||(l=Rr()),o.push({x:g,y:m,id:n.getId(h),timeOffset:Rr()-l}),a(typeof DragEvent!="undefined"&&f instanceof DragEvent?R.Drag:f instanceof MouseEvent?R.MouseMove:R.TouchMove);}),s,{trailing:!1})),u=[q("mousemove",c,t),q("touchmove",c,t),q("drag",c,t)];return M(()=>{u.forEach(f=>f());})}function ep({mouseInteractionCb:r,doc:e,mirror:t,blockClass:n,blockSelector:s,sampling:i}){if(i.mouseInteraction===false)return ()=>{};let o=i.mouseInteraction===true||i.mouseInteraction===void 0?{}:i.mouseInteraction,l=[],a=null,c=u=>f=>{let h=xt(f);if(Q(h,n,s,true))return;let g=null,m=u;if("pointerType"in f){switch(f.pointerType){case "mouse":g=ye.Mouse;break;case "touch":g=ye.Touch;break;case "pen":g=ye.Pen;break}g===ye.Touch?ee[u]===ee.MouseDown?m="TouchStart":ee[u]===ee.MouseUp&&(m="TouchEnd"):ye.Pen;}else Jn(f)&&(g=ye.Touch);g!==null?(a=g,(m.startsWith("Touch")&&g===ye.Touch||m.startsWith("Mouse")&&g===ye.Mouse)&&(g=null)):ee[u]===ee.Click&&(g=a,a=null);let p=Jn(f)?f.changedTouches[0]:f;if(!p)return;let d=t.getId(h),{clientX:y,clientY:v}=p;M(r)({type:ee[m],id:d,x:y,y:v,...g!==null&&{pointerType:g}});};return Object.keys(ee).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==false).forEach(u=>{let f=Te(u),h=c(u);if(window.PointerEvent)switch(ee[u]){case ee.MouseDown:case ee.MouseUp:f=f.replace("mouse","pointer");break;case ee.TouchStart:case ee.TouchEnd:return}l.push(q(f,h,e));}),M(()=>{l.forEach(u=>u());})}function ja({scrollCb:r,doc:e,mirror:t,blockClass:n,blockSelector:s,sampling:i}){let o=M(vt(M(l=>{let a=xt(l);if(!a||Q(a,n,s,!0))return;let c=t.getId(a);if(a===e&&e.defaultView){let u=Da(e.defaultView);r({id:c,x:u.left,y:u.top});}else r({id:c,x:a.scrollLeft,y:a.scrollTop});}),i.scroll||100));return q("scroll",o,e)}function tp({viewportResizeCb:r},{win:e}){let t=-1,n=-1,s=M(vt(M(()=>{let i=La(),o=Pa();(t!==i||n!==o)&&(r({width:Number(o),height:Number(i)}),t=i,n=o);}),200));return q("resize",s,e)}var rp=["INPUT","TEXTAREA","SELECT"],qi=new WeakMap;function np({inputCb:r,doc:e,mirror:t,blockClass:n,blockSelector:s,ignoreClass:i,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function f(v){let b=xt(v),S=v.isTrusted,E=b&&b.tagName;if(b&&E==="OPTION"&&(b=x.parentElement(b)),!b||!E||rp.indexOf(E)<0||Q(b,n,s,true)||b.classList.contains(i)||o&&b.matches(o))return;let I=b.value,P=false,T=mr(b)||"";T==="radio"||T==="checkbox"?P=b.checked:(l[E.toLowerCase()]||l[T])&&(I=pr({element:b,maskInputOptions:l,tagName:E,type:T,value:I,maskInputFn:a})),h(b,u?{text:I,isChecked:P,userTriggered:S}:{text:I,isChecked:P});let $=b.name;T==="radio"&&$&&P&&e.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(F=>{if(F!==b){let D=F.value;h(F,u?{text:D,isChecked:!P,userTriggered:false}:{text:D,isChecked:!P});}});}function h(v,b){let S=qi.get(v);if(!S||S.text!==b.text||S.isChecked!==b.isChecked){qi.set(v,b);let E=t.getId(v);M(r)({...b,id:E});}}let m=(c.input==="last"?["change"]:["input","change"]).map(v=>q(v,M(f),e)),p=e.defaultView;if(!p)return ()=>{m.forEach(v=>v());};let d=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&m.push(...y.map(v=>Ur(v[0],v[1],{set(){M(f)({target:this,isTrusted:false});}},false,p))),M(()=>{m.forEach(v=>v());})}function Mr(r){let e=[];function t(n,s){if(ir("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||ir("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||ir("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||ir("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let o=Array.from(n.parentRule.cssRules).indexOf(n);s.unshift(o);}else if(n.parentStyleSheet){let o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);s.unshift(o);}return s}return t(r,e)}function Ee(r,e,t){let n,s;return r?(r.ownerNode?n=e.getId(r.ownerNode):s=t.getId(r),{styleId:s,id:n}):{}}function sp({styleSheetRuleCb:r,mirror:e,stylesheetManager:t},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return ()=>{};let s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:M((u,f,h)=>{let[g,m]=h,{id:p,styleId:d}=Ee(f,e,t.styleMirror);return (p&&p!==-1||d&&d!==-1)&&r({id:p,styleId:d,adds:[{rule:g,index:m}]}),u.apply(f,h)})}),n.CSSStyleSheet.prototype.addRule=function(u,f,h=this.cssRules.length){let g=`${u} { ${f} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[g,h])};let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:M((u,f,h)=>{let[g]=h,{id:m,styleId:p}=Ee(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,removes:[{index:g}]}),u.apply(f,h)})}),n.CSSStyleSheet.prototype.removeRule=function(u){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:M((u,f,h)=>{let[g]=h,{id:m,styleId:p}=Ee(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,replace:g}),u.apply(f,h)})}));let l;n.CSSStyleSheet.prototype.replaceSync&&(l=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:M((u,f,h)=>{let[g]=h,{id:m,styleId:p}=Ee(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,replaceSync:g}),u.apply(f,h)})}));let a={};or("CSSGroupingRule")?a.CSSGroupingRule=n.CSSGroupingRule:(or("CSSMediaRule")&&(a.CSSMediaRule=n.CSSMediaRule),or("CSSConditionRule")&&(a.CSSConditionRule=n.CSSConditionRule),or("CSSSupportsRule")&&(a.CSSSupportsRule=n.CSSSupportsRule));let c={};return Object.entries(a).forEach(([u,f])=>{c[u]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(c[u].insertRule,{apply:M((h,g,m)=>{let[p,d]=m,{id:y,styleId:v}=Ee(g.parentStyleSheet,e,t.styleMirror);return (y&&y!==-1||v&&v!==-1)&&r({id:y,styleId:v,adds:[{rule:p,index:[...Mr(g),d||0]}]}),h.apply(g,m)})}),f.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:M((h,g,m)=>{let[p]=m,{id:d,styleId:y}=Ee(g.parentStyleSheet,e,t.styleMirror);return (d&&d!==-1||y&&y!==-1)&&r({id:d,styleId:y,removes:[{index:[...Mr(g),p]}]}),h.apply(g,m)})});}),M(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=i,o&&(n.CSSStyleSheet.prototype.replace=o),l&&(n.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,f])=>{f.prototype.insertRule=c[u].insertRule,f.prototype.deleteRule=c[u].deleteRule;});})}function Ya({mirror:r,stylesheetManager:e},t){var n,s,i;let o=null;t.nodeName==="#document"?o=r.getId(t):o=r.getId(x.host(t));let l=t.nodeName==="#document"?(n=t.defaultView)==null?void 0:n.Document:(i=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:i.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return (c=a.get)==null?void 0:c.call(this)},set(c){var u;let f=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o);}catch(h){}return f}}),M(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set});}))}function ip({styleDeclarationCb:r,mirror:e,ignoreCSSAttributes:t,stylesheetManager:n},{win:s}){let i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:M((l,a,c)=>{var u;let[f,h,g]=c;if(t.has(f))return i.apply(a,[f,h,g]);let{id:m,styleId:p}=Ee((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,set:{property:f,value:h,priority:g},index:Mr(a.parentRule)}),l.apply(a,c)})});let o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:M((l,a,c)=>{var u;let[f]=c;if(t.has(f))return o.apply(a,[f]);let{id:h,styleId:g}=Ee((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return (h&&h!==-1||g&&g!==-1)&&r({id:h,styleId:g,remove:{property:f},index:Mr(a.parentRule)}),l.apply(a,c)})}),M(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o;})}function op({mediaInteractionCb:r,blockClass:e,blockSelector:t,mirror:n,sampling:s,doc:i}){let o=M(a=>vt(M(c=>{let u=xt(c);if(!u||Q(u,e,t,!0))return;let{currentTime:f,volume:h,muted:g,playbackRate:m,loop:p}=u;r({type:a,id:n.getId(u),currentTime:f,volume:h,muted:g,playbackRate:m,loop:p});}),s.media||500)),l=[q("play",o(Ue.Play),i),q("pause",o(Ue.Pause),i),q("seeked",o(Ue.Seeked),i),q("volumechange",o(Ue.VolumeChange),i),q("ratechange",o(Ue.RateChange),i)];return M(()=>{l.forEach(a=>a());})}function ap({fontCb:r,doc:e}){let t=e.defaultView;if(!t)return ()=>{};let n=[],s=new WeakMap,i=t.FontFace;t.FontFace=function(a,c,u){let f=new i(a,c,u);return s.set(f,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),f};let o=Oe(e.fonts,"add",function(l){return function(a){return setTimeout(M(()=>{let c=s.get(a);c&&(r(c),s.delete(a));}),0),l.apply(this,[a])}});return n.push(()=>{t.FontFace=i;}),n.push(o),M(()=>{n.forEach(l=>l());})}function lp(r){let{doc:e,mirror:t,blockClass:n,blockSelector:s,selectionCb:i}=r,o=true,l=M(()=>{let a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;let c=[],u=a.rangeCount||0;for(let f=0;f<u;f++){let h=a.getRangeAt(f),{startContainer:g,startOffset:m,endContainer:p,endOffset:d}=h;Q(g,n,s,!0)||Q(p,n,s,!0)||c.push({start:t.getId(g),startOffset:m,end:t.getId(p),endOffset:d});}i({ranges:c});});return l(),q("selectionchange",l)}function cp({doc:r,customElementCb:e}){let t=r.defaultView;return !t||!t.customElements?()=>{}:Oe(t.customElements,"define",function(s){return function(i,o,l){try{e({define:{name:i}});}catch(a){console.warn(`Custom element callback failed for ${i}`);}return s.apply(this,[i,o,l])}})}function up(r,e){let{mutationCb:t,mousemoveCb:n,mouseInteractionCb:s,scrollCb:i,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:f,fontCb:h,selectionCb:g,customElementCb:m}=r;r.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p);},r.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),n(...p);},r.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),s(...p);},r.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),i(...p);},r.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p);},r.inputCb=(...p)=>{e.input&&e.input(...p),l(...p);},r.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),a(...p);},r.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),c(...p);},r.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),u(...p);},r.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),f(...p);},r.fontCb=(...p)=>{e.font&&e.font(...p),h(...p);},r.selectionCb=(...p)=>{e.selection&&e.selection(...p),g(...p);},r.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p);};}function fp(r,e={}){let t=r.doc.defaultView;if(!t)return ()=>{};up(r,e);let n;r.recordDOM&&(n=Ga(r,r.doc));let s=Qd(r),i=ep(r),o=ja(r),l=tp(r,{win:t}),a=np(r),c=op(r),u=()=>{},f=()=>{},h=()=>{},g=()=>{};r.recordDOM&&(u=sp(r,{win:t}),f=Ya(r,r.doc),h=ip(r,{win:t}),r.collectFonts&&(g=ap(r)));let m=lp(r),p=cp(r),d=[];for(let y of r.plugins)d.push(y.observer(y.callback,t,y.options));return M(()=>{Ae.forEach(y=>y.reset()),n==null||n.disconnect(),s(),i(),o(),l(),a(),c(),u(),f(),h(),g(),m(),p(),d.forEach(y=>y());})}function ir(r){return typeof window[r]!="undefined"}function or(r){return !!(typeof window[r]!="undefined"&&window[r].prototype&&"insertRule"in window[r].prototype&&"deleteRule"in window[r].prototype)}var Ar=class{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e;}getId(e,t,n,s){let i=n||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e),l=i.get(t);return l||(l=this.generateIdFn(),i.set(t,l),o.set(l,t)),l}getIds(e,t){let n=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(i=>this.getId(e,i,n,s))}getRemoteId(e,t,n){let s=n||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let i=s.get(t);return i||-1}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(s=>this.getRemoteId(e,s,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e);}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},rs=class{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Ar(lo)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ar(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this));}addIframe(e){this.iframes.set(e,true),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e);}addLoadListener(e){this.loadListener=e;}attachIframe(e,t){var n,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument));}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let s=this.crossOriginIframeMap.get(e.source);if(!s)return;let i=this.transformCrossOriginEvent(s,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout);}transformCrossOriginEvent(e,t){var n;switch(t.type){case A.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:A.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case A.Meta:case A.Load:case A.DomContentLoaded:return false;case A.Plugin:return t;case A.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case A.IncrementalSnapshot:switch(t.data.source){case R.Mutation:return t.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);let i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(s.node,i);}),t.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"]);}),t.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"]);}),t.data.texts.forEach(s=>{this.replaceIds(s,e,["id"]);}),t;case R.Drag:case R.TouchMove:case R.MouseMove:return t.data.positions.forEach(s=>{this.replaceIds(s,e,["id"]);}),t;case R.ViewportResize:return false;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(t.data,e,["id"]),t;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case R.Font:return t;case R.Selection:return t.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"]);}),t;case R.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(n=t.data.styles)==null||n.forEach(s=>{this.replaceStyleIds(s,e,["styleId"]);}),t}}return false}replace(e,t,n,s){for(let i of s)!Array.isArray(t[i])&&typeof t[i]!="number"||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,t);});}patchRootIdOnNode(e,t){e.type!==za.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t);});}},ns=class{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init();}init(){this.reset(),this.patchAttachShadow(Element,document);}addShadowRoot(e,t){if(!ct(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=Ga({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(ja({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(x.host(e))),this.restoreHandlers.push(Ya({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e));},0);}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument);}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(Oe(e.prototype,"attachShadow",function(s){return function(i){let o=s.call(this,i),l=x.shadowRoot(this);return l&&Ha(this)&&n.addShadowRoot(l,t),o}}));}reset(){this.restoreHandlers.forEach(e=>{try{e();}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hp=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(at=0;at<ze.length;at++)hp[ze.charCodeAt(at)]=at;var at,dp=function(r){var e=new Uint8Array(r),t,n=e.length,s="";for(t=0;t<n;t+=3)s+=ze[e[t]>>2],s+=ze[(e[t]&3)<<4|e[t+1]>>4],s+=ze[(e[t+1]&15)<<2|e[t+2]>>6],s+=ze[e[t+2]&63];return n%3===2?s=s.substring(0,s.length-1)+"=":n%3===1&&(s=s.substring(0,s.length-2)+"=="),s};var Qi=new Map;function pp(r,e){let t=Qi.get(r);return t||(t=new Map,Qi.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}var Xa=(r,e,t)=>{if(!r||!(Ja(r,e)||typeof r=="object"))return;let n=r.constructor.name,s=pp(t,n),i=s.indexOf(r);return i===-1&&(i=s.length,s.push(r)),i};function fr(r,e,t){if(r instanceof Array)return r.map(n=>fr(n,e,t));if(r===null)return r;if(r instanceof Float32Array||r instanceof Float64Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Uint8Array||r instanceof Uint16Array||r instanceof Int16Array||r instanceof Int8Array||r instanceof Uint8ClampedArray)return {rr_type:r.constructor.name,args:[Object.values(r)]};if(r instanceof ArrayBuffer){let n=r.constructor.name,s=dp(r);return {rr_type:n,base64:s}}else {if(r instanceof DataView)return {rr_type:r.constructor.name,args:[fr(r.buffer,e,t),r.byteOffset,r.byteLength]};if(r instanceof HTMLImageElement){let n=r.constructor.name,{src:s}=r;return {rr_type:n,src:s}}else if(r instanceof HTMLCanvasElement){let n="HTMLImageElement",s=r.toDataURL();return {rr_type:n,src:s}}else {if(r instanceof ImageData)return {rr_type:r.constructor.name,args:[fr(r.data,e,t),r.width,r.height]};if(Ja(r,e)||typeof r=="object"){let n=r.constructor.name,s=Xa(r,e,t);return {rr_type:n,index:s}}}}return r}var Za=(r,e,t)=>r.map(n=>fr(n,e,t)),Ja=(r,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>r instanceof e[s]);function mp(r,e,t,n){let s=[],i=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of i)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Oe(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return Q(this.canvas,t,n,!0)||setTimeout(()=>{let u=Za(c,e,this);r(this.canvas,{type:Je["2D"],property:o,args:u});},0),a.apply(this,c)}});s.push(l);}catch(l){let a=Ur(e.CanvasRenderingContext2D.prototype,o,{set(c){r(this.canvas,{type:Je["2D"],property:o,args:[c],setter:true});}});s.push(a);}return ()=>{s.forEach(o=>o());}}function gp(r){return r==="experimental-webgl"?"webgl":r}function eo(r,e,t,n){let s=[];try{let i=Oe(r.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!Q(this,e,t,!0)){let c=gp(l);if("__context"in this||(this.__context=c),n&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){let u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0);}else a.splice(0,1,{preserveDrawingBuffer:!0});}return o.apply(this,[l,...a])}});s.push(i);}catch(i){console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{s.forEach(i=>i());}}function to(r,e,t,n,s,i){let o=[],l=Object.getOwnPropertyNames(r);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof r[a]!="function")continue;let c=Oe(r,a,function(u){return function(...f){let h=u.apply(this,f);if(Xa(h,i,this),"tagName"in this.canvas&&!Q(this.canvas,n,s,!0)){let g=Za(f,i,this),m={type:e,property:a,args:g};t(this.canvas,m);}return h}});o.push(c);}catch(c){let u=Ur(r,a,{set(f){t(this.canvas,{type:e,property:a,args:[f],setter:true});}});o.push(u);}return o}function yp(r,e,t,n){let s=[];return s.push(...to(e.WebGLRenderingContext.prototype,Je.WebGL,r,t,n,e)),typeof e.WebGL2RenderingContext!="undefined"&&s.push(...to(e.WebGL2RenderingContext.prototype,Je.WebGL2,r,t,n,e)),()=>{s.forEach(i=>i());}}var Ka="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",bp=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),ro=typeof window!="undefined"&&window.Blob&&new Blob([bp(Ka)],{type:"text/javascript;charset=utf-8"});function wp(r){let e;try{if(e=ro&&(window.URL||window.webkitURL).createObjectURL(ro),!e)throw "";let t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e);}),t}catch(t){return new Worker("data:text/javascript;base64,"+Ka,{name:r==null?void 0:r.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e);}}var ss=class{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",false),w(this,"locked",false),w(this,"processMutation",(a,c)=>{(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(c);});let{sampling:t="all",win:n,blockClass:s,blockSelector:i,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(n,s,i),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,n,s,i,{dataURLOptions:l});}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(e,t,n,s,i){let o=eo(t,n,s,true),l=new Map,a=new wp;a.onmessage=m=>{let{id:p}=m.data;if(l.set(p,false),!("base64"in m.data))return;let{base64:d,type:y,width:v,height:b}=m.data;this.mutationCb({id:p,type:Je["2D"],commands:[{property:"clearRect",args:[0,0,v,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:y}]},0,0]}]});};let c=1e3/e,u=0,f,h=()=>{let m=[];return t.document.querySelectorAll("canvas").forEach(p=>{Q(p,n,s,true)||m.push(p);}),m},g=m=>{if(u&&m-u<c){f=requestAnimationFrame(g);return}u=m,h().forEach(async p=>{var d;let y=this.mirror.getId(p);if(l.get(y)||p.width===0||p.height===0)return;if(l.set(y,true),["webgl","webgl2"].includes(p.__context)){let b=p.getContext(p.__context);((d=b==null?void 0:b.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===false&&b.clear(b.COLOR_BUFFER_BIT);}let v=await createImageBitmap(p);a.postMessage({id:y,bitmap:v,width:p.width,height:p.height,dataURLOptions:i.dataURLOptions},[v]);}),f=requestAnimationFrame(g);};f=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(f);};}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=eo(e,t,n,false),i=mp(this.processMutation.bind(this),e,t,n),o=yp(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{s(),i(),o();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e);};requestAnimationFrame(e);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let s=n.map(o=>{let{type:l,...a}=o;return a}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:s}),this.pendingCanvasMutations.delete(e);}},is=class{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new qn),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb;}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e);}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e));}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},s=[];for(let i of e){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(l,a)=>({rule:oo(l,i.href),index:a}))})),n.styleIds.push(o);}s.length>0&&(n.styles=s),this.adoptedStyleSheetCb(n);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(e){}},os=class{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",false);}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(s=>s!==t)}add(e,t){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t));}destroy(){}},G,hr,yn,Tr=false;try{if(Array.from([1],r=>r*2)[0]!==2){let r=document.createElement("iframe");document.body.appendChild(r),Array.from=((oi=r.contentWindow)==null?void 0:oi.Array.from)||Array.from,document.body.removeChild(r);}}catch(r){console.debug("Unable to override Array.from",r);}var le=xc();function Ce(r={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=true,maskAllInputs:f,maskInputOptions:h,slimDOMOptions:g,maskInputFn:m,maskTextFn:p,hooks:d,packFn:y,sampling:v={},dataURLOptions:b={},mousemoveWait:S,recordDOM:E=true,recordCanvas:I=false,recordCrossOriginIframes:P=false,recordAfter:T=r.recordAfter==="DOMContentLoaded"?r.recordAfter:"load",userTriggeredOnInput:$=false,collectFonts:F=false,inlineImages:D=false,plugins:K,keepIframeSrcFn:C=()=>false,ignoreCSSAttributes:te=new Set([]),errorHandler:Ie}=r;Kd(Ie);let j=P?window.parent===window:true,se=false;if(!j)try{window.parent.document&&(se=!1);}catch(N){se=true;}if(j&&!e)throw new Error("emit function is required");if(!j&&!se)return ()=>{};S!==void 0&&v.mousemove===void 0&&(v.mousemove=S),le.reset();let xe=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}:h!==void 0?h:{password:true},he=ho(g);jd();let Hs,Qr=0,zs=N=>{for(let ae of K||[])ae.eventProcessor&&(N=ae.eventProcessor(N));return y&&!se&&(N=y(N)),N};G=(N,ae)=>{var z;let V=N;if(V.timestamp=Rr(),(z=Ae[0])!=null&&z.isFrozen()&&V.type!==A.FullSnapshot&&!(V.type===A.IncrementalSnapshot&&V.data.source===R.Mutation)&&Ae.forEach(re=>re.unfreeze()),j)e==null||e(zs(V),ae);else if(se){let re={type:"rrweb",event:zs(V),origin:window.location.origin,isCheckout:ae};window.parent.postMessage(re,"*");}if(V.type===A.FullSnapshot)Hs=V,Qr=0;else if(V.type===A.IncrementalSnapshot){if(V.data.source===R.Mutation&&V.data.isAttachIframe)return;Qr++;let re=n&&Qr>=n,k=t&&V.timestamp-Hs.timestamp>t;(re||k)&&hr(true);}};let Nt=N=>{G({type:A.IncrementalSnapshot,data:{source:R.Mutation,...N}});},Vs=N=>G({type:A.IncrementalSnapshot,data:{source:R.Scroll,...N}}),Gs=N=>G({type:A.IncrementalSnapshot,data:{source:R.CanvasMutation,...N}}),Bl=N=>G({type:A.IncrementalSnapshot,data:{source:R.AdoptedStyleSheet,...N}}),Re=new is({mutationCb:Nt,adoptedStyleSheetCb:Bl}),Me=new rs({mirror:le,mutationCb:Nt,stylesheetManager:Re,recordCrossOriginIframes:P,wrappedEmit:G});for(let N of K||[])N.getMirror&&N.getMirror({nodeMirror:le,crossOriginIframeMirror:Me.crossOriginIframeMirror,crossOriginIframeStyleMirror:Me.crossOriginIframeStyleMirror});let en=new os;yn=new ss({recordCanvas:I,mutationCb:Gs,win:window,blockClass:s,blockSelector:i,mirror:le,sampling:v.canvas,dataURLOptions:b});let _t=new ns({mutationCb:Nt,scrollCb:Vs,bypassOptions:{blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:xe,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:I,inlineImages:D,sampling:v,slimDOMOptions:he,iframeManager:Me,stylesheetManager:Re,canvasManager:yn,keepIframeSrcFn:C,processedNodeManager:en},mirror:le});hr=(N=false)=>{if(!E)return;G({type:A.Meta,data:{href:window.location.href,width:Pa(),height:La()}},N),Re.reset(),_t.init(),Ae.forEach(z=>z.lock());let ae=Zc(document,{mirror:le,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:xe,maskTextFn:p,maskInputFn:m,slimDOM:he,dataURLOptions:b,recordCanvas:I,inlineImages:D,onSerialize:z=>{Ba(z,le)&&Me.addIframe(z),Ua(z,le)&&Re.trackLinkElement(z),Kn(z)&&_t.addShadowRoot(x.shadowRoot(z),document);},onIframeLoad:(z,V)=>{Me.attachIframe(z,V),_t.observeAttachShadow(z);},onStylesheetLoad:(z,V)=>{Re.attachLinkElement(z,V);},keepIframeSrcFn:C});if(!ae)return console.warn("Failed to snapshot the document");G({type:A.FullSnapshot,data:{node:ae,initialOffset:Da(window)}},N),Ae.forEach(z=>z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Re.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document));};try{let N=[],ae=V=>{var re;return M(fp)({mutationCb:Nt,mousemoveCb:(k,tn)=>G({type:A.IncrementalSnapshot,data:{source:tn,positions:k}}),mouseInteractionCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.MouseInteraction,...k}}),scrollCb:Vs,viewportResizeCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.ViewportResize,...k}}),inputCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.Input,...k}}),mediaInteractionCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.MediaInteraction,...k}}),styleSheetRuleCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.StyleSheetRule,...k}}),styleDeclarationCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.StyleDeclaration,...k}}),canvasMutationCb:Gs,fontCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.Font,...k}}),selectionCb:k=>{G({type:A.IncrementalSnapshot,data:{source:R.Selection,...k}});},customElementCb:k=>{G({type:A.IncrementalSnapshot,data:{source:R.CustomElement,...k}});},blockClass:s,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:xe,inlineStylesheet:u,sampling:v,recordDOM:E,recordCanvas:I,inlineImages:D,userTriggeredOnInput:$,collectFonts:F,doc:V,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:C,blockSelector:i,slimDOMOptions:he,dataURLOptions:b,mirror:le,iframeManager:Me,stylesheetManager:Re,shadowDomManager:_t,processedNodeManager:en,canvasManager:yn,ignoreCSSAttributes:te,plugins:((re=K==null?void 0:K.filter(k=>k.observer))==null?void 0:re.map(k=>({observer:k.observer,options:k.options,callback:tn=>G({type:A.Plugin,data:{plugin:k.name,payload:tn}})})))||[]},d)};Me.addLoadListener(V=>{try{N.push(ae(V.contentDocument));}catch(re){console.warn(re);}});let z=()=>{hr(),N.push(ae(document)),Tr=!0;};return ["interactive","complete"].includes(document.readyState)?z():(N.push(q("DOMContentLoaded",()=>{G({type:A.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&z();})),N.push(q("load",()=>{G({type:A.Load,data:{}}),T==="load"&&z();},window))),()=>{N.forEach(V=>{try{V();}catch(re){String(re).toLowerCase().includes("cross-origin")||console.warn(re);}}),en.destroy(),Tr=!1,qd();}}catch(N){console.warn(N);}}Ce.addCustomEvent=(r,e)=>{if(!Tr)throw new Error("please add custom event after start recording");G({type:A.Custom,data:{tag:r,payload:e}});};Ce.freezePage=()=>{Ae.forEach(r=>r.freeze());};Ce.takeFullSnapshot=r=>{if(!Tr)throw new Error("please take full snapshot after start recording");hr(r);};Ce.mirror=le;var no;(function(r){r[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped";})(no||(no={}));var vp="https://blocfeed.com/api/replay-events";function qa(r){var K;if(!r.config.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=Y();if(Dt(e)%100/100>=r.config.sampling)return ()=>{};let n=Date.now(),s=(K=r.config.endpoint)!=null?K:vp,i=[],o=0,l=false,a=false,c=null,u=`bf_replay_chunkseq_${e}`,f=`bf_replay_pauses_${e}`,h=0,g=0;try{let C=sessionStorage.getItem(u);C&&(h=parseInt(C,10)||0);let te=sessionStorage.getItem(f);te&&(g=parseInt(te,10)||0);}catch(C){}let m=(C=false)=>{if(i.length===0)return;let te=C?Cp(i):i;i=[],o=0;let Ie=h++;try{sessionStorage.setItem(u,String(h));}catch(j){}Ep({blocfeedId:r.blocfeedId,sessionId:e,sessionStartedAtMs:n,chunkSeq:Ie,events:te,endpoint:s,useBeacon:C,pauseCount:g});},p=setInterval(()=>{l||m();},r.config.flushIntervalMs),d=setTimeout(()=>{m(),D();},r.config.maxDurationMs),y=null,v=()=>{y&&clearTimeout(y),y=setTimeout(()=>{$();},r.config.inactivityTimeoutMs);},b=()=>{m(true);};window.addEventListener("pagehide",b);let S=r.config.masking,E={emit(C){l||(i.push(C),o+=Sp(C),v(),o>=r.config.flushSizeBytes&&m());},recordCanvas:false,sampling:{mousemove:50}};S.maskAllInputs!==void 0&&(E.maskAllInputs=S.maskAllInputs),S.maskTextSelector!==void 0&&(E.maskTextSelector=S.maskTextSelector),S.maskTextClass!==void 0&&(E.maskTextClass=S.maskTextClass),S.blockSelector!==void 0&&(E.blockSelector=S.blockSelector);let I=null,P=()=>{I&&(document.removeEventListener("pointerdown",I,true),document.removeEventListener("keydown",I,true),I=null);};function T(){var C;c=(C=Ce(E))!=null?C:null;}function $(){if(l||a)return;a=true,g++;try{sessionStorage.setItem(f,String(g));}catch(te){}if(m(),c){try{c();}catch(te){}c=null;}y&&(clearTimeout(y),y=null);let C=()=>{P(),F();};I=C,document.addEventListener("pointerdown",C,{capture:true,once:true}),document.addEventListener("keydown",C,{capture:true,once:true});}function F(){l||!a||(a=false,T(),v());}v(),T();function D(){if(!l&&(l=true,clearInterval(p),clearTimeout(d),y&&clearTimeout(y),P(),window.removeEventListener("pagehide",b),c)){try{c();}catch(C){}c=null;}}return D}function Sp(r){try{return JSON.stringify(r).length}catch(e){return 1024}}function Cp(r){let t=JSON.stringify(r);if(t.length<=6e4)return r;let n=[...r];for(;n.length>1;)if(n.shift(),t=JSON.stringify(n),t.length<=6e4)return n;return n}async function Ep(r){let e=JSON.stringify({blocfeed_id:r.blocfeedId,session_id:r.sessionId,session_started_at_ms:r.sessionStartedAtMs,chunk_seq:r.chunkSeq,pause_count:r.pauseCount,events:r.events,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:""});if(r.useBeacon&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let n=new Blob([e],{type:"application/json"});navigator.sendBeacon(r.endpoint,n);return}catch(n){}let t=!!r.useBeacon;try{await fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:e,...t?{keepalive:!0}:{}});}catch(n){}}var Ip={enabled:true,endpoint:null,maxDurationMs:144e5,flushIntervalMs:3e4,flushSizeBytes:1048576,inactivityTimeoutMs:18e5,sampling:1,masking:{maskAllInputs:true,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}};function Qa(r){var t,n,s,i,o,l,a,c;let e=Ip;return {enabled:(t=r==null?void 0:r.enabled)!=null?t:e.enabled,endpoint:(n=r==null?void 0:r.endpoint)!=null?n:e.endpoint,maxDurationMs:(s=r==null?void 0:r.maxDurationMs)!=null?s:e.maxDurationMs,flushIntervalMs:(i=r==null?void 0:r.flushIntervalMs)!=null?i:e.flushIntervalMs,flushSizeBytes:(o=r==null?void 0:r.flushSizeBytes)!=null?o:e.flushSizeBytes,inactivityTimeoutMs:(l=r==null?void 0:r.inactivityTimeoutMs)!=null?l:e.inactivityTimeoutMs,sampling:(a=r==null?void 0:r.sampling)!=null?a:e.sampling,masking:{...e.masking,...(c=r==null?void 0:r.masking)!=null?c:{}}}}var xp="https://blocfeed.com/api/events/track",Rp=5e3,Mp=50,Ap=1024,zr="blocfeed-events-queue",el=500,tl=100,Tp=/^[a-z][a-z0-9_]{0,127}$/,rl=50,nl=1024,sl;function Ns(r){sl=r;}function Np(r){if(typeof r!="string"||!Tp.test(r))throw new Error(`[BlocFeed] track(): event_name "${r}" must match /^[a-z][a-z0-9_]{0,127}$/ (lowercase, start with a letter, only [a-z0-9_], \u2264128 chars).`)}function _p(r){if(r===void 0)return {};if(r===null||typeof r!="object"||Array.isArray(r))throw new Error("[BlocFeed] track(): properties must be a plain object.");let e=Object.keys(r);if(e.length>rl)throw new Error(`[BlocFeed] track(): properties has ${e.length} keys, max ${rl}.`);for(let n of e){let s=r[n];if(s!==null&&typeof s!="string"&&typeof s!="number"&&typeof s!="boolean")throw new Error(`[BlocFeed] track(): property "${n}" has unsupported type "${typeof s}". Allowed: string | number | boolean | null.`)}let t;try{t=JSON.stringify(r);}catch(n){throw new Error(`[BlocFeed] track(): properties is not JSON-serializable (${n.message}).`)}if(t.length>nl)throw new Error(`[BlocFeed] track(): properties serialized to ${t.length} bytes, max ${nl}. Server allows 8192 bytes \u2014 the client cap is defensive; trim down or split the event.`);return r}function _s(){if(typeof localStorage=="undefined")return [];try{let r=localStorage.getItem(zr);if(!r)return [];let e=JSON.parse(r);return Array.isArray(e)?e:[]}catch(r){try{localStorage.removeItem(zr);}catch(e){}return []}}function Os(r){if(typeof localStorage!="undefined")try{if(r.length===0)localStorage.removeItem(zr);else {let e=r.length>el?r.slice(r.length-el):r;localStorage.setItem(zr,JSON.stringify(e));}}catch(e){}}var oe=null;function Op(){if(oe)return oe;if(typeof window=="undefined")return null;let r=kp();return r?(oe={blocfeedId:r,endpoint:xp,events:[],bytes:0,flushTimer:null,pageHideHandler:null,visibilityHandler:null},oe.flushTimer=setInterval(()=>{Hr(false);},Rp),oe.pageHideHandler=()=>{Hr(true);},oe.visibilityHandler=()=>{document.visibilityState==="hidden"&&Hr(true);},window.addEventListener("pagehide",oe.pageHideHandler),document.addEventListener("visibilitychange",oe.visibilityHandler),oe):null}function kp(){try{let e=window.__blocfeed_id__;return typeof e=="string"&&e.length>0?e:null}catch(r){return null}}function il(r){try{window.__blocfeed_id__=r;}catch(e){}oe&&(oe.blocfeedId=r);}function ks(r,e,t){var f,h,g;Np(r);let n=_p(e),s=new Date().toISOString(),i={event_name:r,properties:n,occurred_at:s},o=(f=void 0)!=null?f:Lp();o&&(i.session_id=o);let l=(h=void 0)!=null?h:sl;l&&(i.user_id=l);let a=(g=void 0)!=null?g:Pp();a&&(i.page_url=a);let c=$p();c&&(i.user_agent=c);let u=Op();if(!u){let m=_s();m.push(i),Os(m);return}u.events.push(i),u.bytes+=Dp(i),(u.events.length>=Mp||u.bytes>=Ap)&&Hr(false);}async function Hr(r){let e=oe;if(!e)return;let n=_s().concat(e.events);if(e.events=[],e.bytes=0,Os([]),n.length!==0)for(let s=0;s<n.length;s+=tl){let i=n.slice(s,s+tl),o=JSON.stringify({blocfeed_id:e.blocfeedId,events:i});if(r&&Bp())try{let l=new Blob([o],{type:"application/json"});navigator.sendBeacon(e.endpoint,l)||Wr(i);continue}catch(l){Wr(i);continue}try{(await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:o})).ok||Wr(i);}catch(l){Wr(i);}}}function Wr(r){let e=_s();Os(e.concat(r));}function Dp(r){try{return JSON.stringify(r).length}catch(e){return 256}}function Lp(){try{return Y()}catch(r){return}}function Pp(){try{return typeof window!="undefined"?window.location.href:void 0}catch(r){return}}function $p(){try{return typeof navigator!="undefined"?navigator.userAgent:void 0}catch(r){return}}function Bp(){return typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function"}var Up="https://blocfeed.com/api/heartbeat",Wp=300*1e3;function ol(r){var l,a,c;if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=(l=r.endpoint)!=null?l:Up,t=(a=r.intervalMs)!=null?a:Wp,n=(c=r.features)!=null?c:["replay","behavioral","customEvents"],s=u=>{try{let f=JSON.stringify({blocfeed_id:r.blocfeedId,session_id:Hp(),version:r.version,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:"",sdk_features:n}),h={method:"POST",headers:{"Content-Type":"application/json"},body:f};u&&(h.keepalive=!0),fetch(e,h).catch(()=>{});}catch(f){}};try{s(!1);}catch(u){}let i=null;try{i=setInterval(()=>{try{s(!1);}catch(u){}},t);}catch(u){i=null;}let o=()=>{try{s(!0);}catch(u){}};try{window.addEventListener("pagehide",o);}catch(u){}return function(){try{i&&clearInterval(i);}catch(f){}i=null;try{window.removeEventListener("pagehide",o);}catch(f){}}}function Hp(){try{return Y()}catch(r){return ""}}var Vr="0.22.0";var zp=5e3,Gr=class{constructor(e){this.submitter=null;this.detectorUninstallers=[];this.flushTimer=null;this.pageHideHandler=null;this.installed=false;this.opts=e,this.resolved=js(e.config);}install(){var l,a,c,u;if(this.installed||!this.resolved.enabled)return;let e=()=>{try{let f=Y();return Dt(f)%100/100<this.resolved.sampling}catch(f){return false}};if(!((l=this.opts.passiveSampler)!=null?l:e)())return;il(this.opts.blocfeedId);let n=(a=this.opts.endpoint)!=null?a:"https://blocfeed.com/api/behavioral-events";this.submitter=(c=this.opts.submitter)!=null?c:Ys({endpoint:n,blocfeedId:this.opts.blocfeedId});let s=f=>{var h;(h=this.submitter)==null||h.enqueue(f);};this.detectorUninstallers.push(Qs(this.resolved,s)),this.detectorUninstallers.push(ri(this.resolved,s)),this.detectorUninstallers.push(ni(this.resolved,s)),this.detectorUninstallers.push(si(this.resolved,s)),this.detectorUninstallers.push(ii(this.resolved,s));let i=Qa((u=this.opts.config)==null?void 0:u.sessionReplay);this.detectorUninstallers.push(qa({blocfeedId:this.opts.blocfeedId,config:i}));let o=["behavioral","customEvents"];if(i.enabled&&o.unshift("replay"),this.opts.extraSdkFeatures)for(let f of this.opts.extraSdkFeatures)o.push(f);this.detectorUninstallers.push(ol({blocfeedId:this.opts.blocfeedId,version:Vr,features:o})),this.flushTimer=setInterval(()=>{var f;(f=this.submitter)==null||f.flush();},zp),this.pageHideHandler=()=>{var f;(f=this.submitter)==null||f.flushBeacon();},typeof window!="undefined"&&window.addEventListener("pagehide",this.pageHideHandler),this.installed=true;}uninstall(){var e;if(this.installed){for(let t of [...this.detectorUninstallers].reverse())try{t();}catch(n){}this.detectorUninstallers=[],this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.pageHideHandler&&typeof window!="undefined"&&(window.removeEventListener("pagehide",this.pageHideHandler),this.pageHideHandler=null);try{(e=this.submitter)==null||e.flush();}catch(t){}this.submitter=null,this.installed=false;}}};var Tm="blocfeed-embed/ready",Nm="blocfeed-embed/screenshot-request",_m="blocfeed-embed/submit-success",Om="blocfeed-embed/close",km="blocfeed-embed/init",Dm="blocfeed-embed/screenshot-result",Kr=null;function Lm(r,e,t){r.style.position="fixed",r.style.zIndex="2147483647",r.style.background=e,r.style.color="#ffffff",r.style.border="0",r.style.borderRadius="24px",r.style.padding="12px 20px",r.style.fontSize="14px",r.style.fontWeight="600",r.style.fontFamily="system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",r.style.cursor="pointer",r.style.boxShadow="0 8px 16px rgba(0,0,0,0.18)",r.style.lineHeight="1",r.style.top="",r.style.bottom="",r.style.left="",r.style.right="";let n="16px";t==="bottom-right"?(r.style.bottom=n,r.style.right=n):t==="bottom-left"?(r.style.bottom=n,r.style.left=n):t==="top-right"?(r.style.top=n,r.style.right=n):(r.style.top=n,r.style.left=n);}function Pm(r,e){r.style.position="fixed",r.style.width="380px",r.style.height="600px",r.style.border="0",r.style.borderRadius="12px",r.style.boxShadow="0 25px 50px -12px rgba(0,0,0,0.4)",r.style.zIndex="2147483646",r.style.display="none",r.style.background="transparent",r.style.top="",r.style.bottom="",r.style.left="",r.style.right="",e==="bottom-right"?(r.style.bottom="80px",r.style.right="16px"):e==="bottom-left"?(r.style.bottom="80px",r.style.left="16px"):e==="top-right"?(r.style.top="80px",r.style.right="16px"):(r.style.top="80px",r.style.left="16px");}function $m(r,e){return `${r.replace(/\/+$/,"")}/embed/${encodeURIComponent(e)}`}async function Fm(){try{let r=await Promise.resolve().then(()=>(kl(),Ol)),e=typeof devicePixelRatio=="number"?devicePixelRatio:1;return {dataUrl:await r.toPng(document.body,{pixelRatio:Math.min(2,e),cacheBust:!0})}}catch(r){return {dataUrl:null,error:r instanceof Error?r.message:String(r)}}}function Dl(r,e,t){let n=r.contentWindow;if(n)try{n.postMessage(t,e);}catch(s){}}function Ll(r){if(Kr)return Kr;if(typeof window=="undefined"||typeof document=="undefined")return ()=>{};let{blocfeedId:e,embedOrigin:t,color:n,label:s,position:i,user:o}=r,l=document.createElement("button");l.setAttribute("data-blocfeed-trigger",""),l.setAttribute("type","button"),l.setAttribute("aria-label","Open feedback"),l.textContent=s,Lm(l,n,i);let a=document.createElement("iframe");a.setAttribute("data-blocfeed-iframe",""),a.setAttribute("title","BlocFeed feedback"),a.setAttribute("allow","microphone; clipboard-write"),a.src=$m(t,e),Pm(a,i);let c=()=>{a.style.display="block";};l.addEventListener("click",c);let u=h=>{if(h.origin!==t)return;let g=h.data;if(!(!g||typeof g!="object"||typeof g.kind!="string")){if(g.kind===Tm){let m={kind:km,pageUrl:window.location.href,userAgent:navigator.userAgent,sessionId:Y(),...o!==void 0?{user:o}:{}};Dl(a,t,m);return}if(g.kind===Nm){let m=g.requestId;Fm().then(p=>{Dl(a,t,{kind:Dm,requestId:m,dataUrl:p.dataUrl,...p.error!==void 0?{error:p.error}:{}});});return}if(g.kind===_m){try{console.log("[BlocFeed] feedback submitted",{feedback_id:g.feedback_id,viewer_url:g.viewer_url});}catch(m){}return}if(g.kind===Om){a.style.display="none";return}}};window.addEventListener("message",u),document.body.appendChild(l),document.body.appendChild(a);let f=()=>{try{l.removeEventListener("click",c);}catch(h){}try{window.removeEventListener("message",u);}catch(h){}l.parentNode&&l.parentNode.removeChild(l),a.parentNode&&a.parentNode.removeChild(a),Kr=null;};return Kr=f,f}var ge=null;function $l(r){var e;ge||((e=r.user)!=null&&e.id&&Ns(r.user.id),ge=new Gr({blocfeedId:r.blocfeed_id,...r.config!==void 0?{config:r.config}:{},extraSdkFeatures:["script-tag"]}),ge.install());}function Bm(r,e){Ns(r);}function Um(r,e){ks(r,e);}function Wm(){ge&&(ge.uninstall(),ge=null);}var Hm={init:$l,identify:Bm,track:Um,uninstall:Wm,SDK_VERSION:Vr};function zm(r){let e=(r!=null?r:"inputs").toLowerCase();return e==="none"?{maskAllInputs:false,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}:e==="text"?{maskAllInputs:true,maskTextSelector:"*",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}:{maskAllInputs:true,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}}var Ws="https://blocfeed.com",Vm="#12D393",Gm="Feedback",Pl="bottom-right",jm=new Set(["bottom-right","bottom-left","top-right","top-left"]);function Ym(r){if(!r)return Ws;let e=r.trim();return e&&(e.startsWith("https://")||/^http:\/\/localhost(?::\d+)?(\/.*)?$/i.test(e))?e:Ws}function Xm(r){if(!r)return Pl;let e=r.toLowerCase();return jm.has(e)?e:Pl}function Zm(r){var m,p;let e=r.blocfeedId;if(!e)return null;let t=parseFloat((m=r.sample)!=null?m:"1"),n=Number.isFinite(t)&&t>0?t:1,s=r.replay!=="false",i=r.signals!=="false",o=zm((p=r.mask)!=null?p:"inputs"),l={sampling:n,sessionReplay:{enabled:s,sampling:n,...o!==void 0?{masking:o}:{}},rageClick:{enabled:i},deadClick:{enabled:i},httpFail:{enabled:i},redirectLoop:{enabled:i},formDataLoss:{enabled:i}},a=r.userId||r.userEmail||r.userName?{...r.userId!==void 0?{id:r.userId}:{},...r.userEmail!==void 0?{email:r.userEmail}:{},...r.userName!==void 0?{name:r.userName}:{}}:void 0,c=r.feedback==="true",u=Ym(r.embedOrigin),f=r.feedbackColor&&r.feedbackColor.trim()?r.feedbackColor.trim():Vm,h=r.feedbackLabel&&r.feedbackLabel.trim()?r.feedbackLabel:Gm,g=Xm(r.feedbackPosition);return {blocfeedId:e,...a!==void 0?{user:a}:{},config:l,trackClicks:r.trackClicks==="true",feedback:c,embedOrigin:u,feedbackColor:f,feedbackLabel:h,feedbackPosition:g}}var Jm=60;function Km(){if(typeof document=="undefined")return ()=>{};let r=[],e=t=>{var o,l;let n=Date.now();if(r=r.filter(a=>n-a<6e4),r.length>=Jm)return;r.push(n);let s=t.target;if(!s||!(s instanceof Element))return;let i=null;try{i=(l=(o=s.innerText)==null?void 0:o.trim().slice(0,80))!=null?l:null;}catch(a){i=null;}try{ks("click",{tag:s.tagName.toLowerCase(),text:i||null,url:window.location.href});}catch(a){}};return document.addEventListener("click",e,{capture:true,passive:true}),()=>{try{document.removeEventListener("click",e,{capture:!0});}catch(t){}}}function Fl(){if(typeof document=="undefined")return null;let r=document.currentScript;return r&&r.dataset&&r.dataset.blocfeedId?r:document.querySelector("script[data-blocfeed-id]")}function qr(){if(typeof window=="undefined"||typeof document=="undefined")return;let r=Fl();if(!r)return;let e=Zm(r.dataset);if(!e){console.warn("[BlocFeed] script-tag init: data-blocfeed-id missing");return}if($l({blocfeed_id:e.blocfeedId,...e.user!==void 0?{user:e.user}:{},config:e.config}),e.trackClicks&&Km(),e.feedback)try{Ll({blocfeedId:e.blocfeedId,embedOrigin:e.embedOrigin,color:e.feedbackColor,label:e.feedbackLabel,position:e.feedbackPosition,...e.user!==void 0?{user:e.user}:{}});}catch(t){}}typeof window!="undefined"&&(window.BlocFeed=Hm,Fl()?qr():typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",qr,{once:true}):qr()));function ob(){return ge}function ab(){ge&&(ge.uninstall(),ge=null);}function lb(){qr();}/*! Bundled license information:
|
|
55
|
+
|
|
56
|
+
rrweb/dist/rrweb.js:
|
|
57
|
+
(*! *****************************************************************************
|
|
58
|
+
Copyright (c) Microsoft Corporation.
|
|
59
|
+
|
|
60
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
61
|
+
purpose with or without fee is hereby granted.
|
|
62
|
+
|
|
63
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
64
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
65
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
66
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
67
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
68
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
69
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
70
|
+
***************************************************************************** *)
|
|
71
|
+
*/exports.BlocFeed=Hm;exports.__autoInitForTesting=lb;exports.__getInstalledTrackerForTesting=ob;exports.__resetForTesting=ab;exports.parseMasking=zm;exports.parseScriptTagAttrs=Zm;return exports;})({});
|