@appsurify-testmap/rrweb-snapshot 3.11.0-alpha.1 → 3.12.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/rrweb-snapshot.cjs +29 -9
- package/dist/rrweb-snapshot.cjs.map +1 -1
- package/dist/rrweb-snapshot.js +29 -9
- package/dist/rrweb-snapshot.js.map +1 -1
- package/dist/rrweb-snapshot.umd.cjs +29 -9
- package/dist/rrweb-snapshot.umd.cjs.map +3 -3
- package/dist/rrweb-snapshot.umd.min.cjs +16 -16
- package/dist/rrweb-snapshot.umd.min.cjs.map +3 -3
- package/package.json +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrwebSnapshot", [], f);} else if ("object" == typeof exports) {exports["rrwebSnapshot"] = f();} else {g["rrwebSnapshot"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
2
|
-
"use strict";var ks=Object.defineProperty,Ls=Object.defineProperties;var _s=Object.getOwnPropertyDescriptors;var be=Object.getOwnPropertySymbols;var Ut=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable;var Ft=(s,e,t)=>e in s?ks(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,k=(s,e)=>{for(var t in e||(e={}))Ut.call(e,t)&&Ft(s,t,e[t]);if(be)for(var t of be(e))Bt.call(e,t)&&Ft(s,t,e[t]);return s},Z=(s,e)=>Ls(s,_s(e));var Je=(s,e)=>{var t={};for(var r in s)Ut.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&be)for(var r of be(s))e.indexOf(r)<0&&Bt.call(s,r)&&(t[r]=s[r]);return t};var Ps=Object.defineProperty,Ds=(s,e,t)=>e in s?Ps(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Ke=(s,e,t)=>Ds(s,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var b=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(b||{});const Wt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},jt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xe={},Is=()=>!!globalThis.Zone;function St(s){if(xe[s])return xe[s];const e=globalThis[s],t=e.prototype,r=s in Wt?Wt[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in jt?jt[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Is())return xe[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?xe[s]=c:t}catch(l){return t}}const Qe={};function Y(s,e,t){var r;const i=`${s}.${String(t)}`;if(Qe[i])return Qe[i].call(e);const n=St(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Qe[i]=o,o.call(e)):e[t]}const Ze={};function Cr(s,e,t){const r=`${s}.${String(t)}`;if(Ze[r])return Ze[r].bind(e);const n=St(s)[t];return typeof n!="function"?e[t]:(Ze[r]=n,n.bind(e))}function zs(s){return Y("Node",s,"childNodes")}function Fs(s){return Y("Node",s,"parentNode")}function Us(s){return Y("Node",s,"parentElement")}function Bs(s){return Y("Node",s,"textContent")}function Ws(s,e){return Cr("Node",s,"contains")(e)}function js(s){return Cr("Node",s,"getRootNode")()}function Hs(s){return!s||!("host"in s)?null:Y("ShadowRoot",s,"host")}function Vs(s){return s.styleSheets}function Gs(s){return!s||!("shadowRoot"in s)?null:Y("Element",s,"shadowRoot")}function qs(s,e){return Y("Element",s,"querySelector")(e)}function Ys(s,e){return Y("Element",s,"querySelectorAll")(e)}function Js(){return St("MutationObserver").constructor}function Ks(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Qs(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Zs(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,o=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const m=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),w=m*p,f=i.width*i.height;h=f>0?w/f:0}return{isVisible:u,ratio:h}}const $={childNodes:zs,parentNode:Fs,parentElement:Us,textContent:Bs,contains:Ws,getRootNode:js,host:Hs,styleSheets:Vs,shadowRoot:Gs,querySelector:qs,querySelectorAll:Ys,mutationObserver:Js,patch:Ks,describeNode:Qs,getElementVisibility:Zs};function re(s){return s.nodeType===s.ELEMENT_NODE}function Sr(s){const e=s&&"host"in s&&"mode"in s&&$.host(s)||null;return!!(e&&"shadowRoot"in e&&$.shadowRoot(e)===s)}function Te(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Xs(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function vr(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Le(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Er(i,t)).join("");return Xs(r)}catch(e){return null}}function Er(s,e){if(Rr(s)){let t;try{t=Le(s.styleSheet)||vr(s)}catch(r){t=s.cssText}return s.styleSheet.href?ue(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),Nr(s)&&s.selectorText.includes(":")&&(t=Ar(t)),e?ue(t,e):t}}function Ar(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Rr(s){return"styleSheet"in s}function Nr(s){return"selectorText"in s}class Ue{constructor(){Ke(this,"idNodeMap",new Map),Ke(this,"nodeMetaMap",new WeakMap),Ke(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-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){const t=this.getId(e);this.idNodeMap.delete(t);const r=this.getMeta(e);if(r!=null&&r.selector){const i=this.selectorNodeMap.get(r.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(r.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;if(this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(r),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function ei(){return new Ue}function Or({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&ge(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function ge(s){return s.toLowerCase()}const Ht="__rrweb_original__";function Mr(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Ht in n?n[Ht]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Tr(s,e){return!s||!e||s.type!==e.type?!1:s.type===b.Document?s.compatMode===e.compatMode:s.type===b.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===b.Comment||s.type===b.Text||s.type===b.CDATA?s.textContent===e.textContent:s.type===b.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function $r(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?ge(e):null}function Be(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function ti(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const ri=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,si=/^(?:[a-z+]+:)?\/\//i,ii=/^www\..*/i,ni=/^(data:)([^,]*),(.*)/i;function ue(s,e){return(s||"").replace(ri,(t,r,i,n,o,l)=>{const a=i||o||l,c=r||n||"";if(!a)return t;if(si.test(a)||ii.test(a))return`url(${c}${a}${c})`;if(ni.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${ti(e)+a}${c})`;const u=e.split("/"),h=a.split("/");u.pop();for(const d of h)d!=="."&&(d===".."?u.pop():u.push(d));return`url(${c}${u.join("/")}${c})`})}function ce(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function kr(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=ce(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const c=ce(r[a].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let d=c.substring(0,h),m=o.split(d),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[a-1].textContent!=="")p=o.indexOf(d,1);else if(m.length===1){if(d=d.substring(0,d.length-1),m=o.split(d),m.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(p=o.indexOf(d));if(m.length>=2&&h>u){const w=r[a-1].textContent;if(w&&typeof w=="string"){const f=ce(w).length;p=o.indexOf(d,f)}p===-1&&(p=m[0].length)}if(p!==-1){let w=Math.floor(p/l);for(;w>0&&w<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=ce(s.substring(0,w),t);if(f.length===p){i.push(s.substring(0,w)),s=s.substring(w),o=o.substring(p);break}else f.length<p?w+=Math.max(1,Math.floor((p-f.length)/l)):w-=Math.max(1,Math.floor((f.length-p)*l))}break}}}}return i.push(s),i}function Lr(s,e){return kr(s,e).join("/* rr_split */")}function _r(s){var e;const t=$.parentNode(s),r=t&&t;return!r||!vt(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function vt(s){return $.getElementVisibility(s).isVisible}const Pr=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Dr=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],oi=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Et=new WeakSet,ai=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(ai.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Pr.includes(r)&&Et.add(this)}};const li=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){li.call(this,s,e,t)};function ci(s){return s instanceof Element&&Et.has(s)}function Ir(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Dr.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return ci(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Vt(){document.querySelectorAll("*").forEach(e=>{oi.forEach(t=>{e.hasAttribute(t)&&Et.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Vt():document.addEventListener("DOMContentLoaded",Vt)}catch(s){}const Ce={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},B={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.25,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},ui={MIN_CONFIDENCE_FOR_SKIP:.7},Gt=["form","main","nav","section","article","footer","header"],qt=["form","navigation","main","region","contentinfo","complementary","banner","search"],hi=["article","aside","details","figcaption","figure","footer","header","main","mark","nav","section","summary","time","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","a","audio","video","canvas","dialog","menu","blockquote","dd","dl","dt","hr","li","ol","ul","p","pre","h1","h2","h3","h4","h5","h6","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","use"],q={"data-testid":100,"data-qa":99,"data-cy":98,"data-test":97,"data-test-id":96,"aria-label":90,"aria-labelledby":85,"aria-describedby":80,name:75,href:70,src:70,type:65,role:60,alt:55,title:50,for:45,placeholder:40,"data-*":30,"aria-*":25},zr=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),fi={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function he(s){if(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)){const e=/\d/.test(s),t=/[A-Z]/.test(s),r=s.length>=20;if(e&&t||r)return!0}return!!(/^radix-/.test(s)||/^mui-\d+$/.test(s))}const Fr=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Ur(s){return s.trim().split(/\s+/).some(e=>he(e))}class di{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const a=this.cache.getAnchor(e);if(a!==void 0)return a}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const a={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,a),a}if(t==="head"||this.isInsideHead(e)){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:B.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Gt.includes(r)&&(t+=B.SEMANTIC_TAG);const i=e.getAttribute("role");i&&qt.includes(i)&&(t+=B.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=B.ARIA_LABEL);const n=e.id;return n&&!he(n)&&(t+=B.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=B.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=B.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-B.DEPTH_PENALTY_THRESHOLD)*B.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Gt.includes(t))return"A";const r=e.getAttribute("role");return r&&qt.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const pi=[/^css-[a-z0-9]+$/i,/^sc-[a-z0-9]+-\d+$/i,/^[a-z]{5,8}$/i,/^Mui[A-Z]\w+-\w+-\w+/,/^makeStyles-\w+-\d+$/,/^jss\d+$/,/^(emotion|linaria)-[a-z0-9]+/i,/^(chakra|tw-|ant-)[a-z0-9]+-\w+/i,/-[a-f0-9]{6,}$/i,/^_[a-z0-9]{5,}$/i,/\d{5,}/],mi=[/^\[/,/^(first|last|odd|even|only|first-of-type|last-of-type|only-of-type):/,/^(hover|focus|active|disabled|enabled|checked|indeterminate|default|required|valid|invalid|in-range|out-of-range|placeholder-shown|autofill|read-only):/,/^(focus-within|focus-visible|visited|target|open):/,/^(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl):/,/^dark:/,/^(rtl|ltr):/,/^(group|peer)(-hover|-focus|-active)?:/,/^[a-z][a-z-]*:/,/\/([\d.]+|full|auto|screen)$/,/^(inset|top|right|bottom|left)(-|$)/,/^(flex|inline-flex|grid|block|inline|inline-block|hidden|visible)$/,/^(absolute|relative|fixed|sticky|static)$/,/^(items|justify|content|self|place)-/,/^flex-(row|col|wrap|nowrap|1|auto|initial|none)/,/^grid-(cols|rows|flow)/,/^(gap|space)-/,/^[mp][trblxy]?-(\d+|auto|px)$/,/^-[mp][trblxy]?-\d+$/,/^-(top|right|bottom|left|inset)-\d+$/,/^-z-\d+$/,/^-space-[xy]-\d+$/,/^-translate-[xy]-\d+$/,/^-rotate-\d+$/,/^-scale-\d+$/,/^-skew-[xy]-\d+$/,/^(w|h|min-w|min-h|max-w|max-h|size)-/,/^text-(center|left|right|justify|start|end|xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,/^text-(uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$/,/^text-(truncate|ellipsis|clip)$/,/^(bg|border|ring|shadow|outline)-/,/^rounded(-|$)/,/^(font|leading|tracking|whitespace|break|truncate)-/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(transform|transition|duration|delay|ease|animate)-/,/^(scale|rotate|translate|skew)-/,/^transform$/,/^backdrop-blur-/,/^motion-/,/^(fade|slide|zoom|bounce|pulse|spin|ping)-/,/^(overflow|overscroll|scroll)-/,/^object-(contain|cover|fill|none|scale-down)$/,/^(cursor|pointer-events|select|resize)-/,/^(opacity|z)-/,/^(visible|invisible|collapse)$/,/^d-(none|inline|inline-block|block|grid|table|flex)$/,/^(float|clearfix|text)-(left|right|center|justify|start|end)$/,/^(m|p)[trblxy]?-[0-5]$/,/^(w|h)-(25|50|75|100|auto)$/,/^btn-(sm|lg|block)$/,/^text-(muted|primary|success|danger|warning|info|light|dark|white)$/,/^bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)$/,/^border(-top|-bottom|-left|-right)?(-0)?$/,/^rounded(-top|-bottom|-left|-right|-circle|-pill|-0)?$/,/^shadow(-sm|-lg|-none)?$/,/^(align|justify|order|flex)-(start|end|center|between|around|fill|grow|shrink)$/,/^col(-sm|-md|-lg|-xl)?(-\d+|-auto)?$/,/^row(-cols)?(-\d+)?$/,/^g[xy]?-[0-5]$/,/^(show|hide|invisible|visible)$/,/^(position|top|bottom|start|end)-(static|relative|absolute|fixed|sticky|-\d+)$/,/^(row|col)$/,/^clearfix$/,/^pull-(left|right)$/,/^float-(left|right|none)$/];function At(s){return pi.some(e=>e.test(s))}function Rt(s){return s.length<=2||/^\d/.test(s)?!0:mi.some(e=>e.test(s))}function gi(s){return!At(s)&&!Rt(s)}function yi(s){return s.filter(e=>gi(e))}function wi(s){const e=[],t=[];for(const r of s)Rt(r)||At(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function Yt(s){return Rt(s)||At(s)}const bi=new Set(["tr","td","th","thead","tbody","tfoot"]),xi=new Set(["data-testid","data-qa","data-cy","data-test","aria-label","name","href"]);function Ci(s){if(s.id)return!0;if(s.attributes){for(const e of Object.keys(s.attributes))if(xi.has(e))return!0}return!1}function Si(s,e,t){var n;var r;const i=s.parentElement;if(!i)return!0;for(const o of Array.from(i.children))if(!(o===s||o.tagName.toLowerCase()!==e)&&((n=(r=o.textContent)==null?void 0:r.trim())!=null?n:"")===t)return!1;return!0}function _e(s,e,t){var r;if(bi.has(s))return!0;if(Ci(e))return!1;if(t){const i=t.parentElement;if(i){const n=(r=e.text)==null?void 0:r.normalized;if(n&&Si(t,s,n))return!1;if(Array.from(i.children).some(o=>o!==t&&o.tagName.toLowerCase()===s))return!0}return!1}return!0}const Jt=s=>s.replace(/([#:.[\]@])/g,"\\$1");class vi{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const o=[];let l=t.parentElement;for(;l&&l!==e&&o.length<this.maxDepth;)o.unshift(l),l=l.parentElement;const a=o.length>=this.maxDepth&&l!==e;if(!a&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let c=this.filterNoise(o);return c=this.ensureUniqueness(o,c,e,t,r),{path:c.map(u=>{const h=u.tagName.toLowerCase(),d=r.extract(u);let m;if(_e(h,d,u)){const p=u.parentElement;if(p){const w=Array.from(p.children).indexOf(u);w!==-1&&(m=w+1)}}return{tag:h,semantics:d,score:r.scoreElement(u),nthChild:m}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const o=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<ui.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(r,h,i);try{let m;if(this.cache){const p=this.cache.getSelectorResults(d);p!==void 0?m=p:(m=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,m))}else m=l.querySelectorAll(d);if(m.length===1)return h;m.length<a.length&&(t=h)}catch(m){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!he(e.id)&&(t+=`#${Jt(e.id)}`);for(const r of Array.from(e.classList))Yt(r)||(t+=`.${Jt(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return hi.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!Yt(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!he(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.tagName.toLowerCase(),a=r.extract(o);let c;if(_e(l,a,o)){const u=o.parentElement;if(u){const h=Array.from(u.children).indexOf(o);h!==-1&&(c=h+1)}}return{tag:l,semantics:a,score:r.scoreElement(o),nthChild:c}}),degraded:!1}}}function Ei(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Ai={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function Ri(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function Ni(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,o]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&Ri(i)||(l+=`#${i}`)),l}function Br(s,e,t={}){if(!e)return e;const r=k(k({},Ai),t);return s==="href"||s==="src"?Ni(e,r):e}const Oi=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Mi=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],Ti=["data-state","data-active","data-inactive","data-selected","data-open","data-closed","data-visible","data-hidden","data-disabled","data-enabled","data-loading","data-error","data-success","data-highlighted","data-focused","data-hover","data-orientation","data-theme"],$i=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],ki=["data-testid","data-test-id","data-test","data-cy","data-qa","data-automation-id","data-id","data-component","data-entity-id","data-product-id","data-user-id"],Li=["data-ga","data-gtm","data-google","data-layer","data-event","data-yandex","data-ym","data-metrika","data-optimizely","data-vwo","data-optimize","data-hj","data-hotjar","data-fs","data-mouseflow","data-mf","data-smartlook","data-sl","data-fb","data-facebook","data-tt","data-li","data-track","data-tracking","data-click","data-impression","data-conversion","data-segment","data-analytics"],_i=["data-category","data-action","data-label","data-value"],Pi=["id","name","type","placeholder","title","for","alt","href"],Di=["disabled","checked","selected","hidden","readonly","required","value"],Ii=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function zi(s,e){return Oi.includes(s)?!0:Mi.includes(s)||Ti.includes(s)||$i.some(t=>s.startsWith(t))?!1:ki.includes(s)?!0:Li.some(t=>s.startsWith(t))||_i.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!Ii.some(t=>t.test(e)):Pi.includes(s)?!0:Di.includes(s)?!1:!!s.startsWith("data-")}class Kt{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},r=e.id;if(r&&!he(r)&&(t.id=r),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=wi(o);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(zr.has(e)||e.startsWith("on")||e.startsWith("ng-")||e.startsWith("_ng")||e.startsWith("data-reactid")||e.startsWith("data-react")||e.startsWith("data-v-"))}getAttributePriority(e){return q[e]!==void 0?q[e]:e.startsWith("data-")?q["data-*"]:e.startsWith("aria-")?q["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!zi(i,r.value)||Fr.has(i)&&Ur(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Br(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=Ei(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:o}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}}class Fi{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const m=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),p=parseFloat((o=e.getAttribute("height"))!=null?o:"0");m>0&&p>0&&r.push(`ratio=${(m/p).toFixed(2)}`)}break;case"ellipse":{const m=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),p=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");m>0&&p>0&&r.push(`ratio=${(m/p).toFixed(2)}`)}break;case"line":{const m=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),p=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),w=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),y=Math.atan2(f-p,w-m);r.push(`angle=${y.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function Ui(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,a)=>l+a.score,0)/s.path.length:.5,i=s.target.score,n=t*Ce.ANCHOR+r*Ce.PATH+i*Ce.TARGET+e*Ce.UNIQUENESS,o=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class Bi{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}}class Wi{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new Bi((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return Z(k({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}}function ji(s){return new Wi(s)}let Xe=null;function Hi(){return Xe||(Xe=ji()),Xe}function Qt(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
|
|
2
|
+
"use strict";var ks=Object.defineProperty,Ls=Object.defineProperties;var _s=Object.getOwnPropertyDescriptors;var be=Object.getOwnPropertySymbols;var Ut=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable;var Ft=(s,e,t)=>e in s?ks(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,k=(s,e)=>{for(var t in e||(e={}))Ut.call(e,t)&&Ft(s,t,e[t]);if(be)for(var t of be(e))Bt.call(e,t)&&Ft(s,t,e[t]);return s},Z=(s,e)=>Ls(s,_s(e));var Je=(s,e)=>{var t={};for(var r in s)Ut.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&be)for(var r of be(s))e.indexOf(r)<0&&Bt.call(s,r)&&(t[r]=s[r]);return t};var Ds=Object.defineProperty,Is=(s,e,t)=>e in s?Ds(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Ke=(s,e,t)=>Is(s,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var b=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(b||{});const Wt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},jt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xe={},Ps=()=>!!globalThis.Zone;function Ct(s){if(xe[s])return xe[s];const e=globalThis[s],t=e.prototype,r=s in Wt?Wt[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in jt?jt[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Ps())return xe[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?xe[s]=c:t}catch(l){return t}}const Qe={};function Y(s,e,t){var r;const i=`${s}.${String(t)}`;if(Qe[i])return Qe[i].call(e);const n=Ct(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Qe[i]=o,o.call(e)):e[t]}const Ze={};function Sr(s,e,t){const r=`${s}.${String(t)}`;if(Ze[r])return Ze[r].bind(e);const n=Ct(s)[t];return typeof n!="function"?e[t]:(Ze[r]=n,n.bind(e))}function zs(s){return Y("Node",s,"childNodes")}function Fs(s){return Y("Node",s,"parentNode")}function Us(s){return Y("Node",s,"parentElement")}function Bs(s){return Y("Node",s,"textContent")}function Ws(s,e){return Sr("Node",s,"contains")(e)}function js(s){return Sr("Node",s,"getRootNode")()}function Hs(s){return!s||!("host"in s)?null:Y("ShadowRoot",s,"host")}function Vs(s){return s.styleSheets}function Gs(s){return!s||!("shadowRoot"in s)?null:Y("Element",s,"shadowRoot")}function qs(s,e){return Y("Element",s,"querySelector")(e)}function Ys(s,e){return Y("Element",s,"querySelectorAll")(e)}function Js(){return Ct("MutationObserver").constructor}function Ks(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Qs(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Zs(s,e){var t;let r=s.parentElement;for(;r;){const i=(t=e.getComputedStyle)==null?void 0:t.call(e,r);if(i&&(parseFloat(i.opacity)||0)<=0)return!1;r=r.parentElement}return!0}function Xs(s){var p;var e,t;const r=(p=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?p:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,o=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0,a=l&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,c=(t=r.getComputedStyle)==null?void 0:t.call(r,s),h=!!c&&c.display!=="none"&&c.visibility!=="hidden"&&(parseFloat(c.opacity)||0)>0&&Zs(s,r),d=h&&a;let m=0;if(d){const w=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),f=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),g=w*f,C=i.width*i.height;m=C>0?g/C:0}return{isVisible:d,isCSSVisible:h,isViewportVisible:a,hasSize:l,ratio:m}}const $={childNodes:zs,parentNode:Fs,parentElement:Us,textContent:Bs,contains:Ws,getRootNode:js,host:Hs,styleSheets:Vs,shadowRoot:Gs,querySelector:qs,querySelectorAll:Ys,mutationObserver:Js,patch:Ks,describeNode:Qs,getElementVisibility:Xs};function re(s){return s.nodeType===s.ELEMENT_NODE}function Cr(s){const e=s&&"host"in s&&"mode"in s&&$.host(s)||null;return!!(e&&"shadowRoot"in e&&$.shadowRoot(e)===s)}function Te(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ei(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function vr(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Le(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Er(i,t)).join("");return ei(r)}catch(e){return null}}function Er(s,e){if(Rr(s)){let t;try{t=Le(s.styleSheet)||vr(s)}catch(r){t=s.cssText}return s.styleSheet.href?ue(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),Nr(s)&&s.selectorText.includes(":")&&(t=Ar(t)),e?ue(t,e):t}}function Ar(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Rr(s){return"styleSheet"in s}function Nr(s){return"selectorText"in s}class Ue{constructor(){Ke(this,"idNodeMap",new Map),Ke(this,"nodeMetaMap",new WeakMap),Ke(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-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){const t=this.getId(e);this.idNodeMap.delete(t);const r=this.getMeta(e);if(r!=null&&r.selector){const i=this.selectorNodeMap.get(r.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(r.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;if(this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(r),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function ti(){return new Ue}function Or({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&ge(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function ge(s){return s.toLowerCase()}const Ht="__rrweb_original__";function Mr(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Ht in n?n[Ht]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Tr(s,e){return!s||!e||s.type!==e.type?!1:s.type===b.Document?s.compatMode===e.compatMode:s.type===b.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===b.Comment||s.type===b.Text||s.type===b.CDATA?s.textContent===e.textContent:s.type===b.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function $r(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?ge(e):null}function Be(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function ri(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const si=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ii=/^(?:[a-z+]+:)?\/\//i,ni=/^www\..*/i,oi=/^(data:)([^,]*),(.*)/i;function ue(s,e){return(s||"").replace(si,(t,r,i,n,o,l)=>{const a=i||o||l,c=r||n||"";if(!a)return t;if(ii.test(a)||ni.test(a))return`url(${c}${a}${c})`;if(oi.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${ri(e)+a}${c})`;const u=e.split("/"),h=a.split("/");u.pop();for(const d of h)d!=="."&&(d===".."?u.pop():u.push(d));return`url(${c}${u.join("/")}${c})`})}function ce(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function kr(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=ce(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const c=ce(r[a].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let d=c.substring(0,h),m=o.split(d),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[a-1].textContent!=="")p=o.indexOf(d,1);else if(m.length===1){if(d=d.substring(0,d.length-1),m=o.split(d),m.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(p=o.indexOf(d));if(m.length>=2&&h>u){const w=r[a-1].textContent;if(w&&typeof w=="string"){const f=ce(w).length;p=o.indexOf(d,f)}p===-1&&(p=m[0].length)}if(p!==-1){let w=Math.floor(p/l);for(;w>0&&w<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=ce(s.substring(0,w),t);if(f.length===p){i.push(s.substring(0,w)),s=s.substring(w),o=o.substring(p);break}else f.length<p?w+=Math.max(1,Math.floor((p-f.length)/l)):w-=Math.max(1,Math.floor((f.length-p)*l))}break}}}}return i.push(s),i}function Lr(s,e){return kr(s,e).join("/* rr_split */")}function _r(s){var e;const t=$.parentNode(s),r=t&&t;return!r||r.nodeType!==Node.ELEMENT_NODE||!vt(r).isVisible?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function vt(s){return $.getElementVisibility(s)}const Dr=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Ir=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],ai=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Et=new WeakSet,li=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(li.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Dr.includes(r)&&Et.add(this)}};const ci=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){ci.call(this,s,e,t)};function ui(s){return s instanceof Element&&Et.has(s)}function Pr(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Ir.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return ui(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Vt(){document.querySelectorAll("*").forEach(e=>{ai.forEach(t=>{e.hasAttribute(t)&&Et.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Vt():document.addEventListener("DOMContentLoaded",Vt)}catch(s){}const Se={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},B={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.25,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},hi={MIN_CONFIDENCE_FOR_SKIP:.7},Gt=["form","main","nav","section","article","footer","header"],qt=["form","navigation","main","region","contentinfo","complementary","banner","search"],fi=["article","aside","details","figcaption","figure","footer","header","main","mark","nav","section","summary","time","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","a","audio","video","canvas","dialog","menu","blockquote","dd","dl","dt","hr","li","ol","ul","p","pre","h1","h2","h3","h4","h5","h6","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","use"],q={"data-testid":100,"data-qa":99,"data-cy":98,"data-test":97,"data-test-id":96,"aria-label":90,"aria-labelledby":85,"aria-describedby":80,name:75,href:70,src:70,type:65,role:60,alt:55,title:50,for:45,placeholder:40,"data-*":30,"aria-*":25},zr=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),di={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function he(s){if(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)){const e=/\d/.test(s),t=/[A-Z]/.test(s),r=s.length>=20;if(e&&t||r)return!0}return!!(/^radix-/.test(s)||/^mui-\d+$/.test(s))}const Fr=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Ur(s){return s.trim().split(/\s+/).some(e=>he(e))}class pi{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const a=this.cache.getAnchor(e);if(a!==void 0)return a}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const a={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,a),a}if(t==="head"||this.isInsideHead(e)){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:B.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Gt.includes(r)&&(t+=B.SEMANTIC_TAG);const i=e.getAttribute("role");i&&qt.includes(i)&&(t+=B.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=B.ARIA_LABEL);const n=e.id;return n&&!he(n)&&(t+=B.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=B.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=B.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-B.DEPTH_PENALTY_THRESHOLD)*B.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Gt.includes(t))return"A";const r=e.getAttribute("role");return r&&qt.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const mi=[/^css-[a-z0-9]+$/i,/^sc-[a-z0-9]+-\d+$/i,/^[a-z]{5,8}$/i,/^Mui[A-Z]\w+-\w+-\w+/,/^makeStyles-\w+-\d+$/,/^jss\d+$/,/^(emotion|linaria)-[a-z0-9]+/i,/^(chakra|tw-|ant-)[a-z0-9]+-\w+/i,/-[a-f0-9]{6,}$/i,/^_[a-z0-9]{5,}$/i,/\d{5,}/],gi=[/^\[/,/^(first|last|odd|even|only|first-of-type|last-of-type|only-of-type):/,/^(hover|focus|active|disabled|enabled|checked|indeterminate|default|required|valid|invalid|in-range|out-of-range|placeholder-shown|autofill|read-only):/,/^(focus-within|focus-visible|visited|target|open):/,/^(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl):/,/^dark:/,/^(rtl|ltr):/,/^(group|peer)(-hover|-focus|-active)?:/,/^[a-z][a-z-]*:/,/\/([\d.]+|full|auto|screen)$/,/^(inset|top|right|bottom|left)(-|$)/,/^(flex|inline-flex|grid|block|inline|inline-block|hidden|visible)$/,/^(absolute|relative|fixed|sticky|static)$/,/^(items|justify|content|self|place)-/,/^flex-(row|col|wrap|nowrap|1|auto|initial|none)/,/^grid-(cols|rows|flow)/,/^(gap|space)-/,/^[mp][trblxy]?-(\d+|auto|px)$/,/^-[mp][trblxy]?-\d+$/,/^-(top|right|bottom|left|inset)-\d+$/,/^-z-\d+$/,/^-space-[xy]-\d+$/,/^-translate-[xy]-\d+$/,/^-rotate-\d+$/,/^-scale-\d+$/,/^-skew-[xy]-\d+$/,/^(w|h|min-w|min-h|max-w|max-h|size)-/,/^text-(center|left|right|justify|start|end|xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,/^text-(uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$/,/^text-(truncate|ellipsis|clip)$/,/^(bg|border|ring|shadow|outline)-/,/^rounded(-|$)/,/^(font|leading|tracking|whitespace|break|truncate)-/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(transform|transition|duration|delay|ease|animate)-/,/^(scale|rotate|translate|skew)-/,/^transform$/,/^backdrop-blur-/,/^motion-/,/^(fade|slide|zoom|bounce|pulse|spin|ping)-/,/^(overflow|overscroll|scroll)-/,/^object-(contain|cover|fill|none|scale-down)$/,/^(cursor|pointer-events|select|resize)-/,/^(opacity|z)-/,/^(visible|invisible|collapse)$/,/^d-(none|inline|inline-block|block|grid|table|flex)$/,/^(float|clearfix|text)-(left|right|center|justify|start|end)$/,/^(m|p)[trblxy]?-[0-5]$/,/^(w|h)-(25|50|75|100|auto)$/,/^btn-(sm|lg|block)$/,/^text-(muted|primary|success|danger|warning|info|light|dark|white)$/,/^bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)$/,/^border(-top|-bottom|-left|-right)?(-0)?$/,/^rounded(-top|-bottom|-left|-right|-circle|-pill|-0)?$/,/^shadow(-sm|-lg|-none)?$/,/^(align|justify|order|flex)-(start|end|center|between|around|fill|grow|shrink)$/,/^col(-sm|-md|-lg|-xl)?(-\d+|-auto)?$/,/^row(-cols)?(-\d+)?$/,/^g[xy]?-[0-5]$/,/^(show|hide|invisible|visible)$/,/^(position|top|bottom|start|end)-(static|relative|absolute|fixed|sticky|-\d+)$/,/^(row|col)$/,/^clearfix$/,/^pull-(left|right)$/,/^float-(left|right|none)$/];function At(s){return mi.some(e=>e.test(s))}function Rt(s){return s.length<=2||/^\d/.test(s)?!0:gi.some(e=>e.test(s))}function yi(s){return!At(s)&&!Rt(s)}function wi(s){return s.filter(e=>yi(e))}function bi(s){const e=[],t=[];for(const r of s)Rt(r)||At(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function Yt(s){return Rt(s)||At(s)}const xi=new Set(["tr","td","th","thead","tbody","tfoot"]),Si=new Set(["data-testid","data-qa","data-cy","data-test","aria-label","name","href"]);function Ci(s){if(s.id)return!0;if(s.attributes){for(const e of Object.keys(s.attributes))if(Si.has(e))return!0}return!1}function vi(s,e,t){var n;var r;const i=s.parentElement;if(!i)return!0;for(const o of Array.from(i.children))if(!(o===s||o.tagName.toLowerCase()!==e)&&((n=(r=o.textContent)==null?void 0:r.trim())!=null?n:"")===t)return!1;return!0}function _e(s,e,t){var r;if(xi.has(s))return!0;if(Ci(e))return!1;if(t){const i=t.parentElement;if(i){const n=(r=e.text)==null?void 0:r.normalized;if(n&&vi(t,s,n))return!1;if(Array.from(i.children).some(o=>o!==t&&o.tagName.toLowerCase()===s))return!0}return!1}return!0}const Jt=s=>s.replace(/([#:.[\]@])/g,"\\$1");class Ei{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const o=[];let l=t.parentElement;for(;l&&l!==e&&o.length<this.maxDepth;)o.unshift(l),l=l.parentElement;const a=o.length>=this.maxDepth&&l!==e;if(!a&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let c=this.filterNoise(o);return c=this.ensureUniqueness(o,c,e,t,r),{path:c.map(u=>{const h=u.tagName.toLowerCase(),d=r.extract(u);let m;if(_e(h,d,u)){const p=u.parentElement;if(p){const w=Array.from(p.children).indexOf(u);w!==-1&&(m=w+1)}}return{tag:h,semantics:d,score:r.scoreElement(u),nthChild:m}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const o=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<hi.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(r,h,i);try{let m;if(this.cache){const p=this.cache.getSelectorResults(d);p!==void 0?m=p:(m=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,m))}else m=l.querySelectorAll(d);if(m.length===1)return h;m.length<a.length&&(t=h)}catch(m){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!he(e.id)&&(t+=`#${Jt(e.id)}`);for(const r of Array.from(e.classList))Yt(r)||(t+=`.${Jt(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return fi.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!Yt(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!he(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.tagName.toLowerCase(),a=r.extract(o);let c;if(_e(l,a,o)){const u=o.parentElement;if(u){const h=Array.from(u.children).indexOf(o);h!==-1&&(c=h+1)}}return{tag:l,semantics:a,score:r.scoreElement(o),nthChild:c}}),degraded:!1}}}function Ai(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Ri={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function Ni(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function Oi(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,o]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&Ni(i)||(l+=`#${i}`)),l}function Br(s,e,t={}){if(!e)return e;const r=k(k({},Ri),t);return s==="href"||s==="src"?Oi(e,r):e}const Mi=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Ti=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],$i=["data-state","data-active","data-inactive","data-selected","data-open","data-closed","data-visible","data-hidden","data-disabled","data-enabled","data-loading","data-error","data-success","data-highlighted","data-focused","data-hover","data-orientation","data-theme"],ki=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Li=["data-testid","data-test-id","data-test","data-cy","data-qa","data-automation-id","data-id","data-component","data-entity-id","data-product-id","data-user-id"],_i=["data-ga","data-gtm","data-google","data-layer","data-event","data-yandex","data-ym","data-metrika","data-optimizely","data-vwo","data-optimize","data-hj","data-hotjar","data-fs","data-mouseflow","data-mf","data-smartlook","data-sl","data-fb","data-facebook","data-tt","data-li","data-track","data-tracking","data-click","data-impression","data-conversion","data-segment","data-analytics"],Di=["data-category","data-action","data-label","data-value"],Ii=["id","name","type","placeholder","title","for","alt","href"],Pi=["disabled","checked","selected","hidden","readonly","required","value"],zi=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Fi(s,e){return Mi.includes(s)?!0:Ti.includes(s)||$i.includes(s)||ki.some(t=>s.startsWith(t))?!1:Li.includes(s)?!0:_i.some(t=>s.startsWith(t))||Di.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!zi.some(t=>t.test(e)):Ii.includes(s)?!0:Pi.includes(s)?!1:!!s.startsWith("data-")}class Kt{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},r=e.id;if(r&&!he(r)&&(t.id=r),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=bi(o);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(zr.has(e)||e.startsWith("on")||e.startsWith("ng-")||e.startsWith("_ng")||e.startsWith("data-reactid")||e.startsWith("data-react")||e.startsWith("data-v-"))}getAttributePriority(e){return q[e]!==void 0?q[e]:e.startsWith("data-")?q["data-*"]:e.startsWith("aria-")?q["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!Fi(i,r.value)||Fr.has(i)&&Ur(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Br(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=Ai(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:o}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}}class Ui{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const m=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),p=parseFloat((o=e.getAttribute("height"))!=null?o:"0");m>0&&p>0&&r.push(`ratio=${(m/p).toFixed(2)}`)}break;case"ellipse":{const m=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),p=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");m>0&&p>0&&r.push(`ratio=${(m/p).toFixed(2)}`)}break;case"line":{const m=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),p=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),w=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),g=Math.atan2(f-p,w-m);r.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function Bi(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,a)=>l+a.score,0)/s.path.length:.5,i=s.target.score,n=t*Se.ANCHOR+r*Se.PATH+i*Se.TARGET+e*Se.UNIQUENESS,o=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class Wi{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}}class ji{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new Wi((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return Z(k({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}}function Hi(s){return new ji(s)}let Xe=null;function Vi(){return Xe||(Xe=Hi()),Xe}function Qt(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
|
|
3
3
|
1. The element is detached from the DOM
|
|
4
4
|
2. The element was created but never attached
|
|
5
|
-
3. You are working with a document node instead of an element`)}function
|
|
5
|
+
3. You are working with a document node instead of an element`)}function Gi(s,e){if(!e)return;const t=Qt(s),r=e instanceof Document?e:Qt(e);if(t!==r)throw new Error(`Cross-document operation detected: element and root are from different documents.
|
|
6
6
|
Common causes:
|
|
7
7
|
1. Working with iframe: pass iframe.contentDocument as root parameter
|
|
8
8
|
2. Element from one iframe, root from another
|
|
9
9
|
3. Element from main document, root from iframe (or vice versa)
|
|
10
10
|
|
|
11
|
-
Solution: Ensure element and root parameter are from the same document context.`)}function Gi(s,e={}){var z,F,C,K;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=k(k({},fi),e);if(r.root)try{Vi(s,r.root)}catch(D){return console.error("Cross-document generation detected:",D),null}const i=(z=r.cache)!=null?z:Hi(),n=i.getEID(s);if(n!==void 0)return n;const o=s.tagName.toLowerCase();if(o==="html"){const D=new Kt(r,i),M=Ji(s,r,D);return i.setEID(s,M),M}const l=new di(r,i),a=new vi(r,i),c=new Kt(r,i),u=new Fi,h=l.findAnchor(s);if(!h&&!r.fallbackToBody)return null;const d=(C=(F=h==null?void 0:h.element)!=null?F:(t=s.ownerDocument)==null?void 0:t.body)!=null?C:null;if(!d)return null;const m=!h||h.tier==="C",p=d.tagName.toLowerCase(),w=c.extract(d),f=d.parentElement;let y;if(f&&p!=="body"&&p!=="html"&&_e(p,w,d)){const D=Array.from(f.children).indexOf(d);D!==-1&&(y=D+1)}const v={tag:d.tagName.toLowerCase(),semantics:w,score:(K=h==null?void 0:h.score)!=null?K:B.DEGRADED_SCORE,degraded:m,nthChild:y},O=a.buildPath(d,s,c),g=c.extract(s);r.enableSvgFingerprint&&qi(s)&&(g.svg=u.fingerprint(s));const S=s.parentElement;let T;if(S&&_e(o,g,s)){const D=Array.from(S.children).indexOf(s);D!==-1&&(T=D+1)}const N={tag:s.tagName.toLowerCase(),semantics:g,score:c.scoreElement(s),nthChild:T},_=[],j={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},L=v.degraded||O.degraded,I=Yi(v.degraded,O),P={version:"1.0",anchor:v,path:O.path,target:N,constraints:_,fallback:j,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:L,degradationReason:I}};return P.meta.confidence=Ui(P),P.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,P),P)}function qi(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Yi(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Ji(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const Wr={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"},Zt=Object.fromEntries(Object.entries(Wr).map(([s,e])=>[e,s])),jr={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0,format:"compact"};function Xt(s){return s==="id"?101:q[s]!==void 0?q[s]:s.startsWith("data-")?q["data-*"]:s.startsWith("aria-")?q["aria-*"]:0}function Ki(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Qi(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function Zi(s,e){const t=k(k({},jr),e),r=t.format==="compact",i=r?"v1":`v${s.version}`,n=r?":":": ",o=r?"::":" :: ",l=r?">":" > ",a=t.includeText&&s.target.semantics.text?s.target.semantics.text.normalized:void 0,c=et(s.anchor,!1,t),u=s.path.length>0?s.path.map(m=>et(m,!1,t,a)).join(l)+l:"",h=et(s.target,!0,t),d=t.includeConstraints?Xi(s,t):"";return`${i}${n}${c}${o}${u}${h}${d}`}function et(s,e=!1,t=jr,r){var m;const{tag:i,semantics:n}=s,o=t.format==="compact";let l=i;const a=[],c=k({},n.attributes);n.id&&(c.id=n.id),n.role&&!c.role&&(c.role=n.role);const u=Object.entries(c).map(([p,w])=>{const f=Xt(p),y=p==="href"||p==="src"?Br(p,w):w;return{name:p,value:y,priority:f}}).filter(p=>p.name!=="id"&&p.name!=="class"&&zr.has(p.name)||Fr.has(p.name)&&Ur(p.value)?!1:p.priority>0||p.name==="role"||p.name==="id");u.sort((p,w)=>w.priority-p.priority);const h=u.slice(0,t.maxAttributes);h.sort((p,w)=>p.name.localeCompare(w.name));for(const{name:p,value:w}of h){const f=o&&(m=Wr[p])!=null?m:p;a.push(`${f}="${nt(w)}"`)}if(t.includeText&&n.text&&!Qi(n.text.normalized)){const p=n.text.normalized;if(p.length>0&&p.length<=t.maxTextLength&&!(!e&&r!==void 0&&p===r)){const w=o?"x":"text";a.push(`${w}="${nt(p)}"`)}}let d=a;if(a.length>0&&e&&t.simplifyTarget&&n.id&&(d=a.filter(p=>{var y;const w=p.split("=")[0],f=(y=Zt[w])!=null?y:w;return Xt(f)>=60||f==="text"||f==="id"||f==="role"})),n.classes&&n.classes.length>0){const p=yi(n.classes),w=!!n.id||a.some(f=>{var O;const y=f.split("=")[0],v=(O=Zt[y])!=null?O:y;return v==="href"||v==="data-testid"||v==="text"||v==="role"});if(!(e&&t.simplifyTarget&&w)&&p.length>0){const f=p.sort().slice(0,t.maxClasses);l+=f.map(y=>`.${y}`).join("")}}if(d.length>0&&(l+=`[${d.join(",")}]`),"nthChild"in s&&s.nthChild){const p=!!n.id||n.attributes&&Object.keys(n.attributes).some(Ki);e&&t.simplifyTarget&&p||(l+=`#${s.nthChild}`)}return l}function Xi(s,e){if(!s.constraints||s.constraints.length===0)return"";const t=[];for(const r of s.constraints)switch(r.type){case"uniqueness":t.push("unique=true");break;case"position":r.params&&r.params.strategy&&t.push(`pos=${r.params.strategy}`);break;case"text-proximity":if(r.params&&r.params.reference){const i=nt(String(r.params.reference));t.push(`text="${i}"`)}break}return t.length===0?"":`${e.format==="verbose"?" ":""}{${t.join(",")}}`}function nt(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function en(s,e,t){const r=Gi(s,e);return r?Zi(r,t):null}let Hr=1;const tn=new RegExp("[^a-z0-9-_:]"),ot=-2;function Vr(){return Hr++}function rn(s){if(s instanceof HTMLFormElement)return"form";const e=ge(s.tagName);return tn.test(e)?"div":e}let X,er;const sn=/^[^ \t\n\r\u000c]+/,nn=/^[, \t\n\r\u000c]+/;function on(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(nn),!(t>=e.length);){let n=r(sn);if(n.slice(-1)===",")n=ee(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=ee(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const tr=new WeakMap;function ee(s,e){return!e||e.trim()===""?e:Nt(s,e)}function an(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Nt(s,e){let t=tr.get(s);if(t||(t=s.createElement("a"),tr.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Gr(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?ee(s,r):t==="srcset"?on(s,r):t==="style"?ue(r,Nt(s)):e==="object"&&t==="data"?ee(s,r):r)}function qr(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Yr(s,e){return e?typeof e=="string"?s.includes(e):e.test(s):!1}function ln(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function Pe(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Pe($.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?Pe($.parentNode(s),e,t):!1}function Jr(s,e,t,r){let i;if(re(s)){if(i=s,!$.childNodes(i).length)return!1}else{if($.parentElement(s)===null)return!1;i=$.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Pe(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function cn(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function un(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function hn(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:o,needsMask:l,inlineStylesheet:a,maskInputOptions:c={},maskTextFn:u,maskInputFn:h,dataURLOptions:d={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:w,newlyAddedElement:f=!1,cssCaptured:y=!1}=e,v=fn(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:b.Document,childNodes:[],compatMode:s.compatMode}:{type:b.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:b.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v};case s.ELEMENT_NODE:return pn(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,dataURLOptions:d,inlineImages:m,recordCanvas:p,keepIframeSrcFn:w,newlyAddedElement:f,rootId:v});case s.TEXT_NODE:return dn(s,{doc:t,needsMask:l,maskTextFn:u,rootId:v,cssCaptured:y});case s.CDATA_SECTION_NODE:return{type:b.CDATA,textContent:"",rootId:v};case s.COMMENT_NODE:return{type:b.Comment,textContent:$.textContent(s)||"",rootId:v};default:return!1}}function fn(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function dn(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=$.parentNode(s),l=o&&o.tagName;let a="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?a="SCRIPT_PLACEHOLDER":n||(a=$.textContent(s),c&&a&&(a=ue(a,Nt(e.doc)))),!c&&!u&&a&&t&&(a=r?r(a,$.parentElement(s)):a.replace(/[\S]/g,"*")),{type:b.Text,textContent:a||"",rootId:i}}function pn(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:a,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:m=!1,rootId:p}=e,w=ln(s,r,i),f=rn(s);let y={};const v=s.attributes.length;for(let g=0;g<v;g++){const S=s.attributes[g];Yr(S.name,n)||qr(f,S.name,S.value)||(y[S.name]=Gr(t,f,ge(S.name),S.value))}if(f==="link"&&o){const g=Array.from(t.styleSheets).find(T=>T.href===s.href);let S=null;g&&(S=Le(g)),S&&(delete y.rel,delete y.href,y._cssText=S)}if(f==="style"&&s.sheet){let g=Le(s.sheet);g&&(s.childNodes.length>1&&(g=Lr(g,s)),y._cssText=g)}if(f==="input"||f==="textarea"||f==="select"){const g=s.value,S=s.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&g?y.value=Or({element:s,type:$r(s),tagName:f,value:g,maskInputOptions:l,maskInputFn:a}):S&&(y.checked=S)}if(f==="option"&&(s.selected&&!l.select?y.selected=!0:delete y.selected),f==="dialog"&&s.open&&(y.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&h){if(s.__context==="2d")Mr(s)||(y.rr_dataURL=s.toDataURL(c.type,c.quality));else if(!("__context"in s)){const g=s.toDataURL(c.type,c.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;const T=S.toDataURL(c.type,c.quality);g!==T&&(y.rr_dataURL=g)}}if(f==="img"&&u){X||(X=t.createElement("canvas"),er=X.getContext("2d"));const g=s,S=g.currentSrc||g.getAttribute("src")||"<unknown-src>",T=g.crossOrigin,N=()=>{g.removeEventListener("load",N);try{X.width=g.naturalWidth,X.height=g.naturalHeight,er.drawImage(g,0,0),y.rr_dataURL=X.toDataURL(c.type,c.quality)}catch(_){if(g.crossOrigin!=="anonymous"){g.crossOrigin="anonymous",g.complete&&g.naturalWidth!==0?N():g.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${S}! Error: ${_}`)}g.crossOrigin==="anonymous"&&(T?y.crossOrigin=T:g.removeAttribute("crossorigin"))};g.complete&&g.naturalWidth!==0?N():g.addEventListener("load",N)}if(f==="audio"||f==="video"){const g=y;g.rr_mediaState=s.paused?"paused":"played",g.rr_mediaCurrentTime=s.currentTime,g.rr_mediaPlaybackRate=s.playbackRate,g.rr_mediaMuted=s.muted,g.rr_mediaLoop=s.loop,g.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(y.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(y.rr_scrollTop=s.scrollTop)),w){const{width:g,height:S}=s.getBoundingClientRect();y={class:y.class,rr_width:`${g}px`,rr_height:`${S}px`}}f==="iframe"&&!d(y.src)&&(s.contentDocument||(y.rr_src=y.src),delete y.src);let O;try{customElements.get(f)&&(O=!0)}catch(g){}return{type:b.Element,tagName:f,attributes:y,childNodes:[],isSVG:an(s)||void 0,needBlock:w,rootId:p,isCustom:O}}function A(s){return s==null?"":s.toLowerCase()}function mn(s,e){if(e.comment&&s.type===b.Comment)return!0;if(s.type===b.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Be(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(A(s.attributes.name).match(/^msapplication-tile(image|color)$/)||A(s.attributes.name)==="application-name"||A(s.attributes.rel)==="icon"||A(s.attributes.rel)==="apple-touch-icon"||A(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&A(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(A(s.attributes.property).match(/^(og|twitter|fb):/)||A(s.attributes.name).match(/^(og|twitter):/)||A(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(A(s.attributes.name)==="robots"||A(s.attributes.name)==="googlebot"||A(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(A(s.attributes.name)==="author"||A(s.attributes.name)==="generator"||A(s.attributes.name)==="framework"||A(s.attributes.name)==="publisher"||A(s.attributes.name)==="progid"||A(s.attributes.property).match(/^article:/)||A(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(A(s.attributes.name)==="google-site-verification"||A(s.attributes.name)==="yandex-verification"||A(s.attributes.name)==="csrf-token"||A(s.attributes.name)==="p:domain_verify"||A(s.attributes.name)==="verify-v1"||A(s.attributes.name)==="verification"||A(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function te(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w={},inlineImages:f=!1,recordCanvas:y=!1,onSerialize:v,onIframeLoad:O,iframeLoadTimeout:g=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:_=!1,cssCaptured:j=!1,selectorOptions:L}=e;let{needsMask:I}=e,{preserveWhiteSpace:P=!0}=e;I||(I=Jr(s,o,l,I===void 0));const z=hn(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:a,needsMask:I,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,dataURLOptions:w,inlineImages:f,recordCanvas:y,keepIframeSrcFn:N,newlyAddedElement:_,cssCaptured:j});if(!z)return console.warn(s,"not serialized"),null;let F;r.hasNode(s)?F=r.getId(s):mn(z,p)||!P&&z.type===b.Text&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?F=ot:F=Vr();const C=Object.assign(z,{id:F});if(re(s)||s.nodeType===Node.TEXT_NODE){if(re(s)&&L!==null&&L!==void 0)try{const M={maxPathDepth:L.maxPathDepth,enableSvgFingerprint:L.enableSvgFingerprint,fallbackToBody:L.fallbackToBody},H=en(s,M);H&&(C.selector=H)}catch(M){console.warn("Failed to generate SEQL selector:",M)}s.nodeType===Node.TEXT_NODE&&(C.isVisible=_r(s)),s.nodeType===Node.ELEMENT_NODE&&(C.isVisible=vt(s),C.isInteractive=Ir(s))}if(r.add(s,C),F===ot)return null;v&&v(s);let K=!c;if(C.type===b.Element){K=K&&!C.needBlock,delete C.needBlock;const M=$.shadowRoot(s);M&&Te(M)&&(C.isShadowHost=!0)}if((C.type===b.Document||C.type===b.Element)&&K){p.headWhitespace&&C.type===b.Element&&C.tagName==="head"&&(P=!1);const M={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:I,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w,inlineImages:f,recordCanvas:y,preserveWhiteSpace:P,onSerialize:v,onIframeLoad:O,iframeLoadTimeout:g,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:N,cssCaptured:!1,selectorOptions:L};if(!(C.type===b.Element&&C.tagName==="textarea"&&C.attributes.value!==void 0)){C.type===b.Element&&C.attributes._cssText!==void 0&&typeof C.attributes._cssText=="string"&&(M.cssCaptured=!0);for(const Ye of Array.from($.childNodes(s))){const Q=te(Ye,M);Q&&C.childNodes.push(Q)}}let H=null;if(re(s)&&(H=$.shadowRoot(s)))for(const Ye of Array.from($.childNodes(H))){const Q=te(Ye,M);Q&&(Te(H)&&(Q.isShadow=!0),C.childNodes.push(Q))}}const D=$.parentNode(s);return D&&Sr(D)&&Te(D)&&(C.isShadow=!0),C.type===b.Element&&C.tagName==="iframe"&&cn(s,()=>{const M=s.contentDocument;if(M&&O){const H=te(M,{doc:M,mirror:r,blockClass:i,blockSelector:n,needsMask:I,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w,inlineImages:f,recordCanvas:y,preserveWhiteSpace:P,onSerialize:v,onIframeLoad:O,iframeLoadTimeout:g,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:N,selectorOptions:L});H&&O(s,H)}},g),C.type===b.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&Be(C.attributes.href)==="css")&&un(s,()=>{if(S){const M=te(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:I,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w,inlineImages:f,recordCanvas:y,preserveWhiteSpace:P,onSerialize:v,onIframeLoad:O,iframeLoadTimeout:g,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:N,selectorOptions:L});M&&S(s,M)}},T),C}function gn(s,e){var I,P,z,F;const{mirror:t=new Ue,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,excludeAttribute:l=/.^/,inlineStylesheet:a=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:m,slimDOM:p=!1,dataURLOptions:w,preserveWhiteSpace:f,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:O,onStylesheetLoad:g,stylesheetLoadTimeout:S,keepIframeSrcFn:T=()=>!1,selector:N}=e||{},_=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,j=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,L=N===!1?null:N===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:N===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(I=N.maxPathDepth)!=null?I:10,enableSvgFingerprint:(P=N.enableSvgFingerprint)!=null?P:!0,confidenceThreshold:(z=N.confidenceThreshold)!=null?z:.3,fallbackToBody:(F=N.fallbackToBody)!=null?F:!0};return te(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:_,maskTextFn:d,maskInputFn:m,slimDOMOptions:j,dataURLOptions:w,inlineImages:c,recordCanvas:u,preserveWhiteSpace:f,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:O,onStylesheetLoad:g,stylesheetLoadTimeout:S,keepIframeSrcFn:T,newlyAddedElement:!1,selectorOptions:L})}function yn(s,e){function t(r){e(r),(r.type===b.Document||r.type===b.Element)&&r.childNodes.forEach(t)}t(s)}function wn(){Hr=1}const bn=/(max|min)-device-(width|height)/,rr=new RegExp(bn.source,"g"),xn={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(rr)&&(s.params=s.params.replace(rr,"$1-$2"))}}}},Cn={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
12
|
-
`+t.replace(/:hover/g,".\\:hover"))}))}}}},
|
|
13
|
-
`+
|
|
11
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function qi(s,e={}){var z,F,S,K;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=k(k({},di),e);if(r.root)try{Gi(s,r.root)}catch(I){return console.error("Cross-document generation detected:",I),null}const i=(z=r.cache)!=null?z:Vi(),n=i.getEID(s);if(n!==void 0)return n;const o=s.tagName.toLowerCase();if(o==="html"){const I=new Kt(r,i),A=Ki(s,r,I);return i.setEID(s,A),A}const l=new pi(r,i),a=new Ei(r,i),c=new Kt(r,i),u=new Ui,h=l.findAnchor(s);if(!h&&!r.fallbackToBody)return null;const d=(S=(F=h==null?void 0:h.element)!=null?F:(t=s.ownerDocument)==null?void 0:t.body)!=null?S:null;if(!d)return null;const m=!h||h.tier==="C",p=d.tagName.toLowerCase(),w=c.extract(d),f=d.parentElement;let g;if(f&&p!=="body"&&p!=="html"&&_e(p,w,d)){const I=Array.from(f.children).indexOf(d);I!==-1&&(g=I+1)}const C={tag:d.tagName.toLowerCase(),semantics:w,score:(K=h==null?void 0:h.score)!=null?K:B.DEGRADED_SCORE,degraded:m,nthChild:g},M=a.buildPath(d,s,c),y=c.extract(s);r.enableSvgFingerprint&&Yi(s)&&(y.svg=u.fingerprint(s));const v=s.parentElement;let T;if(v&&_e(o,y,s)){const I=Array.from(v.children).indexOf(s);I!==-1&&(T=I+1)}const O={tag:s.tagName.toLowerCase(),semantics:y,score:c.scoreElement(s),nthChild:T},_=[],j={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},L=C.degraded||M.degraded,P=Ji(C.degraded,M),D={version:"1.0",anchor:C,path:M.path,target:O,constraints:_,fallback:j,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:L,degradationReason:P}};return D.meta.confidence=Bi(D),D.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,D),D)}function Yi(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Ji(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Ki(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const Wr={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"},Zt=Object.fromEntries(Object.entries(Wr).map(([s,e])=>[e,s])),jr={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0,format:"compact"};function Xt(s){return s==="id"?101:q[s]!==void 0?q[s]:s.startsWith("data-")?q["data-*"]:s.startsWith("aria-")?q["aria-*"]:0}function Qi(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Zi(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function Xi(s,e){const t=k(k({},jr),e),r=t.format==="compact",i=r?"v1":`v${s.version}`,n=r?":":": ",o=r?"::":" :: ",l=r?">":" > ",a=t.includeText&&s.target.semantics.text?s.target.semantics.text.normalized:void 0,c=et(s.anchor,!1,t),u=s.path.length>0?s.path.map(m=>et(m,!1,t,a)).join(l)+l:"",h=et(s.target,!0,t),d=t.includeConstraints?en(s,t):"";return`${i}${n}${c}${o}${u}${h}${d}`}function et(s,e=!1,t=jr,r){var m;const{tag:i,semantics:n}=s,o=t.format==="compact";let l=i;const a=[],c=k({},n.attributes);n.id&&(c.id=n.id),n.role&&!c.role&&(c.role=n.role);const u=Object.entries(c).map(([p,w])=>{const f=Xt(p),g=p==="href"||p==="src"?Br(p,w):w;return{name:p,value:g,priority:f}}).filter(p=>p.name!=="id"&&p.name!=="class"&&zr.has(p.name)||Fr.has(p.name)&&Ur(p.value)?!1:p.priority>0||p.name==="role"||p.name==="id");u.sort((p,w)=>w.priority-p.priority);const h=u.slice(0,t.maxAttributes);h.sort((p,w)=>p.name.localeCompare(w.name));for(const{name:p,value:w}of h){const f=o&&(m=Wr[p])!=null?m:p;a.push(`${f}="${nt(w)}"`)}if(t.includeText&&n.text&&!Zi(n.text.normalized)){const p=n.text.normalized;if(p.length>0&&p.length<=t.maxTextLength&&!(!e&&r!==void 0&&p===r)){const w=o?"x":"text";a.push(`${w}="${nt(p)}"`)}}let d=a;if(a.length>0&&e&&t.simplifyTarget&&n.id&&(d=a.filter(p=>{var g;const w=p.split("=")[0],f=(g=Zt[w])!=null?g:w;return Xt(f)>=60||f==="text"||f==="id"||f==="role"})),n.classes&&n.classes.length>0){const p=wi(n.classes),w=!!n.id||a.some(f=>{var M;const g=f.split("=")[0],C=(M=Zt[g])!=null?M:g;return C==="href"||C==="data-testid"||C==="text"||C==="role"});if(!(e&&t.simplifyTarget&&w)&&p.length>0){const f=p.sort().slice(0,t.maxClasses);l+=f.map(g=>`.${g}`).join("")}}if(d.length>0&&(l+=`[${d.join(",")}]`),"nthChild"in s&&s.nthChild){const p=!!n.id||n.attributes&&Object.keys(n.attributes).some(Qi);e&&t.simplifyTarget&&p||(l+=`#${s.nthChild}`)}return l}function en(s,e){if(!s.constraints||s.constraints.length===0)return"";const t=[];for(const r of s.constraints)switch(r.type){case"uniqueness":t.push("unique=true");break;case"position":r.params&&r.params.strategy&&t.push(`pos=${r.params.strategy}`);break;case"text-proximity":if(r.params&&r.params.reference){const i=nt(String(r.params.reference));t.push(`text="${i}"`)}break}return t.length===0?"":`${e.format==="verbose"?" ":""}{${t.join(",")}}`}function nt(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function tn(s,e,t){const r=qi(s,e);return r?Xi(r,t):null}let Hr=1;const rn=new RegExp("[^a-z0-9-_:]"),ot=-2;function Vr(){return Hr++}function sn(s){if(s instanceof HTMLFormElement)return"form";const e=ge(s.tagName);return rn.test(e)?"div":e}let X,er;const nn=/^[^ \t\n\r\u000c]+/,on=/^[, \t\n\r\u000c]+/;function an(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(on),!(t>=e.length);){let n=r(nn);if(n.slice(-1)===",")n=ee(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=ee(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const tr=new WeakMap;function ee(s,e){return!e||e.trim()===""?e:Nt(s,e)}function ln(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Nt(s,e){let t=tr.get(s);if(t||(t=s.createElement("a"),tr.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Gr(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?ee(s,r):t==="srcset"?an(s,r):t==="style"?ue(r,Nt(s)):e==="object"&&t==="data"?ee(s,r):r)}function qr(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Yr(s,e){return e?typeof e=="string"?s.includes(e):e.test(s):!1}function cn(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function De(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?De($.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?De($.parentNode(s),e,t):!1}function Jr(s,e,t,r){let i;if(re(s)){if(i=s,!$.childNodes(i).length)return!1}else{if($.parentElement(s)===null)return!1;i=$.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(De(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function un(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function hn(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function fn(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:o,needsMask:l,inlineStylesheet:a,maskInputOptions:c={},maskTextFn:u,maskInputFn:h,dataURLOptions:d={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:w,newlyAddedElement:f=!1,cssCaptured:g=!1}=e,C=dn(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:b.Document,childNodes:[],compatMode:s.compatMode}:{type:b.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:b.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:C};case s.ELEMENT_NODE:return mn(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,dataURLOptions:d,inlineImages:m,recordCanvas:p,keepIframeSrcFn:w,newlyAddedElement:f,rootId:C});case s.TEXT_NODE:return pn(s,{doc:t,needsMask:l,maskTextFn:u,rootId:C,cssCaptured:g});case s.CDATA_SECTION_NODE:return{type:b.CDATA,textContent:"",rootId:C};case s.COMMENT_NODE:return{type:b.Comment,textContent:$.textContent(s)||"",rootId:C};default:return!1}}function dn(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function pn(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=$.parentNode(s),l=o&&o.tagName;let a="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?a="SCRIPT_PLACEHOLDER":n||(a=$.textContent(s),c&&a&&(a=ue(a,Nt(e.doc)))),!c&&!u&&a&&t&&(a=r?r(a,$.parentElement(s)):a.replace(/[\S]/g,"*")),{type:b.Text,textContent:a||"",rootId:i}}function mn(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:a,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:m=!1,rootId:p}=e,w=cn(s,r,i),f=sn(s);let g={};const C=s.attributes.length;for(let y=0;y<C;y++){const v=s.attributes[y];Yr(v.name,n)||qr(f,v.name,v.value)||(g[v.name]=Gr(t,f,ge(v.name),v.value))}if(f==="link"&&o){const y=Array.from(t.styleSheets).find(T=>T.href===s.href);let v=null;y&&(v=Le(y)),v&&(delete g.rel,delete g.href,g._cssText=v)}if(f==="style"&&s.sheet){let y=Le(s.sheet);y&&(s.childNodes.length>1&&(y=Lr(y,s)),g._cssText=y)}if(f==="input"||f==="textarea"||f==="select"){const y=s.value,v=s.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&y?g.value=Or({element:s,type:$r(s),tagName:f,value:y,maskInputOptions:l,maskInputFn:a}):v&&(g.checked=v)}if(f==="option"&&(s.selected&&!l.select?g.selected=!0:delete g.selected),f==="dialog"&&s.open&&(g.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&h){if(s.__context==="2d")Mr(s)||(g.rr_dataURL=s.toDataURL(c.type,c.quality));else if(!("__context"in s)){const y=s.toDataURL(c.type,c.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;const T=v.toDataURL(c.type,c.quality);y!==T&&(g.rr_dataURL=y)}}if(f==="img"&&u){X||(X=t.createElement("canvas"),er=X.getContext("2d"));const y=s,v=y.currentSrc||y.getAttribute("src")||"<unknown-src>",T=y.crossOrigin,O=()=>{y.removeEventListener("load",O);try{X.width=y.naturalWidth,X.height=y.naturalHeight,er.drawImage(y,0,0),g.rr_dataURL=X.toDataURL(c.type,c.quality)}catch(_){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?O():y.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${v}! Error: ${_}`)}y.crossOrigin==="anonymous"&&(T?g.crossOrigin=T:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?O():y.addEventListener("load",O)}if(f==="audio"||f==="video"){const y=g;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(g.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(g.rr_scrollTop=s.scrollTop)),w){const{width:y,height:v}=s.getBoundingClientRect();g={class:g.class,rr_width:`${y}px`,rr_height:`${v}px`}}f==="iframe"&&!d(g.src)&&(s.contentDocument||(g.rr_src=g.src),delete g.src);let M;try{customElements.get(f)&&(M=!0)}catch(y){}return{type:b.Element,tagName:f,attributes:g,childNodes:[],isSVG:ln(s)||void 0,needBlock:w,rootId:p,isCustom:M}}function R(s){return s==null?"":s.toLowerCase()}function gn(s,e){if(e.comment&&s.type===b.Comment)return!0;if(s.type===b.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Be(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(R(s.attributes.name).match(/^msapplication-tile(image|color)$/)||R(s.attributes.name)==="application-name"||R(s.attributes.rel)==="icon"||R(s.attributes.rel)==="apple-touch-icon"||R(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&R(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(R(s.attributes.property).match(/^(og|twitter|fb):/)||R(s.attributes.name).match(/^(og|twitter):/)||R(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(R(s.attributes.name)==="robots"||R(s.attributes.name)==="googlebot"||R(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(R(s.attributes.name)==="author"||R(s.attributes.name)==="generator"||R(s.attributes.name)==="framework"||R(s.attributes.name)==="publisher"||R(s.attributes.name)==="progid"||R(s.attributes.property).match(/^article:/)||R(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(R(s.attributes.name)==="google-site-verification"||R(s.attributes.name)==="yandex-verification"||R(s.attributes.name)==="csrf-token"||R(s.attributes.name)==="p:domain_verify"||R(s.attributes.name)==="verify-v1"||R(s.attributes.name)==="verification"||R(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function te(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w={},inlineImages:f=!1,recordCanvas:g=!1,onSerialize:C,onIframeLoad:M,iframeLoadTimeout:y=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:_=!1,cssCaptured:j=!1,selectorOptions:L}=e;let{needsMask:P}=e,{preserveWhiteSpace:D=!0}=e;P||(P=Jr(s,o,l,P===void 0));const z=fn(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:a,needsMask:P,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,dataURLOptions:w,inlineImages:f,recordCanvas:g,keepIframeSrcFn:O,newlyAddedElement:_,cssCaptured:j});if(!z)return console.warn(s,"not serialized"),null;let F;r.hasNode(s)?F=r.getId(s):gn(z,p)||!D&&z.type===b.Text&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?F=ot:F=Vr();const S=Object.assign(z,{id:F});if(re(s)||s.nodeType===Node.TEXT_NODE){if(re(s)&&L!==null&&L!==void 0)try{const A={maxPathDepth:L.maxPathDepth,enableSvgFingerprint:L.enableSvgFingerprint,fallbackToBody:L.fallbackToBody},H=tn(s,A);H&&(S.selector=H)}catch(A){console.warn("Failed to generate SEQL selector:",A)}if(s.nodeType===Node.TEXT_NODE&&(S.isVisible=_r(s)),s.nodeType===Node.ELEMENT_NODE){const A=vt(s);S.isVisible=A.isVisible,S.isCSSVisible=A.isCSSVisible,S.isViewportVisible=A.isViewportVisible,S.hasSize=A.hasSize,S.isInteractive=Pr(s)}}if(r.add(s,S),F===ot)return null;C&&C(s);let K=!c;if(S.type===b.Element){K=K&&!S.needBlock,delete S.needBlock;const A=$.shadowRoot(s);A&&Te(A)&&(S.isShadowHost=!0)}if((S.type===b.Document||S.type===b.Element)&&K){p.headWhitespace&&S.type===b.Element&&S.tagName==="head"&&(D=!1);const A={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w,inlineImages:f,recordCanvas:g,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:M,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:T,keepIframeSrcFn:O,cssCaptured:!1,selectorOptions:L};if(!(S.type===b.Element&&S.tagName==="textarea"&&S.attributes.value!==void 0)){S.type===b.Element&&S.attributes._cssText!==void 0&&typeof S.attributes._cssText=="string"&&(A.cssCaptured=!0);for(const Ye of Array.from($.childNodes(s))){const Q=te(Ye,A);Q&&S.childNodes.push(Q)}}let H=null;if(re(s)&&(H=$.shadowRoot(s)))for(const Ye of Array.from($.childNodes(H))){const Q=te(Ye,A);Q&&(Te(H)&&(Q.isShadow=!0),S.childNodes.push(Q))}}const I=$.parentNode(s);return I&&Cr(I)&&Te(I)&&(S.isShadow=!0),S.type===b.Element&&S.tagName==="iframe"&&un(s,()=>{const A=s.contentDocument;if(A&&M){const H=te(A,{doc:A,mirror:r,blockClass:i,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w,inlineImages:f,recordCanvas:g,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:M,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:T,keepIframeSrcFn:O,selectorOptions:L});H&&M(s,H)}},y),S.type===b.Element&&S.tagName==="link"&&typeof S.attributes.rel=="string"&&(S.attributes.rel==="stylesheet"||S.attributes.rel==="preload"&&typeof S.attributes.href=="string"&&Be(S.attributes.href)==="css")&&hn(s,()=>{if(v){const A=te(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w,inlineImages:f,recordCanvas:g,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:M,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:T,keepIframeSrcFn:O,selectorOptions:L});A&&v(s,A)}},T),S}function yn(s,e){var P,D,z,F;const{mirror:t=new Ue,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,excludeAttribute:l=/.^/,inlineStylesheet:a=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:m,slimDOM:p=!1,dataURLOptions:w,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:C,iframeLoadTimeout:M,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:T=()=>!1,selector:O}=e||{},_=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,j=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,L=O===!1?null:O===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:O===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(P=O.maxPathDepth)!=null?P:10,enableSvgFingerprint:(D=O.enableSvgFingerprint)!=null?D:!0,confidenceThreshold:(z=O.confidenceThreshold)!=null?z:.3,fallbackToBody:(F=O.fallbackToBody)!=null?F:!0};return te(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:_,maskTextFn:d,maskInputFn:m,slimDOMOptions:j,dataURLOptions:w,inlineImages:c,recordCanvas:u,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:C,iframeLoadTimeout:M,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:T,newlyAddedElement:!1,selectorOptions:L})}function wn(s,e){function t(r){e(r),(r.type===b.Document||r.type===b.Element)&&r.childNodes.forEach(t)}t(s)}function bn(){Hr=1}const xn=/(max|min)-device-(width|height)/,rr=new RegExp(xn.source,"g"),Sn={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(rr)&&(s.params=s.params.replace(rr,"$1-$2"))}}}},Cn={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
12
|
+
`+t.replace(/:hover/g,".\\:hover"))}))}}}},vn={postcssPlugin:"postcss-animation-fill-mode",prepare:function(){return{Rule:function(s){let e=!1,t=!1,r=null;s.walkDecls(i=>{i.prop==="animation"&&(e=!0,r=i),i.prop==="animation-fill-mode"&&(t=!0)}),e&&!t&&r&&s.insertAfter(r,{prop:"animation-fill-mode",value:"forwards"})}}}};function En(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function An(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Ot={exports:{}},x=String,Kr=function(){return{isColorSupported:!1,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};Ot.exports=Kr();Ot.exports.createColors=Kr;var Rn=Ot.exports;const Nn={},On=Object.freeze(Object.defineProperty({__proto__:null,default:Nn},Symbol.toStringTag,{value:"Module"})),U=An(On);let sr=Rn,ir=U,at=class Qr extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Qr)}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=sr.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=sr.createColors(!0);i=m=>u(d(m)),r=m=>h(m),ir&&(n=m=>ir(m))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(l,a).map((u,h)=>{let d=l+1+h,m=" "+(" "+d).slice(-c)+" | ";if(d===this.line){if(u.length>160){let w=20,f=Math.max(0,this.column-w),g=Math.max(this.column+w,this.endColumn+w),C=u.slice(f,g),M=r(m.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return i(">")+r(m)+n(C)+`
|
|
13
|
+
`+M+i("^")}let p=r(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(m)+n(u)+`
|
|
14
14
|
`+p+i("^")}return" "+r(m)+n(u)}).join(`
|
|
15
15
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
16
16
|
|
|
@@ -20,24 +20,24 @@ Solution: Ensure element and root parameter are from the same document context.`
|
|
|
20
20
|
`,beforeComment:`
|
|
21
21
|
`,beforeDecl:`
|
|
22
22
|
`,beforeOpen:" ",beforeRule:`
|
|
23
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
24
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return nr[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+
|
|
23
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Mn(s){return s[0].toUpperCase()+s.slice(1)}let lt=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
24
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return nr[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Mn(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=nr[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
25
25
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
26
26
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
27
27
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
28
28
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
|
|
29
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}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)}};var Zr=lt;lt.default=lt;let
|
|
30
|
-
`?(t=1,r+=1):t+=1}return i}let ht=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[oe]=!1,this[
|
|
31
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:V(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:V(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=t.slice(V(t,this.source.start),V(t,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),i=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:V(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:V(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new $n().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,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=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))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){if(l==null)continue;let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=kn){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var je=ht;ht.default=ht;let _n=je,ft=class extends _n{constructor(e){super(e),this.type="comment"}};var He=ft;ft.default=ft;let Pn=je,dt=class extends Pn{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=Z(k({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Ve=dt;dt.default=dt;let Xr=He,es=Ve,Dn=je,{isClean:ts,my:rs}=ye,Tt,ss,is,$t;function ns(s){return s.map(e=>(e.nodes&&(e.nodes=ns(e.nodes)),delete e.source,e))}function os(s){if(s[ts]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)os(e)}let G=class as extends Dn{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]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ns(ss(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new es(e)]}else if(e.selector||e.selectors)e=[new $t(e)];else if(e.name)e=[new Tt(e)];else if(e.text)e=[new Xr(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[rs]||as.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ts]&&os(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.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 r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};G.registerParse=s=>{ss=s};G.registerRule=s=>{$t=s};G.registerAtRule=s=>{Tt=s};G.registerRoot=s=>{is=s};var J=G;G.default=G;G.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Tt.prototype):s.type==="rule"?Object.setPrototypeOf(s,$t.prototype):s.type==="decl"?Object.setPrototypeOf(s,es.prototype):s.type==="comment"?Object.setPrototypeOf(s,Xr.prototype):s.type==="root"&&Object.setPrototypeOf(s,is.prototype),s[rs]=!0,s.nodes&&s.nodes.forEach(e=>{G.rebuild(e)})};let ls=J,De=class extends ls{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)}};var kt=De;De.default=De;ls.registerAtRule(De);let In=J,cs,us,fe=class extends In{constructor(e){super(k({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new cs(new us,this,e).stringify()}};fe.registerLazyResult=s=>{cs=s};fe.registerProcessor=s=>{us=s};var Lt=fe;fe.default=fe;let zn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Fn=(s=21)=>{let e="",t=s|0;for(;t--;)e+=zn[Math.random()*64|0];return e};var Un={nanoid:Fn};let{existsSync:Bn,readFileSync:Wn}=U,{dirname:tt,join:jn}=U,{SourceMapConsumer:or,SourceMapGenerator:ar}=U;function Hn(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let pt=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=tt(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new or(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(r);if(l)return Hn(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=tt(e),Bn(e))return this.mapFile=e,Wn(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof or)return ar.fromSourceMap(t).toString();if(t instanceof ar)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 r=this.annotation;return e&&(r=jn(tt(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var hs=pt;pt.default=pt;let{nanoid:Vn}=Un,{isAbsolute:mt,resolve:gt}=U,{SourceMapConsumer:Gn,SourceMapGenerator:qn}=U,{fileURLToPath:lr,pathToFileURL:Se}=U,cr=Mt,Yn=hs,rt=U,st=Symbol("lineToIndexCache"),Jn=!!(Gn&&qn),ur=!!(gt&&mt);function hr(s){if(s[st])return s[st];let e=s.css.split(`
|
|
32
|
-
`),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[st]=t,t}let
|
|
33
|
-
`," "];return de.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var ms=de;de.default=de;let gs=J,
|
|
29
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}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)}};var Zr=lt;lt.default=lt;let Tn=Zr;function ct(s,e){new Tn(e).stringify(s)}var We=ct;ct.default=ct;var ye={};ye.isClean=Symbol("isClean");ye.my=Symbol("my");let $n=Mt,kn=Zr,Ln=We,{isClean:oe,my:_n}=ye;function ut(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>ut(o,t)):(n==="object"&&i!==null&&(i=ut(i)),t[r]=i)}return t}function V(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
|
|
30
|
+
`?(t=1,r+=1):t+=1}return i}let ht=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[oe]=!1,this[_n]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}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=ut(this);for(let r in e)t[r]=e[r];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:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new $n(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[oe]=!0}markDirty(){if(this[oe]){this[oe]=!1;let e=this;for(;e=e.parent;)e[oe]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(V(r,this.source.start),V(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=V(i,this.source.start),o=n+e;for(let l=n;l<o;l++)i[l]===`
|
|
31
|
+
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:V(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:V(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=t.slice(V(t,this.source.start),V(t,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),i=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:V(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:V(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new kn().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,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=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))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){if(l==null)continue;let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ln){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var je=ht;ht.default=ht;let Dn=je,ft=class extends Dn{constructor(e){super(e),this.type="comment"}};var He=ft;ft.default=ft;let In=je,dt=class extends In{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=Z(k({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Ve=dt;dt.default=dt;let Xr=He,es=Ve,Pn=je,{isClean:ts,my:rs}=ye,Tt,ss,is,$t;function ns(s){return s.map(e=>(e.nodes&&(e.nodes=ns(e.nodes)),delete e.source,e))}function os(s){if(s[ts]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)os(e)}let G=class as extends Pn{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]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ns(ss(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new es(e)]}else if(e.selector||e.selectors)e=[new $t(e)];else if(e.name)e=[new Tt(e)];else if(e.text)e=[new Xr(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[rs]||as.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ts]&&os(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.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 r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};G.registerParse=s=>{ss=s};G.registerRule=s=>{$t=s};G.registerAtRule=s=>{Tt=s};G.registerRoot=s=>{is=s};var J=G;G.default=G;G.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Tt.prototype):s.type==="rule"?Object.setPrototypeOf(s,$t.prototype):s.type==="decl"?Object.setPrototypeOf(s,es.prototype):s.type==="comment"?Object.setPrototypeOf(s,Xr.prototype):s.type==="root"&&Object.setPrototypeOf(s,is.prototype),s[rs]=!0,s.nodes&&s.nodes.forEach(e=>{G.rebuild(e)})};let ls=J,Ie=class extends ls{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)}};var kt=Ie;Ie.default=Ie;ls.registerAtRule(Ie);let zn=J,cs,us,fe=class extends zn{constructor(e){super(k({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new cs(new us,this,e).stringify()}};fe.registerLazyResult=s=>{cs=s};fe.registerProcessor=s=>{us=s};var Lt=fe;fe.default=fe;let Fn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Un=(s=21)=>{let e="",t=s|0;for(;t--;)e+=Fn[Math.random()*64|0];return e};var Bn={nanoid:Un};let{existsSync:Wn,readFileSync:jn}=U,{dirname:tt,join:Hn}=U,{SourceMapConsumer:or,SourceMapGenerator:ar}=U;function Vn(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let pt=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=tt(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new or(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(r);if(l)return Vn(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=tt(e),Wn(e))return this.mapFile=e,jn(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof or)return ar.fromSourceMap(t).toString();if(t instanceof ar)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 r=this.annotation;return e&&(r=Hn(tt(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var hs=pt;pt.default=pt;let{nanoid:Gn}=Bn,{isAbsolute:mt,resolve:gt}=U,{SourceMapConsumer:qn,SourceMapGenerator:Yn}=U,{fileURLToPath:lr,pathToFileURL:Ce}=U,cr=Mt,Jn=hs,rt=U,st=Symbol("lineToIndexCache"),Kn=!!(qn&&Yn),ur=!!(gt&&mt);function hr(s){if(s[st])return s[st];let e=s.css.split(`
|
|
32
|
+
`),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[st]=t,t}let Pe=class{get from(){return this.file||this.id}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=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!ur||/^\w+:\/\//.test(t.from)||mt(t.from)?this.file=t.from:this.file=gt(t.from)),ur&&Kn){let r=new Jn(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Gn(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l,a,c;if(t&&typeof t=="object"){let h=t,d=r;if(typeof h.offset=="number"){a=h.offset;let m=this.fromOffset(a);t=m.line,r=m.col}else t=h.line,r=h.column,a=this.fromLineAndColumn(t,r);if(typeof d.offset=="number"){l=d.offset;let m=this.fromOffset(l);o=m.line,n=m.col}else o=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(r)a=this.fromLineAndColumn(t,r);else{a=t;let h=this.fromOffset(a);t=h.line,r=h.col}let u=this.origin(t,r,o,n);return u?c=new cr(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):c=new cr(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:n,line:o},this.css,this.file,i.plugin),c.input={column:r,endColumn:n,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(Ce&&(c.input.url=Ce(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return hr(this)[e-1]+t-1}fromOffset(e){let t=hr(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<t[o])n=o-1;else if(e>=t[o+1])i=o+1;else{i=o;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:gt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;mt(o.source)?a=Ce(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Ce(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(lr)c.file=lr(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.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=k({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Ge=Pe;Pe.default=Pe;rt&&rt.registerInput&&rt.registerInput(Pe);let fs=J,ds,ps,se=class extends fs{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ds(new ps,this,e).stringify()}};se.registerLazyResult=s=>{ds=s};se.registerProcessor=s=>{ps=s};var we=se;se.default=se;fs.registerRoot(se);let de={comma(s){return de.split(s,[","],!0)},space(s){let e=[" ",`
|
|
33
|
+
`," "];return de.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var ms=de;de.default=de;let gs=J,Qn=ms,ze=class extends gs{get selectors(){return Qn.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var _t=ze;ze.default=ze;gs.registerRule(ze);let Zn=kt,Xn=He,eo=Ve,to=Ge,ro=hs,so=we,io=_t;function pe(s,e){if(Array.isArray(s))return s.map(o=>pe(o));let i=s,{inputs:t}=i,r=Je(i,["inputs"]);if(t){e=[];for(let o of t){let l=Z(k({},o),{__proto__:to.prototype});l.map&&(l.map=Z(k({},l.map),{__proto__:ro.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>pe(o,e))),r.source){let n=r.source,{inputId:o}=n,l=Je(n,["inputId"]);r.source=l,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new so(r);if(r.type==="decl")return new eo(r);if(r.type==="rule")return new io(r);if(r.type==="comment")return new Xn(r);if(r.type==="atrule")return new Zn(r);throw new Error("Unknown node type: "+s.type)}var no=pe;pe.default=pe;let{dirname:$e,relative:ys,resolve:ws,sep:bs}=U,{SourceMapConsumer:xs,SourceMapGenerator:ke}=U,{pathToFileURL:fr}=U,oo=Ge,ao=!!(xs&&ke),lo=!!($e&&ws&&ys&&bs),co=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
34
34
|
`;this.css.includes(`\r
|
|
35
35
|
`)&&(t=`\r
|
|
36
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||$e(e.file),i;this.mapOpts.sourcesContent===!1?(i=new xs(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ao&&
|
|
37
|
-
`),t=l.length-n):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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}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()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?$e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=$e(ws(r,this.mapOpts.annotation)));let i=ys(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new
|
|
38
|
-
`.charCodeAt(0),ae=" ".charCodeAt(0),Ae="\f".charCodeAt(0),Re=" ".charCodeAt(0),Ne="\r".charCodeAt(0),co="[".charCodeAt(0),uo="]".charCodeAt(0),ho="(".charCodeAt(0),fo=")".charCodeAt(0),po="{".charCodeAt(0),mo="}".charCodeAt(0),go=";".charCodeAt(0),yo="*".charCodeAt(0),wo=":".charCodeAt(0),bo="@".charCodeAt(0),Oe=/[\t\n\f\r "#'()/;[\\\]{}]/g,Me=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,xo=/.[\r\n"'(/\\]/,mr=/[\da-f]/i;var Co=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,d,m,p,w=r.length,f=0,y=[],v=[];function O(){return f}function g(_){throw e.error("Unclosed "+_,f)}function S(){return v.length===0&&f>=w}function T(_){if(v.length)return v.pop();if(f>=w)return;let j=_?_.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ee:case ae:case Re:case Ne:case Ae:{a=f;do a+=1,n=r.charCodeAt(a);while(n===ae||n===Ee||n===Re||n===Ne||n===Ae);u=["space",r.slice(f,a)],f=a-1;break}case co:case uo:case po:case mo:case wo:case go:case fo:{let L=String.fromCharCode(n);u=[L,L,f];break}case ho:{if(p=y.length?y.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==it&&m!==dr&&m!==ae&&m!==Ee&&m!==Re&&m!==Ae&&m!==Ne){a=f;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(i||j){a=f;break}else g("bracket");for(d=a;r.charCodeAt(d-1)===ve;)d-=1,h=!h}while(h);u=["brackets",r.slice(f,a+1),f,a],f=a}else a=r.indexOf(")",f+1),o=r.slice(f,a+1),a===-1||xo.test(o)?u=["(","(",f]:(u=["brackets",o,f,a],f=a);break}case it:case dr:{c=n===it?"'":'"',a=f;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(i||j){a=f+1;break}else g("string");for(d=a;r.charCodeAt(d-1)===ve;)d-=1,h=!h}while(h);u=["string",r.slice(f,a+1),f,a],f=a;break}case bo:{Oe.lastIndex=f+1,Oe.test(r),Oe.lastIndex===0?a=r.length-1:a=Oe.lastIndex-2,u=["at-word",r.slice(f,a+1),f,a],f=a;break}case ve:{for(a=f,l=!0;r.charCodeAt(a+1)===ve;)a+=1,l=!l;if(n=r.charCodeAt(a+1),l&&n!==pr&&n!==ae&&n!==Ee&&n!==Re&&n!==Ne&&n!==Ae&&(a+=1,mr.test(r.charAt(a)))){for(;mr.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===ae&&(a+=1)}u=["word",r.slice(f,a+1),f,a],f=a;break}default:{n===pr&&r.charCodeAt(f+1)===yo?(a=r.indexOf("*/",f+2)+1,a===0&&(i||j?a=r.length:g("comment")),u=["comment",r.slice(f,a+1),f,a],f=a):(Me.lastIndex=f+1,Me.test(r),Me.lastIndex===0?a=r.length-1:a=Me.lastIndex-2,u=["word",r.slice(f,a+1),f,a],y.push(u),f=a);break}}return f++,u}function N(_){v.push(_)}return{back:N,endOfFile:S,nextToken:T,position:O}};let So=kt,vo=He,Eo=Ve,Ao=we,gr=_t,Ro=Co;const yr={empty:!0,space:!0};function No(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Oo=class{constructor(e){this.input=e,this.root=new Ao,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new So;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=i}return!1}comment(e){let t=new vo;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Ro(this.input)}decl(e,t){let r=new Eo;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||No(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.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(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let d=c;d>0;d--){let m=u[d][0];if(h.trim().startsWith("!")&&m!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.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 gr;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")n||(n=c),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){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,r,i){let n,o,l=r.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=r[d],o=n[0],o==="space"&&d===l-1&&!i?c=!1:o==="comment"?(h=r[d-1]?r[d-1][0]:"empty",u=r[d+1]?r[d+1][0]:"empty",!yr[h]&&!yr[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new gr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}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 "+e[0][1],{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})}};var Mo=Oo;let To=J,$o=Ge,ko=Mo;function Fe(s,e){let t=new $o(s,e),r=new ko(t);try{r.parse()}catch(i){throw i}return r.root}var Pt=Fe;Fe.default=Fe;To.registerParse(Fe);let yt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}};var Ss=yt;yt.default=yt;let Lo=Ss,wt=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Lo(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Dt=wt;wt.default=wt;let _o=J,Po=Lt,Do=Cs,Io=Pt,wr=Dt,zo=we,Fo=We,{isClean:W,my:Uo}=ye;const Bo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Wo={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},jo={Once:!0,postcssPlugin:!0,prepare:!0},ie=0;function le(s){return typeof s=="object"&&typeof s.then=="function"}function vs(s){let e=!1,t=Bo[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ie,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ie,t+"Exit"]:[t,t+"Exit"]}function br(s){let e;return s.type==="document"?e=["Document",ie,"DocumentExit"]:s.type==="root"?e=["Root",ie,"RootExit"]:e=vs(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function bt(s){return s[W]=!1,s.nodes&&s.nodes.forEach(e=>bt(e)),s}let xt={},ne=class Es{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"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=bt(t);else if(t instanceof Es||t instanceof wr)i=bt(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Io;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Uo]&&_o.rebuild(i)}this.result=new wr(e,i,r),this.helpers=Z(k({},xt),{postcss:xt,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?k(k({},n),n.prepare(this.result)):n)}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 r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Wo[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!jo[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(le(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[W];){e[W]=!0;let t=[br(e)];for(;t.length>0;){let r=this.visitTick(t);if(le(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return le(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Fo;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Do(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(le(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[W];)e[W]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(le(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[W]){l[W]=!0,e.push(br(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ie){r.nodes&&r.nodes.length&&(r[W]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[W]=!0;let t=vs(e);for(let r of t)if(r===ie)e.nodes&&e.each(i=>{i[W]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};ne.registerPostcss=s=>{xt=s};var As=ne;ne.default=ne;zo.registerLazyResult(ne);Po.registerLazyResult(ne);let Ho=Cs,Vo=Pt;const Go=Dt;let qo=We;let Ct=class{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=Vo;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=qo;this.result=new Go(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Ho(n,i,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[]}};var Yo=Ct;Ct.default=Ct;let Jo=Lt,Ko=As,Qo=Yo,Zo=we,me=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Qo(this,e,t):new Ko(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Xo=me;me.default=me;Zo.registerProcessor(me);Jo.registerProcessor(me);let Rs=kt,Ns=He,ea=J,ta=Mt,Os=Ve,Ms=Lt,ra=io,sa=Ge,ia=As,na=ms,oa=je,aa=Pt,It=Xo,la=Dt,Ts=we,$s=_t,ca=We,ua=Ss;function E(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new It(s)}E.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
36
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||$e(e.file),i;this.mapOpts.sourcesContent===!1?(i=new xs(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),lo&&ao&&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=ke.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ke({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new ke({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=l.match(/\n/g),o?(e+=o.length,n=l.lastIndexOf(`
|
|
37
|
+
`),t=l.length-n):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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}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()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?$e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=$e(ws(r,this.mapOpts.annotation)));let i=ys(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new oo(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(fr){let r=fr(e).toString();return this.memoizedFileURLs.set(e,r),r}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;bs==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Ss=co;const it="'".charCodeAt(0),dr='"'.charCodeAt(0),ve="\\".charCodeAt(0),pr="/".charCodeAt(0),Ee=`
|
|
38
|
+
`.charCodeAt(0),ae=" ".charCodeAt(0),Ae="\f".charCodeAt(0),Re=" ".charCodeAt(0),Ne="\r".charCodeAt(0),uo="[".charCodeAt(0),ho="]".charCodeAt(0),fo="(".charCodeAt(0),po=")".charCodeAt(0),mo="{".charCodeAt(0),go="}".charCodeAt(0),yo=";".charCodeAt(0),wo="*".charCodeAt(0),bo=":".charCodeAt(0),xo="@".charCodeAt(0),Oe=/[\t\n\f\r "#'()/;[\\\]{}]/g,Me=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,So=/.[\r\n"'(/\\]/,mr=/[\da-f]/i;var Co=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,d,m,p,w=r.length,f=0,g=[],C=[];function M(){return f}function y(_){throw e.error("Unclosed "+_,f)}function v(){return C.length===0&&f>=w}function T(_){if(C.length)return C.pop();if(f>=w)return;let j=_?_.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ee:case ae:case Re:case Ne:case Ae:{a=f;do a+=1,n=r.charCodeAt(a);while(n===ae||n===Ee||n===Re||n===Ne||n===Ae);u=["space",r.slice(f,a)],f=a-1;break}case uo:case ho:case mo:case go:case bo:case yo:case po:{let L=String.fromCharCode(n);u=[L,L,f];break}case fo:{if(p=g.length?g.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==it&&m!==dr&&m!==ae&&m!==Ee&&m!==Re&&m!==Ae&&m!==Ne){a=f;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(i||j){a=f;break}else y("bracket");for(d=a;r.charCodeAt(d-1)===ve;)d-=1,h=!h}while(h);u=["brackets",r.slice(f,a+1),f,a],f=a}else a=r.indexOf(")",f+1),o=r.slice(f,a+1),a===-1||So.test(o)?u=["(","(",f]:(u=["brackets",o,f,a],f=a);break}case it:case dr:{c=n===it?"'":'"',a=f;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(i||j){a=f+1;break}else y("string");for(d=a;r.charCodeAt(d-1)===ve;)d-=1,h=!h}while(h);u=["string",r.slice(f,a+1),f,a],f=a;break}case xo:{Oe.lastIndex=f+1,Oe.test(r),Oe.lastIndex===0?a=r.length-1:a=Oe.lastIndex-2,u=["at-word",r.slice(f,a+1),f,a],f=a;break}case ve:{for(a=f,l=!0;r.charCodeAt(a+1)===ve;)a+=1,l=!l;if(n=r.charCodeAt(a+1),l&&n!==pr&&n!==ae&&n!==Ee&&n!==Re&&n!==Ne&&n!==Ae&&(a+=1,mr.test(r.charAt(a)))){for(;mr.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===ae&&(a+=1)}u=["word",r.slice(f,a+1),f,a],f=a;break}default:{n===pr&&r.charCodeAt(f+1)===wo?(a=r.indexOf("*/",f+2)+1,a===0&&(i||j?a=r.length:y("comment")),u=["comment",r.slice(f,a+1),f,a],f=a):(Me.lastIndex=f+1,Me.test(r),Me.lastIndex===0?a=r.length-1:a=Me.lastIndex-2,u=["word",r.slice(f,a+1),f,a],g.push(u),f=a);break}}return f++,u}function O(_){C.push(_)}return{back:O,endOfFile:v,nextToken:T,position:M}};let vo=kt,Eo=He,Ao=Ve,Ro=we,gr=_t,No=Co;const yr={empty:!0,space:!0};function Oo(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Mo=class{constructor(e){this.input=e,this.root=new Ro,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new vo;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=i}return!1}comment(e){let t=new Eo;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=No(this.input)}decl(e,t){let r=new Ao;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Oo(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.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(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let d=c;d>0;d--){let m=u[d][0];if(h.trim().startsWith("!")&&m!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.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 gr;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")n||(n=c),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){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,r,i){let n,o,l=r.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=r[d],o=n[0],o==="space"&&d===l-1&&!i?c=!1:o==="comment"?(h=r[d-1]?r[d-1][0]:"empty",u=r[d+1]?r[d+1][0]:"empty",!yr[h]&&!yr[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new gr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}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 "+e[0][1],{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})}};var To=Mo;let $o=J,ko=Ge,Lo=To;function Fe(s,e){let t=new ko(s,e),r=new Lo(t);try{r.parse()}catch(i){throw i}return r.root}var Dt=Fe;Fe.default=Fe;$o.registerParse(Fe);let yt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}};var Cs=yt;yt.default=yt;let _o=Cs,wt=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new _o(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var It=wt;wt.default=wt;let Do=J,Io=Lt,Po=Ss,zo=Dt,wr=It,Fo=we,Uo=We,{isClean:W,my:Bo}=ye;const Wo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},jo={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ho={Once:!0,postcssPlugin:!0,prepare:!0},ie=0;function le(s){return typeof s=="object"&&typeof s.then=="function"}function vs(s){let e=!1,t=Wo[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ie,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ie,t+"Exit"]:[t,t+"Exit"]}function br(s){let e;return s.type==="document"?e=["Document",ie,"DocumentExit"]:s.type==="root"?e=["Root",ie,"RootExit"]:e=vs(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function bt(s){return s[W]=!1,s.nodes&&s.nodes.forEach(e=>bt(e)),s}let xt={},ne=class Es{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"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=bt(t);else if(t instanceof Es||t instanceof wr)i=bt(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=zo;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Bo]&&Do.rebuild(i)}this.result=new wr(e,i,r),this.helpers=Z(k({},xt),{postcss:xt,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?k(k({},n),n.prepare(this.result)):n)}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 r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!jo[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ho[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(le(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[W];){e[W]=!0;let t=[br(e)];for(;t.length>0;){let r=this.visitTick(t);if(le(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return le(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Uo;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Po(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(le(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[W];)e[W]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(le(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[W]){l[W]=!0,e.push(br(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ie){r.nodes&&r.nodes.length&&(r[W]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[W]=!0;let t=vs(e);for(let r of t)if(r===ie)e.nodes&&e.each(i=>{i[W]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};ne.registerPostcss=s=>{xt=s};var As=ne;ne.default=ne;Fo.registerLazyResult(ne);Io.registerLazyResult(ne);let Vo=Ss,Go=Dt;const qo=It;let Yo=We;let St=class{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=Go;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Yo;this.result=new qo(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Vo(n,i,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[]}};var Jo=St;St.default=St;let Ko=Lt,Qo=As,Zo=Jo,Xo=we,me=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Zo(this,e,t):new Qo(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ea=me;me.default=me;Xo.registerProcessor(me);Ko.registerProcessor(me);let Rs=kt,Ns=He,ta=J,ra=Mt,Os=Ve,Ms=Lt,sa=no,ia=Ge,na=As,oa=ms,aa=je,la=Dt,Pt=ea,ca=It,Ts=we,$s=_t,ua=We,ha=Cs;function E(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Pt(s)}E.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
39
39
|
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:
|
|
40
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new
|
|
40
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Pt().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return E([i(a)]).process(o,l)},i};E.stringify=ua;E.parse=la;E.fromJSON=sa;E.list=oa;E.comment=s=>new Ns(s);E.atRule=s=>new Rs(s);E.decl=s=>new Os(s);E.rule=s=>new $s(s);E.root=s=>new Ts(s);E.document=s=>new Ms(s);E.CssSyntaxError=ra;E.Declaration=Os;E.Container=ta;E.Processor=Pt;E.Document=Ms;E.Comment=Ns;E.Warning=ha;E.AtRule=Rs;E.Result=ca;E.Input=ia;E.Rule=$s;E.Root=Ts;E.Node=aa;na.registerPostcss(E);var fa=E;E.default=E;const N=En(fa);N.stringify;N.fromJSON;N.plugin;N.parse;N.list;N.document;N.comment;N.atRule;N.rule;N.decl;N.root;N.CssSyntaxError;N.Declaration;N.Container;N.Processor;N.Document;N.Comment;N.Warning;N.AtRule;N.Result;N.Input;N.Rule;N.Root;N.Node;const xr={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function da(s){let e=xr[s.tagName]?xr[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function qe(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=N([Sn,Cn,vn]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function pa(){return{stylesWithHoverClass:new Map}}function ma(s,e,t,r){const i=[];for(const a of s.childNodes)a.type===b.Text&&i.push(a);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=qe(n.join(""),r));let l=0;for(let a=0;a<i.length&&a!==n.length;a++){const c=i[a];if(!t)c.textContent=n[a];else if(a<n.length-1){let u=l,h=n[a+1].length;h=Math.min(h,30);let d=!1;for(;h>2;h--){const m=n[a+1].substring(0,h),p=o.substring(l).indexOf(m);if(d=p!==-1,d){u+=p;break}}d||(u+=n[a].length),c.textContent=o.substring(l,u),l=u}else c.textContent=o.substring(l)}}function ga(s,e,t,r){const{doc:i,hackCss:n,cache:o}=r;s.childNodes.length?ma(s,t,n,o):(n&&(t=qe(t,o)),e.appendChild(i.createTextNode(t)))}function ya(s,e){var t;const{doc:r,hackCss:i,cache:n}=e;switch(s.type){case b.Document:return r.implementation.createDocument(null,"",null);case b.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case b.Element:{const o=da(s);let l;s.isSVG?l=r.createElementNS("http://www.w3.org/2000/svg",o):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),l=r.createElement(o));const a={};for(const c in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,c))continue;let u=s.attributes[c];if(!(o==="option"&&c==="selected"&&u===!1)&&u!==null){if(u===!0&&(u=""),c.startsWith("rr_")){a[c]=u;continue}if(typeof u=="string"){if(o==="style"&&c==="_cssText"){ga(s,l,u,e);continue}else if(o==="textarea"&&c==="value"){l.appendChild(r.createTextNode(u)),s.childNodes=[];continue}}try{if(s.isSVG&&c==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",c,u.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")l.setAttribute("_"+c,u.toString());else if(o==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){l.setAttribute("csp-content",u.toString());continue}else o==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||o==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Be(s.attributes.href)==="js"||(o==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",s.attributes.srcset):l.setAttribute(c,u.toString()))}catch(h){}}}for(const c in a){const u=a[c];if(o==="canvas"&&c==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=u.toString(),l.RRNodeType&&(l.rr_dataURL=u.toString())}else if(o==="img"&&c==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=u.toString())}if(c==="rr_width")l.style.setProperty("width",u.toString());else if(c==="rr_height")l.style.setProperty("height",u.toString());else if(c==="rr_mediaCurrentTime"&&typeof u=="number")l.currentTime=u;else if(c==="rr_mediaState")switch(u){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else c==="rr_mediaPlaybackRate"&&typeof u=="number"?l.playbackRate=u:c==="rr_mediaMuted"&&typeof u=="boolean"?l.muted=u:c==="rr_mediaLoop"&&typeof u=="boolean"?l.loop=u:c==="rr_mediaVolume"&&typeof u=="number"?l.volume=u:c==="rr_open_mode"&&l.setAttribute("rr_open_mode",u)}if(s.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case b.Text:return s.isStyle&&i?r.createTextNode(qe(s.textContent,n)):r.createTextNode(s.textContent);case b.CDATA:return r.createCDATASection(s.textContent);case b.Comment:return r.createComment(s.textContent);default:return null}}function zt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:l}=e;if(r.has(s.id)){const c=r.getNode(s.id),u=r.getMeta(c);if(Tr(u,s))return r.getNode(s.id)}let a=ya(s,{doc:t,hackCss:n,cache:l});if(!a)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===b.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==b.DocumentType&&(s.childNodes[0].type===b.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),a=t),r.add(a,s),(s.type===b.Document||s.type===b.Element)&&!i)for(const c of s.childNodes){const u=zt(c,{doc:t,mirror:r,skipChild:!1,hackCss:n,afterAppend:o,cache:l});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&re(a)&&a.shadowRoot)a.shadowRoot.appendChild(u);else if(s.type===b.Document&&c.type==b.Element){const h=u;let d=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(d=m)}),d?(h.removeChild(d),a.appendChild(u),h.appendChild(d)):a.appendChild(u)}else a.appendChild(u);o&&o(u,c.id)}return a}function wa(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function ba(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==b.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const n=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=n),i==="rr_scrollTop"&&(r.scrollTop=n)}}function xa(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:n,cache:o,mirror:l=new Ue}=e,a=zt(s,{doc:t,mirror:l,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return wa(l,c=>{r&&r(c),ba(c,l)}),a}exports.IGNORED_NODE=ot;exports.Mirror=Ue;exports.absolutifyURLs=ue;exports.adaptCssForReplay=qe;exports.buildNodeWithSN=zt;exports.classMatchesRegex=De;exports.cleanupSnapshot=bn;exports.createCache=pa;exports.createMirror=ti;exports.escapeImportStatement=vr;exports.extractFileExtension=Be;exports.fixSafariColons=Ar;exports.genId=Vr;exports.getInputType=$r;exports.ignoreAttribute=qr;exports.interactiveEvents=Dr;exports.interactiveTags=Ir;exports.is2DCanvasBlank=Mr;exports.isCSSImportRule=Rr;exports.isCSSStyleRule=Nr;exports.isElement=re;exports.isElementInteractive=Pr;exports.isElementVisible=vt;exports.isExcludeAttribute=Yr;exports.isNativeShadowDom=Te;exports.isNodeMetaEqual=Tr;exports.isShadowRoot=Cr;exports.isTextVisible=_r;exports.markCssSplits=Lr;exports.maskInputValue=Or;exports.needMaskingText=Jr;exports.normalizeCssString=ce;exports.rebuild=xa;exports.serializeNodeWithId=te;exports.snapshot=yn;exports.splitCssText=kr;exports.stringifyRule=Er;exports.stringifyStylesheet=Le;exports.toLowerCase=ge;exports.transformAttribute=Gr;exports.visitSnapshot=wn;
|
|
41
41
|
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
42
42
|
var __cp = (to, from, except, desc) => {
|
|
43
43
|
if ((from && typeof from === "object") || typeof from === "function") {
|